(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,553329,e=>{"use strict";async function t(e){try{return{data:await e,error:null}}catch(e){return{data:null,error:e}}}e.s(["tryCatch",0,t])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),n=e.i(901351),a=e.i(310847),s=e.i(528600),o=e.i(617874),l=e.i(858040),u=e.i(553329),c=e.i(592121),d=e.i(245943);let p=(0,e.i(695881).createLogger)("useMapSettings");e.s(["WEB_MAP_SETTINGS_PLATFORM",0,"twc","useMapSettings",0,function(e="twc"){let{user:{isUserLoggedIn:t}}=(0,s.useUser)();return{saveMapSettings:(0,c.useCallback)(async r=>{if(!t)return!1;let{error:i}=await (0,u.tryCatch)(n.upsxClient.preference.updateMapSettings(e,r));if(!i)return!0;if(i instanceof d.APIError&&404===i.code){let{error:t}=await (0,u.tryCatch)(n.upsxClient.preference.createMapSettings(e,r));return!t||(p.warn("Failed to create map settings",t),!1)}return p.warn("Failed to update map settings",i),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,s.useUser)(),[c,d]=(0,t.useAtom)(r.userPreferencesAtom),[p,m]=(0,t.useAtom)(a.wxuUserPreferenceAtom),f=async()=>{let{data:e,error:t}=await (0,u.tryCatch)(n.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:i,opacity:a,roadOverlay:s,style:o}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==a&&{opacity:a},...void 0!==s&&{roadOverlay:s},...void 0!==o&&{style:o}};return Object.keys(l).length>0?l:null},g=async e=>{try{await n.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},h=async(t,r=!0)=>{try{let i,n=(i={...c,...t},d(i),m({...p,...t,locations:i.locations}),i);if(t?.unit){let e=(0,o.unitsSystemByName)(t.unit),r=e?.code||"e";(0,l.setCookie)(o.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await g(n),{success:!0}}catch(e){return console.error("Failed to update preferences:",e),{success:!1,error:e instanceof Error?e.message:"Failed to update preferences"}}};return{syncPreferencesFromUpsx:async()=>{try{let[e,t]=await Promise.all([n.upsxClient.preference.getPreference(),f()]);if(!e?.userID)return null;let{mapSettings:r,...a}=e,s={...a,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...t}};return h(s,!1),s}catch{return null}},updatePreferences:h}}],776169)},491045,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),i=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,i])},185312,(e,t,r)=>{t.exports=e.r(16129)},318849,e=>{"use strict";let t=!1,r="upsx-recent-purchase-at";e.s(["SWR_CACHE_LEGACY_STORAGE_KEY",0,"app-cache","SWR_CACHE_STORAGE_KEY",0,"wxu-swr-cache-v1","disableSwrPersist",0,()=>{t=!0},"hasRecentPurchase",0,e=>{try{let t=localStorage.getItem(r);if(!t)return!1;let i=Number(t);if(!Number.isFinite(i))return!1;return Date.now()-it,"markRecentPurchase",0,()=>{try{localStorage.setItem(r,String(Date.now()))}catch{}}])},45846,e=>{"use strict";let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},491240,e=>{"use strict";let t=(0,e.i(695881).createLogger)("MParticleIdentity");e.s(["truncateIdentityValue",0,e=>"string"==typeof e&&e.length>256?(t.warn(`identity value exceeded 256 chars (${e.length}); truncating`),e.slice(0,256)):e])},806262,e=>{"use strict";e.i(592121);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,i){var n;let a,s=(0,t.useStore)(i),o=(n=s,(a=r.get(n))||(a=new WeakSet,r.set(n,a)),a);for(let[t,...r]of e)(!o.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(o.add(t),s.set(t,...r))}])},604323,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["metricsArticleDataAtom",0,t])},513539,e=>{"use strict";var t=e.i(981030);let r=(0,t.atom)(null),i=(0,t.atom)(null);e.s(["activeEventAtom",0,i,"layoutStateAtom",0,r])},991511,e=>{"use strict";var t=e.i(592121),r=e.i(806262),i=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let n=(0,i.useStore)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)n.get(e)!==t&&n.set(e,t)})}])},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},688070,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["isWebViewOnlyAtom",0,t])},328343,562209,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(737801),n=e.i(688070);e.s(["useEnrolledInExperimentEvent",0,()=>{let e=(0,i.useEventAttributes)(),a=(0,r.useAtomValue)(n.isWebViewOnlyAtom);return(0,t.useCallback)((t,r={})=>{if(a)return void console.debug("Skipping enrolled-in-experiment in webview mode");if(!window.mParticle?.isInitialized?.())return void console.warn("MParticle is not initialized");if(!t)return void console.warn("No exposure data provided to trackEnrolledInExperiment");if(!t.experiment_key)return void console.debug(`[Experiment] Skipping exposure tracking for ${t.flag_key} - no experiment_key (feature flag only)`);try{let i={...e,newVariant:t.variant||"",newExperiment:t.flag_key,newExperimentKey:t.experiment_key,newExperimentReceivedAt:Date.now()};window.mParticle?.logEvent?.("enrolled-in-experiment",window.mParticle?.EventType?.Other,i,r),console.debug(`MParticle: Event tracked - enrolled-in-experiment for ${t.flag_key||"unknown"}:${t.variant}`)}catch(e){console.error("MParticle: Failed to track event",e)}},[e,a])}],328343);var a=e.i(546584),s=e.i(553329);let o="production"!==a.default.env.VERCEL_TARGET_ENV,l=new Set;e.s(["resetTrackedExposures",0,function(){l.clear()},"trackAmplitudeExposure",0,function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){o&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){o&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let i=`${e.flag_key}::${e.variant??""}`;if(l.has(i)){o&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${i}`);return}l.add(i);let n={api_key:"bb1117981ed2a95dc4fa64b75661d681",events:[{event_type:"$exposure",user_id:t,device_id:r,ip:"$remote",event_properties:{flag_key:e.flag_key,variant:e.variant,experiment_key:e.experiment_key,platform:"web",app_name:"wx-next-web",environment:o?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,s.tryCatch)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0}));return r?console.error("[Experiment] Failed to send exposure to Amplitude HTTP API:",r):t&&!t.ok?console.error(`[Experiment] Amplitude HTTP API returned ${t.status}`):o&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}],562209)},283366,e=>{"use strict";e.s(["getExposureVariantOverride",()=>g,"resetExposures",()=>h,"useExposure",()=>x]);var t=e.i(592121),r=e.i(695881),i=e.i(333350),n=e.i(358273),a=e.i(742436);let s=(0,r.createLogger)("useExposure"),o="wxu-exp-exposed:",l=new Set,u=()=>{try{return(0,n.getMetricsSession)()?.sessionId||null}catch{return null}},c=e=>{try{let t=localStorage.getItem(o+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},d=(e,t)=>{try{for(let t=localStorage.length-1;t>=0;t--){let r=localStorage.key(t);r?.startsWith(o)&&r!==o+e&&localStorage.removeItem(r)}localStorage.setItem(o+e,JSON.stringify([...t]))}catch{}},p=e=>{if(0===l.size)return;let t=c(e);for(let e of l)t.add(e);d(e,t),l.clear()},m=e=>{let t=u();return t?(p(t),c(t).has(e)):l.has(e)},f=new Map;function g(e){return f.get(e)}function h(){l.clear(),f.clear();let e=u();if(e)try{localStorage.removeItem(o+e)}catch{}}function x(e,r){let n=void 0!==r,o=r?.variant,g=(0,t.useContext)(a.ExperimentContext);(0,t.useEffect)(()=>{if(!i.default||!g||m(e)||n&&void 0===o)return;let{client:t}=g;if(!t)return;let r=()=>{if(!m(e)){(e=>{let t=u();if(!t)return l.add(e);p(t);let r=c(t);r.add(e),d(t,r)})(e),void 0!==o&&f.set(e,o);try{t.exposure(e)}catch(e){s.error("Failed to track exposure:",e)}}};window.mParticle?.isInitialized?.()?r():window.mParticle?.ready?.(r)},[g,e,n,o])}},742436,e=>{"use strict";e.s(["ExperimentContext",()=>f,"ExperimentProvider",()=>g,"default",()=>x,"useExperimentContext",()=>h],742436);var t=e.i(546584),r=e.i(699173),i=e.i(592121),n=e.i(185312),a=e.i(333350),s=e.i(546446),o=e.i(328343),l=e.i(158662),u=e.i(528600),c=e.i(562209),d=e.i(283366);let p="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",m="production"!==t.default.env.VERCEL_TARGET_ENV,f=(0,i.createContext)(null),g=({children:e,scriptSrc:t})=>{let g=(0,o.useEnrolledInExperimentEvent)(),h=(0,s.useSetAtom)(l.experimentJoinListAtom),{user:x}=(0,u.useUser)(),[v,y]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1),[,E]=(0,i.useState)(0),S=(0,i.useRef)(void 0),k=(0,i.useRef)(void 0);S.current=x.userID||void 0,k.current=x.anonId||void 0;let A=(0,i.useRef)(new Set),_=(0,i.useRef)({}),C=function(e,t){let r=(0,i.useRef)(null),[n,s]=(0,i.useState)(!1),o=(0,i.useRef)(e);return o.current=e,(0,i.useEffect)(()=>{if(!n&&a.default&&p&&t){if(!window.Experiment)return void console.error("Amplitude Experiment SDK not loaded. Script may still be loading.");try{r.current=window.Experiment.initialize(p,{debug:m,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:e=>{try{o.current(e),m&&console.debug("[Experiment] Exposure tracked:",e)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}}},source:"localStorage"}),s(!0),m&&console.debug("[Experiment] SDK initialized (will fetch from API)")}catch(e){console.error("Failed to initialize Amplitude Experiment SDK:",e)}}},[n,t]),r.current}((0,i.useCallback)(e=>{let t=(0,d.getExposureVariantOverride)(e.flag_key),r=void 0!==t?{...e,variant:t}:e,i=`${r.flag_key}::${r.variant??""}`;if(A.current.has(i))return;A.current.add(i);let[n]=JSON.parse(JSON.stringify(Object.entries({[r.flag_key]:{key:r.variant}}).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",i=Math.floor(Date.now()/1e3);return`${e},${r},${i}`})));n&&(_.current={..._.current,[r.flag_key]:n},h(JSON.stringify(Object.values(_.current)))),g(r),(0,c.trackAmplitudeExposure)({exposure:r,userId:S.current,deviceId:k.current})},[g,h]),v);return(0,i.useEffect)(()=>{(async()=>{if(!C)return;let e=x.anonId;if(!e&&!x.userID){m&&console.debug("[Experiment] No user identifier available"),w(!0);return}let t={device_id:e,...x.userID?{user_id:x.userID}:{},user_properties:{}};m&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await C.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{w(!0)}})()},[C,x.anonId,x.userID]),(0,i.useEffect)(()=>{A.current.clear(),(0,c.resetTrackedExposures)(),(0,d.resetExposures)(),_.current={},h(null),E(e=>e+1)},[x.userID,h]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t,strategy:"afterInteractive",onLoad:()=>{y(!0),m&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(f.Provider,{value:{client:C,variant:(e,t)=>{if(!C)return t;let r=C.variant(e,t);return m&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!C)return Promise.resolve();if(!e){let e=x.anonId;if(e||x.userID){let t={device_id:e,...x.userID?{user_id:x.userID}:{},user_properties:{}};return C.fetch(t)}}return C.fetch(e)},isFetchComplete:b},children:e})]})},h=()=>{let e=(0,i.useContext)(f);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},x=g},647292,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["webViewPlatformAtom",0,t])},456215,e=>{"use strict";e.s(["isSnowCastWebView",0,function(e){return"snowcast"===e||e.startsWith("snowcast-")},"isWebViewIos",0,function(e){return"ios"===e||e.endsWith("-ios")}])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},436028,e=>{"use strict";e.s(["hasLength",0,e=>Array.isArray(e)&&e.length>0])},458001,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["cscCountryCodeAtom",0,t])},849177,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["adsDisabledAtom",0,t])},21121,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["showVelvetcakeModuleAtom",0,t])},235577,e=>{"use strict";var t=e.i(699173),r=e.i(523084),i=e.i(47524),n=e.i(632137),a=e.i(877957);e.s(["ScrollButton",0,function({direction:e,onClick:s,hidden:o,size:l="default",variant:u="light",className:c}){let d="sm"===l,p=(0,n.cn)("text-current",d?"size-4":"size-6 transition-[width,height] duration-150 group-hover:size-7 group-active:size-6 group-active:duration-100");return(0,t.jsx)(a.Button,{type:"button",onClick:s,"aria-hidden":"true",tabIndex:-1,className:(0,n.cn)("group z-sticky absolute top-1/2 flex -translate-y-1/2 cursor-pointer items-center justify-center rounded-full p-0 transition-all duration-150 ease-in-out active:duration-100","dark"===u?"bg-[#252422] text-white hover:bg-[#3a3937] active:bg-[#1a1918]":"solid"===u?"bg-black/80 text-white hover:bg-black/90 active:bg-black":"white"===u?"bg-white/80 text-gray-900 backdrop-blur-[2px] hover:bg-white/95 active:bg-white":"bg-transparent text-gray-900 hover:bg-gray-100 active:bg-gray-200",d?"size-8":"size-12","left"===e&&"left-1","right"===e&&"right-1",o&&"left"===e&&"-translate-x-[calc(100%+1.5rem)]",o&&"right"===e&&"translate-x-[calc(100%+1.5rem)]",o&&"pointer-events-none opacity-0",c),children:"left"===e?(0,t.jsx)(r.ChevronLeft,{className:p}):(0,t.jsx)(i.ChevronRight,{className:p})})}])},315730,e=>{"use strict";var t=e.i(147732),r=e.i(592121);e.s(["useHorizontalScroll",0,function({enabled:e=!0,scrollAmount:i=200,contentKey:n}={}){let a=(0,r.useRef)(null),s=(0,r.useRef)(null),o=(0,r.useRef)(!1),[l,u]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),p=(0,r.useCallback)(()=>{let t=a.current;if(!t||!e){u(!1),d(!1);return}let{scrollLeft:r,scrollWidth:i,clientWidth:n}=t,s=Math.abs(r),l=s>2,c=s+n(0,t.debounce)(p,150),[p]),f=(0,r.useCallback)(()=>{null===s.current&&(s.current=requestAnimationFrame(()=>{p(),s.current=null}))},[p]);(0,r.useEffect)(()=>{let t=a.current;return t&&(o.current="rtl"===getComputedStyle(t).direction),p(),e&&(t?.addEventListener("scroll",f),window.addEventListener("resize",m)),()=>{null!==s.current&&cancelAnimationFrame(s.current),s.current=null,t?.removeEventListener("scroll",f),m.cancel(),window.removeEventListener("resize",m)}},[e,p,f,m,n]);let g=(0,r.useCallback)(()=>a.current?.scrollBy({left:-i,behavior:"smooth"}),[i]),h=(0,r.useCallback)(()=>a.current?.scrollBy({left:i,behavior:"smooth"}),[i]);return{ref:a,showLeft:l,showRight:c,scrollLeft:g,scrollRight:h}}])},457492,e=>{"use strict";var t=e.i(699173),r=e.i(592121),i=e.i(632137),n=e.i(546446),a=e.i(663333),s=e.i(235577),o=e.i(315730),l=e.i(240058);let u=(0,i.cn)("h-full rounded-3xl px-4 text-sm whitespace-nowrap transition-colors text-gray-900 font-bold","inline-flex items-center hover:bg-gray-100 active:bg-gray-200 focus-visible:outline-none focus-visible:bg-gray-100"),c=e=>{let{activeIndex:r,index:n,link:a}=e,s=r===n,o=(0,i.cn)(u,{"bg-gray-100 text-blue-500":s});if(e.onSelect){let{onSelect:r}=e;return(0,t.jsx)("button",{type:"button",onClick:()=>r(n,a),className:(0,i.cn)("cursor-pointer",o),"aria-current":s?"page":void 0,children:a.label})}let{basePath:c,mpa:d}=e,p=a.href??("/"===a.slug?c||"/":`${c}/${a.slug}`);return(0,t.jsx)(l.default,{href:p,mpa:d,className:o,"aria-current":s?"page":void 0,sourceModule:"subnavigation",children:a.label})},d=(0,r.memo)(e=>{let{links:r,activeIndex:l,className:u,constrained:d=!0}=e,p=(0,n.useAtomValue)(a.deviceClassAtom),{ref:m,showLeft:f,showRight:g,scrollLeft:h,scrollRight:x}=(0,o.useHorizontalScroll)({enabled:"mobile"!==p&&"tablet"!==p,scrollAmount:200,contentKey:r});return(0,t.jsxs)("div",{className:(0,i.cn)("relative overflow-hidden rounded-3xl bg-white p-1 shadow-[0_4px_16px_0_rgba(0,0,0,0.08),_0_0_32px_0_rgba(0,0,0,0.12)]","md:rounded-4xl md:rounded-[28px]",d&&"md:mr-auto md:max-w-[min(958px,100%)]",u),"data-testid":"subnavigation",children:[(0,t.jsx)("div",{className:(0,i.cn)("pointer-events-none absolute top-0 -left-25 h-full w-24 bg-gradient-to-r from-white from-0% via-white via-60% to-transparent transition-[left] md:-top-1 md:h-14 md:rounded-s-[28px]",{"-left-1":f}),"aria-hidden":"true"}),(0,t.jsx)(s.ScrollButton,{hidden:!f,onClick:h,direction:"left"}),(0,t.jsx)("div",{ref:m,className:(0,i.cn)("scrollbar-hide flex h-10 items-center gap-1 overflow-x-auto md:h-12"),children:r.map((r,i)=>e.onSelect?(0,t.jsx)(c,{link:r,index:i,activeIndex:l,onSelect:e.onSelect},`${r.label}_${r.slug}`):(0,t.jsx)(c,{link:r,index:i,activeIndex:l,basePath:e.basePath,mpa:e.mpa},`${r.label}_${r.slug}`))}),(0,t.jsx)("div",{className:(0,i.cn)("pointer-events-none absolute top-0 -right-25 h-full w-24 bg-gradient-to-l from-white from-0% via-white via-60% to-transparent transition-[right] md:-top-1 md:h-14 md:rounded-e-[28px]",{"-right-1":g}),"aria-hidden":"true"}),(0,t.jsx)(s.ScrollButton,{hidden:!g,onClick:x,direction:"right"})]})},(e,t)=>e.activeIndex===t.activeIndex&&e.basePath===t.basePath&&e.mpa===t.mpa&&e.onSelect===t.onSelect&&e.constrained===t.constrained&&e.links.length===t.links.length&&e.links.every((e,r)=>e.label===t.links[r]?.label&&e.slug===t.links[r]?.slug&&e.href===t.links[r]?.href));d.displayName="SubnavigationUI",e.s(["SubnavigationUI",0,d],457492)}]);