(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,414338,e=>{"use strict";var t=e.i(699173),n=e.i(592121),a=e.i(730921),r=e.i(683903),i=e.i(877957),l=e.i(367810),s=e.i(901351),o=e.i(313983),c=e.i(725296),d=e.i(521350),u=e.i(611540);let m=({isUserLoggedIn:e,regime:m,deviceClass:p,experience:f,isPremiumUser:h})=>{let x=(0,r.useTranslations)("PrivacyConsentModal"),g=(0,a.useLocale)(),b=(0,u.interpolateUrl)(u.URLS.privacyPolicy,{locale:g}),[v,y]=(0,n.useState)(!1),[w,j]=(0,n.useState)(!1),[S,k]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!c.US_REGIMES.includes(m)||h||!(0,d.isLocalStorageAvailable)())return;let t=localStorage.getItem("gpcConflict"),n=localStorage.getItem("saleOfDataConflict");t?(j(!0),y(!0)):e&&n&&m===c.Regime.USA_CCPA&&(k(!0),y(!0))},[m,h,e]);let C=async e=>{try{let t={purpose:e.purpose,consent:e.value,setByUser:!0};await s.upsxClient.consent.createUserConsent(t),e.refreshAfterUpdate&&window.location.reload()}catch(e){console.error("Failed to update UPSX consent:",e)}},N=t=>{let n=window,a=window.top,r=n.DprSdk||a?.DprSdk;r?(r.setUserConsents({[o.Purpose.SALE_OF_DATA]:t}),e&&C({purpose:o.Purpose.SALE_OF_DATA,value:t,refreshAfterUpdate:!0}),w?((0,d.isLocalStorageAvailable)()&&localStorage.removeItem("gpcConflict"),e||window.location.reload()):S&&(0,d.isLocalStorageAvailable)()&&localStorage.removeItem("saleOfDataConflict"),y(!1)):console.error("Unable to fix conflict, missing DprSdk.")},E="",A="";if(w?(E="gpcConflictHeader",A="gpcConflictParagraph",m===c.Regime.USA_CCPA&&(A+="_usa-ccpa")):S&&(E="saleOfDataConflictHeader",A="saleOfDataConflictParagraph",m===c.Regime.USA_CCPA&&(A+="_usa-ccpa")),A)return(0,t.jsx)(l.Dialog,{open:v,onOpenChange:y,children:(0,t.jsxs)(l.DialogContent,{className:`text-center ${"desktop"!==p?"h-screen w-screen max-w-none rounded-none":"max-w-lg"} ${"wu"===f?"wu-theme":""} `,onEscapeKeyDown:e=>{(S||w)&&e.preventDefault()},onPointerDownOutside:e=>{e.preventDefault()},showCloseButton:!1,children:[E&&(0,t.jsx)(l.DialogHeader,{children:(0,t.jsx)(l.DialogTitle,{className:"text-xl font-semibold",children:x(E)})}),(0,t.jsx)("div",{className:"py-4",children:(0,t.jsx)("p",{className:"text-sm leading-relaxed",children:x.rich(A,{privacyPolicyLink:e=>(0,t.jsx)("a",{href:b,target:"_top",className:"text-blue-600 underline hover:text-blue-800",children:e})})})}),(0,t.jsxs)(l.DialogFooter,{className:"flex w-fit flex-col gap-3 justify-self-center",children:[(0,t.jsx)(i.Button,{onClick:()=>{N(!0)},variant:"default",className:"w-full sm:w-auto",children:x("optInButtonText")}),(0,t.jsx)(i.Button,{onClick:()=>{N(!1)},variant:"secondary",className:"w-full sm:w-auto",children:x("optOutButtonText")})]})]})})};e.s(["PrivacyConsentModalClient",0,m,"default",0,m])},567277,e=>{"use strict";var t=e.i(546584),n=e.i(592121),a=e.i(961123);function r(){return false}function i(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function l(e){(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(a.current)e.route&&a.current(e.route);else{let n=function(e={}){var t;if(!("u">typeof window)||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let n=e.scriptSrc?e.scriptSrc:r()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${n}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let a=document.createElement("script");return a.src=n,a.defer=!0,a.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),a.dataset.sdkv="1.3.1",e.sampleRate&&(a.dataset.sampleRate=e.sampleRate.toString()),e.route&&(a.dataset.route=e.route),e.endpoint?a.dataset.endpoint=e.endpoint:e.basePath&&(a.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(a.dataset.dsn=e.dsn),r()&&!1===e.debug&&(a.dataset.debug="false"),a.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${n}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(a),{setRoute:e=>{a.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});n&&(a.current=n.setRoute)}},[e.route]),null}function s(e){let r=(()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)()||new URLSearchParams,n=(0,a.usePathname)();if(!e)return null;let r=Object.keys(e).length?e:Object.fromEntries(t.entries());if(!n||!r)return n;let l=n;try{let e=Object.entries(r);for(let[t,n]of e)if(!Array.isArray(n)){let e=i(n);e.test(l)&&(l=l.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=i(n.join("/"));e.test(l)&&(l=l.replace(e,`/[...${t}]`))}return l}catch(e){return n}})();return n.default.createElement(l,{route:r,...e,framework:"next",basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}e.s(["SpeedInsights",0,function(e){return n.default.createElement(n.Suspense,{fallback:null},n.default.createElement(s,{...e}))}])},540039,e=>{"use strict";var t,n=e.i(546584),a={scriptHostname:("u">typeof n.default?n.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof n.default?n.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof n.default?n.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof n.default?n.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_BRANCH:void 0,deploymentId:"u">typeof n.default?"dpl_9Vge8pcfsr24dhqjg1QfohgLnYNS":void 0},r=e.i(592121),i=!1;e.s(["UnmountController",0,function({shouldMount:e,nonce:n}){return(0,r.useEffect)(()=>(e&&i&&function(e={}){if(typeof window>"u"||null===document.querySelector("vercel-live-feedback")){Object.assign(a,e);let n=document.createElement("script");for(let[r,i]of(n.src=`${a.scriptHostname}/_next-live/feedback/feedback.js`,n.setAttribute("data-explicit-opt-in","true"),e.nonce&&n.setAttribute("nonce",e.nonce),Object.entries((a.ownerId&&a.projectId?{"data-owner-id":a.ownerId,"data-project-id":a.projectId,"data-branch":t??a.branch}:a.deploymentId?{"data-deployment-id":a.deploymentId}:void 0)??{})))i&&n.setAttribute(r,i);(document.head||document.documentElement).appendChild(n)}}({nonce:n}),i=!0,()=>{(typeof window>"u"?void 0:window.__vercel_toolbar)?.unmount()}),[]),null}],540039)},520362,e=>{"use strict";var t=e.i(699173),n=e.i(592121);let a=e=>{let{apiRoute:t,depth:a,refresh:r,serverURL:i}=e,l=(0,n.useRef)(!1),s=(0,n.useCallback)(e=>{e.origin===i&&e.data&&"object"==typeof e.data&&"payload-document-event"===e.data.type&&("function"==typeof r?r():console.error("You must provide a refresh function to `RefreshRouteOnSave`"))},[r,i]);return(0,n.useEffect)(()=>("u">typeof window&&window.addEventListener("message",s),l.current||(l.current=!0,(e=>{let{serverURL:t}=e;if("u">typeof window){let e=window?.opener||window?.parent;e?.postMessage({type:"payload-live-preview",ready:!0},t)}})({serverURL:i}),r()),()=>{"u">typeof window&&window.removeEventListener("message",s)}),[i,s,a,t,r]),null};var r=e.i(961123);let i=(0,e.i(695881).createLogger)("BlockHighlightOverlay"),l={position:"absolute",pointerEvents:"none",border:"2px solid #5B9BD5",backgroundColor:"rgba(91, 155, 213, 0.04)",borderRadius:"8px",boxShadow:"0 0 8px rgba(91, 155, 213, 0.3)",zIndex:"9999",transition:"opacity 150ms ease"},s=e=>{let n=(0,r.useRouter)();return(0,t.jsx)(a,{...e,refresh:n.refresh})};e.s(["LivePreviewListener",0,s],346267),e.i(346267),e.s(["BlockHighlightOverlay",0,()=>{let e=(0,n.useRef)(null),t=(0,n.useRef)(null),a=(0,n.useRef)(null),r=(0,n.useRef)(null),s=(0,n.useRef)(null),o=(0,n.useCallback)(()=>{if("u"{let n=t.current,r=e.current;if(!n||!r)return;if(!n.isConnected){t.current=null,r.style.opacity="0",a.current?.disconnect();return}let i=n.getBoundingClientRect();r.style.top=`${i.top+window.scrollY}px`,r.style.left=`${i.left+window.scrollX}px`,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.opacity="1"},[]),d=(0,n.useCallback)(()=>{t.current=null,s.current=null,e.current&&(e.current.style.opacity="0"),a.current?.disconnect()},[]),u=(0,n.useCallback)(()=>{t.current&&null===r.current&&(r.current=requestAnimationFrame(()=>{r.current=null,c()}))},[c]),m=(0,n.useCallback)(e=>{if(e===s.current)return;let n=document.querySelector(`[data-block-id="${CSS.escape(e)}"]`);if(!n)return void i.debug("No element found for block ID",{blockId:e});let r=(e=>{let t=e,n=t.getBoundingClientRect();for(let e=0;e{let t=e=>{var t;(e=>{if(e===window.location.origin)return!0;try{let{hostname:t}=new URL(e);return"weather.com"===t||t.endsWith(".weather.com")}catch{return!1}})(e.origin)&&"object"==typeof(t=e.data)&&null!==t&&"type"in t&&("wx:block-highlight-clear"===t.type||"wx:block-highlight"===t.type&&"blockId"in t&&"string"==typeof t.blockId)&&("wx:block-highlight"===e.data.type?m(e.data.blockId):d())};return window.addEventListener("message",t),window.addEventListener("scroll",u,{passive:!0}),window.addEventListener("resize",u,{passive:!0}),()=>{window.removeEventListener("message",t),window.removeEventListener("scroll",u),window.removeEventListener("resize",u),null!==r.current&&cancelAnimationFrame(r.current),a.current?.disconnect(),e.current?.remove()}},[m,d,u]),null},"LivePreviewListener",0,s],520362)},731672,e=>{"use strict";var t=e.i(546446),n=e.i(646341),a=e.i(671525),r=e.i(889753),i=e.i(45846),l=e.i(284007),s=e.i(756227),o=e.i(318849),c=e.i(358273);e.s(["useUserLogout",0,function(){let e=(0,t.useSetAtom)(r.userPreferencesAtom),d=(0,s.useResetAuthState)(),{refresh:u}=(0,a.usePageNavigation)();return async()=>{try{return(0,c.regenerateMetricsSession)(),await i.upsxClient.auth.logout(),d(),e(l.RESET),(0,n.deleteCookie)("twc-user",{domain:".weather.com"}),(0,o.disableSwrPersist)(),u({mpa:!0}),!0}catch(e){return console.error("Failed to log out:",e),!1}}}])},778828,e=>{"use strict";var t=e.i(699173),n=e.i(632137),a=e.i(240058),r=e.i(592121),i=e.i(683903),l=e.i(546446),s=e.i(877957),o=e.i(616448),c=e.i(526456),d=e.i(527207),u=e.i(498076);let m=({animationStrings:e})=>(0,t.jsx)(t.Fragment,{children:e.map(e=>(0,t.jsx)("span",{"data-nosnippet":!0,className:(0,n.cn)("animate-pulse","bg-gray-200","text-transparent","rounded-sm","box-decoration-clone"),children:e},e))});var p=e.i(436066);e.i(24959);var f=e.i(686557),h=e.i(64412),x=e.i(262453),g=e.i(214008);let b="bg-gray-900 text-white hover:bg-[#3A3938] active:bg-[#0C0B0B] focus-visible:ring-2 focus-visible:ring-blue-500";function v({locale:e,className:a}){let y=(0,i.useTranslations)("Header"),w=(0,u.useIsMobile)(),j=(0,r.useRef)(null),S=(0,x.usePreciseGeocode)(),{location:k}=(0,h.useLocation)(),{location:C}=(0,h.useLocation)("geolocation"),N=k?.name||k?.city||k?.displayName,E=(0,g.isSameLocation)(k,C),[A,L]=(0,l.useAtom)(p.locationPickerOpenAtom),R=(0,r.useCallback)(()=>{L(!A)},[L,A]);return(0,r.useEffect)(()=>{if(!A||w)return;let e=e=>{j.current&&!j.current.contains(e.target)&&L(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[A,w,L]),(0,r.useEffect)(()=>{if(!A)return;let e=e=>{"Escape"===e.key&&L(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[A,L]),(0,t.jsxs)("div",{ref:j,className:(0,n.cn)("relative max-md:mr-auto",a),children:[(0,t.jsx)("div",{className:"rounded-4xl bg-white md:p-1 md:shadow-[0_4px_16px_0_rgba(0,0,0,0.08),_0_0_32px_0_rgba(0,0,0,0.12)]",children:(0,t.jsxs)(s.Button,{type:"button",variant:"ghostUI",onClick:R,"aria-expanded":A,"aria-haspopup":"dialog","aria-label":N??y("searchPlaceholderText"),"data-state":A?"open":"closed","data-testid":"location-picker-trigger",className:(0,n.cn)("inline-flex h-10 items-center justify-center gap-2 rounded-3xl px-3 py-0 text-sm font-bold transition-colors md:h-12 md:px-4","focus-visible:ring-offset-0 focus-visible:outline-none",b),children:[E&&S?(0,t.jsx)(c.CurrentLocationFilled,{className:"size-3 shrink-0 text-white","aria-hidden":"true",title:""}):E&&!S?(0,t.jsx)(o.CurrentLocation,{className:"size-3 shrink-0 text-white","aria-hidden":"true",title:""}):null,(0,t.jsx)("span",{className:"max-w-[140px] truncate md:max-w-[160px]",children:N||(0,t.jsx)(m,{animationStrings:["Location"]})}),(0,t.jsx)(d.ChevronUp,{className:(0,n.cn)("size-3 shrink-0 text-white transition-transform duration-150",!A&&"rotate-180"),"aria-hidden":"true",title:""})]})}),(0,t.jsx)("div",{className:(0,n.cn)(!w&&"absolute start-0 top-full z-110 mt-3 w-[400px]"),children:(0,t.jsx)(f.Search,{locale:e,open:A,onOpenChange:L})})]})}var y=e.i(559421),w=e.i(528600),j=e.i(731672),S=e.i(792461),k=e.i(190344),C=e.i(296990),N=e.i(674885),E=e.i(336726),A=e.i(961123),L=e.i(357508);e.i(609717);var R=e.i(950771);e.i(647872);var U=e.i(928083),_=e.i(598513),P=e.i(993269),I=e.i(859827),B=e.i(449172),T=e.i(316810);let O=({url:e,action:r,name:i,isNew:l,isExternal:s,isInGroup:o,onClick:c,sourceModule:d,sourceElement:u,modulePosition:m})=>{if(!e&&!r)return null;let p=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"relative flex items-center",children:[i,l&&(0,t.jsx)(T.default,{})]}),s&&(0,t.jsx)(B.ExternalLink,{size:"sm","data-testid":"external-link-icon"})]}),f=(0,n.cn)("group flex items-center gap-1 text-gray-700 hover:text-blue-600 py-2.5",o?"px-10":"px-6");return(0,t.jsx)("li",{className:o?"border-b border-[rgba(37,36,34,0.10)]":"",children:e?(0,t.jsx)(a.default,{href:e,className:f,target:s?"_blank":void 0,onClick:c,sourceModule:d,sourceElement:u,"data-module-key":m,children:p}):(0,t.jsx)("button",{onClick:r,className:(0,n.cn)(f,"cursor-pointer"),children:p})},i)},H=({isExpanded:e,toggleCategory:a,name:r,links:i,isNew:l})=>(0,t.jsxs)("div",{className:"w-full md:mb-6",children:[(0,t.jsx)("h2",{className:"contents",children:(0,t.jsxs)("button",{type:"button",onClick:a,"aria-expanded":!!e,"aria-label":`Toggle ${r} category`,className:(0,n.cn)("flex w-full cursor-pointer items-center justify-between px-6 py-2.5 text-left md:cursor-default","focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:outline-none"),children:[(0,t.jsxs)("span",{className:"relative flex items-center",children:[(0,t.jsx)("span",{className:"text-gray-900 md:font-bold",children:r}),l&&(0,t.jsx)(T.default,{})]}),(0,t.jsx)("span",{"aria-hidden":"true",children:e?(0,t.jsx)(P.Minus,{size:"md",className:"text-black"}):(0,t.jsx)(I.Plus,{size:"md",className:"text-black"})})]})}),(0,t.jsx)("ul",{className:(0,n.cn)("bg-[#ebecee] md:space-y-2",!e&&"hidden"),children:i.map(e=>(0,t.jsx)(O,{...e,isInGroup:!0},e.name))})]},r);var D=e.i(611540),M=e.i(304116),z=e.i(269153);let $=[{titleKey:"running",urlKey:"activityHubRunning"},{titleKey:"camping",urlKey:"activityHubCamping"},{titleKey:"hiking",urlKey:"activityHubHiking"},{titleKey:"golf",urlKey:"activityHubGolf"},{titleKey:"cycling",urlKey:"activityHubCycling"},{titleKey:"gardening",urlKey:"activityHubGardening"},{titleKey:"tennis",urlKey:"activityHubTennis"}],F={running:"running",camping:"camping",hiking:"hiking",golf:"golf",cycling:"cycling",gardening:"gardening",tennis:"tennis-pickleball"},K=(0,r.forwardRef)((e,a)=>{let[o,c]=(0,l.useAtom)(p.settingsMenuOpenAtom),m=(0,l.useAtomValue)(N.isImperialUnitsAtom),f=(0,A.useParams)(),x=(f?.locale||"en-US").split("-")[1],{location:g}=(0,h.useLocation)(),b=(0,y.useCanonicalBasePath)(),{user:{isUserLoggedIn:v}}=(0,w.useUser)(),P=(0,j.useUserLogout)(),I=(0,S.useRefMemo)(P),B=g?.placeId||"",T=g?.featureId,O=g?.canonicalID,K=(0,z.useIsSamsungPartner)(),V=(0,l.useAtomValue)(R.pageLocaleAtom),G=(0,l.useAtomValue)(U.activityHubMenuEnabledAtom),q=(0,u.useIsMobile)(),Y=(0,_.useSendInteractionEvent)(),X=(0,i.useTranslations)("SidebarNavigation"),W=(0,i.useTranslations)("ActivityHubDriver"),Q=(0,i.useTranslations)("UserRegistration"),J=(0,k.useVideoNavUrl)(),[Z,ee]=(0,r.useState)({}),et=(0,r.useCallback)(e=>(0,M.buildLocationPageHref)({pageType:e,locale:V,canonicalBasePath:b,canonicalID:O,featureId:T,placeId:B,skipCanonical:K}),[V,b,O,T,B,K]),en=(0,r.useMemo)(()=>[{name:X("weatherForecasts"),links:[{name:X("today"),url:et("today")},{name:X("hourly"),url:et("hourbyhour")},{name:X("tenday"),url:et("tenday")}]},{name:X("radarAndMaps"),links:[{name:X("interactiveRadarMap"),url:`${(0,D.interpolateUrl)(D.URLS.interactiveMap,{locale:V,locId:B})}?animation=true`},..."en-US"===V?[{name:"US Forecast",url:D.URLS.usForecast},{name:"US Satellite & Radar",url:D.URLS.usSatAndRadar},{name:"World Satellite",url:D.URLS.worldSatellite},{name:"US Severe Alerts",url:D.URLS.usSevereAlerts},{name:"US Health",url:D.URLS.usHealth}]:[]]},..."en-US"===V?[{name:"News",links:[{name:X("topStories"),url:D.URLS.news},{name:X("hurricaneCentral"),url:"/storms/hurricane-central"},{name:X("tornadoCentral"),url:"/storms/tornado-central"},{name:X("safetyAndPrep"),url:"/safety/index"},{name:X("spaceAndSkywatching"),url:D.URLS.spaceSkywatching},...J?[{name:X("video"),url:J}]:[]]}]:J?[{name:X("video"),links:[{name:X("topStories"),url:J}]}]:[],..."en-US"===V&&G&&q?[{name:"Activity Hub",isNew:!0,analyticsElement:"activity-hub",links:$.map(({titleKey:e,urlKey:t},n)=>{let a=F[e],r=String(n);return{name:W(e),url:(0,D.interpolateUrl)(D.URLS[t],{locale:V,locId:B}),onClick:()=>Y({interactionType:"click",interactionElement:a,moduleId:"hamburger-menu",modulePosition:r,destinationPageId:a},{flushImmediately:!0}),sourceModule:"hamburger-menu",sourceElement:a,modulePosition:r}})}]:[],{name:X("productAccount"),links:[..."en-US"===V?[{name:"Alexa Skill",url:"https://www.amazon.com/The-Weather-Company-Channel/dp/B07YPYHQ1Q",isExternal:!0}]:[],...v?[{name:Q("manageAccount"),url:(0,D.interpolateUrl)(D.URLS.memberSettings,{locale:V})},{name:Q("logOut"),action:I.current}]:[{name:Q("createAnAccount"),url:(0,D.interpolateUrl)(D.URLS.memberSignup,{locale:V})},{name:Q("logIn"),url:(0,D.interpolateUrl)(D.URLS.memberLogin,{locale:V})}]]},{name:X("lifestyle"),links:[..."en-US"===V?[{name:"Atmosphere Reviews",url:"/atmosphere"},{name:"Shop",url:"https://shop.weather.com/",isExternal:!0},{name:X("recipes"),url:"/home-garden/recipes"},{name:X("homeAndGarden"),url:D.URLS.homeGarden},{name:X("travelAndOutdoors"),url:D.URLS.travel},{name:X("petsAndAnimals"),url:D.URLS.pets},{name:"Health",url:"/health"}]:[],{name:X("allergyTracker"),url:et("allergy")},{name:X("airQualityIndex"),url:et("air-quality")},{name:X("coldAndFluTracker"),url:et("cold-flu")},..."en-US"===V?[{name:X("skinHealth"),url:D.URLS.skinHealth}]:[]]}],[v,I,B,V,et,J,G,q,Y]);return(0,t.jsxs)("nav",{ref:a,className:(0,n.cn)("md:h-unset z-overlay absolute top-full right-0 left-0 h-[calc(100dvh-56px)] w-full overflow-y-auto bg-white pb-14 shadow-md md:py-8 md:pb-0"),"data-testid":"header-nav-menu",children:[(0,t.jsxs)("div",{className:"relative flex items-center justify-between px-6 pt-4",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Menu"}),(0,t.jsxs)(s.Button,{variant:"ghostUI","data-settings-menu-trigger":!0,"aria-haspopup":"menu","aria-expanded":o,className:"text-brand-active ml-[10px] flex cursor-pointer items-center px-0 md:px-[6px] md:text-gray-900",onClick:()=>c(e=>!e),children:[(0,t.jsx)(C.Globe,{size:"md",className:"fill-brand-active md:fill-gray-900"}),(0,t.jsx)("span",{className:"px-[8px] text-[13px] md:text-lg md:font-bold",children:x}),(0,t.jsx)("span",{className:"border-l-brand-active border-l-[1px] pr-1 pl-2 text-[13px] md:border-l-gray-900 md:text-lg md:font-bold",children:m?"°F":"°C"}),o?(0,t.jsx)(d.ChevronUp,{className:"text-brand-active h-5 w-auto md:text-gray-900"}):(0,t.jsx)(E.ChevronDown,{className:"text-brand-active h-5 w-auto md:text-gray-900"})]}),(0,t.jsx)(L.default,{})]}),!o&&(0,t.jsx)("div",{className:"mx-auto flex w-full max-w-7xl flex-col justify-center md:flex-row md:gap-3 md:px-4","data-testid":"header-nav-content",children:en.map(e=>(0,t.jsx)("div",{className:"flex w-full flex-col md:w-1/4",children:(0,t.jsx)(H,{isExpanded:Z[e.name],toggleCategory:()=>{var t;e.analyticsElement&&!Z[e.name]&&Y({interactionElement:e.analyticsElement,interactionType:"expand",moduleId:"hamburger-menu"}),t=e.name,ee(e=>({...e,[t]:!e[t]}))},...e})},e.name))})]})});K.displayName="Navigation";var V=e.i(226602),G=e.i(747961);let q=(0,r.forwardRef)(({title:e,titleId:n,desc:a,descId:r,...i},l)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:l,"aria-labelledby":n,"aria-describedby":r,...i,children:[a?(0,t.jsx)("desc",{id:r,children:a}):null,void 0===e?(0,t.jsx)("title",{id:n,children:"Hamburger"}):e?(0,t.jsx)("title",{id:n,children:e}):null,(0,t.jsx)("path",{fill:"currentColor",d:"M20 16a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zM20 11a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zM20 6a1 1 0 1 1 0 2H4a1 1 0 0 1 0-2z"})]})),Y=r.default.forwardRef((e,n)=>(0,t.jsx)(G.BaseIcon,{ref:n,icon:q,...e}));function X(){let[e,n]=(0,l.useAtom)(p.menuOpenAtom),a=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{e?document.querySelector("html")?.classList.add("overflow-hidden"):document.querySelector("html")?.classList.remove("overflow-hidden")},[e]),(0,r.useEffect)(()=>{function t(t){e&&a.current&&i.current&&!a.current.contains(t.target)&&!i.current.contains(t.target)&&n(!1)}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,n]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Button,{ref:a,variant:"ghost",size:"icon","aria-label":"Menu",className:"h-10 w-10 shrink-0 cursor-pointer flex-col items-center justify-center p-0 hover:bg-transparent",onClick:()=>n(!e),"data-testid":"header-menu-button",children:e?(0,t.jsx)(V.Close,{}):(0,t.jsx)(Y,{})}),e&&(0,t.jsx)(K,{ref:i})]})}Y.displayName="Hamburger";var W=e.i(368847),Q=e.i(809058),J=e.i(837879),Z=e.i(730921),ee=e.i(864723),et=e.i(537989);let en=()=>{let e=(0,l.useAtomValue)(et.pageIdAtom);return(0,r.useCallback)(t=>{let n=`${e}_${t}`;(0,ee.setCookie)("fromStr",n,{path:"/",domain:".weather.com"})},[e])};var ea=e.i(683199);function er(){let{user:e,userProfile:n}=(0,w.useUser)(),l=(0,j.useUserLogout)(),{isUserLoggedIn:o,isUserPremium:c}=e,[d,u]=(0,r.useState)(!1),m=(0,J.useSubscriptionsEnabled)(),p=(0,i.useTranslations)("UserRegistration"),f=(0,Z.useLocale)(),h=en(),x=(0,ea.usePremiumSource)(),g="flex size-8 shrink-0 items-center justify-center rounded-full border-2 border-current text-sm leading-none font-bold text-inherit";return(0,t.jsx)("div",{"data-testid":"header-profile",className:"md:hidden",children:o?(0,t.jsxs)(Q.Popover,{trigger:"hover",openDelay:100,closeDelay:300,open:d,onOpenChange:u,children:[(0,t.jsx)(Q.PopoverTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":d,className:g,"data-testid":"header-profile-button",children:n?.firstName?.charAt(0)?.toUpperCase()})}),(0,t.jsx)(Q.PopoverContent,{className:"z-9996 p-0",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.default,{href:(0,D.interpolateUrl)(D.URLS.memberSettings,{locale:f}),"data-testid":"header-profile-account",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:g,children:n?.firstName?.charAt(0)?.toUpperCase()}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(W.default,{variant:"Body.S",children:n?.firstName}),(0,t.jsx)(W.default,{className:"text-sm text-gray-500 hover:text-gray-700","data-testid":"header-profile-account",children:p("manageAccount")})]})]})}),!c&&m&&(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-gray-200 p-4",children:[(0,t.jsx)(W.default,{variant:"Body.L",className:"font-semibold",children:"Unlock our full potential"}),(0,t.jsx)(W.default,{children:"Try our best radar and forecasting features for weather planning."}),(0,t.jsx)(a.default,{href:"/subscribe?tpcc=mktg-today-mainmenu-flyout",onClick:()=>{h("user_flyout_go_premium"),x({sourceModule:"top-menu",sourceElement:"get-premium"})},children:(0,t.jsx)(s.Button,{variant:"default",children:"Go Premium"})})]})]}),(0,t.jsx)("div",{className:"border-t border-gray-200 p-2",children:(0,t.jsx)(s.Button,{variant:"link",onClick:l,"data-testid":"header-profile-signout",children:p("signOut")})})]})})]}):(0,t.jsx)(a.default,{href:(0,D.interpolateUrl)(D.URLS.memberLogin,{locale:f}),children:(0,t.jsx)(s.Button,{variant:"default",className:"whitespace-nowrap text-sm md:text-base py-0 px-3 md:px-4 h-8 md:h-12 font-bold bg-gray-900",children:p("logIn")})})})}var ei=e.i(995113);function el(){let{user:e}=(0,w.useUser)(),{isUserPremium:r}=e,i=(0,J.useSubscriptionsEnabled)(),l=en(),s=(0,ea.usePremiumSource)();return r||!i?null:(0,t.jsx)("div",{className:"hidden rounded-4xl bg-white p-1 md:block md:shadow-[0_4px_16px_0_rgba(0,0,0,0.08),_0_0_32px_0_rgba(0,0,0,0.12)]",children:(0,t.jsxs)(a.default,{href:"/subscribe?tpcc=mktg-home-mainmenu-subscribe",className:(0,n.cn)("group relative inline-flex h-10 items-center justify-center gap-1 overflow-hidden rounded-3xl px-3 py-0 text-sm font-bold transition-colors md:h-12 md:px-4","focus-visible:ring-offset-0 focus-visible:outline-none"),style:{background:"linear-gradient(90deg, #3A61CC 0%, #6549D4 50%, #935EC3 100%)"},onClick:()=>{l("header_go_premium"),s({sourceModule:"top-menu",sourceElement:"get-premium"})},children:[(0,t.jsx)("div",{style:{background:"linear-gradient(90deg, #4872E5 0%, #785CEB 50%, #A86EDD 100%)"},className:"pointer-events-none absolute top-0 left-0 h-full w-full opacity-0 bg-blend-soft-light transition-opacity group-hover:opacity-100 group-focus:opacity-100"}),(0,t.jsx)(ei.LightningFilled,{className:"relative z-2 size-4 text-white"}),(0,t.jsx)("span",{className:"relative text-sm font-semibold whitespace-nowrap text-white",children:"Get Premium"})]})})}var es=e.i(458645);e.s(["default",0,function({locale:e,subnav:r,hideHeaderOnDesktop:i,hideLocationPicker:s,hideGoPremiumButton:o}){let c,d=(0,u.useIsMobile)(),m=(c=(0,u.useIsMobile)(),(0,A.usePathname)().includes("/subscribe")&&!c||i&&!d),f=(0,l.useAtomValue)(p.menuOpenAtom),h=(0,l.useAtomValue)(p.locationPickerOpenAtom),x=(0,D.interpolateUrl)(D.URLS.home,{locale:e});return m?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("header",{className:(0,n.cn)("relative top-0 w-full md:sticky",f||h?"z-overlay":"z-sticky"),children:(0,t.jsx)("div",{className:"text-black max-md:bg-white","data-component":"header-main","data-testid":"header-main",children:(0,t.jsxs)("div",{className:"mx-auto flex items-center justify-between gap-2 px-3 py-2 md:gap-4 md:py-3 md:pl-0",children:[(0,t.jsx)("span",{className:"contents md:hidden",children:(0,t.jsx)(X,{})}),(0,t.jsx)("div",{className:(0,n.cn)("flex items-center md:hidden",s&&"max-md:mr-auto"),children:(0,t.jsx)(a.default,{href:x,className:"flex items-center md:hidden","data-testid":"header-logo",children:(0,t.jsx)(es.default,{className:"h-10 w-auto text-[#003399] md:h-12"})})}),!s&&(0,t.jsx)(v,{locale:e}),(0,t.jsx)("div",{className:"hidden md:contents",children:r}),!o&&(0,t.jsx)(el,{}),(0,t.jsx)(er,{})]})})}),(0,t.jsx)("div",{className:(0,n.cn)("z-sticky sticky top-2 mb-6 px-3 md:hidden",f||h?"hidden":"block"),children:r})]})}],778828)},556441,e=>{"use strict";var t=e.i(699173),n=e.i(961123),a=e.i(240058),r=e.i(877957),i=e.i(368847),l=e.i(132084),s=e.i(528600),o=e.i(837879),c=e.i(498076),d=e.i(37429),u=e.i(683199);e.s(["default",0,()=>{let e=(0,n.useSearchParams)(),m=e.get("par")||e.get("partner"),p=(0,c.useIsMobile)(),f=(0,o.useSubscriptionsEnabled)(),{user:h}=(0,s.useUser)(),{isUserPremium:x}=h,g=(0,u.usePremiumSource)();return m===l.Partner.TIKTOK&&p&&f&&!x?(0,t.jsxs)("div",{className:"relative mb-4 overflow-hidden bg-[#590462]",children:[(0,t.jsx)(d.default,{src:"https://s.w-x.co/tt-banner.jpg",alt:"",fill:!0,priority:!0,isFetchPriority:!0,rounded:!1,objectFit:"cover",className:"object-center",wrapperClassName:"absolute inset-0","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"relative z-10 p-6 text-center",children:[(0,t.jsx)(i.default,{variant:"Title.S",className:"mb-2.5 text-white",children:"Your TikTok Exclusive"}),(0,t.jsx)(i.default,{variant:"Body.S.Bold",className:"mb-2.5 text-white",children:"Get The Weather Channel Premium FREE for 1 month — turn ads off now, plus much more!"}),(0,t.jsx)(r.Button,{className:"rounded-lg px-8 py-2 text-sm font-bold",variant:"secondary",asChild:!0,children:(0,t.jsx)(a.default,{href:"/subscribe/checkout?products=e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb&promoCode=t934k258j742&tpcc=mktg-today-tiktok-banner",onClick:()=>g({sourceModule:"tiktok-banner",sourceElement:"claim-now"}),children:"Claim Now"})})]})]}):null}])}]);