{"version":3,"file":"NavigableToday.CDglPRjH.mjs","names":[],"sources":["https:/framerusercontent.com/modules/jYpRMfurbH39r8WqpdOB/qklEJ3Y80wBUmPLYHYbC/NavigableToday.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Day names for the dayoftheweek variable\nconst DAY_NAMES=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];// Shared store so all overrides stay in sync\nconst useStore=createStore({// Start as today's date in YYYY-MM-DD (matches your CMS)\ntoday:getTodayInMST()});// Helper: get day name from an ISO string like \"2025-11-26\"\nfunction getDayName(isoDate){const[y,m,d]=isoDate.split(\"-\").map(Number);const date=new Date(y,m-1,d);return DAY_NAMES[date.getDay()];}function getTodayInMST(){// Build YYYY-MM-DD reliably (don’t rely on locale output shape)\nconst parts=new Intl.DateTimeFormat(\"en-US\",{timeZone:\"America/Denver\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(new Date);const map=Object.fromEntries(parts.map(p=>[p.type,p.value]));return`${map.year}-${map.month}-${map.day}`;}/**\n * OVERRIDE #1\n * Attach this to the main component instance that has the `today` variable.\n * It feeds the shared store date into the component variables.\n */export function withTodaysDate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store]=useStore();const today=store.today;const dayoftheweek=getDayName(today);console.log(\"withTodaysDate →\",{today,dayoftheweek});return /*#__PURE__*/_jsx(Component,{ref:ref,...props,today:today,dayoftheweek:dayoftheweek});});}/**\n * OVERRIDE #2\n * Attach this to the \"Tomorrow\" button.\n * On click, it moves the shared `today` value forward by one day.\n */export function withTomorrowButton(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();const handleClick=()=>{const current=new Date(store.today);current.setDate(current.getDate()+1);const next=current.toISOString().split(\"T\")[0];setStore({today:next});};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}export function withYesterdayButton(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();const handleClick=()=>{const current=new Date(store.today);current.setDate(current.getDate()-1);const next=current.toISOString().split(\"T\")[0];setStore({today:next});};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withTomorrowButton\":{\"type\":\"reactHoc\",\"name\":\"withTomorrowButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYesterdayButton\":{\"type\":\"reactHoc\",\"name\":\"withYesterdayButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTodaysDate\":{\"type\":\"reactHoc\",\"name\":\"withTodaysDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NavigableToday.map"],"mappings":"0KAIA,SAAS,EAAW,EAAQ,CAAC,GAAK,CAAC,EAAE,EAAE,GAAG,EAAQ,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM,EAAQ,EAAK,IAAI,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,EAAU,EAAK,OAAO,EAAG,CAAC,SAAS,GAAe,CAC/J,IAAM,EAAM,IAAI,KAAK,eAAe,QAAQ,CAAC,SAAS,iBAAiB,KAAK,UAAU,MAAM,UAAU,IAAI,SAAS,CAAC,CAAC,CAAC,cAAc,IAAI,IAAI,EAAQ,EAAI,OAAO,YAAY,EAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,EAAI,KAAK,GAAG,EAAI,MAAM,GAAG,EAAI,KAAM,CAIpP,SAAgB,EAAe,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,GAAO,EAAS,EAAQ,EAAM,EAAM,MAAY,EAAa,EAAW,CAAK,EAAuD,OAArD,QAAQ,IAAI,mBAAmB,CAAC,QAAM,cAAY,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