{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/9jKRVUbCG6BmyFOBZtEv/ta0FIslH6YSVBWlwcykY/AI_Waitlist_number.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// \u2705 Create a Global Store\nexport const store=createStore({waitNumber:\"123\"});export function WithRenderWaitlist(Component){return props=>{const[state,setStore]=store()// \u2705 Correctly Using Framer Store\n;const launchTimestamp=1741305600// Static Unix timestamp for March 7, 2025\n;// const launchTimestamp = 1741392000 // Static Unix timestamp for March 8, 2025\nconst entriesPerHour=4;const entriesPerSecond=entriesPerHour/3600;const getWaitlistNumber=()=>{const currentTimestamp=Math.floor(Date.now()/1e3);return Math.floor((currentTimestamp-launchTimestamp)*entriesPerSecond).toString();};useEffect(()=>{const newNumber=getWaitlistNumber();// console.log(\"Updating Store \u2192 waitNumber:\", newNumber)\nsetStore({waitNumber:newNumber})// \u2705 Store should now update\n;},[])// \u2705 Runs Once on Mount\n;return /*#__PURE__*/_jsx(Component,{...props});};}// \u2705 Override to Calculate and Set Waitlist Number\nexport function WithCalculateWaitlist(Component){return props=>{const[state,setStore]=store()// \u2705 Correctly Using Framer Store\n;return /*#__PURE__*/_jsx(Component,{...props,text:`${state.waitNumber}`});};}export function WithChangeWaitHeading(Component){return props=>{const[isVisible,setIsVisible]=useState(false);const[state,setStore]=store()// \u2705 Correctly Using Framer Store\n;useEffect(()=>{const observer=new MutationObserver(()=>{const targetElement=document.querySelector('.waitlist-form [data-framer-name=\"Success-Wait\"]');setIsVisible(!!targetElement)// Set visibility based on existence of the element\n;});const formElement=document.querySelector(\".waitlist-form\");if(formElement){observer.observe(formElement,{childList:true,subtree:true});}return()=>observer.disconnect();},[]);return isVisible?/*#__PURE__*/_jsx(Component,{...props,text:\"You\u2019ve joined the Instant AI waitlist\"}):/*#__PURE__*/_jsx(Component,{...props});};}// \u2705 Override to Set Hidden Input Field\nexport function WithSetWaitList(Component){return props=>{const[state]=store()// \u2705 Correctly Using Store\n;useEffect(()=>{const hiddenInputs=document.querySelectorAll('input[name=\"conversion_episode_number\"]');if(hiddenInputs){hiddenInputs.forEach(input=>{// console.log(\"Updating Hidden Input \u2192\", state.waitNumber)\ninput.value=state.waitNumber;});}},[state.waitNumber])// \u2705 Runs Every Time `waitNumber` Updates\n;return /*#__PURE__*/_jsx(Component,{...props,value:state.waitNumber});};}export function WithShowOnWaitlist(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const observer=new MutationObserver(()=>{const targetElement=document.querySelector('.waitlist-form [data-framer-name=\"Success-Wait\"]');setIsVisible(!!targetElement)// Set visibility based on existence of the element\n;});const formElement=document.querySelector(\".waitlist-form\");if(formElement){observer.observe(formElement,{childList:true,subtree:true});}return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,display:isVisible?\"flex\":\"none\"}});};}export function WithClickSubmitWaitlist(Component){return props=>{const[state,setStore]=store()// \u2705 Correctly Using Store\n;useEffect(()=>{const revenue=document.querySelector('input[name=\"conversion_estimated_site_revenue\"]').value;// console.log(\"Revenue value:: \", revenue)\nwindow.dataLayer&&window.dataLayer.push({dlv_site_revenue:revenue});});return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>setStore({waitNumber:state.waitNumber})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"WithRenderWaitlist\":{\"type\":\"reactHoc\",\"name\":\"WithRenderWaitlist\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"store\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithShowOnWaitlist\":{\"type\":\"reactHoc\",\"name\":\"WithShowOnWaitlist\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithClickSubmitWaitlist\":{\"type\":\"reactHoc\",\"name\":\"WithClickSubmitWaitlist\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithCalculateWaitlist\":{\"type\":\"reactHoc\",\"name\":\"WithCalculateWaitlist\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithChangeWaitHeading\":{\"type\":\"reactHoc\",\"name\":\"WithChangeWaitHeading\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithSetWaitList\":{\"type\":\"reactHoc\",\"name\":\"WithSetWaitList\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AI_Waitlist_number.map"],
  "mappings": "kIAAAA,IACO,IAAMC,EAAMC,EAAY,CAAC,WAAW,KAAK,CAAC,EAO1C,SAASC,EAAsBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAM,EAC3F,OAAoBC,EAAKL,EAAU,CAAC,GAAGC,EAAM,KAAK,GAAGC,EAAM,UAAU,EAAE,CAAC,CAAE,CAAE,CAGtE,SAASI,EAAgBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,CAAK,EAAEC,EAAM,EAC5E,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAa,SAAS,iBAAiB,yCAAyC,EAAKA,GAAcA,EAAa,QAAQC,GAAO,CACrJA,EAAM,MAAMJ,EAAM,UAAW,CAAC,CAAG,EAAE,CAACA,EAAM,UAAU,CAAC,EAChCK,EAAKP,EAAU,CAAC,GAAGC,EAAM,MAAMC,EAAM,UAAU,CAAC,CAAE,CAAE",
  "names": ["init_ssg_sandbox_shims", "store", "createStore", "WithCalculateWaitlist", "Component", "props", "state", "setStore", "store", "p", "WithSetWaitList", "Component", "props", "state", "store", "ue", "hiddenInputs", "input", "p"]
}
