{"version":3,"file":"WithTodayQueryParam.CG3wVOZt.mjs","names":["WrappedComponent"],"sources":["https:/framerusercontent.com/modules/upZ5P4k1LJPGO8urSef2/HIiJULFOjXPzaHS8pXqG/WithTodayQueryParam.js"],"sourcesContent":["// Creates a Framer code override named withTodayQueryParam that, on mount in the browser,\n// ensures the URL query param `today` matches the visitor's local date in YYYY-MM-DD format\n// using window.location.replace, while preserving path, hash, and all other query params.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,forwardRef}from\"react\";import{useIsStaticRenderer}from\"framer\";export function withTodayQueryParam(Component){return /*#__PURE__*/forwardRef(function WithTodayQueryParam(props,ref){const isStaticRenderer=useIsStaticRenderer();useEffect(()=>{if(isStaticRenderer)return;if(typeof window===\"undefined\")return;const now=new Date;const year=now.getFullYear();const month=String(now.getMonth()+1).padStart(2,\"0\");const day=String(now.getDate()).padStart(2,\"0\");const today=`${year}-${month}-${day}`;const url=new URL(window.location.href);const currentToday=url.searchParams.get(\"today\");if(currentToday===today)return;url.searchParams.set(\"today\",today);window.location.replace(url.toString());},[isStaticRenderer]);const WrappedComponent=Component;return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withTodayQueryParam\":{\"type\":\"reactHoc\",\"name\":\"withTodayQueryParam\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithTodayQueryParam.map"],"mappings":"oLAG2H,SAAgB,EAAoB,EAAU,CAAC,OAAoB,EAAW,SAA6B,EAAM,EAAI,CAAC,IAAM,EAAiB,EAAoB,EAAwgB,OAAtgB,MAAc,CAA4B,GAAxB,GAAkC,IAAS,OAAY,OAAO,IAAM,EAAI,IAAI,KAA6I,EAAM,GAAnI,EAAI,YAAqI,EAAE,GAA7G,OAAO,EAAI,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,GAAgF,EAAE,GAAnE,OAAO,EAAI,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,GAAuC,IAAU,EAAI,IAAI,IAAI,EAAO,SAAS,IAAI,EAAqB,EAAI,aAAa,IAAI,OAAuB,IAAI,IAAa,EAAI,aAAa,IAAI,QAAQ,CAAK,EAAE,EAAO,SAAS,QAAQ,EAAI,SAAS,CAAC,EAAE,EAAE,CAAC,CAAgB,CAAC,EAAuD,EAAKA,EAAiB,CAAK,MAAI,GAAG,CAAK,CAAC,CAAE,CAAC,CAAE,qBAA3zB,IAAwC,IAAwC"}