{"version":3,"file":"Test.Dy2L2jLS.mjs","names":[],"sources":["https:/framerusercontent.com/modules/wGrVxbpvoRgOaqaW1yAK/0HXaYUWK7NqGmjilDqSK/Test.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// import { createStore } from \"https://framer.com/m/framer/store.js@^1.0.0\"\n// const useStore = createStore({\n//     isCaptive: false,\n// })\n// Allows us to safely handle the instagram user agent\nexport function withSafeAppLink(Component){return props=>{const handleClick=()=>{if(isCaptiveUserAgent()){window.location.href=\"/sign-up-instagram?isCaptive=true\";}else{console.log(\"User agent does not contain Instagram or LinkedIn.\");window.location.href=\"/app\";}};// const handleTap = () => {\n//     if (isCaptiveUserAgent()) {\n//         window.location.search = \"isCaptive=true\"\n//         // @ts-ignore\n//         props?.onTap()\n//     } else {\n//         console.log(\n//             \"User agent does not contain Instagram or LinkedIn.\"\n//         )\n//         window.location.href = \"/app\"\n//     }\n// }\n// if (captiveUserAgent) {\n//     return (\n//         <Component {...props} onClick={handleClick} onTap={() => {}} />\n//     )\n// }\nreturn /*#__PURE__*/_jsx(Component,{id:\"signUpButton\",...props,onClick:handleClick});};}const EmbeddedCaptiveSignUpStyle={position:\"absolute\",display:\"flex\",width:\"100vw\",height:\"100vh\",background:\"black\"};export function withAppRedirect(Component){return props=>{useEffect(()=>{if(!isCaptiveUserAgent()&&window.location.search.includes(\"isCaptive\")){window.location.href=\"/app\";}},[]);return /*#__PURE__*/_jsx(Component,{...props});};}const isCaptiveUserAgent=()=>{const userAgent=navigator.userAgent;const regex=/(instagram|linkedin)/i;return regex.test(userAgent);};\nexport const __FramerMetadata__ = {\"exports\":{\"withSafeAppLink\":{\"type\":\"reactHoc\",\"name\":\"withSafeAppLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppRedirect\":{\"type\":\"reactHoc\",\"name\":\"withAppRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Test.map"],"mappings":"uIAKA,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,MAAgB,CAAI,GAAoB,CAAE,EAAO,SAAS,KAAK,qCAA0C,QAAQ,IAAI,qDAAqD,CAAC,EAAO,SAAS,KAAK,SAiBhQ,OAAoB,EAAK,EAAU,CAAC,GAAG,eAAe,GAAG,EAAM,QAAQ,EAAY,CAAC,EAA0H,SAAgB,EAAgB,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAI,CAAC,GAAoB,EAAE,EAAO,SAAS,OAAO,SAAS,YAAY,GAAE,EAAO,SAAS,KAAK,SAAU,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,yBAtBrY,IAA6B,CAsBkX,MAAuB,CAAC,IAAM,EAAU,EAAU,UAA8C,MAAxB,wBAAqC,KAAK,EAAU"}