{"version":3,"file":"Org.Cefp2G5e.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/g4n7Tb0hc12g7sMmomgy/xNtWnd8cDK5BexmwpGAW/Org.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";function setNativeValue(el,value){const{set:valueSetter}=Object.getOwnPropertyDescriptor(el,\"value\")||{};const prototype=Object.getPrototypeOf(el);const{set:prototypeSetter}=Object.getOwnPropertyDescriptor(prototype,\"value\")||{};// Prefer prototype setter (works best with React-controlled inputs)\nconst setter=prototypeSetter||valueSetter;if(setter)setter.call(el,value);else el.value=value;el.dispatchEvent(new Event(\"input\",{bubbles:true}));el.dispatchEvent(new Event(\"change\",{bubbles:true}));}export function FillOrg(){useEffect(()=>{const params=new URLSearchParams(window.location.search);const org=params.get(\"org\");if(!org)return;// Try to find the field now, and also if it mounts later\nconst findAndFill=()=>{const input=document.querySelector(\"input[name='company']\")||// fallback ideas if the name changed in Framer:\ndocument.querySelector(\"input[name='Company']\")||document.querySelector(\"input[autocomplete='organization']\");if(!input)return false;setNativeValue(input,org);return true;};if(findAndFill())return;// Wait for Framer to mount the form field\nconst obs=new MutationObserver(()=>{if(findAndFill())obs.disconnect();});obs.observe(document.documentElement,{childList:true,subtree:true});return()=>obs.disconnect();},[]);return{};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withFillOrg(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...FillOrg(props)});};}withFillOrg.displayName=\"FillOrg\";\nexport const __FramerMetadata__ = {\"exports\":{\"withFillOrg\":{\"type\":\"reactHoc\",\"name\":\"withFillOrg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FillOrg\":{\"type\":\"override\",\"name\":\"FillOrg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\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