{"version":3,"file":"NewsletterPopupScript.DOmMilwv.mjs","names":[],"sources":["https:/framerusercontent.com/modules/KV1MEUN34FhiguCkVtPy/Mf7NvdcLKSuLzzIFSNTP/NewsletterPopupScript.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function NewsletterPopupScript(){useEffect(()=>{// Don't run in Framer editor\nif(navigator.userAgent.includes(\"FramerPreview\")||window.location.href.includes(\"editor\")){return;}function setCookie(name,value,days){let expires=\"\";if(days){const date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);expires=\"; expires=\"+date.toUTCString();}document.cookie=name+\"=\"+(value||\"\")+expires+\"; path=/\";}function getCookie(name){const nameEQ=name+\"=\";const ca=document.cookie.split(\";\");for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)===\" \")c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length);}return null;}const popup=document.querySelector('[data-framer-name=\"Newsletter Popup\"]');const closeBtn=document.querySelector('[data-framer-name=\"Popup Close Button\"]');if(!popup||!closeBtn)return;// On page load, fully hide immediately\npopup.style.display=\"none\";// If cookie exists, stop here — stay hidden\nif(getCookie(\"newsletterClosed\")){return;}// If no cookie, after 4 seconds set to flex so Framer can animate it\nsetTimeout(()=>{popup.style.display=\"flex\"// or \"block\" depending on your layout\n;},3900);const closePopup=()=>{popup.style.display=\"none\";setCookie(\"newsletterClosed\",\"true\",180);};closeBtn.addEventListener(\"click\",closePopup);const escHandler=e=>{if(e.key===\"Escape\"){closePopup();}};document.addEventListener(\"keydown\",escHandler);return()=>{closeBtn.removeEventListener(\"click\",closePopup);document.removeEventListener(\"keydown\",escHandler);};},[]);// Visual anchor for dragging inside Framer\nreturn /*#__PURE__*/_jsx(\"div\",{\"data-framer-name\":\"NewsletterPopupScript\",style:{width:\"10px\",height:\"10px\",backgroundColor:\"transparent\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"NewsletterPopupScript\":{\"type\":\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