{"version":3,"file":"TrackingRedirect.B2By_elS.mjs","names":["useCallback","useMemo","__esmMin","window","pe","init_ssg_sandbox_shims","init_npm_react_18_3_1","init_jsx_runtime","ne","ce","addPropertyControls","ControlType","init_framer_D6uXRwWs","TrackingRedirect","props","redirectToDestination","destinationUrl","delayMs","containerStyle","style","label","init_TrackingRedirect"],"sources":["https:/framerusercontent.com/modules/zmZfUJzTYCnH7njn5Pat/jeNYyoQ1SRwcn1bR0gEm/TrackingRedirect.js"],"sourcesContent":["// User request: Create a small Framer code component named TrackingRedirect for an intermediate tracking redirect page that redirects to Stripe after a configurable delay, with SSR/static guards, canvas-safe behavior, and property controls for destinationUrl, delayMs, and label.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TrackingRedirect(props){const{destinationUrl=\"https://buy.stripe.com/9B614m1vd0zg2dwgkg2wU0F\",delayMs=250,label=\"Redirecting to checkout…\",style}=props;const redirectToDestination=useCallback(()=>{if(typeof window===\"undefined\")return;try{if(window.top&&window.top.location){window.top.location.replace(destinationUrl);return;}}catch(error){// Accessing or navigating window.top can throw in cross-origin frames.\n}try{window.location.replace(destinationUrl);}catch(error){// No further fallback available.\n}},[destinationUrl]);useEffect(()=>{if(typeof window===\"undefined\")return;if(!destinationUrl)return;void delayMs;redirectToDestination();},[delayMs,destinationUrl,redirectToDestination]);const containerStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",padding:16,boxSizing:\"border-box\",...style}),[style]);return /*#__PURE__*/_jsx(\"main\",{style:containerStyle,\"aria-live\":\"polite\",children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"max-content\",maxWidth:\"100%\"},children:label})});}addPropertyControls(TrackingRedirect,{destinationUrl:{type:ControlType.String,title:\"Destination\",defaultValue:\"https://buy.stripe.com/9B614m1vd0zg2dwgkg2wU0F\",placeholder:\"https://example.com\"},delayMs:{type:ControlType.Number,title:\"Delay\",defaultValue:250,min:0,max:5e3,step:50,unit:\"ms\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Redirecting to checkout…\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TrackingRedirect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TrackingRedirect.map"],"mappings":"A,kMAIG,SAAwBa,EAAiB,EAAM,CAAC,GAAK,CAAC,iBAAe,iDAAiD,UAAQ,IAAI,QAAM,2BAA2B,SAAOC,EAAYC,EAAsBf,MAAgB,CAAC,GAAUG,IAAS,OAAmB,IAAG,CAAC,GAAGA,EAAO,KAAKA,EAAO,IAAI,SAAS,CAACA,EAAO,IAAI,SAAS,QAAQa,CAAc,EAAE,MAAO,CAAC,MAAa,CAC/W,CAAC,GAAG,CAACb,EAAO,SAAS,QAAQa,CAAc,CAAE,MAAa,CAC1D,CADA,CACC,EAAE,CAACA,CAAc,CAAC,EAAEP,MAAc,CAAWN,IAAS,QAAuBa,GAAmCD,EAAsB,CAAE,EAAE,CAACE,EAAQD,EAAeD,CAAqB,CAAC,EAAE,IAAMG,EAAejB,OAAa,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,UAAU,SAAS,QAAQ,GAAG,UAAU,aAAa,GAAGkB,CAAK,GAAG,CAACA,CAAK,CAAC,EAAE,MAAoB,gBAAK,OAAO,CAAC,MAAMD,EAAe,YAAY,SAAS,SAAsB,gBAAK,OAAO,CAAC,MAAM,CAAC,MAAM,cAAc,SAAS,MAAM,EAAE,SAASE,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