{"version":3,"file":"Query_Params.B2Q1F7NM.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,gBAAgB,CAAC,EAAE,iBAAiB,CACnI,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAA6B,IAAI,SAAS,CACrG,GAAG,EAAY,CAAC,IAAM,EAAU,EAAM,KAAK,SAAS,IAAI,CAAC,IAAI,IAAU,EAAO,GAAG,EAAM,OAAO,EAAU,SAAS,IAAc,EAAO,SAAS,KAAK,OAC7I,EAAO,SAAS,KAAK,EAAM,MAC9B,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,sBALX,IAAqE,CACjG,EAAY,CAAC,WAAW,UAAU,CAAC,ICAC,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAA4B,EAAK,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAE,gBAAgB,CAAC,EAAE,iBAAiB,CACnI,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAA6B,IAAI,S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