(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,550008,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getPollenDaypart=n;let a=e.r(65755),r=e.r(678651),i=e.r(414655);async function n(e){let t=(0,a.getPollenDaypartUrlConfig)(e),l=(0,r.urlFrom)(t),n=await fetch(l,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return await (0,i.handleFetchResponse)(n)}},65755,(e,t,l)=>{"use strict";e.i(288906),Object.defineProperty(l,"__esModule",{value:!0}),l.getPollenDaypartUrlConfig=function({geocode:e,language:t,duration:l="3day"}){return{host:"api.weather.com",protocol:"https",pathname:`/v2/indices/pollen/daypart/${l}`,query:{geocode:e,format:"json",language:t,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}}},436441,e=>{"use strict";var t=e.i(902875),l=e.i(247865),a=e.i(747961);let r=(0,l.forwardRef)(({title:e,titleId:l,desc:a,descId:r,...i},n)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":l,"aria-describedby":r,...i,children:[a?(0,t.jsx)("desc",{id:r,children:a}):null,void 0===e?(0,t.jsx)("title",{id:l,children:"Flu"}):e?(0,t.jsx)("title",{id:l,children:e}):null,(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M8.5 5.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M11 7.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M8 8.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M9 10.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M5.75 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5"}),(0,t.jsx)("path",{fillRule:"evenodd",d:"M12.975 7.5H14v-1h1v3h-1v-1h-1.025a4.97 4.97 0 0 1-1.108 2.66l.719.719.707-.707.707.707L11.879 14l-.707-.707.707-.707-.719-.718a4.97 4.97 0 0 1-2.66 1.107V14h1v1h-3v-1h1v-1.025a4.97 4.97 0 0 1-2.66-1.107l-.719.718.707.707-.707.707L2 11.879l.707-.707.707.707.719-.718A4.97 4.97 0 0 1 3.025 8.5H2v1H1v-3h1v1h1.025a4.97 4.97 0 0 1 1.108-2.66l-.719-.719-.707.707L2 4.121 4.121 2l.707.707-.707.707.719.718A4.97 4.97 0 0 1 7.5 3.025V2h-1V1h3v1h-1v1.025a4.97 4.97 0 0 1 2.66 1.107l.719-.718-.707-.707.707-.707L14 4.121l-.707.707-.707-.707-.719.718A4.97 4.97 0 0 1 12.975 7.5m-7.197 3.826a4 4 0 1 0 4.444-6.652 4 4 0 0 0-4.444 6.652",clipRule:"evenodd"})]})]})),i=l.default.forwardRef((e,l)=>(0,t.jsx)(a.BaseIcon,{ref:l,icon:r,...e}));i.displayName="Flu",e.s(["Flu",0,i])},651155,e=>{"use strict";var t=e.i(902875),l=e.i(581014),a=e.i(380993),r=e.i(341669),i=e.i(240058),n=e.i(170689),s=e.i(47524),o=e.i(632137);let d=({value:e,maxValue:a,strokeColor:r,heading:d,description:c,icon:u,href:h})=>{let f=(0,l.useTranslations)("HealthAndActivities");return(0,t.jsxs)(i.default,{className:(0,o.cn)("flex items-center justify-between border-[#dedede] not-last:border-b-1","py-4 pr-4"),href:h,children:[(0,t.jsx)(n.DonutChart,{value:e,maxValue:a,diameter:50,strokeWidth:4,strokeColor:r,icon:u,className:"min-w-[50px]"}),(0,t.jsxs)("div",{className:"ml-5 grow",children:[(0,t.jsx)("div",{className:"mb-1 text-lg leading-snug",children:f(d)}),(0,t.jsx)("div",{className:"text-sm leading-[1.25] text-[#6f7585]",children:f(c)})]}),(0,t.jsx)(s.ChevronRight,{className:"ml-2.5 w-4 shrink-0"})]})},c=["s1","s2","s3"],u=({data:e=[],isLoading:i=!1})=>{let n=(0,l.useTranslations)("HealthAndActivities");return i||e.length?(0,t.jsxs)(a.Card,{"data-testid":"HealthAndActivitiesModule","aria-label":n("healthAndActivities"),children:[(0,t.jsx)(a.CardHeader,{text:n("healthActivities")}),(0,t.jsx)(a.CardContent,{isLoading:i,skeleton:(0,t.jsx)("div",{className:"flex flex-col gap-4",children:c.map(e=>(0,t.jsx)(r.default,{skeletonClassName:"h-6 w-full"},e))}),children:e.map(e=>(0,t.jsx)(d,{...e},e.heading))})]}):null};var h=e.i(16838),f=e.i(381477),x=e.i(550008),g=e.i(247865),v=e.i(747961);let m=(0,g.forwardRef)(({title:e,titleId:l,desc:a,descId:r,...i},n)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":l,"aria-describedby":r,...i,children:[a?(0,t.jsx)("desc",{id:r,children:a}):null,void 0===e?(0,t.jsx)("title",{id:l,children:"grass"}):e?(0,t.jsx)("title",{id:l,children:e}):null,(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.366 2.062c.194.108.291.331.238.546-.751 3.018-.824 5.682-.714 7.753.492-1.662 1.312-3.691 2.919-5.446a.494.494 0 0 1 .605-.097c.2.11.296.345.232.564a25.4 25.4 0 0 0-.807 3.851c-.185 1.515-.185 3.022.205 4.113a.493.493 0 0 1-.928.328c-.47-1.312-.444-3.008-.254-4.56.066-.54.153-1.07.25-1.573-.966 1.698-1.384 3.427-1.696 4.715-.101.419-.191.79-.285 1.1a.492.492 0 0 1-.96-.084l-.001-.007c-.213-1.791-.582-4.891.033-8.718-.707 1.279-1.072 2.704-1.268 4.06-.144 1-.195 1.949-.23 2.758l-.012.309c-.027.659-.05 1.245-.127 1.635a.492.492 0 0 1-.97-.025c-.323-2.224-1.173-4.559-2.65-6.574.215.872.401 1.8.55 2.686.283 1.695.441 3.311.38 4.15a.492.492 0 0 1-.983-.072c.053-.711-.086-2.226-.37-3.917-.28-1.68-.693-3.466-1.16-4.71a.49.49 0 0 1 .192-.581.495.495 0 0 1 .613.059c1.71 1.653 2.894 3.65 3.626 5.698a23 23 0 0 1 .166-1.554c.303-2.095 1.007-4.496 2.815-6.323a.495.495 0 0 1 .591-.084",clipRule:"evenodd"})]})),p=g.default.forwardRef((e,l)=>(0,t.jsx)(v.BaseIcon,{ref:l,icon:m,...e}));p.displayName="Grass";var j=e.i(725287);let w={0:"None",1:"Low",2:"Moderate",3:"High",4:"VeryHigh"},y={0:"veryLowRisk",1:"lowRisk",2:"mediumRisk",3:"highRisk",4:"veryHighRisk"},b={0:"#00e838",1:"#a9eB02",2:"#ebbb02",3:"#f27200",4:"#ff0000"},C={0:"#D9DCFD",1:"#AEAFFF",2:"#868CFF",3:"#5151FF",4:"#17007E"};var F=e.i(738634),k=e.i(436441),A=e.i(611540),N=e.i(546446),R=e.i(5397);let L=({location:e})=>{let{data:l,isLoading:a,isPending:r,error:i}=(e=>{let t=(0,j.useParams)(),l=t?.locale,{data:a,error:r,isLoading:i}=(0,f.default)(e?["pollen",e.geocode,l]:null,([e,t,l])=>(0,x.getPollenDaypart)({geocode:t,language:l}),{revalidateOnFocus:!1,dedupingInterval:6e4}),{data:n,error:s,isLoading:o}=(0,f.default)(e?["cognitiveHealth",e.geocode,l]:null,([e,t,l])=>(0,F.getDailyCognitiveHealthForecast)({geocode:t,language:l,conditionType:"coldAndFlu"}),{revalidateOnFocus:!1,dedupingInterval:6e4}),d={locId:e?.placeId,locale:l},c=(0,A.interpolateUrl)(A.URLS.allergy,d),u=a?function(e,t){let{pollenForecast12hour:l}=e,a=Object.entries({grass:l.grassPollenIndex[0]||0,ragweed:l.ragweedPollenIndex[0]||0,tree:l.treePollenIndex[0]||0}).sort(([e,t],[l,a])=>a-t)[0][0],r=l[`${a}PollenIndex`][0]||0,i=w[r],n=`${a}Pollen${i}`;return{value:r,maxValue:4,heading:"allergy",description:0!==r?n:"noPollenDetected",strokeColor:b[r],icon:p,href:t}}(a,c):void 0,h=(0,A.interpolateUrl)(A.URLS.coldFlu,d);return{data:[u,n?function(e,t){let{riskLevel:l}=e?.coldAndFlu||{},a=l?.[0];return null==a?null:{value:a,maxValue:4,heading:"coldFlu",description:`${y[a]}ColdFlu`,strokeColor:C[a],icon:k.Flu,href:t}}(n,h):void 0].filter(Boolean),isLoading:i||o,isPending:!a&&!n&&!r&&!s,error:r||s}})(e),n=(0,N.useAtomValue)(R.showAdminHeaderAtom);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.DebugCollector,{componentName:"HealthAndActivities",data:{props:{location:e},state:{effectiveLocation:e,isLoading:a,data:l,error:i,componentState:i&&"error"||a&&"loading"||"ready"},performance:{renderCount:void 0}},enabled:n}),(0,t.jsx)(u,{data:l,isLoading:r})]})};var P=e.i(64412);let D=()=>{let{location:e,error:l}=(0,P.useLocation)();return l?(0,t.jsxs)("div",{children:["Error loading location data: ",l.message]}):(0,t.jsx)(L,{location:e})};e.s(["HealthAndActivitiesBlockClient",0,D,"default",0,D],651155)},907470,function(e){e.n(e.i(651155))},170689,e=>{"use strict";var t=e.i(902875),l=e.i(632137);e.s(["DonutChart",0,({value:e=0,diameter:a=60,strokeWidth:r=5,strokeColor:i,icon:n,iconSize:s,iconClassName:o,className:d,textClassName:c,displayValue:u,maxValue:h,useExtendedLinecap:f=!1,extendedLinecapProps:x={radius:7,strokeWidth:2},invert:g,textColor:v,textY:m="55%",strokeLinecap:p,railClassName:j})=>{let w,y=a/2,b=y-r/2,C=2*Math.PI*b;w=h?C/100*(e/h*100):C/100*e;let F={strokeWidth:r,strokeDasharray:`${w} ${C}`,stroke:i||((e,t)=>{if(500===t)switch(!0){case e>=0&&e=51&&e=101&&e=151&&e=201:return"#660099";default:return"#a0a0a0"}let l=t?e/t*100:e;switch(!0){case l>=0&&l=20&&l=40&&l=60&&l=80:return"#e82808";default:return"#a0a0a0"}})(e,h)},k=`rotate(90 ${y} ${y})`,A=()=>{if(u||0===u)return(0,t.jsx)("text",{x:"50%",y:m,dominantBaseline:"middle",alignmentBaseline:"middle",textAnchor:"middle",className:(0,l.cn)("fill-text-medium text-[36px] font-extralight",c),"data-testid":"DonutChartValue",fill:v,children:u});if(n){let e=s||Math.floor(y),a=Math.floor(y-e/2),r=Math.floor(y-e/2);return(0,t.jsx)("foreignObject",{x:a,y:r,width:e,height:e,children:(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(n,{className:(0,l.cn)("h-full w-full",o),"aria-hidden":"true"})})})}return null};return(0,t.jsxs)("svg",{width:a,height:a,"data-testid":"DonutChart",className:(0,l.cn)("block overflow-visible rounded-full",d,{"scale-x-[-1]":g}),children:[(0,t.jsx)("circle",{r:b,cx:y,cy:y,transform:k,style:{strokeWidth:r},className:(0,l.cn)("fill-transparent stroke-[#E7ECF1]",j)}),e>=0?(0,t.jsx)("circle",{r:b,cx:y,cy:y,transform:k,strokeLinecap:p||"round",style:F,className:"fill-transparent transition-[stroke-dasharray] duration-300 ease-in-out"}):null,g&&A()?(0,t.jsx)("g",{transform:`translate(${a}, 0) scale(-1, 1)`,children:A()}):A(),f&&(0,t.jsx)("circle",{r:x.radius,cx:y,style:{transform:`rotateZ(${w/C*100*360/100}deg)`,transformOrigin:"center"},fill:F.stroke,cy:y+b,strokeWidth:x.strokeWidth,className:"stroke-[var(--backgroundCard)] transition-transform duration-300 ease-in-out"})]})}])}]);