(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,350535,e=>{"use strict";var l=e.i(902875),i=e.i(581014),a=e.i(725287),t=e.i(559421),r=e.i(611540),s=e.i(247865),n=e.i(368847),o=e.i(877957),d=e.i(240058),c=e.i(380993),m=e.i(546446),x=e.i(294237),u=e.i(650561),h=e.i(674885),f=e.i(385277),p=e.i(307215),g=e.i(273876),j=e.i(632137);let v=(0,x.cva)("grid gap-x-8 gap-y-0",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"}}}),y=(0,s.memo)(({dataPoints:e,fields:a,locale:t,columns:r,children:s,className:o})=>{let{small:d=2,medium:c=3,large:x=4}="object"==typeof r?r||{}:{small:r,medium:r,large:r},[y,b]=(0,f.useClientContainerSize)(e=>e>=p.containerSizes["@xl"]?x:e>=p.containerSizes["@xs"]?c:d),w=y||c,_=(0,i.useTranslations)("DetailsTable"),I={unitName:(0,m.useAtomValue)(h.userUnitPreferenceAtom),t:_,locale:t},C=0;return(0,l.jsx)(u.Card,{ref:b,className:(0,j.cn)("border-2xl @container/detailsTable h-full bg-gray-100 p-0",o),children:(0,l.jsxs)(u.CardContent,{className:"px-4 py-4 @xl/detailsTable:px-6",children:[s&&(0,l.jsx)("div",{children:s}),(0,l.jsx)("ul",{className:v({cols:w}),children:a.map((i,t)=>{let r,s=g.detailConfig[i],o=s?.value(e,I);if(!s||!o)return C++,null;let d="derive"in s.icon?s.icon.derive(e,I):s.icon,c="function"==typeof s.label?s.label(e,I):s.label,m=a.length-C,x=t-C,u=m%w;if(x===m-1&&0!==u){let e=w-u+1;r={gridColumn:`span ${e} / span ${e}`}}return(0,l.jsxs)("li",{className:"flex flex-row items-center gap-2 border-t py-3 first:border-none @max-sm:flex-wrap [&:nth-child(-n+2)]:border-none [&:nth-child(-n+2)]:pt-0 [&:nth-last-child(-n+2)]:pb-0",style:r,children:[d&&(0,l.jsx)(d,{className:"size-4 shrink-0 @md/detailsTable:size-5"}),c&&(0,l.jsx)(n.default,{variant:"Body.M",className:"grow-1 text-sm leading-normal font-normal whitespace-nowrap @xl/detailsTable:text-base",children:c}),(0,l.jsx)(n.default,{elementType:"string"==typeof o?"p":"div",variant:"Body.M",className:c?"text-right text-sm leading-[1.5] font-bold tracking-normal @max-sm:ml-6 @max-sm:basis-full @max-sm:text-left @xl/detailsTable:text-base":"text-sm leading-[1.5] font-bold tracking-normal @xl/detailsTable:text-base",children:o})]},c+x)})})]})})});var b=e.i(617874),w=e.i(742740),_=e.i(548888),I=e.i(180193),C=e.i(546505),N=e.i(665488),M=e.i(35520),T=e.i(529014),k=e.i(316078);let L=["temperatureFeelsLike","accumulation","windSpeed","pressureMeanSeaLevel","cloudCover","temperatureDewPoint","uvIndex","visibility","airQuality","relativeHumidity","windGust"],B=({forecast:e,timeZone:i,locale:a,fifteenMinute:t})=>{let r=(0,m.useAtomValue)(h.userUnitPreferenceAtom),s=(0,b.unitsSystemByName)(r);return(0,l.jsxs)("div",{className:(0,j.cn)("flex w-full items-center gap-4","@max-md/hourItem:gap-2"),children:[(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[0_0_25%]","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_14%]","@2xl/hourItem:flex-[0_0_12%]",{"pl-3":t}),children:(0,l.jsx)(n.default,{className:(0,j.cn)("inline-block rounded-[100px] px-2 py-0.5 whitespace-nowrap","group-data-[state=open]:bg-blue-500 group-data-[state=open]:text-white"),children:(0,w.formatHourlyDate)({date:e.validTimeLocal,locale:a,timeZone:i,minutes:t})})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[0_0_12%]","@md/hourItem:flex-[0_0_9%]","@lg/hourItem:flex-[0_0_8%]","@2xl/hourItem:flex-[0_0_8%]",{"pl-3":t}),children:(0,l.jsx)(n.default,{variant:t?"Body.M.Bold":"Body.L.Bold",children:(0,l.jsx)(I.Temperature,{value:e.temperature})})}),(0,l.jsxs)("div",{className:(0,j.cn)("min-w-0","relative flex h-6 items-center","flex-[0_0_10%]","@md/hourItem:flex-[0_0_6%]","@lg/hourItem:flex-[0_0_7%]","@2xl/hourItem:flex-[1_1_0%]"),children:[(0,l.jsx)(k.WxIcon,{iconCode:e.iconCode,className:"lightBG size-7 shrink-0 @md/hourItem:size-8",size:"lg",iconTheme:"lightBG","aria-label":e.wxPhraseLong||`Weather condition ${e.iconCode}`}),(0,l.jsx)(n.default,{variant:"Body.M",style:{wordBreak:"break-word"},className:"shrink pl-1.5 @max-2xl/hourItem:hidden",lineClamp:2,children:e.wxPhraseLong})]}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","items-end @lg/hourItem:py-0.5","flex-[1_0_14.5%]","@md/hourItem:flex-[0_0_12.5%]","@lg/hourItem:flex-[0_0_20%]","@2xl/hourItem:flex-[0_0_20%]"),children:(0,l.jsx)(M.PrecipChance,{precipChance:e.precipChance,displayMode:"both",textClassName:"@lg/hourItem:hidden",progressClassName:"@max-lg/hourItem:hidden",iconClassName:"@max-lg/hourItem:size-3"})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","items-end @max-md/hourItem:hidden","@md/hourItem:flex-[0_0_13%]","@lg/hourItem:flex-[0_0_11%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{children:(0,l.jsx)(C.Percentage,{value:e.relativeHumidity})})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","items-end","flex-[0_0_23%]","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_15%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{elementType:"div",children:(0,l.jsx)(_.Wind,{windSpeed:e.windSpeed,windDirectionCardinal:e.windDirectionCardinal,units:s.code,displayMode:"directional",className:"whitespace-nowrap",iconClassName:"size-3 @md/hourItem:size-4"})})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","@max-md/hourItem:hidden","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_15%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{children:(0,l.jsx)(T.Accumulation,{precipType:e.precipType,qpf:"precipRate"in e?e.precipRate:e.qpf,qpfSnow:"snowRate"in e?e.snowRate:e.qpfSnow,units:s.code})})})]})},F=({forecast:e,fifteenMinuteItems:i,initial15MinsItems:a,timeZone:t,locale:r,itemIndex:s})=>(0,l.jsxs)(l.Fragment,{children:[!!a?.length&&(0,l.jsx)("div",{className:"border-grey-500 @container/hourItem gap-2 border-b",children:a.map(e=>(0,l.jsx)("div",{className:"py-3.5 pr-7",children:(0,l.jsx)(B,{forecast:e,locale:r,timeZone:t,fifteenMinute:!0})},e.validTimeLocal))}),(0,l.jsxs)(N.AccordionItem,{value:e.validTimeLocal,className:(0,j.cn)("border-grey-500 @container/hourItem gap-2 border-b py-3.5",{"[&[data-state=open]]:pb-0":!!i?.length}),children:[(0,l.jsx)(N.AccordionTrigger,{className:"items-center gap-1 p-0 @md/hourItem:gap-3",iconClassName:"mb-1 size-4",triggerContent:(0,l.jsx)(B,{forecast:e,locale:r,timeZone:t,showHeading:0===s})}),(0,l.jsxs)(N.AccordionContent,{children:[(0,l.jsx)(y,{dataPoints:e,fields:L,locale:r,className:"my-2 @md/hourItem:mt-4"}),!!i?.length&&(0,l.jsx)("div",{children:i.map(e=>(0,l.jsx)("div",{className:"py-3.5 pr-7 @max-md/hourItem:pr-5",children:(0,l.jsx)(B,{forecast:e,locale:r,timeZone:t,fifteenMinute:!0})},e.validTimeLocal))})]})]})]});var D=e.i(341669),A=e.i(65659),R=e.i(590949),H=e.i(474245),S=e.i(952693),E=e.i(763635),P=e.i(747961);let z=(0,s.forwardRef)(({title:e,titleId:i,desc:a,descId:t,...r},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":i,"aria-describedby":t,...r,children:[a?(0,l.jsx)("desc",{id:t,children:a}):null,e?(0,l.jsx)("title",{id:i,children:e}):null,(0,l.jsx)("path",{fill:"currentColor",d:"M7.5 1.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-1 0M7.5 13.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-1 0M2.5 8.5h-1a.5.5 0 0 1 0-1h1a.5.5 0 0 1 0 1M11.536 12.243l.707.707a.5.5 0 0 0 .707-.707l-.707-.707a.5.5 0 0 0-.707.707M3.757 4.464l-.707-.707a.5.5 0 1 1 .707-.707l.707.707a.5.5 0 0 1-.707.707M12.243 4.464l.707-.707a.5.5 0 1 0-.707-.707l-.707.707a.5.5 0 0 0 .707.707M4.464 12.243l-.707.707a.5.5 0 1 1-.707-.707l.707-.707a.5.5 0 1 1 .707.707M8.72 10.568A2.67 2.67 0 0 1 5.333 8 2.667 2.667 0 0 1 9.85 6.079c.25-.234.55-.414.883-.524a3.667 3.667 0 1 0-.125 5.021H9.217z"}),(0,l.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.489 5.9c-.985 0-1.795.747-1.913 1.71a1.25 1.25 0 0 0-1.01 1.231c0 .633.465 1.159 1.07 1.24l.007.002h.004l.148.01h2.97q.07.006.14.006c.845 0 1.528-.694 1.528-1.548 0-.738-.509-1.356-1.192-1.512a1.93 1.93 0 0 0-1.752-1.14m-1.203 1.847a1.22 1.22 0 0 1 1.203-1.133c.488 0 .92.301 1.108.749l.128.305.328.062c.365.07.66.402.66.82a.82.82 0 0 1-.883.831l-.03-.003H9.823l-.107-.007a.53.53 0 0 1-.429-.53.53.53 0 0 1 .455-.534l.503-.06z",clipRule:"evenodd"})]})),O=s.default.forwardRef((e,i)=>(0,l.jsx)(P.BaseIcon,{ref:i,icon:z,...e}));O.displayName="FairMostlyClearDay";let G=(0,s.forwardRef)(({title:e,titleId:i,desc:a,descId:t,...r},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":i,"aria-describedby":t,...r,children:[a?(0,l.jsx)("desc",{id:t,children:a}):null,void 0===e?(0,l.jsx)("title",{id:i,children:"Sunny Day"}):e?(0,l.jsx)("title",{id:i,children:e}):null,(0,l.jsxs)("g",{fill:"currentColor",children:[(0,l.jsx)("path",{d:"M7.5 13.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-1 0M7.5 1.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-1 0M13.5 8.5h1a.5.5 0 0 0 0-1h-1a.5.5 0 0 0 0 1M1.5 8.5h1a.5.5 0 0 0 0-1h-1a.5.5 0 0 0 0 1M11.536 12.243l.707.707a.5.5 0 0 0 .707-.707l-.707-.707a.5.5 0 0 0-.707.707M3.05 3.757l.707.707a.5.5 0 0 0 .707-.707l-.707-.707a.5.5 0 1 0-.707.707M12.243 4.464l.707-.707a.5.5 0 1 0-.707-.707l-.707.707a.5.5 0 0 0 .707.707M3.757 12.95l.707-.707a.5.5 0 1 0-.707-.707l-.707.707a.5.5 0 1 0 .707.707"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M8 10.667a2.667 2.667 0 1 0 0-5.334 2.667 2.667 0 0 0 0 5.334m0 1a3.667 3.667 0 1 0 0-7.334 3.667 3.667 0 0 0 0 7.334",clipRule:"evenodd"})]})]})),U=s.default.forwardRef((e,i)=>(0,l.jsx)(P.BaseIcon,{ref:i,icon:G,...e}));U.displayName="SunnyDay";let Z=(0,s.forwardRef)(({title:e,titleId:i,desc:a,descId:t,...r},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":i,"aria-describedby":t,...r,children:[a?(0,l.jsx)("desc",{id:t,children:a}):null,void 0===e?(0,l.jsx)("title",{id:i,children:"Cloudy"}):e?(0,l.jsx)("title",{id:i,children:e}):null,(0,l.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.063 3c1.877 0 3.35 1.456 3.457 3.53l.035.241.795.084.028.008c.482.124.891.343 1.182.674.295.337.44.757.44 1.227a1.9 1.9 0 0 1-.616 1.395c-.35.33-.838.56-1.457.656.046.156.073.322.073.495 0 .846-.605 1.548-1.388 1.658l-.107.014h-.103l-.006.001-7.808.006q-.111.01-.226.011C2.058 13 1 11.897 1 10.537c0-1.203.828-2.207 1.923-2.42l.701-.138.28-.683a3.49 3.49 0 0 1 1.769-1.858c.033-.45.257-.844.48-1.133.245-.32.53-.569.7-.699C7.454 3.15 8.216 3 9.064 3M7.029 6.019c-1.065 0-1.975.671-2.365 1.625l-.456 1.112-1.135.222c-.716.14-1.246.794-1.246 1.56 0 .864.677 1.587 1.535 1.587q.075 0 .149-.008l.038-.004 7.901-.006.054-.007a.79.79 0 0 0 .669-.79.79.79 0 0 0-.682-.792l-1.755-.216-.147-1.845c-.109-1.354-1.205-2.438-2.56-2.438m2.034-2.171c-.767 0-1.317.139-1.71.437a3 3 0 0 0-.543.541q-.136.177-.214.348.213-.03.433-.031c1.778 0 3.239 1.426 3.384 3.24l.09 1.132 1.083.132c.315.04.602.175.834.376a.4.4 0 0 1 .085-.013c.652-.04 1.067-.242 1.313-.473s.348-.514.348-.773c0-.284-.084-.497-.229-.662-.146-.167-.382-.314-.736-.41l-1.379-.146-.133-.936v-.02c-.078-1.668-1.222-2.742-2.626-2.742",clipRule:"evenodd"})]})),W=s.default.forwardRef((e,i)=>(0,l.jsx)(P.BaseIcon,{ref:i,icon:Z,...e}));W.displayName="Cloudy";let q=(0,s.forwardRef)(({title:e,titleId:i,desc:a,descId:t,...r},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":i,"aria-describedby":t,...r,children:[a?(0,l.jsx)("desc",{id:t,children:a}):null,void 0===e?(0,l.jsx)("title",{id:i,children:"Rain Heavy"}):e?(0,l.jsx)("title",{id:i,children:e}):null,(0,l.jsxs)("g",{fill:"currentColor",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M7.982 1.833c-1.303 0-2.391 1.032-2.5 2.37l-.034.407-.405.049c-.67.08-1.209.672-1.209 1.41 0 .724.518 1.307 1.17 1.405l.217.015h4.896l.024.003q.087.008.175.008c1.01 0 1.851-.845 1.851-1.915 0-.946-.66-1.719-1.51-1.882l-.264-.051-.104-.248c-.386-.93-1.279-1.57-2.307-1.57M4.535 3.747C4.843 2.096 6.26.833 7.982.833c1.367 0 2.543.798 3.123 1.95 1.198.352 2.062 1.48 2.062 2.802 0 1.597-1.264 2.915-2.851 2.915a3 3 0 0 1-.245-.01H5.187l-.25-.018H4.92l-.034-.005c-1.168-.16-2.051-1.182-2.051-2.398 0-1.091.71-2.026 1.701-2.322",clipRule:"evenodd","data-figma-bg-blur-radius":20}),(0,l.jsx)("path",{d:"m7.65 9.47-.711 1.954a.5.5 0 1 0 .94.342l.71-1.954a.5.5 0 1 0-.94-.342M4.882 10.816l-.803 2.205a.5.5 0 0 0 .94.342l.802-2.205a.5.5 0 0 0-.94-.342M10.179 10.918l-.766 2.103a.5.5 0 1 0 .94.342l.765-2.103a.5.5 0 0 0-.94-.342"})]})]})),V=s.default.forwardRef((e,i)=>(0,l.jsx)(P.BaseIcon,{ref:i,icon:q,...e}));V.displayName="RainHeavy";let $=(0,s.forwardRef)(({title:e,titleId:i,desc:a,descId:t,...r},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":i,"aria-describedby":t,...r,children:[a?(0,l.jsx)("desc",{id:t,children:a}):null,void 0===e?(0,l.jsx)("title",{id:i,children:"Clear Night"}):e?(0,l.jsx)("title",{id:i,children:e}):null,(0,l.jsx)("path",{fill:"currentColor",d:"M6.751 2.707a7.54 7.54 0 0 0 5.797 9.097A5.56 5.56 0 0 1 8.561 13.5q-.105.002-.21 0a5.547 5.547 0 0 1-1.6-10.792m.74-1.207a1 1 0 0 0-.088.008 6.548 6.548 0 0 0 .912 12.99c.082.004.164 0 .246 0a6.54 6.54 0 0 0 5.35-2.777.504.504 0 0 0-.391-.782A6.54 6.54 0 0 1 7.945 2.19a.507.507 0 0 0-.455-.69"})]})),Y=s.default.forwardRef((e,i)=>(0,l.jsx)(P.BaseIcon,{ref:i,icon:$,...e}));Y.displayName="ClearNight";var K=e.i(402625);let Q=({insightHeadline:e,insightTextLong:i,className:a,headlineClass:t,textClass:r,background:s,weatherMode:o})=>{if(!e&&!i)return null;let d="";return o&&(d="severe"===o?"warning":"watch"),(0,l.jsxs)("div",{className:(0,j.cn)("nowrap flex items-center px-6.5 py-4",a,s&&"bg-[#f6f6f6]","watch"===d&&"bg-[#f6f6f6]","warning"===d&&"bg-[#ba0d00]"),children:[d?(0,l.jsx)(K.default,{className:"mr-4 size-4.5 shrink-0"}):null,(0,l.jsxs)("div",{children:[e?(0,l.jsx)(n.default,{elementType:"h2",variant:"Body.M",className:(0,j.cn)("mb-2.5 text-base font-medium text-gray-500",t),children:e}):null,i?(0,l.jsx)(n.default,{variant:"Body.L.Bold",className:(0,j.cn)("font-semibold text-gray-800","watch"===d&&"text-sm text-white","warning"===d&&"text-sm text-[#ba0d00]",r),children:i}):null]})]})};var J=e.i(11697),X=e.i(922033),ee=e.i(505307);let el=()=>{let e=(0,i.useTranslations)("DetailsTable");return(0,l.jsx)("div",{className:"@container/hourItem",children:(0,l.jsx)("div",{className:"mt-2 items-end gap-1 p-0 pr-7 @md/hourItem:gap-3",children:(0,l.jsxs)("div",{className:(0,j.cn)("flex w-full items-end gap-4","@max-md/hourItem:gap-2"),children:[(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[0_0_25%]","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_14%]","@2xl/hourItem:flex-[0_0_12%]")}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[0_0_12%]","@md/hourItem:flex-[0_0_9%]","@lg/hourItem:flex-[0_0_8%]","@2xl/hourItem:flex-[0_0_8%]")}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[0_0_10%]","@md/hourItem:flex-[0_0_6%]","@lg/hourItem:flex-[0_0_7%]","@2xl/hourItem:flex-[1_1_0%]")}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","flex-[1_0_12.5%]","@md/hourItem:flex-[0_0_12.5%]","@lg/hourItem:flex-[0_0_20%]","@2xl/hourItem:flex-[0_0_20%]")}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","items-end @max-md/hourItem:hidden","@md/hourItem:flex-[0_0_13%]","@lg/hourItem:flex-[0_0_11%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{variant:"Caption.M",color:"secondary",className:"hidden font-bold @md/hourItem:block",children:e("humidity")})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","items-end","flex-[0_0_23%]","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_15%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{variant:"Caption.M",color:"secondary",className:"hidden font-bold @md/hourItem:block",children:e("wind")})}),(0,l.jsx)("div",{className:(0,j.cn)("min-w-0","@md/hourItem:flex-[0_0_15%]","@lg/hourItem:flex-[0_0_15%]","@2xl/hourItem:flex-[0_0_10%]"),children:(0,l.jsx)(n.default,{variant:"Caption.M",color:"secondary",className:"hidden font-bold @md/hourItem:block",children:e("precipitation")})})]})})})};var ei=e.i(495406),ea=e.i(528600),et=e.i(683199);let er=()=>{let e=(0,et.usePremiumSource)();return(0,l.jsx)(d.default,{href:"/subscribe?tpcc=mktg-hourly-hourlyupsell-gopremium",onClick:()=>e({sourceModule:"hourly-upsell",sourceElement:"get-premium",sourceUpsellPlacement:"hourlyupsell"}),className:(0,j.cn)("px-6 py-[9px] text-center text-sm font-semibold whitespace-nowrap normal-case max-lg:px-7.5 max-lg:py-2","bg-brand-400 text-primary-foreground inline-flex h-10 cursor-pointer items-center justify-center rounded-lg px-4 py-3 hover:bg-[#252C3F] focus:ring-2 focus:ring-blue-500 focus:ring-offset-0 focus:outline-none active:bg-[#0C1226]"),children:"Go Premium"})},es=()=>(0,l.jsx)("div",{className:"relative z-1 -mt-32 -mb-2 flex items-center px-4 pb-4 max-lg:-mt-60 max-lg:h-60 max-lg:items-end max-lg:justify-center max-lg:px-2.5 max-lg:pb-2.5",style:{background:"linear-gradient(rgba(255, 255, 255, 0) 0%, #ffffff 100%)"},children:(0,l.jsxs)("div",{className:"border-brand-active box-border flex w-full rounded-md border bg-[rgba(255,255,255,0.75)]",children:[(0,l.jsxs)("div",{className:"box-content flex pl-[15px] max-lg:h-[53px] max-lg:pt-[15px]",children:[(0,l.jsxs)("svg",{width:"53px",height:"auto",viewBox:"0 0 52 52",children:[(0,l.jsx)("title",{children:"Hourly Subscription"}),(0,l.jsxs)("defs",{children:[(0,l.jsxs)("linearGradient",{x1:"50%",y1:"27.1512732%",x2:"50%",y2:"84.0143092%",id:"linearGradient-1",children:[(0,l.jsx)("stop",{stopColor:"#05336B",offset:"0%"}),(0,l.jsx)("stop",{stopColor:"#0D5AB9",offset:"100%"})]}),(0,l.jsx)("rect",{id:"path-2",x:"0",y:"0",width:"52",height:"52",rx:"26"}),(0,l.jsxs)("linearGradient",{x1:"54.1576441%",y1:"61.5117056%",x2:"79.7438622%",y2:"30.8238101%",id:"linearGradient-4",children:[(0,l.jsx)("stop",{stopColor:"#EBEBEB",stopOpacity:"0",offset:"0%"}),(0,l.jsx)("stop",{stopColor:"#FEFEFE",stopOpacity:"0.97187323",offset:"100%"}),(0,l.jsx)("stop",{stopColor:"#FFFFFF",offset:"100%"})]}),(0,l.jsxs)("linearGradient",{x1:"60.2488094%",y1:"60.0107334%",x2:"22.3406732%",y2:"37.5678784%",id:"linearGradient-5",children:[(0,l.jsx)("stop",{stopColor:"#EBEBEB",stopOpacity:"0",offset:"0%"}),(0,l.jsx)("stop",{stopColor:"#FFFFFF",offset:"100%"})]}),(0,l.jsx)("path",{d:"M15.2478169,12.7427796 C16.2855935,8.94382485 20.260057,6.66445201 24.1241188,7.6630344 C24.1241188,7.6630344 24.4111634,7.72815934 24.8969312,7.85840922 C26.1334309,3.34308016 30.328698,0 35.3188578,0 C40.7285443,0 45.210856,3.92920461 45.9836684,9.0306581 C46.1603112,8.98724148 46.2707129,8.96553317 46.2707129,8.96553317 C49.5386052,8.14061728 52.8948189,10.0509488 53.7559526,13.2637791 C53.9546758,14.02357 53.9988365,14.783361 53.9325955,15.5214436 C55.5665416,15.9556099 56.5822378,16.2161096 56.5822378,16.2161096 C58.1278625,16.6285676 59.033157,18.1698578 58.6136303,19.6894397 C58.2603447,21.0136467 57.0017645,21.8602709 55.654863,21.795146 L22.4680923,21.795146 C22.4680923,21.795146 21.0991104,21.7300211 20.3925391,21.5563546 C16.5284774,20.4926472 14.2100403,16.5634426 15.2478169,12.7427796 Z",id:"path-6"}),(0,l.jsxs)("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"linearGradient-7",children:[(0,l.jsx)("stop",{stopColor:"#FFFFFF",stopOpacity:"0.188717165",offset:"0%"}),(0,l.jsx)("stop",{stopColor:"#F7FDFF",stopOpacity:"0.2319848",offset:"0%"}),(0,l.jsx)("stop",{stopColor:"#6ADEF8",offset:"100%"})]}),(0,l.jsxs)("filter",{x:"-35.3%",y:"-35.3%",width:"170.6%",height:"170.6%",filterUnits:"objectBoundingBox",id:"filter-8",children:[(0,l.jsx)("feOffset",{dx:"0",dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),(0,l.jsx)("feGaussianBlur",{stdDeviation:"2",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),(0,l.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0",type:"matrix",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),(0,l.jsxs)("feMerge",{children:[(0,l.jsx)("feMergeNode",{in:"shadowMatrixOuter1"}),(0,l.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})]}),(0,l.jsx)("g",{id:"Gating-Strategy-(Hourly/Daily)",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,l.jsx)("g",{id:"Desktop:-15-Minute-and-Hourly",transform:"translate(-458.000000, -3354.000000)",children:(0,l.jsx)("g",{id:"Group-14",transform:"translate(438.000000, 3328.000000)",children:(0,l.jsxs)("g",{id:"Circle",transform:"translate(20.000000, 26.000000)",children:[(0,l.jsx)("mask",{id:"mask-3",fill:"white",children:(0,l.jsx)("use",{xlinkHref:"#path-2"})}),(0,l.jsx)("use",{id:"Mask",fill:"url(#linearGradient-1)",xlinkHref:"#path-2"}),(0,l.jsxs)("g",{id:"Shape-Copy",opacity:"0.9",mask:"url(#mask-3)",transform:"translate(36.858083, 10.899327) scale(-1, 1) translate(-36.858083, -10.899327) ",children:[(0,l.jsx)("use",{fill:"url(#linearGradient-4)",xlinkHref:"#path-6"}),(0,l.jsx)("use",{fill:"url(#linearGradient-5)",xlinkHref:"#path-6"})]}),(0,l.jsx)("path",{d:"M45.2830915,24.2783054 L45.3612761,24.2922867 C45.5945778,24.357602 45.7348071,24.6087404 45.671311,24.8514433 L45.671311,24.8514433 L45.6638652,24.8902468 L43.6421232,32.7247054 L43.6321955,32.7488069 L41.9037354,39.4618191 C41.55461,40.7529406 40.2724844,41.5164785 39.0251058,41.1689338 C37.7675927,40.8189789 37.0225988,39.4777262 37.3580736,38.1721437 C37.4240516,37.9195592 37.5237427,37.6896302 37.6521827,37.4813926 L37.6521827,37.4813926 L44.8493772,24.5373997 C44.9416224,24.3429 45.15238,24.2346839 45.3612761,24.2922867 Z M52.8495881,22.2062839 C52.9669456,21.9961173 53.2148697,21.8990263 53.4432342,21.986645 C53.700811,22.0902483 53.8354419,22.3844815 53.7452646,22.652666 L53.7452646,22.652666 L53.7315475,22.6944033 L50.8006582,31.2520327 C50.4861807,32.1234842 49.5524011,32.5645381 48.698384,32.2291595 C47.8367462,31.895853 47.3856057,30.9033338 47.6906844,30.0117537 C47.747331,29.8415483 47.8321738,29.6873275 47.932766,29.5505712 L47.932766,29.5505712 L52.848572,22.2062839 Z",id:"Rain",fill:"url(#linearGradient-7)",mask:"url(#mask-3)"}),(0,l.jsx)("g",{id:"icon/common/clock",filter:"url(#filter-8)",mask:"url(#mask-3)",fill:"#EBBB02",children:(0,l.jsx)("g",{transform:"translate(-2.000000, 24.000000)",id:"icon-color",children:(0,l.jsx)("path",{d:"M17,0.333333333 C26.2039303,0.333333333 33.6666667,7.79517329 33.6666667,17 C33.6666667,26.2048267 26.2039303,33.6666667 17,33.6666667 C7.79249781,33.6666667 0.333333333,26.206606 0.333333333,17 C0.333333333,7.79339402 7.79249781,0.333333333 17,0.333333333 Z M17,2.8974359 C9.20868152,2.8974359 2.8974359,9.20943981 2.8974359,17 C2.8974359,24.7905602 9.20868152,31.1025641 17,31.1025641 C24.7878845,31.1025641 31.1025641,24.788643 31.1025641,17 C31.1025641,9.21135699 24.7878845,2.8974359 17,2.8974359 Z M17,6.1025641 C17.7080574,6.1025641 18.2820513,6.67655801 18.2820513,7.38461538 L18.2820513,14.1677705 C18.2820513,15.6411955 18.8673671,17.0542728 19.9092358,18.0961415 L25.5988548,23.7857605 C26.099527,24.2864327 26.099527,25.0981827 25.5988548,25.5988548 C25.0981827,26.099527 24.2864327,26.099527 23.7857605,25.5988548 L18.0961415,19.9092358 C16.5734102,18.3865046 15.7179487,16.3212377 15.7179487,14.1677705 L15.7179487,7.38461538 C15.7179487,6.67655801 16.2919426,6.1025641 17,6.1025641 Z"})})})]})})})})]}),(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",className:"relative -left-4.5 h-auto pb-9",children:[(0,l.jsx)("title",{children:"Lock"}),(0,l.jsxs)("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd",children:[(0,l.jsx)("circle",{stroke:"#FFF",strokeWidth:"1.5",fill:"#000",cx:"9",cy:"9",r:"9"}),(0,l.jsx)("path",{d:"M5.775 8h6.45c.29 0 .525.235.525.525v4.45c0 .29-.235.525-.525.525h-6.45a.525.525 0 01-.525-.525v-4.45c0-.29.235-.525.525-.525zM9 4.5A2.5 2.5 0 0111.5 7v1h-5V7A2.5 2.5 0 019 4.5zm0 5.25a.5.5 0 01.5.5v1a.5.5 0 01-1 0v-1a.5.5 0 01.5-.5zM10.5 8V7a1.5 1.5 0 00-3 0v1h3z",fill:"#FFF"})]})]})]}),(0,l.jsxs)("div",{className:"flex grow-1 items-center gap-2 max-lg:ml-[-5px] max-lg:block",children:[(0,l.jsxs)("div",{className:"grow-1 py-[15px] max-lg:pr-[15px] max-lg:pb-0",children:[(0,l.jsx)("span",{className:"block text-[13px] leading-none text-[#838783] max-lg:pb-1",children:"Premium"}),(0,l.jsx)("span",{className:"block text-lg leading-[1.8] font-extrabold text-[#2b2b2b] max-lg:h-fit max-lg:pb-1 max-lg:leading-[1]",children:"Unlock more hourly forecasts"}),(0,l.jsxs)("div",{className:"tracking[-0.28px] inline-block text-sm leading-[1.3]",children:[(0,l.jsx)("span",{children:"Upgrade to Premium and get 192-hour forecasts, so you can plan further ahead."}),(0,l.jsx)("span",{className:"hidden pl-[5px] text-sm italic md:inline",children:"Level up your forecast."})]})]}),(0,l.jsx)("div",{className:"flex items-center py-[5px] pr-7.5 max-lg:block max-lg:px-0 max-lg:pb-2.5",children:(0,l.jsx)(er,{})})]})]})});var en=e.i(924707),eo=e.i(409846);let ed=({firstRow:e})=>(0,l.jsx)("div",{className:"border-grey-500 gap-1 border-b py-3",children:(0,l.jsx)(D.default,{skeletonClassName:`mt-1 w-full ${e?"h-69":"h-4"}`})});var ec=e.i(837879);let em={up:S.ArrowUp,down:E.ArrowDown,sun:U,cloud:W,rain:V,clear:U,"clear-night":Y,fair:O},ex=({location:e,locale:i})=>{let{insightTextLong:a}=(0,ee.usePrecipInsight)(e,i);return a?(0,l.jsx)(Q,{className:"px-4 py-2",headlineClass:"hidden",textClass:"text-sm m-0",insightTextLong:a}):null},eu=({adBlocks:e,adIndices:i,currentIndex:a})=>{let t=i.find(e=>e.adIndex===a);if(!t)return null;let r=e[i.indexOf(t)];return(0,l.jsx)(ei.AdBlock,{className:"border-grey-500 my-0 border-b py-4 shadow-none",...r})},eh=({location:e,serverLocationDisplayName:t,locationHeading:r,hourlyForecast:m,mapped15MinsItems:x,initial15MinsItems:u,isLoading:h,error:f,locale:p,showDayLabel:g,canToggleMultipleItems:j,ctaLink:v,ctaText:y,insight:b,insightIcon:w,showPrecipIntensity:_,simplifiedVersion:I,adBlocks:C,adIndices:M,locationTime:T})=>{let k=(0,i.useTranslations)("HourlyForecast"),L=(0,a.useSearchParams)(),B=(0,s.useMemo)(()=>T?(0,eo.formatTime)(T,p,e?.ianaTimeZone):"",[T,p,e?.ianaTimeZone]),H=w&&em[w],S=e?.displayName||e?.name||e?.city||e?.presentationName||t||"",{user:E}=(0,ea.useUser)(),{isUserPremium:P}=E,z=(0,ec.useSubscriptionsEnabled)(),O=!P&&!I&&z,G=m.length-1,U=I?null:L.get("t"),Z=(0,s.useRef)(null),W=(0,s.useRef)(!1),q=(0,s.useMemo)(()=>U?m.find(e=>e.validTimeUtc===+U):void 0,[m,U]);(0,s.useEffect)(()=>{if(!U||W.current||h||0===m.length||!Z.current)return;let e=requestAnimationFrame(()=>{let e=Z.current?.querySelector('[data-state="open"]');e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),W.current=!0)});return()=>cancelAnimationFrame(e)},[U,h,m.length]);let V=S?k("locationDisplayName",{displayName:S}):k("hourlyWeather");return(0,l.jsxs)(c.Card,{"aria-label":V,className:"not-prose @container/hourly","data-testid":"hourly-forecast",children:[(0,l.jsx)(en.LocationTimeHeadingClient,{title:V,isTitleLoading:!e&&!t,location:e,headingLevel:r?.level,presentationName:r?.presentationName,promotePresentationName:r?.ownsHeading,formattedTime:B,expectsTimeStamp:!f,hideLocationMeta:I,className:I?"mb-4":"mb-6"}),(0,l.jsx)(s.Suspense,{fallback:null,children:(0,l.jsxs)(c.CardContent,{className:"p-0",children:[!I&&(0,l.jsx)(R.AlertHeadlines,{className:"my-4",location:e}),h?(0,l.jsx)(D.default,{skeletonClassName:"my-3 h-4 w-20 gap-1"}):b?(0,l.jsxs)("div",{className:"mt-2 mb-4 flex items-center gap-1",children:[H&&(0,l.jsx)("div",{children:(0,l.jsx)(H,{className:"text-brand-light size-5"})}),(0,l.jsx)(n.default,{variant:"Body.S.Bold",color:"brandLight",children:b})]}):"",_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ex,{location:e,locale:p}),(0,l.jsx)("div",{className:"px-4 py-2",children:(0,l.jsx)(X.default,{location:e,onlyChart:!0})})]}),(()=>{if(f)return(0,l.jsx)(n.default,{variant:"Display.S",className:"flex min-h-48 items-center justify-center p-4",children:f?.message||k("errorMsg")});let i=[],a=I?4:192;for(let t=0;t(0,l.jsx)("div",{className:"blur-[6px]",children:(0,l.jsx)(F,{itemIndex:G,forecast:m[G],timeZone:e?.ianaTimeZone||"",locale:p,fifteenMinuteItems:x?.[G]})},a))]},t),v&&y&&!O&&(0,l.jsx)("div",{className:"pt-6",children:(0,l.jsx)(o.Button,{asChild:!0,children:(0,l.jsx)(d.default,{href:v,children:y})})}),O&&(0,l.jsx)(es,{})]})})()]})})]})};var ef=e.i(381477),ep=e.i(495892),eg=e.i(349262),ej=e.i(738634);let ev=["trendingFeelsLikeInsight","trendingTemperatureInsight","trendingWindInsight","trendingUvIndexInsight"],ey=Math.floor(Math.random()*ev.length);var eb=e.i(986519),ew=e.i(713272);let e_=({location:e,serverLocationDisplayName:n,locationHeading:o,simplifiedVersion:d,initializing:c,initialError:x,adBlocks:u,adIndices:f})=>{let p=(0,a.useParams)(),g=p?.locale,j=(0,i.useTranslations)("HourlyForecast"),v=(0,t.useCanonicalBasePath)(),{hourlyForecast:y,loading:w,error:_,insight:I,insightIcon:C,mapped15MinsItems:N,initial15MinsItems:M,locationTime:T}=((e,l)=>{let i,t=(0,a.useParams)(),r=t?.locale,n=(0,m.useAtomValue)(h.userUnitPreferenceAtom),o=(0,b.unitsSystemByName)(n)?.code,{isUserPremium:d}=(0,ea.useUser)().user;i=l?eg.HourlyForecastDuration.ONE_DAY:d?eg.HourlyForecastDuration.TEN_DAY:eg.HourlyForecastDuration.THREE_DAY;let{data:c=[],error:x,isLoading:u}=(0,ef.default)(e?["get-hourly-forecast",e.geocode,o,i,r]:null,([e,l,i,a,t])=>(0,ep.getHourlyForecastWithAirQuality)({geocode:l,units:i,duration:a,language:t}),{revalidateOnFocus:!1,dedupingInterval:6e4}),f=(0,s.useMemo)(()=>l?c.slice(0,4):d?c.slice(0,192):c.slice(0,48),[c,l,d]),p=!d,{insight:g,insightIcon:j}=((e,l)=>{let i=(0,m.useAtomValue)(h.userUnitPreferenceAtom),a=(0,b.unitsSystemByName)(i)?.code,{data:t,isLoading:r}=(0,J.useGetWeatherInsights)({geoCode:e?.geocode||null,insightType:H.InsightType.ALL,locale:l}),n=(0,s.useMemo)(()=>t?.reduce((e,l)=>(e[l.insightType]=l,e),{}),[t]),{data:o=[],isLoading:d}=(0,ef.default)(e?["get-daily-forecast",e.geocode,eg.ForecastDuration.THREE_DAY,a,l]:null,([e,l,i,a,t])=>(0,ej.getDailyForecast)({geocode:l,units:a,duration:i,language:t}),{revalidateOnFocus:!1,dedupingInterval:6e5}),c=r||d,x=o[0],u=(0,s.useMemo)(()=>{if(c)return"";let e=n?.significantWeatherTodayInsight?.insightText?.[0];if(e)return e;let l=x?.daypart?.[0]?.narrative;if(l)return l.split(".")[0];let i=ev[ey]||ev[0];return n?.[i]?.insightText?.[0]||""},[c,n,x?.daypart]);return(0,s.useMemo)(()=>{let e=function(e,l){if(void 0===l)return e.trim();var i=function(e,l){if(void 0===l)return e.trimEnd();let i=e.length;switch(typeof l){case"string":if(1!==l.length)throw Error("The 'chars' parameter should be a single character string.");for(;i>0&&e[i-1]===l;)i--;break;case"object":for(;i>0&&l.includes(e[i-1]);)i--}return e.substring(0,i)}(e,l);if(void 0===l)return i.trimStart();let a=0;switch(typeof l){case"string":for(;a{if(e){if(/(warmer|higher)/i.test(e))return"up";else if(/(cooler|lower)/i.test(e))return"down";else if(/(partly cloudy)/i.test(e)||/(sun)/i.test(e)&&/(cloud)/i.test(e))return"fair";else if(/(sunny|sunshine)/i.test(e))return"sun";else if(/(cloudy)/i.test(e))return"cloud";else if(/(shower|rain)/i.test(e))return"rain";else if(/(clear)/i.test(e))return/(night)/i.test(e)?"clear-night":"clear"}return null})(e):null;return{insight:e,insightIcon:l}},[u])})(e,r),{data:v=[],isLoading:y}=(0,ef.default)(!l&&e?["get-fifteen-minute-forecast",e.geocode,o,r]:null,([e,l,i,a])=>(0,eb.getFifteenMinuteForecast)({geocode:l,units:i,language:a}),{revalidateOnFocus:!1,dedupingInterval:6e4}),{mapped15MinsItems:w,initial15MinsItems:_}=(0,s.useMemo)(()=>l?{mapped15MinsItems:void 0,initial15MinsItems:void 0}:((e,l,i=!1)=>{if(!e.length||!l.length)return{mapped15MinsItems:[],initial15MinsItems:[]};let a=[],t=[],r=0,s=0,n=i?4:1/0,o=new Date(e[0].validTimeLocal).getTime();for(;r{let a=new Date(e.validTimeLocal).getTime(),o=a+36e5,d=[];for(;r=o)break;i!==a&&(d.push(e),s++),r++}t[i]=d}),{mapped15MinsItems:t,initial15MinsItems:a}})(f,v,p),[l,f,p,v]),I=e?.ianaTimeZone;return{hourlyForecast:f,loading:u||y,error:x,insight:g,insightIcon:j,mapped15MinsItems:w,initial15MinsItems:_,locationTime:(0,s.useMemo)(()=>I?(0,ew.convertToTimeInTimezone)(new Date,I):"",[I])}})(e,d),k=c||w||!y?.length;return(0,l.jsx)(eh,{location:e,serverLocationDisplayName:n,locationHeading:o,hourlyForecast:y,mapped15MinsItems:N,initial15MinsItems:M,locale:g,isLoading:k,error:x||_,showDayLabel:!d,canToggleMultipleItems:!d,ctaLink:d?v?`${v}/hourbyhour`:(0,r.interpolateUrl)(r.URLS.hourly,{locale:g,locId:e?.placeId??p?.locId??""}):v?`${v}/tenday`:(0,r.interpolateUrl)(r.URLS.tenday,{locale:g,locId:e?.placeId??p?.locId??""}),ctaText:j(d?"next48":"10DayWeather"),insight:I,insightIcon:C,showPrecipIntensity:!d,simplifiedVersion:d,adBlocks:u,adIndices:f,locationTime:T})};var eI=e.i(64412),eC=e.i(181462);let eN=({simplifiedVersion:e,adBlocks:i,adIndices:a,globalPageProps:t,headingLevel:r})=>{let{location:s,isLoading:n,error:o}=(0,eI.useLocation)(),d=(0,eC.getServerLocationDisplayName)(t),c=(0,eC.resolveLocationHeadingContext)(t,r);return(0,l.jsx)(e_,{location:s,serverLocationDisplayName:d,locationHeading:c,simplifiedVersion:e??!1,initializing:n,initialError:o,adBlocks:i??[],adIndices:a??[]})};e.s(["HourlyForecastBlockClient",0,eN,"default",0,eN],350535)},888733,function(e){e.n(e.i(350535))}]);