(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,806262,e=>{"use strict";e.i(247865);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,s){var i;let n,a=(0,t.useStore)(s),o=(i=a,(n=r.get(i))||(n=new WeakSet,r.set(i,n)),n);for(let[t,...r]of e)(!o.has(t)||(null==s?void 0:s.dangerouslyForceHydrate))&&(o.add(t),a.set(t,...r))}])},284007,e=>{"use strict";var t=e.i(981030);let r=Symbol(""),s=e=>"function"==typeof(null==e?void 0:e.then);function i(e=()=>{try{return window.localStorage}catch(e){return}},t){var r;let n,a,o,u,c={getItem:(r,i)=>{var o,u;let c=e=>{if(n!==(e=e||"")){try{a=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return i}n=e}return a},l=null!=(u=null==(o=e())?void 0:o.getItem(r))?u:null;return s(l)?l.then(c):c(l)},setItem:(r,s)=>{var i;return null==(i=e())?void 0:i.setItem(r,JSON.stringify(s,null==t?void 0:t.replacer))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};try{o=null==(r=e())?void 0:r.subscribe}catch(e){}return!o&&"u">typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(o=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};let s=s=>{s.storageArea===e()&&s.key===t&&r(s.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}}),o&&(u=o,c.subscribe=(e,t,r)=>u(e,e=>{let s;try{s=JSON.parse(e||"")}catch(e){s=r}t(s)})),c}let n=i(),a=new WeakMap,o={state:"loading"};e.s(["RESET",0,r,"atomWithStorage",0,function(e,i,a=n,o){let u=null==o?void 0:o.getOnInit,c=(0,t.atom)(u?a.getItem(e,i):i);return c.onMount=t=>{let r;return t(a.getItem(e,i)),a.subscribe&&(r=a.subscribe(e,t,i)),r},(0,t.atom)(e=>e(c),(t,n,o)=>{let u="function"==typeof o?o(t(c)):o;return u===r?(n(c,i),a.removeItem(e)):s(u)?u.then(t=>(n(c,t),a.setItem(e,t))):(n(c,u),a.setItem(e,u))})},"createJSONStorage",0,i,"loadable",0,function(e){let r;return r=()=>{let r=new WeakMap,s=(0,t.atom)([()=>{},0]);s.unstable_onInit=e=>{e.set(s,([,t])=>[()=>e.set(s,([e,t])=>[e,t+1]),t])};let i=(0,t.atom)(t=>{let i,n,[a]=t(s);try{i=t(e)}catch(e){return{state:"hasError",error:e}}if("function"!=typeof(null==(n=i)?void 0:n.then))return{state:"hasData",data:i};let u=i,c=r.get(u);return c?c:(u.then(e=>{r.set(u,{state:"hasData",data:e}),a()},e=>{r.set(u,{state:"hasError",error:e}),a()}),r.get(u)||(r.set(u,o),o))});return(0,t.atom)(e=>e(i))},(a.has(e)?a:a.set(e,r())).get(e)}])},949920,e=>{"use strict";var t=e.i(381477);let r=(0,e.i(66396).withMiddleware)(t.default,e=>(t,r,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,e(t,r,s)));e.s(["default",0,r])},990033,e=>{"use strict";let t,r="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),s=new Uint8Array(16),i=[];for(let e=0;e= 16");if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,n){if((u=u||0)n.length)throw RangeError(`UUID byte range ${u}:${u+15} is out of buffer bounds`);for(let e=0;e{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},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),s=(0,t.atom)(null);e.s(["activeEventAtom",0,s,"layoutStateAtom",0,r])},236433,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["pageAtomsPathnameAtom",0,t])},537989,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["pageIdAtom",0,t])},608201,236593,e=>{"use strict";var t=e.i(284007);let r={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function s(){try{return window.sessionStorage}catch{return r}}let i=(0,t.createJSONStorage)(s),n=(0,t.atomWithStorage)("wx-source-page",null,i,{getOnInit:!0});e.s(["sourcePageAtom",0,n],608201);let a=(0,t.createJSONStorage)(s),o=(0,t.atomWithStorage)("wx-source-module",null,a,{getOnInit:!0});e.s(["sourceModuleAtom",0,o],236593)},736677,220126,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),s=(0,t.atomWithStorage)("wx-ht-source-page",null,r);e.s(["sourcePageAtom",0,s],736677);let i=(0,t.createJSONStorage)(()=>sessionStorage),n=(0,t.atomWithStorage)("wx-ht-source-module",null,i);e.s(["sourceModuleAtom",0,n],220126)},947118,e=>{"use strict";var t=e.i(247865);let r=e=>(window.mParticle?.ready?.(e),()=>{}),s=()=>!!window.mParticle?.isInitialized?.(),i=()=>!1;e.s(["useIsInitialized",0,()=>(0,t.useSyncExternalStore)(r,s,i)])},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])},678651,(e,t,r)=>{"use strict";function s(e){let t=new URLSearchParams;for(let[r,s]of Object.entries(e))void 0!==s&&t.append(r,s);return t}Object.defineProperty(r,"__esModule",{value:!0}),r.queryStringToSearchParams=s,r.urlFrom=function({host:e,...t}){if(!e)throw Error("Host is missing");let r=new URL(`https://${e}`);return Object.assign(r,{...t,hostname:e}),t.query&&(r.search=s(t.query).toString()),r}},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},132084,e=>{"use strict";var t,r=((t={}).APPLE="apple_widget",t.SAMSUNG="samsung_widget",t.OPPO="oppo_widget",t.TRANSSION="transsion",t.ONEPLUS="oneplus",t.TIKTOK="tiktok_search",t);Object.values(r),e.s(["Partner",()=>r,"SAMSUNG_VIETNAM_PARTNER",0,"samsungVietnam","partnersByPattern",0,{weatherapptodaywidget:"apple_widget",apple_:"apple_widget",samsung:"samsung_widget",oppo_:"oppo_widget","oppo-":"oppo_widget",transsion:"transsion",oneplus:"oneplus",tiktok_:"tiktok_search"}])},763886,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["partnerAtom",0,t])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},752496,e=>{"use strict";var t=e.i(247865),r=e.i(609858);let s=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:i,page:n,onUpdateData:a,onSetPageData:o}){let{updateComponentData:u,setPageData:c}=(0,r.useDebugSystem)(),l=(0,t.useRef)(!1),m=a||u,d=o||c;return(0,t.useEffect)(()=>{if(i)return s.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(i),hasPerformance:!!i.performance,hasContext:!!i.context}),m(e,{...i,_collectedAt:new Date().toISOString()}),()=>{s.lifecycle(`Cleaning up data for ${e}`),m(e,null)}},[e,i,m]),(0,t.useEffect)(()=>{n&&!l.current&&(s.lifecycle("Setting page metadata",{title:n.title,assetName:n.assetName,collection:n.collection}),d({...n,_updatedAt:new Date().toISOString()}),l.current=!0)},[n,d]),null}])},609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(247865);let s=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,s],674339),e.s(["useDebugSystem",0,function(){let[e,i]=(0,t.useAtom)(s),n=(0,r.useCallback)((e,t)=>{i(r=>{let s=r?.[e]||{},i="object"==typeof t&&null!==t&&"object"==typeof s?{...s,...t}:t;return{...r,[e]:i}})},[i]),a=(0,r.useCallback)((e,t)=>{i(r=>{let s=r||{timestamp:new Date().toISOString()},i=s.components||{};if(null===t){let t={...i};return delete t[e],{...s,components:t}}return{...s,components:{...i,[e]:t}}})},[i]),o=(0,r.useCallback)(e=>{n("page",e)},[n]),u=(0,r.useCallback)(e=>{n("route",e)},[n]),c=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&n(e,t)})},[n]);return{debugData:e,updateSection:n,updateComponentData:a,setPageData:o,clearAllDebugData:(0,r.useCallback)(()=>{i({timestamp:new Date().toISOString()})},[i]),updateRouteInfo:u,updatePageDebug:c}}],609858)},394481,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["privacyRegimeAtom",0,t])},725296,e=>{"use strict";var t,r=e.i(965586),s=((t={}).CA="ca",t.CA_QC="ca-qc",t.EXEMPT="exempt",t.GDPR="gdpr",t.JP="jp",t.KR="kr",t.LATAM_CO="latam-co",t.LATAM_DO="latam-do",t.LATAM_PE="latam-pe",t.LGPD="lgpd",t.PIPL="pipl",t.TR_KVKK="tr-kvkk",t.USA="usa",t.USA_CCPA="usa-ccpa",t.USA_CO="usa-co",t.USA_CT="usa-ct",t.USA_VA="usa-va",t);Object.values(s);let i={"usa-ut":"usa"},n=e=>e?i[e]??e:void 0;e.s(["RESTRICTIVE_REGIMES",0,["ca-qc","gdpr","latam-co","latam-do","latam-pe","lgpd","pipl","tr-kvkk"],"Regime",()=>s,"US_REGIMES",0,["usa","usa-ccpa","usa-co","usa-ct","usa-va"],"default",0,s,"getRegime",0,()=>(()=>{let e=(0,r.getCookie)("ci")?.toString();if(e)for(let t of e.split("&")){let e=t.indexOf("=");if(e>-1&&"TWC-Privacy"===t.slice(0,e))return n(t.slice(e+1))}})()??n((0,r.getCookie)("twc-privacy")?.toString())??"exempt"])},617874,e=>{"use strict";let t="Imperial",r="Metric",s="Hybrid",i={code:"e",name:t,temp:"F",speed:"mph",distance:"mi",accumulation:"in",precip:"in",pressure:"in"},n={code:"m",name:r,temp:"C",speed:"km/h",distance:"km",accumulation:"cm",precip:"mm",pressure:"mb"},a={code:"h",name:s,temp:"C",speed:"mph",distance:"mi",accumulation:"in",precip:"in",pressure:"mb"};e.s(["UNITS_COOKIE_KEY",0,"unitOfMeasurement","UNIT_HYBRID",0,s,"UNIT_IMPERIAL",0,t,"UNIT_METRIC",0,r,"imperial",0,i,"unitsSystemByCode",0,function(e){switch(e?.toLowerCase()){case"e":case"f":return i;case"m":case"c":return n;case"h":return a;default:return null}},"unitsSystemByName",0,function(e=""){switch(e.toLowerCase()){case"imperial":case"Imperial":return i;case"metric":case"Metric":return n;case"hybrid":case"Hybrid":return a;default:return null}}])},45846,e=>{"use strict";e.i(288906);let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},378869,e=>{"use strict";let t=(0,e.i(284007).atomWithStorage)("wxu-web/keyval:emailSubscriptions",null,void 0,{getOnInit:!0});e.s(["emailPreferencesAtom",0,t])},889753,301904,e=>{"use strict";var t=e.i(284007),r=e.i(617874),s=e.i(990033),i=e.i(981030),n=e.i(543512);let a={animationSpeed:1,autoplay:!0,opacity:90,roadOverlay:"default",style:"default"};e.s(["DEFAULT_MAP_SETTINGS",0,a],301904);let o=(0,i.atom)(n.UserSubscriptionTiers.none),u=(0,t.atomWithStorage)("userProfile",null,void 0,{getOnInit:!0}),c=(0,t.atomWithStorage)("userPreferences",{userID:(0,s.v4)(),unit:r.UNIT_IMPERIAL,locations:[],locale:"en_US",mapSettings:a,favoriteWeatherComponents:[],favoriteActivityComponents:[],dashboard:[]},void 0,{getOnInit:!0});e.s(["userPreferencesAtom",0,c,"userProfileAtom",0,u,"userTierAtom",0,o],889753)},739971,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["subscriptionsEnabledAtom",0,t])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),s=e.i(301904),i=e.i(901351),n=e.i(310847),a=e.i(528600),o=e.i(617874),u=e.i(540768),c=e.i(553329),l=e.i(247865),m=e.i(245943);let d=(0,e.i(695881).createLogger)("useMapSettings");e.s(["WEB_MAP_SETTINGS_PLATFORM",0,"twc","useMapSettings",0,function(e="twc"){let{user:{isUserLoggedIn:t}}=(0,a.useUser)();return{saveMapSettings:(0,l.useCallback)(async r=>{if(!t)return!1;let{error:s}=await (0,c.tryCatch)(i.upsxClient.preference.updateMapSettings(e,r));if(!s)return!0;if(s instanceof m.APIError&&404===s.code){let{error:t}=await (0,c.tryCatch)(i.upsxClient.preference.createMapSettings(e,r));return!t||(d.warn("Failed to create map settings",t),!1)}return d.warn("Failed to update map settings",s),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,a.useUser)(),[l,m]=(0,t.useAtom)(r.userPreferencesAtom),[d,p]=(0,t.useAtom)(n.wxuUserPreferenceAtom),g=async()=>{let{data:e,error:t}=await (0,c.tryCatch)(i.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:s,opacity:n,roadOverlay:a,style:o}=e,u={...void 0!==r&&{animationSpeed:r},...void 0!==s&&{autoplay:s},...void 0!==n&&{opacity:n},...void 0!==a&&{roadOverlay:a},...void 0!==o&&{style:o}};return Object.keys(u).length>0?u:null},f=async e=>{try{await i.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},S=async(t,r=!0)=>{try{let s,i=(s={...l,...t},m(s),p({...d,...t,locations:s.locations}),s);if(t?.unit){let e=(0,o.unitsSystemByName)(t.unit),r=e?.code||"e";(0,u.setCookie)(o.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await f(i),{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([i.upsxClient.preference.getPreference(),g()]);if(!e?.userID)return null;let{mapSettings:r,...n}=e,a={...n,mapSettings:{...s.DEFAULT_MAP_SETTINGS,...t}};return S(a,!1),a}catch{return null}},updatePreferences:S}}],776169)},528600,e=>{"use strict";let t;var r=e.i(247865),s=e.i(546446),i=e.i(949920),n=e.i(889753),a=e.i(901351),o=e.i(310847),u=e.i(543512),c=e.i(990033),l=e.i(333350),m=e.i(495110),d=e.i(513513),p=e.i(960576);e.s(["useUser",0,function(){let[e,g]=(0,s.useAtom)(n.userProfileAtom),[f,S]=(0,s.useAtom)(o.wxuUserAnonymousIdAtom),[y,h]=(0,s.useAtom)(o.wxuUserAccountUserAccountResponseAtom),[w,A]=(0,r.useState)(!1),I=(0,s.useSetAtom)(o.wxuLoginRedirectPageAtom),v=(0,m.useIsHydratingRender)();l.default&&!w&&(I(window.location.href),A(!0));let b=(0,s.useAtomValue)(n.userTierAtom),U=(0,d.isUserLoggedIn)(b),P=f;!P&&l.default&&(t||(t=(0,p.readEarlyAnonId)()??(0,c.v4)()),P=t),l.default&&!f&&P&&S(P),!e&&y&&g(y);let _=(0,i.default)(U?"upsx/id":null,()=>a.upsxClient.account.getAccountId(),{shouldRetryOnError:e=>"APIError"!==e.name}),{userID:C=""}=_?.data||{},E=C&&e?.userID!==C,T=(0,i.default)(E?"upsx/account":null,()=>a.upsxClient.account.getAccount(),{shouldRetryOnError:e=>"APIError"!==e.name,onSuccess:e=>{g(e),h(e)}});return{user:{anonId:P,userID:C,isUserLoggedIn:U,subscriptionTier:b,isUserPremium:(0,d.isUserTierPremium)(b),isUserAdFree:b===u.UserSubscriptionTiers.adFree},userProfile:v?null:e,isUserIdLoading:_.isLoading,profileError:T.error}}])},543512,e=>{"use strict";var t,r=((t={})[t.none=-1]="none",t[t.standard=0]="standard",t[t.premium=1]="premium",t[t.adFree=2]="adFree",t[t.premiumWithAd=3]="premiumWithAd",t);let s=Object.entries(r).reduce((e,[t,r])=>(e[r]=t,e),{});Object.entries(r).reduce((e,[t,r])=>(e[r.toString()]=r,e),{}),e.s(["UserSubscriptionPremiumTiers",0,[1,2,3],"UserSubscriptionTierKeysMap",0,s,"UserSubscriptionTiers",()=>r,"UserSubscriptionTiersMap",0,{standard:0,tier0:1,tier1:1,"ad-free-v2":2,tier3:3}])},960576,e=>{"use strict";let t="wxu-exp-anon-id";e.s(["clearEarlyAnonId",0,function(){try{window.localStorage.removeItem(t)}catch{}},"readEarlyAnonId",0,function(){let e=window.__wxExperimentDeviceId;if("string"==typeof e&&e)return e;try{return window.localStorage.getItem(t)||void 0}catch{return}}])},513513,e=>{"use strict";var t=e.i(543512);t.UserSubscriptionTiers.none,t.UserSubscriptionTiers.standard,t.UserSubscriptionTiers.adFree,t.UserSubscriptionTiers.premium,t.UserSubscriptionTiers.premiumWithAd,e.s(["hasRadarFeature",0,function(e){return void 0!==e&&t.UserSubscriptionPremiumTiers.includes(e)},"isUserLoggedIn",0,function(e){return void 0!==e&&e>t.UserSubscriptionTiers.none},"isUserTierPremium",0,function(e){return t.UserSubscriptionPremiumTiers.includes(e)}],513513)},892504,e=>{"use strict";let t="upsx-purchase-checked-at";e.s(["clearPurchaseChecked",0,()=>{try{localStorage.removeItem(t)}catch{}},"markPurchaseChecked",0,()=>{try{localStorage.setItem(t,String(Date.now()))}catch{}},"purchaseCheckedRecently",0,()=>{try{let e=localStorage.getItem(t);if(!e)return!1;let r=Number(e);if(!Number.isFinite(r))return!1;return Date.now()-r{"use strict";e.i(288906);let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},991511,e=>{"use strict";var t=e.i(247865),r=e.i(806262),s=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let i=(0,s.useStore)(),n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{for(let[e,t]of n.current)i.get(e)!==t&&i.set(e,t)})}])},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])}]);