{"version":3,"file":"DemoLink.CD-wLWhs.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/hPKChbLKpr3hWpZWT1hm/omJWu3ejFpiIrlaAUYn2/DemoLink.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function withDemoSignup(){return{onClick:async()=>{console.log(\"🟢 Demo Signup clicked\");// 1️⃣ Get inputs\nconst nameInput=document.querySelector('input[name=\"name\"]');const emailInput=document.querySelector('input[type=\"email\"]');const name=nameInput?.value?.trim();const email=emailInput?.value?.trim().toLowerCase();if(!name||!email){alert(\"Please enter your name and email.\");return;}try{// 2️⃣ Send to backend\nconst response=await fetch(\"https://us-central1-modstream-470ed.cloudfunctions.net/handleDemoSignup\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({name,email})});const data=await response.json();// ✅ Redirect if backend tells us to\nif(data.redirect){window.location.href=data.redirect;return;}// ✅ Normal success flow\nif(response.ok){// 🔥 NEW: Redirect to confirmation page\nwindow.location.href=\"https://modstream.io/demosent\";}else{alert(`❌ Error: ${data?.error||\"Unknown error\"}`);}}catch(err){console.error(\"🔥 Demo Signup Error:\",err);alert(\"❌ Network error. Please try again.\");}}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withwithDemoSignup(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...withDemoSignup(props)});};}withwithDemoSignup.displayName=\"withDemoSignup\";\nexport const __FramerMetadata__ = {\"exports\":{\"withDemoSignup\":{\"type\":\"override\",\"name\":\"withDemoSignup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withwithDemoSignup\":{\"type\":\"reactHoc\",\"name\":\"withwithDemoSignup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DemoLink.map"],"mappings":"4KAA2C,SAAgB,GAAgB,CAAC,MAAM,CAAC,QAAQ,SAAS,CAAC,QAAQ,IAAI,yBAAyB,CAC1I,IAAM,EAAU,SAAS,cAAc,qBAAqB,CAAO,EAAW,SAAS,cAAc,sBAAsB,CAAO,EAAK,GAAW,OAAO,MAAM,CAAO,EAAM,GAAY,OAAO,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,GAAM,CAAC,EAAM,CAAC,MAAM,oCAAoC,CAAC,OAAQ,GAAG,CAC5R,IAAM,EAAS,MAAM,MAAM,0EAA0E,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,CAAC,OAAK,QAAM,CAAC,CAAC,CAAC,CAAO,EAAK,MAAM,EAAS,MAAM,CACpO,GAAG,EAAK,SAAS,CAAC,EAAO,SAAS,KAAK,EAAK,SAAS,OAClD,EAAS,GACZ,EAAO,SAAS,KAAK,gCAAsC,MAAM,YAAY,GAAM,OAAO,kBAAkB,OAAS,EAAI,CAAC,QAAQ,MAAM,wBAAwB,EAAI,CAAC,MAAM,qCAAqC,GAAI,CAAqJ,SAAgB,EAAmB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAe,EAAM,CAAC,CAAC,uBAL7e,IAK2O,IAAmF,CAAmL,EAAmB,YAAY"}