{"version":3,"file":"SubstackSignup.CL_JY88X.mjs","names":["useState","React.useState","React.useRef","React.useCallback","_Fragment","React.useLayoutEffect","React.useEffect","__esmMin","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","le","init_npm_react_dom_18_3_1","l","_e","Ha","p","c","J","init_jsx_runtime","ce","de","init_framer_CKT6jEEQ","Data","useObserveData","RenderTarget","createStore","dataStore","state1","setDataStore","newState","storeState","storeSetters","setStoreState","setter","useStore","state","setState","init_createStore","init_store_js__1_0","ensureCaretStyle","style","CARET_CSS","ensureLinkHoverStyle","LINK_HOVER_CSS","ensureTopicStyle","TOPIC_CSS","textNodesIn","texts","walker","el","parent","n","playTypewriter","children","form","fieldsIn","i","lines","rest","labels","own","t","tops","fields","faded","saved","show","timers","caret","BLANK","lineIndex","textIndex","charIndex","later","step","ms","line","text","TYPE_MS","LINE_PAUSE_MS","v","withSubstackToggle","store","setStore","useSignupStore","toggle","Component","props","sendToSubstack","data","email","EMAIL_FIELD","topic","TOPIC_FIELD","key","SECTIONS","k","section","ALL","body","SUBSTACK","withSubstackReveal","onCanvas","shown","setShown","id","withSubstackSignup","signupOverride","withNewsletterSignup","setRef","ref","open","gated","useIsoLayoutEffect","confirm","setConfirm","slot","setSlot","onSubmit","pageKey","CONFIRM_PAGES","href","label","cs","holder","anchor","CONFIRM_LINE_1","CONFIRM_LINE_2","init_SubstackSignup"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/NJMQW1Yki9yqR7PLFeUi/zshNCpyBEiuZX6tOs1h1/SubstackSignup.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{createPortal}from\"react-dom\";import{RenderTarget}from\"framer\";// @ts-ignore Framer's store module ships without type declarations\nimport{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Shared by the \"Subscribe to our Substack\" line (withSubstackToggle) and the form (withSubstackSignup).\nconst useSignupStore=createStore({open:false,run:0});// Typewriter timing for the form reveal\nconst TYPE_MS=28// per character\n;const LINE_PAUSE_MS=140// pause after each line\n;const FIELD_FADE_MS=240// input fade-in once its label is typed\n;const BLANK=\"​\"// keeps an empty line at full height while it waits to be typed\n;const useIsoLayoutEffect=typeof window!==\"undefined\"?React.useLayoutEffect:React.useEffect;const CARET_CSS=`\n.nv-caret { display: inline-block; width: 0.6em; height: 1em; margin-left: 0.06em; vertical-align: -0.14em; background: currentColor; }\n`;function ensureCaretStyle(){if(document.getElementById(\"nv-caret-style\"))return;const style=document.createElement(\"style\");style.id=\"nv-caret-style\";style.textContent=CARET_CSS;document.head.appendChild(style);}// Matches the site's link style on hover: the underline disappears.\nconst LINK_HOVER_CSS=\"[data-nv-link]:hover, [data-nv-link]:hover * { text-decoration: none !important; }\";function ensureLinkHoverStyle(){if(document.getElementById(\"nv-link-hover-style\"))return;const style=document.createElement(\"style\");style.id=\"nv-link-hover-style\";style.textContent=LINK_HOVER_CSS;document.head.appendChild(style);}// Topic selector: topics that aren't chosen are faded; keyboard focus underlines the topic.\nconst TOPIC_CSS=['[data-nv-signup] label:has(input[type=\"radio\"]) p { opacity: 0.4; transition: opacity 200ms ease; }','[data-nv-signup] label:has(input[type=\"radio\"]):hover p { opacity: 0.7; }','[data-nv-signup] label:has(input[type=\"radio\"]:checked) p { opacity: 1; }','[data-nv-signup] label:has(input[type=\"radio\"]:focus-visible) p { text-decoration: underline; }'].join(\"\\n\");function ensureTopicStyle(){if(document.getElementById(\"nv-topic-style\"))return;const style=document.createElement(\"style\");style.id=\"nv-topic-style\";style.textContent=TOPIC_CSS;document.head.appendChild(style);}function textNodesIn(el){const texts=[];const walker=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,{acceptNode:n=>{const parent=n.parentElement;if(!parent||!n.nodeValue||!n.nodeValue.trim())return NodeFilter.FILTER_REJECT;if(parent.closest(\"select, option, textarea, script, style\"))return NodeFilter.FILTER_REJECT;if(!parent.getClientRects().length)return NodeFilter.FILTER_REJECT;return NodeFilter.FILTER_ACCEPT;}});for(let n=walker.nextNode();n;n=walker.nextNode())texts.push({node:n,value:n.nodeValue||\"\"});return texts;}// The form types out line by line behind a block cursor, which disappears after the last line; a line's inputs fade in once it is typed.\n// A line is a <label> (Name, Email, …), or a topic question and each of its options. Parts without inputs (the Submit button) fade in at the end.\nfunction playTypewriter(form){ensureCaretStyle();const children=Array.from(form.children).filter(c=>c.getClientRects().length);const fieldsIn=el=>Array.from(el.querySelectorAll(\"input, select, textarea\")).map(i=>i.closest(\".framer-form-input-wrapper\")||i);const lines=[];const rest=[];for(const el of children){if(el.tagName===\"LABEL\"){lines.push({el,top:el,texts:textNodesIn(el),fields:fieldsIn(el)});continue;}const labels=Array.from(el.querySelectorAll(\"label\"));if(!labels.length){rest.push(el);continue;}const own=textNodesIn(el).filter(t=>!labels.some(l=>l.contains(t.node)));if(own.length)lines.push({el,top:el,texts:own,fields:[]});for(const l of labels)lines.push({el:l,top:el,texts:textNodesIn(l),fields:fieldsIn(l)});}const tops=Array.from(new Set(lines.map(l=>l.top)));const fields=lines.flatMap(l=>l.fields);const faded=[...tops,...fields,...rest];const saved=new Map(faded.map(el=>[el,{opacity:el.style.opacity,transition:el.style.transition}]));const show=el=>el.style.opacity=saved.get(el).opacity;const timers=[];const caret=document.createElement(\"span\");caret.className=\"nv-caret\";caret.setAttribute(\"aria-hidden\",\"true\");for(const el of[...fields,...rest])el.style.transition=\"opacity \"+FIELD_FADE_MS+\"ms ease\";for(const el of faded)el.style.opacity=\"0\";for(const l of lines)for(const t of l.texts)t.node.nodeValue=BLANK;let lineIndex=0;let textIndex=0;let charIndex=0;const later=ms=>timers.push(window.setTimeout(step,ms));function step(){const line=lines[lineIndex];if(!line){caret.remove();rest.forEach(show);return;}show(line.top);const text=line.texts[textIndex];if(text){if(charIndex===0)text.node.parentNode?.insertBefore(caret,text.node.nextSibling);charIndex++;text.node.nodeValue=text.value.slice(0,charIndex)||BLANK;if(charIndex>=text.value.length){textIndex++;charIndex=0;}later(TYPE_MS);return;}line.fields.forEach(show);lineIndex++;textIndex=0;charIndex=0;later(LINE_PAUSE_MS);}step();return()=>{timers.forEach(t=>window.clearTimeout(t));caret.remove();for(const l of lines)for(const t of l.texts)t.node.nodeValue=t.value;saved.forEach((v,el)=>{el.style.opacity=v.opacity;el.style.transition=v.transition;});};}// Apply to the \"Subscribe to our Substack\" line: clicking it opens (and closes) the form.\nexport function withSubstackToggle(Component){return /*#__PURE__*/React.forwardRef(function SubstackToggle(props,ref){const[store,setStore]=useSignupStore();const toggle=()=>setStore({open:!store.open,run:store.run+1});React.useEffect(()=>ensureLinkHoverStyle(),[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,\"data-nv-link\":\"\",role:\"button\",tabIndex:0,\"aria-expanded\":store.open,onClick:e=>{props.onClick?.(e);toggle();},onKeyDown:e=>{props.onKeyDown?.(e);if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();toggle();}},// underline on the line itself, like the site's links (Framer doesn't publish an underline set on the text);\n// LINK_HOVER_CSS removes it on hover\nstyle:{...props.style,cursor:\"pointer\",textDecoration:\"underline\"}});});}// Substack publication and the section each newsletter choice subscribes to.\n// Section IDs come from navisalma.substack.com (public page data).\nconst SUBSTACK=\"https://navisalma.substack.com\";// \"All\" subscribes to the main publication with no section picked, so Substack applies its defaults:\n// the main newsletter plus every section set to \"subscribe new subscribers automatically\".\nconst ALL=\"All\";const SECTIONS={General:\"516385\",Navisalma:\"516385\",\"House of Navisalma\":\"516380\",\"Investor News\":\"516386\"};// Where someone who already has a Substack account confirms their subscription.\nconst CONFIRM_PAGES={All:SUBSTACK,General:SUBSTACK+\"/s/navisalma-general\",Navisalma:SUBSTACK+\"/s/navisalma-general\",\"House of Navisalma\":SUBSTACK+\"/s/house-of-navisalma\",\"Investor News\":SUBSTACK+\"/s/navisalma-investor-news\"};const CONFIRM_LINE_1=\"Already on Substack?\";const CONFIRM_LINE_2=\"Confirm your subscription here →\";const EMAIL_FIELD=\"Email\";const TOPIC_FIELD=\"Topics\";function sendToSubstack(form){const data=new FormData(form);const email=String(data.get(EMAIL_FIELD)||\"\").trim();const topic=String(data.get(TOPIC_FIELD)||\"\");const key=Object.keys(SECTIONS).find(k=>k.toLowerCase()===topic.toLowerCase());const section=key?SECTIONS[key]:undefined;if(!email||!section&&topic.toLowerCase()!==ALL.toLowerCase())return;const body=new URLSearchParams({email,source:\"embed\",first_url:window.location.href,current_url:window.location.href});if(section)body.set(\"specific_section_ids\",section);// Sent from the visitor's browser, as Substack's own embed form does. The response can't be read cross-origin,\n// so this never blocks or breaks the Framer form, which still emails its copy of the sign-up.\nfetch(SUBSTACK+\"/api/v1/free\",{method:\"POST\",mode:\"no-cors\",credentials:\"omit\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"},body,keepalive:true}).catch(()=>{});}// Apply to anything that should appear together with the form, such as the privacy notice: hidden until \"Subscribe\" is clicked, then fades in.\nexport function withSubstackReveal(Component){return /*#__PURE__*/React.forwardRef(function SubstackReveal(props,ref){const[store]=useSignupStore();React.useEffect(()=>ensureTopicStyle(),[]);const onCanvas=RenderTarget.current()===RenderTarget.canvas;const[shown,setShown]=React.useState(false);React.useEffect(()=>{if(!store.open){setShown(false);return;}const id=window.requestAnimationFrame(()=>setShown(true));return()=>window.cancelAnimationFrame(id);},[store.open]);if(onCanvas)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});const style=store.open?{...props.style,opacity:shown?1:0,transition:\"opacity \"+FIELD_FADE_MS+\"ms ease\"}:{...props.style,display:\"none\"};return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:style});});}// Apply to the newsletter form (the frame set to Form). Also signs the visitor up on Substack, in the chosen section.\nexport function withSubstackSignup(Component){return signupOverride(Component,true);}// House Launch Panel newsletter: same Substack signup, always shown (no click-to-open, no typing)\nexport function withNewsletterSignup(Component){return signupOverride(Component,false);}function signupOverride(Component,gated){return /*#__PURE__*/React.forwardRef(function SubstackSignup(props,ref){const own=React.useRef(null);const setRef=React.useCallback(el=>{own.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);const[store]=useSignupStore();const onCanvas=RenderTarget.current()===RenderTarget.canvas;const open=!gated||onCanvas||store.open;useIsoLayoutEffect(()=>{if(!gated||onCanvas||!store.open)return;const el=own.current;const form=el?el.tagName===\"FORM\"?el:el.querySelector(\"form\")||el.closest(\"form\"):null;if(!form||window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;return playTypewriter(form);},[store.open,store.run,onCanvas]);const[confirm,setConfirm]=React.useState(null);// the line is placed inside the form, right after the Submit / Thank you button\nconst[slot,setSlot]=React.useState(null);React.useEffect(()=>{const el=own.current;const form=el?el.tagName===\"FORM\"?el:el.querySelector(\"form\")||el.closest(\"form\"):null;if(!form)return;const onSubmit=()=>{if(!form.checkValidity())return;sendToSubstack(form);const topic=String(new FormData(form).get(TOPIC_FIELD)||\"\");const pageKey=Object.keys(CONFIRM_PAGES).find(k=>k.toLowerCase()===topic.toLowerCase());const href=pageKey?CONFIRM_PAGES[pageKey]:undefined;if(!href)return;// match the form's own label text (font, size, colour)\nconst label=form.querySelector(\"label p, label span, p\");const cs=label?window.getComputedStyle(label):null;setConfirm({href,style:cs?{fontFamily:cs.fontFamily,fontSize:cs.fontSize,fontWeight:cs.fontWeight,letterSpacing:cs.letterSpacing,textTransform:cs.textTransform,color:cs.color}:{}});};const holder=document.createElement(\"div\");holder.style.width=\"100%\";// right after the submit button (or the group holding it), before anything below it such as a privacy notice\nlet anchor=form.querySelector('[type=\"submit\"], button');while(anchor&&anchor.parentElement&&anchor.parentElement!==form)anchor=anchor.parentElement;if(anchor&&anchor.parentElement===form)form.insertBefore(holder,anchor.nextSibling);else form.appendChild(holder);setSlot(holder);form.addEventListener(\"submit\",onSubmit,true);return()=>{form.removeEventListener(\"submit\",onSubmit,true);holder.remove();};},[]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,ref:setRef,...gated?{\"data-nv-signup\":\"\"}:{},style:open?props.style:{...props.style,display:\"none\"}}),confirm&&slot&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(\"a\",{href:confirm.href,target:\"_blank\",rel:\"noopener\",style:{...confirm.style,display:\"block\",width:\"100%\",marginTop:12,marginBottom:12,textDecoration:\"underline\",textUnderlineOffset:3,lineHeight:1.3},children:[CONFIRM_LINE_1,/*#__PURE__*/_jsx(\"br\",{}),CONFIRM_LINE_2]}),slot)]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNewsletterSignup\":{\"type\":\"reactHoc\",\"name\":\"withNewsletterSignup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSubstackSignup\":{\"type\":\"reactHoc\",\"name\":\"withSubstackSignup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSubstackReveal\":{\"type\":\"reactHoc\",\"name\":\"withSubstackReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSubstackToggle\":{\"type\":\"reactHoc\",\"name\":\"withSubstackToggle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SubstackSignup.map"],"mappings":"A,gQAA8E,SAAgB2B,EAAY,EAAO,CACjH,IAAMC,EAAUJ,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGK,CAAM,CAAC,CAAC,CAAC,EACjDC,EAAa,GAAU,CAC1B,OAAOC,GAAW,aAAY,EAASA,EAASH,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAGA,EAAU,MAAM,GAAGG,CAAQ,CAAC,CAAE,EACjIC,EAAW,OAAOH,GAAS,SAAS,OAAO,OAAO,CAAC,GAAGA,CAAM,CAAC,EAAEA,EAC7DI,kBAAa,IAAI,IACjBC,EAAc,GAAU,CAC3B,OAAOH,GAAW,aAAY,EAASA,EAASC,CAAU,GAAG,EAAW,OAAOD,GAAW,SAAS,OAAO,OAAO,CAAC,GAAGC,EAAW,GAAGD,CAAQ,CAAC,EAAEA,EACjJE,EAAa,QAAQ,GAAQE,EAAOH,CAAU,CAAC,CAA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