{"version":3,"file":"RegisterTagGTM.DMchFPfh.mjs","names":["React.useState","React.useRef","React.useCallback","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/PQ6hIEn3DlKtF97l0zS3/EaNyMnfsMaPJxDNZf12K/MazeIntercept.js","https:/framerusercontent.com/modules/psYoxnpIjcef64NNNhO9/PgrWQj87CpKVIZAaA0S0/RegisterTagGTM.js"],"sourcesContent":["// Framer Code Component: MazeInterceptSimple.tsx\n// Only one control: mazeUrl\n// Add this component once per page and set mazeUrl to the Maze link for that page.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";//const TRIGGER_DELAY_S = 15\nconst TRIGGER_SCROLL_PCT=60;const EXIT_INTENT_ARM_DELAY_S=10;export default function MazeInterceptSimple({mazeUrl}){const[open,setOpen]=React.useState(false);const openedRef=React.useRef(false);const show=React.useCallback(()=>{if(openedRef.current||open)return;if(!mazeUrl)return;openedRef.current=true;console.log(\"[MazeIntercept] modal shown\",{url:mazeUrl,path:window.location.pathname,ts:Date.now()});setOpen(true);},[mazeUrl,open]);/*\n    // Trigger: time on page\n    React.useEffect(() => {\n        const t = window.setTimeout(show, TRIGGER_DELAY_S * 1000)\n        return () => window.clearTimeout(t)\n    }, [show])\n    */// Trigger: scroll depth\nReact.useEffect(()=>{const onScroll=()=>{const doc=document.documentElement;const scrollTop=window.scrollY||doc.scrollTop||0;const height=(doc.scrollHeight||1)-(window.innerHeight||1);const pct=height>0?scrollTop/height*100:0;if(pct>=TRIGGER_SCROLL_PCT){show();window.removeEventListener(\"scroll\",onScroll);}};window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",onScroll);},[show]);// Trigger: exit intent (desktop) — with 10s arming delay\nReact.useEffect(()=>{let armed=false;const onLeave=e=>{if(!armed)return;if(e.clientY<=0){show();document.removeEventListener(\"mouseleave\",onLeave);}};const t=window.setTimeout(()=>{armed=true;document.addEventListener(\"mouseleave\",onLeave);},EXIT_INTENT_ARM_DELAY_S*1e3);return()=>{window.clearTimeout(t);document.removeEventListener(\"mouseleave\",onLeave);};},[show]);// Close on ESC\nReact.useEffect(()=>{if(!open)return;const onKey=e=>{if(e.key===\"Escape\")setOpen(false);};document.addEventListener(\"keydown\",onKey);return()=>document.removeEventListener(\"keydown\",onKey);},[open]);const go=()=>{window.open(mazeUrl,\"_blank\",\"noopener,noreferrer\");setOpen(false);};if(!open)return null;return /*#__PURE__*/_jsxs(\"div\",{style:styles.overlay,role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Encuesta Neat\",children:[/*#__PURE__*/_jsx(\"div\",{style:styles.backdrop,onClick:()=>setOpen(false)}),/*#__PURE__*/_jsxs(\"div\",{style:styles.modal,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.topRow,children:[/*#__PURE__*/_jsx(\"div\",{style:styles.title,children:\"\\xbfNos ayudas 2 minutos?\"}),/*#__PURE__*/_jsx(\"button\",{style:styles.close,onClick:()=>setOpen(false),\"aria-label\":\"Cerrar\",children:\"\\xd7\"})]}),/*#__PURE__*/_jsx(\"div\",{style:styles.text,children:\"Queremos mejorar c\\xf3mo explicamos Neat. Son 2 minutos y no hay respuestas correctas o incorrectas.\"}),/*#__PURE__*/_jsxs(\"div\",{style:styles.actions,children:[/*#__PURE__*/_jsx(\"button\",{style:{...styles.btn,...styles.primary},onClick:go,children:\"Responder encuesta\"}),/*#__PURE__*/_jsx(\"button\",{style:{...styles.btn,...styles.secondary},onClick:()=>setOpen(false),children:\"No, gracias\"})]})]})]});}const styles={overlay:{position:\"fixed\",inset:0,zIndex:999999,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontFamily:\"Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif\"},backdrop:{position:\"fixed\",inset:0,background:\"rgba(0,0,0,0.45)\"},modal:{position:\"relative\",zIndex:2,width:\"min(520px, calc(100vw - 32px))\",background:\"#fff\",borderRadius:16,padding:20,boxShadow:\"0 18px 60px rgba(0,0,0,0.25)\"},topRow:{display:\"flex\",justifyContent:\"space-between\",gap:12},title:{fontSize:18,fontWeight:700,lineHeight:1.2,color:\"#151F6D\"},close:{border:\"none\",background:\"transparent\",fontSize:22,cursor:\"pointer\",padding:4},text:{marginTop:10,fontSize:14,lineHeight:1.35,opacity:.8,fontWeight:500,color:\"#151F6D\"},actions:{display:\"flex\",gap:10,marginTop:16,flexWrap:\"wrap\"},btn:{borderRadius:12,padding:\"10px 14px\",border:\"1px solid rgba(0,0,0,0.12)\",cursor:\"pointer\",fontSize:14,fontWeight:600,fontFamily:\"Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif\"},primary:{border:\"none\",color:\"#fff\",background:\"#2F66F3\"},secondary:{background:\"#fff\"}};addPropertyControls(MazeInterceptSimple,{mazeUrl:{type:ControlType.String,title:\"Maze URL\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MazeInterceptSimple\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MazeIntercept.map","// RegisterGTM.overrides.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";const REGISTER_BASE_URL=\"https://app.neatpagos.com/registrar\";function pushToDataLayer(eventName,payload){window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:eventName,...payload});}function goToRegister(source){const url=new URL(REGISTER_BASE_URL);url.searchParams.set(\"source\",source);// Pequeño delay para que GTM alcance a recibir el push\nwindow.setTimeout(()=>{//console.log(\"url\", url.toString())\nwindow.location.href=url.toString();},50);}// Landing A\nexport function RegisterGTM_A(){return{onClick(e){e.preventDefault();pushToDataLayer(\"Landing_Branding_A\",{source:\"branding-a\",pagePath:window.location.pathname});goToRegister(\"branding-a\");}};}// Landing B\nexport function RegisterGTM_B(){return{onClick(e){e.preventDefault();pushToDataLayer(\"Landing_Branding_B\",{source:\"branding-b\",pagePath:window.location.pathname});goToRegister(\"branding-b\");}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withRegisterGTM_A(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...RegisterGTM_A(props)});};}withRegisterGTM_A.displayName=\"RegisterGTM_A\";export function withRegisterGTM_B(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...RegisterGTM_B(props)});};}withRegisterGTM_B.displayName=\"RegisterGTM_B\";\nexport const __FramerMetadata__ = {\"exports\":{\"withRegisterGTM_A\":{\"type\":\"reactHoc\",\"name\":\"withRegisterGTM_A\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RegisterGTM_B\":{\"type\":\"override\",\"name\":\"RegisterGTM_B\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRegisterGTM_B\":{\"type\":\"reactHoc\",\"name\":\"withRegisterGTM_B\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RegisterGTM_A\":{\"type\":\"override\",\"name\":\"RegisterGTM_A\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RegisterTagGTM.map"],"mappings":"kOAI6D,SAAwB,EAAoB,CAAC,WAAS,CAAC,GAAK,CAAC,EAAK,GAASA,EAAe,GAAM,CAAO,EAAUC,EAAa,GAAM,CAAO,EAAKC,MAAsB,CAAI,EAAU,SAAS,GAAgB,IAAe,EAAU,QAAQ,GAAK,QAAQ,IAAI,8BAA8B,CAAC,IAAI,EAAQ,KAAK,EAAO,SAAS,SAAS,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAQ,GAAK,GAAG,CAAC,EAAQ,EAAK,CAAC,CAOpb,MAAoB,CAAC,IAAM,MAAa,CAAC,IAAM,EAAI,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