{"version":3,"file":"shared-lib.hsRJS9ex.mjs","names":["React.useState","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","p","_e","window","init_framer_DcGZRLrs","addPropertyControls","fontStore","ControlType","RenderTarget","collectTokens","light","dark","walk","rule","rules","condition","inDark","selector","target","i","name","sheet","applyTheme","root","theme","block","values","value","el","STYLE_ID","ThemeToggle","props","setTheme","isCanvas","stored","STORAGE_KEY","query","onChange","event","choose","next","button","active","label","activeColor","activeIconColor","iconColor","icon","style","trackColor","borderColor","Sun","Moon","init_ThemeToggle","fonts","css","className","init_E6SrU4q6B"],"sources":["https:/framerusercontent.com/modules/mV0qYJ60lgsoM0StUDbt/2aI96LjCHsGZXrJlk6QA/ThemeToggle.js","https:/framerusercontent.com/modules/ynKQeUKnqnPS9YagOng8/jtNDT4u0SiEDyaqvijHI/E6SrU4q6B.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const STORAGE_KEY=\"tidewell-theme\";const STYLE_ID=\"tidewell-theme-overrides\";// Reads the light and dark values of every Framer color style from the page's own CSS.\nfunction collectTokens(){const light={};const dark={};const walk=(rules,inDark)=>{for(const rule of Array.from(rules)){if(rule instanceof CSSMediaRule){const condition=rule.conditionText||rule.media.mediaText||\"\";if(/prefers-color-scheme:\\s*dark/.test(condition))walk(rule.cssRules,true);else if(!/prefers-color-scheme/.test(condition))walk(rule.cssRules,inDark);continue;}if(!(rule instanceof CSSStyleRule))continue;const selector=rule.selectorText||\"\";if(selector.includes(\"data-tidewell-theme\"))continue;const target=inDark||/theme[^\\]]*dark/i.test(selector)?dark:light;for(let i=0;i<rule.style.length;i++){const name=rule.style[i];if(name.startsWith(\"--token-\"))target[name]=rule.style.getPropertyValue(name).trim();}}};for(const sheet of Array.from(document.styleSheets)){try{walk(sheet.cssRules,false);}catch{// cross-origin stylesheet, skip\n}}return{light,dark};}function applyTheme(theme){const root=document.documentElement;root.setAttribute(\"data-tidewell-theme\",theme);root.style.colorScheme=theme;document.body.setAttribute(\"data-framer-theme\",theme);const{light,dark}=collectTokens();const block=values=>Object.entries(values).map(([name,value])=>name+\":\"+value+\" !important;\").join(\"\");let el=document.getElementById(STYLE_ID);if(!el){el=document.createElement(\"style\");el.id=STYLE_ID;document.head.appendChild(el);}el.textContent='html[data-tidewell-theme=\"light\"] body{'+block(light)+\"}\"+'html[data-tidewell-theme=\"dark\"] body{'+block({...light,...dark})+\"}\";}const Sun=()=>/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"12\",cy:\"12\",r:\"4\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41\"})]});const Moon=()=>/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z\"})});/**\n * Light / dark mode switch. Remembers the visitor's choice and follows the system setting until they pick one.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ThemeToggle(props){const{trackColor,borderColor,activeColor,iconColor,activeIconColor,style}=props;const[theme,setTheme]=React.useState(\"light\");const isCanvas=RenderTarget.current()===RenderTarget.canvas;React.useEffect(()=>{if(isCanvas)return;let stored=null;try{stored=window.localStorage.getItem(STORAGE_KEY);}catch{}if(stored===\"light\"||stored===\"dark\"){setTheme(stored);applyTheme(stored);return;}const query=window.matchMedia(\"(prefers-color-scheme: dark)\");setTheme(query.matches?\"dark\":\"light\");const onChange=event=>setTheme(event.matches?\"dark\":\"light\");query.addEventListener(\"change\",onChange);return()=>query.removeEventListener(\"change\",onChange);},[isCanvas]);const choose=next=>{setTheme(next);try{window.localStorage.setItem(STORAGE_KEY,next);}catch{}applyTheme(next);};const button=(value,label,icon)=>{const active=theme===value;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":label,\"aria-pressed\":active,title:label,onClick:()=>choose(value),style:{width:28,height:28,padding:0,border:\"none\",borderRadius:14,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",background:active?activeColor:\"transparent\",color:active?activeIconColor:iconColor,boxShadow:active?\"0 1px 2px rgba(0,0,0,0.12)\":\"none\",transition:\"background 0.2s ease, color 0.2s ease\"},children:icon});};return /*#__PURE__*/_jsxs(\"div\",{role:\"group\",\"aria-label\":\"Color theme\",style:{...style,display:\"inline-flex\",alignItems:\"center\",gap:2,padding:3,boxSizing:\"border-box\",borderRadius:999,background:trackColor,border:\"1px solid \"+borderColor},children:[button(\"light\",\"Light mode\",/*#__PURE__*/_jsx(Sun,{})),button(\"dark\",\"Dark mode\",/*#__PURE__*/_jsx(Moon,{}))]});}ThemeToggle.defaultProps={trackColor:\"#f7f7f9\",borderColor:\"#ececef\",activeColor:\"#ffffff\",iconColor:\"#9a9aa3\",activeIconColor:\"#0f0f12\"};addPropertyControls(ThemeToggle,{trackColor:{type:ControlType.Color,title:\"Track\"},borderColor:{type:ControlType.Color,title:\"Border\"},activeColor:{type:ControlType.Color,title:\"Active\"},iconColor:{type:ControlType.Color,title:\"Icon\"},activeIconColor:{type:ControlType.Color,title:\"Active icon\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThemeToggle\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThemeToggle.map","// Generated by Framer (bb264f8)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-xenH5 .framer-styles-preset-1fk9heo:not(.rich-text-wrapper), .framer-xenH5 .framer-styles-preset-1fk9heo.rich-text-wrapper a { --framer-link-current-text-color: var(--token-U60G0B4up); --framer-link-current-text-decoration: none; --framer-link-hover-text-color: var(--token-P7LZBtfT8); --framer-link-hover-text-decoration: none; --framer-link-text-color: var(--token-U60G0B4up); --framer-link-text-decoration: none; }\"];export const className=\"framer-xenH5\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,qNACA,SAASe,GAAe,CAAC,IAAMC,EAAM,CAAC,EAAQC,EAAK,CAAC,EAAQC,GAAM,EAAM,IAAS,CAAC,IAAI,IAAMC,KAAQ,MAAM,KAAKC,CAAK,EAAE,CAAC,GAAGD,aAAgB,aAAa,CAAC,IAAME,EAAUF,EAAK,eAAeA,EAAK,MAAM,WAAW,GAAM,+BAA+B,KAAKE,CAAS,EAAEH,EAAKC,EAAK,SAAS,EAAI,EAAW,uBAAuB,KAAKE,CAAS,GAAEH,EAAKC,EAAK,SAASG,CAAM,EAAE,QAAS,CAAC,GAAG,EAAEH,aAAgB,cAAc,SAAS,IAAMI,EAASJ,EAAK,cAAc,GAAG,GAAGI,EAAS,SAAS,qBAAqB,EAAE,SAAS,IAAMC,EAAOF,GAAQ,mBAAmB,KAAKC,CAAQ,EAAEN,EAAKD,EAAM,IA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