(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,45776,(e,l,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPollenRiskLevel=function(e){return null==e||""===e?null:a[Number(e)]??null},t.getPollenObservationByType=function(e,l){return e?.pollenobservation.find(e=>e.pollen_type===l)};let a={1:"low",2:"moderate",3:"high",4:"veryHigh"}},512620,e=>{"use strict";var l=e.i(902875),t=e.i(247865),a=e.i(747961);let i=(0,t.forwardRef)(({title:e,titleId:t,desc:a,descId:i,...n},s)=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":t,"aria-describedby":i,...n,children:[a?(0,l.jsx)("desc",{id:i,children:a}):null,void 0===e?(0,l.jsx)("title",{id:t,children:"Information"}):e?(0,l.jsx)("title",{id:t,children:e}):null,(0,l.jsxs)("g",{fill:"currentColor",children:[(0,l.jsx)("path",{d:"M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"}),(0,l.jsx)("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"})]})]})),n=t.default.forwardRef((e,t)=>(0,l.jsx)(a.BaseIcon,{ref:t,icon:i,...e}));n.displayName="Information",e.s(["Information",0,n])},533694,e=>{"use strict";let l=new Set(["AK","HI"]);e.s(["isConus",0,e=>e?.countryCode==="US"&&!l.has(e.adminDistrictCode??"")])},749097,e=>{"use strict";var l=e.i(902875),t=e.i(389379),a=e.i(64412),i=e.i(181462),n=e.i(860082),s=e.i(247865),r=e.i(546446),o=e.i(730921),d=e.i(611540),c=e.i(498076),u=e.i(409846),g=e.i(16838),x=e.i(5397),h=e.i(731947),p=e.i(588896),m=e.i(495406),f=e.i(581014),y=e.i(380993),v=e.i(512620),b=e.i(240058),j=e.i(924707),w=e.i(429745),L=e.i(677691),N=e.i(738426),P=e.i(598513),_=e.i(200359);let S="allergy-species",A=({className:e})=>{let t=(0,f.useTranslations)("Pollen"),[a,i]=(0,s.useState)(!1),{href:n}=(0,L.useAppInstallLink)(S,S),r=(0,N.useTrackInstallPromptClick)(S),o=(0,P.useSendInteractionEvent)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_.PollenFilterChips,{selected:"all",onSelect:e=>{"all"!==e&&(o({moduleId:"allergy-species-gate",interactionType:"click",interactionElement:e,featureFocus:"species-pollen-counts"},{flushImmediately:!0}),i(!0))},label:t("speciesFilterLabel"),className:e}),(0,l.jsx)(w.InstallPromptSheet,{open:a,onOpenChange:i,title:t("appGateTitle"),headline:t("appGateHeadline"),description:t("appGateDescription"),getAppHref:n,getAppLabel:t("getTheApp"),onGetAppClick:()=>r("get-the-app"),closeLabel:t("close")})]})};var I=e.i(180663);let C=({today:e,insight:t,changeFromYesterday:a,location:i,serverLocationDisplayName:n,locationHeading:s,formattedTime:r,learnMoreHref:o,spotlight:d,showSpeciesGate:c=!1,isLoading:u=!1,hasError:g=!1})=>{let x=(0,f.useTranslations)("PollenBreakdown"),h=i?.displayName||i?.name||i?.city||i?.presentationName||n||"",p=h?x("locationTitle",{displayName:h}):x("title"),m=!u&&!g&&!!e;return(0,l.jsxs)(y.Card,{"data-testid":"PollenBreakdownModule","aria-label":p,"aria-busy":u||void 0,children:[(0,l.jsx)(y.CardHeader,{children:(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-8",children:[(0,l.jsx)(j.LocationTimeHeadingClient,{title:p,location:i,formattedTime:r,expectsTimeStamp:!g,headingLevel:s?.level,presentationName:s?.presentationName,promotePresentationName:s?.ownsHeading,hideLocationMeta:!s?.ownsHeading,hideAffordance:!0,className:"min-w-0 flex-auto"}),d]})}),(0,l.jsxs)(y.CardContent,{className:"flex flex-col gap-4",children:[c&&(0,l.jsx)(A,{}),(0,l.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,l.jsx)("p",{className:"text-lg font-bold text-gray-900",children:x("todaysPollenLevel")}),(0,l.jsxs)(b.default,{href:o,className:"inline-flex items-center gap-1 text-sm font-bold text-gray-900 hover:underline focus-visible:underline",children:[x("learnMore"),(0,l.jsx)(v.Information,{className:"h-4 w-4","aria-hidden":"true"})]})]}),u&&(0,l.jsx)(T,{}),m&&e&&(0,l.jsx)(I.PollenTodaySummary,{risk:e.risk,average:e.count,peak:e.peak,changeFromYesterday:a,insight:t})]})]})},T=()=>(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"h-10 w-48 animate-pulse rounded bg-gray-200"}),(0,l.jsx)("div",{className:"flex gap-6",children:Array.from({length:3},(e,t)=>(0,l.jsx)("div",{className:"h-10 w-20 animate-pulse rounded bg-gray-200"},t))})]}),k=({config:e})=>{let{blockType:t,...a}=e,i=function(e){if("object"==typeof e.adSlot&&e.adSlot){for(let l of e.adSlot.adSlotSizes??[])if("object"==typeof l&&"text"!==l.sizeType&&"number"==typeof l.width&&"number"==typeof l.height)return{width:l.width,height:l.height}}}(e);return(0,l.jsx)("div",{className:"shrink-0 empty:hidden [&_[data-testid$='-container']>div]:w-full",style:i&&{minWidth:i.width,minHeight:i.height},children:(0,l.jsx)(m.AdBlock,{...a})})},R=({location:e,serverLocationDisplayName:t,locationHeading:a,spotlightAd:i})=>{let n=(0,o.useLocale)(),m=(0,c.useIsMobile)(),{data:f,error:y,isPending:v}=(0,h.usePollenForecast)(e),b=(0,p.useAllergyInsight)(e,f?.days[0]?.count),j=(0,r.useAtomValue)(x.showAdminHeaderAtom),w=function(e,l,t){let[a,i]=(0,s.useState)();return(0,s.useEffect)(()=>{t&&i((0,u.formatTime)(new Date().toISOString(),e,l))},[e,l,t]),a}(n,e?.ianaTimeZone,!!f);return a?.ownsHeading||v||!y&&f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.DebugCollector,{componentName:"PollenBreakdown",data:{props:{location:e},state:{data:f,error:y,componentState:y&&"error"||v&&"loading"||"ready"}},enabled:j}),(0,l.jsx)(C,{today:f?.days[0],insight:b,changeFromYesterday:f?.changeFromYesterday??null,location:e,serverLocationDisplayName:t,locationHeading:a,spotlight:i&&(0,l.jsx)(k,{config:i}),formattedTime:w,learnMoreHref:(0,d.interpolateUrl)(d.URLS.allergyLearnMore,{locale:n}),showSpeciesGate:m,isLoading:v,hasError:!!y})]}):null},E=(0,t.default)(()=>e.A(430940),{loadableGenerated:{modules:[436485]}}),O=({globalPageProps:e,headingLevel:t,adBlocks:s})=>{let{location:r}=(0,a.useLocation)(),o=(0,i.getServerLocationDisplayName)(e),d=(0,i.resolveLocationHeadingContext)(e,t);return(0,n.hasAmbeeCoverage)(r,e)?(0,l.jsx)(R,{location:r,serverLocationDisplayName:o,locationHeading:d,spotlightAd:s?.[0]}):(0,l.jsx)(E,{location:r,serverLocationDisplayName:o,locationHeading:d})};e.s(["PollenBreakdownBlockClient",0,O,"default",0,O],749097)},69917,function(e){e.n(e.i(749097))},430940,e=>{e.v(l=>Promise.all(["static/immutable/chunks/3m1kna6xw1mgy.js"].map(l=>e.l(l))).then(()=>l(436485)))},200359,e=>{"use strict";var l=e.i(902875),t=e.i(581014),a=e.i(632137);let i=["all",...e.i(175424).POLLEN_SPECIES];e.s(["PollenFilterChips",0,({selected:e,onSelect:n,label:s,className:r})=>{let o=(0,t.useTranslations)("Pollen");return(0,l.jsx)("div",{role:"group","aria-label":s,className:(0,a.cn)("flex flex-wrap gap-2",r),children:i.map(t=>{let i=t===e;return(0,l.jsx)("button",{type:"button","aria-pressed":i,onClick:()=>n(t),className:(0,a.cn)("inline-flex h-8 cursor-pointer items-center rounded-2xl px-3 text-sm font-semibold whitespace-nowrap transition-colors","focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 focus-visible:outline-none",i?"bg-gray-900 text-white":"bg-[#f2f2f2] text-gray-900 hover:bg-gray-200"),children:o(t)},t)})})}])},860082,e=>{"use strict";var l=e.i(533694),t=e.i(181462);e.s(["hasAmbeeCoverage",0,(e,a,i=!0)=>e?(0,l.isConus)(e):(0,t.getServerLocationIsConus)(a)??i])},175424,e=>{"use strict";e.s(["POLLEN_COUNT_UNIT",0,"/m³","POLLEN_RISK_BARS",0,{low:1,moderate:2,high:3,veryHigh:4},"POLLEN_RISK_COLORS",0,{low:"#4ed07b",moderate:"#ffb900",high:"#ff4c00",veryHigh:"#ba0d00"},"POLLEN_RISK_LABEL_KEYS",0,{low:"riskLow",moderate:"riskModerate",high:"riskHigh",veryHigh:"riskVeryHigh"},"POLLEN_RISK_LEVELS",0,["low","moderate","high","veryHigh"],"POLLEN_SPECIES",0,["tree","grass","ragweed"],"PRECIP_ACCENT_THRESHOLD",0,30])},588896,180663,e=>{"use strict";var l=e.i(730921),t=e.i(474245),a=e.i(11697);e.s(["useAllergyInsight",0,function(e,i){let n=(0,l.useLocale)(),{data:s}=(0,a.useGetWeatherInsights)({key:"allergy-aggravator-insight",geoCode:e?.geocode??null,insightType:t.InsightType.ALLERGY_AGGRAVATOR_INSIGHT,locale:n});if(!i||ie.insightType===t.InsightType.ALLERGY_AGGRAVATOR_INSIGHT);return r?.insightText?.[0]||void 0}],588896);var i=e.i(902875),n=e.i(581014),s=e.i(247865),r=e.i(747961);let o=(0,s.forwardRef)(({title:e,titleId:l,desc:t,descId:a,...n},s)=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":l,"aria-describedby":a,...n,children:[t?(0,i.jsx)("desc",{id:a,children:t}):null,void 0===e?(0,i.jsx)("title",{id:l,children:"Arrow Down Right"}):e?(0,i.jsx)("title",{id:l,children:e}):null,(0,i.jsx)("path",{fill:"currentColor",d:"M6.11 12.875a.499.499 0 0 1 0-.998l4.865-.003-6.778-6.777a.5.5 0 0 1 .707-.708l6.778 6.778.003-4.865a.499.499 0 0 1 .997 0v5.573a1 1 0 0 1-1 1z"})]})),d=s.default.forwardRef((e,l)=>(0,i.jsx)(r.BaseIcon,{ref:l,icon:o,...e}));d.displayName="ArrowDownRight";let c=(0,s.forwardRef)(({title:e,titleId:l,desc:t,descId:a,...n},s)=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":l,"aria-describedby":a,...n,children:[t?(0,i.jsx)("desc",{id:a,children:t}):null,void 0===e?(0,i.jsx)("title",{id:l,children:"Arrow Up Right"}):e?(0,i.jsx)("title",{id:l,children:e}):null,(0,i.jsx)("path",{fill:"currentColor",d:"M6.11 4.097a.499.499 0 0 0 0 .997l4.865.003-6.778 6.778a.5.5 0 0 0 .707.707l6.778-6.778.003 4.865a.499.499 0 0 0 .997 0V5.097a1 1 0 0 0-1-1z"})]})),u=s.default.forwardRef((e,l)=>(0,i.jsx)(r.BaseIcon,{ref:l,icon:c,...e}));u.displayName="ArrowUpRight";var g=e.i(632137),x=e.i(175424);let h=({value:e,children:l})=>(0,i.jsxs)("span",{className:"inline-flex items-baseline gap-1 whitespace-nowrap",children:[l,(0,i.jsx)("span",{className:"text-xl font-bold text-gray-900",children:e}),(0,i.jsx)("span",{className:"text-xs text-gray-500",children:x.POLLEN_COUNT_UNIT})]}),p=({value:e,label:l,mobileLabel:t})=>(0,i.jsxs)("div",{className:"flex flex-col items-start gap-0.5 @xl/pollen-today:items-center",children:[e,(0,i.jsx)("span",{className:"text-xs text-gray-500 uppercase @xl/pollen-today:hidden",children:t}),(0,i.jsx)("span",{className:"hidden text-xs text-gray-500 @xl/pollen-today:inline",children:l})]});e.s(["PollenTodaySummary",0,({risk:e,average:l,peak:t,changeFromYesterday:a,insight:s,className:r})=>{let o=(0,n.useTranslations)("Pollen"),c=e?x.POLLEN_RISK_COLORS[e]:void 0,m=null===a?null:0===a?(0,i.jsx)("span",{className:"text-xl font-bold text-gray-900","aria-hidden":"true",children:"="}):(0,i.jsxs)(h,{value:Math.abs(a),children:[a>0?(0,i.jsx)(u,{className:"h-4 w-4 self-center text-gray-900","aria-hidden":"true"}):(0,i.jsx)(d,{className:"h-4 w-4 self-center text-gray-900","aria-hidden":"true"}),(0,i.jsx)("span",{className:"sr-only",children:o(a>0?"increase":"decrease")})]});return(0,i.jsx)("div",{className:(0,g.cn)("@container/pollen-today",r),children:(0,i.jsxs)("div",{className:"flex flex-col gap-4 @xl/pollen-today:flex-row @xl/pollen-today:items-end @xl/pollen-today:justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-7",children:[e&&(0,i.jsx)("p",{className:"text-4xl leading-tight font-extrabold tracking-tight",style:{color:c},children:o(x.POLLEN_RISK_LABEL_KEYS[e])}),s&&(0,i.jsx)("p",{className:"max-w-md text-base text-gray-900",children:s})]}),(0,i.jsxs)("div",{className:"flex gap-6 border-t border-gray-200 pt-4 @xl/pollen-today:border-t-0 @xl/pollen-today:pt-0 @xl/pollen-today:[&>*+*]:border-l @xl/pollen-today:[&>*+*]:border-gray-200 @xl/pollen-today:[&>*+*]:pl-6",children:[null!==l&&(0,i.jsx)(p,{value:(0,i.jsx)(h,{value:l}),label:o("todaysAverage"),mobileLabel:o("average")}),null!==t&&(0,i.jsx)(p,{value:(0,i.jsx)(h,{value:t}),label:o("todaysPeak"),mobileLabel:o("peak")}),m&&(0,i.jsx)(p,{value:m,label:o(0===a?"sameAsYesterday":"fromYesterday"),mobileLabel:o(0===a?"sameAsYesterday":"vsYesterday")})]})]})})}],180663)},731947,e=>{"use strict";var l=e.i(381477),t=e.i(730921),a=e.i(550008),i=e.i(45776),n=e.i(533694),s=e.i(175424);let r={tree:"tree",grass:"grass",ragweed:"weed"},o=(e,l)=>e?.[l]??null;e.s(["usePollenForecast",0,function(e){let d=(0,t.useLocale)(),c=!!e&&!(0,n.isConus)(e),u=c?void 0:e?.geocode,{data:g,error:x}=(0,l.default)(u?["pollenForecastDaily",u,d]:null,([,e,l])=>(0,a.getPollenForecastDaily)({geocode:e,language:l}),{revalidateOnFocus:!1,dedupingInterval:6e4}),{data:h,error:p}=(0,l.default)(u?["pollenObservations",u,d]:null,([,e,l])=>(0,a.getPollenObservations)({geocode:e,language:l}),{revalidateOnFocus:!1,dedupingInterval:6e4}),m=!!(h||p);return{data:g&&m?function(e,l){let t=(e.validTimeLocal??[]).map((l,t)=>{let a={};for(let l of s.POLLEN_SPECIES){let n=r[l];a[l]={count:o(e[`${n}PollenCountMean`],t),risk:(0,i.getPollenRiskLevel)(o(e[`${n}PollenIndexMean`],t))}}return{validTimeLocal:l,count:o(e.totalPollenCountMean,t),peak:o(e.totalPollenCountMax,t),risk:(0,i.getPollenRiskLevel)(o(e.totalPollenIndexMean,t)),species:a}});if(!t.length)return null;let a=function(e){if(!e)return null;let l=(0,i.getPollenRiskLevel)(e.total_pollen_idx);return null!==e.total_pollen_cnt||l?{count:e.total_pollen_cnt,risk:l}:null}(l?.pollenobservations?.[0]),n=t[0]?.count??null,d=null!==n&&a?.count!=null?n-a.count:null;return{days:t,yesterday:a,changeFromYesterday:d}}(g,h):null,observations:h??null,error:x,isPending:!c&&!x&&(!g||!m)}}])}]);