{"version":3,"file":"ApiHubSpotForm.BINPAWDS.mjs","names":["useRef","useState","useCallback","__esmMin","ne","init_npm_react_18_3_1","window","_e","de","p","c","init_jsx_runtime","ce","init_ssg_sandbox_shims","addPropertyControls","ControlType","init_framer_BbPeGsXv","sanitize","str","maxLen","parseCookies","raw","rawName","rawVal","pair","name","value","acc","safeLocalStorageGet","key","safeJsonParse","parsed","isBlockedEmailDomain","at","email","domain","blocked","blocklist","blockFreeProviders","free","FREE_EMAIL_DOMAINS","readAttribution","prefix","schemaVersion","resolveHiddenFields","configs","cookies","results","config","fieldName","rawValue","firstTouch","lastTouch","cleaned","dispatchFormEvent","eventName","downloadAsset","blob","url","blobUrl","anchor","filename","submitToHubSpot","params","portal","portalId","form","formId","enriched","hiddenFields","fields","visibleFields","hutk","\"hubspotutk\"","payload","f","endpoint","response","msg","body","inlineMessage","err","DEFAULT_BLOCKED_DOMAINS","FORM_EVENTS","init_hubspot_submit","init_Hubspot_submit_taBGM0","parseBlocklist","d","inputTypeFor","fieldType","ApiHubSpotForm","props","formRef","formWidth","setFormWidth","el","observer","entry","columnCount","columns","collapseBelow","isGrid","spanAll","status","setStatus","errorMessage","setErrorMessage","fieldErrors","setFieldErrors","handleSubmit","formData","emailValidation","blockFree","errors","vf","val","eventDetail","result","enableAssetDownload","assetUrl","assetFilename","enableRedirect","redirectUrl","errorMsg","labelStyling","successMessage","baseInputStyle","inputStyling","fieldGap","isTextarea","field","error","borderStyle","i","buttonStyling","submitButtonText","init_ApiHubSpotForm"],"sources":["https:/framerusercontent.com/modules/YqtlUMYXa7Pd3LqYigJC/T6APIZWnZT6Acj3Gu9YL/hubspot_submit.js","https:/framer.com/m/Hubspot-submit-taBGM0.js@T6APIZWnZT6Acj3Gu9YL","https:/framerusercontent.com/modules/ocXjRSdPg6eDuBRXZlDT/cXkFlP9UnX8FVRWabjmz/ApiHubSpotForm.js"],"sourcesContent":["/**\n * Shared HubSpot form submission and enrichment module.\n *\n * Handles the core logic for submitting form data to HubSpot's public\n * form submission API, resolving hidden enrichment fields from various\n * data sources (marketing attribution, cookies, page context), and\n * validating email addresses against domain blocklists.\n *\n * Setup: create this as a \"Code File\" (not a Code Component) in Framer\n * so that HubSpotForm.tsx can import from it:\n *\n *   import { submitToHubSpot, resolveHiddenFields, ... } from \"./hubspot-submit\"\n */// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n/**\n * A single field in the HubSpot form submission payload.\n *\n * Maps to the `fields[]` entries in the HubSpot submissions API:\n * POST /submissions/v3/integration/submit/{portalId}/{formId}\n */// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n/**\n * Default list of competitor email domains to block on form submissions.\n *\n * This is the union of all `blockedEmailDomains` configured across HubSpot\n * forms in the LightSource account. Used as the default value for the\n * blocklist prop on the HubSpotForm component.\n */export const DEFAULT_BLOCKED_DOMAINS=[\"fairmarkit.com\",\"globality.com\",\"archlet.io\",\"keelvar.com\",\"arkestro.com\",\"scoutbee.com\",\"akirolabs.com\",\"levelpath.com\",\"marketdojo.com\",\"xatena.com\",\"qstrat.com\",\"coupa.com\",\"ariba.com\",\"sap.com\",\"gep.com\",\"ivalua.com\",\"zycus.com\",\"jaggaer.com\",\"supplyon.com\",\"apriori.com\",\"synertrade.com\",\"basware.com\",\"corcentric.com\",\"precoro.com\",\"procurify.com\"];/**\n * Common free/personal email provider domains.\n *\n * When the \"Block Free Email Providers\" option is enabled on the form\n * component, submissions with email addresses from these domains are\n * rejected client-side with an inline error.\n */export const FREE_EMAIL_DOMAINS=[\"gmail.com\",\"yahoo.com\",\"hotmail.com\",\"outlook.com\",\"aol.com\",\"icloud.com\",\"mail.com\",\"protonmail.com\",\"proton.me\",\"zoho.com\",\"yandex.com\",\"gmx.com\",\"live.com\",\"msn.com\"];// ---------------------------------------------------------------------------\n// Utilities\n// ---------------------------------------------------------------------------\n/**\n * Strips control characters and truncates a value for safe inclusion in\n * API payloads and error messages.\n *\n * Applied to metadata values (attribution, cookies, page context, error\n * messages) but NOT to user-entered form data, which is passed through\n * verbatim to avoid silently altering legitimate content.\n *\n * @param str - The value to sanitize. Accepts any type; non-strings are coerced.\n * @param maxLen - Maximum length of the returned string. Defaults to 512.\n * @returns A trimmed, control-character-free string, or empty string for nullish input.\n */export function sanitize(str,maxLen=512){if(str==null)return\"\";const s=String(str).replace(/[\\u0000-\\u001f\\u007f]/g,\"\").trim();return s.slice(0,maxLen);}/**\n * Parses `document.cookie` into a key-value map.\n *\n * Handles URI-encoded cookie names and values. Returns an empty object\n * during SSR or when cookies are unavailable.\n */export function parseCookies(){if(typeof document===\"undefined\")return{};const raw=document.cookie||\"\";if(!raw)return{};return raw.split(\";\").reduce((acc,pair)=>{const[rawName,...rawVal]=pair.split(\"=\");const name=decodeURIComponent((rawName||\"\").trim());const value=decodeURIComponent(rawVal.join(\"=\").trim());if(name)acc[name]=value;return acc;},{});}/**\n * Reads a value from localStorage, returning empty string on any failure.\n * Safe to call during SSR or in privacy-restricted browsing contexts.\n */function safeLocalStorageGet(key){if(typeof window===\"undefined\")return\"\";try{return window.localStorage.getItem(key)??\"\";}catch{return\"\";}}/**\n * Parses a JSON string into a plain object.\n * Returns an empty object for invalid JSON or non-object values.\n */function safeJsonParse(raw){if(!raw)return{};try{const parsed=JSON.parse(raw);if(typeof parsed===\"object\"&&parsed!==null)return parsed;}catch{}return{};}// ---------------------------------------------------------------------------\n// Email validation\n// ---------------------------------------------------------------------------\n/**\n * Checks whether an email address belongs to a blocked domain.\n *\n * Extracts the domain from the email (everything after the last \"@\") and\n * compares it case-insensitively against the provided blocklist. When\n * `blockFreeProviders` is true, also checks against {@link FREE_EMAIL_DOMAINS}.\n *\n * @param email - The email address to validate.\n * @param blocklist - Array of domain strings to reject (e.g. [\"competitor.com\"]).\n * @param blockFreeProviders - Whether to also block common free email providers.\n * @returns True if the email's domain is blocked.\n */export function isBlockedEmailDomain(email,blocklist,blockFreeProviders){const at=email.lastIndexOf(\"@\");if(at<0)return false;const domain=email.slice(at+1).toLowerCase().trim();if(!domain)return false;for(const blocked of blocklist){if(domain===blocked.toLowerCase().trim())return true;}if(blockFreeProviders){for(const free of FREE_EMAIL_DOMAINS){if(domain===free)return true;}}return false;}// ---------------------------------------------------------------------------\n// Attribution reader\n// ---------------------------------------------------------------------------\n/**\n * Reads first-touch and last-touch marketing attribution data from localStorage.\n *\n * The marketing attribution tracker script (marketing-script.html) captures UTM\n * parameters from page URLs and stores them under versioned localStorage keys:\n *   - `_mkt_v{N}_first_touch`: the visitor's first attributed visit\n *   - `_mkt_v{N}_last_touch`: the most recent attributed visit\n *\n * Each stored object has keys like \"utm_source\", \"utm_medium\", \"utm_campaign\",\n * \"utm_content\", \"utm_term\", \"landing_page\", \"referrer\", and \"captured_at\".\n *\n * @param schemaVersion - The marketing tracker schema version. Defaults to 1.\n */function readAttribution(schemaVersion=1){const prefix=`_mkt_v${schemaVersion}_`;const firstTouch=safeJsonParse(safeLocalStorageGet(`${prefix}first_touch`));const lastTouch=safeJsonParse(safeLocalStorageGet(`${prefix}last_touch`));return{firstTouch,lastTouch};}// ---------------------------------------------------------------------------\n// Hidden field resolution\n// ---------------------------------------------------------------------------\n/**\n * Resolves an array of hidden field configurations into concrete HubSpot\n * field values ready for submission.\n *\n * For each configuration entry, reads the value from the specified source\n * (marketing attribution localStorage, cookies, page URL, static value, etc.),\n * sanitizes it, and returns it as a {@link HubSpotField}. Fields that resolve\n * to empty values are silently omitted.\n *\n * @param configs - The hidden field configuration array from the component props.\n * @returns An array of resolved fields with objectTypeId, name, and value.\n */export function resolveHiddenFields(configs){if(!configs||configs.length===0)return[];const{firstTouch,lastTouch}=readAttribution();const cookies=parseCookies();const results=[];for(const config of configs){const fieldName=config.hubspotFieldName?.trim();if(!fieldName)continue;let rawValue=\"\";switch(config.sourceType){case\"firstTouch\":{const key=config.sourceKey?.trim();if(key&&firstTouch[key]!=null){rawValue=String(firstTouch[key]);}break;}case\"lastTouch\":{const key=config.sourceKey?.trim();if(key&&lastTouch[key]!=null){rawValue=String(lastTouch[key]);}break;}case\"static\":rawValue=config.value||\"\";break;case\"pageUrl\":if(typeof window!==\"undefined\"){rawValue=window.location.href;}break;case\"pagePath\":if(typeof window!==\"undefined\"){rawValue=window.location.pathname;}break;case\"referrer\":if(typeof document!==\"undefined\"){rawValue=document.referrer;}break;case\"cookie\":{const key=config.sourceKey?.trim();if(key)rawValue=cookies[key]??\"\";break;}case\"queryParam\":{const key=config.sourceKey?.trim();if(key&&typeof window!==\"undefined\"){rawValue=new URLSearchParams(window.location.search).get(key)??\"\";}break;}}const cleaned=sanitize(rawValue);if(cleaned){results.push({objectTypeId:\"0-1\",name:fieldName,value:cleaned});}}return results;}// ---------------------------------------------------------------------------\n// Form lifecycle events\n// ---------------------------------------------------------------------------\n/**\n * Event names dispatched on `window` during the form submission lifecycle.\n *\n * Other code components, code overrides, or page scripts can listen for these\n * to react to form submissions. Each event is a CustomEvent with a `detail`\n * object containing `portalId` and `formId` (plus `error` for error events).\n *\n * Example listener in another code component or script:\n *\n *   window.addEventListener(\"ls-form:submit-success\", (e) => {\n *     const { portalId, formId } = e.detail;\n *     // Show a custom success component, fire analytics, redirect, etc.\n *   });\n */export const FORM_EVENTS={SUBMIT_START:\"ls-form:submit-start\",SUBMIT_SUCCESS:\"ls-form:submit-success\",SUBMIT_ERROR:\"ls-form:submit-error\"};/**\n * Dispatches a form lifecycle event on the window.\n *\n * Events bubble and are not cancelable. They carry a {@link FormEventDetail}\n * payload in `event.detail`. Safe to call during SSR (no-ops if window is\n * unavailable).\n *\n * @param eventName - One of the {@link FORM_EVENTS} constants.\n * @param detail - The event payload.\n */export function dispatchFormEvent(eventName,detail){if(typeof window===\"undefined\")return;window.dispatchEvent(new CustomEvent(eventName,{bubbles:true,cancelable:false,detail}));}// ---------------------------------------------------------------------------\n// Asset download\n// ---------------------------------------------------------------------------\n/**\n * Fetches a file and triggers a browser download save dialog.\n *\n * The HTML `download` attribute on anchor elements is ignored by browsers\n * for cross-origin URLs (the browser navigates to the file and renders it\n * inline instead of saving it). To force a real download, this function\n * fetches the file into a Blob and creates a same-origin blob URL. When\n * the anchor points to a same-origin URL, the `download` attribute is\n * respected and the browser saves the file.\n *\n * Requires the asset host to allow cross-origin fetches (CORS).\n * Framer's built-in file hosting supports this.\n *\n * @param url - The URL of the file to download.\n * @param filename - The filename the user sees in the save dialog (e.g. \"Q4 Report.pdf\").\n * @throws Throws on network errors or if the fetch fails. Callers should\n *         catch and handle gracefully (the form submission already succeeded).\n */export async function downloadAsset(url,filename){const response=await fetch(url);const blob=await response.blob();const blobUrl=URL.createObjectURL(blob);const anchor=document.createElement(\"a\");anchor.href=blobUrl;anchor.download=filename||\"download.pdf\";anchor.style.display=\"none\";document.body.appendChild(anchor);anchor.click();document.body.removeChild(anchor);URL.revokeObjectURL(blobUrl);}// ---------------------------------------------------------------------------\n// Submission\n// ---------------------------------------------------------------------------\n/**\n * Submits form data to HubSpot's public form submission API.\n *\n * Constructs the full payload by combining visible fields (user input) with\n * resolved hidden fields (attribution, page context, static values). Includes\n * the HubSpot tracking cookie (`hutk`) and page context in the submission.\n *\n * Endpoint: POST https://api.hsforms.com/submissions/v3/integration/submit/{portalId}/{formId}\n *\n * This endpoint is public and requires no authentication. The portal ID and\n * form ID are not secrets (they are embedded in every HubSpot form snippet).\n *\n * @param params.portalId - The HubSpot portal (account) ID.\n * @param params.formId - The HubSpot form UUID to submit to.\n * @param params.visibleFields - Fields collected from user input (already includes objectTypeId).\n * @param params.hiddenFields - Hidden field configurations to resolve and merge into the submission.\n * @returns A {@link SubmitResult} indicating success or failure.\n */export async function submitToHubSpot(params){const{portalId,formId,visibleFields,hiddenFields}=params;const portal=portalId.trim();const form=formId.trim();if(!portal||!form){return{success:false,error:\"Missing portal ID or form ID.\"};}const enriched=resolveHiddenFields(hiddenFields);const fields=[...visibleFields,...enriched];const cookies=parseCookies();const hutk=cookies[\"hubspotutk\"]??\"\";const payload={fields:fields.map(f=>({objectTypeId:f.objectTypeId,name:f.name,value:f.value})),context:{hutk:hutk||undefined,pageUri:typeof window!==\"undefined\"?window.location.href:\"\",pageName:typeof document!==\"undefined\"?document.title:\"\"}};const endpoint=`https://api.hsforms.com/submissions/v3/integration/submit/${encodeURIComponent(portal)}/${encodeURIComponent(form)}`;try{const response=await fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});if(!response.ok){let msg=`Submission failed (${response.status})`;try{const body=await response.json();if(body?.message)msg=sanitize(body.message,220);}catch{}return{success:false,error:msg};}let inlineMessage;try{const body=await response.json();if(typeof body?.inlineMessage===\"string\"){inlineMessage=sanitize(body.inlineMessage);}}catch{}return{success:true,inlineMessage};}catch(err){const msg=err instanceof Error?err.message:\"Submission failed.\";return{success:false,error:msg};}}\nexport const __FramerMetadata__ = {\"exports\":{\"submitToHubSpot\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"sanitize\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"downloadAsset\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isBlockedEmailDomain\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HubSpotField\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FREE_EMAIL_DOMAINS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DEFAULT_BLOCKED_DOMAINS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseCookies\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"dispatchFormEvent\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SubmitResult\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FORM_EVENTS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FormEventDetail\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HiddenFieldConfig\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resolveHiddenFields\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./hubspot_submit.map","/*\n * hubspot_submit\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/YqtlUMYXa7Pd3LqYigJC/T6APIZWnZT6Acj3Gu9YL/hubspot_submit.js\"\n","/**\n * HubSpot Form - Framer Code Component (v3)\n *\n * A self-rendering form component that collects user input and submits\n * directly to HubSpot's public form submission API. Eliminates the need\n * for HubSpot's embedded form JS bundle, resulting in instant form loads.\n *\n * Features:\n * - Configurable visible fields (text, email, phone, textarea)\n * - Hidden enrichment fields from marketing attribution, cookies, page context\n * - Client-side email domain validation (competitor and free provider blocking)\n * - Post-submit behaviors: asset download, redirect, or both\n * - Window CustomEvent dispatching for cross-component communication\n * - Full styling control via property controls\n *\n * ## Post-Submit Behavior Pipeline\n *\n * After a successful HubSpot submission, the component executes behaviors\n * in a fixed, safe order:\n *\n *   1. ls-form:submit-success event fires (for external listeners)\n *   2. Asset download (if enabled) - fetches file and triggers browser save\n *   3. Redirect (if enabled) - navigates to the configured URL\n *   4. If no redirect: shows the success message inline\n *\n * This order is enforced because download must complete before redirect\n * (redirect navigates away from the page). Download errors are logged to\n * console but do not block the redirect or success message, since the\n * HubSpot submission already succeeded.\n *\n * ## Events\n *\n * Dispatches CustomEvents on `window` at each submission lifecycle stage:\n * - `ls-form:submit-start`   - user clicked submit\n * - `ls-form:submit-success` - HubSpot responded with success\n * - `ls-form:submit-error`   - submission failed\n *\n * Each event's `detail` contains `{ portalId, formId }`.\n *\n * Setup: create this as a \"Code Component\" in Framer. It imports from\n * a sibling code file:\n *\n *   import { ... } from \"./hubspot-submit\"\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{submitToHubSpot,downloadAsset,isBlockedEmailDomain,dispatchFormEvent,FORM_EVENTS,DEFAULT_BLOCKED_DOMAINS}from\"https://framer.com/m/Hubspot-submit-taBGM0.js@T6APIZWnZT6Acj3Gu9YL\";// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n/** Parses a comma-separated string of domains into a normalized array. */function parseBlocklist(raw){if(!raw)return[];return raw.split(\",\").map(d=>d.trim().toLowerCase()).filter(Boolean);}/** Maps the component's fieldType enum values to HTML input type attributes. */function inputTypeFor(fieldType){switch(fieldType){case\"email\":return\"email\";case\"phone\":return\"tel\";default:return\"text\";}}// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n/**\n * Renders a complete HubSpot form with configurable fields, hidden enrichment,\n * email validation, direct API submission, and post-submit behaviors.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ApiHubSpotForm(props){const{portalId,formId,visibleFields,hiddenFields,submitButtonText,successMessage,emailValidation,enableAssetDownload,assetUrl,assetFilename,enableRedirect,redirectUrl,labelStyling,inputStyling,buttonStyling,fieldGap,columns=1,collapseBelow=480}=props;const formRef=useRef(null);const[formWidth,setFormWidth]=useState(0);useEffect(()=>{const el=formRef.current;if(!el||typeof ResizeObserver===\"undefined\")return;const observer=new ResizeObserver(([entry])=>setFormWidth(entry.contentRect.width));observer.observe(el);return()=>observer.disconnect();},[]);const columnCount=columns>1&&formWidth>0&&formWidth<collapseBelow?1:columns;const isGrid=columnCount>1;const spanAll=isGrid?{gridColumn:\"1 / -1\"}:{};const[status,setStatus]=useState(\"idle\");const[errorMessage,setErrorMessage]=useState(\"\");const[fieldErrors,setFieldErrors]=useState({});const handleSubmit=useCallback(async e=>{e.preventDefault();if(status===\"submitting\")return;const portal=portalId?.trim();const form=formId?.trim();if(!portal||!form){setStatus(\"error\");setErrorMessage(\"Missing portal ID or form ID.\");return;}const formData=new FormData(e.currentTarget);const blocklist=parseBlocklist(emailValidation?.blockedDomains);const blockFree=emailValidation?.blockFreeProviders??true;const errors={};const fields=[];for(const vf of visibleFields){const val=String(formData.get(vf.name)??\"\");fields.push({objectTypeId:vf.objectTypeId||\"0-1\",name:vf.name,value:val});if(vf.fieldType===\"email\"&&val&&isBlockedEmailDomain(val,blocklist,blockFree)){errors[vf.name]=\"Please use a business email address.\";}}if(Object.keys(errors).length>0){setFieldErrors(errors);return;}setFieldErrors({});setStatus(\"submitting\");setErrorMessage(\"\");const eventDetail={portalId:portal,formId:form};dispatchFormEvent(FORM_EVENTS.SUBMIT_START,eventDetail);const result=await submitToHubSpot({portalId:portal,formId:form,visibleFields:fields,hiddenFields});if(!result.success){const errorMsg=result.error||\"Submission failed.\";setStatus(\"error\");setErrorMessage(errorMsg);dispatchFormEvent(FORM_EVENTS.SUBMIT_ERROR,{...eventDetail,error:errorMsg});return;}dispatchFormEvent(FORM_EVENTS.SUBMIT_SUCCESS,eventDetail);if(enableAssetDownload&&assetUrl){try{await downloadAsset(assetUrl,assetFilename||\"download.pdf\");}catch(err){console.error(\"[ApiHubSpotForm] Asset download failed:\",err);}}if(enableRedirect&&redirectUrl){window.location.href=redirectUrl;return;}setStatus(\"success\");},[portalId,formId,visibleFields,hiddenFields,emailValidation,enableAssetDownload,assetFilename,enableRedirect,redirectUrl,status]);// Placeholder shown in the Framer editor when IDs are not configured\nif(!portalId?.trim()||!formId?.trim()){return /*#__PURE__*/_jsx(\"div\",{style:{padding:20,fontFamily:labelStyling?.fontFamily,color:\"#999\",textAlign:\"center\"},children:\"Configure Portal ID and Form ID\"});}// Success state replaces the form with a message\nif(status===\"success\"){return /*#__PURE__*/_jsx(\"div\",{style:{padding:20,fontFamily:labelStyling?.fontFamily,textAlign:\"center\",color:labelStyling?.color,fontSize:labelStyling?.fontSize},children:successMessage});}const baseInputStyle={backgroundColor:inputStyling?.background,color:inputStyling?.textColor,borderRadius:inputStyling?.borderRadius,padding:`${inputStyling?.paddingY??10}px ${inputStyling?.paddingX??12}px`,fontSize:inputStyling?.fontSize,fontFamily:\"inherit\",outline:\"none\",width:\"100%\",boxSizing:\"border-box\"};return /*#__PURE__*/_jsxs(\"form\",{ref:formRef,onSubmit:handleSubmit,noValidate:false,style:{width:\"100%\",fontFamily:labelStyling?.fontFamily,...isGrid?{display:\"grid\",gridTemplateColumns:`repeat(${columnCount}, minmax(0, 1fr))`}:{display:\"flex\",flexDirection:\"column\"},gap:fieldGap},children:[visibleFields?.map((field,i)=>{const isTextarea=field.fieldType===\"textarea\";const error=fieldErrors[field.name];const borderStyle=error?\"1px solid #ef4444\":inputStyling?.border;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:4,...isTextarea?spanAll:{}},children:[field.label&&/*#__PURE__*/_jsxs(\"label\",{htmlFor:`hsf-${field.name}`,style:{color:labelStyling?.color,fontSize:labelStyling?.fontSize,fontWeight:500},children:[field.label,field.required&&/*#__PURE__*/_jsx(\"span\",{style:{color:\"#ef4444\",marginLeft:2},children:\"*\"})]}),isTextarea?/*#__PURE__*/_jsx(\"textarea\",{id:`hsf-${field.name}`,name:field.name,required:field.required,placeholder:field.placeholder,rows:4,style:{...baseInputStyle,border:borderStyle,resize:\"vertical\"}}):/*#__PURE__*/_jsx(\"input\",{id:`hsf-${field.name}`,name:field.name,type:inputTypeFor(field.fieldType),required:field.required,placeholder:field.placeholder,style:{...baseInputStyle,border:borderStyle}}),error&&/*#__PURE__*/_jsx(\"span\",{style:{color:\"#ef4444\",fontSize:12},children:error})]},field.name||i);}),status===\"error\"&&errorMessage&&/*#__PURE__*/_jsx(\"div\",{style:{color:\"#ef4444\",fontSize:13,padding:\"4px 0\",...spanAll},children:errorMessage}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:status===\"submitting\",style:{backgroundColor:buttonStyling?.background,color:buttonStyling?.textColor,borderRadius:buttonStyling?.borderRadius,padding:`${buttonStyling?.paddingY??12}px ${buttonStyling?.paddingX??20}px`,fontSize:buttonStyling?.fontSize,fontFamily:\"inherit\",fontWeight:600,border:\"none\",cursor:status===\"submitting\"?\"not-allowed\":\"pointer\",opacity:status===\"submitting\"?.7:1,width:\"100%\",...spanAll},children:status===\"submitting\"?\"Submitting...\":submitButtonText})]});}// ---------------------------------------------------------------------------\n// Property Controls\n//\n// Related properties are grouped using ControlType.Object, which renders as\n// collapsible sections in the Framer property panel.\n// ---------------------------------------------------------------------------\naddPropertyControls(ApiHubSpotForm,{// ── Form Setup ──────────────────────────────────────────────────────\nportalId:{type:ControlType.String,title:\"Portal ID\",defaultValue:\"\",placeholder:\"e.g. 12345678\",description:\"Your HubSpot portal (account) ID. Found in HubSpot under Settings > Account.\"},formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"\",placeholder:\"e.g. cd75b77b-058a-4eee-a430-092a24924c28\",description:\"The UUID of the HubSpot form to submit to. Found in the form's embed code or URL.\"},// ── Visible Fields ──────────────────────────────────────────────────\nvisibleFields:{type:ControlType.Array,title:\"Visible Fields\",description:\"User-facing input fields rendered in the form. Each field maps to a HubSpot contact or company property.\",defaultValue:[{name:\"email\",label:\"Email\",fieldType:\"email\",required:true,placeholder:\"you@company.com\",objectTypeId:\"0-1\"}],control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Field Name\",defaultValue:\"\",placeholder:\"e.g. email\",description:\"The HubSpot property internal name. Must match exactly (e.g. 'email', 'firstname', 'company').\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"\",placeholder:\"e.g. Email\",description:\"Display label shown above the input. Leave empty to hide the label.\"},fieldType:{type:ControlType.Enum,title:\"Input Type\",defaultValue:\"text\",options:[\"text\",\"email\",\"phone\",\"textarea\"],optionTitles:[\"Text\",\"Email\",\"Phone\",\"Textarea\"],description:\"Determines the HTML input type and validation behavior. 'Email' enables blocklist checking.\"},required:{type:ControlType.Boolean,title:\"Required\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"When enabled, the browser prevents submission if this field is empty.\"},placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"\",description:\"Hint text shown inside the input when it is empty.\"},objectTypeId:{type:ControlType.Enum,title:\"CRM Object\",defaultValue:\"0-1\",options:[\"0-1\",\"0-2\"],optionTitles:[\"Contact\",\"Company\"],description:\"Which HubSpot CRM object this field writes to. Use Company (0-2) for company name or domain fields.\"}}}},// ── Hidden Fields ───────────────────────────────────────────────────\nhiddenFields:{type:ControlType.Array,title:\"Hidden Fields\",description:\"Fields resolved at submit time from marketing attribution, page context, cookies, or static values. Only include fields that exist on the target HubSpot form.\",defaultValue:[{hubspotFieldName:\"staging_first_touch_utm_source\",sourceType:\"firstTouch\",sourceKey:\"utm_source\",value:\"\"},{hubspotFieldName:\"staging_first_touch_utm_medium\",sourceType:\"firstTouch\",sourceKey:\"utm_medium\",value:\"\"},{hubspotFieldName:\"staging_first_touch_utm_campaign\",sourceType:\"firstTouch\",sourceKey:\"utm_campaign\",value:\"\"},{hubspotFieldName:\"staging_first_touch_utm_content\",sourceType:\"firstTouch\",sourceKey:\"utm_content\",value:\"\"},{hubspotFieldName:\"staging_first_touch_utm_term\",sourceType:\"firstTouch\",sourceKey:\"utm_term\",value:\"\"},{hubspotFieldName:\"last_touch_utm_source\",sourceType:\"lastTouch\",sourceKey:\"utm_source\",value:\"\"},{hubspotFieldName:\"last_touch_utm_medium\",sourceType:\"lastTouch\",sourceKey:\"utm_medium\",value:\"\"},{hubspotFieldName:\"last_touch_utm_campaign\",sourceType:\"lastTouch\",sourceKey:\"utm_campaign\",value:\"\"},{hubspotFieldName:\"last_touch_utm_content\",sourceType:\"lastTouch\",sourceKey:\"utm_content\",value:\"\"},{hubspotFieldName:\"last_touch_utm_term\",sourceType:\"lastTouch\",sourceKey:\"utm_term\",value:\"\"},{hubspotFieldName:\"last_touch_landing_page\",sourceType:\"lastTouch\",sourceKey:\"landing_page\",value:\"\"},{hubspotFieldName:\"last_touch_converting_page\",sourceType:\"pagePath\",sourceKey:\"\",value:\"\"}],control:{type:ControlType.Object,controls:{hubspotFieldName:{type:ControlType.String,title:\"HubSpot Field\",defaultValue:\"\",placeholder:\"e.g. staging_first_touch_utm_source\",description:\"The exact HubSpot property internal name. Must match a hidden field on the target form.\"},sourceType:{type:ControlType.Enum,title:\"Source\",defaultValue:\"firstTouch\",options:[\"firstTouch\",\"lastTouch\",\"static\",\"pageUrl\",\"pagePath\",\"referrer\",\"cookie\",\"queryParam\"],optionTitles:[\"First Touch\",\"Last Touch\",\"Static Value\",\"Page URL\",\"Page Path\",\"Referrer\",\"Cookie\",\"Query Param\"],description:\"Where to read the value from. First/Last Touch read from marketing attribution in localStorage. Static uses a fixed value. Others read live browser data.\"},sourceKey:{type:ControlType.String,title:\"Source Key\",defaultValue:\"\",placeholder:\"e.g. utm_source\",description:\"The key to look up. For First/Last Touch: the attribution param (e.g. 'utm_source'). For Cookie: the cookie name. For Query Param: the URL parameter name.\",hidden(props){const needsKey=[\"firstTouch\",\"lastTouch\",\"cookie\",\"queryParam\"];return!needsKey.includes(props.sourceType);}},value:{type:ControlType.String,title:\"Value\",defaultValue:\"\",description:\"The fixed value to submit. Only used when Source is 'Static Value'.\",hidden(props){return props.sourceType!==\"static\";}}}}},// ── Email Validation (grouped) ──────────────────────────────────────\nemailValidation:{type:ControlType.Object,title:\"Email Validation\",description:\"Client-side email domain validation. Blocks competitor and free email provider domains before submitting.\",controls:{blockedDomains:{type:ControlType.String,title:\"Blocked Domains\",defaultValue:DEFAULT_BLOCKED_DOMAINS.join(\", \"),description:\"Comma-separated list of competitor email domains to reject. Leave empty to allow all domains.\"},blockFreeProviders:{type:ControlType.Boolean,title:\"Block Free Email\",defaultValue:true,enabledTitle:\"Blocked\",disabledTitle:\"Allowed\",description:\"When enabled, rejects gmail.com, yahoo.com, hotmail.com, and other free email providers.\"}}},// ── Post-Submit Behavior ────────────────────────────────────────────\n// These are top-level (not inside an Object group) so that assetUrl,\n// assetFilename, and redirectUrl can be connected to CMS fields.\nenableAssetDownload:{type:ControlType.Boolean,title:\"Enable Download\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Downloads an asset file to the user's device after successful submission. Completes before any redirect.\"},assetUrl:{type:ControlType.File,title:\"Asset File\",allowedFileTypes:[\"pdf\"],description:\"The file to download. Use the file picker to upload, or connect to a CMS File field for collection pages.\",hidden(props){return!props.enableAssetDownload;}},assetFilename:{type:ControlType.String,title:\"Download Filename\",defaultValue:\"download.pdf\",description:\"Filename shown in the save dialog (e.g. 'Q4 Supply Chain Report.pdf'). Include the extension.\",hidden(props){return!props.enableAssetDownload;}},enableRedirect:{type:ControlType.Boolean,title:\"Enable Redirect\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Navigates to a URL after successful submission (and after download, if also enabled). When disabled, shows the success message inline.\"},redirectUrl:{type:ControlType.Link,title:\"Redirect URL\",description:\"The page to navigate to after submission. Typically a thank-you page.\",hidden(props){return!props.enableRedirect;}},// ── Content ─────────────────────────────────────────────────────────\nsubmitButtonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Submit\",description:\"Label displayed on the submit button.\"},successMessage:{type:ControlType.String,title:\"Success Message\",defaultValue:\"Thank you! Your submission has been received.\",description:\"Message shown after a successful submission when redirect is disabled.\"},// ── Label Styling (grouped) ─────────────────────────────────────────\nlabelStyling:{type:ControlType.Object,title:\"Label Styling\",description:\"Typography settings for field labels and the form's base font.\",controls:{fontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"Inter, system-ui, sans-serif\",description:\"CSS font-family applied to the entire form.\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#374151\",description:\"Text color for field labels.\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:14,min:10,max:24,step:1,unit:\"px\",description:\"Font size for field labels.\"}}},// ── Input Styling (grouped) ─────────────────────────────────────────\ninputStyling:{type:ControlType.Object,title:\"Input Styling\",description:\"Appearance settings for text input fields and textareas.\",controls:{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#ffffff\",description:\"Background color of input fields.\"},border:{type:ControlType.String,title:\"Border\",defaultValue:\"1px solid #d1d5db\",description:\"CSS border shorthand. Overridden with red on validation errors.\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#111827\",description:\"Text color inside input fields.\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:24,step:1,unit:\"px\",description:\"Corner rounding of input fields.\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:12,min:0,max:32,unit:\"px\",description:\"Horizontal padding inside input fields.\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:10,min:0,max:32,unit:\"px\",description:\"Vertical padding inside input fields.\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:15,min:10,max:24,unit:\"px\",description:\"Font size of text inside input fields.\"}}},// ── Button Styling (grouped) ────────────────────────────────────────\nbuttonStyling:{type:ControlType.Object,title:\"Button Styling\",description:\"Appearance settings for the submit button.\",controls:{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgb(255, 75, 0)\",description:\"Background color of the submit button.\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\",description:\"Text color of the submit button.\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:24,unit:\"px\",description:\"Corner rounding of the submit button.\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:20,min:0,max:48,unit:\"px\",description:\"Horizontal padding of the submit button.\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:12,min:0,max:32,unit:\"px\",description:\"Vertical padding of the submit button.\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:10,max:24,unit:\"px\",description:\"Font size of the submit button text.\"}}},// ── Layout ──────────────────────────────────────────────────────────\nfieldGap:{type:ControlType.Number,title:\"Field Gap\",defaultValue:16,min:0,max:48,unit:\"px\",description:\"Vertical spacing between form fields.\"},columns:{type:ControlType.Number,title:\"Columns\",defaultValue:1,min:1,max:3,step:1,displayStepper:true,description:\"Lay fields out in a grid. Textareas and the submit button span the full width.\"},collapseBelow:{type:ControlType.Number,title:\"Collapse Below\",defaultValue:480,min:0,max:1200,unit:\"px\",description:\"When the form is narrower than this, fields stack in one column.\",hidden(props){return(props.columns??1)<=1;}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ApiHubSpotForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ApiHubSpotForm.map"],"mappings":"A,qNAiDG,SAAgBiB,EAAS,EAAI,EAAO,IAAI,CAAuF,OAAnFC,GAAK,KAAW,GAAW,OAAOA,CAAG,CAAC,CAAC,QAAQ,yBAAyB,EAAE,CAAC,CAAC,KAAc,CAAC,CAAC,MAAM,EAAEC,CAAM,CAAE,CAKxJ,SAAgBC,GAAc,CAAC,GAAG,OAAO,SAAW,IAAY,MAAM,CAAC,EAAE,IAAMC,EAAI,SAAS,QAAQ,GAAoB,OAAbA,EAAoBA,EAAI,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAI,IAAO,CAAC,GAAK,CAACC,EAAQ,GAAGC,GAAQC,EAAK,MAAM,GAAG,EAAQC,EAAK,oBAAoBH,GAAS,GAAA,CAAI,KAAK,CAAC,EAAQI,EAAM,mBAAmBH,EAAO,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,EAA0B,OAArBE,IAAK,EAAIA,GAAMC,GAAaC,CAAI,EAAE,CAAC,CAAC,EAAzO,CAAC,CAA0O,CAGhW,SAASC,EAAoB,EAAI,CAAC,GAAUtB,IAAS,OAAY,MAAM,GAAG,GAAG,CAAC,OAAOA,EAAO,aAAa,QAAQuB,CAAG,GAAG,EAAG,MAAM,CAAC,MAAM,EAAG,CAAC,CAG3I,SAASC,EAAc,EAAI,CAAC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