{"version":3,"file":"QueryPropogator.HA8WXezh.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/qfy86Y3ZrzeAYIYMlCSK/y4gf4CYkEWYyCX8MZfyb/QueryPropogator.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";export function withParentQueryParams(Component){return props=>{const{url}=props;const ref=useRef(null);const[src,setSrc]=useState(\"\");useEffect(()=>{const href=new URL(window.location.href);const params=href.searchParams;const currentLanguage=window.location.pathname.startsWith(\"/fr\")?\"fr-CA\":\"en\";if(!params.has(\"email\")||!params.has(\"token\")){window.location.href=\"https://www.ownr.co/\";}const src=new URL(`${url}?${params.toString()}&lang=${currentLanguage}`);setSrc(src.href);},[window.location]);return /*#__PURE__*/_jsx(Component,{...props,url:src,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withParentQueryParams\":{\"type\":\"reactHoc\",\"name\":\"withParentQueryParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./QueryPropogator.map"],"mappings":"8IAAwF,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,OAAK,EAAY,EAAIA,EAAO,KAAK,CAAM,CAAC,EAAI,GAAQC,EAAS,GAAG,CAAiX,OAAhX,MAAc,CAA0C,IAAM,EAApC,IAAI,IAAI,EAAO,SAAS,KAAK,CAAmB,aAAmB,EAAgB,EAAO,SAAS,SAAS,WAAW,MAAM,CAAC,QAAQ,MAAQ,CAAC,EAAO,IAAI,QAAQ,EAAE,CAAC,EAAO,IAAI,QAAQ,IAAE,EAAO,SAAS,KAAK,wBAAiG,EAA/D,IAAI,IAAI,GAAG,EAAI,GAAG,EAAO,UAAU,CAAC,QAAQ,IAAkB,CAAY,KAAK,EAAG,CAAC,EAAO,SAAS,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,EAAQ,MAAI,CAAC,uBAAlmB,IAA6C"}