{"version":3,"file":"AutoSubscribe.CeIBSc9d.mjs","names":[],"sources":["https:/framerusercontent.com/modules/EfEIHB2zLScvwGkbT7SC/ynQtAWoUtv6xeJmOkLfk/AutoSubscribe.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function AutoSubscribe(props){useEffect(()=>{function subscribe(attempt=0){var _searchParams_get;const searchParams=new URL(window.location.href).searchParams;const email=(_searchParams_get=searchParams.get(\"email\"))===null||_searchParams_get===void 0?void 0:_searchParams_get.replace(\" \",\"+\");const name=searchParams.get(\"name\");const tags=searchParams.get(\"tags\");if(!email){return console.warn(\"Couldn't save in encharge because there's no email\");}if(!window.EncTracking){console.warn(`Encharge isn't installed on this page. Retrying`);if(attempt<5){setTimeout(()=>subscribe(attempt+1),500);}return;}const payload={email:email,name:name,tags:tags};window.EncTracking.identify(payload);}subscribe();},[]);return /*#__PURE__*/_jsx(\"div\",{className:\"sj-auto-subscribe\"});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoSubscribe\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AutoSubscribe.map"],"mappings":"gIAMG,SAAwB,EAAc,EAAM,CAAuqB,OAAtqB,MAAc,CAAC,SAAS,EAAU,EAAQ,EAAE,CAAuB,IAAM,EAAa,IAAI,IAAI,EAAO,SAAS,KAAK,CAAC,aAAmB,EAAyB,EAAa,IAAI,QAAQ,EAA8D,QAAQ,IAAI,IAAI,CAAO,EAAK,EAAa,IAAI,OAAO,CAAO,EAAK,EAAa,IAAI,OAAO,CAAC,GAAG,CAAC,EAAO,OAAO,QAAQ,KAAK,qDAAqD,CAAE,GAAG,CAAC,EAAO,YAAY,CAAC,QAAQ,KAAK,kDAAkD,CAAI,EAAQ,GAAG,eAAe,EAAU,EAAQ,EAAE,CAAC,IAAI,CAAE,OAAQ,IAAM,EAAQ,CAAO,QAAW,OAAU,OAAK,CAAC,EAAO,YAAY,SAAS,EAAQ,CAAE,GAAW,EAAG,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAC,UAAU,oBAAoB,CAAC,sBAN1uB,IAA6B"}