{"version":3,"file":"DownloadGateButton.Bld0csGF.mjs","names":["React.useCallback","React.useRef","React.useState","React.useMemo","_Fragment"],"sources":["https:/framerusercontent.com/modules/PbX51joOrMXBMjGizkaa/pfjUjOMawam9sv2nQZPz/DownloadGateButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useTracking}from\"framer\";// Matches type=\"email\" inputs AND plain text inputs that are clearly meant to hold an email\n// (name/id/placeholder/autocomplete containing \"email\"). Framer's default form fields are\n// frequently rendered as type=\"text\", so matching only input[type=\"email\"] misses them.\nconst EMAIL_LIKE_SELECTOR='input[type=\"email\"], input[autocomplete=\"email\"], input[name*=\"email\" i], input[id*=\"email\" i], input[placeholder*=\"email\" i]';// Editing in the Framer UI? Keep the button a real link the visitor taps. iOS\n// blocks any file open that isn't the tap itself (PROD-748): no window.open,\n// no clicking a link from code after the signup request returns.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function DownloadGateButton(props){const readString=React.useCallback(value=>{return typeof value===\"string\"?value:\"\";},[]);const readNumber=React.useCallback((value,fallback)=>{return typeof value===\"number\"&&Number.isFinite(value)?value:fallback;},[]);const pickString=React.useCallback((primary,legacy)=>{const p=readString(primary);if(p!==\"\")return p;return readString(legacy);},[readString]);const readFileLikeUrl=React.useCallback(value=>{if(typeof value===\"string\")return value;if(value&&typeof value===\"object\"){const src=\"src\"in value&&typeof value.src===\"string\"?value.src:\"\";if(src)return src;const url=\"url\"in value&&typeof value.url===\"string\"?value.url:\"\";if(url)return url;}return\"\";},[]);const resolvedEmailInputSelector=pickString(props.emailInputSelector,props.emailSelector);const resolvedWebhookUrl=pickString(props.webhookUrl,props.webhookURL);const resolvedNotificationEmail=pickString(props.notificationEmail,props.notifyEmail);const resolvedTrackingVariable=pickString(props.trackingVariable,props.trackingVar);const resolvedFile=readFileLikeUrl(props.file);const resolvedFileUrlProp=pickString(props.fileUrl,props.fileURL);const resolvedIdleLabel=pickString(props.idleLabel,props.idleText);const resolvedPendingLabel=pickString(props.pendingLabel,props.pendingText);// Not pickString with the legacy successText alias: live instances store a\n// text colour under successText, which would render as the label.\nconst resolvedSuccessLabel=readString(props.successLabel);const resolvedErrorLabel=pickString(props.errorLabel,props.errorText);const resolvedSuccessColor=pickString(props.successColor,props.successBG);const resolvedSuccessBorderColor=pickString(props.successBorderColor,props.successStroke);const resolvedButtonFont=props.buttonFont??{};const{style,openMode,backgroundColor,hoverColor,textColor,successTextColor,errorTextColor,errorColor,disabledColor,borderRadius,padding,idleIcon,successIcon,iconSize:iconSizeRaw,successBorderWidth:successBorderWidthRaw,onSubmit}=props;const iconSize=readNumber(iconSizeRaw,16);const successBorderWidth=readNumber(successBorderWidthRaw,1);// Shared by the <button> and the <a>: email detection walks up from here.\nconst buttonRef=React.useRef(null);const setButtonRef=React.useCallback(el=>{buttonRef.current=el;},[]);const[email,setEmail]=React.useState(\"\");const[status,setStatus]=React.useState(\"idle\");const[isHovered,setIsHovered]=React.useState(false);const track=useTracking();const isEmailValid=React.useMemo(()=>{const emailRegex=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;return emailRegex.test(email.trim());},[email]);const resolvedFileUrl=React.useMemo(()=>{return(resolvedFile||resolvedFileUrlProp).trim();},[resolvedFile,resolvedFileUrlProp]);const resolvedDownloadFileName=React.useMemo(()=>{const trimmed=readString(props.fileName).trim();if(!trimmed)return\"\";return/\\.pdf$/i.test(trimmed)?trimmed:`${trimmed}.pdf`;},[props.fileName,readString]);const wantsDownload=readString(openMode).trim().toLowerCase()===\"download\";const hasTyped=email.trim()!==\"\";// Download mode: fetch the file as soon as the visitor starts typing, so the\n// tap can be a same-page download link (blob: URL + download attribute).\n// Safari then shows its download prompt and the page stays, so the\n// Thank you! state is visible. A plain link to the PDF would replace the\n// page with Safari's viewer. framerusercontent serves files with\n// Access-Control-Allow-Origin: *. Until this resolves (or if it fails) the\n// button stays a plain link to the file.\nconst[blobUrl,setBlobUrl]=React.useState(null);React.useEffect(()=>{if(!wantsDownload||!resolvedFileUrl||!hasTyped)return;let cancelled=false;let url=null;fetch(resolvedFileUrl).then(r=>{if(!r.ok)throw new Error(`status ${r.status}`);return r.blob();}).then(blob=>{if(cancelled)return;// Generic type on purpose: iOS Safari ignores the download\n// attribute for a PDF blob and opens it inline, replacing the\n// page. A type it can't preview makes it show the download\n// prompt; the .pdf filename is kept.\nurl=URL.createObjectURL(new Blob([blob],{type:\"application/octet-stream\"}));setBlobUrl(url);}).catch(err=>{console.warn(\"[DownloadGateButton] prefetch failed, linking to the file instead:\",err);});return()=>{cancelled=true;if(url)URL.revokeObjectURL(url);setBlobUrl(null);};},[wantsDownload,resolvedFileUrl,hasTyped]);const isDisabled=React.useMemo(()=>{if(status===\"pending\"||status===\"success\")return true;return!isEmailValid;},[isEmailValid,status]);const currentLabel=React.useMemo(()=>{if(status===\"pending\")return resolvedPendingLabel;if(status===\"success\")return resolvedSuccessLabel;if(status===\"error\")return resolvedErrorLabel;return resolvedIdleLabel;},[status,resolvedPendingLabel,resolvedSuccessLabel,resolvedErrorLabel,resolvedIdleLabel]);const detectEmailInput=React.useCallback(()=>{if(typeof document===\"undefined\")return null;const buttonEl=buttonRef.current;if(!buttonEl)return null;const trySelector=(root,selector)=>{if(!root||!selector)return null;try{const match=root.querySelector(selector);return match instanceof HTMLInputElement?match:null;}catch{// invalid selector (e.g. bad custom emailInputSelector) - don't crash detection\nreturn null;}};// Walk up from the button looking for the nearest ancestor that contains a\n// matching input, instead of jumping straight to a document-wide search once\n// the immediate parent comes up empty. The same \"email capture\" section is\n// often repeated more than once on a Framer page (footer signup, another\n// lead-gen block, etc.) with identical field names/classes - a global\n// querySelector would silently bind to whichever instance comes first in the\n// DOM rather than the one actually next to this button.\nconst findNearest=selector=>{let ancestor=buttonEl.parentElement;while(ancestor){const match=trySelector(ancestor,selector);if(match)return match;ancestor=ancestor.parentElement;}return null;};const customSelector=resolvedEmailInputSelector.trim();if(customSelector){const match=findNearest(customSelector);if(match)return match;}return findNearest(EMAIL_LIKE_SELECTOR);},[resolvedEmailInputSelector]);const findCaptureAncestor=React.useCallback(emailInput=>{if(typeof document===\"undefined\")return null;const buttonEl=buttonRef.current;if(!buttonEl)return null;// Prefer the nearest <form> around the button when available.\nconst nearestForm=buttonEl.closest(\"form\");if(nearestForm instanceof HTMLElement)return nearestForm;// Otherwise, walk up and pick the nearest ancestor that contains both\n// this button and the detected email input (same capture module region).\nif(emailInput){let ancestor=buttonEl.parentElement;while(ancestor){if(ancestor.contains(emailInput))return ancestor;ancestor=ancestor.parentElement;}}// Final fallback: nearest ancestor with any input fields.\nlet ancestor=buttonEl.parentElement;while(ancestor){if(ancestor.querySelector(\"input\"))return ancestor;ancestor=ancestor.parentElement;}return null;},[]);const collectPayloadFields=React.useCallback(emailInput=>{const payload={};if(typeof document===\"undefined\")return payload;const captureAncestor=findCaptureAncestor(emailInput);if(!captureAncestor)return payload;const allInputs=Array.from(captureAncestor.querySelectorAll(\"input\"));for(const input of allInputs){const key=input.name?.trim();if(!key)continue;if((input.type===\"checkbox\"||input.type===\"radio\")&&!input.checked){continue;}payload[key]=input.value??\"\";}return payload;},[findCaptureAncestor]);React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;let boundInput=null;let unbind=null;const bind=input=>{if(boundInput===input)return;unbind?.();boundInput=input;const syncEmail=()=>{React.startTransition(()=>{setEmail(input.value||\"\");});};syncEmail();input.addEventListener(\"input\",syncEmail);input.addEventListener(\"change\",syncEmail);unbind=()=>{input.removeEventListener(\"input\",syncEmail);input.removeEventListener(\"change\",syncEmail);};};const tryBind=()=>{const input=detectEmailInput();if(input)bind(input);return input;};// If the target input isn't in the DOM yet (e.g. a sibling Framer frame that\n// mounts after this one), keep watching instead of giving up after one try.\nlet observer=null;if(!tryBind()){observer=new MutationObserver(()=>{if(tryBind()&&observer){observer.disconnect();observer=null;}});observer.observe(document.body,{childList:true,subtree:true});}return()=>{observer?.disconnect();unbind?.();};},[detectEmailInput]);const handleClick=React.useCallback(async()=>{if(isDisabled)return;React.startTransition(()=>{setStatus(\"pending\");});// keepalive: the tap is also a link, which may take the page away (plain\n// link) or start a download; either way the lead should still land.\nconst sendLead=()=>fetch(resolvedWebhookUrl,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({email:email.trim().toLowerCase()}),keepalive:true});// Download path: iOS Safari detaches the page from a request that's in\n// flight when a download starts (keepalive: never resolves; without it:\n// cancelled, though the server already got it). So don't wait for the\n// answer here: send the lead and show the thank-you now.\nif(blobUrl){if(resolvedWebhookUrl.trim()){sendLead().then(response=>{if(!response.ok){throw new Error(`status ${response.status}`);}if(resolvedTrackingVariable.trim()){track(resolvedTrackingVariable.trim());}}).catch(error=>{console.error(\"[DownloadGateButton] lead request failed:\",error);});}if(onSubmit)onSubmit();React.startTransition(()=>{setStatus(\"success\");});return;}let webhookStatusText=\"\";try{if(resolvedWebhookUrl.trim()){const response=await sendLead();webhookStatusText=response.statusText||\"\";if(!response.ok){throw new Error(`Request failed with status ${response.status} ${response.statusText}`);}if(resolvedTrackingVariable.trim()){track(resolvedTrackingVariable.trim());}}if(onSubmit)onSubmit();React.startTransition(()=>{setStatus(\"success\");});}catch(error){console.error(\"[DownloadGateButton] submission failed:\",error,error instanceof Error?error.message:\"\",\"statusText:\",webhookStatusText);React.startTransition(()=>{setStatus(\"error\");});}},[isDisabled,resolvedWebhookUrl,email,onSubmit,detectEmailInput,collectPayloadFields,resolvedNotificationEmail,resolvedTrackingVariable,track,blobUrl]);const buttonBackground=React.useMemo(()=>{const resolvedErrorColor=readString(errorColor).trim();if(status===\"success\")return resolvedSuccessColor;if(status===\"error\")return resolvedErrorColor||backgroundColor;if(isDisabled)return disabledColor;if(isHovered)return hoverColor;return backgroundColor;},[status,errorColor,isDisabled,isHovered,resolvedSuccessColor,disabledColor,hoverColor,backgroundColor,readString]);const resolvedTextColor=React.useMemo(()=>{const successText=readString(successTextColor).trim();const errorText=readString(errorTextColor).trim();if(status===\"success\")return successText||textColor;if(status===\"error\")return errorText||textColor;return textColor;},[status,successTextColor,errorTextColor,textColor,readString]);const currentIcon=React.useMemo(()=>{if(status===\"success\")return successIcon?.src||idleIcon?.src||\"\";return idleIcon?.src||\"\";},[status,successIcon,idleIcon]);const hasIcon=React.useMemo(()=>readString(currentIcon).trim().length>0,[currentIcon,readString]);// One tap: once the email is valid the button IS a link to the file, and the\n// same tap sends the lead in the background. Opening the file after awaiting\n// the webhook (window.open / synthetic click) is treated by iOS as a popup\n// and silently blocked (PROD-748).\nconst isLink=resolvedFileUrl!==\"\"&&isEmailValid;const sharedStyle={position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:hasIcon?8:0,width:\"auto\",minWidth:\"max-content\",height:40,boxSizing:\"border-box\",border:status===\"success\"?`${successBorderWidth}px solid ${resolvedSuccessBorderColor}`:\"none\",outline:\"none\",borderRadius,padding,background:buttonBackground,color:resolvedTextColor,textDecoration:\"none\",cursor:isDisabled&&!isLink?\"not-allowed\":\"pointer\",opacity:isDisabled&&!isLink?.7:1,transition:\"background-color 0.2s ease, opacity 0.2s ease\",fontFamily:resolvedButtonFont.fontFamily,fontSize:resolvedButtonFont.fontSize,fontWeight:resolvedButtonFont.fontWeight,fontStyle:resolvedButtonFont.fontStyle,lineHeight:resolvedButtonFont.lineHeight,letterSpacing:resolvedButtonFont.letterSpacing,textAlign:resolvedButtonFont.textAlign,...style};const content=/*#__PURE__*/_jsxs(_Fragment,{children:[hasIcon?/*#__PURE__*/_jsx(\"img\",{src:currentIcon,alt:\"\",\"aria-hidden\":\"true\",style:{width:iconSize,height:iconSize,objectFit:\"contain\",flexShrink:0}}):null,/*#__PURE__*/_jsx(\"span\",{children:currentLabel})]});if(isLink){return /*#__PURE__*/_jsx(\"a\",{ref:setButtonRef,href:blobUrl??resolvedFileUrl,download:blobUrl?resolvedDownloadFileName||true:undefined,target:blobUrl?undefined:\"_blank\",rel:\"noopener\",onClick:handleClick,onMouseEnter:()=>{React.startTransition(()=>setIsHovered(true));},onMouseLeave:()=>{React.startTransition(()=>setIsHovered(false));},style:sharedStyle,children:content});}return /*#__PURE__*/_jsx(\"button\",{ref:setButtonRef,type:\"button\",role:\"button\",\"aria-disabled\":isDisabled,disabled:isDisabled,onClick:handleClick,onMouseEnter:()=>{React.startTransition(()=>setIsHovered(true));},onMouseLeave:()=>{React.startTransition(()=>setIsHovered(false));},style:sharedStyle,children:content});}DownloadGateButton.displayName=\"DownloadGateButton\";addPropertyControls(DownloadGateButton,{emailInputSelector:{type:ControlType.String,title:\"Email Selector\",defaultValue:\"\",placeholder:\".email-input\"},webhookUrl:{type:ControlType.String,title:\"Webhook URL\",defaultValue:\"\",placeholder:\"https://...\"},notificationEmail:{type:ControlType.String,title:\"Notify Email\",defaultValue:\"\",placeholder:\"team@example.com\"},trackingVariable:{type:ControlType.String,title:\"Tracking Variable\",defaultValue:\"\"},file:{type:ControlType.File,title:\"File\",allowedFileTypes:[\"pdf\"]},fileUrl:{type:ControlType.String,title:\"File URL\",defaultValue:\"\",placeholder:\"https://...\"},fileName:{type:ControlType.String,title:\"File Name\",defaultValue:\"\",placeholder:\"e.g. Pre-Plan Guide.pdf\"},openMode:{type:ControlType.Enum,title:\"Open Mode\",defaultValue:\"newTab\",options:[\"newTab\",\"download\"],optionTitles:[\"New Tab\",\"Download\"],displaySegmentedControl:true},idleLabel:{type:ControlType.String,title:\"Idle Label\",defaultValue:\"Download PDF\"},pendingLabel:{type:ControlType.String,title:\"Pending Label\",defaultValue:\"Sending…\"},successLabel:{type:ControlType.String,title:\"Success Label\",defaultValue:\"Thank you!\"},errorLabel:{type:ControlType.String,title:\"Error Label\",defaultValue:\"Something went wrong, try again\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#177881\"},hoverColor:{type:ControlType.Color,title:\"Hover\",defaultValue:\"#5DA0A7\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},successTextColor:{type:ControlType.Color,title:\"Success Text\",defaultValue:\"\"},errorTextColor:{type:ControlType.Color,title:\"Error Text\",defaultValue:\"\"},disabledColor:{type:ControlType.Color,title:\"Disabled\",defaultValue:\"#CCCCCC\"},successColor:{type:ControlType.Color,title:\"Success BG\",defaultValue:\"#2E7D32\"},errorColor:{type:ControlType.Color,title:\"Error BG\",defaultValue:\"\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"8px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"12px\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",lineHeight:\"1em\",letterSpacing:\"-0.01em\"}},idleIcon:{type:ControlType.ResponsiveImage,title:\"Idle Icon\",description:\"Upload SVG/image for idle, pending, and error states.\"},successIcon:{type:ControlType.ResponsiveImage,title:\"Success Icon\",description:\"Upload SVG/image for success state (falls back to Idle Icon).\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:16,min:8,max:64,step:1,unit:\"px\"},successBorderWidth:{type:ControlType.Number,title:\"Success Border\",defaultValue:1,min:0,max:8,step:1,unit:\"px\"},successBorderColor:{type:ControlType.Color,title:\"Success Stroke\",defaultValue:\"#2E7D32\"},onSubmit:{type:ControlType.EventHandler,title:\"On Submit\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadGateButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadGateButton.map"],"mappings":"uPASG,SAAwB,EAAmB,EAAM,CAAC,IAAM,EAAWA,EAAkB,GAAe,OAAO,GAAQ,SAAS,EAAM,GAAK,CAAC,CAAC,E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