{"version":3,"file":"FormPrefill.C7JD0gpP.mjs","names":["React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId","RichText","useRef"],"sources":["https:/framerusercontent.com/modules/6etWqznF22EVTe7TEKVL/6lnuhw9onqGv5INZW5hV/mVh7Uov_5.js","https:/framerusercontent.com/modules/Vl9senjr48WwfaZveKt0/qE7tXvfSxz9AanPyPTxw/FormPrefill.js"],"sourcesContent":["// Generated by Framer (1a93ff7)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS,withFX}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const MotionDivWithFX=withFX(motion.div);const enabledGestures={L2mWi8dG_:{hover:true,pressed:true}};const cycleOrder=[\"L2mWi8dG_\",\"vVHTd46UY\",\"dGrJ75R_T\",\"Mfebqk9wq\",\"yP3TbzWZL\"];const serializationHash=\"framer-cO9wx\";const variantClassNames={dGrJ75R_T:\"framer-v-1p5r095\",L2mWi8dG_:\"framer-v-1lg3dq7\",Mfebqk9wq:\"framer-v-rxmafm\",vVHTd46UY:\"framer-v-1360yge\",yP3TbzWZL:\"framer-v-ktuytz\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const PiChBsopY=undefined;const G1s9OoXro=undefined;const UvONMizB4=undefined;const p0OGc94e1=undefined;const P1VIuwDLc=undefined;const transition1={delay:0,duration:.2,ease:[.44,0,.56,1],type:\"tween\"};const transition2={delay:0,duration:1,ease:[0,0,1,1],type:\"tween\"};const animation={opacity:1,rotate:360,rotateX:0,rotateY:0,scale:1,skewX:0,skewY:0,x:0,y:0};const transformTemplate1=(_,t)=>`translateX(-50%) ${t}`;const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const humanReadableVariantMap={Default:\"L2mWi8dG_\",Disabled:\"dGrJ75R_T\",Error:\"yP3TbzWZL\",Loading:\"vVHTd46UY\",Success:\"Mfebqk9wq\"};const Variants=motion.create(React.Fragment);const getProps=({buttonColor,cTAText,glow,height,hoverColor,id,textColor,width,...props})=>{return{...props,G1s9OoXro:glow??props.G1s9OoXro??\"0px 4px 12px 0px rgba(133, 142, 98, 0.5), 4px -2px 12px 0px rgba(90, 122, 226, 0.5), -4px -2px 12px 0px rgba(207, 157, 78, 0.5)\",p0OGc94e1:textColor??props.p0OGc94e1??\"rgb(255, 255, 255)\",P1VIuwDLc:cTAText??props.P1VIuwDLc??\"Watch the demo\",PiChBsopY:buttonColor??props.PiChBsopY??\"rgb(28, 29, 24)\",UvONMizB4:hoverColor??props.UvONMizB4??\"var(--token-8d70c8b7-0f51-40f2-bc78-9030a1ba0e84, rgb(49, 49, 53))\",variant:humanReadableVariantMap[props.variant]??props.variant??\"L2mWi8dG_\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,P1VIuwDLc,p0OGc94e1,PiChBsopY,UvONMizB4,G1s9OoXro,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"L2mWi8dG_\",enabledGestures,ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);const isDisplayed=()=>{if(baseVariant===\"vVHTd46UY\")return false;return true;};const isDisplayed1=()=>{if(baseVariant===\"vVHTd46UY\")return true;return false;};return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsxs(motion.button,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-1lg3dq7\",className,classNames),\"data-framer-name\":\"Default\",\"data-reset\":\"button\",layoutDependency:layoutDependency,layoutId:\"L2mWi8dG_\",ref:refBinding,style:{\"--f2wypb\":G1s9OoXro,backgroundColor:PiChBsopY,borderBottomLeftRadius:10,borderBottomRightRadius:10,borderTopLeftRadius:10,borderTopRightRadius:10,boxShadow:\"var(--f2wypb)\",opacity:1,...style},variants:{\"L2mWi8dG_-hover\":{backgroundColor:UvONMizB4,opacity:1},\"L2mWi8dG_-pressed\":{backgroundColor:\"var(--token-8d70c8b7-0f51-40f2-bc78-9030a1ba0e84, rgb(49, 49, 53))\",opacity:1},dGrJ75R_T:{opacity:.5},Mfebqk9wq:{opacity:1},yP3TbzWZL:{backgroundColor:\"rgba(255, 34, 68, 0.15)\",opacity:1}},...addPropertyOverrides({\"L2mWi8dG_-hover\":{\"data-framer-name\":undefined},\"L2mWi8dG_-pressed\":{\"data-framer-name\":undefined},dGrJ75R_T:{\"data-framer-name\":\"Disabled\"},Mfebqk9wq:{\"data-framer-name\":\"Success\"},vVHTd46UY:{\"data-framer-name\":\"Loading\"},yP3TbzWZL:{\"data-framer-name\":\"Error\"}},baseVariant,gestureVariant),children:[isDisplayed()&&/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--variable-reference-p0OGc94e1-mVh7Uov_5))\"},children:\"Watch the demo\"})}),className:\"framer-19vua8u\",fonts:[\"Inter-SemiBold\"],layoutDependency:layoutDependency,layoutId:\"Ae5bzhfHS\",style:{\"--extracted-r6o4lv\":\"var(--variable-reference-p0OGc94e1-mVh7Uov_5)\",\"--framer-link-text-color\":\"rgb(0, 153, 255)\",\"--framer-link-text-decoration\":\"underline\",\"--variable-reference-p0OGc94e1-mVh7Uov_5\":p0OGc94e1},text:P1VIuwDLc,variants:{Mfebqk9wq:{\"--extracted-r6o4lv\":\"rgb(255, 255, 255)\"},yP3TbzWZL:{\"--extracted-r6o4lv\":\"rgb(255, 34, 68)\"}},verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({Mfebqk9wq:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"12px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"Thank you! We have received your info.\"})}),text:undefined},yP3TbzWZL:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 34, 68))\"},children:\"Something went wrong\"})}),text:undefined}},baseVariant,gestureVariant)}),isDisplayed1()&&/*#__PURE__*/_jsx(motion.div,{className:\"framer-12w9dly\",\"data-framer-name\":\"Spinner\",layoutDependency:layoutDependency,layoutId:\"niXEsW9Br\",style:{mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"},children:/*#__PURE__*/_jsx(MotionDivWithFX,{__framer__loop:animation,__framer__loopEffectEnabled:true,__framer__loopRepeatDelay:0,__framer__loopRepeatType:\"loop\",__framer__loopTransition:transition2,__perspectiveFX:false,__smartComponentFX:true,__targetOpacity:1,className:\"framer-10n6t0b\",\"data-framer-name\":\"Conic\",layoutDependency:layoutDependency,layoutId:\"UX3J4rzdU\",style:{background:\"conic-gradient(from 180deg at 50% 50%, rgb(68, 204, 255) 0deg, rgb(68, 204, 255) 360deg)\",backgroundColor:\"rgb(68, 204, 255)\",mask:\"none\",WebkitMask:\"none\"},variants:{vVHTd46UY:{background:\"conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0) 7.208614864864882deg, rgb(255, 255, 255) 342deg)\",backgroundColor:\"rgba(0, 0, 0, 0)\",mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"}},children:/*#__PURE__*/_jsx(motion.div,{className:\"framer-1frcggs\",\"data-framer-name\":\"Rounding\",layoutDependency:layoutDependency,layoutId:\"vVkmG6Xki\",style:{backgroundColor:\"rgb(255, 255, 255)\",borderBottomLeftRadius:1,borderBottomRightRadius:1,borderTopLeftRadius:1,borderTopRightRadius:1},transformTemplate:transformTemplate1})})})]})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-cO9wx.framer-1huugoe, .framer-cO9wx .framer-1huugoe { display: block; }\",\".framer-cO9wx.framer-1lg3dq7 { align-content: center; align-items: center; cursor: pointer; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 0px; height: 40px; justify-content: center; overflow: var(--overflow-clip-fallback, clip); padding: 0px; position: relative; width: 240px; will-change: var(--framer-will-change-override, transform); }\",\".framer-cO9wx .framer-19vua8u { -webkit-user-select: none; flex: none; height: auto; position: relative; user-select: none; white-space: pre; width: auto; }\",\".framer-cO9wx .framer-12w9dly { aspect-ratio: 1 / 1; flex: none; gap: 10px; height: var(--framer-aspect-ratio-supported, 20px); overflow: hidden; position: relative; width: 20px; }\",\".framer-cO9wx .framer-10n6t0b { bottom: 0px; flex: none; left: 0px; overflow: visible; position: absolute; right: 0px; top: 0px; }\",\".framer-cO9wx .framer-1frcggs { aspect-ratio: 1 / 1; flex: none; height: var(--framer-aspect-ratio-supported, 2px); left: 50%; overflow: visible; position: absolute; top: 0px; width: 2px; }\",\".framer-cO9wx.framer-v-1360yge.framer-1lg3dq7, .framer-cO9wx.framer-v-1p5r095.framer-1lg3dq7, .framer-cO9wx.framer-v-rxmafm.framer-1lg3dq7, .framer-cO9wx.framer-v-ktuytz.framer-1lg3dq7 { cursor: unset; }\",\".framer-cO9wx.framer-v-1360yge .framer-10n6t0b { overflow: hidden; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 40\n * @framerIntrinsicWidth 240\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"vVHTd46UY\":{\"layout\":[\"fixed\",\"fixed\"]},\"dGrJ75R_T\":{\"layout\":[\"fixed\",\"fixed\"]},\"Mfebqk9wq\":{\"layout\":[\"fixed\",\"fixed\"]},\"yP3TbzWZL\":{\"layout\":[\"fixed\",\"fixed\"]},\"rbmgxMjEm\":{\"layout\":[\"fixed\",\"fixed\"]},\"y9vztox0c\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerVariables {\"P1VIuwDLc\":\"cTAText\",\"p0OGc94e1\":\"textColor\",\"PiChBsopY\":\"buttonColor\",\"UvONMizB4\":\"hoverColor\",\"G1s9OoXro\":\"glow\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramermVh7Uov_5=withCSS(Component,css,\"framer-cO9wx\");export default FramermVh7Uov_5;FramermVh7Uov_5.displayName=\"Form Submit Button\";FramermVh7Uov_5.defaultProps={height:40,width:240};addPropertyControls(FramermVh7Uov_5,{variant:{options:[\"L2mWi8dG_\",\"vVHTd46UY\",\"dGrJ75R_T\",\"Mfebqk9wq\",\"yP3TbzWZL\"],optionTitles:[\"Default\",\"Loading\",\"Disabled\",\"Success\",\"Error\"],title:\"Variant\",type:ControlType.Enum},P1VIuwDLc:{defaultValue:\"Watch the demo\",displayTextArea:false,title:\"CTA Text\",type:ControlType.String},onP1VIuwDLcChange:{changes:\"P1VIuwDLc\",type:ControlType.ChangeHandler},p0OGc94e1:{defaultValue:\"rgb(255, 255, 255)\",title:\"Text Color\",type:ControlType.Color},PiChBsopY:{defaultValue:\"rgb(28, 29, 24)\",title:\"Button Color\",type:ControlType.Color},UvONMizB4:{defaultValue:'var(--token-8d70c8b7-0f51-40f2-bc78-9030a1ba0e84, rgb(49, 49, 53)) /* {\"name\":\"800\"} */',title:\"Hover Color\",type:ControlType.Color},G1s9OoXro:{defaultValue:[{blur:12,color:\"rgba(133, 142, 98, 0.5)\",diffusion:.5,focus:.5,inset:false,spread:0,type:\"box\",x:0,y:4},{blur:12,color:\"rgba(90, 122, 226, 0.5)\",diffusion:.5,focus:.5,inset:false,spread:0,type:\"box\",x:4,y:-2},{blur:12,color:\"rgba(207, 157, 78, 0.5)\",diffusion:.5,focus:.5,inset:false,spread:0,type:\"box\",x:-4,y:-2}],title:\"Glow\",type:ControlType.BoxShadow}});addFonts(FramermVh7Uov_5,[{explicitInter:true,fonts:[{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/hyOgCu0Xnghbimh0pE8QTvtt2AU.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/NeGmSOXrPBfEFIy5YZeHq17LEDA.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/oYaAX5himiTPYuN8vLWnqBbfD2s.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/lEJLP4R0yuCaMCjSXYHtJw72M.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/cRJyLNuTJR5jbyKzGi33wU9cqIQ.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2070, U+2074-207E, U+2080-208E, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/yDtI2UI8XcEg1W2je9XPN3Noo.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/A0Wcc7NgXMjUuFdquHDrIZpzZw0.woff2\",weight:\"600\"}]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramermVh7Uov_5\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisplayContentsDiv\":\"false\",\"framerAutoSizeImages\":\"true\",\"framerColorSyntax\":\"true\",\"framerIntrinsicWidth\":\"240\",\"framerVariables\":\"{\\\"P1VIuwDLc\\\":\\\"cTAText\\\",\\\"p0OGc94e1\\\":\\\"textColor\\\",\\\"PiChBsopY\\\":\\\"buttonColor\\\",\\\"UvONMizB4\\\":\\\"hoverColor\\\",\\\"G1s9OoXro\\\":\\\"glow\\\"}\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"vVHTd46UY\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"dGrJ75R_T\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"Mfebqk9wq\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"yP3TbzWZL\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"rbmgxMjEm\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"y9vztox0c\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerComponentViewportWidth\":\"true\",\"framerIntrinsicHeight\":\"40\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./mVh7Uov_5.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// React controls input values internally — a plain `input.value =` assignment is\n// overwritten on the next render. Using the native HTMLInputElement setter bypasses\n// React's value tracking so the subsequent synthetic events are treated as real user\n// input, causing React to update its internal state and keep the value.\nfunction setField(form,name,value){if(!name||!value)return;// Traverse by property rather than CSS selector to avoid SyntaxError on\n// field names that contain quotes, brackets, or other selector metacharacters.\nconst input=Array.from(form.querySelectorAll(\"input\")).find(candidate=>candidate.name===name);if(!input){console.error(`[FormPrefill] input[name=\"${name}\"] not found in form`);return;}console.log(`[FormPrefill] filling input[name=\"${name}\"]`);const nativeSetter=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,\"value\")?.set;if(nativeSetter){nativeSetter.call(input,value);}else{input.value=value;}input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}export default function FormPrefill({apiBaseUrl=\"https://www.podium.com\",firstNameField=\"FirstName\",lastNameField=\"LastName\",emailField=\"Email\",phoneField=\"Phone\",companyField=\"Company\"}){const anchorRef=useRef(null);const prefillDataRef=useRef(null);useEffect(()=>{if(typeof window===\"undefined\")return;const cid=new URLSearchParams(window.location.search).get(\"cid\");if(!cid){console.log(\"[FormPrefill] no cid in URL, skipping prefill\");return;}const form=anchorRef.current?.closest(\"form\");if(!form){console.error(\"[FormPrefill] parent <form> not found — place FormPrefill inside a Framer Form component\");return;}const allInputs=Array.from(form.querySelectorAll(\"input\"));console.log(\"[FormPrefill] found inputs in form:\",allInputs.map(i=>`input[name=\"${i.name}\"]`));const fillAll=data=>{setField(form,firstNameField,data.firstName);setField(form,lastNameField,data.lastName);setField(form,emailField,data.email);setField(form,phoneField,data.phone);setField(form,companyField,data.companyName);};// Re-fill on submit (capture phase) to guard against React re-renders\n// clearing prefilled values before the form data is collected.\nconst handleSubmit=()=>{try{if(prefillDataRef.current)fillAll(prefillDataRef.current);}catch{// Never block form submission\n}};form.addEventListener(\"submit\",handleSubmit,true);const controller=new AbortController;let timerId;fetch(`${apiBaseUrl}/api/contact-prefill?cid=${encodeURIComponent(cid)}`,{signal:controller.signal}).then(res=>{if(!res.ok){console.error(`[FormPrefill] API returned ${res.status}`);return null;}return res.json();}).then(data=>{if(!data)return;console.log(\"[FormPrefill] prefill data received\");prefillDataRef.current=data;timerId=setTimeout(()=>fillAll(data),0);}).catch(err=>{if(err?.name!==\"AbortError\"){console.error(\"[FormPrefill] fetch failed:\",err);}});return()=>{controller.abort();clearTimeout(timerId);form.removeEventListener(\"submit\",handleSubmit,true);};},[apiBaseUrl,firstNameField,lastNameField,emailField,phoneField,companyField]);return /*#__PURE__*/_jsx(\"span\",{ref:anchorRef,style:{display:\"none\"}});}FormPrefill.displayName=\"FormPrefill\";addPropertyControls(FormPrefill,{apiBaseUrl:{type:ControlType.String,title:\"API Base URL\",defaultValue:\"https://www.podium.com\",description:\"Base URL of the vanbrunt API\"},firstNameField:{type:ControlType.String,title:\"First Name Field\",defaultValue:\"FirstName\",description:\"input[name] to fill with first name\"},lastNameField:{type:ControlType.String,title:\"Last Name Field\",defaultValue:\"LastName\",description:\"input[name] to fill with last name\"},emailField:{type:ControlType.String,title:\"Email Field\",defaultValue:\"Email\",description:\"input[name] to fill with email\"},phoneField:{type:ControlType.String,title:\"Phone Field\",defaultValue:\"Phone\",description:\"input[name] to fill with phone\"},companyField:{type:ControlType.String,title:\"Company Field\",defaultValue:\"Company\",description:\"input[name] to fill with company name\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FormPrefill\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormPrefill.map"],"mappings":"sWACgsB,SAAS,EAAqB,EAAU,GAAG,EAAS,CAAC,IAAM,EAAc,CAAC,EAAuF,OAArF,GAAU,QAAQ,GAAS,GAAS,OAAO,OAAO,EAAc,EAAU,EAAQ,CAAC,EAAS,CAAc,+CAA9zB,IAA2I,IAAkE,IAA4B,EAAiC,EAAgB,EAAO,EAAO,GAAG,EAAQ,EAAgB,CAAC,UAAU,CAAC,MAAM,GAAK,QAAQ,EA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