"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6991],{4:(e,t,a)=>{a.d(t,{Cf:()=>c,L3:()=>u,LC:()=>d,ZJ:()=>s,lG:()=>o});var n=a(2013);a(45481);var l=a(4431),r=a(61790),i=a(48790);function o(e){let{...t}=e;return(0,n.jsx)(l.bL,{"data-slot":"dialog",...t})}function s(e){let{...t}=e;return(0,n.jsx)(l.ZL,{"data-slot":"dialog-portal",...t})}function d(e){let{className:t,...a}=e;return(0,n.jsx)(l.hJ,{"data-slot":"dialog-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function c(e){let{className:t,children:a,...o}=e;return(0,n.jsxs)(s,{"data-slot":"dialog-portal",children:[(0,n.jsx)(d,{}),(0,n.jsxs)(l.UC,{"data-slot":"dialog-content",className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...o,children:[a,(0,n.jsxs)(l.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,n.jsx)(r.A,{}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function u(e){let{className:t,...a}=e;return(0,n.jsx)(l.hE,{"data-slot":"dialog-title",className:(0,i.cn)("text-lg font-semibold leading-none",t),...a})}},6261:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSunWeatherAlertHeadlinesUrlConfig=function(e){let{geocode:t,countryCode:a,areaId:n,adminDistrictCode:l,language:r}=e,i={format:"json",language:r,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"};return t&&(i.geocode=t),a&&(i.countryCode=a),n&&(i.areaId=n),l&&(i.adminDistrictCode=l),{host:"api.weather.com",protocol:"https",pathname:"/v3/alerts/headlines",query:i}},t.getSunWeatherAlertDetailUrlConfig=function(e){let{detailKey:t,language:a}=e;return{host:"api.weather.com",protocol:"https",pathname:"/v3/alerts/detail",query:{alertId:t,format:"json",language:a,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}}},10839:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDailyForecastUrlConfig=function(e){let{geocode:t,units:a,language:l,duration:r=n.ForecastDuration.FIVE_DAY}=e;return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/forecast/daily/".concat(r),query:{geocode:t,units:a,language:l,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},t.getHourlyForecastUrlConfig=function(e){let{geocode:t,units:a,language:l,duration:r=n.HourlyForecastDuration.TWO_DAY}=e;return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/forecast/hourly/".concat(r),query:{geocode:t,units:a,language:l,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},t.getFifteenMinuteForecastUrlConfig=function(e){let{geocode:t,units:a,language:n}=e;return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/forecast/15minute",query:{geocode:t,units:a,language:n,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},t.getMinutelyPrecipitationForecastUrlConfig=function(e){let{geocode:t,units:a,language:n,duration:l="60minute"}=e;return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/forecast/minutely/precipitation/".concat(l),query:{geocode:t,units:a,language:n,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}};let n=a(39114)},18789:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getEmailPreferencesStatusUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/status"}},t.getEmailPreferencesSetUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/set"}},t.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/change-email"}}},21981:(e,t,a)=>{a.r(t),a.d(t,{TaboolaBlock:()=>c,default:()=>u});var n=a(2013),l=a(45481),r=a(13065),i=a(85620),o=a(35412),s=a(54898),d=a(48790);let c=e=>{let{placements:t,pageType:a,className:c="",showTaboola:u}=e,m=(0,s.A)(),h=(0,r.usePathname)(),{isTaboolaLoaded:f}=(()=>{let[e,t]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(e)return;if(document.getElementById("tb_loader_script"))return void t(!0);window._taboola=window._taboola||[],window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("tbl_ic");let a=document.createElement("script");a.src="//cdn.taboola.com/libtrc/theweatherchannel/loader.js",a.id="tb_loader_script",a.async=!0,a.onload=()=>{t(!0)},a.onerror=()=>{console.error("Failed to load Taboola script.")},document.body.appendChild(a)},[e]),{isTaboolaLoaded:e}})(),p=m&&!u,x=(0,l.useMemo)(()=>{let e=(0,i.yw)();return"".concat(e).concat(h||"")},[h]);return((0,l.useEffect)(()=>(p&&f&&(window._taboola.push({[a]:"auto",url:x}),t.forEach(e=>{window._taboola.push({...e})}),window._taboola.push({flush:!0})),()=>{f&&window._taboola.push({notify:"newPageLoad"})}),[p,f,a,x,t]),p)?(0,n.jsx)("section",{className:(0,d.cn)("@container",c),children:(0,n.jsx)(o.DebugCollector,{componentName:"TaboolaBlock",data:{props:{placements:t,pageType:a,className:c}}})}):null},u=c},30198:(e,t)=>{var a,n,l,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.PrecipIntensityCode=t.PrecipTypeCode=t.ThunderCategory=t.PrecipType=t.MoonPhaseCode=void 0,function(e){e.WANING_GIBBOUS="WNG",e.WAXING_CRESCENT="WXC",e.FIRST_QUARTER="FQ",e.WANING_CRESCENT="WNC",e.LAST_QUARTER="LQ",e.FULL="F",e.WAXING_GIBBOUS="WXG",e.NEW="N"}(a||(t.MoonPhaseCode=a={})),function(e){e.RAIN="rain",e.SNOW="snow",e.PRECIP="precip"}(n||(t.PrecipType=n={})),function(e){e.NO_THUNDER="0",e.THUNDER_POSSIBLE="1",e.THUNDER_EXPECTED="2",e.SEVERE_THUNDERSTORMS_POSSIBLE="3",e.SEVERE_THUNDERSTORMS_LIKELY="4",e.HIGH_RISK_OF_SEVERE_THUNDERSTORMS="5"}(l||(t.ThunderCategory=l={})),function(e){e[e.NONE=0]="NONE",e[e.RAIN=1]="RAIN",e[e.SNOW=2]="SNOW",e[e.FREEZING_RAIN=3]="FREEZING_RAIN",e[e.THUNDER=4]="THUNDER",e[e.SLEET=5]="SLEET",e[e.HAIL=6]="HAIL"}(r||(t.PrecipTypeCode=r={})),function(e){e[e.NONE=0]="NONE",e[e.VERY_LIGHT=1]="VERY_LIGHT",e[e.LIGHT=2]="LIGHT",e[e.MODERATE=3]="MODERATE",e[e.HEAVY=4]="HEAVY"}(i||(t.PrecipIntensityCode=i={}))},41050:(e,t)=>{t.J3=t.Ny=t.rn=void 0,t.rn="daily-newsletters-1",t.Ny="marketing-emails-1",t.J3=[{subscriptionGroupName:t.rn,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:t.Ny,subscriptionGroupId:"",isSubscribed:!1}]},53528:(e,t,a)=>{t.Sn=o;let n=a(6261),l=a(84851),r=a(47152),i=a(63685);async function o(e){let{geocode:t,language:a="en-US"}=e,o=(0,l.urlFrom)((0,n.getSunWeatherAlertHeadlinesUrlConfig)({geocode:t,language:a})),s=await fetch(o,{headers:{"Accept-Encoding":"gzip"},cache:"no-store",next:{revalidate:0}}),d=await (0,r.handleFetchResponse)(s);return{...d,alerts:(0,i.getSortedAlerts)(d.alerts)}}},54898:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(45481),l=a(39323),r=a(5653),i=a(12546);let o=function(){let{DISCONNECTED_user:e}=(0,r.J)(),[t,a]=(0,n.useState)(!1),o=(0,l.md)(i.W);return(0,n.useEffect)(()=>{o&&a((()=>{try{var e,t,a,n;if(void 0!==(null==(e=window)?void 0:e.DprSdk)){let e=null==(a=window)||null==(t=a.DprSdk)?void 0:t.getFeatureFlags();return null==(n=null==e?void 0:e.taboola)||n}return!0}catch(e){return!0}})())},[o]),t&&!(null==e?void 0:e.isUserPremium)}},57784:(e,t,a)=>{a.r(t),a.d(t,{PromoDriverBlock:()=>o,default:()=>s});var n=a(2013);a(45481);var l=a(12652),r=a(6216),i=a(82172);let o=e=>{let{title:t,image:a,subtitle:o,bodyText:s,ctaButton:d}=e,c=(null==d?void 0:d.url)&&/^https?:\/\//i.test(d.url),u=(0,i.bt)(a)?a:null;return t||u&&(null==u?void 0:u.url)||o||s||d?(0,n.jsxs)("div",{className:"overflow-hidden rounded-lg bg-white",children:[t&&(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)("h3",{className:"text-xl font-semibold text-gray-900",children:t})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(null==u?void 0:u.url)?(0,n.jsx)("div",{className:"relative aspect-[42/13] w-full overflow-hidden bg-white px-4 pt-4",children:(0,n.jsx)("div",{className:"relative h-full w-full overflow-hidden rounded-lg",children:(0,n.jsx)("a",{href:d&&d.url||"#",children:(0,n.jsx)(l.default,{src:u.url,alt:t||"Promo image",fill:!0,className:"object-cover"})})})}):null,(o||s||d)&&(0,n.jsxs)("div",{className:"p-4",children:[o&&(0,n.jsx)("a",{href:d&&d.url||"#",children:(0,n.jsx)("h4",{className:"mb-2 text-base font-bold",children:o})}),s&&(0,n.jsx)("a",{href:d&&d.url||"#",children:(0,n.jsx)("p",{className:"mb-4 text-base",children:s})}),d&&(0,n.jsx)("div",{className:"flex justify-end",children:c?(0,n.jsx)("a",{href:d.url||"#",target:d.openInNewTab?"_blank":"_self",rel:d.openInNewTab?"noopener noreferrer":"",className:"inline-block max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap rounded-lg bg-black px-4 py-2 text-base font-normal text-white",children:d.text}):(0,n.jsx)(r.default,{href:d.url||"#",target:d.openInNewTab?"_blank":"_self",className:"inline-block max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap rounded-lg bg-black px-4 py-2 text-base font-normal text-white",children:d.text})})]})]})]}):null},s=o},60181:(e,t,a)=>{t.j=i;let n=a(84851),l=a(47152),r=a(18789);async function i(){let e=(0,r.getEmailPreferencesStatusUrlConfig)(),t=(0,n.urlFrom)(e),a=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,l.handleFetchResponse)(a)}},63685:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSortedAlerts=void 0,t.getSortedAlerts=e=>[...e].sort((e,t)=>e.displayRank>t.displayRank?1:e.displayRankt.eventTrackingNumber?1:(e.eventTrackingNumber{t.vt=void 0,t.v1=s;let n=a(10839),l=a(84851),r=a(47152),i=a(68723),o=a(30198);async function s(e){let a=(0,n.getDailyForecastUrlConfig)(e),i=(0,l.urlFrom)(a),o=await fetch(i,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:1800}}),s=await (0,r.handleFetchResponse)(o);return(0,t.vt)(s)}t.vt=(0,i.createTransformer)((e,t,a)=>{var n,l,r,i,s,d,c,u,m,h,f,p,x,g,v,b,w,j,y,N,C,T,_,E;return{calendarDayTemperatureMax:null!=(l=e.calendarDayTemperatureMax)?l:0,calendarDayTemperatureMin:null!=(r=e.calendarDayTemperatureMin)?r:0,dayOfWeek:null!=(i=e.dayOfWeek)?i:"",expirationTimeUtc:null!=(s=e.expirationTimeUtc)?s:0,moonPhase:null!=(d=e.moonPhase)?d:"",moonPhaseCode:null!=(c=e.moonPhaseCode)?c:o.MoonPhaseCode.NEW,moonPhaseDay:null!=(u=e.moonPhaseDay)?u:0,moonriseTimeLocal:null!=(m=e.moonriseTimeLocal)?m:"",moonriseTimeUtc:null!=(h=e.moonriseTimeUtc)?h:0,moonsetTimeLocal:null!=(f=e.moonsetTimeLocal)?f:"",moonsetTimeUtc:null!=(p=e.moonsetTimeUtc)?p:0,narrative:null!=(x=e.narrative)?x:"",qpf:null!=(g=e.qpf)?g:0,qpfSnow:null!=(v=e.qpfSnow)?v:0,sunriseTimeLocal:null!=(b=e.sunriseTimeLocal)?b:"",sunriseTimeUtc:null!=(w=e.sunriseTimeUtc)?w:0,sunsetTimeLocal:null!=(j=e.sunsetTimeLocal)?j:"",sunsetTimeUtc:null!=(y=e.sunsetTimeUtc)?y:0,temperatureMax:null!=(N=e.temperatureMax)?N:0,temperatureMin:null!=(C=e.temperatureMin)?C:0,validTimeLocal:null!=(T=e.validTimeLocal)?T:"",validTimeUtc:null!=(_=e.validTimeUtc)?_:0,daypart:null!=(E=null==a||null==(n=a.daypart)?void 0:n[t])?E:{cloudCover:[],dayOrNight:[],daypartName:[],iconCode:[],iconCodeExtend:[],narrative:[],precipChance:[],precipType:[],qpf:[],qpfSnow:[],qualifierCode:[],qualifierPhrase:[],relativeHumidity:[],snowRange:[],temperature:[],temperatureHeatIndex:[],temperatureWindChill:[],thunderCategory:[],thunderIndex:[],uvDescription:[],uvIndex:[],windDirection:[],windDirectionCardinal:[],windPhrase:[],windSpeed:[],wxPhraseLong:[],wxPhraseShort:[]}}})},68723:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTransformer=function(e){return t=>((0,n.fromCompactResponse)(t)||[]).map((a,n)=>e(a,n,t))};let n=a(96918)},71854:(e,t,a)=>{a.r(t),a.d(t,{CurrentConditionsBlock:()=>A,default:()=>k});var n=a(2013);a(45481);var l=a(15664),r=a(7222),i=a(61404),o=a(66958),s=a(39114),d=a(53528),c=a(95155),u=a(53149),m=a(60276),h=a(37888);let f=e=>{let{location:t}=e,{data:a,error:r,isLoading:i}=(0,l.Ay)((null==t?void 0:t.geocode)?["alerts",t.geocode]:null,e=>{let[t,a]=e;return(0,d.Sn)({geocode:a,language:"en-US"})},{revalidateOnFocus:!1,dedupingInterval:6e4}),o=(null==a?void 0:a.alerts)&&a.alerts.length>0?a.alerts[0]:null,s=o?(()=>{if(!o)return null;let{productIdentifier:e,phenomena:t,significance:a}=o;if(!e||!t||!a)return null;let n=(0,c.F)({productIdentifier:e,phenomena:t,significance:a}),l=(0,u.t)({productIdentifier:e||"",phenomena:t,significance:a}),r={1:{icon:"#fff",fill:"#ba0d00",border:"#f0f0f0",textColor:"#FFFFFF",backgroundColor:"#ba0d00",buttonBackgroundColor:"#ba0d00"},2:{icon:"#000",fill:"#e6731f",border:"#f0f0f0",textColor:"#ffffff",backgroundColor:"#252422cc",buttonBackgroundColor:"#ffffff1a"},3:{icon:"#000",fill:"#ebbb02",border:"#f0f0f0",textColor:"#ffffff",backgroundColor:"#252422cc",buttonBackgroundColor:"#ffffff1a"},4:{icon:"#fff",fill:"#a51ccb",border:"#f0f0f0",textColor:"#FFFFFF",backgroundColor:"#252422cc",buttonBackgroundColor:"#ffffff1a"},severe:{icon:"#fff",fill:"#ba0d00",border:"#f0f0f0",textColor:"#FFFFFF",backgroundColor:"#ba0d00",buttonBackgroundColor:"#ba0d00"}};return r[l?"severe":n]||r[4]})():null,f=o?(0,c.F)({productIdentifier:o.productIdentifier,phenomena:o.phenomena,significance:o.significance}):null,p=o?(0,u.t)({productIdentifier:o.productIdentifier,phenomena:o.phenomena,significance:o.significance}):null;return i||r||!o?null:(0,n.jsxs)("div",{className:"flex items-center gap-4 rounded-sm px-2 py-2 text-sm",style:{backgroundColor:null==s?void 0:s.backgroundColor,color:null==s?void 0:s.textColor},role:"alert","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"flex flex-1 gap-2",children:[o&&(0,n.jsx)(m.AlertIcon,{productIdentifier:o.productIdentifier,phenomena:o.phenomena,significance:o.significance,className:"h-4 w-4 items-start","aria-hidden":"true"}),(0,n.jsx)("span",{className:"uppercase",children:o.eventDescription})]}),a&&a.alerts.length>1&&(0,n.jsxs)(h.$n,{variant:"outline",size:"sm",style:{backgroundColor:null==s?void 0:s.buttonBackgroundColor,...1===f||p?{outline:"solid 1px #ffffff"}:{}},className:"rounded-xs flex h-6 items-center justify-center border-0 px-2 py-2 text-xs text-white hover:bg-transparent hover:text-white","aria-label":"View ".concat(a.alerts.length-1," more alerts"),children:["+",a.alerts.length-1," MORE"]})]})};var p=a(46949),x=a(1046);let g=e=>{let{location:t,weatherData:a,forecastData:l,isLoading:r,error:i,formattedTime:o,video:s}=e;return t?r?(0,n.jsx)(w,{location:t}):!i&&a&&l?(0,n.jsx)(v,{location:t,weatherData:a,forecastData:l,formattedTime:o,video:s}):(0,n.jsx)(b,{location:t,error:i}):(0,n.jsx)(w,{message:"Loading location..."})},v=e=>{let{location:t,weatherData:a,forecastData:l,formattedTime:r,video:i}=e;return(0,n.jsxs)("div",{className:"overflow-hidden rounded-lg",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between bg-teal-800 p-4 text-white",children:[(0,n.jsxs)(p.Ay,{variant:"Title.S",color:"inverse",elementType:"h2",children:[t.displayName,", ",t.adminDistrict]}),(0,n.jsxs)(p.Ay,{color:"inverse",children:["As of ",r]})]}),(0,n.jsxs)("div",{className:"flex min-h-[100px] flex-col bg-teal-600 p-4 text-white",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)(p.Ay,{variant:"Display.XL",color:"inverse",elementType:"h2",children:[Math.round(a.temperature),"\xb0"]}),(0,n.jsx)("div",{className:"ml-4",children:(0,n.jsx)(x.WxIcon,{iconCode:a.iconCode,className:"lightBG h-20 w-20","aria-label":a.wxPhraseLong,iconTheme:"lightBG"})})]}),(0,n.jsxs)("div",{className:"mt-auto flex items-end justify-between",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(p.Ay,{variant:"Title.M",color:"inverse",elementType:"p",children:a.wxPhraseLong}),(0,n.jsxs)(p.Ay,{className:"mt-2",variant:"Title.M",color:"inverse",elementType:"p",children:["Day ",Math.round(l.temperatureMax),"\xb0 • Night"," ",Math.round(l.temperatureMin),"\xb0"]})]}),(0,n.jsx)("div",{className:"max-w-[50%]",children:(0,n.jsx)(f,{location:t})})]})]}),i&&(0,n.jsx)(j,{title:i.title,url:i.url})]})},b=e=>{let{location:t,error:a}=e;return(0,n.jsxs)("div",{className:"overflow-hidden rounded-lg",children:[(0,n.jsx)("div",{className:"flex items-center justify-between bg-slate-800 p-4 text-white",children:(0,n.jsxs)("h2",{className:"text-xl font-medium",children:[t.displayName,", ",t.adminDistrict]})}),(0,n.jsxs)("div",{className:"flex min-h-[100px] flex-col bg-teal-600 p-8 text-white",children:[(0,n.jsx)("div",{className:"flex flex-grow items-center justify-center",children:(0,n.jsx)("div",{className:"text-xl text-red-300",children:(null==a?void 0:a.message)||"Unable to load weather data"})}),(0,n.jsx)("div",{className:"mt-auto flex items-end justify-end",children:(0,n.jsx)("div",{className:"max-w-[50%]",children:(0,n.jsx)(f,{location:t})})})]})]})},w=e=>{let{location:t,message:a="Loading weather data..."}=e;return(0,n.jsxs)("div",{className:"overflow-hidden rounded-lg",children:[(0,n.jsx)("div",{className:"flex items-center justify-between bg-slate-800 p-4 text-white",children:(0,n.jsx)("h2",{className:"text-xl font-medium",children:t?"".concat(t.displayName,", ").concat(t.adminDistrict):"Loading location..."})}),(0,n.jsxs)("div",{className:"flex min-h-[100px] flex-col bg-teal-600 p-8 text-white",children:[(0,n.jsx)("div",{className:"flex flex-grow items-center justify-center",children:(0,n.jsx)("div",{className:"animate-pulse text-xl",children:a})}),t&&(0,n.jsx)("div",{className:"mt-auto flex items-end justify-end",children:(0,n.jsx)("div",{className:"max-w-[50%]",children:(0,n.jsx)(f,{location:t})})})]})]})},j=e=>{let{title:t}=e;return(0,n.jsxs)("div",{className:"flex cursor-pointer items-center gap-3 bg-teal-800 p-4 text-white transition-colors hover:bg-teal-700",children:[(0,n.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-white text-teal-800",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})})}),(0,n.jsxs)(p.Ay,{color:"inverse",children:["Watch: ",t]})]})};var y=a(35412),N=a(39323),C=a(98809),T=a(95672);let _=e=>{let{location:t,video:a}=e,{effectiveLocation:d,isLocationLoading:c,locationError:u}=(0,r.s)({location:t}),{weatherData:m,forecastData:h,isLoading:f,error:p,formattedTime:x}=function(e){var t,a,n,r,d;let c=(0,N.md)(C.Yt),u=null==(t=(0,T.xP)(c))?void 0:t.code,{data:m,error:h,isLoading:f}=(0,l.Ay)(e?["weather",e.geocode,u]:null,e=>{let[t,a,n]=e;return(0,i.z)({geocode:a,units:n,language:"en-US"})},{revalidateOnFocus:!1,dedupingInterval:6e4}),{data:p,error:x,isLoading:g}=(0,l.Ay)(e?["daily-forecast",e.geocode,u]:null,t=>{let[a,n,l]=t;return e?(0,o.v1)({geocode:n,units:l,language:"en-US"}):null},{revalidateOnFocus:!1,dedupingInterval:6e4}),v=m?{temperature:m.temperature,wxPhraseLong:m.wxPhraseLong,iconName:s.ICON_CODE_MAP[m.iconCode]||"na",iconCode:m.iconCode,validTimeLocal:m.validTimeLocal}:void 0,b=p&&p.length>0?{temperatureMax:null!=(r=null==(a=p[0])?void 0:a.calendarDayTemperatureMax)?r:0,temperatureMin:null!=(d=null==(n=p[0])?void 0:n.calendarDayTemperatureMin)?d:0}:void 0,w=v?((e,t)=>{if(!e)return"";try{let t=new Date(e);return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"})}catch(e){return console.error("Error formatting time:",e),""}})(v.validTimeLocal):"";return{weatherData:v,forecastData:b,isLoading:f||g,error:h||x,formattedTime:w}}(d),v=f||c,b=p||u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.DebugCollector,{componentName:"CurrentConditions",data:{props:{location:t,video:a},state:{effectiveLocation:d,isLocationLoading:c,isLoading:v,weatherData:m,forecastData:h,formattedTime:x,error:b,componentState:b&&"error"||v&&"loading"||"ready"},performance:{renderCount:void 0}}}),(0,n.jsx)(g,{location:d,weatherData:m,forecastData:h,isLoading:v,error:b,formattedTime:x,video:a})]})};var E=a(10745),S=a(2998);let A=e=>{let{locationProvider:t,locationEntry:a}=e,{data:r,error:i,isLoading:o}=(0,l.Ay)("specified"===t&&a?["specified-location-data",a]:null,()=>a?(0,E.PT)(a):null,{revalidateOnFocus:!1,dedupingInterval:3e5});return"specified"===t&&o?(0,n.jsx)("div",{children:"Loading location data..."}):"specified"===t&&i?(0,n.jsxs)("div",{children:["Error loading location data: ",i.message]}):"specified"===t&&r&&a?(0,n.jsx)(_,{location:(0,S.I)(r)}):"specified"!==t?(0,n.jsx)(_,{}):null},k=A},72770:(e,t,a)=>{a.r(t),a.d(t,{MorningBriefBlock:()=>z,default:()=>H});var n=a(2013),l=a(45481),r=a(23422),i=a(62900),o=a(73098),s=a(37888),d=a(88537),c=a(15664),u=a(1832),m=a(73093),h=a(12674),f=a(40010),p=a(48790);function x(e){let{className:t,...a}=e;return(0,n.jsx)(h.uB,{"data-slot":"command",className:(0,p.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...a})}function g(e){let{className:t,...a}=e;return(0,n.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,n.jsx)(f.A,{className:"size-4 shrink-0 opacity-50"}),(0,n.jsx)(h.uB.Input,{"data-slot":"command-input",className:(0,p.cn)("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",t),...a})]})}function v(e){let{className:t,...a}=e;return(0,n.jsx)(h.uB.List,{"data-slot":"command-list",className:(0,p.cn)("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",t),...a})}function b(e){let{className:t,...a}=e;return(0,n.jsx)(h.uB.Group,{"data-slot":"command-group",className:(0,p.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...a})}function w(e){let{className:t,...a}=e;return(0,n.jsx)(h.uB.Item,{"data-slot":"command-item",className:(0,p.cn)("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...a})}a(4);var j=a(14390);function y(e){var t;let{label:a,placeholder:r,className:o,location:h,onChangeLocation:f}=e,[y,N]=(0,l.useState)(!1),[C,T]=(0,l.useState)(""),{isLoading:_,data:E}=function(e){let t=e.trim().length>0,{isLoading:a,data:n,error:l}=(0,c.Ay)(t?["search/locations",encodeURIComponent(e)]:null,async()=>await (0,d.SK)(e));return{isLoading:a,data:n,error:l}}((0,u.A)(C,300));return(0,n.jsxs)(m.AM,{open:y,onOpenChange:N,children:[(0,n.jsx)(m.Wv,{asChild:!0,children:(0,n.jsxs)(s.$n,{variant:"outline",role:"combobox",className:(0,p.cn)("text-muted-foreground flex w-full text-nowrap bg-white px-2",o),children:[(0,n.jsx)("div",{children:_?(0,n.jsx)(i.A,{className:"animate-spin"}):(0,n.jsx)(j.A,{})}),(0,n.jsx)("div",{className:"flex flex-1 px-2 text-start",children:null!=(t=null==h?void 0:h.displayName)?t:a})]})}),(0,n.jsx)(m.hl,{className:"w-[var(--radix-popover-trigger-width)]",showArrow:!1,children:(0,n.jsxs)(x,{shouldFilter:!1,children:[(0,n.jsx)(g,{placeholder:r,value:C,onValueChange:T}),(0,n.jsx)(v,{children:(0,n.jsx)(b,{children:null==E?void 0:E.map(e=>(0,n.jsx)(w,{value:e.locId,onSelect:()=>{null==f||f(e),N(!1)},children:e.address},e.locId))})})]})})]})}var N=a(51856);function C(e){let{label:t,error:a,className:l,...r}=e;return(0,n.jsxs)("div",{className:"w-full",children:[t&&(0,n.jsx)("label",{className:"text-sm",children:t}),(0,n.jsx)(N.p,{...r,className:a?"".concat(l," border-red-500"):l})]})}var T=a(6216);let _={"{{terms}}":{text:"Terms",url:"https://".concat("weather.com","/legal")},"{{privacy}}":{text:"Privacy Policy",url:"https://".concat("weather.com","/en-US/twc/privacy-policy")}},E=/\{\{(.*?)\}\}/g;function S(){return(0,n.jsx)("div",{className:"mt-4 text-xs",children:"By signing up you agree to the {{terms}} & {{privacy}}. Unsubscribe at any time.".split(E).map((e,t)=>{let a=_["{{".concat(e,"}}")];return a?(0,n.jsx)(T.default,{href:a.url,className:"underline",children:a.text},t):(0,n.jsx)("span",{children:e},t)})})}let A={src:"/_next/static/media/morning-brief-logo.73126316.svg"},k={src:"/_next/static/media/ellipse.b0c8befa.png"};var I=a(69489),L=a(80043),D=a(10745),P=a(39323),R=a(60181);let M=(0,a(83013).tG)("emailPreferences",null,void 0,{getOnInit:!0});var F=a(5653),U=a(41050);let O=()=>{let[e,t]=(0,P.fp)(M),{user:a}=(0,F.J)(),n=(null==a?void 0:a.userID)||null,r=(null==a?void 0:a.isUserLoggedIn)||!1,i=(0,l.useCallback)(a=>{n&&t({userId:n,expiry:Date.now()+9e5,subscriptions:function(e,t){let a=(null==t?void 0:t.length)?t:U.J3,n={};return e?(null==a||a.forEach(e=>{n[e.subscriptionGroupName]=e}),e.forEach(e=>{n[e.subscriptionGroupName]=e}),Object.values(n)):a}(a,null==e?void 0:e.subscriptions)})},[n,t,null==e?void 0:e.subscriptions]),o=e&&e.userId===n&&e.expiry&&e.expiry>Date.now();return(0,c.Ay)(n&&r&&!o?"getEmailPreferencesStatus/".concat(n):void 0,()=>(0,R.j)(),{revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{n&&e&&i(e.subscriptions)}}),{subscriptions:n&&e?e.subscriptions:null,updateSubscriptions:i}};async function W(e,t){let{arg:a}=t,{email:n,location:l,isAnonymous:r}=a,{location:i}=await (0,D.$M)(l.placeId).catch(()=>({location:null})),o={subscriptions:[{subscriptionGroupName:e,isSubscribed:!0,attributes:{location:l.placeId,latitude:l.latitude,longitude:l.longitude,dmaCode:(null==i?void 0:i.dmaCd)||null,adminDistrict:l.adminDistrict,adminDistrictCode:l.adminDistrictCode||null,postalCode:l.postalCode}}]};return r&&(o.email=n),await (0,L.p_)(o).then(e=>({...e,sentSubscriptions:o.subscriptions}))}var B=a(39849),G=a(94120);let z=()=>{var e,t;let{userProfile:a}=(0,F.J)(),[d,c]=(0,l.useState)(null!=(e=null==a?void 0:a.email)?e:""),[u,m]=(0,l.useState)(null),[h,f]=(0,l.useState)(!1),{data:p,loading:x,onSubmit:g,error:v}=function(){let{updateSubscriptions:e}=O(),{isMutating:t,trigger:a,data:n,error:r,reset:i}=(0,I.A)("newsletter/signup/daily-newsletters-1",(e,t)=>W("daily-newsletters-1",t));return{loading:t,error:r,data:n,onSubmit:(0,l.useCallback)(async t=>{let n=await a(t);return n.sentSubscriptions&&e(n.sentSubscriptions),n},[a,e]),onReset:i}}(),{subscriptions:b}=O(),w=(0,l.useMemo)(()=>(0,G.C)(b,U.rn),[b]),j=(0,l.useCallback)(async e=>{e.preventDefault(),!x&&d.trim()&&u&&(f(!0),await g({email:d,location:u,isAnonymous:!(null==a?void 0:a.email)}))},[g,d,u,x,null==a?void 0:a.email]);return!h&&(null==w?void 0:w.isSubscribed)?null:(0,n.jsxs)("div",{style:{backgroundImage:'url("'.concat(k.src,'")'),backgroundPosition:"right top",backgroundRepeat:"no-repeat",backgroundSize:"70px"},className:"my-4 space-y-2 rounded-xl bg-white py-5 pl-5 pr-[30px] shadow-[0_3px_20px_0_rgba(181,171,162,0.5)]",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:gap-3",children:[(0,n.jsx)(B.A,{src:A.src,alt:"",className:"w-37.5 m-0",rounded:!1}),(0,n.jsx)("div",{className:"mb-1.5 hidden min-h-[24px] min-w-[2px] bg-black sm:block"}),(0,n.jsx)("div",{className:"text-lg font-semibold",children:"Weather in your inbox"})]}),(null==p?void 0:p.status)==="success"?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(r.A,{className:"h-6 w-6 text-green-500"}),(0,n.jsx)("div",{className:"text-sm text-gray-700",children:(0,n.jsx)("p",{children:"You are subscribed to the Morning Brief newsletter."})})]}):(0,n.jsxs)("form",{onSubmit:j,className:"flex flex-1 flex-col items-end gap-4 pt-4 lg:flex-row",children:[(0,n.jsx)(C,{id:"email",required:!0,type:"email",placeholder:"Email",className:"h-12",value:d,onChange:e=>c(e.target.value),error:!!(null==p?void 0:p.emailError),disabled:!!(null==a?void 0:a.email)}),(0,n.jsx)(y,{label:"Forecast Location",placeholder:"Search City or Zip Code",className:"h-12 items-center text-sm",location:u,onChangeLocation:m}),(0,n.jsx)("div",{children:(0,n.jsxs)(s.$n,{type:"submit",className:"flex h-12 items-center gap-1 text-nowrap",disabled:x||!(d&&u),children:[(0,n.jsx)("span",{children:"Sign Up"}),x&&(0,n.jsx)(i.A,{className:"animate-spin"})]})})]}),v&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-red-500",children:[(0,n.jsx)(o.A,{className:"h-6 w-6 text-red-500"}),(0,n.jsx)("div",{className:"text-sm",children:"Failed to subscribe, please try again."})]}),(null==p?void 0:p.status)==="error"&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-red-500",children:[(0,n.jsx)(o.A,{className:"h-6 w-6 text-red-500"}),(0,n.jsx)("div",{className:"text-sm",children:null!=(t=p.emailError)?t:p.error})]}),(0,n.jsx)(S,{})]})};z.displayName="MorningBriefBlock";let H=z},80043:(e,t,a)=>{t.p_=i;let n=a(84851),l=a(47152),r=a(18789);async function i(e){let t=(0,r.getEmailPreferencesSetUrlConfig)(),a=(0,n.urlFrom)(t),i=JSON.stringify(function(e){let{subscriptions:t,email:a,mParticleId:n}=e,l={};return t&&(l.subscriptions=t),a&&(l.email=a),n&&(l.mParticleId=n),l}(e)),o=await fetch(a,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:i});if(200===o.status||400===o.status){let e=await o.json();return console.log({json:e}),e}return(0,l.handleFetchResponse)(o)}},84504:(e,t,a)=>{a.r(t),a.d(t,{DailyForecastBlock:()=>j,default:()=>y});var n=a(2013);a(45481);var l=a(37888),r=a(66958),i=a(39114),o=a(15664),s=a(7222),d=a(1046),c=a(31128),u=a(48790),m=a(99890);let h=function(e,t){let a=(0,m.G)();return a?a.variant(e,t):t};var f=a(39323),p=a(98809),x=a(95672);let g=e=>{let{iconCode:t,wxPhraseLong:a}=e,l=a||"Weather condition ".concat(t);return"na"!==(i.ICON_CODE_MAP[t]||"na")?(0,n.jsx)(d.WxIcon,{iconCode:t,className:"lightBG",size:"xl","aria-label":l,iconTheme:"lightBG"}):(0,n.jsx)(c.Y,{size:"xl",className:"lightBG","aria-label":"Weather icon not available"})},v=e=>{var t;let{location:a}=e,{value:d}=h("reorder-current-conditions-and-forecast","control"),{effectiveLocation:c,isLocationLoading:m}=(0,s.s)({location:a}),v=(0,f.md)(p.Yt),b=null==(t=(0,x.xP)(v))?void 0:t.code,{data:w,error:j,isLoading:y}=(0,o.Ay)(c?["daily-forecast",c.geocode,b]:null,e=>{let[t,a,n]=e;return c?(0,r.v1)({geocode:a,units:n,language:"en-US",duration:i.ForecastDuration.THREE_DAY}):null},{revalidateOnFocus:!1,dedupingInterval:6e4}),N=[];if(w&&w[0]&&w[0].daypart){let e=w[0].daypart;if(e&&e.daypartName)for(let t=0;t{let a="Afternoon"===e.name||"Evening"===e.name?"text-blue-600":"text-slate-700";return(0,n.jsxs)("div",{className:"flex items-center justify-between px-6 py-5","data-testid":"forecast-period-".concat(t),children:[(0,n.jsx)("div",{className:"w-1/3 text-xl font-medium text-gray-700","data-testid":"period-name",children:e.name}),(0,n.jsxs)("div",{className:"text-5xl font-bold ".concat(a," w-1/3 text-center"),"data-testid":"temperature",children:[e.temperature,"\xb0"]}),(0,n.jsxs)("div",{className:"flex w-1/3 items-center justify-end",children:[(0,n.jsx)("div",{className:"flex w-12 justify-center","data-testid":"weather-icon",children:(0,n.jsx)(g,{iconCode:e.iconCode,wxPhraseLong:i.ICON_CODE_MAP[e.iconCode]})}),(0,n.jsx)("div",{className:"ml-6 w-16 text-xl font-medium text-gray-700","data-testid":"precipitation",children:e.precipitation})]})]},e.name)})}),(0,n.jsx)("div",{className:"flex justify-start p-4",children:(0,n.jsx)(l.$n,{variant:"default",className:"rounded-md bg-slate-900 text-white hover:bg-slate-800","data-testid":"next-48-hours",children:"Next 48 Hours"})})]}):(0,n.jsxs)("div",{className:"overflow-hidden rounded-lg bg-white shadow-md",children:[(0,n.jsx)("div",{className:"bg-slate-800 p-4 text-white",children:(0,n.jsx)("h2",{className:"text-2xl font-bold",children:"Loading location..."})}),(0,n.jsx)("div",{className:"flex h-64 items-center justify-center p-6",children:(0,n.jsx)("div",{className:"animate-pulse text-xl",children:"Determining location..."})})]})};var b=a(10745),w=a(2998);let j=e=>{let{locationProvider:t,locationEntry:a}=e,{data:l,error:r,isLoading:i}=(0,o.Ay)("specified"===t&&a?["specified-location-data",a]:null,()=>a?(0,b.PT)(a):null,{revalidateOnFocus:!1,dedupingInterval:3e5});return"specified"===t&&i?(0,n.jsx)("div",{children:"Loading location data..."}):"specified"===t&&r?(0,n.jsxs)("div",{children:["Error loading location data: ",r.message]}):"specified"===t&&l&&a?(0,n.jsx)(v,{location:(0,w.I)(l)}):"specified"!==t?(0,n.jsx)(v,{}):null},y=j},85620:(e,t,a)=>{a.d(t,{yw:()=>r});var n=a(65449),l=a(37811);let r=()=>{if(n.A){let e=window.location.protocol,t=window.location.hostname,a=window.location.port;return"".concat(e,"//").concat(t).concat(a?":".concat(a):"")}return(()=>{let e=l.env.NEXT_PUBLIC_SERVER_URL;return!e&&l.env.VERCEL_PROJECT_PRODUCTION_URL?"production"===l.env.VERCEL_ENV?"https://weather.com":"https://".concat(l.env.VERCEL_PROJECT_PRODUCTION_URL):(e||(e="https://localhost:3001"),e)})()}},86144:(e,t,a)=>{a.r(t),a.d(t,{ContentMediaBlock:()=>c,default:()=>u});var n=a(2013),l=a(12652),r=a(21068),i=a(17838),o=a(6216),s=a(37888),d=a(21166);let c=e=>{let{contentQuery:t,limit:a=4,title:c="Trending",ctaText:u="More Stories",ctaLink:m="/"}=e,h=(null==t?void 0:t.mergedContent)||[];if(!(0,i.J)(h))return null;let f=h.slice(0,Number(a));if(f.every(e=>"image"===e.contentType)){let e=f.map(e=>({id:e.id,url:e.overrideThumbnail||e.thumbnail||"",filename:e.overrideTitle||"",seo:{altText:e.overrideTitle||e.title,caption:e.overrideDescription||e.description||""}}));return(0,n.jsx)("section",{className:"not-prose mx-auto w-full max-w-4xl",children:(0,n.jsx)(d.A,{id:"content-media-slideshow-".concat(Math.random().toString(36).substring(2,9)),assets:e,allSlides:e,slides:[],totalAssets:e.length,rounded:!0,sendTrackString:()=>{},blockType:"Slideshow"})})}return(0,n.jsxs)("section",{className:"@container not-prose mx-auto w-full max-w-4xl rounded-md bg-white p-5",children:[(0,n.jsx)("h2",{className:"not-prose mb-4 text-2xl font-bold",children:c}),(0,n.jsx)("div",{className:"@md:grid-cols-2 @lg:grid-cols-4 grid grid-cols-1 gap-4",children:f.map(e=>{var t;let a=e.overrideTitle||e.title,i=e.overrideThumbnail||e.thumbnail,s=(null==(t=e.url)?void 0:t.includes("video"))||!1,d=e.source||"Weather News";return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"relative mb-2 h-32 w-full overflow-hidden rounded-md",children:[(0,n.jsx)(l.default,{src:i||"/placeholder.svg",alt:a,fill:!0,className:"object-cover",sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 25vw",style:{position:"absolute",height:"100%",width:"100%",left:0,top:0}}),s&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,n.jsx)("div",{className:"flex size-10 items-center justify-center rounded-full bg-white/80",children:(0,n.jsx)(r.A,{className:"ml-0.5 size-4 text-gray-800"})})})]}),(0,n.jsx)("div",{className:"mb-1 text-xs font-medium text-gray-600",children:d}),(0,n.jsx)("h3",{className:"not-prose mb-1 text-base font-normal leading-tight text-gray-900",children:(0,n.jsx)(o.default,{href:e.url||"#",className:"not-prose font-normal text-gray-900 no-underline hover:no-underline",children:a})})]},e.id)})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(o.default,{href:null!=m?m:"/",children:(0,n.jsx)(s.$n,{className:"rounded bg-gray-900 px-4 py-2 text-sm font-medium text-white hover:bg-gray-800",children:u})})})]})},u=c},94120:(e,t)=>{t.C=void 0,t.C=(e,t,a)=>e&&Array.isArray(e)?e.find(e=>e.subscriptionGroupName===t)||a||null:a||null},95984:(e,t,a)=>{a.r(t),a.d(t,{CTABlock:()=>r,default:()=>i});var n=a(2013);a(45481);var l=a(39849);let r=e=>{let{title:t,subTitle:a,subText:r,ctaStyle:i,media:o,buttonText:s,linkUrl:d,openInNewTab:c,backgroundColor:u}=e,m=void 0!=o.url?o.url:"string"==typeof o?o:null;return(0,n.jsx)("section",{className:"@container not-prose mx-auto w-full max-w-4xl rounded-md ".concat({white:"bg-white","light-gray":"bg-gray-100","brand-blue":"bg-blue-500",accent:"bg-accent"}[u||"white"]," p-5 shadow-2xl"),children:(0,n.jsx)("div",{className:"cta-block ".concat(i),children:(0,n.jsxs)("div",{className:"cta-content text-black",children:[(0,n.jsx)("h2",{className:"mb-6 text-2xl font-bold",children:t}),m&&(0,n.jsx)("a",{href:d,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,className:"mb-4 block overflow-hidden rounded-lg",children:(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsx)(l.A,{src:m,alt:t})})}),a&&(0,n.jsx)("h2",{className:"mb-2 text-lg font-bold",children:a}),r&&(0,n.jsx)("p",{className:"mb-4",children:r}),"standard"===i&&(0,n.jsx)("div",{className:"mt-4 flex justify-end",children:(0,n.jsx)("a",{href:d,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,className:"inline-block rounded-lg bg-black px-6 py-3 text-white transition-colors hover:bg-gray-800",children:s||"Learn More"})})]})})})},i=r},96918:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromCompactResponse=function(e){if(!e)return null;let t=Object.keys(e);return t.length&&t[0]&&void 0!==e[t[0]]&&Array.isArray(e[t[0]])?Array.from({length:e[t[0]].length},(a,n)=>{let l={};return t.forEach(t=>{let a=e[t];void 0!==a&&Array.isArray(a)&&n{a.r(t),a.d(t,{AdBlock:()=>d,default:()=>c});var n=a(2013),l=a(45481),r=a(35412),i=a(48790),o=a(95984),s=a(5653);let d=e=>{let{adId:t,variant:a="banner",title:d=null,height:c="120px",className:u=""}=e,{user:m}=(0,s.J)(),{isUserPremium:h}=m,[f,p]=(0,l.useState)({loaded:!1,height:c,displayAd:!1}),x=(0,l.useRef)(null),g=(0,l.useRef)({resize:null,adFrameMutation:null,adCreativeMutation:null}),v=(0,l.useMemo)(()=>{if("WX_Hidden"===t||!f.displayAd)return"hidden";if("WX_WindowShade"===t)return"region-contentTop overflow-hidden mb-4";if("WX_BottomLeader"===t)return"bg-white rounded-md overflow-hidden px-4 pb-4 mt-4";if("WX_SpotLight"===t||"WX_DriverUnit"===t)return"overflow-hidden bg-white mb-4";if("WX_Top300Variable"===t)return"sticky top-[82px] z-45 bg-white rounded-md overflow-hidden px-4 pb-4";if("MW_Position1"===t)return"bottom-[61px] block fixed w-full z-[98] bg-[#dee0e3] p-2";else if("MW_Position3"===t)return"overflow-hidden mb-5";else if("MW_Position4"===t||"MW_Position5"===t)return"rounded-lg overflow-hidden bg-white pt-0 px-4 pb-4";else if("banner"===a)return"rounded-lg overflow-hidden bg-white shadow-md mb-4";return"bg-white rounded-md overflow-hidden px-4 pb-4"},[t,a,f.displayAd]),b=(0,l.useMemo)(()=>{let e=f.loaded?"visible":"invisible";return"".concat("text-center w-full h-full flex text-gray-600 text-base leading-none"," ").concat("WX_SpotLight"!==t?"justify-center":""," ").concat(e)},[t,f.loaded]),w=(0,l.useCallback)(e=>{for(let t of e){let e=t.contentRect.height;e>0&&p(t=>({...t,height:"".concat(e+10,"px"),loaded:!0}))}},[]),j=(0,l.useCallback)(e=>{let t=e.some(e=>"childList"===e.type&&e.addedNodes.length>0);p(e=>({...e,displayAd:t}))},[]);return((0,l.useEffect)(()=>{p(e=>({...e,loaded:!1,height:c,displayAd:!1})),g.current.resize&&g.current.resize.disconnect(),g.current.adFrameMutation&&g.current.adFrameMutation.disconnect(),g.current.adCreativeMutation&&g.current.adCreativeMutation.disconnect();let e=new ResizeObserver(w);g.current.resize=e;let t=new MutationObserver(j);g.current.adCreativeMutation=t;let a=new MutationObserver(a=>{a.some(e=>{var t;return"childList"===e.type&&e.addedNodes.length>0&&((null==(t=e.addedNodes[0])?void 0:t.textContent)!=="Advertisement"||e.addedNodes.length>1)})&&x.current&&e&&t&&(e.observe(x.current),p(e=>({...e,loaded:!0})),t.observe(x.current,{childList:!0,subtree:!0}))});g.current.adFrameMutation=a;let n=x.current;return n&&a&&a.observe(n,{childList:!0,subtree:!0}),()=>{e.disconnect(),a.disconnect(),t.disconnect()}},[j,t,c,w]),!t||h)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.DebugCollector,{componentName:"AdBlock",data:{props:{adId:t,variant:a,title:d,height:c,className:u},state:{loaded:f.loaded,height:f.height,displayAd:f.displayAd},performance:{renderTime:Date.now()}}}),(0,n.jsxs)("div",{className:(0,i.cn)(v,u),children:[d&&f.loaded&&(0,n.jsx)("div",{className:"py-0.75 text-xxs w-full px-4 text-right text-gray-400",children:d}),"WX_PromoDriver1"===t&&!d&&f.loaded&&f.displayAd&&(0,n.jsx)("h2",{className:"my-6 px-2 text-2xl font-bold",children:"Stay Safe"}),(0,n.jsx)("div",{id:t,className:b,style:{height:f.loaded?"100%":"0px"},ref:x})]}),"WX_PromoDriver1"===t&&(!f.loaded||!f.displayAd)&&(0,n.jsx)(o.default,{title:"Stay Safe",ctaStyle:"featured",linkUrl:"/",backgroundColor:"white",media:"https://s-dev.w-x.co/wxnext/img/Screenshot2025-04-17at44929PMpng"})]})},c=d}}]);