{"version":3,"file":"CheckoutEmbed.DPEprPlI.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/Ykt7yHJv0cWGXRIjeVPz/vMr8ppriKOAZrrAhFACZ/CheckoutEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth  any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicHeight       600\n */export default function MindsipCheckout({checkoutUrl}){const host=useRef(null);const[id]=useState(()=>`cp-${crypto.randomUUID()}`);useEffect(()=>{if(!host.current)return;host.current.innerHTML=`<div id=\"${id}\" class=\"cp-checkout\" data-checkout=\"${checkoutUrl}\" style=\"width:100%\"></div>`;const load=()=>new Promise(res=>{if(window.CheckoutPage)return res();const s=document.createElement(\"script\");s.src=\"https://assets.checkoutpage.com/overlay.js\";s.async=true;s.onload=()=>res();document.body.appendChild(s);});load().then(()=>window.CheckoutPage?.(`#${id}`,{page:checkoutUrl}));},[checkoutUrl,id]);return /*#__PURE__*/_jsx(\"div\",{ref:host,style:{width:\"100%\"}});}addPropertyControls(MindsipCheckout,{checkoutUrl:{type:ControlType.String,title:\"Checkout URL\",defaultValue:\"https://subscription.mindsip.ai/monthly\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MindsipCheckout\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckoutEmbed.map"],"mappings":"uMAIG,SAAwB,EAAgB,CAAC,eAAa,CAAC,IAAM,EAAKA,EAAO,KAAK,CAAM,CAAC,GAAIC,MAAa,MAAM,OAAO,YAAY,GAAG,CAAud,OAAtd,MAAc,CAAK,EAAK,UAAe,EAAK,QAAQ,UAAU,YAAY,EAAG,uCAAuC,EAAY,kCAA4C,IAAI,QAAQ,GAAK,CAAC,GAAG,EAAO,aAAa,OAAO,GAAK,CAAC,IAAM,EAAE,SAAS,cAAc,SAAS,CAAC,EAAE,IAAI,6CAA6C,EAAE,MAAM,GAAK,EAAE,WAAW,GAAK,CAAC,SAAS,KAAK,YAAY,EAAE,EAAG,GAAO,CAAC,SAAS,EAAO,eAAe,IAAI,IAAK,CAAC,KAAK,EAAY,CAAC,CAAC,GAAG,CAAC,EAAY,EAAG,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAK,MAAM,CAAC,MAAM,OAAO,CAAC,CAAC,sBAJhnB,IAA6C,IAAoD,CAIihB,EAAoB,EAAgB,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,eAAe,aAAa,0CAA0C,CAAC,CAAC"}