(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,125408,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FLU_STRAIN_DATA_URL=void 0,a.getFluStrainData=r,a.getDistrictFluStrain=s;let l=e.r(414655);async function r(){let e=await fetch(a.FLU_STRAIN_DATA_URL,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:21600}});return(0,l.handleFetchResponse)(e)}async function s(e,t){return function(e,t,a=new Date){if(!t)return;let l=a.getFullYear(),r=String(l),s=String(l-1);for(let a=e.length-1;a>=0;a--){let l=e[a];if(l&&l.REGION===t&&(l.YEAR===r||l.YEAR===s))return l}}(await r(),e,t)}a.FLU_STRAIN_DATA_URL="https://s.w-x.co/ai-core/WHO_NREVSS_Clinical_Labs_small.json"},302675,e=>{"use strict";var t=e.i(902875),a=e.i(64412),l=e.i(247865),r=e.i(695881),s=e.i(581014),n=e.i(380993),i=e.i(368847),o=e.i(170689),c=e.i(436441);let d=["A","B"],u=({value:e,type:a})=>{let l=(0,s.useTranslations)("FluStrainInfo");return(0,t.jsxs)("li",{className:"flex grow basis-0 items-center py-4 pr-4",children:[(0,t.jsx)(o.DonutChart,{value:e??0,maxValue:100,diameter:84,strokeWidth:4,strokeColor:"#1B4DE4",displayValue:null==e?"--":(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)("tspan",{className:"text-base font-semibold",children:"%"})]}),icon:null===e?c.Flu:void 0,textClassName:"fill-[#424a50] text-xl font-semibold",className:"min-w-[84px]"}),(0,t.jsxs)("div",{className:"ml-5 grow",children:[(0,t.jsx)(i.Text,{variant:"Caption.M",color:"secondary",elementType:"span",className:"mb-1 block tracking-wider uppercase",children:l("strain",{type:a})}),(0,t.jsx)(i.Text,{variant:"Title.XS",elementType:"h3",className:"mb-1",children:l("influenzaType",{type:a})}),(0,t.jsx)(i.Text,{variant:"Body.S",color:"secondary",children:l("A"===a?"strainANarrative":"strainBNarrative")})]})]})};var x=e.i(341669);let h=()=>(0,t.jsxs)("li",{className:"flex grow basis-0 items-center py-4 pr-4",children:[(0,t.jsx)(x.default,{skeletonClassName:"h-[84px] w-[84px] min-w-[84px] rounded-full"}),(0,t.jsxs)("div",{className:"ml-5 grow",children:[(0,t.jsx)(x.default,{skeletonClassName:"mb-1 block h-3 max-w-16"}),(0,t.jsx)(x.default,{skeletonClassName:"mb-2 block h-4.5 max-w-44"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(x.default,{skeletonClassName:"block h-3 w-full"}),(0,t.jsx)(x.default,{skeletonClassName:"block h-3 w-full"}),(0,t.jsx)(x.default,{skeletonClassName:"block h-3 w-3/4"})]})]})]}),f=({data:e=[],isLoading:a=!1,error:l=null})=>{let r=(0,s.useTranslations)("FluStrainInfo");return a||l||0!==e.length?(0,t.jsxs)(n.Card,{"data-testid":"FluStrainInfoModule","aria-label":r("heading"),children:[(0,t.jsx)(n.CardHeader,{text:r("heading")}),(0,t.jsx)(n.CardContent,{children:l?(0,t.jsx)(i.Text,{variant:"Body.M",color:"secondary",className:"flex min-h-32 items-center justify-center py-4 text-center",children:r("errorMsg")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Text,{variant:"Body.S",color:"secondary",className:"mb-4",children:r("subHeading")}),(0,t.jsx)("ul",{className:"flex flex-col @lg/card:flex-row @lg/card:gap-6",children:a?d.map(e=>(0,t.jsx)(h,{},e)):e.map(e=>(0,t.jsx)(u,{value:e.value,type:e.type},e.type))}),(0,t.jsx)(i.Text,{variant:"Caption.M",color:"secondary",className:"mt-4",children:r("source")})]})})]}):null};var m=e.i(381477),j=e.i(125408);let g=(0,r.createLogger)("FluStrainInfo"),v=({location:e,initializing:a,initialError:r})=>{let{data:s,isLoading:n,error:i}=function(e){let t,a,l,r,s,n,i=e?.adminDistrict,{data:o,error:c,isLoading:u}=(0,m.default)(i?["districtFluStrain",i]:null,([e,t])=>(0,j.getDistrictFluStrain)(t),{revalidateOnFocus:!1,dedupingInterval:36e5});return{data:(t=o?parseInt(o["TOTAL A"],10):NaN,a=o?parseInt(o["TOTAL B"],10):NaN,l=Number.isFinite(t)?t:0,s=l+(r=Number.isFinite(a)?a:0),n=e=>s>0?parseInt((100*e/s).toFixed(0),10):null,d.map(e=>({type:e,value:"A"===e?n(l):n(r)}))),isLoading:u,error:c}}(e),o=r||i||null;return(0,l.useEffect)(()=>{o&&g.error("Failed to load flu strain info",o)},[o]),(0,t.jsx)(f,{data:s,isLoading:a||n,error:o})},p=()=>{let{location:e,isLoading:l,error:r}=(0,a.useLocation)();return(0,t.jsx)(v,{location:e,initializing:l,initialError:r})};e.s(["FluStrainInfoBlockClient",0,p,"default",0,p],302675)},682228,function(e){e.n(e.i(302675))},436441,e=>{"use strict";var t=e.i(902875),a=e.i(247865),l=e.i(747961);let r=(0,a.forwardRef)(({title:e,titleId:a,desc:l,descId:r,...s},n)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":a,"aria-describedby":r,...s,children:[l?(0,t.jsx)("desc",{id:r,children:l}):null,void 0===e?(0,t.jsx)("title",{id:a,children:"Flu"}):e?(0,t.jsx)("title",{id:a,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"})]})]})),s=a.default.forwardRef((e,a)=>(0,t.jsx)(l.BaseIcon,{ref:a,icon:r,...e}));s.displayName="Flu",e.s(["Flu",0,s])},170689,e=>{"use strict";var t=e.i(902875),a=e.i(632137);e.s(["DonutChart",0,({value:e=0,diameter:l=60,strokeWidth:r=5,strokeColor:s,icon:n,iconSize:i,iconClassName:o,className:c,textClassName:d,displayValue:u,maxValue:x,useExtendedLinecap:h=!1,extendedLinecapProps:f={radius:7,strokeWidth:2},invert:m,textColor:j,textY:g="55%",strokeLinecap:v,railClassName:p})=>{let N,y=l/2,b=y-r/2,w=2*Math.PI*b;N=x?w/100*(e/x*100):w/100*e;let k={strokeWidth:r,strokeDasharray:`${N} ${w}`,stroke:s||((e,t)=>{if(500===t)switch(!0){case e>=0&&e=51&&e=101&&e=151&&e=201:return"#660099";default:return"#a0a0a0"}let a=t?e/t*100:e;switch(!0){case a>=0&&a=20&&a=40&&a=60&&a=80:return"#e82808";default:return"#a0a0a0"}})(e,x)},F=`rotate(90 ${y} ${y})`,C=()=>{if(u||0===u)return(0,t.jsx)("text",{x:"50%",y:g,dominantBaseline:"middle",alignmentBaseline:"middle",textAnchor:"middle",className:(0,a.cn)("fill-text-medium text-[36px] font-extralight",d),"data-testid":"DonutChartValue",fill:j,children:u});if(n){let e=i||Math.floor(y),l=Math.floor(y-e/2),r=Math.floor(y-e/2);return(0,t.jsx)("foreignObject",{x:l,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,a.cn)("h-full w-full",o),"aria-hidden":"true"})})})}return null};return(0,t.jsxs)("svg",{width:l,height:l,"data-testid":"DonutChart",className:(0,a.cn)("block overflow-visible rounded-full",c,{"scale-x-[-1]":m}),children:[(0,t.jsx)("circle",{r:b,cx:y,cy:y,transform:F,style:{strokeWidth:r},className:(0,a.cn)("fill-transparent stroke-[#E7ECF1]",p)}),e>=0?(0,t.jsx)("circle",{r:b,cx:y,cy:y,transform:F,strokeLinecap:v||"round",style:k,className:"fill-transparent transition-[stroke-dasharray] duration-300 ease-in-out"}):null,m&&C()?(0,t.jsx)("g",{transform:`translate(${l}, 0) scale(-1, 1)`,children:C()}):C(),h&&(0,t.jsx)("circle",{r:f.radius,cx:y,style:{transform:`rotateZ(${N/w*100*360/100}deg)`,transformOrigin:"center"},fill:k.stroke,cy:y+b,strokeWidth:f.strokeWidth,className:"stroke-[var(--backgroundCard)] transition-transform duration-300 ease-in-out"})]})}])}]);