{"version":3,"file":"FormPrefill.Cse7hcdG.mjs","names":[],"sources":["https:/framerusercontent.com/modules/2CvaiBniwCbr0EFO92Ao/ZvNkSWoqkQ96CvSAOKqB/FormPrefill.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// Helper: Safely get cookie and log the result\nconst getCookieAndDebug=name=>{if(typeof document===\"undefined\")return\"\";const match=document.cookie.match(new RegExp(\"(^| )\"+name+\"=([^;]+)\"));const value=match?match[2]:\"\";return value;};// 1. Override for SOURCE\nexport function withUtmSource(Component){return props=>{const value=getCookieAndDebug(\"utm_source\");return /*#__PURE__*/_jsx(Component,{...props,defaultValue:value,style:{...props.style,display:\"none\"}});};}// 2. Override for MEDIUM\nexport function withUtmMedium(Component){return props=>{const value=getCookieAndDebug(\"utm_medium\");return /*#__PURE__*/_jsx(Component,{...props,defaultValue:value,style:{...props.style,display:\"none\"}});};}// 3. Override for CAMPAIGN\nexport function withUtmCampaign(Component){return props=>{const value=getCookieAndDebug(\"utm_campaign\");return /*#__PURE__*/_jsx(Component,{...props,defaultValue:value,style:{...props.style,display:\"none\"}});};}// 4. Override for Content\nexport function withUtmContent(Component){return props=>{const value=getCookieAndDebug(\"utm_content\");return /*#__PURE__*/_jsx(Component,{...props,defaultValue:value,style:{...props.style,display:\"none\"}});};}// 5. Override that uses the Placeholder text as the Value\nexport function withDynamicFormName(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,// We take the text you typed in the \"Placeholder\" setting\n// and move it into the \"Value\" slot.\nvalue:props.placeholder,// Hide the field visually since it's internal data\nstyle:{...props.style,display:\"none\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withUtmMedium\":{\"type\":\"reactHoc\",\"name\":\"withUtmMedium\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUtmCampaign\":{\"type\":\"reactHoc\",\"name\":\"withUtmCampaign\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUtmSource\":{\"type\":\"reactHoc\",\"name\":\"withUtmSource\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDynamicFormName\":{\"type\":\"reactHoc\",\"name\":\"withDynamicFormName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUtmContent\":{\"type\":\"reactHoc\",\"name\":\"withUtmContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormPrefill.map"],"mappings":"oGAEA,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAM,EAAkB,aAAa,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,CAAC,CAAC,EAC3M,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAM,EAAkB,aAAa,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,CAAC,CAAC,EAC3M,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAM,EAAkB,eAAe,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,CAAC,CAAC,EAC/M,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAM,EAAkB,cAAc,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,CAAC,CAAC,qBALlK,CACrC,EAAkB,GAAM,CAAC,GAAG,OAAO,SAAW,IAAY,MAAM,GAAG,IAAM,EAAM,SAAS,OAAO,MAAU,OAAO,QAAQ,EAAK,WAAW,CAAC,CAA+B,OAAlB,EAAM,EAAM,GAAG"}