{"version":3,"file":"CalendlyEmbed.TUIpxcag.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Ev7T7tfYnpDGMeoiZYcm/gOkkFeeEWmDe1WgFVIMM/CalendlyEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{useIsStaticRenderer}from\"framer\";const CALENDLY_BASE=\"https://calendly.com/d/ctqx-z6t-43b/intro-call-with-addxstudio\";const GROUND_TOKEN_ID=\"61790527-7b4d-4d55-907b-60a2d28b36b2\";const GROUND_LIGHT=\"#f2eee5\";/* Runs at module-evaluation time — as soon as this chunk is parsed, ahead\n   of the component's own mount/effect — so the browser can start the\n   DNS + TLS handshake to calendly.com before the iframe itself is even\n   created. Shaves real time off the eventual iframe load without\n   requiring the (broken, see CalendlyEmbed history) custom-code head\n   injection path. */if(typeof document!==\"undefined\"){const head=document.head;if(!head.querySelector(\"link[data-calendly-preconnect]\")){const preconnect=document.createElement(\"link\");preconnect.rel=\"preconnect\";preconnect.href=\"https://calendly.com\";preconnect.crossOrigin=\"anonymous\";preconnect.setAttribute(\"data-calendly-preconnect\",\"\");head.appendChild(preconnect);const dnsPrefetch=document.createElement(\"link\");dnsPrefetch.rel=\"dns-prefetch\";dnsPrefetch.href=\"https://calendly.com\";head.appendChild(dnsPrefetch);}}/* Calendly's hosted page (not just the JS widget) accepts these as plain\n   query params, so a bare `<iframe src>` — no widget.js, no postMessage,\n   no init timing — can still be themed. This is deliberately simpler than\n   the earlier inline-widget approach: that one broke repeatedly on script-\n   load races and Framer-specific quirks (router/CSS/scroll conflicts); a\n   plain iframe is exactly what the reference implementation used, and is\n   as close to bulletproof as this gets. */const THEME_PARAMS={light:{background_color:\"f2eee5\",text_color:\"1a1815\",primary_color:\"1a1815\"},dark:{background_color:\"0a0a09\",text_color:\"e4e0d8\",primary_color:\"efe6d2\"}};function isSiteLight(){if(typeof window===\"undefined\")return true;const v=getComputedStyle(document.body).getPropertyValue(`--token-${GROUND_TOKEN_ID}`).trim().toLowerCase();if(v)return v===GROUND_LIGHT;return window.matchMedia(\"(prefers-color-scheme: light)\").matches;}function buildUrl(light){const url=new URL(CALENDLY_BASE);const params=THEME_PARAMS[light?\"light\":\"dark\"];for(const key in params)url.searchParams.set(key,params[key]);return url.toString();}/* Mounts and starts loading the iframe immediately on page load — not\n   gated on scroll visibility in any way — so by the time a visitor\n   actually scrolls down to it, it has already had the page's full time-\n   on-screen-so-far to load. There is nothing here to defer further: the\n   iframe request fires as soon as this component's effect runs, same as\n   every other component on the page. */export default function CalendlyEmbed(){const isStatic=useIsStaticRenderer();const[light,setLight]=useState(true);useEffect(()=>{if(isStatic)return;setLight(isSiteLight());const observer=new MutationObserver(()=>setLight(isSiteLight()));observer.observe(document.body,{attributes:true,attributeFilter:[\"style\"]});const mq=window.matchMedia(\"(prefers-color-scheme: light)\");const onChange=()=>setLight(isSiteLight());mq.addEventListener(\"change\",onChange);return()=>{observer.disconnect();mq.removeEventListener(\"change\",onChange);};},[isStatic]);if(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",minHeight:700}});}return /*#__PURE__*/_jsx(\"iframe\",{src:buildUrl(light),title:\"Book a call\",style:{width:\"100%\",height:\"100%\",minHeight:700,border:\"none\",display:\"block\"}},light?\"light\":\"dark\");}CalendlyEmbed.displayName=\"Calendly Embed\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CalendlyEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CalendlyEmbed.map"],"mappings":"yLAWyN,SAAS,GAAa,CAAC,GAAU,IAAS,OAAY,MAAO,GAAK,IAAM,EAAE,iBAAiB,SAAS,IAAI,CAAC,CAAC,iBAAiB,WAAW,GAAiB,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,EAA+B,OAA1B,EAAS,IAAI,EAAoB,EAA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