{"version":3,"file":"Query_Params.BuHykr0T.mjs","names":[],"sources":["https:/framerusercontent.com/modules/BK4xfQi5xy2N6Rph0uqS/RurYqrfyclrDBRFbtVzz/Append_Source_URL.js","https:/framerusercontent.com/modules/fnT3xujEdPytpctChGjT/7JnTGfgPZrO7pCaRD55Y/Query_Params.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withSourceParam(Component){return props=>{return /*#__PURE__*/_jsx(\"div\",{onClick:e=>{e.preventDefault();e.stopPropagation();// Extract the 'source' parameter from the current URL\nconst urlParams=new URLSearchParams(window.location.search);const sourceParam=urlParams.get(\"source\");// Only append source if it exists\nif(sourceParam){const separator=props.href.includes(\"?\")?\"&\":\"?\";const newUrl=`${props.href}${separator}source=${sourceParam}`;window.location.href=newUrl// Navigate to new URL\n;}else{window.location.href=props.href// Navigate normally if no source\n;}},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSourceParam\":{\"type\":\"reactHoc\",\"name\":\"withSourceParam\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Append_Source_URL.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more here: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withQueryParams(Component){return props=>{return /*#__PURE__*/_jsx(\"div\",{onClick:e=>{e.preventDefault();e.stopPropagation();// Extract the 'source' parameter from the query string\nconst urlParams=new URLSearchParams(window.location.search);const sourceParam=urlParams.get(\"source\")||\"getstarted\"// Default to \"hq\"\n;let newUrl;if(sourceParam){// Parse the original URL\nconst originalUrl=new URL(props.href);// Create the new URL with the subdomain\nnewUrl=`${originalUrl.protocol}//${sourceParam}.${originalUrl.host}${originalUrl.pathname}${originalUrl.search}`;}else{// Use the original URL if no 'source' parameter exists\nnewUrl=props.href;}// Redirect to the new URL, allowing the back button to return to the current page\nwindow.location.href=newUrl;},children:/*#__PURE__*/_jsx(Component,{...props})});};}export function withQueryParams2(Component){return props=>{return /*#__PURE__*/_jsx(\"div\",{onClick:e=>{e.preventDefault();e.stopPropagation();const newUrl=`${props.href}${window.location.search}`;window.location.replace(newUrl);},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withQueryParams\":{\"type\":\"reactHoc\",\"name\":\"withQueryParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withQueryParams2\":{\"type\":\"reactHoc\",\"name\":\"withQueryParams2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Query_Params.map"],"mappings":"0KACmD,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAA4B,EAAK,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAE,eAAe,EAAE,EAAE,gBAAgB,EAClI,IAAM,EAAY,IAA1D,gBAAgB,EAAO,SAAS,MAAkC,CAAC,CAAC,IAAI,QAAQ,EACpG,GAAG,EAAY,CAAC,IAAM,EAAU,EAAM,KAAK,SAAS,GAAG,EAAE,IAAI,IAAU,EAAO,GAAG,EAAM,OAAO,EAAU,SAAS,IAAc,EAAO,SAAS,KAAK,CACnJ,KAAM,GAAO,SAAS,KAAK,EAAM,IAChC,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAI,qBALf,IAAqE,EAChG,EAAY,CAAC,WAAW,SAAS,CAAC,KCAE,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAA4B,EAAK,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAE,eAAe,EAAE,EAAE,gBAAgB,EAClI,IAAM,EAAY,IAA1D,gBAAgB,EAAO,SAAS,MAA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