{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/utRzdK2KnB19ibRfrfco/jS37wT55Hrhl392KjsFA/Utilities.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";export function withUrlVariables(Component){return props=>{console.log(props);let newProps=processProps(props);return /*#__PURE__*/ _jsx(Component,{...newProps});};}function processChildren(children){if(!children)return undefined;if(typeof children===\"string\"){return replacePlaceholder(children);}if(Array.isArray(children)){return children.map(processChildren);}else{return{...children,props:processProps(children.props)};}}function processProps(props){if(!props)return undefined;let newHref=undefined;if(props.href){newHref=replacePlaceholder(props.href);}let newChildren=undefined;if(props.children){newChildren=processChildren(props.children);}return{...props,href:newHref,children:newChildren};}function replacePlaceholder(text){const regex=/\\{\\{(.*?)\\}\\}/g;const url=window&&new URL(window.location.href);return text.replace(regex,(_,placeholder)=>{const[key,fallback]=placeholder.split(\"|\");const value=url&&url.searchParams.get(key)||fallback||\"\";return value;});}\nexport const __FramerMetadata__ = {\"exports\":{\"withUrlVariables\":{\"type\":\"reactHoc\",\"name\":\"withUrlVariables\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utilities.map"],
  "mappings": "kFAAkD,SAASA,EAAiBC,EAAU,CAAC,OAAOC,GAAO,CAAC,QAAQ,IAAIA,CAAK,EAAE,IAAIC,EAASC,EAAaF,CAAK,EAAE,OAAqBG,EAAKJ,EAAU,CAAC,GAAGE,CAAQ,CAAC,CAAE,CAAE,CAAC,SAASG,EAAgBC,EAAS,CAAC,GAAIA,EAA0B,OAAG,OAAOA,GAAW,SAAiBC,EAAmBD,CAAQ,EAAM,MAAM,QAAQA,CAAQ,EAAUA,EAAS,IAAID,CAAe,EAAc,CAAC,GAAGC,EAAS,MAAMH,EAAaG,EAAS,KAAK,CAAC,CAAG,CAAC,SAASH,EAAaF,EAAM,CAAC,GAAG,CAACA,EAAM,OAAiB,IAAIO,EAAqBP,EAAM,OAAMO,EAAQD,EAAmBN,EAAM,IAAI,GAAG,IAAIQ,EAAsB,OAAGR,EAAM,WAAUQ,EAAYJ,EAAgBJ,EAAM,QAAQ,GAAS,CAAC,GAAGA,EAAM,KAAKO,EAAQ,SAASC,CAAW,CAAE,CAAC,SAASF,EAAmBG,EAAK,CAAC,IAAMC,EAAM,iBAAuBC,EAAIC,GAAQ,IAAI,IAAIA,EAAO,SAAS,IAAI,EAAE,OAAOH,EAAK,QAAQC,EAAM,CAACG,EAAEC,IAAc,CAAC,GAAK,CAACC,EAAIC,CAAQ,EAAEF,EAAY,MAAM,GAAG,EAA2D,OAA7CH,GAAKA,EAAI,aAAa,IAAII,CAAG,GAAGC,GAAU,EAAgB,CAAC,CAAE",
  "names": ["withUrlVariables", "Component", "props", "newProps", "processProps", "p", "processChildren", "children", "replacePlaceholder", "newHref", "newChildren", "text", "regex", "url", "window", "_", "placeholder", "key", "fallback"]
}
