(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,499746,e=>{"use strict";var t=e.i(458201),o=e.i(538167),r=e.i(282446),a=e.i(145651),i=e.i(249725),n=e.i(292980),l=e.i(663333);e.i(101346);var s=e.i(512134),c=e.i(64412),d=e.i(147732),u=e.i(794120),m=e.i(240058),f=e.i(316078),g=e.i(180193),h=e.i(368847),p=e.i(889951),w=e.i(726249),x=e.i(674885),v=e.i(617874),b=e.i(935251),I=e.i(325974),y=e.i(525936);let k=({isLoading:e,displayName:o,temperature:r,wxPhrase:a,iconCode:i})=>(0,t.jsxs)("div",{className:"default-hover-box-shadow box-border w-fit max-w-90 cursor-pointer rounded-2xl border border-[#0000001a] transition-[box-shadow,border] hover:border-transparent","aria-label":o?`${o} weather`:"Location weather",children:[(0,t.jsxs)("div",{className:"flex h-16 flex-col justify-center px-3 md:hidden",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-5 w-28",className:"flex items-center leading-[1.4] font-bold",children:(0,t.jsx)("span",{className:"min-w-0 truncate",children:o})}),(0,t.jsx)(f.WxIcon,{isLoading:e,loadingIconClassName:"h-6 w-6 shrink-0",iconCode:i,className:"h-6 w-6 shrink-0","aria-hidden":"true",iconTheme:"lightBG"})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-4 w-6 shrink-0",className:"shrink-0 text-sm leading-normal",color:"secondary",children:(0,t.jsx)(g.f,{value:r})})," ",(e||a)&&(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-4 w-22",color:"secondary",className:"truncate text-sm leading-normal",children:a})]})]}),(0,t.jsxs)("div",{className:"hidden h-20 items-center px-3 pl-4 md:flex",children:[(0,t.jsxs)("div",{className:"mr-2 flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-5 w-28",className:"flex items-center text-xl leading-normal font-bold",children:(0,t.jsx)("span",{className:"min-w-0 truncate",children:o})}),(e||a)&&(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-4 w-24",color:"secondary",className:"truncate text-sm leading-normal",children:a})]}),(0,t.jsx)(f.WxIcon,{isLoading:e,loadingIconClassName:"mr-1 h-12 w-12 shrink-0",iconCode:i,className:"mr-1 h-12 w-12 shrink-0","aria-hidden":"true",iconTheme:"lightBG"}),(0,t.jsx)(h.U,{isLoading:e,skeletonClassName:"h-8 w-12 shrink-0",className:"shrink-0 text-[40px] leading-none font-extrabold",children:(0,t.jsx)(g.f,{value:r})})]})]}),j=()=>(0,t.jsx)(k,{isLoading:!0,iconCode:-1}),C=(0,o.memo)(({identifier:e})=>{let a=(0,b.useParams)(),n=a?.locale||"en-US",l=(0,r.y)(x.N),s=(0,v.H)(l)?.code,c=(0,i.d)(),d=e.placeId?void 0:e.geocode,f=function(e,t){let{location:o,isLoading:r}=(0,I.f)(e,t);return{location:o,isLoading:r}}(!e.location&&(e.featureId||e.placeId||e.geocode)?{featureId:e.featureId,placeId:e.placeId,geocode:e.geocode?(0,w.formatGeocode)(e.geocode):void 0}:null,{sourceGeocode:d}),g=e.location??f.location,h=!e.location&&f.isLoading;(0,o.useEffect)(()=>{g?.placeId&&c({placeId:g.placeId,geocode:g.geocode},g.featureId??null)},[g,c]);let{data:j,isLoading:C}=(0,u.U)(g&&["currentObservations",g.geocode,s,n],([e,t,o,r])=>(0,p.getCurrentObservations)({geocode:t,units:o,language:r}),{revalidateOnFocus:!1,dedupingInterval:6e4}),N=g?.placeId??e.placeId,{path:E,isGeolocationLoading:S}=(0,y.f)(N||"",{targetGeocode:g?.geocode??e.geocode,featureId:e.featureId??g?.featureId,canonicalID:g?.canonicalID}),_=h||C||!g||S,L=j?.temperature,T=j?.wxPhraseLong,A=j?.iconCode??-1,P=e.name||g?.name||g?.city||g?.displayName,G=(0,t.jsx)(k,{isLoading:_,displayName:P,temperature:L,wxPhrase:T,iconCode:A});return E?(0,t.jsx)(m.default,{href:E,className:"no-underline md:block md:w-full",children:G}):G},(e,t)=>{let o,r;return o=e.identifier,r=t.identifier,o.geocode===r.geocode&&o.placeId===r.placeId&&o.featureId===r.featureId&&o.name===r.name&&o.location===r.location});var N=e.i(523084),E=e.i(47524),S=e.i(632137);let _={left:N.f,right:E.f},L=({buttonClassName:e,containerClassName:r,onClick:a,tabIndex:i,direction:n,...l})=>{let[s,c]=(0,o.useState)(!1),d=_[n];return(0,t.jsx)("div",{className:(0,S.f)("absolute",r),children:(0,t.jsx)("button",{className:(0,S.f)("group/scroll-button absolute flex h-11 w-11 transform-[translate(-50%,-50%)] cursor-pointer items-center justify-center rounded-full bg-black opacity-80 transition-[opacity,height,width] duration-75 ease-linear hover:h-12 hover:w-12 hover:opacity-100",s&&"!h-11 !w-11"),onClick:()=>{c(!0),setTimeout(()=>c(!1),75),a?.()},tabIndex:i,...l,children:(0,t.jsx)(d,{className:(0,S.f)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",s&&"!h-6 !w-6")})})})},T="relative -mt-2 -mb-4 overflow-hidden",A="scrollbar-hide flex gap-2 overflow-x-auto p-4 py-6",P=()=>(0,t.jsx)("div",{className:T,"data-testid":"forecast-module-placeholder","aria-hidden":"true",children:(0,t.jsx)("div",{className:A,children:(0,t.jsx)(j,{})})}),G=({locationIdentifiers:e,showScrollButtons:r})=>{let[a,i]=(0,o.useState)(!1),[n,l]=(0,o.useState)(!1),s=(0,o.useRef)(null),c=(0,o.useRef)(null),u=(0,o.useRef)(!1),m=(0,o.useCallback)(()=>{let e=s.current;if(!e||!r){i(!1),l(!1);return}let{scrollLeft:t,offsetWidth:o,scrollWidth:a}=e,n=Math.abs(t),c=n>0,d=n+o(0,d.f)(m,150),[m]);(0,o.useEffect)(()=>{let e=s.current;return e&&(u.current="rtl"===getComputedStyle(e).direction),m(),window.addEventListener("resize",f),()=>{null!==c.current&&cancelAnimationFrame(c.current),f.cancel(),window.removeEventListener("resize",f)}},[m,f]);let g=(0,o.useCallback)(()=>{null===c.current&&(c.current=requestAnimationFrame(()=>{m(),c.current=null}))},[m]),h=(0,o.useCallback)(()=>{s.current?.scrollBy({left:-200,behavior:"smooth"})},[]),p=(0,o.useCallback)(()=>{s.current?.scrollBy({left:200,behavior:"smooth"})},[]);return 0===e.length?null:(0,t.jsxs)("div",{className:T,children:[r&&(0,t.jsx)(L,{containerClassName:(0,S.f)("absolute top-[50%] left-9.5 transition-transform md:left-11",{"-translate-x-24 md:-translate-x-24.5":!a}),onClick:h,tabIndex:a?0:-1,"aria-hidden":!a,"aria-label":"Scroll left",direction:"left"}),(0,t.jsx)("div",{className:A,role:"list","data-testid":"forecast-module",onScroll:g,ref:s,children:e.map((e,o)=>(0,t.jsx)("div",{role:"listitem",children:(0,t.jsx)(C,{identifier:e})},e.placeId??e.geocode??o))}),r&&(0,t.jsx)(L,{containerClassName:(0,S.f)("absolute top-[50%] right-9.5 transition-transform md:right-11",{"translate-x-24 md:translate-x-24.5":!n}),onClick:p,tabIndex:n?0:-1,"aria-hidden":!n,"aria-label":"Scroll right",direction:"right"})]})};e.s(["default",0,()=>{let{favoriteLocations:e,recentLocations:d}=(0,a.f)(),{resolveFeatureId:u}=(0,i.S)(),{resolveDetails:m}=(0,n.f)(),f=(0,r.y)(l.f),g=(0,s.f)(),{location:h,isLoading:p}=(0,c.f)(),x=(0,o.useMemo)(()=>(function({favoriteLocations:e,recentLocations:t,resolveFeatureId:o,resolveDetails:r=()=>void 0}){let a=[],i=new Set,n=e=>{let t=[];if(e.featureId?t.push(`f:${e.featureId}`):(e.placeId&&t.push(`p:${e.placeId}`),e.geocode&&t.push(`g:${(0,w.formatGeocode)(e.geocode)}`)),0===t.length)return!0;let o=t.some(e=>i.has(e));for(let e of t)i.add(e);return!o};for(let t of e){if(a.length>=5)break;if(!t.coordinate)continue;let e=(0,w.formatGeocode)(t.coordinate),i=t.placeID??void 0,l=(i?r(i)?.featureId:void 0)??o({placeId:i,geocode:e});n({featureId:l,placeId:i,geocode:e})&&a.push({geocode:e,placeId:i,name:t.name??void 0,featureId:l})}for(let e of t){if(a.length>=5)break;let t=r(e),i=t?.featureId??o({placeId:e});n({featureId:i,placeId:e})&&a.push({placeId:e,name:t?.name,featureId:i})}return a})({favoriteLocations:e,recentLocations:d,resolveFeatureId:u,resolveDetails:m}),[e,d,u,m]),v=(0,o.useMemo)(()=>h?.placeId||h?.featureId?[{placeId:h.placeId||void 0,featureId:h.featureId,location:h}]:[],[h]);if(!g)return(0,t.jsx)(P,{});let b=x.length>0?x:v;return b.length>0?(0,t.jsx)(G,{locationIdentifiers:b,showScrollButtons:"mobile"!==f&&"tablet"!==f}):p?(0,t.jsx)(P,{}):null}],499746)},45089,e=>{"use strict";var t=e.i(458201),o=e.i(538167),r=e.i(645968),a=e.i(742436),i=e.i(42318),n=e.i(553329),l=e.i(901351),s=e.i(317298),c=e.i(528600);async function d(e,t){let{data:o,error:r}=await (0,n.f)(e?l.f.segmentation.getUserMetrics():l.f.segmentation.getAnonymousEndpointMetrics(t));if(r)return null;let a={promotesRadar:(0,s.I)(o?.metrics)};return(0,s.d)(a),a}let u="home-radar-next-session-intent",m="data-home-radar",f={layout:"default",variant:null,eligible:!1};function g(e){document.documentElement.setAttribute(m,e)}function h(){document.documentElement.removeAttribute(m)}function p(){return!function(){let{user:e}=(0,c.f)(),t=e.isUserLoggedIn?"upsx/segmentation/metrics/user":e.anonId?"upsx/segmentation/metrics/endpoint":null,{data:o}=(0,i.f)(t,()=>d(e.isUserLoggedIn,e.anonId),{shouldRetryOnError:!1})}(),null}function w(){return(0,r.f)(u),null}e.s(["HomeRadarResolver",0,function(){let e=(0,o.useContext)(a.ExperimentContext),r=e?.isFetchComplete??!1,[i,n]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1),[d,m]=(0,o.useState)(null);(0,o.useEffect)(()=>{let e=window.__wxHomeRadar??f;return g(e.layout),n(e.eligible),"pending"===e.layout?c(!0):e.forced||m(e.variant),h},[]);let x=(0,o.useCallback)(e=>{window.__wxHomeRadar={...e,eligible:!0},g(e.layout);try{localStorage.setItem("wxu-home-radar-layout",JSON.stringify(e))}catch{}c(!1),m(e.variant)},[]);return(0,o.useEffect)(()=>{if(!l)return;let e=setTimeout(()=>{x({layout:"default",variant:null})},2e3);return()=>clearTimeout(e)},[l,x]),(0,o.useEffect)(()=>{var t,o,a;if(!l||!e||!r)return;let{key:i,value:n}=e.variant(u),c="control"===(o=t=i||n)||"v1"===o||"v2"===o?t:null;x({layout:c?(a=(0,s.o)()?.promotesRadar??!1,"v2"===c||"v1"===c&&a?"promoted":"default"):"default",variant:c})},[l,e,r,x]),(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)(p,{}),d&&(0,t.jsx)(w,{})]})}],45089)},145473,e=>{"use strict";var t=e.i(458201),o=e.i(538167),r=e.i(526932),a=e.i(282446),i=e.i(789422),n=e.i(901351),l=e.i(422825),s=e.i(837879),c=e.i(725296),d=e.i(394481),u=e.i(576816),m=e.i(539353),f=e.i(553329),g=e.i(695881),h=e.i(143851),p=e.i(703123),w=e.i(61284);let x=(0,g.createLogger)("useGoogleLogin");var v=e.i(404893),b=e.i(367810),I=e.i(792461);e.s(["GoogleAuthScriptClient",0,function({onLoad:e,prompt:g=!0,isUserLoggedIn:y,redirectToCheckoutOnSignup:k,oneTapOnly:j=!1}){let C=(0,i.r)("GoogleLogin"),N=(0,a.F)(v.f),{loginWithGoogle:E,error:S,clearError:_}=function(e=!1){let t=(0,i.r)("GoogleLogin"),[r,g]=(0,o.useState)(null),v=(0,a.y)(p.f),{updateEmailSubscriptions:b}=(0,l.f)({skipStatus:!0}),{authSuccess:I,authRedirect:y}=(0,h.f)(),k=(0,s.f)(),j=(0,a.y)(d.f)??c.U.EXEMPT,C=k&&c.D.includes(j)&&j!==c.U.USA_CCPA,{newsletter:N,weekly:E}=v,S=C||v.onYourRadar,_=C||v.marketing,L=(0,u.f)({formVariant:"account page google",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),T=(0,m.f)({formVariant:"account page google",loginMethod:"Google",marketingOptedIn:!0===_}),A=(0,o.useCallback)(async t=>{let o=await n.f.auth.loginWithGoogle({google_id_token:t}),r=!!o.isFirstLogin;if(await I({email:o.email,userID:o.userID,type:r?"signup":"login"},!1,{skipSignupCompleteEvent:r}),!r)return y(),!0;let{error:a}=await (0,f.f)(L());return a&&x.warn("Failed to track signup-complete for Google signup",a),T(),await b({newsletter:N,weekly:E,onYourRadar:S,marketing:_}).catch(e=>{x.error("Failed to update email subscriptions",e)}),e&&k?y(w.f):y(),!0},[I,y,L,T,b,N,E,S,_,e,k]);return{loginWithGoogle:(0,o.useCallback)(async({credential:e})=>{g(null);let{data:o,error:r}=await (0,f.f)(A(e));if(o)return!0;x.error("Failed to login with Google",r);let{messageCode:a}=r?.data??{};switch(a){case 1e3:case 1026:case 1033:g({header:t("emailAlreadyUsedGoogleHeader"),body:t.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:g({header:t("emailAlreadyRegisteredGoogleHeader"),body:t("emailAlreadyRegisteredGoogleBody")});break;default:g({header:t("somethingWentWrong")})}return!1},[A,t]),error:r,clearError:(0,o.useCallback)(()=>g(null),[])}}(k),L=(0,I.f)(E),T=(0,o.useRef)(null);S&&(T.current=S);let A=T.current;return(0,t.jsxs)(t.Fragment,{children:[!(j&&y)&&(0,t.jsx)(r.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{L.current?.(e)}}),N(!0)),e?.(),!y&&g&&t?.prompt()},id:"google-gsi-script",strategy:j?"lazyOnload":"afterInteractive"}),A&&(0,t.jsx)(b.N,{open:!!S,onOpenChange:e=>!e&&_(),children:(0,t.jsx)(b.J,{showCloseButton:!1,title:A.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:A.body||""}}),primaryAction:{label:C("cancel"),onClick:_}})})]})}],145473)},240279,e=>{"use strict";var t=e.i(458201),o=e.i(538167),r=e.i(580547),a=e.i(282446),i=e.i(429745),n=e.i(498076),l=e.i(269153),s=e.i(677691),c=e.i(42318),d=e.i(553329),u=e.i(695881),m=e.i(901351),f=e.i(528600);let g=(0,u.createLogger)("useWebToAppIntent");var h=e.i(598513),p=e.i(7150),w=e.i(521231);let x="wx-next/web-to-app-install-modal:shown-at",v="web-to-app-install-modal",b="both",I=(0,u.createLogger)("WebToAppInstallModal");e.s(["WebToAppInstallModal",0,()=>{let e=(0,n.f)(),u=(0,l.f)(),y=(0,r.X)(),[k,j]=(0,o.useState)(!1),[C,N]=(0,o.useState)(void 0),E=(0,o.useRef)(!1),S=(0,o.useRef)(!1),_=(0,o.useRef)(null),{href:L}=(0,s.f)("web-to-app-install-modal","web-to-app-install-modal"),T=(0,h.f)(),A=(0,a.F)(p.f),P=e&&!u&&"en-US"===y;(0,o.useEffect)(()=>{N(!!P&&!function(){try{let e=localStorage.getItem(x);if(!e)return!1;return Date.now()-parseInt(e,10){var e;let o,r,{data:a,error:i}=await (0,d.f)(t.isUserLoggedIn?m.f.segmentation.getUserMetrics():m.f.segmentation.getAnonymousEndpointMetrics(t.anonId));return i?(g.warn("UPSx web-to-app lookup failed",{error:i}),!1):(e=a?.metrics,"number"==typeof(r="string"==typeof(o=e?.fpdprobwebtoapp)?Number(o):o)&&Number.isFinite(r)&&r>=.5)},{shouldRetryOnError:!1});return r}(!0===C);return((0,o.useEffect)(()=>{if(!C||!G||E.current)return;let e=setTimeout(()=>{E.current=!0;try{localStorage.setItem(x,Date.now().toString())}catch(e){I.warn("localStorage write failed, cooldown will not persist",{error:e})}j(!0),T({moduleId:v,interactionType:"shown",featureFocus:b})},5e3);return()=>clearTimeout(e)},[C,G,T]),(0,o.useEffect)(()=>{let e=void 0===C||C&&void 0===G;A(P&&(e||!0===C&&!0===G))},[P,C,G,A]),(0,o.useEffect)(()=>()=>A(!1),[A]),!0!==C)?null:(0,t.jsx)(i.f,{open:k,onOpenChange:e=>{e||S.current||T({moduleId:v,interactionType:"dismiss-click",interactionElement:_.current??"overlay-or-escape",featureFocus:b}),S.current=!1,_.current=null,j(e)},title:"",imageContent:(0,t.jsx)(w.default,{className:"size-12 text-[#003399]"}),headline:"The Weather Channel is better on the app",description:"Faster performance, severe notifications, and exclusive radar layers.",getAppHref:L,onGetAppClick:()=>{S.current=!0,T({moduleId:v,interactionType:"get-app-click",featureFocus:b}),j(!1)},dismissLabel:"Not now",onDismissClick:()=>{_.current="not-now"},onCloseClick:()=>{_.current="close-button"}})}],240279)},576816,703123,e=>{"use strict";var t=e.i(538167),o=e.i(293163),r=e.i(947118),a=e.i(737801);e.s(["f",0,(e={})=>{let i=(0,r.f)(),n=(0,a.f)(),[l,s]=(0,t.useState)(!1),c=(0,t.useRef)(!1),d=(0,t.useMemo)(()=>{let t={...n,formVariant:e.formVariant,sensitiveDataAuthorization:e.sensitiveDataAuthorization,deviceTimeZone:e.deviceTimeZone,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0===t.formVariant&&delete t.formVariant,void 0===t.sensitiveDataAuthorization&&delete t.sensitiveDataAuthorization,void 0===t.deviceTimeZone&&delete t.deviceTimeZone,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,t},[n,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,o.k)(d)&&!l&&s(!0)},[d,l]),(0,t.useCallback)(async()=>{if((i||window.mParticle?.isInitialized?.())&&l&&!c.current)try{window.mParticle?.logEvent?.("signup-complete",window.mParticle?.EventType?.Other,d),c.current=!0,console.debug(`MParticle: Event "signup-complete" tracked - ${d.pageId}`)}catch(e){console.error('MParticle: Event "signup-complete" failed',e)}},[i,d,l])}],576816);let i=(0,e.i(144683).g)({});e.s(["f",0,i],703123)},670279,e=>{"use strict";var t=e.i(458201),o=e.i(538167),r=e.i(526932),a=e.i(204782);e.s(["Newsroom",0,({pageTemplate:e,pageDashboard:i})=>{let n=(0,a.f)();return((0,o.useEffect)(()=>{n&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),i&&window._newsroom.push({pageDashboard:i}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[n,e,i]),n&&e)?(0,t.jsx)(r.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"afterInteractive",id:"newsroom_loader_script"}):null}])},404893,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},61284,e=>{"use strict";e.s(["f",0,"/subscribe/checkout?products=e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb&promoCode=5OFF&tpcc=mktg-5OFF-reg"])}]);