(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,798725,e=>{"use strict";var t=e.i(297647),r=e.i(375570),l=e.i(959194),i=e.i(472737),a=e.i(890972);function n({placeId:e,placeQuery:r,canonicalPath:l,locale:i,showHealthTabs:n}){if(l){let r="en-US"===i?"/weather":`/${i}/weather`,o=e?`l/${e}`:void 0,s=n&&o?[{label:"Allergies",slug:"allergy",href:`/forecast/allergy/${o}`},{label:"Air Quality",slug:"air-quality",href:`/forecast/air-quality/${o}`},{label:"Cold & Flu",slug:"cold-flu",href:`/forecast/cold-flu/${o}`}]:[],u=[{label:"Today",slug:"today"},{label:"Hourly",slug:"hourbyhour"},{label:"10 Day",slug:"tenday"},...o?[{label:"Monthly",slug:"monthly",href:`${r}/monthly/${o}`}]:[],...s];return(0,t.jsx)(a.SubnavigationUI,{links:u,basePath:l})}let o="en-US"===i?"/weather":`/${i}/weather`,s=`l/${e}${r?`?${r}`:""}`,u=n?[{label:"Allergies",slug:"allergy",href:`/forecast/allergy/${s}`},{label:"Air Quality",slug:"air-quality",href:`/forecast/air-quality/${s}`},{label:"Cold & Flu",slug:"cold-flu",href:`/forecast/cold-flu/${s}`}]:[],c=[{label:"Today",slug:`today/${s}`},{label:"Hourly",slug:`hourbyhour/${s}`},{label:"10 Day",slug:`tenday/${s}`},{label:"Monthly",slug:`monthly/${s}`},{label:"Gardening",slug:"gardening",href:"https://labs.weather.com/labs/home-and-garden"},...u];return(0,t.jsx)(a.SubnavigationUI,{links:c,basePath:o})}function o({locale:e}){let a,o,s=(0,r.usePathname)(),u=(0,r.useParams)(),{effectiveLocation:c}=(0,i.useLocationSource)({}),d=u.canonicalLocation;if(d&&d.length>0){let r=s.substring(0,s.lastIndexOf("/")),i="en-US"===e&&"samsung"!==(0,l.getPartner)();return(0,t.jsx)(n,{canonicalPath:r,placeId:c?.placeId,locale:e,showHealthTabs:i})}let m=u.locId,h=u.canonicalCityId,g=u.locName;if(m?a=m:g&&h?(a=g,o=`canonicalCityId=${h}`):h&&(a=h),!a)return null;let b="en-US"===e&&"samsung"!==(0,l.getPartner)();return(0,t.jsx)(n,{placeId:a,placeQuery:o,locale:e,showHealthTabs:b})}e.s(["ForecastSubnavContainer",()=>o],798725)},1567,e=>{"use strict";var t=e.i(947118),r=e.i(737801),l=e.i(477716);e.s(["useTrackModuleViewed",0,()=>{let e="module-viewed",i=(0,t.useIsInitialized)(),a=(0,r.useEventAttributes)();return(0,l.useCallback)(({moduleId:t,modulePosition:r})=>{if(!i)return void console.warn("MParticle is not initialized");let l={module_id:t,module_position:r,...a};try{window.mParticle?.logEvent?.(e,window.mParticle?.EventType?.Other,l),console.debug(`MParticle: Event "${e}" tracked`,l)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}},[a,i])}])},855602,e=>{"use strict";var t=e.i(297647),r=e.i(477716),l=e.i(1567),i=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:a,variant:n="frontend",children:o})=>{let s=(0,r.useRef)(null),[u,c]=(0,r.useState)(!1),d=(0,r.useRef)(null),m=(0,l.useTrackModuleViewed)();return"admin"===n?(0,t.jsx)(t.Fragment,{children:o}):((0,r.useEffect)(()=>{if(u||!i.default||!s.current)return;let t=s.current,r=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?d.current||(d.current=setTimeout(()=>{m({moduleId:e,modulePosition:a}),c(!0),d.current=null},2e3)):d.current&&(clearTimeout(d.current),d.current=null)})},{threshold:1});r.observe(t);let l=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth;return l.top>=0&&l.left>=0&&l.bottom{m({moduleId:e,modulePosition:a}),c(!0),d.current=null},2e3)),()=>{d.current&&clearTimeout(d.current),r.disconnect()}},[u,e,a,m]),(0,t.jsx)("div",{ref:s,className:"hide-empty","data-module-id":e,children:o}))}])},590238,e=>{"use strict";var t=e.i(537989),r=e.i(827049),l=e.i(695203),i=e.i(604323),a=e.i(797770),n=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,n.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[r.pageLocaleAtom,e.pageLocale],[l.deviceClassAtom,e.deviceClass],[i.metricsArticleDataAtom,e.metricsArticleData],[a.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},703123,e=>{"use strict";let t=(0,e.i(751931).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(694914);var t=e.i(297647),r=e.i(241722),l=e.i(477716),i=e.i(475566),a=e.i(352194),n=e.i(671525),o=e.i(901351),s=e.i(310847),u=e.i(776169),c=e.i(422825),d=e.i(143851),m=e.i(703123),h=e.i(404893),g=e.i(367810),b=e.i(251392);function f({onLoad:e,prompt:f=!0,isUserLoggedIn:p}){let v=(0,a.useTranslations)("GoogleLogin"),y=(0,i.useSetAtom)(h.googleLoginInitilizedAtom),{loginWithGoogle:x,error:w,clearError:A}=function(){let e=(0,a.useTranslations)("GoogleLogin"),[t,r]=(0,l.useState)(null),h=(0,i.useSetAtom)(s.userHasLoggedInBeforeAtom),g=(0,i.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:b}=(0,c.useEmailPreferences)(),{refresh:f}=(0,n.usePageNavigation)(),{syncPreferencesFromUpsx:p}=(0,u.usePreferences)(),{authSuccess:v,authRedirect:y}=(0,d.useUserLogin)();return{loginWithGoogle:(0,l.useCallback)(async t=>{let{credential:l}=t;r(null);try{let e=await o.upsxClient.auth.loginWithGoogle({google_id_token:l}),t=e?.isFirstLogin;await v({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:r,weekly:i,marketing:a,alwaysSubscribe:n}=g||{};return(t||n)&&await b({newsletter:r,weekly:i,marketing:a}).catch(e=>{console.error("Failed to update email subscriptions",e)}),y(),!0}catch(t){console.error("Failed to login with Google",t);try{let l=t?.data,i=l?.messageCode;if(!i)throw Error("No Error Message");switch(i){case 1e3:case 1026:case 1033:r({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:r({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){r({header:e("somethingWentWrong")})}return!1}},[h,p,f,v,y,b,g]),error:t,clearError:(0,l.useCallback)(()=>{r(null)},[])}}(),k=(0,b.useRefMemo)(x);return(0,t.jsxs)(t.Fragment,{children:[(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=>{k.current?.(e)}}),y(!0)),e?.(),!p&&f&&t?.prompt()},id:"google-gsi-script"}),(0,t.jsx)(g.Dialog,{open:!!w,onOpenChange:e=>!e&&A(),children:(0,t.jsx)(g.BasicDialog,{showCloseButton:!1,title:w?.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:w?.body||""}}),primaryAction:{label:v("cancel")}})})]})}e.s(["GoogleAuthScript",()=>f],874905)},622958,e=>{"use strict";var t=e.i(297647),r=e.i(274432),l=e.i(632137),i=e.i(352194);let a=()=>{let e=(0,i.useTranslations)("Header");return(0,t.jsx)("div",{className:(0,l.cn)("relative z-105 mx-4 my-2 md:hidden"),children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{style:{boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 0 32px 0 rgba(0, 0, 0, 0.12)"},className:(0,l.cn)("box-border flex h-12 w-full items-center rounded-3xl border-2 border-[#3A61CC00] bg-white! pl-9.5 text-gray-900 outline-0! transition-all hover:border-blue-500 focus-visible:border-blue-500 focus-visible:text-gray-400"),type:"button",onClick:()=>{document?.querySelector?.(".twcSearchTrigger")?.click?.()},children:e("searchPlaceholderText")}),(0,t.jsx)(r.Search,{className:"absolute top-1/2 left-4 flex size-4 -translate-y-1/2 transform items-center text-gray-900"})]})})};e.s(["FakeSearchBar",0,a,"default",0,a])},406752,e=>{"use strict";var t=e.i(477716),r=e.i(295553),l=e.i(991511),i=e.i(475566),a=e.i(710402),n=e.i(310847);e.s(["LocationBoundary",0,({locationPoint:e,canonicalLocation:o})=>{let s=(0,i.useAtomValue)(n.wxuUserRecentAddressesAtom),[,u]=(0,i.useAtom)(r.pageLocationDataAtom),c=(0,t.useMemo)(()=>o??(0,a.fromLocationPoint)(e,s),[o,e,s]);(0,l.useRehydrateAtoms)([[r.pageLocationDataAtom,c]]);let d=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=o?o.placeId:e.location.placeId;d.current!==t&&(u(o??(0,a.fromLocationPoint)(e,s)),d.current=t)},[o,e,s,u]),null}])},633647,e=>{"use strict";var t=e.i(297647),r=e.i(523084),l=e.i(47524),i=e.i(632137),a=e.i(477716);let n={left:r.ChevronLeft,right:l.ChevronRight};e.s(["default",0,({buttonClassName:e,containerClassName:r,onClick:l,tabIndex:o,direction:s,...u})=>{let[c,d]=(0,a.useState)(!1),m=n[s];return(0,t.jsx)("div",{className:(0,i.cn)("absolute",r),children:(0,t.jsx)("button",{className:(0,i.cn)("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",c&&"!h-11 !w-11"),onClick:()=>{d(!0),setTimeout(()=>d(!1),75),l?.()},tabIndex:o,...u,children:(0,t.jsx)(m,{className:(0,i.cn)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",c&&"!h-6 !w-6")})})})}])},890972,e=>{"use strict";var t=e.i(297647),r=e.i(147732),l=e.i(477716),i=e.i(240058),a=e.i(375570),n=e.i(632137),o=e.i(475566),s=e.i(663333),u=e.i(633647);let c=(0,l.memo)(({links:e,basePath:c,className:d,mpa:m})=>{let[h,g]=(0,l.useState)(!1),[b,f]=(0,l.useState)(!1),[p,v]=(0,l.useState)(!1),y=(0,l.useRef)(null),x=(0,l.useRef)(null),w=(0,l.useRef)(null),A=(0,l.useRef)(null),k=(0,l.useRef)(!1),C=(0,o.useAtomValue)(s.deviceClassAtom),S="mobile"!==C&&"tablet"!==C,j=(0,a.usePathname)(),I=(()=>{if(j===c||j===`${c}/`)return 0;if(c.includes("/weather")){let t=e.findIndex(e=>{let t=e.slug.split("/")[0];return j.includes(`/weather/${t}/`)});return -1!==t?t:0}{let t=e.findIndex(e=>j.includes(`${c}/${e.slug}`));return -1!==t?t:0}})(),$=(0,l.useCallback)(()=>{let e=y.current;if(!e||!S){g(!1),f(!1);return}let{scrollLeft:t,scrollWidth:r,clientWidth:l}=e,i=Math.abs(t),a=i>2,n=i+l(0,r.debounce)($,150),[$]),L=(0,l.useCallback)(()=>{null===w.current&&(w.current=requestAnimationFrame(()=>{$(),w.current=null}))},[$]);(0,l.useEffect)(()=>{let e=y.current;e&&(k.current="rtl"===getComputedStyle(e).direction),$();let t=y.current;return t&&(t.addEventListener("scroll",L),window.addEventListener("resize",E)),()=>{null!==w.current&&(cancelAnimationFrame(w.current),w.current=null),t&&t.removeEventListener("scroll",L),E.cancel(),window.removeEventListener("resize",E)}},[e,$,L,E]);let P=(0,l.useCallback)(()=>{null===A.current&&(A.current=requestAnimationFrame(()=>{x.current&&v(x.current.getBoundingClientRect().top(P(),window.addEventListener("scroll",P,{passive:!0}),()=>{null!==A.current&&(cancelAnimationFrame(A.current),A.current=null),window.removeEventListener("scroll",P)}),[P]);let _=(0,l.useCallback)(()=>{y.current?.scrollBy({left:-200,behavior:"smooth"})},[]),N=(0,l.useCallback)(()=>{y.current?.scrollBy({left:200,behavior:"smooth"})},[]);return(0,t.jsx)("div",{ref:x,className:"pointer-events-none sticky top-0 z-104 md:px-4 md:py-2 md:text-center",children:(0,t.jsx)("div",{className:(0,n.cn)("pointer-events-auto overflow-hidden backdrop-blur-md max-md:bg-[linear-gradient(180deg,#FFF_0%,rgba(255,255,255,0.90)_50%,rgba(255,255,255,0.50)_100%)]","md:top-2 md:mx-auto md:w-fit md:max-w-[min(958px,100%)] md:rounded-[28px] md:bg-[#ffffffd6] md:p-1 md:transition-[box-shadow]",p&&"md:shadow-[0_4px_16px_0_rgba(0,0,0,0.08),_0_0_32px_0_rgba(0,0,0,0.12)]",d),"data-testid":"subnavigation",children:(0,t.jsxs)("div",{className:(0,n.cn)("relative max-md:py-2"),children:[(0,t.jsx)("div",{className:(0,n.cn)("pointer-events-none absolute top-0 -left-25 z-[5] h-16 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":h}),"aria-hidden":"true"}),(0,t.jsx)(u.default,{containerClassName:(0,n.cn)("absolute top-[50%] -left-17.5 z-10 transition-[left]",{"left-9.5 md:left-6":h}),onClick:_,tabIndex:h?0:-1,"aria-hidden":!h,"aria-label":"Scroll left",direction:"left"}),(0,t.jsx)("div",{ref:y,className:(0,n.cn)("scrollbar-hide flex h-12 items-center gap-2 overflow-x-auto px-1 max-md:px-5"),children:e.map((e,r)=>{let l=I===r,a=e.href??("/"===e.slug?c||"/":`${c}/${e.slug}`),o=(0,n.cn)("h-11 rounded-full px-4 py-2 text-sm whitespace-nowrap transition-[outline-color,border-color,outline-width] duration-150 ease-out","border border-[#0000001a] bg-transparent text-black","inline-flex items-center focus-visible:ring-1 focus-visible:ring-black focus-visible:outline-none",l?"border-transparent font-semibold outline outline-2 outline-black":"font-semibold hover:border-transparent hover:outline hover:outline-2 hover:outline-black");return(0,t.jsx)(i.default,{href:a,mpa:m,className:o,"aria-current":l?"page":void 0,sourceModule:"subnavigation",children:e.label},e.slug)})}),(0,t.jsx)("div",{className:(0,n.cn)("pointer-events-none absolute top-0 -right-25 z-[5] h-16 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":b}),"aria-hidden":"true"}),(0,t.jsx)(u.default,{containerClassName:(0,n.cn)("absolute top-[50%] -right-17.5 z-10 transition-[right]",{"right-9.5 md:right-6":b}),onClick:N,tabIndex:b?0:-1,"aria-hidden":!b,"aria-label":"Scroll right",direction:"right"})]})})})},(e,t)=>e.basePath===t.basePath&&e.mpa===t.mpa&&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));c.displayName="SubnavigationUI",e.s(["SubnavigationUI",0,c])},711899,e=>{e.v(t=>Promise.all(["static/chunks/8198254d842f31ab.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/775f6992a5490e4c.js"].map(t=>e.l(t))).then(()=>t(72990)))}]);