{"version":3,"file":"IClosed_Split_Testing.CUAzMYNQ.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/yZB2PeggpflquqmxBLnE/fTZamDEDjvgRGeBGZBOa/IClosed_Split_Testing.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * iClosed Widget Component\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function IClosed_SplitTest({url,style}){const scriptRef=useRef(null);useEffect(()=>{// 1) Remove the framer split-test parameter from the page URL\n// so the calendar cannot pass it into the thank-you redirect.\ntry{const u=new URL(window.location.href);if(u.searchParams.has(\"framer_variant\")){u.searchParams.delete(\"framer_variant\");window.history.replaceState({},\"\",u.toString());}}catch(e){}// 2) Load iClosed widget script\nif(scriptRef.current&&document.body.contains(scriptRef.current)){document.body.removeChild(scriptRef.current);}const script=document.createElement(\"script\");script.src=\"https://app.iclosed.io/assets/widget.js\";script.async=true;document.body.appendChild(script);scriptRef.current=script;script.onload=()=>{if(window.iClosedWidgetInit)window.iClosedWidgetInit();};return()=>{if(scriptRef.current&&document.body.contains(scriptRef.current)){document.body.removeChild(scriptRef.current);}};},[url]);return /*#__PURE__*/_jsx(\"div\",{className:\"iclosed-widget\",\"data-url\":url,title:\"Orientation\",style:{width:\"100%\",height:\"100%\"}});}IClosed_SplitTest.defaultProps={url:\"https://app.iclosed.io/e/bulletproof/orientation\"};addPropertyControls(IClosed_SplitTest,{url:{type:ControlType.String,title:\"URL\",placeholder:\"Enter widget URL\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IClosed_SplitTest\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IClosed_Split_Testing.map"],"mappings":"gMAKG,SAAwB,EAAkB,CAAC,MAAI,SAAO,CAAC,IAAM,EAAUA,EAAO,KAAK,CAG0Z,OAHzZ,MAAc,CAErG,GAAG,CAAC,IAAM,EAAE,IAAI,IAAI,EAAO,SAAS,KAAK,CAAI,EAAE,aAAa,IAAI,iBAAiB,GAAE,EAAE,aAAa,OAAO,iBAAiB,CAAC,EAAO,QAAQ,aAAa,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,OAAW,EAClL,EAAU,SAAS,SAAS,KAAK,SAAS,EAAU,QAAQ,EAAE,SAAS,KAAK,YAAY,EAAU,QAAQ,CAAE,IAAM,EAAO,SAAS,cAAc,SAAS,CAA+M,MAA9M,GAAO,IAAI,0CAA0C,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,EAAO,CAAC,EAAU,QAAQ,EAAO,EAAO,WAAW,CAAI,EAAO,mBAAkB,EAAO,mBAAmB,MAAa,CAAI,EAAU,SAAS,SAAS,KAAK,SAAS,EAAU,QAAQ,EAAE,SAAS,KAAK,YAAY,EAAU,QAAQ,GAAM,CAAC,EAAI,CAAC,CAAqB,EAAK,MAAM,CAAC,UAAU,iBAAiB,WAAW,EAAI,MAAM,cAAc,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,CAAC,sBARvkB,IAAoC,IAAoD,CAQif,EAAkB,aAAa,CAAC,IAAI,mDAAmD,CAAC,EAAoB,EAAkB,CAAC,IAAI,CAAC,KAAK,EAAY,OAAO,MAAM,MAAM,YAAY,mBAAmB,CAAC,CAAC"}