(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86773,e=>{"use strict";var t=e.i(155252),r=e.i(206507);e.s(["default",0,function({candidate:e,failedMessage:i="Authentication failed. Please try again.",protectMessage:n="Remove your adblocker.",fetch:o,refresh:a,getCustomAccountInfo:s}){let[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),p=(0,r.useRef)([]);(0,r.useEffect)(()=>{e.id!==p.current[0]&&(p.current=[e.id],e.transactIDs&&p.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let b=(0,r.useCallback)(()=>{try{o("/?adm_get_token=1").then(e=>{e.ok&&a()}).catch(()=>{c(i)})}catch{c(i)}},[o,i,a]),w=(0,r.useMemo)(()=>"u">typeof window?window:{admiral:{}},[]);return(0,r.useEffect)(()=>{typeof window>"u"||(w.admiral=w.admiral||function(...e){(w.admiral.q=w.admiral.q||[]).push(e)},w.admiral("after","measure.detected",function(t){if("abr"==e.requirement)t.adblocking?(c(n),d(!0)):g(!0);else if("account"==e.requirement||"benefits"==e.requirement){let t=!!s;w.admiral("after","visitor.latest",function(r){var i;if("account"===e.requirement)(t?s().registered:r.status.registered)||m||(c(n),d(!0));else if("benefits"===e.requirement){let r=[];if(t)r=s().benefits;else{let e=document.cookie.split(";");e&&(r=(null==(i=e.find(e=>e.startsWith("admbenefits=")))?void 0:i.split(","))??[])}if(r){let t=e.benefits??[];if(0==t.length)return void g(!0);let i=!1;for(let e of t)r.includes(e)&&(i=!0);i?g(!0):(c(n),d(!0))}else c(n),d(!0)}})}}))},[]),(0,r.useEffect)(()=>{h&&(g(!1),b())},[h,b]),(0,r.useEffect)(()=>{m||!u||(f(!0),w.admiral("targeting","force",{candidateIDs:p.current}))},[m,u,p,w]),(0,t.jsxs)("div",{children:[l||null," "]})}])},899507,e=>{"use strict";e.s(["isNil",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["isPrimitive",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["isTypedArray",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["isUnsafeProperty",0,function(e){return"__proto__"===e}],355200)},370220,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatusUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/status"}},r.getEmailPreferencesSetUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/set"}},r.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/change-email"}};let i="weather.com"},454307,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setEmailPreferences=a,r.updateSubscription=s;let i=e.r(678651),n=e.r(414655),o=e.r(370220);async function a(e){let t=(0,o.getEmailPreferencesSetUrlConfig)(),r=(0,i.urlFrom)(t),a=JSON.stringify(function(e){let{subscriptions:t,email:r,mParticleId:i}=e,n={};return t&&(n.subscriptions=t),r&&(n.email=r),i&&(n.mParticleId=i),n}(e)),s=await fetch(r,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:a});return 200===s.status||400===s.status?await s.json():(0,n.handleFetchResponse)(s)}async function s(e,t,r){return a({subscriptions:[{subscriptionGroupName:e,isSubscribed:t,...r&&{attributes:r}}]})}},451086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatus=a;let i=e.r(678651),n=e.r(414655),o=e.r(370220);async function a(){let e=(0,o.getEmailPreferencesStatusUrlConfig)(),t=(0,i.urlFrom)(e),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,n.handleFetchResponse)(r)}},952582,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_SUBSCRIPTIONS=r.ON_YOUR_RADAR_GROUP=r.MARKETING_EMAILS_GROUP=r.WEEKLY_BRIEF_GROUP=r.DAILY_NEWSLETTERS_GROUP=void 0,r.DAILY_NEWSLETTERS_GROUP="daily-newsletters-1",r.WEEKLY_BRIEF_GROUP="weekly-brief",r.MARKETING_EMAILS_GROUP="marketing-emails-1",r.ON_YOUR_RADAR_GROUP="on-your-radar",r.DEFAULT_SUBSCRIPTIONS=[{subscriptionGroupName:r.DAILY_NEWSLETTERS_GROUP,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:r.WEEKLY_BRIEF_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.MARKETING_EMAILS_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.ON_YOUR_RADAR_GROUP,subscriptionGroupId:"",isSubscribed:!1}]},422825,e=>{"use strict";var t=e.i(546446),r=e.i(381477),i=e.i(899507),n=e.i(449928),o=e.i(760430);function a(e){if((0,n.isPrimitive)(e))return e;if(Array.isArray(e)||(0,o.isTypedArray)(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t=new r(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}var s=e.i(355200);function l(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t,r){let i=Object.keys(t);for(let n=0;n"boolean"==typeof e?{isSubscribed:e}:e;e.s(["useEmailPreferences",0,(e=!1)=>{let[n,o]=(0,t.useAtom)(h),{user:s}=(0,g.useUser)(),m=(0,y.useSubscriptionsEnabled)()||e,f=s?.userID||null,w=s?.isUserLoggedIn||!1,v=(0,b.useCallback)(e=>{if(f){var t;let r,i;o({userId:f,expiry:Date.now()+9e5,subscriptions:(t=n?.subscriptions,r=t?.length?t:p.DEFAULT_SUBSCRIPTIONS,i={},e?(r?.forEach(e=>{i[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=i[e.subscriptionGroupName]||{};i[e.subscriptionGroupName]=c(a(t),e,function e(t,r){if(Array.isArray(r))if(Array.isArray(t))return c(a(t),r,e);else return c([],r,e);if(l(r))if(l(t))return c(a(t),r,e);else return c({},r,e)})}),Object.values(i)):r)})}},[f,o,n?.subscriptions]),A=n&&n.userId===f&&n.expiry&&n.expiry>Date.now(),P=m&&f&&w&&!A,{isLoading:E}=(0,r.default)(P?`getEmailPreferencesStatus/${f}`:void 0,()=>I(()=>(0,d.getEmailPreferencesStatus)()),{revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{f&&e&&v(e.subscriptions)}}),S=(0,b.useCallback)(async(e,t)=>{if(!m)return{status:"error",error:"Subscription is not enabled!"};let r=w?void 0:t,i=await I(()=>(0,u.setEmailPreferences)({subscriptions:e,email:r}));return"success"===i.status&&v(e),i},[v,m,w,n?.subscriptions]),k=(0,b.useCallback)(async({newsletter:e,weekly:t,onYourRadar:r,marketing:n})=>{let o=[!(0,i.isNil)(e)&&{subscriptionGroupName:"daily-newsletters-1",...x(e)},!(0,i.isNil)(t)&&{subscriptionGroupName:"weekly-brief",...x(t)},!(0,i.isNil)(r)&&{subscriptionGroupName:"on-your-radar",...x(r)},!(0,i.isNil)(n)&&{subscriptionGroupName:"marketing-emails-1",...x(n)}].filter(Boolean);return await S(o)},[S]);return{emailSubscriptions:f&&n?n.subscriptions:null,updateEmailSubscriptions:k,updateEmailPreference:S,isLoadingPreferences:E}}],422825)},143851,e=>{"use strict";var t=e.i(546446),r=e.i(897892),i=e.i(45846),n=e.i(310847),o=e.i(776169),a=e.i(671525),s=e.i(206507),l=e.i(947118),c=e.i(491240),u=e.i(737801),d=e.i(521350),m=e.i(391174),f=e.i(358273);e.s(["useUserLogin",0,function(){let e,h,g,p,b,w=(0,t.useSetAtom)(n.userHasLoggedInBeforeAtom),y=(0,t.useAtomValue)(n.wxuLoginRedirectPageAtom),v=(0,t.useAtomValue)(n.wxuUserAnonymousIdAtom),I=(0,r.useGetCookie)(),{syncPreferencesFromUpsx:x,updatePreferences:A}=(0,o.usePreferences)(),{navigate:P}=(0,a.default)(),{login:E}=(e=(0,l.useIsInitialized)(),h=(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,other:(0,c.truncateIdentityValue)(t.other)}};return window.mParticle?.Identity?.identify?.(r)},[e]),{identify:h,login:(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,facebook:t.facebook,facebookcustomaudienceid:t.facebookcustomaudienceid,google:t.google,microsoft:t.microsoft,other:(0,c.truncateIdentityValue)(t.other),other2:(0,c.truncateIdentityValue)(t.other2),other3:(0,c.truncateIdentityValue)(t.other3),other4:(0,c.truncateIdentityValue)(t.other4),twitter:t.twitter,yahoo:t.yahoo}};return window.mParticle?.Identity?.login?.(r)},[e]),logout:(0,s.useCallback)(()=>e?window.mParticle?.Identity?.logout?.({userIdentities:{}}):(console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"))),[e])}),S=(g=(0,l.useIsInitialized)(),p=(0,u.useEventAttributes)(),b=(0,s.useCallback)((e,t={})=>{let r={...p,...t};if(!g)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(e,window.mParticle.EventType.Other,r),console.debug(`MParticle: Event "${e}" tracked`,r)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}return b},[p,g])),k=async()=>{try{if(I("premium"))return null;return await i.upsxClient.purchase.getPurchaseToken(),!0}catch(e){return console.error("Failed to get UPSX token:",e),!1}},N=()=>{(0,f.regenerateMetricsSession)();let e=new URLSearchParams(window.location.search).get("ref");P((e&&`https://${e}`)??y)},j=async(e,t=!0)=>{(0,m.invalidateUpsxCache)(),(0,d.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),w(!0),await x()||await A({}),k(),e?.userID&&(E({email:e.email,customerid:e.userID,other:v}),S("login"===e.type?"user-loggedin":"signup-complete",{url:window.location.pathname})),t&&N()};return{login:async(e,t)=>{try{let r=await i.upsxClient.auth.login({email:e,password:t});return r&&await j({email:r.email,userID:r.userID,type:"login"}),!0}catch(e){return console.error("Failed to login",e),!1}},authSuccess:j,authRedirect:N}}],143851)},590238,e=>{"use strict";var t=e.i(537989),r=e.i(827049),i=e.i(695203),n=e.i(604323),o=e.i(797770),a=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,a.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[r.pageLocaleAtom,e.pageLocale],[i.deviceClassAtom,e.deviceClass],[n.metricsArticleDataAtom,e.metricsArticleData],[o.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},855602,e=>{"use strict";var t=e.i(155252),r=e.i(206507),i=e.i(1567),n=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:o,moduleKey:a,variant:s="frontend",children:l})=>{let c=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1),m=(0,r.useRef)(null),f=(0,i.useTrackModuleViewed)();return"admin"===s?(0,t.jsx)(t.Fragment,{children:l}):((0,r.useEffect)(()=>{if(u||!n.default||!c.current)return;let t=c.current,r=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?m.current||(m.current=setTimeout(()=>{f({moduleId:e,modulePosition:o}),d(!0),m.current=null},2e3)):m.current&&(clearTimeout(m.current),m.current=null)})},{threshold:1});r.observe(t);let i=t.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return i.top>=0&&i.left>=0&&i.bottom{f({moduleId:e,modulePosition:o}),d(!0),m.current=null},2e3)),()=>{m.current&&clearTimeout(m.current),r.disconnect()}},[u,e,o,f]),(0,t.jsx)("div",{ref:c,className:"hide-empty","data-module-id":e,"data-module-key":a,"data-item-position":o,children:l}))}])},670279,e=>{"use strict";var t=e.i(155252),r=e.i(206507),i=e.i(585683),n=e.i(204782);let o=({pageTemplate:e,pageDashboard:o})=>{let a=(0,n.default)();return((0,r.useEffect)(()=>{a&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),o&&window._newsroom.push({pageDashboard:o}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[a,e,o]),a&&e)?(0,t.jsx)(i.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"afterInteractive",id:"newsroom_loader_script"}):null};e.s(["Newsroom",0,o,"default",0,o])},703123,e=>{"use strict";let t=(0,e.i(981030).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(571195);var t=e.i(155252),r=e.i(206507),i=e.i(585683),n=e.i(546446),o=e.i(981851),a=e.i(671525),s=e.i(901351),l=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),m=e.i(703123),f=e.i(404893),h=e.i(367810),g=e.i(792461);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:p=!0,isUserLoggedIn:b}){let w=(0,o.useTranslations)("GoogleLogin"),y=(0,n.useSetAtom)(f.googleLoginInitilizedAtom),{loginWithGoogle:v,error:I,clearError:x}=function(){let e=(0,o.useTranslations)("GoogleLogin"),[t,i]=(0,r.useState)(null),f=(0,n.useSetAtom)(l.userHasLoggedInBeforeAtom),h=(0,n.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:g}=(0,u.useEmailPreferences)(),{refresh:p}=(0,a.usePageNavigation)(),{syncPreferencesFromUpsx:b}=(0,c.usePreferences)(),{authSuccess:w,authRedirect:y}=(0,d.useUserLogin)();return{loginWithGoogle:(0,r.useCallback)(async t=>{let{credential:r}=t;i(null);try{let e=await s.upsxClient.auth.loginWithGoogle({google_id_token:r}),t=e?.isFirstLogin;await w({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:n,onYourRadar:o,marketing:a,alwaysSubscribe:l}=h||{};return(t||l)&&await g({newsletter:i,weekly:n,onYourRadar:o,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 r=t?.data,n=r?.messageCode;if(!n)throw Error("No Error Message");switch(n){case 1e3:case 1026:case 1033:i({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:i({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){i({header:e("somethingWentWrong")})}return!1}},[f,b,p,w,y,g,h]),error:t,clearError:(0,r.useCallback)(()=>{i(null)},[])}}(),A=(0,g.useRefMemo)(v),P=(0,r.useRef)(null);I&&(P.current=I);let E=P.current;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.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=>{A.current?.(e)}}),y(!0)),e?.(),!b&&p&&t?.prompt()},id:"google-gsi-script"}),E&&(0,t.jsx)(h.Dialog,{open:!!I,onOpenChange:e=>!e&&x(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:E.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:E.body||""}}),primaryAction:{label:w("cancel"),onClick:x}})})]})}],874905)},499746,e=>{"use strict";var t=e.i(155252),r=e.i(206507),i=e.i(546446),n=e.i(427309),o=e.i(65816),a=e.i(145651),s=e.i(249725),l=e.i(663333),c=e.i(147732),u=e.i(381477),d=e.i(240058),m=e.i(316078),f=e.i(180193),h=e.i(368847),g=e.i(889951),p=e.i(343277),b=e.i(726249),w=e.i(674885),y=e.i(617874),v=e.i(184154),I=e.i(693796),x=e.i(526456),A=e.i(222127);let P=({identifier:e})=>{let n=(0,v.useParams)(),o=n?.locale||"en-US",a=(0,i.useAtomValue)(w.userUnitPreferenceAtom),l=(0,y.unitsSystemByName)(a)?.code,{fromLocationPoint:c}=(0,I.useLocationData)(),{recordFeatureId:P}=(0,s.useLocationFeatureIds)(),E=e.placeId?(0,b.pointKey)({kind:"placeId",value:e.placeId},o):e.geocode?(0,b.pointKey)({kind:"geocode",value:e.geocode},o):null,{data:S,isLoading:k}=(0,u.default)(E,()=>e.placeId?(0,p.getLocationPointByPlaceId)(e.placeId,o):e.geocode?(0,p.getLocationPointByGeocode)((0,b.formatGeocode)(e.geocode),o):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),N=e.placeId?void 0:e.geocode,j=S?c(S,N):void 0;(0,r.useEffect)(()=>{let e=S?.location;e?.placeId&&P({placeId:e.placeId,geocode:N??`${e.latitude},${e.longitude}`},e.featureId??null)},[S,N,P]);let{data:C,isLoading:_}=(0,u.default)(j&&["currentObservations",j.geocode,l,o],([e,t,r,i])=>(0,g.getCurrentObservations)({geocode:t,units:r,language:i}),{revalidateOnFocus:!1,dedupingInterval:6e4}),L=S?.location?.placeId??e.placeId,{path:R,isGeolocationLoading:G}=(0,A.default)(L||"",{targetGeocode:j?.geocode??e.geocode}),O=k||_||!j||G,U=C?.temperature,T=C?.wxPhraseLong,M=C?.iconCode??-1,D=e.name||j?.name||j?.city||j?.displayName,B=(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":D?`${D} 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.jsxs)(h.default,{isLoading:O,skeletonClassName:"h-5 w-28",className:"flex items-center leading-[1.4] font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(x.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:D})]}),(0,t.jsx)(m.WxIcon,{isLoading:O,loadingIconClassName:"h-6 w-6 shrink-0",iconCode:M,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.default,{isLoading:O,skeletonClassName:"h-4 w-6 shrink-0",className:"shrink-0 text-sm leading-normal",color:"secondary",children:(0,t.jsx)(f.Temperature,{value:U})})," ",(O||T)&&(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-4 w-22",color:"secondary",className:"truncate text-sm leading-normal",children:T})]})]}),(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.jsxs)(h.default,{isLoading:O,skeletonClassName:"h-5 w-28",className:"flex items-center text-xl leading-normal font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(x.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:D})]}),(O||T)&&(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-4 w-24",color:"secondary",className:"truncate text-sm leading-normal",children:T})]}),(0,t.jsx)(m.WxIcon,{isLoading:O,loadingIconClassName:"mr-1 h-12 w-12 shrink-0",iconCode:M,className:"mr-1 h-12 w-12 shrink-0","aria-hidden":"true",iconTheme:"lightBG"}),(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-8 w-12 shrink-0",className:"shrink-0 text-[40px] leading-none font-extrabold",children:(0,t.jsx)(f.Temperature,{value:U})})]})]});return R?(0,t.jsx)(d.default,{href:R,className:"no-underline md:block md:w-full",children:B}):B};var E=e.i(523084),S=e.i(47524),k=e.i(632137);let N={left:E.ChevronLeft,right:S.ChevronRight},j=({buttonClassName:e,containerClassName:i,onClick:n,tabIndex:o,direction:a,...s})=>{let[l,c]=(0,r.useState)(!1),u=N[a];return(0,t.jsx)("div",{className:(0,k.cn)("absolute",i),children:(0,t.jsx)("button",{className:(0,k.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",l&&"!h-11 !w-11"),onClick:()=>{c(!0),setTimeout(()=>c(!1),75),n?.()},tabIndex:o,...s,children:(0,t.jsx)(u,{className:(0,k.cn)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",l&&"!h-6 !w-6")})})})},C=({locationIdentifiers:e,showScrollButtons:i})=>{let[n,o]=(0,r.useState)(!1),[a,s]=(0,r.useState)(!1),l=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(!1),m=(0,r.useCallback)(()=>{let e=l.current;if(!e||!i){o(!1),s(!1);return}let{scrollLeft:t,offsetWidth:r,scrollWidth:n}=e,a=Math.abs(t),c=a>0,u=a+r(0,c.debounce)(m,150),[m]);(0,r.useEffect)(()=>{let e=l.current;return e&&(d.current="rtl"===getComputedStyle(e).direction),m(),window.addEventListener("resize",f),()=>{null!==u.current&&cancelAnimationFrame(u.current),f.cancel(),window.removeEventListener("resize",f)}},[m,f]);let h=(0,r.useCallback)(()=>{null===u.current&&(u.current=requestAnimationFrame(()=>{m(),u.current=null}))},[m]),g=(0,r.useCallback)(()=>{l.current?.scrollBy({left:-200,behavior:"smooth"})},[]),p=(0,r.useCallback)(()=>{l.current?.scrollBy({left:200,behavior:"smooth"})},[]);return 0===e.length?null:(0,t.jsxs)("div",{className:"relative -mt-2 -mb-4 overflow-hidden",children:[i&&(0,t.jsx)(j,{containerClassName:(0,k.cn)("absolute top-[50%] -left-14.5 transition-[left] md:-left-13.5",{"left-9.5 md:left-11":n}),onClick:g,tabIndex:n?0:-1,"aria-hidden":!n,"aria-label":"Scroll left",direction:"left"}),(0,t.jsx)("div",{className:"scrollbar-hide flex gap-2 overflow-x-auto p-4 py-6",role:"list","data-testid":"forecast-module",onScroll:h,ref:l,children:e.map((e,r)=>(0,t.jsx)("div",{role:"listitem",children:(0,t.jsx)(P,{identifier:e})},e.placeId??e.geocode??r))}),i&&(0,t.jsx)(j,{containerClassName:(0,k.cn)("absolute top-[50%] -right-14.5 transition-[right] md:-right-13.5",{"right-9.5 md:right-11":a}),onClick:p,tabIndex:a?0:-1,"aria-hidden":!a,"aria-label":"Scroll right",direction:"right"})]})},_=()=>{let e,c,u=(e=(0,o.useHtml5Geocode)(),c=(0,i.useAtomValue)(n.geoipGeocode),e||c||void 0),{favoriteLocations:d,recentLocations:m}=(0,a.default)(),{resolveFeatureId:f}=(0,s.useLocationFeatureIds)(),h=(0,i.useAtomValue)(l.deviceClassAtom),g=(0,r.useMemo)(()=>(function({detectedGeocode:e,favoriteLocations:t,recentLocations:r,resolveFeatureId:i}){let n=[],o=new Set,a=e=>{let t=[];if(e.featureId?t.push(`f:${e.featureId}`):(e.placeId&&t.push(`p:${e.placeId}`),e.geocode&&t.push(`g:${(0,b.formatGeocode)(e.geocode)}`)),0===t.length)return!0;let r=t.some(e=>o.has(e));for(let e of t)o.add(e);return!r};if(e){let t=(0,b.formatGeocode)(e);a({featureId:i({geocode:t}),geocode:t}),n.push({geocode:t,isGeoIPLocation:!0})}for(let e of t){if(n.length>=5)break;if(!e.coordinate)continue;let t=(0,b.formatGeocode)(e.coordinate),r=e.placeID??void 0;a({featureId:i({placeId:r,geocode:t}),placeId:r,geocode:t})&&n.push({geocode:t,placeId:r,name:e.name??void 0})}for(let e of r){if(n.length>=5)break;a({featureId:i({placeId:e}),placeId:e})&&n.push({placeId:e})}return n})({detectedGeocode:u,favoriteLocations:d,recentLocations:m,resolveFeatureId:f}),[u,d,m,f]);return 0===g.length?null:(0,t.jsx)(C,{locationIdentifiers:g,showScrollButtons:"mobile"!==h&&"tablet"!==h})};e.s(["ForecastModule",0,_,"default",0,_],499746)},711899,e=>{e.v(t=>Promise.all(["static/chunks/0t3cdlg_o31nu.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/2pz2-5xjnibsl.js"].map(t=>e.l(t))).then(()=>t(72990)))}]);