{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/zsYGETgrUhR6TxueMCIf/NssiOb58OTIZhewtvmCF/HubspotForm.js"],
  "sourcesContent": ["// HubSpot Form Embed Component for Framer\n// Allows Form ID and Redirect URL to be set via Framer property controls\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * HubSpot Form Embed\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function HubspotForm(props){const{formId,redirectUrl,urlParam,style}=props;const containerRef=useRef(null);const PORTAL_ID=\"24432600\";const ZEROBOUNCE_API_KEY=\"8134cbee87174cbe8e52d30b859e2fd2\";useEffect(()=>{if(typeof window===\"undefined\"||!formId)return;// Load HubSpot script if not already present\nif(!document.querySelector('script[src*=\"js.hsforms.net/forms/embed/v2.js\"]')){const script=document.createElement(\"script\");script.src=\"//js.hsforms.net/forms/embed/v2.js\";script.async=true;script.charset=\"utf-8\";document.body.appendChild(script);script.onload=createForm;}else{createForm();}function createForm(){// @ts-ignore\nif(!window[\"hbspt\"]||!containerRef.current)return;// Remove any previous form\ncontainerRef.current.innerHTML=\"\";// @ts-ignore\nwindow[\"hbspt\"].forms.create({portalId:PORTAL_ID,formId:formId,region:\"na1\",target:`#${containerRef.current.id}`,onFormSubmit:function(){let finalUrl=redirectUrl;if(redirectUrl&&urlParam){const hasQuery=redirectUrl.includes(\"?\");finalUrl=redirectUrl+(hasQuery?\"&\":\"?\")+urlParam;}if(finalUrl)window.top.location.href=finalUrl;},onFormReady:function($form){// Add global style for full width\nconst styleId=\"global-hubspot-form-style\";if(!document.getElementById(styleId)){const style=document.createElement(\"style\");style.id=styleId;style.textContent=`\n              .hbspt-form, .hbspt-form form, .hbspt-form .hs-form {\n                width: 100% !important;\n                max-width: 100% !important;\n              }\n              .hbspt-form .form-columns-2 fieldset {\n                display: flex;\n                flex-wrap: wrap;\n                gap: 1rem;\n              }\n              .hbspt-form .form-columns-2 .hs-form-field {\n                flex: 1 1 48%;\n                box-sizing: border-box;\n              }\n              @media (max-width: 768px) {\n                .hbspt-form .hs-form-field {\n                  flex: 1 1 100%;\n                }\n              }\n            `;document.head.appendChild(style);}// ZeroBounce Validation\nconst config={apiKey:ZEROBOUNCE_API_KEY,disableSubmitOnError:true,hubspotFormId:formId};const zbScript=document.createElement(\"script\");zbScript.src=\"https://www.zerobounce.net/widget/ZeroBounceHubSpotValidationWidget.js\";zbScript.async=true;zbScript.onload=function(){// @ts-ignore\nif(typeof window[\"initializeZeroBounce\"]===\"function\"){// @ts-ignore\nwindow[\"initializeZeroBounce\"](config);}};document.head.appendChild(zbScript);}});}// Cleanup on unmount\nreturn()=>{if(containerRef.current)containerRef.current.innerHTML=\"\";};},[formId,redirectUrl]);// Unique ID for the container\nconst containerId=`hubspot-form-container-${formId||\"default\"}`;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,id:containerId,style:{width:\"100%\",minHeight:40,...style},\"aria-live\":\"polite\"});}addPropertyControls(HubspotForm,{formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"\",placeholder:\"Paste HubSpot Form ID\"},redirectUrl:{type:ControlType.Link,title:\"Redirect URL\",defaultValue:\"\"},urlParam:{type:ControlType.String,title:\"URL Parameter\",defaultValue:\"\",placeholder:\"utm_source=framer\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubspotForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HubspotForm.map"],
  "mappings": "gJAOkB,SAARA,EAA6BC,EAAM,CAAC,GAAK,CAAC,OAAAC,EAAO,YAAAC,EAAY,SAAAC,EAAS,MAAAC,CAAK,EAAEJ,EAAYK,EAAaC,EAAO,IAAI,EAAQC,EAA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AAG,EAAE,SAAS,KAAK,YAAYC,CAAQ,CAAE,CAAC,CAAC,EAAE,CAClF,MAAM,IAAI,CAAIb,EAAa,UAAQA,EAAa,QAAQ,UAAU,GAAG,CAAE,EAAE,CAACJ,EAAOC,CAAW,CAAC,EAC7F,IAAMiB,EAAY,0BAA0BlB,GAAQ,SAAS,GAAG,OAAoBmB,EAAK,MAAM,CAAC,IAAIf,EAAa,GAAGc,EAAY,MAAM,CAAC,MAAM,OAAO,UAAU,GAAG,GAAGf,CAAK,EAAE,YAAY,QAAQ,CAAC,CAAE,CAACiB,EAAoBtB,EAAY,CAAC,OAAO,CAAC,KAAKuB,EAAY,OAAO,MAAM,UAAU,aAAa,GAAG,YAAY,uBAAuB,EAAE,YAAY,CAAC,KAAKA,EAAY,KAAK,MAAM,eAAe,aAAa,EAAE,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,aAAa,GAAG,YAAY,mBAAmB,CAAC,CAAC",
  "names": ["HubspotForm", "props", "formId", "redirectUrl", "urlParam", "style", "containerRef", "pe", "PORTAL_ID", "ZEROBOUNCE_API_KEY", "ue", "window", "createForm", "script", "finalUrl", "hasQuery", "$form", "styleId", "config", "zbScript", "containerId", "p", "addPropertyControls", "ControlType"]
}
