ctxloom-pro 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/dashboard/dist/dashboard/client/assets/{index-CaOXYzr6.js → index-B89fKXqI.js} +35 -36
- package/apps/dashboard/dist/dashboard/client/assets/index-BOcw_HPT.css +1 -0
- package/apps/dashboard/dist/dashboard/client/index.html +2 -2
- package/dist/index.js +13 -7
- package/package.json +1 -1
- package/apps/dashboard/dist/dashboard/client/assets/index-CzVWHO8g.css +0 -1
|
@@ -64,8 +64,7 @@ Error generating stack: `+a.message+`
|
|
|
64
64
|
* LICENSE.md file in the root directory of this source tree.
|
|
65
65
|
*
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xs.apply(this,arguments)}function cO(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Hk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vk(e,t){return e.button===0&&(!t||t==="_self")&&!Hk(e)}const Kk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Gk=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Xk="6";try{window.__reactRouterVersion=Xk}catch{}const qk=T.createContext({isTransitioning:!1}),Yk="startTransition",T0=L$[Yk];function Qk(e){let{basename:t,children:n,future:r,window:i}=e,a=T.useRef();a.current==null&&(a.current=Yj({window:i,v5Compat:!0}));let o=a.current,[l,u]=T.useState({action:o.action,location:o.location}),{v7_startTransition:s}=r||{},f=T.useCallback(c=>{s&&T0?T0(()=>u(c)):u(c)},[u,s]);return T.useLayoutEffect(()=>o.listen(f),[o,f]),T.useEffect(()=>zk(r),[r]),T.createElement(Uk,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Zk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,e2=T.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:u,to:s,preventScrollReset:f,viewTransition:c}=t,d=cO(t,Kk),{basename:h}=T.useContext(Mr),g,v=!1;if(typeof s=="string"&&Jk.test(s)&&(g=s,Zk))try{let b=new URL(window.location.href),w=s.startsWith("//")?new URL(b.protocol+s):new URL(s),x=ya(w.pathname,h);w.origin===b.origin&&x!=null?s=x+w.search+w.hash:v=!0}catch{}let y=_k(s,{relative:i}),p=n2(s,{replace:o,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:c});function m(b){r&&r(b),b.defaultPrevented||p(b)}return T.createElement("a",Xs({},d,{href:g||y,onClick:v||a?r:m,ref:n,target:u}))}),No=T.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:l,to:u,viewTransition:s,children:f}=t,c=cO(t,Gk),d=wf(u,{relative:c.relative}),h=ou(),g=T.useContext(iO),{navigator:v,basename:y}=T.useContext(Mr),p=g!=null&&r2(d)&&s===!0,m=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,b=h.pathname,w=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(b=b.toLowerCase(),w=w?w.toLowerCase():null,m=m.toLowerCase()),w&&y&&(w=ya(w,y)||w);const x=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let _=b===m||!o&&b.startsWith(m)&&b.charAt(x)==="/",S=w!=null&&(w===m||!o&&w.startsWith(m)&&w.charAt(m.length)==="/"),O={isActive:_,isPending:S,isTransitioning:p},E=_?r:void 0,j;typeof a=="function"?j=a(O):j=[a,_?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(O):l;return T.createElement(e2,Xs({},c,{"aria-current":E,className:j,ref:n,style:I,to:u,viewTransition:s}),typeof f=="function"?f(O):f)});var Op;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Op||(Op={}));var j0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(j0||(j0={}));function t2(e){let t=T.useContext(bf);return t||Ie(!1),t}function n2(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,u=Sk(),s=ou(),f=wf(e,{relative:o});return T.useCallback(c=>{if(Vk(c,n)){c.preventDefault();let d=r!==void 0?r:Gs(s)===Gs(f);u(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[s,u,f,r,i,n,e,a,o,l])}function r2(e,t){t===void 0&&(t={});let n=T.useContext(qk);n==null&&Ie(!1);let{basename:r}=t2(Op.useViewTransitionState),i=wf(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=ya(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ya(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _p(i.pathname,o)!=null||_p(i.pathname,a)!=null}const ey="/api";async function tn(e){const t=await fetch(`${ey}${e}`);if(!t.ok)throw new Error(`API ${e} failed: ${t.status}`);return t.json()}async function i2(e,t){const n=await fetch(`${ey}${e}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=`${n.status}`;try{const i=await n.json();i!=null&&i.error&&(r=i.error)}catch{}throw new Error(r)}return n.json()}const wn={overview:()=>tn("/overview"),graph:()=>tn("/graph"),risk:()=>tn("/risk"),communities:()=>tn("/communities"),churn:()=>tn("/churn"),ownership:()=>tn("/ownership"),status:()=>tn("/status"),tokens:()=>tn("/tokens"),trends:(e="30d")=>tn(`/trends?range=${e}`),refresh:()=>fetch(`${ey}/refresh`,{method:"POST"}).then(e=>e.json()),listProjects:()=>tn("/projects"),activeProject:()=>tn("/projects/active"),switchProject:e=>i2("/projects/active",{slug:e})},k0="ctxloom.dashboard.activeSlug";function a2(){const[e,t]=T.useState([]),[n,r]=T.useState(null),[i,a]=T.useState(!1),[o,l]=T.useState(null),[u,s]=T.useState(null);T.useEffect(()=>{let c=!1;return wn.listProjects().then(({projects:d})=>{if(c)return;t(d);const h=d.find(v=>v.isActive)??d[0];r(h);const g=localStorage.getItem(k0);g&&g!==h.slug&&d.some(v=>v.slug===g)&&f(g)}).catch(d=>{c||s(d instanceof Error?d.message:String(d))}),()=>{c=!0}},[]),T.useEffect(()=>{if(!i)return;function c(d){var g;const h=d.target;(g=h==null?void 0:h.closest)!=null&&g.call(h,"[data-project-switcher]")||a(!1)}return document.addEventListener("click",c),()=>document.removeEventListener("click",c)},[i]);async function f(c){l(c),s(null);try{const{active:d}=await wn.switchProject(c);localStorage.setItem(k0,d.slug),window.location.reload()}catch(d){s(d instanceof Error?d.message:String(d)),l(null)}}return n?e.length<=1?P.jsxs("div",{className:"px-3 py-2 text-xs text-white/40 truncate",title:`${n.name}
|
|
68
|
-
${n.root}`,children:[P.jsx("span",{className:"text-white/30",children:"project: "}),P.jsx("span",{className:"text-white/80",children:n.name})]}):P.jsxs("div",{className:"relative px-2 py-2","data-project-switcher":!0,children:[P.jsxs("button",{type:"button",onClick:()=>a(c=>!c),disabled:o!==null,className:"w-full flex items-center justify-between gap-2 rounded-md px-2.5 py-2 text-xs text-white/80 hover:bg-white/5 transition-colors disabled:opacity-50",title:n.root,children:[P.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[P.jsx("span",{className:"text-white/40 shrink-0",children:"◆"}),P.jsx("span",{className:"truncate",children:n.name})]}),P.jsx("span",{className:"text-white/30 text-[10px] shrink-0",children:i?"▴":"▾"})]}),i&&P.jsx("div",{className:"absolute left-2 right-2 mt-1 z-20 rounded-md bg-[#1f1e2c] py-1 shadow-lg",style:{border:"1px solid rgba(255,255,255,0.08)"},children:e.map(c=>P.jsxs("button",{type:"button",onClick:()=>{a(!1),c.slug!==n.slug&&f(c.slug)},disabled:o!==null,className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 transition-colors ${c.slug===n.slug?"text-[#a78bfa] bg-[#603dc6]/10":"text-white/70 hover:bg-white/5"} disabled:opacity-50`,title:c.root,children:[P.jsx("span",{className:"shrink-0 w-3 text-center",children:c.slug===n.slug?"●":" "}),P.jsx("span",{className:"truncate flex-1",children:c.name}),!c.hasSnapshot&&P.jsx("span",{className:"text-[10px] text-white/30 shrink-0",title:"Never indexed — first switch will be slow",children:"cold"}),c.isDefault&&P.jsx("span",{className:"text-[10px] text-white/30 shrink-0",title:"Project the dashboard was launched against",children:"default"})]},c.slug))}),o&&P.jsx("div",{className:"px-2.5 py-1 text-[10px] text-white/40",children:"switching… (cold start may take a moment)"}),u&&P.jsx("div",{className:"px-2.5 py-1 text-[10px] text-red-400/80",role:"alert",children:u})]}):P.jsx("div",{className:"px-3 py-2 text-xs text-white/30",children:u?`Projects unavailable: ${u}`:"Loading projects…"})}const o2=[{to:"/",label:"Overview",icon:"◈"},{to:"/graph",label:"Graph",icon:"⬡"},{to:"/risk",label:"Risk",icon:"⚠"},{to:"/trends",label:"Trends",icon:"⤴"},{to:"/communities",label:"Communities",icon:"⬡⬡"},{to:"/ownership",label:"Ownership",icon:"◎"},{to:"/guide",label:"Guide",icon:"◉"}];function l2(){return P.jsxs("div",{className:"flex h-screen bg-[#18181f]",children:[P.jsxs("aside",{className:"w-52 shrink-0 bg-[#131220] flex flex-col",style:{borderRight:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"px-4 py-4 flex items-center gap-2.5",style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:[P.jsx("img",{src:"/logo.svg",alt:"ctxloom",className:"w-6 h-6 shrink-0"}),P.jsxs("div",{children:[P.jsxs("span",{className:"text-sm font-semibold",children:[P.jsx("span",{className:"text-white",children:"ctx"}),P.jsx("span",{className:"text-[#a78bfa]",children:"loom"})]}),P.jsx("span",{className:"ml-1 text-xs text-white/30",children:"dashboard"})]})]}),P.jsx("div",{style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:P.jsx(a2,{})}),P.jsx("nav",{className:"flex-1 py-4 space-y-1 px-2",children:o2.map(({to:e,label:t,icon:n})=>P.jsxs(No,{to:e,end:e==="/",className:({isActive:r})=>`flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors ${r?"bg-[#603dc6]/15 text-[#a78bfa] font-medium":"text-white/40 hover:text-white/70 hover:bg-white/5"}`,children:[P.jsx("span",{className:"text-xs select-none shrink-0",children:n}),t]},e))})]}),P.jsx("main",{className:"flex-1 overflow-y-auto p-8 bg-[#18181f]",children:P.jsx(Fk,{})})]})}function li(e){const[t,n]=T.useState({status:"loading"});return T.useEffect(()=>{let r=!1;return n({status:"loading"}),e().then(i=>{r||n({status:"success",data:i})}).catch(i=>{r||n({status:"error",message:String(i)})}),()=>{r=!0}},[]),t}function Lu({label:e,value:t,sub:n}){return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5 transition-transform hover:-translate-y-0.5",children:[P.jsx("p",{className:"text-white/50 text-xs uppercase tracking-wider",children:e}),P.jsx("p",{className:"text-white text-3xl font-semibold mt-1",children:t}),n&&P.jsx("p",{className:"text-white/40 text-xs mt-1",children:n})]})}const u2={critical:"bg-red-900/50 text-red-300 font-semibold",high:"bg-orange-900/50 text-orange-300",medium:"bg-yellow-900/50 text-yellow-300",low:"bg-green-900/50 text-green-300"};function fO({level:e}){return P.jsx("span",{className:`inline-block rounded-full px-2.5 py-0.5 text-xs ${u2[e]??"bg-white/10 text-white/50"}`,children:e})}function qa({message:e}){return P.jsx("div",{className:"bg-red-900/30 border border-red-500/30 text-red-300 rounded-lg p-3 text-sm",children:e})}function dO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=dO(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ie(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=dO(e))&&(r&&(r+=" "),r+=t);return r}var s2=Array.isArray,Pt=s2,c2=typeof xu=="object"&&xu&&xu.Object===Object&&xu,hO=c2,f2=hO,d2=typeof self=="object"&&self&&self.Object===Object&&self,h2=f2||d2||Function("return this")(),Tn=h2,p2=Tn,v2=p2.Symbol,lu=v2,C0=lu,pO=Object.prototype,m2=pO.hasOwnProperty,y2=pO.toString,yo=C0?C0.toStringTag:void 0;function g2(e){var t=m2.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var i=y2.call(e);return r&&(t?e[yo]=n:delete e[yo]),i}var b2=g2,x2=Object.prototype,w2=x2.toString;function _2(e){return w2.call(e)}var S2=_2,N0=lu,O2=b2,P2=S2,A2="[object Null]",E2="[object Undefined]",M0=N0?N0.toStringTag:void 0;function $2(e){return e==null?e===void 0?E2:A2:M0&&M0 in Object(e)?O2(e):P2(e)}var rr=$2;function T2(e){return e!=null&&typeof e=="object"}var ir=T2,j2=rr,k2=ir,C2="[object Symbol]";function N2(e){return typeof e=="symbol"||k2(e)&&j2(e)==C2}var Ya=N2,M2=Pt,I2=Ya,D2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R2=/^\w*$/;function L2(e,t){if(M2(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||I2(e)?!0:R2.test(e)||!D2.test(e)||t!=null&&e in Object(t)}var ty=L2;function B2(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dr=B2;const Qa=ye(Dr);var z2=rr,F2=Dr,U2="[object AsyncFunction]",W2="[object Function]",H2="[object GeneratorFunction]",V2="[object Proxy]";function K2(e){if(!F2(e))return!1;var t=z2(e);return t==W2||t==H2||t==U2||t==V2}var ny=K2;const te=ye(ny);var G2=Tn,X2=G2["__core-js_shared__"],q2=X2,qd=q2,I0=function(){var e=/[^.]+$/.exec(qd&&qd.keys&&qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Y2(e){return!!I0&&I0 in e}var Q2=Y2,Z2=Function.prototype,J2=Z2.toString;function eC(e){if(e!=null){try{return J2.call(e)}catch{}try{return e+""}catch{}}return""}var vO=eC,tC=ny,nC=Q2,rC=Dr,iC=vO,aC=/[\\^$.*+?()[\]{}|]/g,oC=/^\[object .+?Constructor\]$/,lC=Function.prototype,uC=Object.prototype,sC=lC.toString,cC=uC.hasOwnProperty,fC=RegExp("^"+sC.call(cC).replace(aC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dC(e){if(!rC(e)||nC(e))return!1;var t=tC(e)?fC:oC;return t.test(iC(e))}var hC=dC;function pC(e,t){return e==null?void 0:e[t]}var vC=pC,mC=hC,yC=vC;function gC(e,t){var n=yC(e,t);return mC(n)?n:void 0}var Pi=gC,bC=Pi,xC=bC(Object,"create"),_f=xC,D0=_f;function wC(){this.__data__=D0?D0(null):{},this.size=0}var _C=wC;function SC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var OC=SC,PC=_f,AC="__lodash_hash_undefined__",EC=Object.prototype,$C=EC.hasOwnProperty;function TC(e){var t=this.__data__;if(PC){var n=t[e];return n===AC?void 0:n}return $C.call(t,e)?t[e]:void 0}var jC=TC,kC=_f,CC=Object.prototype,NC=CC.hasOwnProperty;function MC(e){var t=this.__data__;return kC?t[e]!==void 0:NC.call(t,e)}var IC=MC,DC=_f,RC="__lodash_hash_undefined__";function LC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DC&&t===void 0?RC:t,this}var BC=LC,zC=_C,FC=OC,UC=jC,WC=IC,HC=BC;function Za(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Za.prototype.clear=zC;Za.prototype.delete=FC;Za.prototype.get=UC;Za.prototype.has=WC;Za.prototype.set=HC;var VC=Za;function KC(){this.__data__=[],this.size=0}var GC=KC;function XC(e,t){return e===t||e!==e&&t!==t}var ry=XC,qC=ry;function YC(e,t){for(var n=e.length;n--;)if(qC(e[n][0],t))return n;return-1}var Sf=YC,QC=Sf,ZC=Array.prototype,JC=ZC.splice;function eN(e){var t=this.__data__,n=QC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():JC.call(t,n,1),--this.size,!0}var tN=eN,nN=Sf;function rN(e){var t=this.__data__,n=nN(t,e);return n<0?void 0:t[n][1]}var iN=rN,aN=Sf;function oN(e){return aN(this.__data__,e)>-1}var lN=oN,uN=Sf;function sN(e,t){var n=this.__data__,r=uN(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var cN=sN,fN=GC,dN=tN,hN=iN,pN=lN,vN=cN;function Ja(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ja.prototype.clear=fN;Ja.prototype.delete=dN;Ja.prototype.get=hN;Ja.prototype.has=pN;Ja.prototype.set=vN;var Of=Ja,mN=Pi,yN=Tn,gN=mN(yN,"Map"),iy=gN,R0=VC,bN=Of,xN=iy;function wN(){this.size=0,this.__data__={hash:new R0,map:new(xN||bN),string:new R0}}var _N=wN;function SN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ON=SN,PN=ON;function AN(e,t){var n=e.__data__;return PN(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Pf=AN,EN=Pf;function $N(e){var t=EN(this,e).delete(e);return this.size-=t?1:0,t}var TN=$N,jN=Pf;function kN(e){return jN(this,e).get(e)}var CN=kN,NN=Pf;function MN(e){return NN(this,e).has(e)}var IN=MN,DN=Pf;function RN(e,t){var n=DN(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var LN=RN,BN=_N,zN=TN,FN=CN,UN=IN,WN=LN;function eo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eo.prototype.clear=BN;eo.prototype.delete=zN;eo.prototype.get=FN;eo.prototype.has=UN;eo.prototype.set=WN;var ay=eo,mO=ay,HN="Expected a function";function oy(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(HN);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(oy.Cache||mO),n}oy.Cache=mO;var yO=oy;const VN=ye(yO);var KN=yO,GN=500;function XN(e){var t=KN(e,function(r){return n.size===GN&&n.clear(),r}),n=t.cache;return t}var qN=XN,YN=qN,QN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZN=/\\(\\)?/g,JN=YN(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QN,function(n,r,i,a){t.push(i?a.replace(ZN,"$1"):r||n)}),t}),eM=JN;function tM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ly=tM,L0=lu,nM=ly,rM=Pt,iM=Ya,B0=L0?L0.prototype:void 0,z0=B0?B0.toString:void 0;function gO(e){if(typeof e=="string")return e;if(rM(e))return nM(e,gO)+"";if(iM(e))return z0?z0.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var aM=gO,oM=aM;function lM(e){return e==null?"":oM(e)}var bO=lM,uM=Pt,sM=ty,cM=eM,fM=bO;function dM(e,t){return uM(e)?e:sM(e,t)?[e]:cM(fM(e))}var xO=dM,hM=Ya;function pM(e){if(typeof e=="string"||hM(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Af=pM,vM=xO,mM=Af;function yM(e,t){t=vM(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[mM(t[n++])];return n&&n==r?e:void 0}var uy=yM,gM=uy;function bM(e,t,n){var r=e==null?void 0:gM(e,t);return r===void 0?n:r}var wO=bM;const Mt=ye(wO);function xM(e){return e==null}var wM=xM;const ne=ye(wM);var _M=rr,SM=Pt,OM=ir,PM="[object String]";function AM(e){return typeof e=="string"||!SM(e)&&OM(e)&&_M(e)==PM}var EM=AM;const mi=ye(EM);var _O={exports:{}},ve={};/**
|
|
67
|
+
*/function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xs.apply(this,arguments)}function cO(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Hk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vk(e,t){return e.button===0&&(!t||t==="_self")&&!Hk(e)}const Kk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Gk=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Xk="6";try{window.__reactRouterVersion=Xk}catch{}const qk=T.createContext({isTransitioning:!1}),Yk="startTransition",T0=L$[Yk];function Qk(e){let{basename:t,children:n,future:r,window:i}=e,a=T.useRef();a.current==null&&(a.current=Yj({window:i,v5Compat:!0}));let o=a.current,[l,u]=T.useState({action:o.action,location:o.location}),{v7_startTransition:s}=r||{},f=T.useCallback(c=>{s&&T0?T0(()=>u(c)):u(c)},[u,s]);return T.useLayoutEffect(()=>o.listen(f),[o,f]),T.useEffect(()=>zk(r),[r]),T.createElement(Uk,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Zk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,e2=T.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:u,to:s,preventScrollReset:f,viewTransition:c}=t,d=cO(t,Kk),{basename:h}=T.useContext(Mr),g,v=!1;if(typeof s=="string"&&Jk.test(s)&&(g=s,Zk))try{let b=new URL(window.location.href),w=s.startsWith("//")?new URL(b.protocol+s):new URL(s),x=ya(w.pathname,h);w.origin===b.origin&&x!=null?s=x+w.search+w.hash:v=!0}catch{}let y=_k(s,{relative:i}),p=n2(s,{replace:o,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:c});function m(b){r&&r(b),b.defaultPrevented||p(b)}return T.createElement("a",Xs({},d,{href:g||y,onClick:v||a?r:m,ref:n,target:u}))}),No=T.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:l,to:u,viewTransition:s,children:f}=t,c=cO(t,Gk),d=wf(u,{relative:c.relative}),h=ou(),g=T.useContext(iO),{navigator:v,basename:y}=T.useContext(Mr),p=g!=null&&r2(d)&&s===!0,m=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,b=h.pathname,w=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(b=b.toLowerCase(),w=w?w.toLowerCase():null,m=m.toLowerCase()),w&&y&&(w=ya(w,y)||w);const x=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let _=b===m||!o&&b.startsWith(m)&&b.charAt(x)==="/",S=w!=null&&(w===m||!o&&w.startsWith(m)&&w.charAt(m.length)==="/"),O={isActive:_,isPending:S,isTransitioning:p},E=_?r:void 0,j;typeof a=="function"?j=a(O):j=[a,_?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(O):l;return T.createElement(e2,Xs({},c,{"aria-current":E,className:j,ref:n,style:I,to:u,viewTransition:s}),typeof f=="function"?f(O):f)});var Op;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Op||(Op={}));var j0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(j0||(j0={}));function t2(e){let t=T.useContext(bf);return t||Ie(!1),t}function n2(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,u=Sk(),s=ou(),f=wf(e,{relative:o});return T.useCallback(c=>{if(Vk(c,n)){c.preventDefault();let d=r!==void 0?r:Gs(s)===Gs(f);u(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[s,u,f,r,i,n,e,a,o,l])}function r2(e,t){t===void 0&&(t={});let n=T.useContext(qk);n==null&&Ie(!1);let{basename:r}=t2(Op.useViewTransitionState),i=wf(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=ya(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ya(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _p(i.pathname,o)!=null||_p(i.pathname,a)!=null}const ey="/api";async function tn(e){const t=await fetch(`${ey}${e}`);if(!t.ok)throw new Error(`API ${e} failed: ${t.status}`);return t.json()}async function i2(e,t){const n=await fetch(`${ey}${e}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=`${n.status}`;try{const i=await n.json();i!=null&&i.error&&(r=i.error)}catch{}throw new Error(r)}return n.json()}const wn={overview:()=>tn("/overview"),graph:()=>tn("/graph"),risk:()=>tn("/risk"),communities:()=>tn("/communities"),churn:()=>tn("/churn"),ownership:()=>tn("/ownership"),status:()=>tn("/status"),tokens:()=>tn("/tokens"),trends:(e="30d")=>tn(`/trends?range=${e}`),refresh:()=>fetch(`${ey}/refresh`,{method:"POST"}).then(e=>e.json()),listProjects:()=>tn("/projects"),activeProject:()=>tn("/projects/active"),switchProject:e=>i2("/projects/active",{slug:e})},k0="ctxloom.dashboard.activeSlug";function a2(){const[e,t]=T.useState([]),[n,r]=T.useState(null),[i,a]=T.useState(!1),[o,l]=T.useState(null),[u,s]=T.useState(null);T.useEffect(()=>{let c=!1;return wn.listProjects().then(({projects:d})=>{if(c)return;t(d);const h=d.find(v=>v.isActive)??d[0];r(h);const g=localStorage.getItem(k0);g&&g!==h.slug&&d.some(v=>v.slug===g)&&f(g)}).catch(d=>{c||s(d instanceof Error?d.message:String(d))}),()=>{c=!0}},[]),T.useEffect(()=>{if(!i)return;function c(d){var g;const h=d.target;(g=h==null?void 0:h.closest)!=null&&g.call(h,"[data-project-switcher]")||a(!1)}return document.addEventListener("click",c),()=>document.removeEventListener("click",c)},[i]);async function f(c){l(c),s(null);try{const{active:d}=await wn.switchProject(c);localStorage.setItem(k0,d.slug),window.location.reload()}catch(d){s(d instanceof Error?d.message:String(d)),l(null)}}return n?e.length<=1?P.jsx(o2,{name:n.name,root:n.root}):P.jsxs("div",{className:"relative px-2 py-2","data-project-switcher":!0,children:[P.jsxs("button",{type:"button",onClick:()=>a(c=>!c),disabled:o!==null,className:"w-full flex items-center justify-between gap-2 rounded-md px-2.5 py-2 text-xs text-white/80 hover:bg-white/5 transition-colors disabled:opacity-50",title:n.root,children:[P.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[P.jsx("span",{className:"text-white/40 shrink-0",children:"◆"}),P.jsx("span",{className:"truncate",children:n.name})]}),P.jsx("span",{className:"text-white/30 text-[10px] shrink-0",children:i?"▴":"▾"})]}),i&&P.jsx("div",{className:"absolute left-2 right-2 mt-1 z-20 rounded-md bg-[#1f1e2c] py-1 shadow-lg",style:{border:"1px solid rgba(255,255,255,0.08)"},children:e.map(c=>P.jsxs("button",{type:"button",onClick:()=>{a(!1),c.slug!==n.slug&&f(c.slug)},disabled:o!==null,className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 transition-colors ${c.slug===n.slug?"text-[#a78bfa] bg-[#603dc6]/10":"text-white/70 hover:bg-white/5"} disabled:opacity-50`,title:c.root,children:[P.jsx("span",{className:"shrink-0 w-3 text-center",children:c.slug===n.slug?"●":" "}),P.jsx("span",{className:"truncate flex-1",children:c.name}),!c.hasSnapshot&&P.jsx("span",{className:"text-[10px] text-white/30 shrink-0",title:"Never indexed — first switch will be slow",children:"cold"}),c.isDefault&&P.jsx("span",{className:"text-[10px] text-white/30 shrink-0",title:"Project the dashboard was launched against",children:"default"})]},c.slug))}),o&&P.jsx("div",{className:"px-2.5 py-1 text-[10px] text-white/40",children:"switching… (cold start may take a moment)"}),u&&P.jsx("div",{className:"px-2.5 py-1 text-[10px] text-red-400/80",role:"alert",children:u})]}):P.jsx("div",{className:"px-3 py-2 text-xs text-white/30",children:u?`Projects unavailable: ${u}`:"Loading projects…"})}function o2({name:e,root:t}){const[n,r]=T.useState(!1),i="ctxloom register",[a,o]=T.useState(!1);return P.jsxs("div",{className:"px-3 py-2",children:[P.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[P.jsx("span",{className:"text-white/30 shrink-0",children:"◆"}),P.jsx("span",{className:"text-white/80 truncate flex-1 min-w-0",title:t,children:e}),P.jsx("button",{type:"button",onClick:()=>r(l=>!l),className:"shrink-0 text-white/30 hover:text-white/70 transition-colors text-sm w-4 leading-none","aria-label":"How to add more projects",title:"Add more projects",children:n?"×":"+"})]}),n&&P.jsxs("div",{className:"mt-2 text-[11px] text-white/50 leading-snug",children:["Track multiple projects in one dashboard:",P.jsxs("div",{className:"mt-1.5 flex items-stretch gap-1",children:[P.jsx("code",{className:"flex-1 min-w-0 truncate rounded bg-black/40 px-2 py-1 text-white/80 font-mono text-[10px]",children:i}),P.jsx("button",{type:"button",onClick:()=>{var l;(l=navigator.clipboard)==null||l.writeText(i),o(!0),setTimeout(()=>o(!1),1200)},className:"shrink-0 rounded bg-white/5 px-2 text-[10px] text-white/60 hover:bg-white/10 transition-colors","aria-label":"Copy command",children:a?"✓":"copy"})]}),P.jsx("div",{className:"mt-1.5 text-white/30",children:"Run inside any repo, then refresh this page."})]})]})}const l2=[{to:"/",label:"Overview",icon:"◈"},{to:"/graph",label:"Graph",icon:"⬡"},{to:"/risk",label:"Risk",icon:"⚠"},{to:"/trends",label:"Trends",icon:"⤴"},{to:"/communities",label:"Communities",icon:"⬡⬡"},{to:"/ownership",label:"Ownership",icon:"◎"},{to:"/guide",label:"Guide",icon:"◉"}];function u2(){return P.jsxs("div",{className:"flex h-screen bg-[#18181f]",children:[P.jsxs("aside",{className:"w-52 shrink-0 bg-[#131220] flex flex-col",style:{borderRight:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"px-4 py-4 flex items-center gap-2.5",style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:[P.jsx("img",{src:"/logo.svg",alt:"ctxloom",className:"w-6 h-6 shrink-0"}),P.jsxs("div",{children:[P.jsxs("span",{className:"text-sm font-semibold",children:[P.jsx("span",{className:"text-white",children:"ctx"}),P.jsx("span",{className:"text-[#a78bfa]",children:"loom"})]}),P.jsx("span",{className:"ml-1 text-xs text-white/30",children:"dashboard"})]})]}),P.jsx("div",{style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:P.jsx(a2,{})}),P.jsx("nav",{className:"flex-1 py-4 space-y-1 px-2",children:l2.map(({to:e,label:t,icon:n})=>P.jsxs(No,{to:e,end:e==="/",className:({isActive:r})=>`flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors ${r?"bg-[#603dc6]/15 text-[#a78bfa] font-medium":"text-white/40 hover:text-white/70 hover:bg-white/5"}`,children:[P.jsx("span",{className:"text-xs select-none shrink-0",children:n}),t]},e))})]}),P.jsx("main",{className:"flex-1 overflow-y-auto p-8 bg-[#18181f]",children:P.jsx(Fk,{})})]})}function li(e){const[t,n]=T.useState({status:"loading"});return T.useEffect(()=>{let r=!1;return n({status:"loading"}),e().then(i=>{r||n({status:"success",data:i})}).catch(i=>{r||n({status:"error",message:String(i)})}),()=>{r=!0}},[]),t}function Lu({label:e,value:t,sub:n}){return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5 transition-transform hover:-translate-y-0.5",children:[P.jsx("p",{className:"text-white/50 text-xs uppercase tracking-wider",children:e}),P.jsx("p",{className:"text-white text-3xl font-semibold mt-1",children:t}),n&&P.jsx("p",{className:"text-white/40 text-xs mt-1",children:n})]})}const s2={critical:"bg-red-900/50 text-red-300 font-semibold",high:"bg-orange-900/50 text-orange-300",medium:"bg-yellow-900/50 text-yellow-300",low:"bg-green-900/50 text-green-300"};function fO({level:e}){return P.jsx("span",{className:`inline-block rounded-full px-2.5 py-0.5 text-xs ${s2[e]??"bg-white/10 text-white/50"}`,children:e})}function qa({message:e}){return P.jsx("div",{className:"bg-red-900/30 border border-red-500/30 text-red-300 rounded-lg p-3 text-sm",children:e})}function dO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=dO(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ie(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=dO(e))&&(r&&(r+=" "),r+=t);return r}var c2=Array.isArray,Pt=c2,f2=typeof xu=="object"&&xu&&xu.Object===Object&&xu,hO=f2,d2=hO,h2=typeof self=="object"&&self&&self.Object===Object&&self,p2=d2||h2||Function("return this")(),Tn=p2,v2=Tn,m2=v2.Symbol,lu=m2,C0=lu,pO=Object.prototype,y2=pO.hasOwnProperty,g2=pO.toString,yo=C0?C0.toStringTag:void 0;function b2(e){var t=y2.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var i=g2.call(e);return r&&(t?e[yo]=n:delete e[yo]),i}var x2=b2,w2=Object.prototype,_2=w2.toString;function S2(e){return _2.call(e)}var O2=S2,N0=lu,P2=x2,A2=O2,E2="[object Null]",$2="[object Undefined]",M0=N0?N0.toStringTag:void 0;function T2(e){return e==null?e===void 0?$2:E2:M0&&M0 in Object(e)?P2(e):A2(e)}var rr=T2;function j2(e){return e!=null&&typeof e=="object"}var ir=j2,k2=rr,C2=ir,N2="[object Symbol]";function M2(e){return typeof e=="symbol"||C2(e)&&k2(e)==N2}var Ya=M2,I2=Pt,D2=Ya,R2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L2=/^\w*$/;function B2(e,t){if(I2(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||D2(e)?!0:L2.test(e)||!R2.test(e)||t!=null&&e in Object(t)}var ty=B2;function z2(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dr=z2;const Qa=ye(Dr);var F2=rr,U2=Dr,W2="[object AsyncFunction]",H2="[object Function]",V2="[object GeneratorFunction]",K2="[object Proxy]";function G2(e){if(!U2(e))return!1;var t=F2(e);return t==H2||t==V2||t==W2||t==K2}var ny=G2;const te=ye(ny);var X2=Tn,q2=X2["__core-js_shared__"],Y2=q2,qd=Y2,I0=function(){var e=/[^.]+$/.exec(qd&&qd.keys&&qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Q2(e){return!!I0&&I0 in e}var Z2=Q2,J2=Function.prototype,eC=J2.toString;function tC(e){if(e!=null){try{return eC.call(e)}catch{}try{return e+""}catch{}}return""}var vO=tC,nC=ny,rC=Z2,iC=Dr,aC=vO,oC=/[\\^$.*+?()[\]{}|]/g,lC=/^\[object .+?Constructor\]$/,uC=Function.prototype,sC=Object.prototype,cC=uC.toString,fC=sC.hasOwnProperty,dC=RegExp("^"+cC.call(fC).replace(oC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hC(e){if(!iC(e)||rC(e))return!1;var t=nC(e)?dC:lC;return t.test(aC(e))}var pC=hC;function vC(e,t){return e==null?void 0:e[t]}var mC=vC,yC=pC,gC=mC;function bC(e,t){var n=gC(e,t);return yC(n)?n:void 0}var Pi=bC,xC=Pi,wC=xC(Object,"create"),_f=wC,D0=_f;function _C(){this.__data__=D0?D0(null):{},this.size=0}var SC=_C;function OC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var PC=OC,AC=_f,EC="__lodash_hash_undefined__",$C=Object.prototype,TC=$C.hasOwnProperty;function jC(e){var t=this.__data__;if(AC){var n=t[e];return n===EC?void 0:n}return TC.call(t,e)?t[e]:void 0}var kC=jC,CC=_f,NC=Object.prototype,MC=NC.hasOwnProperty;function IC(e){var t=this.__data__;return CC?t[e]!==void 0:MC.call(t,e)}var DC=IC,RC=_f,LC="__lodash_hash_undefined__";function BC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=RC&&t===void 0?LC:t,this}var zC=BC,FC=SC,UC=PC,WC=kC,HC=DC,VC=zC;function Za(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Za.prototype.clear=FC;Za.prototype.delete=UC;Za.prototype.get=WC;Za.prototype.has=HC;Za.prototype.set=VC;var KC=Za;function GC(){this.__data__=[],this.size=0}var XC=GC;function qC(e,t){return e===t||e!==e&&t!==t}var ry=qC,YC=ry;function QC(e,t){for(var n=e.length;n--;)if(YC(e[n][0],t))return n;return-1}var Sf=QC,ZC=Sf,JC=Array.prototype,eN=JC.splice;function tN(e){var t=this.__data__,n=ZC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():eN.call(t,n,1),--this.size,!0}var nN=tN,rN=Sf;function iN(e){var t=this.__data__,n=rN(t,e);return n<0?void 0:t[n][1]}var aN=iN,oN=Sf;function lN(e){return oN(this.__data__,e)>-1}var uN=lN,sN=Sf;function cN(e,t){var n=this.__data__,r=sN(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var fN=cN,dN=XC,hN=nN,pN=aN,vN=uN,mN=fN;function Ja(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ja.prototype.clear=dN;Ja.prototype.delete=hN;Ja.prototype.get=pN;Ja.prototype.has=vN;Ja.prototype.set=mN;var Of=Ja,yN=Pi,gN=Tn,bN=yN(gN,"Map"),iy=bN,R0=KC,xN=Of,wN=iy;function _N(){this.size=0,this.__data__={hash:new R0,map:new(wN||xN),string:new R0}}var SN=_N;function ON(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var PN=ON,AN=PN;function EN(e,t){var n=e.__data__;return AN(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Pf=EN,$N=Pf;function TN(e){var t=$N(this,e).delete(e);return this.size-=t?1:0,t}var jN=TN,kN=Pf;function CN(e){return kN(this,e).get(e)}var NN=CN,MN=Pf;function IN(e){return MN(this,e).has(e)}var DN=IN,RN=Pf;function LN(e,t){var n=RN(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var BN=LN,zN=SN,FN=jN,UN=NN,WN=DN,HN=BN;function eo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eo.prototype.clear=zN;eo.prototype.delete=FN;eo.prototype.get=UN;eo.prototype.has=WN;eo.prototype.set=HN;var ay=eo,mO=ay,VN="Expected a function";function oy(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VN);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(oy.Cache||mO),n}oy.Cache=mO;var yO=oy;const KN=ye(yO);var GN=yO,XN=500;function qN(e){var t=GN(e,function(r){return n.size===XN&&n.clear(),r}),n=t.cache;return t}var YN=qN,QN=YN,ZN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JN=/\\(\\)?/g,eM=QN(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZN,function(n,r,i,a){t.push(i?a.replace(JN,"$1"):r||n)}),t}),tM=eM;function nM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ly=nM,L0=lu,rM=ly,iM=Pt,aM=Ya,B0=L0?L0.prototype:void 0,z0=B0?B0.toString:void 0;function gO(e){if(typeof e=="string")return e;if(iM(e))return rM(e,gO)+"";if(aM(e))return z0?z0.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var oM=gO,lM=oM;function uM(e){return e==null?"":lM(e)}var bO=uM,sM=Pt,cM=ty,fM=tM,dM=bO;function hM(e,t){return sM(e)?e:cM(e,t)?[e]:fM(dM(e))}var xO=hM,pM=Ya;function vM(e){if(typeof e=="string"||pM(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Af=vM,mM=xO,yM=Af;function gM(e,t){t=mM(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[yM(t[n++])];return n&&n==r?e:void 0}var uy=gM,bM=uy;function xM(e,t,n){var r=e==null?void 0:bM(e,t);return r===void 0?n:r}var wO=xM;const Mt=ye(wO);function wM(e){return e==null}var _M=wM;const ne=ye(_M);var SM=rr,OM=Pt,PM=ir,AM="[object String]";function EM(e){return typeof e=="string"||!OM(e)&&PM(e)&&SM(e)==AM}var $M=EM;const mi=ye($M);var _O={exports:{}},ve={};/**
|
|
69
68
|
* @license React
|
|
70
69
|
* react-is.production.min.js
|
|
71
70
|
*
|
|
@@ -73,35 +72,35 @@ ${n.root}`,children:[P.jsx("span",{className:"text-white/30",children:"project:
|
|
|
73
72
|
*
|
|
74
73
|
* This source code is licensed under the MIT license found in the
|
|
75
74
|
* LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/var sy=Symbol.for("react.element"),cy=Symbol.for("react.portal"),Ef=Symbol.for("react.fragment"),$f=Symbol.for("react.strict_mode"),Tf=Symbol.for("react.profiler"),jf=Symbol.for("react.provider"),kf=Symbol.for("react.context"),$M=Symbol.for("react.server_context"),Cf=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),If=Symbol.for("react.memo"),Df=Symbol.for("react.lazy"),TM=Symbol.for("react.offscreen"),SO;SO=Symbol.for("react.module.reference");function Zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sy:switch(e=e.type,e){case Ef:case Tf:case $f:case Nf:case Mf:return e;default:switch(e=e&&e.$$typeof,e){case $M:case kf:case Cf:case Df:case If:case jf:return e;default:return t}}case cy:return t}}}ve.ContextConsumer=kf;ve.ContextProvider=jf;ve.Element=sy;ve.ForwardRef=Cf;ve.Fragment=Ef;ve.Lazy=Df;ve.Memo=If;ve.Portal=cy;ve.Profiler=Tf;ve.StrictMode=$f;ve.Suspense=Nf;ve.SuspenseList=Mf;ve.isAsyncMode=function(){return!1};ve.isConcurrentMode=function(){return!1};ve.isContextConsumer=function(e){return Zt(e)===kf};ve.isContextProvider=function(e){return Zt(e)===jf};ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sy};ve.isForwardRef=function(e){return Zt(e)===Cf};ve.isFragment=function(e){return Zt(e)===Ef};ve.isLazy=function(e){return Zt(e)===Df};ve.isMemo=function(e){return Zt(e)===If};ve.isPortal=function(e){return Zt(e)===cy};ve.isProfiler=function(e){return Zt(e)===Tf};ve.isStrictMode=function(e){return Zt(e)===$f};ve.isSuspense=function(e){return Zt(e)===Nf};ve.isSuspenseList=function(e){return Zt(e)===Mf};ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ef||e===Tf||e===$f||e===Nf||e===Mf||e===TM||typeof e=="object"&&e!==null&&(e.$$typeof===Df||e.$$typeof===If||e.$$typeof===jf||e.$$typeof===kf||e.$$typeof===Cf||e.$$typeof===SO||e.getModuleId!==void 0)};ve.typeOf=Zt;_O.exports=ve;var jM=_O.exports,kM=rr,CM=ir,NM="[object Number]";function MM(e){return typeof e=="number"||CM(e)&&kM(e)==NM}var OO=MM;const IM=ye(OO);var DM=OO;function RM(e){return DM(e)&&e!=+e}var LM=RM;const uu=ye(LM);var ft=function(t){return t===0?0:t>0?1:-1},ti=function(t){return mi(t)&&t.indexOf("%")===t.length-1},K=function(t){return IM(t)&&!uu(t)},BM=function(t){return ne(t)},Ge=function(t){return K(t)||mi(t)},zM=0,to=function(t){var n=++zM;return"".concat(t||"").concat(n)},dt=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!mi(t))return r;var a;if(ti(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return uu(a)&&(a=r),i&&a>n&&(a=n),a},Ii=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},FM=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},jt=function(t,n){return K(t)&&K(n)?function(r){return t+r*(n-t)}:function(){return n}};function qs(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Mt(r,t))===n})}var UM=function(t,n){return K(t)&&K(n)?t-n:mi(t)&&mi(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function aa(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Pp(e){"@babel/helpers - typeof";return Pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pp(e)}var WM=["viewBox","children"],HM=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],F0=["points","pathLength"],Yd={svg:WM,polygon:F0,polyline:F0},fy=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Ys=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(T.isValidElement(t)&&(r=t.props),!Qa(r))return null;var i={};return Object.keys(r).forEach(function(a){fy.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},VM=function(t,n,r){return function(i){return t(n,r,i),null}},yi=function(t,n,r){if(!Qa(t)||Pp(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];fy.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=VM(o,n,r))}),i},KM=["children"],GM=["children"];function U0(e,t){if(e==null)return{};var n=XM(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XM(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ap(e){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ap(e)}var W0={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Hn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},H0=null,Qd=null,dy=function e(t){if(t===H0&&Array.isArray(Qd))return Qd;var n=[];return T.Children.forEach(t,function(r){ne(r)||(jM.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Qd=n,H0=t,n};function It(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Hn(i)}):r=[Hn(t)],dy(e).forEach(function(i){var a=Mt(i,"type.displayName")||Mt(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Tt(e,t){var n=It(e,t);return n&&n[0]}var V0=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!K(r)||r<=0||!K(i)||i<=0)},qM=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],YM=function(t){return t&&t.type&&mi(t.type)&&qM.indexOf(t.type)>=0},QM=function(t){return t&&Ap(t)==="object"&&"clipDot"in t},ZM=function(t,n,r,i){var a,o=(a=Yd==null?void 0:Yd[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!te(t)&&(i&&o.includes(n)||HM.includes(n))||r&&fy.includes(n)},J=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(T.isValidElement(t)&&(i=t.props),!Qa(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;ZM((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(a[o]=i[o])}),a},Ep=function e(t,n){if(t===n)return!0;var r=T.Children.count(t);if(r!==T.Children.count(n))return!1;if(r===0)return!0;if(r===1)return K0(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!K0(a,o))return!1}return!0},K0=function(t,n){if(ne(t)&&ne(n))return!0;if(!ne(t)&&!ne(n)){var r=t.props||{},i=r.children,a=U0(r,KM),o=n.props||{},l=o.children,u=U0(o,GM);return i&&l?aa(a,u)&&Ep(i,l):!i&&!l?aa(a,u):!1}return!1},G0=function(t,n){var r=[],i={};return dy(t).forEach(function(a,o){if(YM(a))r.push(a);else if(a){var l=Hn(a.type),u=n[l]||{},s=u.handler,f=u.once;if(s&&(!f||!i[l])){var c=s(a,l,o);r.push(c),i[l]=!0}}}),r},JM=function(t){var n=t&&t.type;return n&&W0[n]?W0[n]:null},eI=function(t,n){return dy(n).indexOf(t)},tI=["children","width","height","viewBox","className","style","title","desc"];function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(this,arguments)}function nI(e,t){if(e==null)return{};var n=rI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Tp(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,s=nI(e,tI),f=i||{width:n,height:r,x:0,y:0},c=ie("recharts-surface",a);return k.createElement("svg",$p({},J(s,!0,"svg"),{className:c,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),k.createElement("title",null,l),k.createElement("desc",null,u),t)}var iI=["children","className"];function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jp.apply(this,arguments)}function aI(e,t){if(e==null)return{};var n=oI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fe=k.forwardRef(function(e,t){var n=e.children,r=e.className,i=aI(e,iI),a=ie("recharts-layer",r);return k.createElement("g",jp({className:a},J(i,!0),{ref:t}),n)}),Vn=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};function lI(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var uI=lI,sI=uI;function cI(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:sI(e,t,n)}var fI=cI,dI="\\ud800-\\udfff",hI="\\u0300-\\u036f",pI="\\ufe20-\\ufe2f",vI="\\u20d0-\\u20ff",mI=hI+pI+vI,yI="\\ufe0e\\ufe0f",gI="\\u200d",bI=RegExp("["+gI+dI+mI+yI+"]");function xI(e){return bI.test(e)}var PO=xI;function wI(e){return e.split("")}var _I=wI,AO="\\ud800-\\udfff",SI="\\u0300-\\u036f",OI="\\ufe20-\\ufe2f",PI="\\u20d0-\\u20ff",AI=SI+OI+PI,EI="\\ufe0e\\ufe0f",$I="["+AO+"]",kp="["+AI+"]",Cp="\\ud83c[\\udffb-\\udfff]",TI="(?:"+kp+"|"+Cp+")",EO="[^"+AO+"]",$O="(?:\\ud83c[\\udde6-\\uddff]){2}",TO="[\\ud800-\\udbff][\\udc00-\\udfff]",jI="\\u200d",jO=TI+"?",kO="["+EI+"]?",kI="(?:"+jI+"(?:"+[EO,$O,TO].join("|")+")"+kO+jO+")*",CI=kO+jO+kI,NI="(?:"+[EO+kp+"?",kp,$O,TO,$I].join("|")+")",MI=RegExp(Cp+"(?="+Cp+")|"+NI+CI,"g");function II(e){return e.match(MI)||[]}var DI=II,RI=_I,LI=PO,BI=DI;function zI(e){return LI(e)?BI(e):RI(e)}var FI=zI,UI=fI,WI=PO,HI=FI,VI=bO;function KI(e){return function(t){t=VI(t);var n=WI(t)?HI(t):void 0,r=n?n[0]:t.charAt(0),i=n?UI(n,1).join(""):t.slice(1);return r[e]()+i}}var GI=KI,XI=GI,qI=XI("toUpperCase"),YI=qI;const Rf=ye(YI);function xe(e){return function(){return e}}const CO=Math.cos,Qs=Math.sin,vn=Math.sqrt,Zs=Math.PI,Lf=2*Zs,Np=Math.PI,Mp=2*Np,Xr=1e-6,QI=Mp-Xr;function NO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ZI(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NO;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class JI{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NO:ZI(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=r-t,s=i-n,f=o-t,c=l-n,d=f*f+c*c;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Xr)if(!(Math.abs(c*u-s*f)>Xr)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-l,v=u*u+s*s,y=h*h+g*g,p=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((Np-Math.acos((v+d-y)/(2*p*m)))/2),w=b/m,x=b/p;Math.abs(w-1)>Xr&&this._append`L${t+w*f},${n+w*c}`,this._append`A${a},${a},0,0,${+(c*h>f*g)},${this._x1=t+x*u},${this._y1=n+x*s}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),u=r*Math.sin(i),s=t+l,f=n+u,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Xr||Math.abs(this._y1-f)>Xr)&&this._append`L${s},${f}`,r&&(d<0&&(d=d%Mp+Mp),d>QI?this._append`A${r},${r},0,1,${c},${t-l},${n-u}A${r},${r},0,1,${c},${this._x1=s},${this._y1=f}`:d>Xr&&this._append`A${r},${r},0,${+(d>=Np)},${c},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function hy(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new JI(t)}function py(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function MO(e){this._context=e}MO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bf(e){return new MO(e)}function IO(e){return e[0]}function DO(e){return e[1]}function RO(e,t){var n=xe(!0),r=null,i=Bf,a=null,o=hy(l);e=typeof e=="function"?e:e===void 0?IO:xe(e),t=typeof t=="function"?t:t===void 0?DO:xe(t);function l(u){var s,f=(u=py(u)).length,c,d=!1,h;for(r==null&&(a=i(h=o())),s=0;s<=f;++s)!(s<f&&n(c=u[s],s,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(c,s,u),+t(c,s,u));if(h)return a=null,h+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:xe(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:xe(+u),l):t},l.defined=function(u){return arguments.length?(n=typeof u=="function"?u:xe(!!u),l):n},l.curve=function(u){return arguments.length?(i=u,r!=null&&(a=i(r)),l):i},l.context=function(u){return arguments.length?(u==null?r=a=null:a=i(r=u),l):r},l}function Bu(e,t,n){var r=null,i=xe(!0),a=null,o=Bf,l=null,u=hy(s);e=typeof e=="function"?e:e===void 0?IO:xe(+e),t=typeof t=="function"?t:xe(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?DO:xe(+n);function s(c){var d,h,g,v=(c=py(c)).length,y,p=!1,m,b=new Array(v),w=new Array(v);for(a==null&&(l=o(m=u())),d=0;d<=v;++d){if(!(d<v&&i(y=c[d],d,c))===p)if(p=!p)h=d,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=d-1;g>=h;--g)l.point(b[g],w[g]);l.lineEnd(),l.areaEnd()}p&&(b[d]=+e(y,d,c),w[d]=+t(y,d,c),l.point(r?+r(y,d,c):b[d],n?+n(y,d,c):w[d]))}if(m)return l=null,m+""||null}function f(){return RO().defined(i).curve(o).context(a)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:xe(+c),r=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:xe(+c),s):e},s.x1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:xe(+c),s):r},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:xe(+c),n=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:xe(+c),s):t},s.y1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:xe(+c),s):n},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(n)},s.lineX1=function(){return f().x(r).y(t)},s.defined=function(c){return arguments.length?(i=typeof c=="function"?c:xe(!!c),s):i},s.curve=function(c){return arguments.length?(o=c,a!=null&&(l=o(a)),s):o},s.context=function(c){return arguments.length?(c==null?a=l=null:l=o(a=c),s):a},s}class LO{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function eD(e){return new LO(e,!0)}function tD(e){return new LO(e,!1)}const vy={draw(e,t){const n=vn(t/Zs);e.moveTo(n,0),e.arc(0,0,n,0,Lf)}},nD={draw(e,t){const n=vn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},BO=vn(1/3),rD=BO*2,iD={draw(e,t){const n=vn(t/rD),r=n*BO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},aD={draw(e,t){const n=vn(t),r=-n/2;e.rect(r,r,n,n)}},oD=.8908130915292852,zO=Qs(Zs/10)/Qs(7*Zs/10),lD=Qs(Lf/10)*zO,uD=-CO(Lf/10)*zO,sD={draw(e,t){const n=vn(t*oD),r=lD*n,i=uD*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Lf*a/5,l=CO(o),u=Qs(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*i,u*r+l*i)}e.closePath()}},Zd=vn(3),cD={draw(e,t){const n=-vn(t/(Zd*3));e.moveTo(0,n*2),e.lineTo(-Zd*n,-n),e.lineTo(Zd*n,-n),e.closePath()}},zt=-.5,Ft=vn(3)/2,Ip=1/vn(12),fD=(Ip/2+1)*3,dD={draw(e,t){const n=vn(t/fD),r=n/2,i=n*Ip,a=r,o=n*Ip+n,l=-a,u=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(zt*r-Ft*i,Ft*r+zt*i),e.lineTo(zt*a-Ft*o,Ft*a+zt*o),e.lineTo(zt*l-Ft*u,Ft*l+zt*u),e.lineTo(zt*r+Ft*i,zt*i-Ft*r),e.lineTo(zt*a+Ft*o,zt*o-Ft*a),e.lineTo(zt*l+Ft*u,zt*u-Ft*l),e.closePath()}};function hD(e,t){let n=null,r=hy(i);e=typeof e=="function"?e:xe(e||vy),t=typeof t=="function"?t:xe(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:xe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:xe(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Js(){}function ec(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function FO(e){this._context=e}FO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ec(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pD(e){return new FO(e)}function UO(e){this._context=e}UO.prototype={areaStart:Js,areaEnd:Js,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vD(e){return new UO(e)}function WO(e){this._context=e}WO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mD(e){return new WO(e)}function HO(e){this._context=e}HO.prototype={areaStart:Js,areaEnd:Js,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function yD(e){return new HO(e)}function X0(e){return e<0?-1:1}function q0(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(X0(a)+X0(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Y0(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Jd(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function tc(e){this._context=e}tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jd(this,this._t0,Y0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Jd(this,Y0(this,n=q0(this,e,t)),n);break;default:Jd(this,this._t0,n=q0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function VO(e){this._context=new KO(e)}(VO.prototype=Object.create(tc.prototype)).point=function(e,t){tc.prototype.point.call(this,t,e)};function KO(e){this._context=e}KO.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function gD(e){return new tc(e)}function bD(e){return new VO(e)}function GO(e){this._context=e}GO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Q0(e),i=Q0(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Q0(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function xD(e){return new GO(e)}function zf(e,t){this._context=e,this._t=t}zf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function wD(e){return new zf(e,.5)}function _D(e){return new zf(e,0)}function SD(e){return new zf(e,1)}function ga(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Dp(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function OD(e,t){return e[t]}function PD(e){const t=[];return t.key=e,t}function AD(){var e=xe([]),t=Dp,n=ga,r=OD;function i(a){var o=Array.from(e.apply(this,arguments),PD),l,u=o.length,s=-1,f;for(const c of a)for(l=0,++s;l<u;++l)(o[l][s]=[0,+r(c,o[l].key,s,a)]).data=c;for(l=0,f=py(t(o));l<u;++l)o[f[l]].index=l;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:xe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:xe(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Dp:typeof a=="function"?a:xe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??ga,i):n},i}function ED(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ga(e,t)}}function $D(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}ga(e,t)}}function TD(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,u=0,s=0;l<o;++l){for(var f=e[t[l]],c=f[r][1]||0,d=f[r-1][1]||0,h=(c-d)/2,g=0;g<l;++g){var v=e[t[g]],y=v[r][1]||0,p=v[r-1][1]||0;h+=y-p}u+=c,s+=h*c}i[r-1][1]+=i[r-1][0]=n,u&&(n-=s/u)}i[r-1][1]+=i[r-1][0]=n,ga(e,t)}}function gl(e){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}var jD=["type","size","sizeType"];function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(this,arguments)}function Z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z0(Object(n),!0).forEach(function(r){kD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kD(e,t,n){return t=CD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CD(e){var t=ND(e,"string");return gl(t)=="symbol"?t:t+""}function ND(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MD(e,t){if(e==null)return{};var n=ID(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ID(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XO={symbolCircle:vy,symbolCross:nD,symbolDiamond:iD,symbolSquare:aD,symbolStar:sD,symbolTriangle:cD,symbolWye:dD},DD=Math.PI/180,RD=function(t){var n="symbol".concat(Rf(t));return XO[n]||vy},LD=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*DD;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},BD=function(t,n){XO["symbol".concat(Rf(t))]=n},my=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=MD(t,jD),s=J0(J0({},u),{},{type:r,size:a,sizeType:l}),f=function(){var y=RD(r),p=hD().type(y).size(LD(a,l,r));return p()},c=s.className,d=s.cx,h=s.cy,g=J(s,!0);return d===+d&&h===+h&&a===+a?k.createElement("path",Rp({},g,{className:ie("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};my.registerSymbol=BD;function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lp.apply(this,arguments)}function eb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eb(Object(n),!0).forEach(function(r){bl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YO(r.key),r)}}function WD(e,t,n){return t&&UD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HD(e,t,n){return t=nc(t),VD(e,qO()?Reflect.construct(t,n||[],nc(e).constructor):t.apply(e,n))}function VD(e,t){if(t&&(ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KD(e)}function KD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qO=function(){return!!e})()}function nc(e){return nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nc(e)}function GD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bp(e,t)}function Bp(e,t){return Bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bp(e,t)}function bl(e,t,n){return t=YO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YO(e){var t=XD(e,"string");return ba(t)=="symbol"?t:t+""}function XD(e,t){if(ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ba(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ut=32,yy=function(e){function t(){return FD(this,t),HD(this,t,arguments)}return GD(t,e),WD(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=Ut/2,o=Ut/6,l=Ut/3,u=r.inactive?i:r.color;if(r.type==="plainline")return k.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:Ut,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return k.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(l,`
|
|
75
|
+
*/var sy=Symbol.for("react.element"),cy=Symbol.for("react.portal"),Ef=Symbol.for("react.fragment"),$f=Symbol.for("react.strict_mode"),Tf=Symbol.for("react.profiler"),jf=Symbol.for("react.provider"),kf=Symbol.for("react.context"),TM=Symbol.for("react.server_context"),Cf=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),If=Symbol.for("react.memo"),Df=Symbol.for("react.lazy"),jM=Symbol.for("react.offscreen"),SO;SO=Symbol.for("react.module.reference");function Zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sy:switch(e=e.type,e){case Ef:case Tf:case $f:case Nf:case Mf:return e;default:switch(e=e&&e.$$typeof,e){case TM:case kf:case Cf:case Df:case If:case jf:return e;default:return t}}case cy:return t}}}ve.ContextConsumer=kf;ve.ContextProvider=jf;ve.Element=sy;ve.ForwardRef=Cf;ve.Fragment=Ef;ve.Lazy=Df;ve.Memo=If;ve.Portal=cy;ve.Profiler=Tf;ve.StrictMode=$f;ve.Suspense=Nf;ve.SuspenseList=Mf;ve.isAsyncMode=function(){return!1};ve.isConcurrentMode=function(){return!1};ve.isContextConsumer=function(e){return Zt(e)===kf};ve.isContextProvider=function(e){return Zt(e)===jf};ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sy};ve.isForwardRef=function(e){return Zt(e)===Cf};ve.isFragment=function(e){return Zt(e)===Ef};ve.isLazy=function(e){return Zt(e)===Df};ve.isMemo=function(e){return Zt(e)===If};ve.isPortal=function(e){return Zt(e)===cy};ve.isProfiler=function(e){return Zt(e)===Tf};ve.isStrictMode=function(e){return Zt(e)===$f};ve.isSuspense=function(e){return Zt(e)===Nf};ve.isSuspenseList=function(e){return Zt(e)===Mf};ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ef||e===Tf||e===$f||e===Nf||e===Mf||e===jM||typeof e=="object"&&e!==null&&(e.$$typeof===Df||e.$$typeof===If||e.$$typeof===jf||e.$$typeof===kf||e.$$typeof===Cf||e.$$typeof===SO||e.getModuleId!==void 0)};ve.typeOf=Zt;_O.exports=ve;var kM=_O.exports,CM=rr,NM=ir,MM="[object Number]";function IM(e){return typeof e=="number"||NM(e)&&CM(e)==MM}var OO=IM;const DM=ye(OO);var RM=OO;function LM(e){return RM(e)&&e!=+e}var BM=LM;const uu=ye(BM);var ft=function(t){return t===0?0:t>0?1:-1},ti=function(t){return mi(t)&&t.indexOf("%")===t.length-1},K=function(t){return DM(t)&&!uu(t)},zM=function(t){return ne(t)},Ge=function(t){return K(t)||mi(t)},FM=0,to=function(t){var n=++FM;return"".concat(t||"").concat(n)},dt=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!mi(t))return r;var a;if(ti(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return uu(a)&&(a=r),i&&a>n&&(a=n),a},Ii=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},UM=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},jt=function(t,n){return K(t)&&K(n)?function(r){return t+r*(n-t)}:function(){return n}};function qs(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Mt(r,t))===n})}var WM=function(t,n){return K(t)&&K(n)?t-n:mi(t)&&mi(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function aa(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Pp(e){"@babel/helpers - typeof";return Pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pp(e)}var HM=["viewBox","children"],VM=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],F0=["points","pathLength"],Yd={svg:HM,polygon:F0,polyline:F0},fy=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Ys=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(T.isValidElement(t)&&(r=t.props),!Qa(r))return null;var i={};return Object.keys(r).forEach(function(a){fy.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},KM=function(t,n,r){return function(i){return t(n,r,i),null}},yi=function(t,n,r){if(!Qa(t)||Pp(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];fy.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=KM(o,n,r))}),i},GM=["children"],XM=["children"];function U0(e,t){if(e==null)return{};var n=qM(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qM(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ap(e){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ap(e)}var W0={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Hn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},H0=null,Qd=null,dy=function e(t){if(t===H0&&Array.isArray(Qd))return Qd;var n=[];return T.Children.forEach(t,function(r){ne(r)||(kM.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Qd=n,H0=t,n};function It(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Hn(i)}):r=[Hn(t)],dy(e).forEach(function(i){var a=Mt(i,"type.displayName")||Mt(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Tt(e,t){var n=It(e,t);return n&&n[0]}var V0=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!K(r)||r<=0||!K(i)||i<=0)},YM=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],QM=function(t){return t&&t.type&&mi(t.type)&&YM.indexOf(t.type)>=0},ZM=function(t){return t&&Ap(t)==="object"&&"clipDot"in t},JM=function(t,n,r,i){var a,o=(a=Yd==null?void 0:Yd[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!te(t)&&(i&&o.includes(n)||VM.includes(n))||r&&fy.includes(n)},J=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(T.isValidElement(t)&&(i=t.props),!Qa(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;JM((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(a[o]=i[o])}),a},Ep=function e(t,n){if(t===n)return!0;var r=T.Children.count(t);if(r!==T.Children.count(n))return!1;if(r===0)return!0;if(r===1)return K0(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!K0(a,o))return!1}return!0},K0=function(t,n){if(ne(t)&&ne(n))return!0;if(!ne(t)&&!ne(n)){var r=t.props||{},i=r.children,a=U0(r,GM),o=n.props||{},l=o.children,u=U0(o,XM);return i&&l?aa(a,u)&&Ep(i,l):!i&&!l?aa(a,u):!1}return!1},G0=function(t,n){var r=[],i={};return dy(t).forEach(function(a,o){if(QM(a))r.push(a);else if(a){var l=Hn(a.type),u=n[l]||{},s=u.handler,f=u.once;if(s&&(!f||!i[l])){var c=s(a,l,o);r.push(c),i[l]=!0}}}),r},eI=function(t){var n=t&&t.type;return n&&W0[n]?W0[n]:null},tI=function(t,n){return dy(n).indexOf(t)},nI=["children","width","height","viewBox","className","style","title","desc"];function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(this,arguments)}function rI(e,t){if(e==null)return{};var n=iI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Tp(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,s=rI(e,nI),f=i||{width:n,height:r,x:0,y:0},c=ie("recharts-surface",a);return k.createElement("svg",$p({},J(s,!0,"svg"),{className:c,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),k.createElement("title",null,l),k.createElement("desc",null,u),t)}var aI=["children","className"];function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jp.apply(this,arguments)}function oI(e,t){if(e==null)return{};var n=lI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fe=k.forwardRef(function(e,t){var n=e.children,r=e.className,i=oI(e,aI),a=ie("recharts-layer",r);return k.createElement("g",jp({className:a},J(i,!0),{ref:t}),n)}),Vn=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};function uI(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var sI=uI,cI=sI;function fI(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:cI(e,t,n)}var dI=fI,hI="\\ud800-\\udfff",pI="\\u0300-\\u036f",vI="\\ufe20-\\ufe2f",mI="\\u20d0-\\u20ff",yI=pI+vI+mI,gI="\\ufe0e\\ufe0f",bI="\\u200d",xI=RegExp("["+bI+hI+yI+gI+"]");function wI(e){return xI.test(e)}var PO=wI;function _I(e){return e.split("")}var SI=_I,AO="\\ud800-\\udfff",OI="\\u0300-\\u036f",PI="\\ufe20-\\ufe2f",AI="\\u20d0-\\u20ff",EI=OI+PI+AI,$I="\\ufe0e\\ufe0f",TI="["+AO+"]",kp="["+EI+"]",Cp="\\ud83c[\\udffb-\\udfff]",jI="(?:"+kp+"|"+Cp+")",EO="[^"+AO+"]",$O="(?:\\ud83c[\\udde6-\\uddff]){2}",TO="[\\ud800-\\udbff][\\udc00-\\udfff]",kI="\\u200d",jO=jI+"?",kO="["+$I+"]?",CI="(?:"+kI+"(?:"+[EO,$O,TO].join("|")+")"+kO+jO+")*",NI=kO+jO+CI,MI="(?:"+[EO+kp+"?",kp,$O,TO,TI].join("|")+")",II=RegExp(Cp+"(?="+Cp+")|"+MI+NI,"g");function DI(e){return e.match(II)||[]}var RI=DI,LI=SI,BI=PO,zI=RI;function FI(e){return BI(e)?zI(e):LI(e)}var UI=FI,WI=dI,HI=PO,VI=UI,KI=bO;function GI(e){return function(t){t=KI(t);var n=HI(t)?VI(t):void 0,r=n?n[0]:t.charAt(0),i=n?WI(n,1).join(""):t.slice(1);return r[e]()+i}}var XI=GI,qI=XI,YI=qI("toUpperCase"),QI=YI;const Rf=ye(QI);function xe(e){return function(){return e}}const CO=Math.cos,Qs=Math.sin,vn=Math.sqrt,Zs=Math.PI,Lf=2*Zs,Np=Math.PI,Mp=2*Np,Xr=1e-6,ZI=Mp-Xr;function NO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function JI(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NO;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class eD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NO:JI(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=r-t,s=i-n,f=o-t,c=l-n,d=f*f+c*c;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Xr)if(!(Math.abs(c*u-s*f)>Xr)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-l,v=u*u+s*s,y=h*h+g*g,p=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((Np-Math.acos((v+d-y)/(2*p*m)))/2),w=b/m,x=b/p;Math.abs(w-1)>Xr&&this._append`L${t+w*f},${n+w*c}`,this._append`A${a},${a},0,0,${+(c*h>f*g)},${this._x1=t+x*u},${this._y1=n+x*s}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),u=r*Math.sin(i),s=t+l,f=n+u,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Xr||Math.abs(this._y1-f)>Xr)&&this._append`L${s},${f}`,r&&(d<0&&(d=d%Mp+Mp),d>ZI?this._append`A${r},${r},0,1,${c},${t-l},${n-u}A${r},${r},0,1,${c},${this._x1=s},${this._y1=f}`:d>Xr&&this._append`A${r},${r},0,${+(d>=Np)},${c},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function hy(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new eD(t)}function py(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function MO(e){this._context=e}MO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bf(e){return new MO(e)}function IO(e){return e[0]}function DO(e){return e[1]}function RO(e,t){var n=xe(!0),r=null,i=Bf,a=null,o=hy(l);e=typeof e=="function"?e:e===void 0?IO:xe(e),t=typeof t=="function"?t:t===void 0?DO:xe(t);function l(u){var s,f=(u=py(u)).length,c,d=!1,h;for(r==null&&(a=i(h=o())),s=0;s<=f;++s)!(s<f&&n(c=u[s],s,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(c,s,u),+t(c,s,u));if(h)return a=null,h+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:xe(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:xe(+u),l):t},l.defined=function(u){return arguments.length?(n=typeof u=="function"?u:xe(!!u),l):n},l.curve=function(u){return arguments.length?(i=u,r!=null&&(a=i(r)),l):i},l.context=function(u){return arguments.length?(u==null?r=a=null:a=i(r=u),l):r},l}function Bu(e,t,n){var r=null,i=xe(!0),a=null,o=Bf,l=null,u=hy(s);e=typeof e=="function"?e:e===void 0?IO:xe(+e),t=typeof t=="function"?t:xe(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?DO:xe(+n);function s(c){var d,h,g,v=(c=py(c)).length,y,p=!1,m,b=new Array(v),w=new Array(v);for(a==null&&(l=o(m=u())),d=0;d<=v;++d){if(!(d<v&&i(y=c[d],d,c))===p)if(p=!p)h=d,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=d-1;g>=h;--g)l.point(b[g],w[g]);l.lineEnd(),l.areaEnd()}p&&(b[d]=+e(y,d,c),w[d]=+t(y,d,c),l.point(r?+r(y,d,c):b[d],n?+n(y,d,c):w[d]))}if(m)return l=null,m+""||null}function f(){return RO().defined(i).curve(o).context(a)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:xe(+c),r=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:xe(+c),s):e},s.x1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:xe(+c),s):r},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:xe(+c),n=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:xe(+c),s):t},s.y1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:xe(+c),s):n},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(n)},s.lineX1=function(){return f().x(r).y(t)},s.defined=function(c){return arguments.length?(i=typeof c=="function"?c:xe(!!c),s):i},s.curve=function(c){return arguments.length?(o=c,a!=null&&(l=o(a)),s):o},s.context=function(c){return arguments.length?(c==null?a=l=null:l=o(a=c),s):a},s}class LO{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function tD(e){return new LO(e,!0)}function nD(e){return new LO(e,!1)}const vy={draw(e,t){const n=vn(t/Zs);e.moveTo(n,0),e.arc(0,0,n,0,Lf)}},rD={draw(e,t){const n=vn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},BO=vn(1/3),iD=BO*2,aD={draw(e,t){const n=vn(t/iD),r=n*BO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},oD={draw(e,t){const n=vn(t),r=-n/2;e.rect(r,r,n,n)}},lD=.8908130915292852,zO=Qs(Zs/10)/Qs(7*Zs/10),uD=Qs(Lf/10)*zO,sD=-CO(Lf/10)*zO,cD={draw(e,t){const n=vn(t*lD),r=uD*n,i=sD*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Lf*a/5,l=CO(o),u=Qs(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*i,u*r+l*i)}e.closePath()}},Zd=vn(3),fD={draw(e,t){const n=-vn(t/(Zd*3));e.moveTo(0,n*2),e.lineTo(-Zd*n,-n),e.lineTo(Zd*n,-n),e.closePath()}},zt=-.5,Ft=vn(3)/2,Ip=1/vn(12),dD=(Ip/2+1)*3,hD={draw(e,t){const n=vn(t/dD),r=n/2,i=n*Ip,a=r,o=n*Ip+n,l=-a,u=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(zt*r-Ft*i,Ft*r+zt*i),e.lineTo(zt*a-Ft*o,Ft*a+zt*o),e.lineTo(zt*l-Ft*u,Ft*l+zt*u),e.lineTo(zt*r+Ft*i,zt*i-Ft*r),e.lineTo(zt*a+Ft*o,zt*o-Ft*a),e.lineTo(zt*l+Ft*u,zt*u-Ft*l),e.closePath()}};function pD(e,t){let n=null,r=hy(i);e=typeof e=="function"?e:xe(e||vy),t=typeof t=="function"?t:xe(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:xe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:xe(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Js(){}function ec(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function FO(e){this._context=e}FO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ec(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vD(e){return new FO(e)}function UO(e){this._context=e}UO.prototype={areaStart:Js,areaEnd:Js,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mD(e){return new UO(e)}function WO(e){this._context=e}WO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yD(e){return new WO(e)}function HO(e){this._context=e}HO.prototype={areaStart:Js,areaEnd:Js,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gD(e){return new HO(e)}function X0(e){return e<0?-1:1}function q0(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(X0(a)+X0(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Y0(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Jd(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function tc(e){this._context=e}tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jd(this,this._t0,Y0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Jd(this,Y0(this,n=q0(this,e,t)),n);break;default:Jd(this,this._t0,n=q0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function VO(e){this._context=new KO(e)}(VO.prototype=Object.create(tc.prototype)).point=function(e,t){tc.prototype.point.call(this,t,e)};function KO(e){this._context=e}KO.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function bD(e){return new tc(e)}function xD(e){return new VO(e)}function GO(e){this._context=e}GO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Q0(e),i=Q0(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Q0(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function wD(e){return new GO(e)}function zf(e,t){this._context=e,this._t=t}zf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function _D(e){return new zf(e,.5)}function SD(e){return new zf(e,0)}function OD(e){return new zf(e,1)}function ga(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Dp(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function PD(e,t){return e[t]}function AD(e){const t=[];return t.key=e,t}function ED(){var e=xe([]),t=Dp,n=ga,r=PD;function i(a){var o=Array.from(e.apply(this,arguments),AD),l,u=o.length,s=-1,f;for(const c of a)for(l=0,++s;l<u;++l)(o[l][s]=[0,+r(c,o[l].key,s,a)]).data=c;for(l=0,f=py(t(o));l<u;++l)o[f[l]].index=l;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:xe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:xe(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Dp:typeof a=="function"?a:xe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??ga,i):n},i}function $D(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ga(e,t)}}function TD(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}ga(e,t)}}function jD(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,u=0,s=0;l<o;++l){for(var f=e[t[l]],c=f[r][1]||0,d=f[r-1][1]||0,h=(c-d)/2,g=0;g<l;++g){var v=e[t[g]],y=v[r][1]||0,p=v[r-1][1]||0;h+=y-p}u+=c,s+=h*c}i[r-1][1]+=i[r-1][0]=n,u&&(n-=s/u)}i[r-1][1]+=i[r-1][0]=n,ga(e,t)}}function gl(e){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}var kD=["type","size","sizeType"];function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(this,arguments)}function Z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z0(Object(n),!0).forEach(function(r){CD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CD(e,t,n){return t=ND(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ND(e){var t=MD(e,"string");return gl(t)=="symbol"?t:t+""}function MD(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ID(e,t){if(e==null)return{};var n=DD(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DD(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XO={symbolCircle:vy,symbolCross:rD,symbolDiamond:aD,symbolSquare:oD,symbolStar:cD,symbolTriangle:fD,symbolWye:hD},RD=Math.PI/180,LD=function(t){var n="symbol".concat(Rf(t));return XO[n]||vy},BD=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*RD;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},zD=function(t,n){XO["symbol".concat(Rf(t))]=n},my=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=ID(t,kD),s=J0(J0({},u),{},{type:r,size:a,sizeType:l}),f=function(){var y=LD(r),p=pD().type(y).size(BD(a,l,r));return p()},c=s.className,d=s.cx,h=s.cy,g=J(s,!0);return d===+d&&h===+h&&a===+a?k.createElement("path",Rp({},g,{className:ie("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};my.registerSymbol=zD;function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lp.apply(this,arguments)}function eb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eb(Object(n),!0).forEach(function(r){bl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YO(r.key),r)}}function HD(e,t,n){return t&&WD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VD(e,t,n){return t=nc(t),KD(e,qO()?Reflect.construct(t,n||[],nc(e).constructor):t.apply(e,n))}function KD(e,t){if(t&&(ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GD(e)}function GD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qO=function(){return!!e})()}function nc(e){return nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nc(e)}function XD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bp(e,t)}function Bp(e,t){return Bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bp(e,t)}function bl(e,t,n){return t=YO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YO(e){var t=qD(e,"string");return ba(t)=="symbol"?t:t+""}function qD(e,t){if(ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ba(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ut=32,yy=function(e){function t(){return UD(this,t),VD(this,t,arguments)}return XD(t,e),HD(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=Ut/2,o=Ut/6,l=Ut/3,u=r.inactive?i:r.color;if(r.type==="plainline")return k.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:Ut,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return k.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(l,`
|
|
77
76
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
|
|
78
77
|
H`).concat(Ut,"M").concat(2*l,",").concat(a,`
|
|
79
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return k.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ut/8,"h").concat(Ut,"v").concat(Ut*3/4,"h").concat(-Ut,"z"),className:"recharts-legend-icon"});if(k.isValidElement(r.legendIcon)){var s=zD({},r);return delete s.legendIcon,k.cloneElement(r.legendIcon,s)}return k.createElement(my,{fill:u,cx:a,cy:a,size:Ut,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,u=i.formatter,s=i.inactiveColor,f={x:0,y:0,width:Ut,height:Ut},c={display:l==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,g){var v=h.formatter||u,y=ie(bl(bl({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",h.inactive));if(h.type==="none")return null;var p=te(h.value)?null:h.value;Vn(!te(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var m=h.inactive?s:h.color;return k.createElement("li",Lp({className:y,style:c,key:"legend-item-".concat(g)},yi(r.props,h,g)),k.createElement(Tp,{width:o,height:o,viewBox:f,style:d},r.renderIcon(h)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},v?v(p,h,g):p))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return k.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(T.PureComponent);bl(yy,"displayName","Legend");bl(yy,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qD=Of;function YD(){this.__data__=new qD,this.size=0}var QD=YD;function ZD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var JD=ZD;function eR(e){return this.__data__.get(e)}var tR=eR;function nR(e){return this.__data__.has(e)}var rR=nR,iR=Of,aR=iy,oR=ay,lR=200;function uR(e,t){var n=this.__data__;if(n instanceof iR){var r=n.__data__;if(!aR||r.length<lR-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oR(r)}return n.set(e,t),this.size=n.size,this}var sR=uR,cR=Of,fR=QD,dR=JD,hR=tR,pR=rR,vR=sR;function no(e){var t=this.__data__=new cR(e);this.size=t.size}no.prototype.clear=fR;no.prototype.delete=dR;no.prototype.get=hR;no.prototype.has=pR;no.prototype.set=vR;var QO=no,mR="__lodash_hash_undefined__";function yR(e){return this.__data__.set(e,mR),this}var gR=yR;function bR(e){return this.__data__.has(e)}var xR=bR,wR=ay,_R=gR,SR=xR;function rc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new wR;++t<n;)this.add(e[t])}rc.prototype.add=rc.prototype.push=_R;rc.prototype.has=SR;var ZO=rc;function OR(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var JO=OR;function PR(e,t){return e.has(t)}var eP=PR,AR=ZO,ER=JO,$R=eP,TR=1,jR=2;function kR(e,t,n,r,i,a){var o=n&TR,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var s=a.get(e),f=a.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,h=n&jR?new AR:void 0;for(a.set(e,t),a.set(t,e);++c<l;){var g=e[c],v=t[c];if(r)var y=o?r(v,g,c,t,e,a):r(g,v,c,e,t,a);if(y!==void 0){if(y)continue;d=!1;break}if(h){if(!ER(t,function(p,m){if(!$R(h,m)&&(g===p||i(g,p,n,r,a)))return h.push(m)})){d=!1;break}}else if(!(g===v||i(g,v,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}var tP=kR,CR=Tn,NR=CR.Uint8Array,MR=NR;function IR(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var DR=IR;function RR(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var gy=RR,tb=lu,nb=MR,LR=ry,BR=tP,zR=DR,FR=gy,UR=1,WR=2,HR="[object Boolean]",VR="[object Date]",KR="[object Error]",GR="[object Map]",XR="[object Number]",qR="[object RegExp]",YR="[object Set]",QR="[object String]",ZR="[object Symbol]",JR="[object ArrayBuffer]",eL="[object DataView]",rb=tb?tb.prototype:void 0,eh=rb?rb.valueOf:void 0;function tL(e,t,n,r,i,a,o){switch(n){case eL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JR:return!(e.byteLength!=t.byteLength||!a(new nb(e),new nb(t)));case HR:case VR:case XR:return LR(+e,+t);case KR:return e.name==t.name&&e.message==t.message;case qR:case QR:return e==t+"";case GR:var l=zR;case YR:var u=r&UR;if(l||(l=FR),e.size!=t.size&&!u)return!1;var s=o.get(e);if(s)return s==t;r|=WR,o.set(e,t);var f=BR(l(e),l(t),r,i,a,o);return o.delete(e),f;case ZR:if(eh)return eh.call(e)==eh.call(t)}return!1}var nL=tL;function rL(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var nP=rL,iL=nP,aL=Pt;function oL(e,t,n){var r=t(e);return aL(e)?r:iL(r,n(e))}var lL=oL;function uL(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var sL=uL;function cL(){return[]}var fL=cL,dL=sL,hL=fL,pL=Object.prototype,vL=pL.propertyIsEnumerable,ib=Object.getOwnPropertySymbols,mL=ib?function(e){return e==null?[]:(e=Object(e),dL(ib(e),function(t){return vL.call(e,t)}))}:hL,yL=mL;function gL(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var bL=gL,xL=rr,wL=ir,_L="[object Arguments]";function SL(e){return wL(e)&&xL(e)==_L}var OL=SL,ab=OL,PL=ir,rP=Object.prototype,AL=rP.hasOwnProperty,EL=rP.propertyIsEnumerable,$L=ab(function(){return arguments}())?ab:function(e){return PL(e)&&AL.call(e,"callee")&&!EL.call(e,"callee")},by=$L,ic={exports:{}};function TL(){return!1}var jL=TL;ic.exports;(function(e,t){var n=Tn,r=jL,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,u=l?l.isBuffer:void 0,s=u||r;e.exports=s})(ic,ic.exports);var iP=ic.exports,kL=9007199254740991,CL=/^(?:0|[1-9]\d*)$/;function NL(e,t){var n=typeof e;return t=t??kL,!!t&&(n=="number"||n!="symbol"&&CL.test(e))&&e>-1&&e%1==0&&e<t}var xy=NL,ML=9007199254740991;function IL(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ML}var wy=IL,DL=rr,RL=wy,LL=ir,BL="[object Arguments]",zL="[object Array]",FL="[object Boolean]",UL="[object Date]",WL="[object Error]",HL="[object Function]",VL="[object Map]",KL="[object Number]",GL="[object Object]",XL="[object RegExp]",qL="[object Set]",YL="[object String]",QL="[object WeakMap]",ZL="[object ArrayBuffer]",JL="[object DataView]",e3="[object Float32Array]",t3="[object Float64Array]",n3="[object Int8Array]",r3="[object Int16Array]",i3="[object Int32Array]",a3="[object Uint8Array]",o3="[object Uint8ClampedArray]",l3="[object Uint16Array]",u3="[object Uint32Array]",Oe={};Oe[e3]=Oe[t3]=Oe[n3]=Oe[r3]=Oe[i3]=Oe[a3]=Oe[o3]=Oe[l3]=Oe[u3]=!0;Oe[BL]=Oe[zL]=Oe[ZL]=Oe[FL]=Oe[JL]=Oe[UL]=Oe[WL]=Oe[HL]=Oe[VL]=Oe[KL]=Oe[GL]=Oe[XL]=Oe[qL]=Oe[YL]=Oe[QL]=!1;function s3(e){return LL(e)&&RL(e.length)&&!!Oe[DL(e)]}var c3=s3;function f3(e){return function(t){return e(t)}}var aP=f3,ac={exports:{}};ac.exports;(function(e,t){var n=hO,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ac,ac.exports);var d3=ac.exports,h3=c3,p3=aP,ob=d3,lb=ob&&ob.isTypedArray,v3=lb?p3(lb):h3,oP=v3,m3=bL,y3=by,g3=Pt,b3=iP,x3=xy,w3=oP,_3=Object.prototype,S3=_3.hasOwnProperty;function O3(e,t){var n=g3(e),r=!n&&y3(e),i=!n&&!r&&b3(e),a=!n&&!r&&!i&&w3(e),o=n||r||i||a,l=o?m3(e.length,String):[],u=l.length;for(var s in e)(t||S3.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||x3(s,u)))&&l.push(s);return l}var P3=O3,A3=Object.prototype;function E3(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||A3;return e===n}var $3=E3;function T3(e,t){return function(n){return e(t(n))}}var lP=T3,j3=lP,k3=j3(Object.keys,Object),C3=k3,N3=$3,M3=C3,I3=Object.prototype,D3=I3.hasOwnProperty;function R3(e){if(!N3(e))return M3(e);var t=[];for(var n in Object(e))D3.call(e,n)&&n!="constructor"&&t.push(n);return t}var L3=R3,B3=ny,z3=wy;function F3(e){return e!=null&&z3(e.length)&&!B3(e)}var Ff=F3,U3=P3,W3=L3,H3=Ff;function V3(e){return H3(e)?U3(e):W3(e)}var _y=V3,K3=lL,G3=yL,X3=_y;function q3(e){return K3(e,X3,G3)}var Y3=q3,ub=Y3,Q3=1,Z3=Object.prototype,J3=Z3.hasOwnProperty;function eB(e,t,n,r,i,a){var o=n&Q3,l=ub(e),u=l.length,s=ub(t),f=s.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=l[c];if(!(o?d in t:J3.call(t,d)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var v=!0;a.set(e,t),a.set(t,e);for(var y=o;++c<u;){d=l[c];var p=e[d],m=t[d];if(r)var b=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(!(b===void 0?p===m||i(p,m,n,r,a):b)){v=!1;break}y||(y=d=="constructor")}if(v&&!y){var w=e.constructor,x=t.constructor;w!=x&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(v=!1)}return a.delete(e),a.delete(t),v}var tB=eB,nB=Pi,rB=Tn,iB=nB(rB,"DataView"),aB=iB,oB=Pi,lB=Tn,uB=oB(lB,"Promise"),sB=uB,cB=Pi,fB=Tn,dB=cB(fB,"Set"),uP=dB,hB=Pi,pB=Tn,vB=hB(pB,"WeakMap"),mB=vB,zp=aB,Fp=iy,Up=sB,Wp=uP,Hp=mB,sP=rr,ro=vO,sb="[object Map]",yB="[object Object]",cb="[object Promise]",fb="[object Set]",db="[object WeakMap]",hb="[object DataView]",gB=ro(zp),bB=ro(Fp),xB=ro(Up),wB=ro(Wp),_B=ro(Hp),qr=sP;(zp&&qr(new zp(new ArrayBuffer(1)))!=hb||Fp&&qr(new Fp)!=sb||Up&&qr(Up.resolve())!=cb||Wp&&qr(new Wp)!=fb||Hp&&qr(new Hp)!=db)&&(qr=function(e){var t=sP(e),n=t==yB?e.constructor:void 0,r=n?ro(n):"";if(r)switch(r){case gB:return hb;case bB:return sb;case xB:return cb;case wB:return fb;case _B:return db}return t});var SB=qr,th=QO,OB=tP,PB=nL,AB=tB,pb=SB,vb=Pt,mb=iP,EB=oP,$B=1,yb="[object Arguments]",gb="[object Array]",zu="[object Object]",TB=Object.prototype,bb=TB.hasOwnProperty;function jB(e,t,n,r,i,a){var o=vb(e),l=vb(t),u=o?gb:pb(e),s=l?gb:pb(t);u=u==yb?zu:u,s=s==yb?zu:s;var f=u==zu,c=s==zu,d=u==s;if(d&&mb(e)){if(!mb(t))return!1;o=!0,f=!1}if(d&&!f)return a||(a=new th),o||EB(e)?OB(e,t,n,r,i,a):PB(e,t,u,n,r,i,a);if(!(n&$B)){var h=f&&bb.call(e,"__wrapped__"),g=c&&bb.call(t,"__wrapped__");if(h||g){var v=h?e.value():e,y=g?t.value():t;return a||(a=new th),i(v,y,n,r,a)}}return d?(a||(a=new th),AB(e,t,n,r,i,a)):!1}var kB=jB,CB=kB,xb=ir;function cP(e,t,n,r,i){return e===t?!0:e==null||t==null||!xb(e)&&!xb(t)?e!==e&&t!==t:CB(e,t,n,r,cP,i)}var Sy=cP,NB=QO,MB=Sy,IB=1,DB=2;function RB(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var u=l[0],s=e[u],f=l[1];if(o&&l[2]){if(s===void 0&&!(u in e))return!1}else{var c=new NB;if(r)var d=r(s,f,u,e,t,c);if(!(d===void 0?MB(f,s,IB|DB,r,c):d))return!1}}return!0}var LB=RB,BB=Dr;function zB(e){return e===e&&!BB(e)}var fP=zB,FB=fP,UB=_y;function WB(e){for(var t=UB(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,FB(i)]}return t}var HB=WB;function VB(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var dP=VB,KB=LB,GB=HB,XB=dP;function qB(e){var t=GB(e);return t.length==1&&t[0][2]?XB(t[0][0],t[0][1]):function(n){return n===e||KB(n,e,t)}}var YB=qB;function QB(e,t){return e!=null&&t in Object(e)}var ZB=QB,JB=xO,e5=by,t5=Pt,n5=xy,r5=wy,i5=Af;function a5(e,t,n){t=JB(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=i5(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&r5(i)&&n5(o,i)&&(t5(e)||e5(e)))}var o5=a5,l5=ZB,u5=o5;function s5(e,t){return e!=null&&u5(e,t,l5)}var c5=s5,f5=Sy,d5=wO,h5=c5,p5=ty,v5=fP,m5=dP,y5=Af,g5=1,b5=2;function x5(e,t){return p5(e)&&v5(t)?m5(y5(e),t):function(n){var r=d5(n,e);return r===void 0&&r===t?h5(n,e):f5(t,r,g5|b5)}}var w5=x5;function _5(e){return e}var io=_5;function S5(e){return function(t){return t==null?void 0:t[e]}}var O5=S5,P5=uy;function A5(e){return function(t){return P5(t,e)}}var E5=A5,$5=O5,T5=E5,j5=ty,k5=Af;function C5(e){return j5(e)?$5(k5(e)):T5(e)}var N5=C5,M5=YB,I5=w5,D5=io,R5=Pt,L5=N5;function B5(e){return typeof e=="function"?e:e==null?D5:typeof e=="object"?R5(e)?I5(e[0],e[1]):M5(e):L5(e)}var Rr=B5;function z5(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var F5=z5;function U5(e){return e!==e}var W5=U5;function H5(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var V5=H5,K5=F5,G5=W5,X5=V5;function q5(e,t,n){return t===t?X5(e,t,n):K5(e,G5,n)}var Y5=q5,Q5=Y5;function Z5(e,t){var n=e==null?0:e.length;return!!n&&Q5(e,t,0)>-1}var J5=Z5;function e4(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var t4=e4;function n4(){}var r4=n4,nh=uP,i4=r4,a4=gy,o4=1/0,l4=nh&&1/a4(new nh([,-0]))[1]==o4?function(e){return new nh(e)}:i4,u4=l4,s4=ZO,c4=J5,f4=t4,d4=eP,h4=u4,p4=gy,v4=200;function m4(e,t,n){var r=-1,i=c4,a=e.length,o=!0,l=[],u=l;if(n)o=!1,i=f4;else if(a>=v4){var s=t?null:h4(e);if(s)return p4(s);o=!1,i=d4,u=new s4}else u=t?[]:l;e:for(;++r<a;){var f=e[r],c=t?t(f):f;if(f=n||f!==0?f:0,o&&c===c){for(var d=u.length;d--;)if(u[d]===c)continue e;t&&u.push(c),l.push(f)}else i(u,c,n)||(u!==l&&u.push(c),l.push(f))}return l}var y4=m4,g4=Rr,b4=y4;function x4(e,t){return e&&e.length?b4(e,g4(t)):[]}var w4=x4;const wb=ye(w4);function hP(e,t,n){return t===!0?wb(e,n):te(t)?wb(e,t):e}function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}var _4=["ref"];function _b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_b(Object(n),!0).forEach(function(r){Uf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vP(r.key),r)}}function O4(e,t,n){return t&&Sb(e.prototype,t),n&&Sb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function P4(e,t,n){return t=oc(t),A4(e,pP()?Reflect.construct(t,n||[],oc(e).constructor):t.apply(e,n))}function A4(e,t){if(t&&(xa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E4(e)}function E4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pP=function(){return!!e})()}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oc(e)}function $4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vp(e,t)}function Vp(e,t){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vp(e,t)}function Uf(e,t,n){return t=vP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vP(e){var t=T4(e,"string");return xa(t)=="symbol"?t:t+""}function T4(e,t){if(xa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function j4(e,t){if(e==null)return{};var n=k4(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k4(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function C4(e){return e.value}function N4(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var n=j4(t,_4);return k.createElement(yy,n)}var Ob=1,oa=function(e){function t(){var n;S4(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=P4(this,t,[].concat(i)),Uf(n,"lastBoundingBox",{width:-1,height:-1}),n}return $4(t,e),O4(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Ob||Math.abs(i.height-this.lastBoundingBox.height)>Ob)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?kn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,s=i.chartWidth,f=i.chartHeight,c,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();c={left:((s||0)-h.width)/2}}else c=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var g=this.getBBoxSnapshot();d={top:((f||0)-g.height)/2}}else d=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return kn(kn({},c),d)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,s=i.payloadUniqBy,f=i.payload,c=kn(kn({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return k.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){r.wrapperNode=h}},N4(a,kn(kn({},this.props),{},{payload:hP(f,s,C4)})))}}],[{key:"getWithHeight",value:function(r,i){var a=kn(kn({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&K(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(T.PureComponent);Uf(oa,"displayName","Legend");Uf(oa,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Pb=lu,M4=by,I4=Pt,Ab=Pb?Pb.isConcatSpreadable:void 0;function D4(e){return I4(e)||M4(e)||!!(Ab&&e&&e[Ab])}var R4=D4,L4=nP,B4=R4;function mP(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=B4),i||(i=[]);++a<o;){var l=e[a];t>0&&n(l)?t>1?mP(l,t-1,n,r,i):L4(i,l):r||(i[i.length]=l)}return i}var yP=mP;function z4(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),l=o.length;l--;){var u=o[e?l:++i];if(n(a[u],u,a)===!1)break}return t}}var F4=z4,U4=F4,W4=U4(),H4=W4,V4=H4,K4=_y;function G4(e,t){return e&&V4(e,t,K4)}var gP=G4,X4=Ff;function q4(e,t){return function(n,r){if(n==null)return n;if(!X4(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Y4=q4,Q4=gP,Z4=Y4,J4=Z4(Q4),Oy=J4,ez=Oy,tz=Ff;function nz(e,t){var n=-1,r=tz(e)?Array(e.length):[];return ez(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var bP=nz;function rz(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var iz=rz,Eb=Ya;function az(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=Eb(e),o=t!==void 0,l=t===null,u=t===t,s=Eb(t);if(!l&&!s&&!a&&e>t||a&&o&&u&&!l&&!s||r&&o&&u||!n&&u||!i)return 1;if(!r&&!a&&!s&&e<t||s&&n&&i&&!r&&!a||l&&n&&i||!o&&i||!u)return-1}return 0}var oz=az,lz=oz;function uz(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,l=n.length;++r<o;){var u=lz(i[r],a[r]);if(u){if(r>=l)return u;var s=n[r];return u*(s=="desc"?-1:1)}}return e.index-t.index}var sz=uz,rh=ly,cz=uy,fz=Rr,dz=bP,hz=iz,pz=aP,vz=sz,mz=io,yz=Pt;function gz(e,t,n){t.length?t=rh(t,function(a){return yz(a)?function(o){return cz(o,a.length===1?a[0]:a)}:a}):t=[mz];var r=-1;t=rh(t,pz(fz));var i=dz(e,function(a,o,l){var u=rh(t,function(s){return s(a)});return{criteria:u,index:++r,value:a}});return hz(i,function(a,o){return vz(a,o,n)})}var bz=gz;function xz(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var wz=xz,_z=wz,$b=Math.max;function Sz(e,t,n){return t=$b(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=$b(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(o),_z(e,this,l)}}var Oz=Sz;function Pz(e){return function(){return e}}var Az=Pz,Ez=Pi,$z=function(){try{var e=Ez(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xP=$z,Tz=Az,Tb=xP,jz=io,kz=Tb?function(e,t){return Tb(e,"toString",{configurable:!0,enumerable:!1,value:Tz(t),writable:!0})}:jz,Cz=kz,Nz=800,Mz=16,Iz=Date.now;function Dz(e){var t=0,n=0;return function(){var r=Iz(),i=Mz-(r-n);if(n=r,i>0){if(++t>=Nz)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Rz=Dz,Lz=Cz,Bz=Rz,zz=Bz(Lz),Fz=zz,Uz=io,Wz=Oz,Hz=Fz;function Vz(e,t){return Hz(Wz(e,t,Uz),e+"")}var Kz=Vz,Gz=ry,Xz=Ff,qz=xy,Yz=Dr;function Qz(e,t,n){if(!Yz(n))return!1;var r=typeof t;return(r=="number"?Xz(n)&&qz(t,n.length):r=="string"&&t in n)?Gz(n[t],e):!1}var Wf=Qz,Zz=yP,Jz=bz,eF=Kz,jb=Wf,tF=eF(function(e,t){if(e==null)return[];var n=t.length;return n>1&&jb(e,t[0],t[1])?t=[]:n>2&&jb(t[0],t[1],t[2])&&(t=[t[0]]),Jz(e,Zz(t,1),[])}),nF=tF;const Py=ye(nF);function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kp.apply(this,arguments)}function rF(e,t){return lF(e)||oF(e,t)||aF(e,t)||iF()}function iF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aF(e,t){if(e){if(typeof e=="string")return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function lF(e){if(Array.isArray(e))return e}function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ih(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cb(Object(n),!0).forEach(function(r){uF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uF(e,t,n){return t=sF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sF(e){var t=cF(e,"string");return xl(t)=="symbol"?t:t+""}function cF(e,t){if(xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fF(e){return Array.isArray(e)&&Ge(e[0])&&Ge(e[1])?e.join(" ~ "):e}var dF=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,u=t.labelStyle,s=u===void 0?{}:u,f=t.payload,c=t.formatter,d=t.itemSorter,h=t.wrapperClassName,g=t.labelClassName,v=t.label,y=t.labelFormatter,p=t.accessibilityLayer,m=p===void 0?!1:p,b=function(){if(f&&f.length){var C={padding:0,margin:0},B=(d?Py(f,d):f).map(function(A,M){if(A.type==="none")return null;var $=ih({display:"block",paddingTop:4,paddingBottom:4,color:A.color||"#000"},l),D=A.formatter||c||fF,N=A.value,R=A.name,L=N,W=R;if(D&&L!=null&&W!=null){var U=D(N,R,A,M,f);if(Array.isArray(U)){var X=rF(U,2);L=X[0],W=X[1]}else L=U}return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:$},Ge(W)?k.createElement("span",{className:"recharts-tooltip-item-name"},W):null,Ge(W)?k.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,k.createElement("span",{className:"recharts-tooltip-item-value"},L),k.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:C},B)}return null},w=ih({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),x=ih({margin:0},s),_=!ne(v),S=_?v:"",O=ie("recharts-default-tooltip",h),E=ie("recharts-tooltip-label",g);_&&y&&f!==void 0&&f!==null&&(S=y(v,f));var j=m?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",Kp({className:O,style:w},j),k.createElement("p",{className:E,style:x},k.isValidElement(S)?S:"".concat(S)),b())};function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function Fu(e,t,n){return t=hF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hF(e){var t=pF(e,"string");return wl(t)=="symbol"?t:t+""}function pF(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var go="recharts-tooltip-wrapper",vF={visibility:"hidden"};function mF(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ie(go,Fu(Fu(Fu(Fu({},"".concat(go,"-right"),K(n)&&t&&K(t.x)&&n>=t.x),"".concat(go,"-left"),K(n)&&t&&K(t.x)&&n<t.x),"".concat(go,"-bottom"),K(r)&&t&&K(t.y)&&r>=t.y),"".concat(go,"-top"),K(r)&&t&&K(t.y)&&r<t.y))}function Nb(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&K(a[r]))return a[r];var f=n[r]-l-i,c=n[r]+i;if(t[r])return o[r]?f:c;if(o[r]){var d=f,h=u[r];return d<h?Math.max(c,u[r]):Math.max(f,u[r])}var g=c+l,v=u[r]+s;return g>v?Math.max(f,u[r]):Math.max(c,u[r])}function yF(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function gF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,s,f,c;return o.height>0&&o.width>0&&n?(f=Nb({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),c=Nb({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),s=yF({translateX:f,translateY:c,useTranslate3d:l})):s=vF,{cssProperties:s,cssClasses:mF({translateX:f,translateY:c,coordinate:n})}}function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function Mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ib(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(n),!0).forEach(function(r){Xp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_P(r.key),r)}}function wF(e,t,n){return t&&xF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _F(e,t,n){return t=lc(t),SF(e,wP()?Reflect.construct(t,n||[],lc(e).constructor):t.apply(e,n))}function SF(e,t){if(t&&(wa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OF(e)}function OF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wP=function(){return!!e})()}function lc(e){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lc(e)}function PF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gp(e,t)}function Xp(e,t,n){return t=_P(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _P(e){var t=AF(e,"string");return wa(t)=="symbol"?t:t+""}function AF(e,t){if(wa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Db=1,EF=function(e){function t(){var n;bF(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=_F(this,t,[].concat(i)),Xp(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Xp(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,u,s,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(u=n.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&l!==void 0?l:0,y:(s=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&s!==void 0?s:0}})}}),n}return PF(t,e),wF(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>Db||Math.abs(r.height-this.state.lastBoundingBox.height)>Db)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,s=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,h=i.offset,g=i.position,v=i.reverseDirection,y=i.useTranslate3d,p=i.viewBox,m=i.wrapperStyle,b=gF({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:p}),w=b.cssClasses,x=b.cssProperties,_=Ib(Ib({transition:d&&a?"transform ".concat(l,"ms ").concat(u):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},m);return k.createElement("div",{tabIndex:-1,className:w,style:_,ref:function(O){r.wrapperNode=O}},s)}}])}(T.PureComponent),$F=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ai={isSsr:$F()};function _a(e){"@babel/helpers - typeof";return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(e)}function Rb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(n),!0).forEach(function(r){Ay(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OP(r.key),r)}}function kF(e,t,n){return t&&jF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CF(e,t,n){return t=uc(t),NF(e,SP()?Reflect.construct(t,n||[],uc(e).constructor):t.apply(e,n))}function NF(e,t){if(t&&(_a(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MF(e)}function MF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SP=function(){return!!e})()}function uc(e){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uc(e)}function IF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qp(e,t)}function qp(e,t){return qp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qp(e,t)}function Ay(e,t,n){return t=OP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OP(e){var t=DF(e,"string");return _a(t)=="symbol"?t:t+""}function DF(e,t){if(_a(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_a(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RF(e){return e.dataKey}function LF(e,t){return k.isValidElement(e)?k.cloneElement(e,t):typeof e=="function"?k.createElement(e,t):k.createElement(dF,t)}var bn=function(e){function t(){return TF(this,t),CF(this,t,arguments)}return IF(t,e),kF(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,s=i.content,f=i.coordinate,c=i.filterNull,d=i.isAnimationActive,h=i.offset,g=i.payload,v=i.payloadUniqBy,y=i.position,p=i.reverseDirection,m=i.useTranslate3d,b=i.viewBox,w=i.wrapperStyle,x=g??[];c&&x.length&&(x=hP(g.filter(function(S){return S.value!=null&&(S.hide!==!0||r.props.includeHidden)}),v,RF));var _=x.length>0;return k.createElement(EF,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:_,offset:h,position:y,reverseDirection:p,useTranslate3d:m,viewBox:b,wrapperStyle:w},LF(s,Lb(Lb({},this.props),{},{payload:x})))}}])}(T.PureComponent);Ay(bn,"displayName","Tooltip");Ay(bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ai.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var BF=Tn,zF=function(){return BF.Date.now()},FF=zF,UF=/\s/;function WF(e){for(var t=e.length;t--&&UF.test(e.charAt(t)););return t}var HF=WF,VF=HF,KF=/^\s+/;function GF(e){return e&&e.slice(0,VF(e)+1).replace(KF,"")}var XF=GF,qF=XF,Bb=Dr,YF=Ya,zb=NaN,QF=/^[-+]0x[0-9a-f]+$/i,ZF=/^0b[01]+$/i,JF=/^0o[0-7]+$/i,e8=parseInt;function t8(e){if(typeof e=="number")return e;if(YF(e))return zb;if(Bb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Bb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qF(e);var n=ZF.test(e);return n||JF.test(e)?e8(e.slice(2),n?2:8):QF.test(e)?zb:+e}var PP=t8,n8=Dr,ah=FF,Fb=PP,r8="Expected a function",i8=Math.max,a8=Math.min;function o8(e,t,n){var r,i,a,o,l,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(r8);t=Fb(t)||0,n8(n)&&(f=!!n.leading,c="maxWait"in n,a=c?i8(Fb(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d);function h(_){var S=r,O=i;return r=i=void 0,s=_,o=e.apply(O,S),o}function g(_){return s=_,l=setTimeout(p,t),f?h(_):o}function v(_){var S=_-u,O=_-s,E=t-S;return c?a8(E,a-O):E}function y(_){var S=_-u,O=_-s;return u===void 0||S>=t||S<0||c&&O>=a}function p(){var _=ah();if(y(_))return m(_);l=setTimeout(p,v(_))}function m(_){return l=void 0,d&&r?h(_):(r=i=void 0,o)}function b(){l!==void 0&&clearTimeout(l),s=0,r=u=i=l=void 0}function w(){return l===void 0?o:m(ah())}function x(){var _=ah(),S=y(_);if(r=arguments,i=this,u=_,S){if(l===void 0)return g(u);if(c)return clearTimeout(l),l=setTimeout(p,t),h(u)}return l===void 0&&(l=setTimeout(p,t)),o}return x.cancel=b,x.flush=w,x}var l8=o8,u8=l8,s8=Dr,c8="Expected a function";function f8(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(c8);return s8(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),u8(e,t,{leading:r,maxWait:t,trailing:i})}var d8=f8;const AP=ye(d8);function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function Ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(n),!0).forEach(function(r){h8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ub(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h8(e,t,n){return t=p8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p8(e){var t=v8(e,"string");return _l(t)=="symbol"?t:t+""}function v8(e,t){if(_l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m8(e,t){return x8(e)||b8(e,t)||g8(e,t)||y8()}function y8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
78
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return k.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ut/8,"h").concat(Ut,"v").concat(Ut*3/4,"h").concat(-Ut,"z"),className:"recharts-legend-icon"});if(k.isValidElement(r.legendIcon)){var s=FD({},r);return delete s.legendIcon,k.cloneElement(r.legendIcon,s)}return k.createElement(my,{fill:u,cx:a,cy:a,size:Ut,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,u=i.formatter,s=i.inactiveColor,f={x:0,y:0,width:Ut,height:Ut},c={display:l==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,g){var v=h.formatter||u,y=ie(bl(bl({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",h.inactive));if(h.type==="none")return null;var p=te(h.value)?null:h.value;Vn(!te(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var m=h.inactive?s:h.color;return k.createElement("li",Lp({className:y,style:c,key:"legend-item-".concat(g)},yi(r.props,h,g)),k.createElement(Tp,{width:o,height:o,viewBox:f,style:d},r.renderIcon(h)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},v?v(p,h,g):p))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return k.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(T.PureComponent);bl(yy,"displayName","Legend");bl(yy,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var YD=Of;function QD(){this.__data__=new YD,this.size=0}var ZD=QD;function JD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var eR=JD;function tR(e){return this.__data__.get(e)}var nR=tR;function rR(e){return this.__data__.has(e)}var iR=rR,aR=Of,oR=iy,lR=ay,uR=200;function sR(e,t){var n=this.__data__;if(n instanceof aR){var r=n.__data__;if(!oR||r.length<uR-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new lR(r)}return n.set(e,t),this.size=n.size,this}var cR=sR,fR=Of,dR=ZD,hR=eR,pR=nR,vR=iR,mR=cR;function no(e){var t=this.__data__=new fR(e);this.size=t.size}no.prototype.clear=dR;no.prototype.delete=hR;no.prototype.get=pR;no.prototype.has=vR;no.prototype.set=mR;var QO=no,yR="__lodash_hash_undefined__";function gR(e){return this.__data__.set(e,yR),this}var bR=gR;function xR(e){return this.__data__.has(e)}var wR=xR,_R=ay,SR=bR,OR=wR;function rc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _R;++t<n;)this.add(e[t])}rc.prototype.add=rc.prototype.push=SR;rc.prototype.has=OR;var ZO=rc;function PR(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var JO=PR;function AR(e,t){return e.has(t)}var eP=AR,ER=ZO,$R=JO,TR=eP,jR=1,kR=2;function CR(e,t,n,r,i,a){var o=n&jR,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var s=a.get(e),f=a.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,h=n&kR?new ER:void 0;for(a.set(e,t),a.set(t,e);++c<l;){var g=e[c],v=t[c];if(r)var y=o?r(v,g,c,t,e,a):r(g,v,c,e,t,a);if(y!==void 0){if(y)continue;d=!1;break}if(h){if(!$R(t,function(p,m){if(!TR(h,m)&&(g===p||i(g,p,n,r,a)))return h.push(m)})){d=!1;break}}else if(!(g===v||i(g,v,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}var tP=CR,NR=Tn,MR=NR.Uint8Array,IR=MR;function DR(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var RR=DR;function LR(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var gy=LR,tb=lu,nb=IR,BR=ry,zR=tP,FR=RR,UR=gy,WR=1,HR=2,VR="[object Boolean]",KR="[object Date]",GR="[object Error]",XR="[object Map]",qR="[object Number]",YR="[object RegExp]",QR="[object Set]",ZR="[object String]",JR="[object Symbol]",eL="[object ArrayBuffer]",tL="[object DataView]",rb=tb?tb.prototype:void 0,eh=rb?rb.valueOf:void 0;function nL(e,t,n,r,i,a,o){switch(n){case tL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case eL:return!(e.byteLength!=t.byteLength||!a(new nb(e),new nb(t)));case VR:case KR:case qR:return BR(+e,+t);case GR:return e.name==t.name&&e.message==t.message;case YR:case ZR:return e==t+"";case XR:var l=FR;case QR:var u=r&WR;if(l||(l=UR),e.size!=t.size&&!u)return!1;var s=o.get(e);if(s)return s==t;r|=HR,o.set(e,t);var f=zR(l(e),l(t),r,i,a,o);return o.delete(e),f;case JR:if(eh)return eh.call(e)==eh.call(t)}return!1}var rL=nL;function iL(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var nP=iL,aL=nP,oL=Pt;function lL(e,t,n){var r=t(e);return oL(e)?r:aL(r,n(e))}var uL=lL;function sL(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var cL=sL;function fL(){return[]}var dL=fL,hL=cL,pL=dL,vL=Object.prototype,mL=vL.propertyIsEnumerable,ib=Object.getOwnPropertySymbols,yL=ib?function(e){return e==null?[]:(e=Object(e),hL(ib(e),function(t){return mL.call(e,t)}))}:pL,gL=yL;function bL(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var xL=bL,wL=rr,_L=ir,SL="[object Arguments]";function OL(e){return _L(e)&&wL(e)==SL}var PL=OL,ab=PL,AL=ir,rP=Object.prototype,EL=rP.hasOwnProperty,$L=rP.propertyIsEnumerable,TL=ab(function(){return arguments}())?ab:function(e){return AL(e)&&EL.call(e,"callee")&&!$L.call(e,"callee")},by=TL,ic={exports:{}};function jL(){return!1}var kL=jL;ic.exports;(function(e,t){var n=Tn,r=kL,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,u=l?l.isBuffer:void 0,s=u||r;e.exports=s})(ic,ic.exports);var iP=ic.exports,CL=9007199254740991,NL=/^(?:0|[1-9]\d*)$/;function ML(e,t){var n=typeof e;return t=t??CL,!!t&&(n=="number"||n!="symbol"&&NL.test(e))&&e>-1&&e%1==0&&e<t}var xy=ML,IL=9007199254740991;function DL(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IL}var wy=DL,RL=rr,LL=wy,BL=ir,zL="[object Arguments]",FL="[object Array]",UL="[object Boolean]",WL="[object Date]",HL="[object Error]",VL="[object Function]",KL="[object Map]",GL="[object Number]",XL="[object Object]",qL="[object RegExp]",YL="[object Set]",QL="[object String]",ZL="[object WeakMap]",JL="[object ArrayBuffer]",e3="[object DataView]",t3="[object Float32Array]",n3="[object Float64Array]",r3="[object Int8Array]",i3="[object Int16Array]",a3="[object Int32Array]",o3="[object Uint8Array]",l3="[object Uint8ClampedArray]",u3="[object Uint16Array]",s3="[object Uint32Array]",Oe={};Oe[t3]=Oe[n3]=Oe[r3]=Oe[i3]=Oe[a3]=Oe[o3]=Oe[l3]=Oe[u3]=Oe[s3]=!0;Oe[zL]=Oe[FL]=Oe[JL]=Oe[UL]=Oe[e3]=Oe[WL]=Oe[HL]=Oe[VL]=Oe[KL]=Oe[GL]=Oe[XL]=Oe[qL]=Oe[YL]=Oe[QL]=Oe[ZL]=!1;function c3(e){return BL(e)&&LL(e.length)&&!!Oe[RL(e)]}var f3=c3;function d3(e){return function(t){return e(t)}}var aP=d3,ac={exports:{}};ac.exports;(function(e,t){var n=hO,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ac,ac.exports);var h3=ac.exports,p3=f3,v3=aP,ob=h3,lb=ob&&ob.isTypedArray,m3=lb?v3(lb):p3,oP=m3,y3=xL,g3=by,b3=Pt,x3=iP,w3=xy,_3=oP,S3=Object.prototype,O3=S3.hasOwnProperty;function P3(e,t){var n=b3(e),r=!n&&g3(e),i=!n&&!r&&x3(e),a=!n&&!r&&!i&&_3(e),o=n||r||i||a,l=o?y3(e.length,String):[],u=l.length;for(var s in e)(t||O3.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||w3(s,u)))&&l.push(s);return l}var A3=P3,E3=Object.prototype;function $3(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||E3;return e===n}var T3=$3;function j3(e,t){return function(n){return e(t(n))}}var lP=j3,k3=lP,C3=k3(Object.keys,Object),N3=C3,M3=T3,I3=N3,D3=Object.prototype,R3=D3.hasOwnProperty;function L3(e){if(!M3(e))return I3(e);var t=[];for(var n in Object(e))R3.call(e,n)&&n!="constructor"&&t.push(n);return t}var B3=L3,z3=ny,F3=wy;function U3(e){return e!=null&&F3(e.length)&&!z3(e)}var Ff=U3,W3=A3,H3=B3,V3=Ff;function K3(e){return V3(e)?W3(e):H3(e)}var _y=K3,G3=uL,X3=gL,q3=_y;function Y3(e){return G3(e,q3,X3)}var Q3=Y3,ub=Q3,Z3=1,J3=Object.prototype,eB=J3.hasOwnProperty;function tB(e,t,n,r,i,a){var o=n&Z3,l=ub(e),u=l.length,s=ub(t),f=s.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=l[c];if(!(o?d in t:eB.call(t,d)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var v=!0;a.set(e,t),a.set(t,e);for(var y=o;++c<u;){d=l[c];var p=e[d],m=t[d];if(r)var b=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(!(b===void 0?p===m||i(p,m,n,r,a):b)){v=!1;break}y||(y=d=="constructor")}if(v&&!y){var w=e.constructor,x=t.constructor;w!=x&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(v=!1)}return a.delete(e),a.delete(t),v}var nB=tB,rB=Pi,iB=Tn,aB=rB(iB,"DataView"),oB=aB,lB=Pi,uB=Tn,sB=lB(uB,"Promise"),cB=sB,fB=Pi,dB=Tn,hB=fB(dB,"Set"),uP=hB,pB=Pi,vB=Tn,mB=pB(vB,"WeakMap"),yB=mB,zp=oB,Fp=iy,Up=cB,Wp=uP,Hp=yB,sP=rr,ro=vO,sb="[object Map]",gB="[object Object]",cb="[object Promise]",fb="[object Set]",db="[object WeakMap]",hb="[object DataView]",bB=ro(zp),xB=ro(Fp),wB=ro(Up),_B=ro(Wp),SB=ro(Hp),qr=sP;(zp&&qr(new zp(new ArrayBuffer(1)))!=hb||Fp&&qr(new Fp)!=sb||Up&&qr(Up.resolve())!=cb||Wp&&qr(new Wp)!=fb||Hp&&qr(new Hp)!=db)&&(qr=function(e){var t=sP(e),n=t==gB?e.constructor:void 0,r=n?ro(n):"";if(r)switch(r){case bB:return hb;case xB:return sb;case wB:return cb;case _B:return fb;case SB:return db}return t});var OB=qr,th=QO,PB=tP,AB=rL,EB=nB,pb=OB,vb=Pt,mb=iP,$B=oP,TB=1,yb="[object Arguments]",gb="[object Array]",zu="[object Object]",jB=Object.prototype,bb=jB.hasOwnProperty;function kB(e,t,n,r,i,a){var o=vb(e),l=vb(t),u=o?gb:pb(e),s=l?gb:pb(t);u=u==yb?zu:u,s=s==yb?zu:s;var f=u==zu,c=s==zu,d=u==s;if(d&&mb(e)){if(!mb(t))return!1;o=!0,f=!1}if(d&&!f)return a||(a=new th),o||$B(e)?PB(e,t,n,r,i,a):AB(e,t,u,n,r,i,a);if(!(n&TB)){var h=f&&bb.call(e,"__wrapped__"),g=c&&bb.call(t,"__wrapped__");if(h||g){var v=h?e.value():e,y=g?t.value():t;return a||(a=new th),i(v,y,n,r,a)}}return d?(a||(a=new th),EB(e,t,n,r,i,a)):!1}var CB=kB,NB=CB,xb=ir;function cP(e,t,n,r,i){return e===t?!0:e==null||t==null||!xb(e)&&!xb(t)?e!==e&&t!==t:NB(e,t,n,r,cP,i)}var Sy=cP,MB=QO,IB=Sy,DB=1,RB=2;function LB(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var u=l[0],s=e[u],f=l[1];if(o&&l[2]){if(s===void 0&&!(u in e))return!1}else{var c=new MB;if(r)var d=r(s,f,u,e,t,c);if(!(d===void 0?IB(f,s,DB|RB,r,c):d))return!1}}return!0}var BB=LB,zB=Dr;function FB(e){return e===e&&!zB(e)}var fP=FB,UB=fP,WB=_y;function HB(e){for(var t=WB(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,UB(i)]}return t}var VB=HB;function KB(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var dP=KB,GB=BB,XB=VB,qB=dP;function YB(e){var t=XB(e);return t.length==1&&t[0][2]?qB(t[0][0],t[0][1]):function(n){return n===e||GB(n,e,t)}}var QB=YB;function ZB(e,t){return e!=null&&t in Object(e)}var JB=ZB,e5=xO,t5=by,n5=Pt,r5=xy,i5=wy,a5=Af;function o5(e,t,n){t=e5(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=a5(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&i5(i)&&r5(o,i)&&(n5(e)||t5(e)))}var l5=o5,u5=JB,s5=l5;function c5(e,t){return e!=null&&s5(e,t,u5)}var f5=c5,d5=Sy,h5=wO,p5=f5,v5=ty,m5=fP,y5=dP,g5=Af,b5=1,x5=2;function w5(e,t){return v5(e)&&m5(t)?y5(g5(e),t):function(n){var r=h5(n,e);return r===void 0&&r===t?p5(n,e):d5(t,r,b5|x5)}}var _5=w5;function S5(e){return e}var io=S5;function O5(e){return function(t){return t==null?void 0:t[e]}}var P5=O5,A5=uy;function E5(e){return function(t){return A5(t,e)}}var $5=E5,T5=P5,j5=$5,k5=ty,C5=Af;function N5(e){return k5(e)?T5(C5(e)):j5(e)}var M5=N5,I5=QB,D5=_5,R5=io,L5=Pt,B5=M5;function z5(e){return typeof e=="function"?e:e==null?R5:typeof e=="object"?L5(e)?D5(e[0],e[1]):I5(e):B5(e)}var Rr=z5;function F5(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var U5=F5;function W5(e){return e!==e}var H5=W5;function V5(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var K5=V5,G5=U5,X5=H5,q5=K5;function Y5(e,t,n){return t===t?q5(e,t,n):G5(e,X5,n)}var Q5=Y5,Z5=Q5;function J5(e,t){var n=e==null?0:e.length;return!!n&&Z5(e,t,0)>-1}var e4=J5;function t4(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var n4=t4;function r4(){}var i4=r4,nh=uP,a4=i4,o4=gy,l4=1/0,u4=nh&&1/o4(new nh([,-0]))[1]==l4?function(e){return new nh(e)}:a4,s4=u4,c4=ZO,f4=e4,d4=n4,h4=eP,p4=s4,v4=gy,m4=200;function y4(e,t,n){var r=-1,i=f4,a=e.length,o=!0,l=[],u=l;if(n)o=!1,i=d4;else if(a>=m4){var s=t?null:p4(e);if(s)return v4(s);o=!1,i=h4,u=new c4}else u=t?[]:l;e:for(;++r<a;){var f=e[r],c=t?t(f):f;if(f=n||f!==0?f:0,o&&c===c){for(var d=u.length;d--;)if(u[d]===c)continue e;t&&u.push(c),l.push(f)}else i(u,c,n)||(u!==l&&u.push(c),l.push(f))}return l}var g4=y4,b4=Rr,x4=g4;function w4(e,t){return e&&e.length?x4(e,b4(t)):[]}var _4=w4;const wb=ye(_4);function hP(e,t,n){return t===!0?wb(e,n):te(t)?wb(e,t):e}function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}var S4=["ref"];function _b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_b(Object(n),!0).forEach(function(r){Uf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vP(r.key),r)}}function P4(e,t,n){return t&&Sb(e.prototype,t),n&&Sb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A4(e,t,n){return t=oc(t),E4(e,pP()?Reflect.construct(t,n||[],oc(e).constructor):t.apply(e,n))}function E4(e,t){if(t&&(xa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $4(e)}function $4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pP=function(){return!!e})()}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oc(e)}function T4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vp(e,t)}function Vp(e,t){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vp(e,t)}function Uf(e,t,n){return t=vP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vP(e){var t=j4(e,"string");return xa(t)=="symbol"?t:t+""}function j4(e,t){if(xa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function k4(e,t){if(e==null)return{};var n=C4(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C4(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N4(e){return e.value}function M4(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var n=k4(t,S4);return k.createElement(yy,n)}var Ob=1,oa=function(e){function t(){var n;O4(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=A4(this,t,[].concat(i)),Uf(n,"lastBoundingBox",{width:-1,height:-1}),n}return T4(t,e),P4(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Ob||Math.abs(i.height-this.lastBoundingBox.height)>Ob)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?kn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,s=i.chartWidth,f=i.chartHeight,c,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();c={left:((s||0)-h.width)/2}}else c=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var g=this.getBBoxSnapshot();d={top:((f||0)-g.height)/2}}else d=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return kn(kn({},c),d)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,s=i.payloadUniqBy,f=i.payload,c=kn(kn({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return k.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){r.wrapperNode=h}},M4(a,kn(kn({},this.props),{},{payload:hP(f,s,N4)})))}}],[{key:"getWithHeight",value:function(r,i){var a=kn(kn({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&K(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(T.PureComponent);Uf(oa,"displayName","Legend");Uf(oa,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Pb=lu,I4=by,D4=Pt,Ab=Pb?Pb.isConcatSpreadable:void 0;function R4(e){return D4(e)||I4(e)||!!(Ab&&e&&e[Ab])}var L4=R4,B4=nP,z4=L4;function mP(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=z4),i||(i=[]);++a<o;){var l=e[a];t>0&&n(l)?t>1?mP(l,t-1,n,r,i):B4(i,l):r||(i[i.length]=l)}return i}var yP=mP;function F4(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),l=o.length;l--;){var u=o[e?l:++i];if(n(a[u],u,a)===!1)break}return t}}var U4=F4,W4=U4,H4=W4(),V4=H4,K4=V4,G4=_y;function X4(e,t){return e&&K4(e,t,G4)}var gP=X4,q4=Ff;function Y4(e,t){return function(n,r){if(n==null)return n;if(!q4(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Q4=Y4,Z4=gP,J4=Q4,ez=J4(Z4),Oy=ez,tz=Oy,nz=Ff;function rz(e,t){var n=-1,r=nz(e)?Array(e.length):[];return tz(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var bP=rz;function iz(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var az=iz,Eb=Ya;function oz(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=Eb(e),o=t!==void 0,l=t===null,u=t===t,s=Eb(t);if(!l&&!s&&!a&&e>t||a&&o&&u&&!l&&!s||r&&o&&u||!n&&u||!i)return 1;if(!r&&!a&&!s&&e<t||s&&n&&i&&!r&&!a||l&&n&&i||!o&&i||!u)return-1}return 0}var lz=oz,uz=lz;function sz(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,l=n.length;++r<o;){var u=uz(i[r],a[r]);if(u){if(r>=l)return u;var s=n[r];return u*(s=="desc"?-1:1)}}return e.index-t.index}var cz=sz,rh=ly,fz=uy,dz=Rr,hz=bP,pz=az,vz=aP,mz=cz,yz=io,gz=Pt;function bz(e,t,n){t.length?t=rh(t,function(a){return gz(a)?function(o){return fz(o,a.length===1?a[0]:a)}:a}):t=[yz];var r=-1;t=rh(t,vz(dz));var i=hz(e,function(a,o,l){var u=rh(t,function(s){return s(a)});return{criteria:u,index:++r,value:a}});return pz(i,function(a,o){return mz(a,o,n)})}var xz=bz;function wz(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var _z=wz,Sz=_z,$b=Math.max;function Oz(e,t,n){return t=$b(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=$b(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(o),Sz(e,this,l)}}var Pz=Oz;function Az(e){return function(){return e}}var Ez=Az,$z=Pi,Tz=function(){try{var e=$z(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xP=Tz,jz=Ez,Tb=xP,kz=io,Cz=Tb?function(e,t){return Tb(e,"toString",{configurable:!0,enumerable:!1,value:jz(t),writable:!0})}:kz,Nz=Cz,Mz=800,Iz=16,Dz=Date.now;function Rz(e){var t=0,n=0;return function(){var r=Dz(),i=Iz-(r-n);if(n=r,i>0){if(++t>=Mz)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Lz=Rz,Bz=Nz,zz=Lz,Fz=zz(Bz),Uz=Fz,Wz=io,Hz=Pz,Vz=Uz;function Kz(e,t){return Vz(Hz(e,t,Wz),e+"")}var Gz=Kz,Xz=ry,qz=Ff,Yz=xy,Qz=Dr;function Zz(e,t,n){if(!Qz(n))return!1;var r=typeof t;return(r=="number"?qz(n)&&Yz(t,n.length):r=="string"&&t in n)?Xz(n[t],e):!1}var Wf=Zz,Jz=yP,eF=xz,tF=Gz,jb=Wf,nF=tF(function(e,t){if(e==null)return[];var n=t.length;return n>1&&jb(e,t[0],t[1])?t=[]:n>2&&jb(t[0],t[1],t[2])&&(t=[t[0]]),eF(e,Jz(t,1),[])}),rF=nF;const Py=ye(rF);function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kp.apply(this,arguments)}function iF(e,t){return uF(e)||lF(e,t)||oF(e,t)||aF()}function aF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oF(e,t){if(e){if(typeof e=="string")return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function uF(e){if(Array.isArray(e))return e}function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ih(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cb(Object(n),!0).forEach(function(r){sF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sF(e,t,n){return t=cF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cF(e){var t=fF(e,"string");return xl(t)=="symbol"?t:t+""}function fF(e,t){if(xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dF(e){return Array.isArray(e)&&Ge(e[0])&&Ge(e[1])?e.join(" ~ "):e}var hF=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,u=t.labelStyle,s=u===void 0?{}:u,f=t.payload,c=t.formatter,d=t.itemSorter,h=t.wrapperClassName,g=t.labelClassName,v=t.label,y=t.labelFormatter,p=t.accessibilityLayer,m=p===void 0?!1:p,b=function(){if(f&&f.length){var C={padding:0,margin:0},B=(d?Py(f,d):f).map(function(A,M){if(A.type==="none")return null;var $=ih({display:"block",paddingTop:4,paddingBottom:4,color:A.color||"#000"},l),D=A.formatter||c||dF,N=A.value,R=A.name,L=N,W=R;if(D&&L!=null&&W!=null){var U=D(N,R,A,M,f);if(Array.isArray(U)){var X=iF(U,2);L=X[0],W=X[1]}else L=U}return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:$},Ge(W)?k.createElement("span",{className:"recharts-tooltip-item-name"},W):null,Ge(W)?k.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,k.createElement("span",{className:"recharts-tooltip-item-value"},L),k.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:C},B)}return null},w=ih({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),x=ih({margin:0},s),_=!ne(v),S=_?v:"",O=ie("recharts-default-tooltip",h),E=ie("recharts-tooltip-label",g);_&&y&&f!==void 0&&f!==null&&(S=y(v,f));var j=m?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",Kp({className:O,style:w},j),k.createElement("p",{className:E,style:x},k.isValidElement(S)?S:"".concat(S)),b())};function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function Fu(e,t,n){return t=pF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pF(e){var t=vF(e,"string");return wl(t)=="symbol"?t:t+""}function vF(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var go="recharts-tooltip-wrapper",mF={visibility:"hidden"};function yF(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ie(go,Fu(Fu(Fu(Fu({},"".concat(go,"-right"),K(n)&&t&&K(t.x)&&n>=t.x),"".concat(go,"-left"),K(n)&&t&&K(t.x)&&n<t.x),"".concat(go,"-bottom"),K(r)&&t&&K(t.y)&&r>=t.y),"".concat(go,"-top"),K(r)&&t&&K(t.y)&&r<t.y))}function Nb(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&K(a[r]))return a[r];var f=n[r]-l-i,c=n[r]+i;if(t[r])return o[r]?f:c;if(o[r]){var d=f,h=u[r];return d<h?Math.max(c,u[r]):Math.max(f,u[r])}var g=c+l,v=u[r]+s;return g>v?Math.max(f,u[r]):Math.max(c,u[r])}function gF(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function bF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,s,f,c;return o.height>0&&o.width>0&&n?(f=Nb({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),c=Nb({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),s=gF({translateX:f,translateY:c,useTranslate3d:l})):s=mF,{cssProperties:s,cssClasses:yF({translateX:f,translateY:c,coordinate:n})}}function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function Mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ib(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(n),!0).forEach(function(r){Xp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_P(r.key),r)}}function _F(e,t,n){return t&&wF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SF(e,t,n){return t=lc(t),OF(e,wP()?Reflect.construct(t,n||[],lc(e).constructor):t.apply(e,n))}function OF(e,t){if(t&&(wa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PF(e)}function PF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wP=function(){return!!e})()}function lc(e){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lc(e)}function AF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gp(e,t)}function Xp(e,t,n){return t=_P(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _P(e){var t=EF(e,"string");return wa(t)=="symbol"?t:t+""}function EF(e,t){if(wa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Db=1,$F=function(e){function t(){var n;xF(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=SF(this,t,[].concat(i)),Xp(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Xp(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,u,s,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(u=n.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&l!==void 0?l:0,y:(s=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&s!==void 0?s:0}})}}),n}return AF(t,e),_F(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>Db||Math.abs(r.height-this.state.lastBoundingBox.height)>Db)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,s=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,h=i.offset,g=i.position,v=i.reverseDirection,y=i.useTranslate3d,p=i.viewBox,m=i.wrapperStyle,b=bF({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:p}),w=b.cssClasses,x=b.cssProperties,_=Ib(Ib({transition:d&&a?"transform ".concat(l,"ms ").concat(u):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},m);return k.createElement("div",{tabIndex:-1,className:w,style:_,ref:function(O){r.wrapperNode=O}},s)}}])}(T.PureComponent),TF=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ai={isSsr:TF()};function _a(e){"@babel/helpers - typeof";return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(e)}function Rb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(n),!0).forEach(function(r){Ay(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OP(r.key),r)}}function CF(e,t,n){return t&&kF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NF(e,t,n){return t=uc(t),MF(e,SP()?Reflect.construct(t,n||[],uc(e).constructor):t.apply(e,n))}function MF(e,t){if(t&&(_a(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IF(e)}function IF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SP=function(){return!!e})()}function uc(e){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uc(e)}function DF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qp(e,t)}function qp(e,t){return qp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qp(e,t)}function Ay(e,t,n){return t=OP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OP(e){var t=RF(e,"string");return _a(t)=="symbol"?t:t+""}function RF(e,t){if(_a(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_a(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function LF(e){return e.dataKey}function BF(e,t){return k.isValidElement(e)?k.cloneElement(e,t):typeof e=="function"?k.createElement(e,t):k.createElement(hF,t)}var bn=function(e){function t(){return jF(this,t),NF(this,t,arguments)}return DF(t,e),CF(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,s=i.content,f=i.coordinate,c=i.filterNull,d=i.isAnimationActive,h=i.offset,g=i.payload,v=i.payloadUniqBy,y=i.position,p=i.reverseDirection,m=i.useTranslate3d,b=i.viewBox,w=i.wrapperStyle,x=g??[];c&&x.length&&(x=hP(g.filter(function(S){return S.value!=null&&(S.hide!==!0||r.props.includeHidden)}),v,LF));var _=x.length>0;return k.createElement($F,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:_,offset:h,position:y,reverseDirection:p,useTranslate3d:m,viewBox:b,wrapperStyle:w},BF(s,Lb(Lb({},this.props),{},{payload:x})))}}])}(T.PureComponent);Ay(bn,"displayName","Tooltip");Ay(bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ai.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var zF=Tn,FF=function(){return zF.Date.now()},UF=FF,WF=/\s/;function HF(e){for(var t=e.length;t--&&WF.test(e.charAt(t)););return t}var VF=HF,KF=VF,GF=/^\s+/;function XF(e){return e&&e.slice(0,KF(e)+1).replace(GF,"")}var qF=XF,YF=qF,Bb=Dr,QF=Ya,zb=NaN,ZF=/^[-+]0x[0-9a-f]+$/i,JF=/^0b[01]+$/i,e8=/^0o[0-7]+$/i,t8=parseInt;function n8(e){if(typeof e=="number")return e;if(QF(e))return zb;if(Bb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Bb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=YF(e);var n=JF.test(e);return n||e8.test(e)?t8(e.slice(2),n?2:8):ZF.test(e)?zb:+e}var PP=n8,r8=Dr,ah=UF,Fb=PP,i8="Expected a function",a8=Math.max,o8=Math.min;function l8(e,t,n){var r,i,a,o,l,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(i8);t=Fb(t)||0,r8(n)&&(f=!!n.leading,c="maxWait"in n,a=c?a8(Fb(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d);function h(_){var S=r,O=i;return r=i=void 0,s=_,o=e.apply(O,S),o}function g(_){return s=_,l=setTimeout(p,t),f?h(_):o}function v(_){var S=_-u,O=_-s,E=t-S;return c?o8(E,a-O):E}function y(_){var S=_-u,O=_-s;return u===void 0||S>=t||S<0||c&&O>=a}function p(){var _=ah();if(y(_))return m(_);l=setTimeout(p,v(_))}function m(_){return l=void 0,d&&r?h(_):(r=i=void 0,o)}function b(){l!==void 0&&clearTimeout(l),s=0,r=u=i=l=void 0}function w(){return l===void 0?o:m(ah())}function x(){var _=ah(),S=y(_);if(r=arguments,i=this,u=_,S){if(l===void 0)return g(u);if(c)return clearTimeout(l),l=setTimeout(p,t),h(u)}return l===void 0&&(l=setTimeout(p,t)),o}return x.cancel=b,x.flush=w,x}var u8=l8,s8=u8,c8=Dr,f8="Expected a function";function d8(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(f8);return c8(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),s8(e,t,{leading:r,maxWait:t,trailing:i})}var h8=d8;const AP=ye(h8);function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function Ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(n),!0).forEach(function(r){p8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ub(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p8(e,t,n){return t=v8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v8(e){var t=m8(e,"string");return _l(t)=="symbol"?t:t+""}function m8(e,t){if(_l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y8(e,t){return w8(e)||x8(e,t)||b8(e,t)||g8()}function g8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b8(e,t){if(e){if(typeof e=="string")return Wb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wb(e,t)}}function Wb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x8(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function w8(e){if(Array.isArray(e))return e}var EP=T.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,l=e.height,u=l===void 0?"100%":l,s=e.minWidth,f=s===void 0?0:s,c=e.minHeight,d=e.maxHeight,h=e.children,g=e.debounce,v=g===void 0?0:g,y=e.id,p=e.className,m=e.onResize,b=e.style,w=b===void 0?{}:b,x=T.useRef(null),_=T.useRef();_.current=m,T.useImperativeHandle(t,function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})});var S=T.useState({containerWidth:i.width,containerHeight:i.height}),O=y8(S,2),E=O[0],j=O[1],I=T.useCallback(function(B,A){j(function(M){var $=Math.round(B),D=Math.round(A);return M.containerWidth===$&&M.containerHeight===D?M:{containerWidth:$,containerHeight:D}})},[]);T.useEffect(function(){var B=function(R){var L,W=R[0].contentRect,U=W.width,X=W.height;I(U,X),(L=_.current)===null||L===void 0||L.call(_,U,X)};v>0&&(B=AP(B,v,{trailing:!0,leading:!1}));var A=new ResizeObserver(B),M=x.current.getBoundingClientRect(),$=M.width,D=M.height;return I($,D),A.observe(x.current),function(){A.disconnect()}},[I,v]);var C=T.useMemo(function(){var B=E.containerWidth,A=E.containerHeight;if(B<0||A<0)return null;Vn(ti(o)||ti(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
82
81
|
maybe you don't need to use a ResponsiveContainer.`,o,u),Vn(!n||n>0,"The aspect(%s) must be greater than zero.",n);var M=ti(o)?B:o,$=ti(u)?A:u;n&&n>0&&(M?$=M/n:$&&(M=$*n),d&&$>d&&($=d)),Vn(M>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
83
82
|
please check the style of container, or the props width(%s) and height(%s),
|
|
84
83
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
85
|
-
height and width.`,M,$,o,u,f,c,n);var D=!Array.isArray(h)&&Hn(h.type).endsWith("Chart");return k.Children.map(h,function(N){return k.isValidElement(N)?T.cloneElement(N,Uu({width:M,height:$},D?{style:Uu({height:"100%",width:"100%",maxHeight:$,maxWidth:M},N.props.style)}:{})):N})},[n,h,u,d,c,f,E,o]);return k.createElement("div",{id:y?"".concat(y):void 0,className:ie("recharts-responsive-container",p),style:Uu(Uu({},w),{},{width:o,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:x},C)}),Hf=function(t){return null};Hf.displayName="Cell";function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function Hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hb(Object(n),!0).forEach(function(r){
|
|
86
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G8(e,t){if(e){if(typeof e=="string")return Jb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jb(e,t)}}function Jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X8(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function q8(e){if(Array.isArray(e))return e}var jP=/[ \f\n\r\t\v\u2028\u2029]+/,kP=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];ne(n)||(r?a=n.toString().split(""):a=n.toString().split(jP));var o=a.map(function(u){return{word:u,width:Ko(u,i).width}}),l=r?0:Ko(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},Y8=function(t,n,r,i,a){var o=t.maxLines,l=t.children,u=t.style,s=t.breakAll,f=K(o),c=l,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function($,D){var N=D.word,R=D.width,L=$[$.length-1];if(L&&(i==null||a||L.width+R+r<Number(i)))L.words.push(N),L.width+=R+r;else{var W={words:[N],width:R};$.push(W)}return $},[])},h=d(n),g=function(M){return M.reduce(function($,D){return $.width>D.width?$:D})};if(!f)return h;for(var v="…",y=function(M){var $=c.slice(0,M),D=kP({breakAll:s,style:u,children:$+v}).wordsWithComputedWidth,N=d(D),R=N.length>o||g(N).width>Number(i);return[R,N]},p=0,m=c.length-1,b=0,w;p<=m&&b<=c.length-1;){var x=Math.floor((p+m)/2),_=x-1,S=y(_),O=Zb(S,2),E=O[0],j=O[1],I=y(x),C=Zb(I,1),B=C[0];if(!E&&!B&&(p=x+1),E&&B&&(m=x-1),!E&&B){w=j;break}b++}return w||h},ex=function(t){var n=ne(t)?[]:t.toString().split(jP);return[{words:n}]},Q8=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Ai.isSsr){var u,s,f=kP({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return ex(i);return Y8({breakAll:o,children:i,maxLines:l,style:a},u,s,n,r)}return ex(i)},tx="#808080",gi=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,g=t.verticalAnchor,v=g===void 0?"end":g,y=t.fill,p=y===void 0?tx:y,m=Qb(t,W8),b=T.useMemo(function(){return Q8({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),w=m.dx,x=m.dy,_=m.angle,S=m.className,O=m.breakAll,E=Qb(m,H8);if(!Ge(r)||!Ge(a))return null;var j=r+(K(w)?w:0),I=a+(K(x)?x:0),C;switch(v){case"start":C=oh("calc(".concat(s,")"));break;case"middle":C=oh("calc(".concat((b.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:C=oh("calc(".concat(b.length-1," * -").concat(l,")"));break}var B=[];if(c){var A=b[0].width,M=m.width;B.push("scale(".concat((K(M)?M/A:1)/A,")"))}return _&&B.push("rotate(".concat(_,", ").concat(j,", ").concat(I,")")),B.length&&(E.transform=B.join(" ")),k.createElement("text",Qp({},J(E,!0),{x:j,y:I,className:ie("recharts-text",S),textAnchor:h,fill:p.includes("url")?tx:p}),b.map(function($,D){var N=$.words.join(O?"":" ");return k.createElement("tspan",{x:j,dy:D===0?C:l,key:"".concat(N,"-").concat(D)},N)}))};function $r(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Z8(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ey(e){let t,n,r;e.length!==2?(t=$r,n=(l,u)=>$r(e(l),u),r=(l,u)=>e(l)-u):(t=e===$r||e===Z8?e:J8,n=e,r=e);function i(l,u,s=0,f=l.length){if(s<f){if(t(u,u)!==0)return f;do{const c=s+f>>>1;n(l[c],u)<0?s=c+1:f=c}while(s<f)}return s}function a(l,u,s=0,f=l.length){if(s<f){if(t(u,u)!==0)return f;do{const c=s+f>>>1;n(l[c],u)<=0?s=c+1:f=c}while(s<f)}return s}function o(l,u,s=0,f=l.length){const c=i(l,u,s,f-1);return c>s&&r(l[c-1],u)>-r(l[c],u)?c-1:c}return{left:i,center:o,right:a}}function J8(){return 0}function CP(e){return e===null?NaN:+e}function*e6(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const t6=Ey($r),su=t6.right;Ey(CP).center;class nx extends Map{constructor(t,n=i6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(rx(this,t))}has(t){return super.has(rx(this,t))}set(t,n){return super.set(n6(this,t),n)}delete(t){return super.delete(r6(this,t))}}function rx({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function n6({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function r6({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function i6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function a6(e=$r){if(e===$r)return NP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function NP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const o6=Math.sqrt(50),l6=Math.sqrt(10),u6=Math.sqrt(2);function cc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=o6?10:a>=l6?5:a>=u6?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(e*s),u=Math.round(t*s),l/s<e&&++l,u/s>t&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(e/s),u=Math.round(t/s),l*s<e&&++l,u*s>t&&--u),u<l&&.5<=n&&n<2?cc(e,t,n*2):[l,u,s]}function Zp(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?cc(t,e,n):cc(e,t,n);if(!(a>=i))return[];const l=a-i+1,u=new Array(l);if(r)if(o<0)for(let s=0;s<l;++s)u[s]=(a-s)/-o;else for(let s=0;s<l;++s)u[s]=(a-s)*o;else if(o<0)for(let s=0;s<l;++s)u[s]=(i+s)/-o;else for(let s=0;s<l;++s)u[s]=(i+s)*o;return u}function Jp(e,t,n){return t=+t,e=+e,n=+n,cc(e,t,n)[2]}function ev(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Jp(t,e,n):Jp(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ix(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function ax(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function MP(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?NP:a6(i);r>n;){if(r-n>600){const u=r-n+1,s=t-n+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),h=Math.max(n,Math.floor(t-s*c/u+d)),g=Math.min(r,Math.floor(t+(u-s)*c/u+d));MP(e,t,h,g,i)}const a=e[t];let o=n,l=r;for(bo(e,n,t),i(e[r],a)>0&&bo(e,n,r);o<l;){for(bo(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?bo(e,n,l):(++l,bo(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function bo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function s6(e,t,n){if(e=Float64Array.from(e6(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ax(e);if(t>=1)return ix(e);var r,i=(r-1)*t,a=Math.floor(i),o=ix(MP(e,a).subarray(0,a+1)),l=ax(e.subarray(a+1));return o+(l-o)*(i-a)}}function c6(e,t,n=CP){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function f6(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Jt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ar(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const tv=Symbol("implicit");function $y(){var e=new nx,t=[],n=[],r=tv;function i(a){let o=e.get(a);if(o===void 0){if(r!==tv)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new nx;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return $y(t,n).unknown(r)},Jt.apply(i,arguments),i}function Pl(){var e=$y().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,u=0,s=0,f=.5;delete e.unknown;function c(){var d=t().length,h=i<r,g=h?i:r,v=h?r:i;a=(v-g)/Math.max(1,d-u+s*2),l&&(a=Math.floor(a)),g+=(v-g-a*(d-u))*f,o=a*(1-u),l&&(g=Math.round(g),o=Math.round(o));var y=f6(d).map(function(p){return g+a*p});return n(h?y.reverse():y)}return e.domain=function(d){return arguments.length?(t(d),c()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,c()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,l=!0,c()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(l=!!d,c()):l},e.padding=function(d){return arguments.length?(u=Math.min(1,s=+d),c()):u},e.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),c()):u},e.paddingOuter=function(d){return arguments.length?(s=+d,c()):s},e.align=function(d){return arguments.length?(f=Math.max(0,Math.min(1,d)),c()):f},e.copy=function(){return Pl(t(),[r,i]).round(l).paddingInner(u).paddingOuter(s).align(f)},Jt.apply(c(),arguments)}function IP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return IP(t())},e}function Go(){return IP(Pl.apply(null,arguments).paddingInner(1))}function Ty(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function DP(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cu(){}var Al=.7,fc=1/Al,la="\\s*([+-]?\\d+)\\s*",El="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d6=/^#([0-9a-f]{3,8})$/,h6=new RegExp(`^rgb\\(${la},${la},${la}\\)$`),p6=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),v6=new RegExp(`^rgba\\(${la},${la},${la},${El}\\)$`),m6=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${El}\\)$`),y6=new RegExp(`^hsl\\(${El},${Pn},${Pn}\\)$`),g6=new RegExp(`^hsla\\(${El},${Pn},${Pn},${El}\\)$`),ox={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ty(cu,bi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lx,formatHex:lx,formatHex8:b6,formatHsl:x6,formatRgb:ux,toString:ux});function lx(){return this.rgb().formatHex()}function b6(){return this.rgb().formatHex8()}function x6(){return RP(this).formatHsl()}function ux(){return this.rgb().formatRgb()}function bi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sx(t):n===3?new wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Hu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h6.exec(e))?new wt(t[1],t[2],t[3],1):(t=p6.exec(e))?new wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=v6.exec(e))?Hu(t[1],t[2],t[3],t[4]):(t=m6.exec(e))?Hu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=y6.exec(e))?dx(t[1],t[2]/100,t[3]/100,1):(t=g6.exec(e))?dx(t[1],t[2]/100,t[3]/100,t[4]):ox.hasOwnProperty(e)?sx(ox[e]):e==="transparent"?new wt(NaN,NaN,NaN,0):null}function sx(e){return new wt(e>>16&255,e>>8&255,e&255,1)}function Hu(e,t,n,r){return r<=0&&(e=t=n=NaN),new wt(e,t,n,r)}function w6(e){return e instanceof cu||(e=bi(e)),e?(e=e.rgb(),new wt(e.r,e.g,e.b,e.opacity)):new wt}function nv(e,t,n,r){return arguments.length===1?w6(e):new wt(e,t,n,r??1)}function wt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ty(wt,nv,DP(cu,{brighter(e){return e=e==null?fc:Math.pow(fc,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Al:Math.pow(Al,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wt(ui(this.r),ui(this.g),ui(this.b),dc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cx,formatHex:cx,formatHex8:_6,formatRgb:fx,toString:fx}));function cx(){return`#${ni(this.r)}${ni(this.g)}${ni(this.b)}`}function _6(){return`#${ni(this.r)}${ni(this.g)}${ni(this.b)}${ni((isNaN(this.opacity)?1:this.opacity)*255)}`}function fx(){const e=dc(this.opacity);return`${e===1?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${e===1?")":`, ${e})`}`}function dc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ui(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ni(e){return e=ui(e),(e<16?"0":"")+e.toString(16)}function dx(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cn(e,t,n,r)}function RP(e){if(e instanceof cn)return new cn(e.h,e.s,e.l,e.opacity);if(e instanceof cu||(e=bi(e)),!e)return new cn;if(e instanceof cn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new cn(o,l,u,e.opacity)}function S6(e,t,n,r){return arguments.length===1?RP(e):new cn(e,t,n,r??1)}function cn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ty(cn,S6,DP(cu,{brighter(e){return e=e==null?fc:Math.pow(fc,e),new cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Al:Math.pow(Al,e),new cn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wt(lh(e>=240?e-240:e+120,i,r),lh(e,i,r),lh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new cn(hx(this.h),Vu(this.s),Vu(this.l),dc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=dc(this.opacity);return`${e===1?"hsl(":"hsla("}${hx(this.h)}, ${Vu(this.s)*100}%, ${Vu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hx(e){return e=(e||0)%360,e<0?e+360:e}function Vu(e){return Math.max(0,Math.min(1,e||0))}function lh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jy=e=>()=>e;function O6(e,t){return function(n){return e+n*t}}function P6(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function A6(e){return(e=+e)==1?LP:function(t,n){return n-t?P6(t,n,e):jy(isNaN(t)?n:t)}}function LP(e,t){var n=t-e;return n?O6(e,n):jy(isNaN(e)?t:e)}const hc=function e(t){var n=A6(t);function r(i,a){var o=n((i=nv(i)).r,(a=nv(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),s=LP(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=s(f),i+""}}return r.gamma=e,r}(1);function E6(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function $6(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function T6(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ao(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function j6(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function k6(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ao(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var rv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uh=new RegExp(rv.source,"g");function C6(e){return function(){return e}}function N6(e){return function(t){return e(t)+""}}function BP(e,t){var n=rv.lastIndex=uh.lastIndex=0,r,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(r=rv.exec(e))&&(i=uh.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:sn(r,i)})),n=uh.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?N6(u[0].x):C6(t):(t=u.length,function(s){for(var f=0,c;f<t;++f)l[(c=u[f]).i]=c.x(s);return l.join("")})}function ao(e,t){var n=typeof t,r;return t==null||n==="boolean"?jy(t):(n==="number"?sn:n==="string"?(r=bi(t))?(t=r,hc):BP:t instanceof bi?hc:t instanceof Date?j6:$6(t)?E6:Array.isArray(t)?T6:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?k6:sn)(e,t)}function ky(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var px=180/Math.PI,iv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zP(e,t,n,r,i,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*px,skewX:Math.atan(u)*px,scaleX:o,scaleY:l}}var Ku;function M6(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?iv:zP(t.a,t.b,t.c,t.d,t.e,t.f)}function I6(e){return e==null||(Ku||(Ku=document.createElementNS("http://www.w3.org/2000/svg","g")),Ku.setAttribute("transform",e),!(e=Ku.transform.baseVal.consolidate()))?iv:(e=e.matrix,zP(e.a,e.b,e.c,e.d,e.e,e.f))}function FP(e,t,n,r){function i(s){return s.length?s.pop()+" ":""}function a(s,f,c,d,h,g){if(s!==c||f!==d){var v=h.push("translate(",null,t,null,n);g.push({i:v-4,x:sn(s,c)},{i:v-2,x:sn(f,d)})}else(c||d)&&h.push("translate("+c+t+d+n)}function o(s,f,c,d){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),d.push({i:c.push(i(c)+"rotate(",null,r)-2,x:sn(s,f)})):f&&c.push(i(c)+"rotate("+f+r)}function l(s,f,c,d){s!==f?d.push({i:c.push(i(c)+"skewX(",null,r)-2,x:sn(s,f)}):f&&c.push(i(c)+"skewX("+f+r)}function u(s,f,c,d,h,g){if(s!==c||f!==d){var v=h.push(i(h)+"scale(",null,",",null,")");g.push({i:v-4,x:sn(s,c)},{i:v-2,x:sn(f,d)})}else(c!==1||d!==1)&&h.push(i(h)+"scale("+c+","+d+")")}return function(s,f){var c=[],d=[];return s=e(s),f=e(f),a(s.translateX,s.translateY,f.translateX,f.translateY,c,d),o(s.rotate,f.rotate,c,d),l(s.skewX,f.skewX,c,d),u(s.scaleX,s.scaleY,f.scaleX,f.scaleY,c,d),s=f=null,function(h){for(var g=-1,v=d.length,y;++g<v;)c[(y=d[g]).i]=y.x(h);return c.join("")}}}var D6=FP(M6,"px, ","px)","deg)"),R6=FP(I6,", ",")",")"),L6=1e-12;function vx(e){return((e=Math.exp(e))+1/e)/2}function B6(e){return((e=Math.exp(e))-1/e)/2}function z6(e){return((e=Math.exp(2*e))-1)/(e+1)}const F6=function e(t,n,r){function i(a,o){var l=a[0],u=a[1],s=a[2],f=o[0],c=o[1],d=o[2],h=f-l,g=c-u,v=h*h+g*g,y,p;if(v<L6)p=Math.log(d/s)/t,y=function(S){return[l+S*h,u+S*g,s*Math.exp(t*S*p)]};else{var m=Math.sqrt(v),b=(d*d-s*s+r*v)/(2*s*n*m),w=(d*d-s*s-r*v)/(2*d*n*m),x=Math.log(Math.sqrt(b*b+1)-b),_=Math.log(Math.sqrt(w*w+1)-w);p=(_-x)/t,y=function(S){var O=S*p,E=vx(x),j=s/(n*m)*(E*z6(t*O+x)-B6(x));return[l+j*h,u+j*g,s*E/vx(t*O+x)]}}return y.duration=p*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,u=l*l;return e(o,l,u)},i}(Math.SQRT2,2,4);function U6(e,t){t===void 0&&(t=e,e=ao);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}function W6(e){return function(){return e}}function pc(e){return+e}var mx=[0,1];function ht(e){return e}function av(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:W6(isNaN(t)?NaN:.5)}function H6(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function V6(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=av(i,r),a=n(o,a)):(r=av(r,i),a=n(a,o)),function(l){return a(r(l))}}function K6(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=av(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var u=su(e,l,1,r)-1;return a[u](i[u](l))}}function fu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vf(){var e=mx,t=mx,n=ao,r,i,a,o=ht,l,u,s;function f(){var d=Math.min(e.length,t.length);return o!==ht&&(o=H6(e[0],e[d-1])),l=d>2?K6:V6,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=l(e.map(r),t,n)))(r(o(d)))}return c.invert=function(d){return o(i((s||(s=l(t,e.map(r),sn)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,pc),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),n=ky,f()},c.clamp=function(d){return arguments.length?(o=d?!0:ht,f()):o!==ht},c.interpolate=function(d){return arguments.length?(n=d,f()):n},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,h){return r=d,i=h,f()}}function Cy(){return Vf()(ht,ht)}function G6(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vc(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Sa(e){return e=vc(Math.abs(e)),e?e[1]:NaN}function X6(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(n.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function q6(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Y6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $l(e){if(!(t=Y6.exec(e)))throw new Error("invalid format: "+e);var t;return new Ny({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$l.prototype=Ny.prototype;function Ny(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ny.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Q6(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var mc;function Z6(e,t){var n=vc(e,t);if(!n)return mc=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(mc=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+vc(e,Math.max(0,t+a-1))[0]}function yx(e,t){var n=vc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:G6,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>yx(e*100,t),r:yx,s:Z6,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bx(e){return e}var xx=Array.prototype.map,wx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function J6(e){var t=e.grouping===void 0||e.thousands===void 0?bx:X6(xx.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?bx:q6(xx.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c,d){c=$l(c);var h=c.fill,g=c.align,v=c.sign,y=c.symbol,p=c.zero,m=c.width,b=c.comma,w=c.precision,x=c.trim,_=c.type;_==="n"?(b=!0,_="g"):gx[_]||(w===void 0&&(w=12),x=!0,_="g"),(p||h==="0"&&g==="=")&&(p=!0,h="0",g="=");var S=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),O=(y==="$"?r:/[%p]/.test(_)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),E=gx[_],j=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function I(C){var B=S,A=O,M,$,D;if(_==="c")A=E(C)+A,C="";else{C=+C;var N=C<0||1/C<0;if(C=isNaN(C)?u:E(Math.abs(C),w),x&&(C=Q6(C)),N&&+C==0&&v!=="+"&&(N=!1),B=(N?v==="("?v:l:v==="-"||v==="("?"":v)+B,A=(_==="s"&&!isNaN(C)&&mc!==void 0?wx[8+mc/3]:"")+A+(N&&v==="("?")":""),j){for(M=-1,$=C.length;++M<$;)if(D=C.charCodeAt(M),48>D||D>57){A=(D===46?i+C.slice(M+1):C.slice(M))+A,C=C.slice(0,M);break}}}b&&!p&&(C=t(C,1/0));var R=B.length+C.length+A.length,L=R<m?new Array(m-R+1).join(h):"";switch(b&&p&&(C=t(L+C,L.length?m-A.length:1/0),L=""),g){case"<":C=B+C+A+L;break;case"=":C=B+L+C+A;break;case"^":C=L.slice(0,R=L.length>>1)+B+C+A+L.slice(R);break;default:C=L+B+C+A;break}return a(C)}return I.toString=function(){return c+""},I}function f(c,d){var h=Math.max(-8,Math.min(8,Math.floor(Sa(d)/3)))*3,g=Math.pow(10,-h),v=s((c=$l(c),c.type="f",c),{suffix:wx[8+h/3]});return function(y){return v(g*y)}}return{format:s,formatPrefix:f}}var Gu,My,UP;eU({thousands:",",grouping:[3],currency:["$",""]});function eU(e){return Gu=J6(e),My=Gu.format,UP=Gu.formatPrefix,Gu}function tU(e){return Math.max(0,-Sa(Math.abs(e)))}function nU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sa(t)/3)))*3-Sa(Math.abs(e)))}function rU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sa(t)-Sa(e))+1}function WP(e,t,n,r){var i=ev(e,t,n),a;switch(r=$l(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=nU(i,o))&&(r.precision=a),UP(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=rU(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=tU(i))&&(r.precision=a-(r.type==="%")*2);break}}return My(r)}function Lr(e){var t=e.domain;return e.ticks=function(n){var r=t();return Zp(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return WP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],u,s,f=10;for(l<o&&(s=o,o=l,l=s,s=i,i=a,a=s);f-- >0;){if(s=Jp(o,l,n),s===u)return r[i]=o,r[a]=l,t(r);if(s>0)o=Math.floor(o/s)*s,l=Math.ceil(l/s)*s;else if(s<0)o=Math.ceil(o*s)/s,l=Math.floor(l*s)/s;else break;u=s}return e},e}function yc(){var e=Cy();return e.copy=function(){return fu(e,yc())},Jt.apply(e,arguments),Lr(e)}function HP(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,pc),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return HP(e).unknown(t)},e=arguments.length?Array.from(e,pc):[0,1],Lr(n)}function VP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function _x(e){return Math.log(e)}function Sx(e){return Math.exp(e)}function iU(e){return-Math.log(-e)}function aU(e){return-Math.exp(-e)}function oU(e){return isFinite(e)?+("1e"+e):e<0?0:e}function lU(e){return e===10?oU:e===Math.E?Math.exp:t=>Math.pow(e,t)}function uU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Ox(e){return(t,n)=>-e(-t,n)}function Iy(e){const t=e(_x,Sx),n=t.domain;let r=10,i,a;function o(){return i=uU(r),a=lU(r),n()[0]<0?(i=Ox(i),a=Ox(a),e(iU,aU)):e(_x,Sx),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const u=n();let s=u[0],f=u[u.length-1];const c=f<s;c&&([s,f]=[f,s]);let d=i(s),h=i(f),g,v;const y=l==null?10:+l;let p=[];if(!(r%1)&&h-d<y){if(d=Math.floor(d),h=Math.ceil(h),s>0){for(;d<=h;++d)for(g=1;g<r;++g)if(v=d<0?g/a(-d):g*a(d),!(v<s)){if(v>f)break;p.push(v)}}else for(;d<=h;++d)for(g=r-1;g>=1;--g)if(v=d>0?g/a(-d):g*a(d),!(v<s)){if(v>f)break;p.push(v)}p.length*2<y&&(p=Zp(s,f,y))}else p=Zp(d,h,Math.min(h-d,y)).map(a);return c?p.reverse():p},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=$l(u)).precision==null&&(u.trim=!0),u=My(u)),l===1/0)return u;const s=Math.max(1,r*l/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*r<r-.5&&(c*=r),c<=s?u(f):""}},t.nice=()=>n(VP(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function KP(){const e=Iy(Vf()).domain([1,10]);return e.copy=()=>fu(e,KP()).base(e.base()),Jt.apply(e,arguments),e}function Px(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ax(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Dy(e){var t=1,n=e(Px(t),Ax(t));return n.constant=function(r){return arguments.length?e(Px(t=+r),Ax(t)):t},Lr(n)}function GP(){var e=Dy(Vf());return e.copy=function(){return fu(e,GP()).constant(e.constant())},Jt.apply(e,arguments)}function Ex(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function sU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function cU(e){return e<0?-e*e:e*e}function Ry(e){var t=e(ht,ht),n=1;function r(){return n===1?e(ht,ht):n===.5?e(sU,cU):e(Ex(n),Ex(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Lr(t)}function Ly(){var e=Ry(Vf());return e.copy=function(){return fu(e,Ly()).exponent(e.exponent())},Jt.apply(e,arguments),e}function fU(){return Ly.apply(null,arguments).exponent(.5)}function $x(e){return Math.sign(e)*e*e}function dU(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XP(){var e=Cy(),t=[0,1],n=!1,r;function i(a){var o=dU(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert($x(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,pc)).map($x)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return XP(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Jt.apply(i,arguments),Lr(i)}function qP(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=c6(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[su(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort($r),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return qP().domain(e).range(t).unknown(r)},Jt.apply(a,arguments)}function YP(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[su(r,u,0,n)]:a}function l(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,l()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,l()):i.slice()},o.invertExtent=function(u){var s=i.indexOf(u);return s<0?[NaN,NaN]:s<1?[e,r[0]]:s>=n?[r[n-1],t]:[r[s-1],r[s]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return YP().domain([e,t]).range(i).unknown(a)},Jt.apply(Lr(o),arguments)}function QP(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[su(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return QP().domain(e).range(t).unknown(n)},Jt.apply(i,arguments)}const sh=new Date,ch=new Date;function Xe(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let s;do u.push(s=new Date(+a)),t(a,l),e(a);while(s<a&&a<o);return u},i.filter=a=>Xe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(sh.setTime(+a),ch.setTime(+o),e(sh),e(ch),Math.floor(n(sh,ch))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const gc=Xe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gc);gc.range;const zn=1e3,Gt=zn*60,Fn=Gt*60,Zn=Fn*24,By=Zn*7,Tx=Zn*30,fh=Zn*365,ri=Xe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zn)},(e,t)=>(t-e)/zn,e=>e.getUTCSeconds());ri.range;const zy=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zn)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getMinutes());zy.range;const Fy=Xe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getUTCMinutes());Fy.range;const Uy=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zn-e.getMinutes()*Gt)},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getHours());Uy.range;const Wy=Xe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getUTCHours());Wy.range;const du=Xe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gt)/Zn,e=>e.getDate()-1);du.range;const Kf=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>e.getUTCDate()-1);Kf.range;const ZP=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>Math.floor(e/Zn));ZP.range;function Ei(e){return Xe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Gt)/By)}const Gf=Ei(0),bc=Ei(1),hU=Ei(2),pU=Ei(3),Oa=Ei(4),vU=Ei(5),mU=Ei(6);Gf.range;bc.range;hU.range;pU.range;Oa.range;vU.range;mU.range;function $i(e){return Xe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/By)}const Xf=$i(0),xc=$i(1),yU=$i(2),gU=$i(3),Pa=$i(4),bU=$i(5),xU=$i(6);Xf.range;xc.range;yU.range;gU.range;Pa.range;bU.range;xU.range;const Hy=Xe(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hy.range;const Vy=Xe(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vy.range;const Jn=Xe(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Jn.range;const er=Xe(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());er.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});er.range;function JP(e,t,n,r,i,a){const o=[[ri,1,zn],[ri,5,5*zn],[ri,15,15*zn],[ri,30,30*zn],[a,1,Gt],[a,5,5*Gt],[a,15,15*Gt],[a,30,30*Gt],[i,1,Fn],[i,3,3*Fn],[i,6,6*Fn],[i,12,12*Fn],[r,1,Zn],[r,2,2*Zn],[n,1,By],[t,1,Tx],[t,3,3*Tx],[e,1,fh]];function l(s,f,c){const d=f<s;d&&([s,f]=[f,s]);const h=c&&typeof c.range=="function"?c:u(s,f,c),g=h?h.range(s,+f+1):[];return d?g.reverse():g}function u(s,f,c){const d=Math.abs(f-s)/c,h=Ey(([,,y])=>y).right(o,d);if(h===o.length)return e.every(ev(s/fh,f/fh,c));if(h===0)return gc.every(Math.max(ev(s,f,c),1));const[g,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return g.every(v)}return[l,u]}const[wU,_U]=JP(er,Vy,Xf,ZP,Wy,Fy),[SU,OU]=JP(Jn,Hy,Gf,du,Uy,zy);function dh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hh(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function PU(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,s=wo(i),f=_o(i),c=wo(a),d=_o(a),h=wo(o),g=_o(o),v=wo(l),y=_o(l),p=wo(u),m=_o(u),b={a:D,A:N,b:R,B:L,c:null,d:Ix,e:Ix,f:XU,g:iW,G:oW,H:VU,I:KU,j:GU,L:eA,m:qU,M:YU,p:W,q:U,Q:Lx,s:Bx,S:QU,u:ZU,U:JU,V:eW,w:tW,W:nW,x:null,X:null,y:rW,Y:aW,Z:lW,"%":Rx},w={a:X,A:Z,b:ae,B:F,c:null,d:Dx,e:Dx,f:fW,g:wW,G:SW,H:uW,I:sW,j:cW,L:nA,m:dW,M:hW,p:Q,q:ce,Q:Lx,s:Bx,S:pW,u:vW,U:mW,V:yW,w:gW,W:bW,x:null,X:null,y:xW,Y:_W,Z:OW,"%":Rx},x={a:j,A:I,b:C,B,c:A,d:Nx,e:Nx,f:FU,g:Cx,G:kx,H:Mx,I:Mx,j:RU,L:zU,m:DU,M:LU,p:E,q:IU,Q:WU,s:HU,S:BU,u:jU,U:kU,V:CU,w:TU,W:NU,x:M,X:$,y:Cx,Y:kx,Z:MU,"%":UU};b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),w.x=_(n,w),w.X=_(r,w),w.c=_(t,w);function _(G,re){return function(oe){var H=[],Ce=-1,ue=0,ze=G.length,Fe,gt,lr;for(oe instanceof Date||(oe=new Date(+oe));++Ce<ze;)G.charCodeAt(Ce)===37&&(H.push(G.slice(ue,Ce)),(gt=jx[Fe=G.charAt(++Ce)])!=null?Fe=G.charAt(++Ce):gt=Fe==="e"?" ":"0",(lr=re[Fe])&&(Fe=lr(oe,gt)),H.push(Fe),ue=Ce+1);return H.push(G.slice(ue,Ce)),H.join("")}}function S(G,re){return function(oe){var H=xo(1900,void 0,1),Ce=O(H,G,oe+="",0),ue,ze;if(Ce!=oe.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(re&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(ue=hh(xo(H.y,0,1)),ze=ue.getUTCDay(),ue=ze>4||ze===0?xc.ceil(ue):xc(ue),ue=Kf.offset(ue,(H.V-1)*7),H.y=ue.getUTCFullYear(),H.m=ue.getUTCMonth(),H.d=ue.getUTCDate()+(H.w+6)%7):(ue=dh(xo(H.y,0,1)),ze=ue.getDay(),ue=ze>4||ze===0?bc.ceil(ue):bc(ue),ue=du.offset(ue,(H.V-1)*7),H.y=ue.getFullYear(),H.m=ue.getMonth(),H.d=ue.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ze="Z"in H?hh(xo(H.y,0,1)).getUTCDay():dh(xo(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ze+5)%7:H.w+H.U*7-(ze+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,hh(H)):dh(H)}}function O(G,re,oe,H){for(var Ce=0,ue=re.length,ze=oe.length,Fe,gt;Ce<ue;){if(H>=ze)return-1;if(Fe=re.charCodeAt(Ce++),Fe===37){if(Fe=re.charAt(Ce++),gt=x[Fe in jx?re.charAt(Ce++):Fe],!gt||(H=gt(G,oe,H))<0)return-1}else if(Fe!=oe.charCodeAt(H++))return-1}return H}function E(G,re,oe){var H=s.exec(re.slice(oe));return H?(G.p=f.get(H[0].toLowerCase()),oe+H[0].length):-1}function j(G,re,oe){var H=h.exec(re.slice(oe));return H?(G.w=g.get(H[0].toLowerCase()),oe+H[0].length):-1}function I(G,re,oe){var H=c.exec(re.slice(oe));return H?(G.w=d.get(H[0].toLowerCase()),oe+H[0].length):-1}function C(G,re,oe){var H=p.exec(re.slice(oe));return H?(G.m=m.get(H[0].toLowerCase()),oe+H[0].length):-1}function B(G,re,oe){var H=v.exec(re.slice(oe));return H?(G.m=y.get(H[0].toLowerCase()),oe+H[0].length):-1}function A(G,re,oe){return O(G,t,re,oe)}function M(G,re,oe){return O(G,n,re,oe)}function $(G,re,oe){return O(G,r,re,oe)}function D(G){return o[G.getDay()]}function N(G){return a[G.getDay()]}function R(G){return u[G.getMonth()]}function L(G){return l[G.getMonth()]}function W(G){return i[+(G.getHours()>=12)]}function U(G){return 1+~~(G.getMonth()/3)}function X(G){return o[G.getUTCDay()]}function Z(G){return a[G.getUTCDay()]}function ae(G){return u[G.getUTCMonth()]}function F(G){return l[G.getUTCMonth()]}function Q(G){return i[+(G.getUTCHours()>=12)]}function ce(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var re=_(G+="",b);return re.toString=function(){return G},re},parse:function(G){var re=S(G+="",!1);return re.toString=function(){return G},re},utcFormat:function(G){var re=_(G+="",w);return re.toString=function(){return G},re},utcParse:function(G){var re=S(G+="",!0);return re.toString=function(){return G},re}}}var jx={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,AU=/^%/,EU=/[\\^$*+?|[\]().{}]/g;function de(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function $U(e){return e.replace(EU,"\\$&")}function wo(e){return new RegExp("^(?:"+e.map($U).join("|")+")","i")}function _o(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function TU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function CU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function NU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kx(e,t,n){var r=Je.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Cx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function MU(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function IU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function DU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Nx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function RU(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Mx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function LU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function BU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zU(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FU(e,t,n){var r=Je.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function UU(e,t,n){var r=AU.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WU(e,t,n){var r=Je.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function HU(e,t,n){var r=Je.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ix(e,t){return de(e.getDate(),t,2)}function VU(e,t){return de(e.getHours(),t,2)}function KU(e,t){return de(e.getHours()%12||12,t,2)}function GU(e,t){return de(1+du.count(Jn(e),e),t,3)}function eA(e,t){return de(e.getMilliseconds(),t,3)}function XU(e,t){return eA(e,t)+"000"}function qU(e,t){return de(e.getMonth()+1,t,2)}function YU(e,t){return de(e.getMinutes(),t,2)}function QU(e,t){return de(e.getSeconds(),t,2)}function ZU(e){var t=e.getDay();return t===0?7:t}function JU(e,t){return de(Gf.count(Jn(e)-1,e),t,2)}function tA(e){var t=e.getDay();return t>=4||t===0?Oa(e):Oa.ceil(e)}function eW(e,t){return e=tA(e),de(Oa.count(Jn(e),e)+(Jn(e).getDay()===4),t,2)}function tW(e){return e.getDay()}function nW(e,t){return de(bc.count(Jn(e)-1,e),t,2)}function rW(e,t){return de(e.getFullYear()%100,t,2)}function iW(e,t){return e=tA(e),de(e.getFullYear()%100,t,2)}function aW(e,t){return de(e.getFullYear()%1e4,t,4)}function oW(e,t){var n=e.getDay();return e=n>=4||n===0?Oa(e):Oa.ceil(e),de(e.getFullYear()%1e4,t,4)}function lW(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+de(t/60|0,"0",2)+de(t%60,"0",2)}function Dx(e,t){return de(e.getUTCDate(),t,2)}function uW(e,t){return de(e.getUTCHours(),t,2)}function sW(e,t){return de(e.getUTCHours()%12||12,t,2)}function cW(e,t){return de(1+Kf.count(er(e),e),t,3)}function nA(e,t){return de(e.getUTCMilliseconds(),t,3)}function fW(e,t){return nA(e,t)+"000"}function dW(e,t){return de(e.getUTCMonth()+1,t,2)}function hW(e,t){return de(e.getUTCMinutes(),t,2)}function pW(e,t){return de(e.getUTCSeconds(),t,2)}function vW(e){var t=e.getUTCDay();return t===0?7:t}function mW(e,t){return de(Xf.count(er(e)-1,e),t,2)}function rA(e){var t=e.getUTCDay();return t>=4||t===0?Pa(e):Pa.ceil(e)}function yW(e,t){return e=rA(e),de(Pa.count(er(e),e)+(er(e).getUTCDay()===4),t,2)}function gW(e){return e.getUTCDay()}function bW(e,t){return de(xc.count(er(e)-1,e),t,2)}function xW(e,t){return de(e.getUTCFullYear()%100,t,2)}function wW(e,t){return e=rA(e),de(e.getUTCFullYear()%100,t,2)}function _W(e,t){return de(e.getUTCFullYear()%1e4,t,4)}function SW(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Pa(e):Pa.ceil(e),de(e.getUTCFullYear()%1e4,t,4)}function OW(){return"+0000"}function Rx(){return"%"}function Lx(e){return+e}function Bx(e){return Math.floor(+e/1e3)}var Ni,iA,aA;PW({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function PW(e){return Ni=PU(e),iA=Ni.format,Ni.parse,aA=Ni.utcFormat,Ni.utcParse,Ni}function AW(e){return new Date(e)}function EW(e){return e instanceof Date?+e:+new Date(+e)}function Ky(e,t,n,r,i,a,o,l,u,s){var f=Cy(),c=f.invert,d=f.domain,h=s(".%L"),g=s(":%S"),v=s("%I:%M"),y=s("%I %p"),p=s("%a %d"),m=s("%b %d"),b=s("%B"),w=s("%Y");function x(_){return(u(_)<_?h:l(_)<_?g:o(_)<_?v:a(_)<_?y:r(_)<_?i(_)<_?p:m:n(_)<_?b:w)(_)}return f.invert=function(_){return new Date(c(_))},f.domain=function(_){return arguments.length?d(Array.from(_,EW)):d().map(AW)},f.ticks=function(_){var S=d();return e(S[0],S[S.length-1],_??10)},f.tickFormat=function(_,S){return S==null?x:s(S)},f.nice=function(_){var S=d();return(!_||typeof _.range!="function")&&(_=t(S[0],S[S.length-1],_??10)),_?d(VP(S,_)):f},f.copy=function(){return fu(f,Ky(e,t,n,r,i,a,o,l,u,s))},f}function $W(){return Jt.apply(Ky(SU,OU,Jn,Hy,Gf,du,Uy,zy,ri,iA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function TW(){return Jt.apply(Ky(wU,_U,er,Vy,Xf,Kf,Wy,Fy,ri,aA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qf(){var e=0,t=1,n,r,i,a,o=ht,l=!1,u;function s(c){return c==null||isNaN(c=+c)?u:o(i===0?.5:(c=(a(c)-n)*i,l?Math.max(0,Math.min(1,c)):c))}s.domain=function(c){return arguments.length?([e,t]=c,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),s):[e,t]},s.clamp=function(c){return arguments.length?(l=!!c,s):l},s.interpolator=function(c){return arguments.length?(o=c,s):o};function f(c){return function(d){var h,g;return arguments.length?([h,g]=d,o=c(h,g),s):[o(0),o(1)]}}return s.range=f(ao),s.rangeRound=f(ky),s.unknown=function(c){return arguments.length?(u=c,s):u},function(c){return a=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),s}}function Br(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function oA(){var e=Lr(qf()(ht));return e.copy=function(){return Br(e,oA())},ar.apply(e,arguments)}function lA(){var e=Iy(qf()).domain([1,10]);return e.copy=function(){return Br(e,lA()).base(e.base())},ar.apply(e,arguments)}function uA(){var e=Dy(qf());return e.copy=function(){return Br(e,uA()).constant(e.constant())},ar.apply(e,arguments)}function Gy(){var e=Ry(qf());return e.copy=function(){return Br(e,Gy()).exponent(e.exponent())},ar.apply(e,arguments)}function jW(){return Gy.apply(null,arguments).exponent(.5)}function sA(){var e=[],t=ht;function n(r){if(r!=null&&!isNaN(r=+r))return t((su(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($r),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>s6(e,a/r))},n.copy=function(){return sA(t).domain(e)},ar.apply(n,arguments)}function Yf(){var e=0,t=.5,n=1,r=1,i,a,o,l,u,s=ht,f,c=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-a)*(r*v<r*a?l:u),s(c?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,n]=v,i=f(e=+e),a=f(t=+t),o=f(n=+n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(v){return arguments.length?(c=!!v,h):c},h.interpolator=function(v){return arguments.length?(s=v,h):s};function g(v){return function(y){var p,m,b;return arguments.length?([p,m,b]=y,s=U6(v,[p,m,b]),h):[s(0),s(.5),s(1)]}}return h.range=g(ao),h.rangeRound=g(ky),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,i=v(e),a=v(t),o=v(n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function cA(){var e=Lr(Yf()(ht));return e.copy=function(){return Br(e,cA())},ar.apply(e,arguments)}function fA(){var e=Iy(Yf()).domain([.1,1,10]);return e.copy=function(){return Br(e,fA()).base(e.base())},ar.apply(e,arguments)}function dA(){var e=Dy(Yf());return e.copy=function(){return Br(e,dA()).constant(e.constant())},ar.apply(e,arguments)}function Xy(){var e=Ry(Yf());return e.copy=function(){return Br(e,Xy()).exponent(e.exponent())},ar.apply(e,arguments)}function kW(){return Xy.apply(null,arguments).exponent(.5)}const zx=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Pl,scaleDiverging:cA,scaleDivergingLog:fA,scaleDivergingPow:Xy,scaleDivergingSqrt:kW,scaleDivergingSymlog:dA,scaleIdentity:HP,scaleImplicit:tv,scaleLinear:yc,scaleLog:KP,scaleOrdinal:$y,scalePoint:Go,scalePow:Ly,scaleQuantile:qP,scaleQuantize:YP,scaleRadial:XP,scaleSequential:oA,scaleSequentialLog:lA,scaleSequentialPow:Gy,scaleSequentialQuantile:sA,scaleSequentialSqrt:jW,scaleSequentialSymlog:uA,scaleSqrt:fU,scaleSymlog:GP,scaleThreshold:QP,scaleTime:$W,scaleUtc:TW,tickFormat:WP},Symbol.toStringTag,{value:"Module"}));var CW=Ya;function NW(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(l===void 0?o===o&&!CW(o):n(o,l)))var l=o,u=a}return u}var Qf=NW;function MW(e,t){return e>t}var hA=MW,IW=Qf,DW=hA,RW=io;function LW(e){return e&&e.length?IW(e,RW,DW):void 0}var BW=LW;const Zf=ye(BW);function zW(e,t){return e<t}var pA=zW,FW=Qf,UW=pA,WW=io;function HW(e){return e&&e.length?FW(e,WW,UW):void 0}var VW=HW;const Jf=ye(VW);var KW=ly,GW=Rr,XW=bP,qW=Pt;function YW(e,t){var n=qW(e)?KW:XW;return n(e,GW(t))}var QW=YW,ZW=yP,JW=QW;function e9(e,t){return ZW(JW(e,t),1)}var t9=e9;const n9=ye(t9);var r9=Sy;function i9(e,t){return r9(e,t)}var a9=i9;const hu=ye(a9);var oo=1e9,o9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Yy,$e=!0,Qt="[DecimalError] ",si=Qt+"Invalid argument: ",qy=Qt+"Exponent out of range: ",lo=Math.floor,Yr=Math.pow,l9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kt,qe=1e7,Pe=7,vA=9007199254740991,wc=lo(vA/Pe),Y={};Y.absoluteValue=Y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Y.comparedTo=Y.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};Y.decimalPlaces=Y.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pe;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Y.dividedBy=Y.div=function(e){return Kn(this,new this.constructor(e))};Y.dividedToIntegerBy=Y.idiv=function(e){var t=this,n=t.constructor;return ge(Kn(t,new n(e),0,1),n.precision)};Y.equals=Y.eq=function(e){return!this.cmp(e)};Y.exponent=function(){return Be(this)};Y.greaterThan=Y.gt=function(e){return this.cmp(e)>0};Y.greaterThanOrEqualTo=Y.gte=function(e){return this.cmp(e)>=0};Y.isInteger=Y.isint=function(){return this.e>this.d.length-2};Y.isNegative=Y.isneg=function(){return this.s<0};Y.isPositive=Y.ispos=function(){return this.s>0};Y.isZero=function(){return this.s===0};Y.lessThan=Y.lt=function(e){return this.cmp(e)<0};Y.lessThanOrEqualTo=Y.lte=function(e){return this.cmp(e)<1};Y.logarithm=Y.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(kt))throw Error(Qt+"NaN");if(n.s<1)throw Error(Qt+(n.s?"NaN":"-Infinity"));return n.eq(kt)?new r(0):($e=!1,t=Kn(Tl(n,a),Tl(e,a),a),$e=!0,ge(t,i))};Y.minus=Y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gA(t,e):mA(t,(e.s=-e.s,e))};Y.modulo=Y.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Qt+"NaN");return n.s?($e=!1,t=Kn(n,e,0,1).times(e),$e=!0,n.minus(t)):ge(new r(n),i)};Y.naturalExponential=Y.exp=function(){return yA(this)};Y.naturalLogarithm=Y.ln=function(){return Tl(this)};Y.negated=Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Y.plus=Y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mA(t,e):gA(t,(e.s=-e.s,e))};Y.precision=Y.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(si+e);if(t=Be(i)+1,r=i.d.length-1,n=r*Pe+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Y.squareRoot=Y.sqrt=function(){var e,t,n,r,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(Qt+"NaN")}for(e=Be(l),$e=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=_n(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=lo((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=o=n+3;;)if(a=r,r=a.plus(Kn(l,a,o+2)).times(.5),_n(a.d).slice(0,o)===(t=_n(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ge(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return $e=!0,ge(r,n)};Y.times=Y.mul=function(e){var t,n,r,i,a,o,l,u,s,f=this,c=f.constructor,d=f.d,h=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,n=f.e+e.e,u=d.length,s=h.length,u<s&&(a=d,d=h,h=a,o=u,u=s,s=o),a=[],o=u+s,r=o;r--;)a.push(0);for(r=s;--r>=0;){for(t=0,i=u+r;i>r;)l=a[i]+h[r]*d[i-r-1]+t,a[i--]=l%qe|0,t=l/qe|0;a[i]=(a[i]+t)%qe|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,$e?ge(e,c.precision):e};Y.toDecimalPlaces=Y.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(En(e,0,oo),t===void 0?t=r.rounding:En(t,0,8),ge(n,e+Be(n)+1,t))};Y.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=xi(r,!0):(En(e,0,oo),t===void 0?t=i.rounding:En(t,0,8),r=ge(new i(r),e+1,t),n=xi(r,!0,e+1)),n};Y.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?xi(i):(En(e,0,oo),t===void 0?t=a.rounding:En(t,0,8),r=ge(new a(i),e+Be(i)+1,t),n=xi(r.abs(),!1,e+Be(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Y.toInteger=Y.toint=function(){var e=this,t=e.constructor;return ge(new t(e),Be(e)+1,t.rounding)};Y.toNumber=function(){return+this};Y.toPower=Y.pow=function(e){var t,n,r,i,a,o,l=this,u=l.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(kt);if(l=new u(l),!l.s){if(e.s<1)throw Error(Qt+"Infinity");return l}if(l.eq(kt))return l;if(r=u.precision,e.eq(kt))return ge(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=f<0?-f:f)<=vA){for(i=new u(kt),t=Math.ceil(r/Pe+4),$e=!1;n%2&&(i=i.times(l),Ux(i.d,t)),n=lo(n/2),n!==0;)l=l.times(l),Ux(l.d,t);return $e=!0,e.s<0?new u(kt).div(i):ge(i,r)}}else if(a<0)throw Error(Qt+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,$e=!1,i=e.times(Tl(l,r+s)),$e=!0,i=yA(i),i.s=a,i};Y.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Be(i),r=xi(i,n<=a.toExpNeg||n>=a.toExpPos)):(En(e,1,oo),t===void 0?t=a.rounding:En(t,0,8),i=ge(new a(i),e,t),n=Be(i),r=xi(i,e<=n||n<=a.toExpNeg,e)),r};Y.toSignificantDigits=Y.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(En(e,1,oo),t===void 0?t=r.rounding:En(t,0,8)),ge(new r(n),e,t)};Y.toString=Y.valueOf=Y.val=Y.toJSON=Y[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Be(e),n=e.constructor;return xi(e,t<=n.toExpNeg||t>=n.toExpPos)};function mA(e,t){var n,r,i,a,o,l,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),$e?ge(t,c):t;if(u=e.d,s=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(r=u,a=-a,l=s.length):(r=s,i=o,l=u.length),o=Math.ceil(c/Pe),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=u.length,a=s.length,l-a<0&&(a=l,r=s,s=u,u=r),n=0;a;)n=(u[--a]=u[a]+s[a]+n)/qe|0,u[a]%=qe;for(n&&(u.unshift(n),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,$e?ge(t,c):t}function En(e,t,n){if(e!==~~e||e<t||e>n)throw Error(si+e)}function _n(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Pe-r.length,n&&(a+=fr(n)),a+=r;o=e[t],r=o+"",n=Pe-r.length,n&&(a+=fr(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Kn=function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%qe|0,o=a/qe|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,u;if(a!=o)u=a>o?1:-1;else for(l=u=0;l<a;l++)if(r[l]!=i[l]){u=r[l]>i[l]?1:-1;break}return u}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*qe+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,u,s,f,c,d,h,g,v,y,p,m,b,w,x,_,S,O,E=r.constructor,j=r.s==i.s?1:-1,I=r.d,C=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(Qt+"Division by zero");for(u=r.e-i.e,S=C.length,x=I.length,h=new E(j),g=h.d=[],s=0;C[s]==(I[s]||0);)++s;if(C[s]>(I[s]||0)&&--u,a==null?m=a=E.precision:o?m=a+(Be(r)-Be(i))+1:m=a,m<0)return new E(0);if(m=m/Pe+2|0,s=0,S==1)for(f=0,C=C[0],m++;(s<x||f)&&m--;s++)b=f*qe+(I[s]||0),g[s]=b/C|0,f=b%C|0;else{for(f=qe/(C[0]+1)|0,f>1&&(C=e(C,f),I=e(I,f),S=C.length,x=I.length),w=S,v=I.slice(0,S),y=v.length;y<S;)v[y++]=0;O=C.slice(),O.unshift(0),_=C[0],C[1]>=qe/2&&++_;do f=0,l=t(C,v,S,y),l<0?(p=v[0],S!=y&&(p=p*qe+(v[1]||0)),f=p/_|0,f>1?(f>=qe&&(f=qe-1),c=e(C,f),d=c.length,y=v.length,l=t(c,v,d,y),l==1&&(f--,n(c,S<d?O:C,d))):(f==0&&(l=f=1),c=C.slice()),d=c.length,d<y&&c.unshift(0),n(v,c,y),l==-1&&(y=v.length,l=t(C,v,S,y),l<1&&(f++,n(v,S<y?O:C,y))),y=v.length):l===0&&(f++,v=[0]),g[s++]=f,l&&v[0]?v[y++]=I[w]||0:(v=[I[w]],y=1);while((w++<x||v[0]!==void 0)&&m--)}return g[0]||g.shift(),h.e=u,ge(h,o?a+Be(h)+1:a)}}();function yA(e,t){var n,r,i,a,o,l,u=0,s=0,f=e.constructor,c=f.precision;if(Be(e)>16)throw Error(qy+Be(e));if(!e.s)return new f(kt);for($e=!1,l=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),s+=5;for(r=Math.log(Yr(2,s))/Math.LN10*2+5|0,l+=r,n=i=a=new f(kt),f.precision=l;;){if(i=ge(i.times(e),l),n=n.times(++u),o=a.plus(Kn(i,n,l)),_n(o.d).slice(0,l)===_n(a.d).slice(0,l)){for(;s--;)a=ge(a.times(a),l);return f.precision=c,t==null?($e=!0,ge(a,c)):a}a=o}}function Be(e){for(var t=e.e*Pe,n=e.d[0];n>=10;n/=10)t++;return t}function ph(e,t,n){if(t>e.LN10.sd())throw $e=!0,n&&(e.precision=n),Error(Qt+"LN10 precision limit exceeded");return ge(new e(e.LN10),t)}function fr(e){for(var t="";e--;)t+="0";return t}function Tl(e,t){var n,r,i,a,o,l,u,s,f,c=1,d=10,h=e,g=h.d,v=h.constructor,y=v.precision;if(h.s<1)throw Error(Qt+(h.s?"NaN":"-Infinity"));if(h.eq(kt))return new v(0);if(t==null?($e=!1,s=y):s=t,h.eq(10))return t==null&&($e=!0),ph(v,s);if(s+=d,v.precision=s,n=_n(g),r=n.charAt(0),a=Be(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=_n(h.d),r=n.charAt(0),c++;a=Be(h),r>1?(h=new v("0."+n),a++):h=new v(r+"."+n.slice(1))}else return u=ph(v,s+2,y).times(a+""),h=Tl(new v(r+"."+n.slice(1)),s-d).plus(u),v.precision=y,t==null?($e=!0,ge(h,y)):h;for(l=o=h=Kn(h.minus(kt),h.plus(kt),s),f=ge(h.times(h),s),i=3;;){if(o=ge(o.times(f),s),u=l.plus(Kn(o,new v(i),s)),_n(u.d).slice(0,s)===_n(l.d).slice(0,s))return l=l.times(2),a!==0&&(l=l.plus(ph(v,s+2,y).times(a+""))),l=Kn(l,new v(c),s),v.precision=y,t==null?($e=!0,ge(l,y)):l;l=u,i+=2}}function Fx(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=lo(n/Pe),e.d=[],r=(n+1)%Pe,n<0&&(r+=Pe),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Pe;r<i;)e.d.push(+t.slice(r,r+=Pe));t=t.slice(r),r=Pe-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),$e&&(e.e>wc||e.e<-wc))throw Error(qy+n)}else e.s=0,e.e=0,e.d=[0];return e}function ge(e,t,n){var r,i,a,o,l,u,s,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Pe,i=t,s=c[f=0];else{if(f=Math.ceil((r+1)/Pe),a=c.length,f>=a)return e;for(s=a=c[f],o=1;a>=10;a/=10)o++;r%=Pe,i=r-Pe+o}if(n!==void 0&&(a=Yr(10,o-i-1),l=s/a%10|0,u=t<0||c[f+1]!==void 0||s%a,u=n<4?(l||u)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||u||n==6&&(r>0?i>0?s/Yr(10,o-i):0:c[f-1])%10&1||n==(e.s<0?8:7))),t<1||!c[0])return u?(a=Be(e),c.length=1,t=t-a-1,c[0]=Yr(10,(Pe-t%Pe)%Pe),e.e=lo(-t/Pe)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(r==0?(c.length=f,a=1,f--):(c.length=f+1,a=Yr(10,Pe-r),c[f]=i>0?(s/Yr(10,o-i)%Yr(10,i)|0)*a:0),u)for(;;)if(f==0){(c[0]+=a)==qe&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=qe)break;c[f--]=0,a=1}for(r=c.length;c[--r]===0;)c.pop();if($e&&(e.e>wc||e.e<-wc))throw Error(qy+Be(e));return e}function gA(e,t){var n,r,i,a,o,l,u,s,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),$e?ge(t,h):t;if(u=e.d,c=t.d,r=t.e,s=e.e,u=u.slice(),o=s-r,o){for(f=o<0,f?(n=u,o=-o,l=c.length):(n=c,r=s,l=u.length),i=Math.max(Math.ceil(h/Pe),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=u.length,l=c.length,f=i<l,f&&(l=i),i=0;i<l;i++)if(u[i]!=c[i]){f=u[i]<c[i];break}o=0}for(f&&(n=u,u=c,c=n,t.s=-t.s),l=u.length,i=c.length-l;i>0;--i)u[l++]=0;for(i=c.length;i>o;){if(u[--i]<c[i]){for(a=i;a&&u[--a]===0;)u[a]=qe-1;--u[a],u[i]+=qe}u[i]-=c[i]}for(;u[--l]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,$e?ge(t,h):t):new d(0)}function xi(e,t,n){var r,i=Be(e),a=_n(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+fr(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+fr(-i-1)+a,n&&(r=n-o)>0&&(a+=fr(r))):i>=o?(a+=fr(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+fr(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=fr(r))),e.s<0?"-"+a:a}function Ux(e,t){if(e.length>t)return e.length=t,!0}function bA(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(si+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return Fx(o,a.toString())}else if(typeof a!="string")throw Error(si+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,l9.test(a))Fx(o,a);else throw Error(si+a)}if(i.prototype=Y,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=bA,i.config=i.set=u9,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function u9(e){if(!e||typeof e!="object")throw Error(Qt+"Object expected");var t,n,r,i=["precision",1,oo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(lo(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(si+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(si+n+": "+r);return this}var Yy=bA(o9);kt=new Yy(1);const me=Yy;function s9(e){return h9(e)||d9(e)||f9(e)||c9()}function c9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
88
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
89
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SA(e,t){if(e){if(typeof e=="string")return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cv(e,t)}}function cv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function
|
|
91
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t7(e,t){if(e){if(typeof e=="string")return dv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dv(e,t)}}function n7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function r7(e){if(Array.isArray(e))return dv(e)}function dv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gx(Object(n),!0).forEach(function(r){ua(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ua(e,t,n){return t=i7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i7(e){var t=a7(e,"string");return Cl(t)=="symbol"?t:t+""}function a7(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ve(e,t,n){return ne(e)||ne(t)?n:Ge(t)?Mt(e,t,n):te(t)?t(e):n}function Xo(e,t,n,r){var i=n9(e,function(l){return Ve(l,t)});if(n==="number"){var a=i.filter(function(l){return K(l)||parseFloat(l)});return a.length?[Jf(a),Zf(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!ne(l)}):i;return o.map(function(l){return Ge(l)||l instanceof Date?l:""})}var o7=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,s=0;s<l;s++){var f=s>0?i[s-1].coordinate:i[l-1].coordinate,c=i[s].coordinate,d=s>=l-1?i[0].coordinate:i[s+1].coordinate,h=void 0;if(ft(c-f)!==ft(d-c)){var g=[];if(ft(d-c)===ft(u[1]-u[0])){h=d;var v=c+u[1]-u[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{h=f;var y=d+u[1]-u[0];g[0]=Math.min(c,(y+c)/2),g[1]=Math.max(c,(y+c)/2)}var p=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>p[0]&&t<=p[1]||t>=g[0]&&t<=g[1]){o=i[s].index;break}}else{var m=Math.min(f,d),b=Math.max(f,d);if(t>(m+c)/2&&t<=(b+c)/2){o=i[s].index;break}}}else for(var w=0;w<l;w++)if(w===0&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w>0&&w<l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w===l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2){o=r[w].index;break}return o},Qy=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},l7=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,s=l.length;u<s;u++)for(var f=a[l[u]].stackGroups,c=Object.keys(f),d=0,h=c.length;d<h;d++){var g=f[c[d]],v=g.items,y=g.cateAxisId,p=v.filter(function(S){return Hn(S.type).indexOf("Bar")>=0});if(p&&p.length){var m=p[0].type.defaultProps,b=m!==void 0?Me(Me({},m),p[0].props):p[0].props,w=b.barSize,x=b[y];o[x]||(o[x]=[]);var _=ne(w)?n:w;o[x].push({item:p[0],stackList:p.slice(1),barSize:ne(_)?void 0:dt(_,r,0)})}}return o},u7=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var s=dt(n,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/u,g=o.reduce(function(w,x){return w+x.barSize||0},0);g+=(u-1)*s,g>=i&&(g-=(u-1)*s,s=0),g>=i&&h>0&&(d=!0,h*=.9,g=u*h);var v=(i-g)/2>>0,y={offset:v-s,size:0};f=o.reduce(function(w,x){var _={item:x.item,position:{offset:y.offset+y.size+s,size:d?h:x.barSize}},S=[].concat(Kx(w),[_]);return y=S[S.length-1].position,x.stackList&&x.stackList.length&&x.stackList.forEach(function(O){S.push({item:O,position:y})}),S},c)}else{var p=dt(r,i,0,!0);i-2*p-(u-1)*s<=0&&(s=0);var m=(i-2*p-(u-1)*s)/u;m>1&&(m>>=0);var b=l===+l?Math.min(m,l):m;f=o.reduce(function(w,x,_){var S=[].concat(Kx(w),[{item:x.item,position:{offset:p+(m+s)*_+(m-b)/2,size:b}}]);return x.stackList&&x.stackList.length&&x.stackList.forEach(function(O){S.push({item:O,position:S[S.length-1].position})}),S},c)}return f},s7=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,u=o-(l.left||0)-(l.right||0),s=jA({children:a,legendWidth:u});if(s){var f=i||{},c=f.width,d=f.height,h=s.align,g=s.verticalAlign,v=s.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&h!=="center"&&K(t[h]))return Me(Me({},t),{},ua({},h,t[h]+(c||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&g!=="middle"&&K(t[g]))return Me(Me({},t),{},ua({},g,t[g]+(d||0)))}return t},c7=function(t,n,r){return ne(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},kA=function(t,n,r,i,a){var o=n.props.children,l=It(o,pu).filter(function(s){return c7(i,a,s.props.direction)});if(l&&l.length){var u=l.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=Ve(f,r);if(ne(c))return s;var d=Array.isArray(c)?[Jf(c),Zf(c)]:[c,c],h=u.reduce(function(g,v){var y=Ve(f,v,0),p=d[0]-Math.abs(Array.isArray(y)?y[0]:y),m=d[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(p,g[0]),Math.max(m,g[1])]},[1/0,-1/0]);return[Math.min(h[0],s[0]),Math.max(h[1],s[1])]},[1/0,-1/0])}return null},f7=function(t,n,r,i,a){var o=n.map(function(l){return kA(t,l,r,a,i)}).filter(function(l){return!ne(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},CA=function(t,n,r,i,a){var o=n.map(function(u){var s=u.props.dataKey;return r==="number"&&s&&kA(t,u,s,i)||Xo(t,s,r,a)});if(r==="number")return o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,s){for(var f=0,c=s.length;f<c;f++)l[s[f]]||(l[s[f]]=!0,u.push(s[f]));return u},[])},NA=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},ii=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,s=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(s=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?ft(l[0]-l[1])*2*s:s,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+s,value:c,offset:s}});return f.filter(function(c){return!uu(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+s,value:c,index:d,offset:s}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+s,value:c,offset:s}}):i.domain().map(function(c,d){return{coordinate:i(c)+s,value:a?a[c]:c,index:d,offset:s}})},vh=new WeakMap,Xu=function(t,n){if(typeof n!="function")return t;vh.has(t)||vh.set(t,new WeakMap);var r=vh.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},MA=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Pl(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:yc(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Go(),realScaleType:"point"}:a==="category"?{scale:Pl(),realScaleType:"band"}:{scale:yc(),realScaleType:"linear"};if(mi(i)){var u="scale".concat(Rf(i));return{scale:(zx[u]||Go)(),realScaleType:zx[u]?u:"point"}}return te(i)?{scale:i}:{scale:Go(),realScaleType:"point"}},Xx=1e-4,IA=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-Xx,o=Math.max(i[0],i[1])+Xx,l=t(n[0]),u=t(n[r-1]);(l<a||l>o||u<a||u>o)&&t.domain([n[0],n[r-1]])}},d7=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},h7=function(t,n){if(!n||n.length!==2||!K(n[0])||!K(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!K(t[0])||t[0]<r)&&(a[0]=r),(!K(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},p7=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,l=0;l<n;++l){var u=uu(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=a,t[l][r][1]=a+u,a=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1])}},v7=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var l=uu(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},m7={sign:p7,expand:ED,none:ga,silhouette:$D,wiggle:TD,positive:v7},y7=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=m7[r],o=AD().keys(i).value(function(l,u){return+Ve(l,u,0)}).order(Dp).offset(a);return o(t)},g7=function(t,n,r,i,a,o){if(!t)return null;var l=o?n.reverse():n,u={},s=l.reduce(function(c,d){var h,g=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Me(Me({},d.type.defaultProps),d.props):d.props,v=g.stackId,y=g.hide;if(y)return c;var p=g[r],m=c[p]||{hasStack:!1,stackGroups:{}};if(Ge(v)){var b=m.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(d),m.hasStack=!0,m.stackGroups[v]=b}else m.stackGroups[to("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[d]};return Me(Me({},c),{},ua({},p,m))},u),f={};return Object.keys(s).reduce(function(c,d){var h=s[d];if(h.hasStack){var g={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,y){var p=h.stackGroups[y];return Me(Me({},v),{},ua({},y,{numericAxisId:r,cateAxisId:i,items:p.items,stackedData:y7(t,p.items,a)}))},g)}return Me(Me({},c),{},ua({},d,h))},f)},DA=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,l=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=C9(s,a,l);return t.domain([Jf(f),Zf(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=N9(c,a,l);return{niceTicks:d}}return null};function qx(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ne(i[t.dataKey])){var l=qs(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var u=Ve(i,ne(o)?t.dataKey:o);return ne(u)?null:t.scale(u)}var Yx=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var u=Ve(o,n.dataKey,n.domain[l]);return ne(u)?null:n.scale(u)-a/2+i},b7=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},x7=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Ge(a)){var o=n[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},w7=function(t){return t.reduce(function(n,r){return[Jf(r.concat([n[0]]).filter(K)),Zf(r.concat([n[1]]).filter(K))]},[1/0,-1/0])},RA=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(s,f){var c=w7(f.slice(n,r+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Qx=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zx=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hv=function(t,n,r){if(te(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(K(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Qx.test(t[0])){var a=+Qx.exec(t[0])[1];i[0]=n[0]-a}else te(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(K(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(Zx.test(t[1])){var o=+Zx.exec(t[1])[1];i[1]=n[1]+o}else te(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Oc=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=Py(n,function(c){return c.coordinate}),o=1/0,l=1,u=a.length;l<u;l++){var s=a[l],f=a[l-1];o=Math.min((s.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},Jx=function(t,n,r){return!t||!t.length||hu(t,Mt(r,"type.defaultProps.domain"))?n:t},LA=function(t,n){var r=t.type.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,l=r.formatter,u=r.tooltipType,s=r.chartType,f=r.hide;return Me(Me({},J(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:Qy(t),value:Ve(n,i),type:u,payload:n,chartType:s,hide:f})};function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ew(Object(n),!0).forEach(function(r){BA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BA(e,t,n){return t=_7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _7(e){var t=S7(e,"string");return Nl(t)=="symbol"?t:t+""}function S7(e,t){if(Nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O7(e,t){return $7(e)||E7(e,t)||A7(e,t)||P7()}function P7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
84
|
+
height and width.`,M,$,o,u,f,c,n);var D=!Array.isArray(h)&&Hn(h.type).endsWith("Chart");return k.Children.map(h,function(N){return k.isValidElement(N)?T.cloneElement(N,Uu({width:M,height:$},D?{style:Uu({height:"100%",width:"100%",maxHeight:$,maxWidth:M},N.props.style)}:{})):N})},[n,h,u,d,c,f,E,o]);return k.createElement("div",{id:y?"".concat(y):void 0,className:ie("recharts-responsive-container",p),style:Uu(Uu({},w),{},{width:o,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:x},C)}),Hf=function(t){return null};Hf.displayName="Cell";function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function Hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hb(Object(n),!0).forEach(function(r){_8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _8(e,t,n){return t=S8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S8(e){var t=O8(e,"string");return Sl(t)=="symbol"?t:t+""}function O8(e,t){if(Sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ci={widthCache:{},cacheCount:0},P8=2e3,A8={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Vb="recharts_measurement_span";function E8(e){var t=Yp({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Ko=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ai.isSsr)return{width:0,height:0};var r=E8(n),i=JSON.stringify({text:t,copyStyle:r});if(Ci.widthCache[i])return Ci.widthCache[i];try{var a=document.getElementById(Vb);a||(a=document.createElement("span"),a.setAttribute("id",Vb),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Yp(Yp({},A8),r);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Ci.widthCache[i]=u,++Ci.cacheCount>P8&&(Ci.cacheCount=0,Ci.widthCache={}),u}catch{return{width:0,height:0}}},$8=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ol(e){"@babel/helpers - typeof";return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(e)}function sc(e,t){return C8(e)||k8(e,t)||j8(e,t)||T8()}function T8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
85
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j8(e,t){if(e){if(typeof e=="string")return Kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kb(e,t)}}function Kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k8(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function C8(e){if(Array.isArray(e))return e}function N8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I8(r.key),r)}}function M8(e,t,n){return t&&Gb(e.prototype,t),n&&Gb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I8(e){var t=D8(e,"string");return Ol(t)=="symbol"?t:t+""}function D8(e,t){if(Ol(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,R8=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,L8=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$P={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},B8=Object.keys($P),Xi="NaN";function z8(e,t){return e*$P[t]}var Wu=function(){function e(t,n){N8(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!R8.test(n)&&(this.num=NaN,this.unit=""),B8.includes(n)&&(this.num=z8(t,n),this.unit="px")}return M8(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=L8.exec(n))!==null&&r!==void 0?r:[],a=sc(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])}();function TP(e){if(e.includes(Xi))return Xi;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=Xb.exec(t))!==null&&n!==void 0?n:[],i=sc(r,4),a=i[1],o=i[2],l=i[3],u=Wu.parse(a??""),s=Wu.parse(l??""),f=o==="*"?u.multiply(s):u.divide(s);if(f.isNaN())return Xi;t=t.replace(Xb,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,d=(c=qb.exec(t))!==null&&c!==void 0?c:[],h=sc(d,4),g=h[1],v=h[2],y=h[3],p=Wu.parse(g??""),m=Wu.parse(y??""),b=v==="+"?p.add(m):p.subtract(m);if(b.isNaN())return Xi;t=t.replace(qb,b.toString())}return t}var Yb=/\(([^()]*)\)/;function F8(e){for(var t=e;t.includes("(");){var n=Yb.exec(t),r=sc(n,2),i=r[1];t=t.replace(Yb,TP(i))}return t}function U8(e){var t=e.replace(/\s+/g,"");return t=F8(t),t=TP(t),t}function W8(e){try{return U8(e)}catch{return Xi}}function oh(e){var t=W8(e.slice(5,-1));return t===Xi?"":t}var H8=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],V8=["dx","dy","angle","className","breakAll"];function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qp.apply(this,arguments)}function Qb(e,t){if(e==null)return{};var n=K8(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K8(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zb(e,t){return Y8(e)||q8(e,t)||X8(e,t)||G8()}function G8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
86
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X8(e,t){if(e){if(typeof e=="string")return Jb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jb(e,t)}}function Jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q8(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function Y8(e){if(Array.isArray(e))return e}var jP=/[ \f\n\r\t\v\u2028\u2029]+/,kP=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];ne(n)||(r?a=n.toString().split(""):a=n.toString().split(jP));var o=a.map(function(u){return{word:u,width:Ko(u,i).width}}),l=r?0:Ko(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},Q8=function(t,n,r,i,a){var o=t.maxLines,l=t.children,u=t.style,s=t.breakAll,f=K(o),c=l,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function($,D){var N=D.word,R=D.width,L=$[$.length-1];if(L&&(i==null||a||L.width+R+r<Number(i)))L.words.push(N),L.width+=R+r;else{var W={words:[N],width:R};$.push(W)}return $},[])},h=d(n),g=function(M){return M.reduce(function($,D){return $.width>D.width?$:D})};if(!f)return h;for(var v="…",y=function(M){var $=c.slice(0,M),D=kP({breakAll:s,style:u,children:$+v}).wordsWithComputedWidth,N=d(D),R=N.length>o||g(N).width>Number(i);return[R,N]},p=0,m=c.length-1,b=0,w;p<=m&&b<=c.length-1;){var x=Math.floor((p+m)/2),_=x-1,S=y(_),O=Zb(S,2),E=O[0],j=O[1],I=y(x),C=Zb(I,1),B=C[0];if(!E&&!B&&(p=x+1),E&&B&&(m=x-1),!E&&B){w=j;break}b++}return w||h},ex=function(t){var n=ne(t)?[]:t.toString().split(jP);return[{words:n}]},Z8=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Ai.isSsr){var u,s,f=kP({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return ex(i);return Q8({breakAll:o,children:i,maxLines:l,style:a},u,s,n,r)}return ex(i)},tx="#808080",gi=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,g=t.verticalAnchor,v=g===void 0?"end":g,y=t.fill,p=y===void 0?tx:y,m=Qb(t,H8),b=T.useMemo(function(){return Z8({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),w=m.dx,x=m.dy,_=m.angle,S=m.className,O=m.breakAll,E=Qb(m,V8);if(!Ge(r)||!Ge(a))return null;var j=r+(K(w)?w:0),I=a+(K(x)?x:0),C;switch(v){case"start":C=oh("calc(".concat(s,")"));break;case"middle":C=oh("calc(".concat((b.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:C=oh("calc(".concat(b.length-1," * -").concat(l,")"));break}var B=[];if(c){var A=b[0].width,M=m.width;B.push("scale(".concat((K(M)?M/A:1)/A,")"))}return _&&B.push("rotate(".concat(_,", ").concat(j,", ").concat(I,")")),B.length&&(E.transform=B.join(" ")),k.createElement("text",Qp({},J(E,!0),{x:j,y:I,className:ie("recharts-text",S),textAnchor:h,fill:p.includes("url")?tx:p}),b.map(function($,D){var N=$.words.join(O?"":" ");return k.createElement("tspan",{x:j,dy:D===0?C:l,key:"".concat(N,"-").concat(D)},N)}))};function $r(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function J8(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ey(e){let t,n,r;e.length!==2?(t=$r,n=(l,u)=>$r(e(l),u),r=(l,u)=>e(l)-u):(t=e===$r||e===J8?e:e6,n=e,r=e);function i(l,u,s=0,f=l.length){if(s<f){if(t(u,u)!==0)return f;do{const c=s+f>>>1;n(l[c],u)<0?s=c+1:f=c}while(s<f)}return s}function a(l,u,s=0,f=l.length){if(s<f){if(t(u,u)!==0)return f;do{const c=s+f>>>1;n(l[c],u)<=0?s=c+1:f=c}while(s<f)}return s}function o(l,u,s=0,f=l.length){const c=i(l,u,s,f-1);return c>s&&r(l[c-1],u)>-r(l[c],u)?c-1:c}return{left:i,center:o,right:a}}function e6(){return 0}function CP(e){return e===null?NaN:+e}function*t6(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const n6=Ey($r),su=n6.right;Ey(CP).center;class nx extends Map{constructor(t,n=a6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(rx(this,t))}has(t){return super.has(rx(this,t))}set(t,n){return super.set(r6(this,t),n)}delete(t){return super.delete(i6(this,t))}}function rx({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function r6({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function i6({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function a6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function o6(e=$r){if(e===$r)return NP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function NP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const l6=Math.sqrt(50),u6=Math.sqrt(10),s6=Math.sqrt(2);function cc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=l6?10:a>=u6?5:a>=s6?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(e*s),u=Math.round(t*s),l/s<e&&++l,u/s>t&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(e/s),u=Math.round(t/s),l*s<e&&++l,u*s>t&&--u),u<l&&.5<=n&&n<2?cc(e,t,n*2):[l,u,s]}function Zp(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?cc(t,e,n):cc(e,t,n);if(!(a>=i))return[];const l=a-i+1,u=new Array(l);if(r)if(o<0)for(let s=0;s<l;++s)u[s]=(a-s)/-o;else for(let s=0;s<l;++s)u[s]=(a-s)*o;else if(o<0)for(let s=0;s<l;++s)u[s]=(i+s)/-o;else for(let s=0;s<l;++s)u[s]=(i+s)*o;return u}function Jp(e,t,n){return t=+t,e=+e,n=+n,cc(e,t,n)[2]}function ev(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Jp(t,e,n):Jp(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ix(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function ax(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function MP(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?NP:o6(i);r>n;){if(r-n>600){const u=r-n+1,s=t-n+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),h=Math.max(n,Math.floor(t-s*c/u+d)),g=Math.min(r,Math.floor(t+(u-s)*c/u+d));MP(e,t,h,g,i)}const a=e[t];let o=n,l=r;for(bo(e,n,t),i(e[r],a)>0&&bo(e,n,r);o<l;){for(bo(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?bo(e,n,l):(++l,bo(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function bo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function c6(e,t,n){if(e=Float64Array.from(t6(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ax(e);if(t>=1)return ix(e);var r,i=(r-1)*t,a=Math.floor(i),o=ix(MP(e,a).subarray(0,a+1)),l=ax(e.subarray(a+1));return o+(l-o)*(i-a)}}function f6(e,t,n=CP){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function d6(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Jt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ar(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const tv=Symbol("implicit");function $y(){var e=new nx,t=[],n=[],r=tv;function i(a){let o=e.get(a);if(o===void 0){if(r!==tv)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new nx;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return $y(t,n).unknown(r)},Jt.apply(i,arguments),i}function Pl(){var e=$y().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,u=0,s=0,f=.5;delete e.unknown;function c(){var d=t().length,h=i<r,g=h?i:r,v=h?r:i;a=(v-g)/Math.max(1,d-u+s*2),l&&(a=Math.floor(a)),g+=(v-g-a*(d-u))*f,o=a*(1-u),l&&(g=Math.round(g),o=Math.round(o));var y=d6(d).map(function(p){return g+a*p});return n(h?y.reverse():y)}return e.domain=function(d){return arguments.length?(t(d),c()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,c()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,l=!0,c()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(l=!!d,c()):l},e.padding=function(d){return arguments.length?(u=Math.min(1,s=+d),c()):u},e.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),c()):u},e.paddingOuter=function(d){return arguments.length?(s=+d,c()):s},e.align=function(d){return arguments.length?(f=Math.max(0,Math.min(1,d)),c()):f},e.copy=function(){return Pl(t(),[r,i]).round(l).paddingInner(u).paddingOuter(s).align(f)},Jt.apply(c(),arguments)}function IP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return IP(t())},e}function Go(){return IP(Pl.apply(null,arguments).paddingInner(1))}function Ty(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function DP(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cu(){}var Al=.7,fc=1/Al,la="\\s*([+-]?\\d+)\\s*",El="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h6=/^#([0-9a-f]{3,8})$/,p6=new RegExp(`^rgb\\(${la},${la},${la}\\)$`),v6=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),m6=new RegExp(`^rgba\\(${la},${la},${la},${El}\\)$`),y6=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${El}\\)$`),g6=new RegExp(`^hsl\\(${El},${Pn},${Pn}\\)$`),b6=new RegExp(`^hsla\\(${El},${Pn},${Pn},${El}\\)$`),ox={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ty(cu,bi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lx,formatHex:lx,formatHex8:x6,formatHsl:w6,formatRgb:ux,toString:ux});function lx(){return this.rgb().formatHex()}function x6(){return this.rgb().formatHex8()}function w6(){return RP(this).formatHsl()}function ux(){return this.rgb().formatRgb()}function bi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=h6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sx(t):n===3?new wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Hu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=p6.exec(e))?new wt(t[1],t[2],t[3],1):(t=v6.exec(e))?new wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=m6.exec(e))?Hu(t[1],t[2],t[3],t[4]):(t=y6.exec(e))?Hu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=g6.exec(e))?dx(t[1],t[2]/100,t[3]/100,1):(t=b6.exec(e))?dx(t[1],t[2]/100,t[3]/100,t[4]):ox.hasOwnProperty(e)?sx(ox[e]):e==="transparent"?new wt(NaN,NaN,NaN,0):null}function sx(e){return new wt(e>>16&255,e>>8&255,e&255,1)}function Hu(e,t,n,r){return r<=0&&(e=t=n=NaN),new wt(e,t,n,r)}function _6(e){return e instanceof cu||(e=bi(e)),e?(e=e.rgb(),new wt(e.r,e.g,e.b,e.opacity)):new wt}function nv(e,t,n,r){return arguments.length===1?_6(e):new wt(e,t,n,r??1)}function wt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ty(wt,nv,DP(cu,{brighter(e){return e=e==null?fc:Math.pow(fc,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Al:Math.pow(Al,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wt(ui(this.r),ui(this.g),ui(this.b),dc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cx,formatHex:cx,formatHex8:S6,formatRgb:fx,toString:fx}));function cx(){return`#${ni(this.r)}${ni(this.g)}${ni(this.b)}`}function S6(){return`#${ni(this.r)}${ni(this.g)}${ni(this.b)}${ni((isNaN(this.opacity)?1:this.opacity)*255)}`}function fx(){const e=dc(this.opacity);return`${e===1?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${e===1?")":`, ${e})`}`}function dc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ui(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ni(e){return e=ui(e),(e<16?"0":"")+e.toString(16)}function dx(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cn(e,t,n,r)}function RP(e){if(e instanceof cn)return new cn(e.h,e.s,e.l,e.opacity);if(e instanceof cu||(e=bi(e)),!e)return new cn;if(e instanceof cn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new cn(o,l,u,e.opacity)}function O6(e,t,n,r){return arguments.length===1?RP(e):new cn(e,t,n,r??1)}function cn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ty(cn,O6,DP(cu,{brighter(e){return e=e==null?fc:Math.pow(fc,e),new cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Al:Math.pow(Al,e),new cn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wt(lh(e>=240?e-240:e+120,i,r),lh(e,i,r),lh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new cn(hx(this.h),Vu(this.s),Vu(this.l),dc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=dc(this.opacity);return`${e===1?"hsl(":"hsla("}${hx(this.h)}, ${Vu(this.s)*100}%, ${Vu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hx(e){return e=(e||0)%360,e<0?e+360:e}function Vu(e){return Math.max(0,Math.min(1,e||0))}function lh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jy=e=>()=>e;function P6(e,t){return function(n){return e+n*t}}function A6(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function E6(e){return(e=+e)==1?LP:function(t,n){return n-t?A6(t,n,e):jy(isNaN(t)?n:t)}}function LP(e,t){var n=t-e;return n?P6(e,n):jy(isNaN(e)?t:e)}const hc=function e(t){var n=E6(t);function r(i,a){var o=n((i=nv(i)).r,(a=nv(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),s=LP(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=s(f),i+""}}return r.gamma=e,r}(1);function $6(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T6(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function j6(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ao(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function k6(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function C6(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ao(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var rv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uh=new RegExp(rv.source,"g");function N6(e){return function(){return e}}function M6(e){return function(t){return e(t)+""}}function BP(e,t){var n=rv.lastIndex=uh.lastIndex=0,r,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(r=rv.exec(e))&&(i=uh.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:sn(r,i)})),n=uh.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?M6(u[0].x):N6(t):(t=u.length,function(s){for(var f=0,c;f<t;++f)l[(c=u[f]).i]=c.x(s);return l.join("")})}function ao(e,t){var n=typeof t,r;return t==null||n==="boolean"?jy(t):(n==="number"?sn:n==="string"?(r=bi(t))?(t=r,hc):BP:t instanceof bi?hc:t instanceof Date?k6:T6(t)?$6:Array.isArray(t)?j6:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C6:sn)(e,t)}function ky(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var px=180/Math.PI,iv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zP(e,t,n,r,i,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*px,skewX:Math.atan(u)*px,scaleX:o,scaleY:l}}var Ku;function I6(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?iv:zP(t.a,t.b,t.c,t.d,t.e,t.f)}function D6(e){return e==null||(Ku||(Ku=document.createElementNS("http://www.w3.org/2000/svg","g")),Ku.setAttribute("transform",e),!(e=Ku.transform.baseVal.consolidate()))?iv:(e=e.matrix,zP(e.a,e.b,e.c,e.d,e.e,e.f))}function FP(e,t,n,r){function i(s){return s.length?s.pop()+" ":""}function a(s,f,c,d,h,g){if(s!==c||f!==d){var v=h.push("translate(",null,t,null,n);g.push({i:v-4,x:sn(s,c)},{i:v-2,x:sn(f,d)})}else(c||d)&&h.push("translate("+c+t+d+n)}function o(s,f,c,d){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),d.push({i:c.push(i(c)+"rotate(",null,r)-2,x:sn(s,f)})):f&&c.push(i(c)+"rotate("+f+r)}function l(s,f,c,d){s!==f?d.push({i:c.push(i(c)+"skewX(",null,r)-2,x:sn(s,f)}):f&&c.push(i(c)+"skewX("+f+r)}function u(s,f,c,d,h,g){if(s!==c||f!==d){var v=h.push(i(h)+"scale(",null,",",null,")");g.push({i:v-4,x:sn(s,c)},{i:v-2,x:sn(f,d)})}else(c!==1||d!==1)&&h.push(i(h)+"scale("+c+","+d+")")}return function(s,f){var c=[],d=[];return s=e(s),f=e(f),a(s.translateX,s.translateY,f.translateX,f.translateY,c,d),o(s.rotate,f.rotate,c,d),l(s.skewX,f.skewX,c,d),u(s.scaleX,s.scaleY,f.scaleX,f.scaleY,c,d),s=f=null,function(h){for(var g=-1,v=d.length,y;++g<v;)c[(y=d[g]).i]=y.x(h);return c.join("")}}}var R6=FP(I6,"px, ","px)","deg)"),L6=FP(D6,", ",")",")"),B6=1e-12;function vx(e){return((e=Math.exp(e))+1/e)/2}function z6(e){return((e=Math.exp(e))-1/e)/2}function F6(e){return((e=Math.exp(2*e))-1)/(e+1)}const U6=function e(t,n,r){function i(a,o){var l=a[0],u=a[1],s=a[2],f=o[0],c=o[1],d=o[2],h=f-l,g=c-u,v=h*h+g*g,y,p;if(v<B6)p=Math.log(d/s)/t,y=function(S){return[l+S*h,u+S*g,s*Math.exp(t*S*p)]};else{var m=Math.sqrt(v),b=(d*d-s*s+r*v)/(2*s*n*m),w=(d*d-s*s-r*v)/(2*d*n*m),x=Math.log(Math.sqrt(b*b+1)-b),_=Math.log(Math.sqrt(w*w+1)-w);p=(_-x)/t,y=function(S){var O=S*p,E=vx(x),j=s/(n*m)*(E*F6(t*O+x)-z6(x));return[l+j*h,u+j*g,s*E/vx(t*O+x)]}}return y.duration=p*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,u=l*l;return e(o,l,u)},i}(Math.SQRT2,2,4);function W6(e,t){t===void 0&&(t=e,e=ao);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}function H6(e){return function(){return e}}function pc(e){return+e}var mx=[0,1];function ht(e){return e}function av(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:H6(isNaN(t)?NaN:.5)}function V6(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function K6(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=av(i,r),a=n(o,a)):(r=av(r,i),a=n(a,o)),function(l){return a(r(l))}}function G6(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=av(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var u=su(e,l,1,r)-1;return a[u](i[u](l))}}function fu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vf(){var e=mx,t=mx,n=ao,r,i,a,o=ht,l,u,s;function f(){var d=Math.min(e.length,t.length);return o!==ht&&(o=V6(e[0],e[d-1])),l=d>2?G6:K6,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=l(e.map(r),t,n)))(r(o(d)))}return c.invert=function(d){return o(i((s||(s=l(t,e.map(r),sn)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,pc),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),n=ky,f()},c.clamp=function(d){return arguments.length?(o=d?!0:ht,f()):o!==ht},c.interpolate=function(d){return arguments.length?(n=d,f()):n},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,h){return r=d,i=h,f()}}function Cy(){return Vf()(ht,ht)}function X6(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vc(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Sa(e){return e=vc(Math.abs(e)),e?e[1]:NaN}function q6(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(n.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Y6(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Q6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $l(e){if(!(t=Q6.exec(e)))throw new Error("invalid format: "+e);var t;return new Ny({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$l.prototype=Ny.prototype;function Ny(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ny.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Z6(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var mc;function J6(e,t){var n=vc(e,t);if(!n)return mc=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(mc=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+vc(e,Math.max(0,t+a-1))[0]}function yx(e,t){var n=vc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:X6,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>yx(e*100,t),r:yx,s:J6,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bx(e){return e}var xx=Array.prototype.map,wx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eU(e){var t=e.grouping===void 0||e.thousands===void 0?bx:q6(xx.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?bx:Y6(xx.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c,d){c=$l(c);var h=c.fill,g=c.align,v=c.sign,y=c.symbol,p=c.zero,m=c.width,b=c.comma,w=c.precision,x=c.trim,_=c.type;_==="n"?(b=!0,_="g"):gx[_]||(w===void 0&&(w=12),x=!0,_="g"),(p||h==="0"&&g==="=")&&(p=!0,h="0",g="=");var S=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),O=(y==="$"?r:/[%p]/.test(_)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),E=gx[_],j=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function I(C){var B=S,A=O,M,$,D;if(_==="c")A=E(C)+A,C="";else{C=+C;var N=C<0||1/C<0;if(C=isNaN(C)?u:E(Math.abs(C),w),x&&(C=Z6(C)),N&&+C==0&&v!=="+"&&(N=!1),B=(N?v==="("?v:l:v==="-"||v==="("?"":v)+B,A=(_==="s"&&!isNaN(C)&&mc!==void 0?wx[8+mc/3]:"")+A+(N&&v==="("?")":""),j){for(M=-1,$=C.length;++M<$;)if(D=C.charCodeAt(M),48>D||D>57){A=(D===46?i+C.slice(M+1):C.slice(M))+A,C=C.slice(0,M);break}}}b&&!p&&(C=t(C,1/0));var R=B.length+C.length+A.length,L=R<m?new Array(m-R+1).join(h):"";switch(b&&p&&(C=t(L+C,L.length?m-A.length:1/0),L=""),g){case"<":C=B+C+A+L;break;case"=":C=B+L+C+A;break;case"^":C=L.slice(0,R=L.length>>1)+B+C+A+L.slice(R);break;default:C=L+B+C+A;break}return a(C)}return I.toString=function(){return c+""},I}function f(c,d){var h=Math.max(-8,Math.min(8,Math.floor(Sa(d)/3)))*3,g=Math.pow(10,-h),v=s((c=$l(c),c.type="f",c),{suffix:wx[8+h/3]});return function(y){return v(g*y)}}return{format:s,formatPrefix:f}}var Gu,My,UP;tU({thousands:",",grouping:[3],currency:["$",""]});function tU(e){return Gu=eU(e),My=Gu.format,UP=Gu.formatPrefix,Gu}function nU(e){return Math.max(0,-Sa(Math.abs(e)))}function rU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sa(t)/3)))*3-Sa(Math.abs(e)))}function iU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sa(t)-Sa(e))+1}function WP(e,t,n,r){var i=ev(e,t,n),a;switch(r=$l(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=rU(i,o))&&(r.precision=a),UP(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=iU(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=nU(i))&&(r.precision=a-(r.type==="%")*2);break}}return My(r)}function Lr(e){var t=e.domain;return e.ticks=function(n){var r=t();return Zp(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return WP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],u,s,f=10;for(l<o&&(s=o,o=l,l=s,s=i,i=a,a=s);f-- >0;){if(s=Jp(o,l,n),s===u)return r[i]=o,r[a]=l,t(r);if(s>0)o=Math.floor(o/s)*s,l=Math.ceil(l/s)*s;else if(s<0)o=Math.ceil(o*s)/s,l=Math.floor(l*s)/s;else break;u=s}return e},e}function yc(){var e=Cy();return e.copy=function(){return fu(e,yc())},Jt.apply(e,arguments),Lr(e)}function HP(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,pc),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return HP(e).unknown(t)},e=arguments.length?Array.from(e,pc):[0,1],Lr(n)}function VP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function _x(e){return Math.log(e)}function Sx(e){return Math.exp(e)}function aU(e){return-Math.log(-e)}function oU(e){return-Math.exp(-e)}function lU(e){return isFinite(e)?+("1e"+e):e<0?0:e}function uU(e){return e===10?lU:e===Math.E?Math.exp:t=>Math.pow(e,t)}function sU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Ox(e){return(t,n)=>-e(-t,n)}function Iy(e){const t=e(_x,Sx),n=t.domain;let r=10,i,a;function o(){return i=sU(r),a=uU(r),n()[0]<0?(i=Ox(i),a=Ox(a),e(aU,oU)):e(_x,Sx),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const u=n();let s=u[0],f=u[u.length-1];const c=f<s;c&&([s,f]=[f,s]);let d=i(s),h=i(f),g,v;const y=l==null?10:+l;let p=[];if(!(r%1)&&h-d<y){if(d=Math.floor(d),h=Math.ceil(h),s>0){for(;d<=h;++d)for(g=1;g<r;++g)if(v=d<0?g/a(-d):g*a(d),!(v<s)){if(v>f)break;p.push(v)}}else for(;d<=h;++d)for(g=r-1;g>=1;--g)if(v=d>0?g/a(-d):g*a(d),!(v<s)){if(v>f)break;p.push(v)}p.length*2<y&&(p=Zp(s,f,y))}else p=Zp(d,h,Math.min(h-d,y)).map(a);return c?p.reverse():p},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=$l(u)).precision==null&&(u.trim=!0),u=My(u)),l===1/0)return u;const s=Math.max(1,r*l/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*r<r-.5&&(c*=r),c<=s?u(f):""}},t.nice=()=>n(VP(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function KP(){const e=Iy(Vf()).domain([1,10]);return e.copy=()=>fu(e,KP()).base(e.base()),Jt.apply(e,arguments),e}function Px(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ax(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Dy(e){var t=1,n=e(Px(t),Ax(t));return n.constant=function(r){return arguments.length?e(Px(t=+r),Ax(t)):t},Lr(n)}function GP(){var e=Dy(Vf());return e.copy=function(){return fu(e,GP()).constant(e.constant())},Jt.apply(e,arguments)}function Ex(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fU(e){return e<0?-e*e:e*e}function Ry(e){var t=e(ht,ht),n=1;function r(){return n===1?e(ht,ht):n===.5?e(cU,fU):e(Ex(n),Ex(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Lr(t)}function Ly(){var e=Ry(Vf());return e.copy=function(){return fu(e,Ly()).exponent(e.exponent())},Jt.apply(e,arguments),e}function dU(){return Ly.apply(null,arguments).exponent(.5)}function $x(e){return Math.sign(e)*e*e}function hU(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XP(){var e=Cy(),t=[0,1],n=!1,r;function i(a){var o=hU(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert($x(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,pc)).map($x)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return XP(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Jt.apply(i,arguments),Lr(i)}function qP(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=f6(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[su(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort($r),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return qP().domain(e).range(t).unknown(r)},Jt.apply(a,arguments)}function YP(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[su(r,u,0,n)]:a}function l(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,l()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,l()):i.slice()},o.invertExtent=function(u){var s=i.indexOf(u);return s<0?[NaN,NaN]:s<1?[e,r[0]]:s>=n?[r[n-1],t]:[r[s-1],r[s]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return YP().domain([e,t]).range(i).unknown(a)},Jt.apply(Lr(o),arguments)}function QP(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[su(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return QP().domain(e).range(t).unknown(n)},Jt.apply(i,arguments)}const sh=new Date,ch=new Date;function Xe(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let s;do u.push(s=new Date(+a)),t(a,l),e(a);while(s<a&&a<o);return u},i.filter=a=>Xe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(sh.setTime(+a),ch.setTime(+o),e(sh),e(ch),Math.floor(n(sh,ch))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const gc=Xe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gc);gc.range;const zn=1e3,Gt=zn*60,Fn=Gt*60,Zn=Fn*24,By=Zn*7,Tx=Zn*30,fh=Zn*365,ri=Xe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zn)},(e,t)=>(t-e)/zn,e=>e.getUTCSeconds());ri.range;const zy=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zn)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getMinutes());zy.range;const Fy=Xe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getUTCMinutes());Fy.range;const Uy=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zn-e.getMinutes()*Gt)},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getHours());Uy.range;const Wy=Xe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getUTCHours());Wy.range;const du=Xe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gt)/Zn,e=>e.getDate()-1);du.range;const Kf=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>e.getUTCDate()-1);Kf.range;const ZP=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>Math.floor(e/Zn));ZP.range;function Ei(e){return Xe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Gt)/By)}const Gf=Ei(0),bc=Ei(1),pU=Ei(2),vU=Ei(3),Oa=Ei(4),mU=Ei(5),yU=Ei(6);Gf.range;bc.range;pU.range;vU.range;Oa.range;mU.range;yU.range;function $i(e){return Xe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/By)}const Xf=$i(0),xc=$i(1),gU=$i(2),bU=$i(3),Pa=$i(4),xU=$i(5),wU=$i(6);Xf.range;xc.range;gU.range;bU.range;Pa.range;xU.range;wU.range;const Hy=Xe(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hy.range;const Vy=Xe(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vy.range;const Jn=Xe(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Jn.range;const er=Xe(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());er.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});er.range;function JP(e,t,n,r,i,a){const o=[[ri,1,zn],[ri,5,5*zn],[ri,15,15*zn],[ri,30,30*zn],[a,1,Gt],[a,5,5*Gt],[a,15,15*Gt],[a,30,30*Gt],[i,1,Fn],[i,3,3*Fn],[i,6,6*Fn],[i,12,12*Fn],[r,1,Zn],[r,2,2*Zn],[n,1,By],[t,1,Tx],[t,3,3*Tx],[e,1,fh]];function l(s,f,c){const d=f<s;d&&([s,f]=[f,s]);const h=c&&typeof c.range=="function"?c:u(s,f,c),g=h?h.range(s,+f+1):[];return d?g.reverse():g}function u(s,f,c){const d=Math.abs(f-s)/c,h=Ey(([,,y])=>y).right(o,d);if(h===o.length)return e.every(ev(s/fh,f/fh,c));if(h===0)return gc.every(Math.max(ev(s,f,c),1));const[g,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return g.every(v)}return[l,u]}const[_U,SU]=JP(er,Vy,Xf,ZP,Wy,Fy),[OU,PU]=JP(Jn,Hy,Gf,du,Uy,zy);function dh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hh(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function AU(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,s=wo(i),f=_o(i),c=wo(a),d=_o(a),h=wo(o),g=_o(o),v=wo(l),y=_o(l),p=wo(u),m=_o(u),b={a:D,A:N,b:R,B:L,c:null,d:Ix,e:Ix,f:qU,g:aW,G:lW,H:KU,I:GU,j:XU,L:eA,m:YU,M:QU,p:W,q:U,Q:Lx,s:Bx,S:ZU,u:JU,U:eW,V:tW,w:nW,W:rW,x:null,X:null,y:iW,Y:oW,Z:uW,"%":Rx},w={a:X,A:Z,b:ae,B:F,c:null,d:Dx,e:Dx,f:dW,g:_W,G:OW,H:sW,I:cW,j:fW,L:nA,m:hW,M:pW,p:Q,q:ce,Q:Lx,s:Bx,S:vW,u:mW,U:yW,V:gW,w:bW,W:xW,x:null,X:null,y:wW,Y:SW,Z:PW,"%":Rx},x={a:j,A:I,b:C,B,c:A,d:Nx,e:Nx,f:UU,g:Cx,G:kx,H:Mx,I:Mx,j:LU,L:FU,m:RU,M:BU,p:E,q:DU,Q:HU,s:VU,S:zU,u:kU,U:CU,V:NU,w:jU,W:MU,x:M,X:$,y:Cx,Y:kx,Z:IU,"%":WU};b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),w.x=_(n,w),w.X=_(r,w),w.c=_(t,w);function _(G,re){return function(oe){var H=[],Ce=-1,ue=0,ze=G.length,Fe,gt,lr;for(oe instanceof Date||(oe=new Date(+oe));++Ce<ze;)G.charCodeAt(Ce)===37&&(H.push(G.slice(ue,Ce)),(gt=jx[Fe=G.charAt(++Ce)])!=null?Fe=G.charAt(++Ce):gt=Fe==="e"?" ":"0",(lr=re[Fe])&&(Fe=lr(oe,gt)),H.push(Fe),ue=Ce+1);return H.push(G.slice(ue,Ce)),H.join("")}}function S(G,re){return function(oe){var H=xo(1900,void 0,1),Ce=O(H,G,oe+="",0),ue,ze;if(Ce!=oe.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(re&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(ue=hh(xo(H.y,0,1)),ze=ue.getUTCDay(),ue=ze>4||ze===0?xc.ceil(ue):xc(ue),ue=Kf.offset(ue,(H.V-1)*7),H.y=ue.getUTCFullYear(),H.m=ue.getUTCMonth(),H.d=ue.getUTCDate()+(H.w+6)%7):(ue=dh(xo(H.y,0,1)),ze=ue.getDay(),ue=ze>4||ze===0?bc.ceil(ue):bc(ue),ue=du.offset(ue,(H.V-1)*7),H.y=ue.getFullYear(),H.m=ue.getMonth(),H.d=ue.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ze="Z"in H?hh(xo(H.y,0,1)).getUTCDay():dh(xo(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ze+5)%7:H.w+H.U*7-(ze+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,hh(H)):dh(H)}}function O(G,re,oe,H){for(var Ce=0,ue=re.length,ze=oe.length,Fe,gt;Ce<ue;){if(H>=ze)return-1;if(Fe=re.charCodeAt(Ce++),Fe===37){if(Fe=re.charAt(Ce++),gt=x[Fe in jx?re.charAt(Ce++):Fe],!gt||(H=gt(G,oe,H))<0)return-1}else if(Fe!=oe.charCodeAt(H++))return-1}return H}function E(G,re,oe){var H=s.exec(re.slice(oe));return H?(G.p=f.get(H[0].toLowerCase()),oe+H[0].length):-1}function j(G,re,oe){var H=h.exec(re.slice(oe));return H?(G.w=g.get(H[0].toLowerCase()),oe+H[0].length):-1}function I(G,re,oe){var H=c.exec(re.slice(oe));return H?(G.w=d.get(H[0].toLowerCase()),oe+H[0].length):-1}function C(G,re,oe){var H=p.exec(re.slice(oe));return H?(G.m=m.get(H[0].toLowerCase()),oe+H[0].length):-1}function B(G,re,oe){var H=v.exec(re.slice(oe));return H?(G.m=y.get(H[0].toLowerCase()),oe+H[0].length):-1}function A(G,re,oe){return O(G,t,re,oe)}function M(G,re,oe){return O(G,n,re,oe)}function $(G,re,oe){return O(G,r,re,oe)}function D(G){return o[G.getDay()]}function N(G){return a[G.getDay()]}function R(G){return u[G.getMonth()]}function L(G){return l[G.getMonth()]}function W(G){return i[+(G.getHours()>=12)]}function U(G){return 1+~~(G.getMonth()/3)}function X(G){return o[G.getUTCDay()]}function Z(G){return a[G.getUTCDay()]}function ae(G){return u[G.getUTCMonth()]}function F(G){return l[G.getUTCMonth()]}function Q(G){return i[+(G.getUTCHours()>=12)]}function ce(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var re=_(G+="",b);return re.toString=function(){return G},re},parse:function(G){var re=S(G+="",!1);return re.toString=function(){return G},re},utcFormat:function(G){var re=_(G+="",w);return re.toString=function(){return G},re},utcParse:function(G){var re=S(G+="",!0);return re.toString=function(){return G},re}}}var jx={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,EU=/^%/,$U=/[\\^$*+?|[\]().{}]/g;function de(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function TU(e){return e.replace($U,"\\$&")}function wo(e){return new RegExp("^(?:"+e.map(TU).join("|")+")","i")}function _o(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function jU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function CU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function NU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function MU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kx(e,t,n){var r=Je.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Cx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function IU(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function DU(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function RU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Nx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function LU(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Mx(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function zU(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function FU(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function UU(e,t,n){var r=Je.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function WU(e,t,n){var r=EU.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function HU(e,t,n){var r=Je.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function VU(e,t,n){var r=Je.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ix(e,t){return de(e.getDate(),t,2)}function KU(e,t){return de(e.getHours(),t,2)}function GU(e,t){return de(e.getHours()%12||12,t,2)}function XU(e,t){return de(1+du.count(Jn(e),e),t,3)}function eA(e,t){return de(e.getMilliseconds(),t,3)}function qU(e,t){return eA(e,t)+"000"}function YU(e,t){return de(e.getMonth()+1,t,2)}function QU(e,t){return de(e.getMinutes(),t,2)}function ZU(e,t){return de(e.getSeconds(),t,2)}function JU(e){var t=e.getDay();return t===0?7:t}function eW(e,t){return de(Gf.count(Jn(e)-1,e),t,2)}function tA(e){var t=e.getDay();return t>=4||t===0?Oa(e):Oa.ceil(e)}function tW(e,t){return e=tA(e),de(Oa.count(Jn(e),e)+(Jn(e).getDay()===4),t,2)}function nW(e){return e.getDay()}function rW(e,t){return de(bc.count(Jn(e)-1,e),t,2)}function iW(e,t){return de(e.getFullYear()%100,t,2)}function aW(e,t){return e=tA(e),de(e.getFullYear()%100,t,2)}function oW(e,t){return de(e.getFullYear()%1e4,t,4)}function lW(e,t){var n=e.getDay();return e=n>=4||n===0?Oa(e):Oa.ceil(e),de(e.getFullYear()%1e4,t,4)}function uW(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+de(t/60|0,"0",2)+de(t%60,"0",2)}function Dx(e,t){return de(e.getUTCDate(),t,2)}function sW(e,t){return de(e.getUTCHours(),t,2)}function cW(e,t){return de(e.getUTCHours()%12||12,t,2)}function fW(e,t){return de(1+Kf.count(er(e),e),t,3)}function nA(e,t){return de(e.getUTCMilliseconds(),t,3)}function dW(e,t){return nA(e,t)+"000"}function hW(e,t){return de(e.getUTCMonth()+1,t,2)}function pW(e,t){return de(e.getUTCMinutes(),t,2)}function vW(e,t){return de(e.getUTCSeconds(),t,2)}function mW(e){var t=e.getUTCDay();return t===0?7:t}function yW(e,t){return de(Xf.count(er(e)-1,e),t,2)}function rA(e){var t=e.getUTCDay();return t>=4||t===0?Pa(e):Pa.ceil(e)}function gW(e,t){return e=rA(e),de(Pa.count(er(e),e)+(er(e).getUTCDay()===4),t,2)}function bW(e){return e.getUTCDay()}function xW(e,t){return de(xc.count(er(e)-1,e),t,2)}function wW(e,t){return de(e.getUTCFullYear()%100,t,2)}function _W(e,t){return e=rA(e),de(e.getUTCFullYear()%100,t,2)}function SW(e,t){return de(e.getUTCFullYear()%1e4,t,4)}function OW(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Pa(e):Pa.ceil(e),de(e.getUTCFullYear()%1e4,t,4)}function PW(){return"+0000"}function Rx(){return"%"}function Lx(e){return+e}function Bx(e){return Math.floor(+e/1e3)}var Ni,iA,aA;AW({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function AW(e){return Ni=AU(e),iA=Ni.format,Ni.parse,aA=Ni.utcFormat,Ni.utcParse,Ni}function EW(e){return new Date(e)}function $W(e){return e instanceof Date?+e:+new Date(+e)}function Ky(e,t,n,r,i,a,o,l,u,s){var f=Cy(),c=f.invert,d=f.domain,h=s(".%L"),g=s(":%S"),v=s("%I:%M"),y=s("%I %p"),p=s("%a %d"),m=s("%b %d"),b=s("%B"),w=s("%Y");function x(_){return(u(_)<_?h:l(_)<_?g:o(_)<_?v:a(_)<_?y:r(_)<_?i(_)<_?p:m:n(_)<_?b:w)(_)}return f.invert=function(_){return new Date(c(_))},f.domain=function(_){return arguments.length?d(Array.from(_,$W)):d().map(EW)},f.ticks=function(_){var S=d();return e(S[0],S[S.length-1],_??10)},f.tickFormat=function(_,S){return S==null?x:s(S)},f.nice=function(_){var S=d();return(!_||typeof _.range!="function")&&(_=t(S[0],S[S.length-1],_??10)),_?d(VP(S,_)):f},f.copy=function(){return fu(f,Ky(e,t,n,r,i,a,o,l,u,s))},f}function TW(){return Jt.apply(Ky(OU,PU,Jn,Hy,Gf,du,Uy,zy,ri,iA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function jW(){return Jt.apply(Ky(_U,SU,er,Vy,Xf,Kf,Wy,Fy,ri,aA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qf(){var e=0,t=1,n,r,i,a,o=ht,l=!1,u;function s(c){return c==null||isNaN(c=+c)?u:o(i===0?.5:(c=(a(c)-n)*i,l?Math.max(0,Math.min(1,c)):c))}s.domain=function(c){return arguments.length?([e,t]=c,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),s):[e,t]},s.clamp=function(c){return arguments.length?(l=!!c,s):l},s.interpolator=function(c){return arguments.length?(o=c,s):o};function f(c){return function(d){var h,g;return arguments.length?([h,g]=d,o=c(h,g),s):[o(0),o(1)]}}return s.range=f(ao),s.rangeRound=f(ky),s.unknown=function(c){return arguments.length?(u=c,s):u},function(c){return a=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),s}}function Br(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function oA(){var e=Lr(qf()(ht));return e.copy=function(){return Br(e,oA())},ar.apply(e,arguments)}function lA(){var e=Iy(qf()).domain([1,10]);return e.copy=function(){return Br(e,lA()).base(e.base())},ar.apply(e,arguments)}function uA(){var e=Dy(qf());return e.copy=function(){return Br(e,uA()).constant(e.constant())},ar.apply(e,arguments)}function Gy(){var e=Ry(qf());return e.copy=function(){return Br(e,Gy()).exponent(e.exponent())},ar.apply(e,arguments)}function kW(){return Gy.apply(null,arguments).exponent(.5)}function sA(){var e=[],t=ht;function n(r){if(r!=null&&!isNaN(r=+r))return t((su(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($r),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>c6(e,a/r))},n.copy=function(){return sA(t).domain(e)},ar.apply(n,arguments)}function Yf(){var e=0,t=.5,n=1,r=1,i,a,o,l,u,s=ht,f,c=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-a)*(r*v<r*a?l:u),s(c?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,n]=v,i=f(e=+e),a=f(t=+t),o=f(n=+n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(v){return arguments.length?(c=!!v,h):c},h.interpolator=function(v){return arguments.length?(s=v,h):s};function g(v){return function(y){var p,m,b;return arguments.length?([p,m,b]=y,s=W6(v,[p,m,b]),h):[s(0),s(.5),s(1)]}}return h.range=g(ao),h.rangeRound=g(ky),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,i=v(e),a=v(t),o=v(n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function cA(){var e=Lr(Yf()(ht));return e.copy=function(){return Br(e,cA())},ar.apply(e,arguments)}function fA(){var e=Iy(Yf()).domain([.1,1,10]);return e.copy=function(){return Br(e,fA()).base(e.base())},ar.apply(e,arguments)}function dA(){var e=Dy(Yf());return e.copy=function(){return Br(e,dA()).constant(e.constant())},ar.apply(e,arguments)}function Xy(){var e=Ry(Yf());return e.copy=function(){return Br(e,Xy()).exponent(e.exponent())},ar.apply(e,arguments)}function CW(){return Xy.apply(null,arguments).exponent(.5)}const zx=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Pl,scaleDiverging:cA,scaleDivergingLog:fA,scaleDivergingPow:Xy,scaleDivergingSqrt:CW,scaleDivergingSymlog:dA,scaleIdentity:HP,scaleImplicit:tv,scaleLinear:yc,scaleLog:KP,scaleOrdinal:$y,scalePoint:Go,scalePow:Ly,scaleQuantile:qP,scaleQuantize:YP,scaleRadial:XP,scaleSequential:oA,scaleSequentialLog:lA,scaleSequentialPow:Gy,scaleSequentialQuantile:sA,scaleSequentialSqrt:kW,scaleSequentialSymlog:uA,scaleSqrt:dU,scaleSymlog:GP,scaleThreshold:QP,scaleTime:TW,scaleUtc:jW,tickFormat:WP},Symbol.toStringTag,{value:"Module"}));var NW=Ya;function MW(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(l===void 0?o===o&&!NW(o):n(o,l)))var l=o,u=a}return u}var Qf=MW;function IW(e,t){return e>t}var hA=IW,DW=Qf,RW=hA,LW=io;function BW(e){return e&&e.length?DW(e,LW,RW):void 0}var zW=BW;const Zf=ye(zW);function FW(e,t){return e<t}var pA=FW,UW=Qf,WW=pA,HW=io;function VW(e){return e&&e.length?UW(e,HW,WW):void 0}var KW=VW;const Jf=ye(KW);var GW=ly,XW=Rr,qW=bP,YW=Pt;function QW(e,t){var n=YW(e)?GW:qW;return n(e,XW(t))}var ZW=QW,JW=yP,e7=ZW;function t7(e,t){return JW(e7(e,t),1)}var n7=t7;const r7=ye(n7);var i7=Sy;function a7(e,t){return i7(e,t)}var o7=a7;const hu=ye(o7);var oo=1e9,l7={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Yy,$e=!0,Qt="[DecimalError] ",si=Qt+"Invalid argument: ",qy=Qt+"Exponent out of range: ",lo=Math.floor,Yr=Math.pow,u7=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kt,qe=1e7,Pe=7,vA=9007199254740991,wc=lo(vA/Pe),Y={};Y.absoluteValue=Y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Y.comparedTo=Y.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};Y.decimalPlaces=Y.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pe;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Y.dividedBy=Y.div=function(e){return Kn(this,new this.constructor(e))};Y.dividedToIntegerBy=Y.idiv=function(e){var t=this,n=t.constructor;return ge(Kn(t,new n(e),0,1),n.precision)};Y.equals=Y.eq=function(e){return!this.cmp(e)};Y.exponent=function(){return Be(this)};Y.greaterThan=Y.gt=function(e){return this.cmp(e)>0};Y.greaterThanOrEqualTo=Y.gte=function(e){return this.cmp(e)>=0};Y.isInteger=Y.isint=function(){return this.e>this.d.length-2};Y.isNegative=Y.isneg=function(){return this.s<0};Y.isPositive=Y.ispos=function(){return this.s>0};Y.isZero=function(){return this.s===0};Y.lessThan=Y.lt=function(e){return this.cmp(e)<0};Y.lessThanOrEqualTo=Y.lte=function(e){return this.cmp(e)<1};Y.logarithm=Y.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(kt))throw Error(Qt+"NaN");if(n.s<1)throw Error(Qt+(n.s?"NaN":"-Infinity"));return n.eq(kt)?new r(0):($e=!1,t=Kn(Tl(n,a),Tl(e,a),a),$e=!0,ge(t,i))};Y.minus=Y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gA(t,e):mA(t,(e.s=-e.s,e))};Y.modulo=Y.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Qt+"NaN");return n.s?($e=!1,t=Kn(n,e,0,1).times(e),$e=!0,n.minus(t)):ge(new r(n),i)};Y.naturalExponential=Y.exp=function(){return yA(this)};Y.naturalLogarithm=Y.ln=function(){return Tl(this)};Y.negated=Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Y.plus=Y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mA(t,e):gA(t,(e.s=-e.s,e))};Y.precision=Y.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(si+e);if(t=Be(i)+1,r=i.d.length-1,n=r*Pe+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Y.squareRoot=Y.sqrt=function(){var e,t,n,r,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(Qt+"NaN")}for(e=Be(l),$e=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=_n(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=lo((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=o=n+3;;)if(a=r,r=a.plus(Kn(l,a,o+2)).times(.5),_n(a.d).slice(0,o)===(t=_n(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ge(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return $e=!0,ge(r,n)};Y.times=Y.mul=function(e){var t,n,r,i,a,o,l,u,s,f=this,c=f.constructor,d=f.d,h=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,n=f.e+e.e,u=d.length,s=h.length,u<s&&(a=d,d=h,h=a,o=u,u=s,s=o),a=[],o=u+s,r=o;r--;)a.push(0);for(r=s;--r>=0;){for(t=0,i=u+r;i>r;)l=a[i]+h[r]*d[i-r-1]+t,a[i--]=l%qe|0,t=l/qe|0;a[i]=(a[i]+t)%qe|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,$e?ge(e,c.precision):e};Y.toDecimalPlaces=Y.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(En(e,0,oo),t===void 0?t=r.rounding:En(t,0,8),ge(n,e+Be(n)+1,t))};Y.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=xi(r,!0):(En(e,0,oo),t===void 0?t=i.rounding:En(t,0,8),r=ge(new i(r),e+1,t),n=xi(r,!0,e+1)),n};Y.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?xi(i):(En(e,0,oo),t===void 0?t=a.rounding:En(t,0,8),r=ge(new a(i),e+Be(i)+1,t),n=xi(r.abs(),!1,e+Be(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Y.toInteger=Y.toint=function(){var e=this,t=e.constructor;return ge(new t(e),Be(e)+1,t.rounding)};Y.toNumber=function(){return+this};Y.toPower=Y.pow=function(e){var t,n,r,i,a,o,l=this,u=l.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(kt);if(l=new u(l),!l.s){if(e.s<1)throw Error(Qt+"Infinity");return l}if(l.eq(kt))return l;if(r=u.precision,e.eq(kt))return ge(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=f<0?-f:f)<=vA){for(i=new u(kt),t=Math.ceil(r/Pe+4),$e=!1;n%2&&(i=i.times(l),Ux(i.d,t)),n=lo(n/2),n!==0;)l=l.times(l),Ux(l.d,t);return $e=!0,e.s<0?new u(kt).div(i):ge(i,r)}}else if(a<0)throw Error(Qt+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,$e=!1,i=e.times(Tl(l,r+s)),$e=!0,i=yA(i),i.s=a,i};Y.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Be(i),r=xi(i,n<=a.toExpNeg||n>=a.toExpPos)):(En(e,1,oo),t===void 0?t=a.rounding:En(t,0,8),i=ge(new a(i),e,t),n=Be(i),r=xi(i,e<=n||n<=a.toExpNeg,e)),r};Y.toSignificantDigits=Y.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(En(e,1,oo),t===void 0?t=r.rounding:En(t,0,8)),ge(new r(n),e,t)};Y.toString=Y.valueOf=Y.val=Y.toJSON=Y[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Be(e),n=e.constructor;return xi(e,t<=n.toExpNeg||t>=n.toExpPos)};function mA(e,t){var n,r,i,a,o,l,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),$e?ge(t,c):t;if(u=e.d,s=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(r=u,a=-a,l=s.length):(r=s,i=o,l=u.length),o=Math.ceil(c/Pe),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=u.length,a=s.length,l-a<0&&(a=l,r=s,s=u,u=r),n=0;a;)n=(u[--a]=u[a]+s[a]+n)/qe|0,u[a]%=qe;for(n&&(u.unshift(n),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,$e?ge(t,c):t}function En(e,t,n){if(e!==~~e||e<t||e>n)throw Error(si+e)}function _n(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Pe-r.length,n&&(a+=fr(n)),a+=r;o=e[t],r=o+"",n=Pe-r.length,n&&(a+=fr(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Kn=function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%qe|0,o=a/qe|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,u;if(a!=o)u=a>o?1:-1;else for(l=u=0;l<a;l++)if(r[l]!=i[l]){u=r[l]>i[l]?1:-1;break}return u}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*qe+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,u,s,f,c,d,h,g,v,y,p,m,b,w,x,_,S,O,E=r.constructor,j=r.s==i.s?1:-1,I=r.d,C=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(Qt+"Division by zero");for(u=r.e-i.e,S=C.length,x=I.length,h=new E(j),g=h.d=[],s=0;C[s]==(I[s]||0);)++s;if(C[s]>(I[s]||0)&&--u,a==null?m=a=E.precision:o?m=a+(Be(r)-Be(i))+1:m=a,m<0)return new E(0);if(m=m/Pe+2|0,s=0,S==1)for(f=0,C=C[0],m++;(s<x||f)&&m--;s++)b=f*qe+(I[s]||0),g[s]=b/C|0,f=b%C|0;else{for(f=qe/(C[0]+1)|0,f>1&&(C=e(C,f),I=e(I,f),S=C.length,x=I.length),w=S,v=I.slice(0,S),y=v.length;y<S;)v[y++]=0;O=C.slice(),O.unshift(0),_=C[0],C[1]>=qe/2&&++_;do f=0,l=t(C,v,S,y),l<0?(p=v[0],S!=y&&(p=p*qe+(v[1]||0)),f=p/_|0,f>1?(f>=qe&&(f=qe-1),c=e(C,f),d=c.length,y=v.length,l=t(c,v,d,y),l==1&&(f--,n(c,S<d?O:C,d))):(f==0&&(l=f=1),c=C.slice()),d=c.length,d<y&&c.unshift(0),n(v,c,y),l==-1&&(y=v.length,l=t(C,v,S,y),l<1&&(f++,n(v,S<y?O:C,y))),y=v.length):l===0&&(f++,v=[0]),g[s++]=f,l&&v[0]?v[y++]=I[w]||0:(v=[I[w]],y=1);while((w++<x||v[0]!==void 0)&&m--)}return g[0]||g.shift(),h.e=u,ge(h,o?a+Be(h)+1:a)}}();function yA(e,t){var n,r,i,a,o,l,u=0,s=0,f=e.constructor,c=f.precision;if(Be(e)>16)throw Error(qy+Be(e));if(!e.s)return new f(kt);for($e=!1,l=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),s+=5;for(r=Math.log(Yr(2,s))/Math.LN10*2+5|0,l+=r,n=i=a=new f(kt),f.precision=l;;){if(i=ge(i.times(e),l),n=n.times(++u),o=a.plus(Kn(i,n,l)),_n(o.d).slice(0,l)===_n(a.d).slice(0,l)){for(;s--;)a=ge(a.times(a),l);return f.precision=c,t==null?($e=!0,ge(a,c)):a}a=o}}function Be(e){for(var t=e.e*Pe,n=e.d[0];n>=10;n/=10)t++;return t}function ph(e,t,n){if(t>e.LN10.sd())throw $e=!0,n&&(e.precision=n),Error(Qt+"LN10 precision limit exceeded");return ge(new e(e.LN10),t)}function fr(e){for(var t="";e--;)t+="0";return t}function Tl(e,t){var n,r,i,a,o,l,u,s,f,c=1,d=10,h=e,g=h.d,v=h.constructor,y=v.precision;if(h.s<1)throw Error(Qt+(h.s?"NaN":"-Infinity"));if(h.eq(kt))return new v(0);if(t==null?($e=!1,s=y):s=t,h.eq(10))return t==null&&($e=!0),ph(v,s);if(s+=d,v.precision=s,n=_n(g),r=n.charAt(0),a=Be(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=_n(h.d),r=n.charAt(0),c++;a=Be(h),r>1?(h=new v("0."+n),a++):h=new v(r+"."+n.slice(1))}else return u=ph(v,s+2,y).times(a+""),h=Tl(new v(r+"."+n.slice(1)),s-d).plus(u),v.precision=y,t==null?($e=!0,ge(h,y)):h;for(l=o=h=Kn(h.minus(kt),h.plus(kt),s),f=ge(h.times(h),s),i=3;;){if(o=ge(o.times(f),s),u=l.plus(Kn(o,new v(i),s)),_n(u.d).slice(0,s)===_n(l.d).slice(0,s))return l=l.times(2),a!==0&&(l=l.plus(ph(v,s+2,y).times(a+""))),l=Kn(l,new v(c),s),v.precision=y,t==null?($e=!0,ge(l,y)):l;l=u,i+=2}}function Fx(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=lo(n/Pe),e.d=[],r=(n+1)%Pe,n<0&&(r+=Pe),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Pe;r<i;)e.d.push(+t.slice(r,r+=Pe));t=t.slice(r),r=Pe-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),$e&&(e.e>wc||e.e<-wc))throw Error(qy+n)}else e.s=0,e.e=0,e.d=[0];return e}function ge(e,t,n){var r,i,a,o,l,u,s,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Pe,i=t,s=c[f=0];else{if(f=Math.ceil((r+1)/Pe),a=c.length,f>=a)return e;for(s=a=c[f],o=1;a>=10;a/=10)o++;r%=Pe,i=r-Pe+o}if(n!==void 0&&(a=Yr(10,o-i-1),l=s/a%10|0,u=t<0||c[f+1]!==void 0||s%a,u=n<4?(l||u)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||u||n==6&&(r>0?i>0?s/Yr(10,o-i):0:c[f-1])%10&1||n==(e.s<0?8:7))),t<1||!c[0])return u?(a=Be(e),c.length=1,t=t-a-1,c[0]=Yr(10,(Pe-t%Pe)%Pe),e.e=lo(-t/Pe)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(r==0?(c.length=f,a=1,f--):(c.length=f+1,a=Yr(10,Pe-r),c[f]=i>0?(s/Yr(10,o-i)%Yr(10,i)|0)*a:0),u)for(;;)if(f==0){(c[0]+=a)==qe&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=qe)break;c[f--]=0,a=1}for(r=c.length;c[--r]===0;)c.pop();if($e&&(e.e>wc||e.e<-wc))throw Error(qy+Be(e));return e}function gA(e,t){var n,r,i,a,o,l,u,s,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),$e?ge(t,h):t;if(u=e.d,c=t.d,r=t.e,s=e.e,u=u.slice(),o=s-r,o){for(f=o<0,f?(n=u,o=-o,l=c.length):(n=c,r=s,l=u.length),i=Math.max(Math.ceil(h/Pe),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=u.length,l=c.length,f=i<l,f&&(l=i),i=0;i<l;i++)if(u[i]!=c[i]){f=u[i]<c[i];break}o=0}for(f&&(n=u,u=c,c=n,t.s=-t.s),l=u.length,i=c.length-l;i>0;--i)u[l++]=0;for(i=c.length;i>o;){if(u[--i]<c[i]){for(a=i;a&&u[--a]===0;)u[a]=qe-1;--u[a],u[i]+=qe}u[i]-=c[i]}for(;u[--l]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,$e?ge(t,h):t):new d(0)}function xi(e,t,n){var r,i=Be(e),a=_n(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+fr(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+fr(-i-1)+a,n&&(r=n-o)>0&&(a+=fr(r))):i>=o?(a+=fr(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+fr(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=fr(r))),e.s<0?"-"+a:a}function Ux(e,t){if(e.length>t)return e.length=t,!0}function bA(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(si+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return Fx(o,a.toString())}else if(typeof a!="string")throw Error(si+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,u7.test(a))Fx(o,a);else throw Error(si+a)}if(i.prototype=Y,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=bA,i.config=i.set=s7,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function s7(e){if(!e||typeof e!="object")throw Error(Qt+"Object expected");var t,n,r,i=["precision",1,oo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(lo(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(si+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(si+n+": "+r);return this}var Yy=bA(l7);kt=new Yy(1);const me=Yy;function c7(e){return p7(e)||h7(e)||d7(e)||f7()}function f7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d7(e,t){if(e){if(typeof e=="string")return ov(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ov(e,t)}}function h7(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function p7(e){if(Array.isArray(e))return ov(e)}function ov(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v7=function(t){return t},xA={},wA=function(t){return t===xA},Wx=function(t){return function n(){return arguments.length===0||arguments.length===1&&wA(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},m7=function e(t,n){return t===1?n:Wx(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==xA}).length;return o>=t?n.apply(void 0,i):e(t-o,Wx(function(){for(var l=arguments.length,u=new Array(l),s=0;s<l;s++)u[s]=arguments[s];var f=i.map(function(c){return wA(c)?u.shift():c});return n.apply(void 0,c7(f).concat(u))}))})},ed=function(t){return m7(t.length,t)},lv=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},y7=ed(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),g7=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return v7;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,u){return u(l)},a.apply(void 0,arguments))}},uv=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},_A=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(l,u){return l===n[u]})||(n=a,r=t.apply(void 0,a)),r}};function b7(e){var t;return e===0?t=1:t=Math.floor(new me(e).abs().log(10).toNumber())+1,t}function x7(e,t,n){for(var r=new me(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var w7=ed(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),_7=ed(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),S7=ed(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const td={rangeStep:x7,getDigitCount:b7,interpolateNumber:w7,uninterpolateNumber:_7,uninterpolateTruncation:S7};function sv(e){return A7(e)||P7(e)||SA(e)||O7()}function O7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
88
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P7(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function A7(e){if(Array.isArray(e))return cv(e)}function jl(e,t){return T7(e)||$7(e,t)||SA(e,t)||E7()}function E7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SA(e,t){if(e){if(typeof e=="string")return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cv(e,t)}}function cv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $7(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,a=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function T7(e){if(Array.isArray(e))return e}function OA(e){var t=jl(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function PA(e,t,n){if(e.lte(0))return new me(0);var r=td.getDigitCount(e.toNumber()),i=new me(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new me(Math.ceil(a.div(o).toNumber())).add(n).mul(o),u=l.mul(i);return t?u:new me(Math.ceil(u))}function j7(e,t,n){var r=1,i=new me(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new me(10).pow(td.getDigitCount(e)-1),i=new me(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new me(Math.floor(e)))}else e===0?i=new me(Math.floor((t-1)/2)):n||(i=new me(Math.floor(e)));var o=Math.floor((t-1)/2),l=g7(y7(function(u){return i.add(new me(u-o).mul(r)).toNumber()}),lv);return l(0,t)}function AA(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new me(0),tickMin:new me(0),tickMax:new me(0)};var a=PA(new me(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new me(0):(o=new me(e).add(t).div(2),o=o.sub(new me(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new me(t).sub(o).div(a).toNumber()),s=l+u+1;return s>n?AA(e,t,n,r,i+1):(s<n&&(u=t>0?u+(n-s):u,l=t>0?l:l+(n-s)),{step:a,tickMin:o.sub(new me(l).mul(a)),tickMax:o.add(new me(u).mul(a))})}function k7(e){var t=jl(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=OA([n,r]),u=jl(l,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat(sv(lv(0,i-1).map(function(){return 1/0}))):[].concat(sv(lv(0,i-1).map(function(){return-1/0})),[f]);return n>r?uv(c):c}if(s===f)return j7(s,i,a);var d=AA(s,f,o,a),h=d.step,g=d.tickMin,v=d.tickMax,y=td.rangeStep(g,v.add(new me(.1).mul(h)),h);return n>r?uv(y):y}function C7(e,t){var n=jl(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=OA([r,i]),l=jl(o,2),u=l[0],s=l[1];if(u===-1/0||s===1/0)return[r,i];if(u===s)return[u];var f=Math.max(t,2),c=PA(new me(s).sub(u).div(f-1),a,0),d=[].concat(sv(td.rangeStep(new me(u),new me(s).sub(new me(.99).mul(c)),c)),[s]);return r>i?uv(d):d}var N7=_A(k7),M7=_A(C7),I7="Invariant failed";function wi(e,t){throw new Error(I7)}var D7=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Aa(e){"@babel/helpers - typeof";return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}function _c(){return _c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_c.apply(this,arguments)}function R7(e,t){return F7(e)||z7(e,t)||B7(e,t)||L7()}function L7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
90
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B7(e,t){if(e){if(typeof e=="string")return Hx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hx(e,t)}}function Hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function F7(e){if(Array.isArray(e))return e}function U7(e,t){if(e==null)return{};var n=W7(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W7(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function H7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TA(r.key),r)}}function K7(e,t,n){return t&&V7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function G7(e,t,n){return t=Sc(t),X7(e,EA()?Reflect.construct(t,n||[],Sc(e).constructor):t.apply(e,n))}function X7(e,t){if(t&&(Aa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q7(e)}function q7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EA=function(){return!!e})()}function Sc(e){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sc(e)}function Y7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fv(e,t)}function fv(e,t){return fv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fv(e,t)}function $A(e,t,n){return t=TA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TA(e){var t=Q7(e,"string");return Aa(t)=="symbol"?t:t+""}function Q7(e,t){if(Aa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Aa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pu=function(e){function t(){return H7(this,t),G7(this,t,arguments)}return Y7(t,e),K7(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,l=r.dataKey,u=r.data,s=r.dataPointFormatter,f=r.xAxis,c=r.yAxis,d=U7(r,D7),h=J(d,!1);this.props.direction==="x"&&f.type!=="number"&&wi();var g=u.map(function(v){var y=s(v,l),p=y.x,m=y.y,b=y.value,w=y.errorVal;if(!w)return null;var x=[],_,S;if(Array.isArray(w)){var O=R7(w,2);_=O[0],S=O[1]}else _=S=w;if(a==="vertical"){var E=f.scale,j=m+i,I=j+o,C=j-o,B=E(b-_),A=E(b+S);x.push({x1:A,y1:I,x2:A,y2:C}),x.push({x1:B,y1:j,x2:A,y2:j}),x.push({x1:B,y1:I,x2:B,y2:C})}else if(a==="horizontal"){var M=c.scale,$=p+i,D=$-o,N=$+o,R=M(b-_),L=M(b+S);x.push({x1:D,y1:L,x2:N,y2:L}),x.push({x1:$,y1:R,x2:$,y2:L}),x.push({x1:D,y1:R,x2:N,y2:R})}return k.createElement(fe,_c({className:"recharts-errorBar",key:"bar-".concat(x.map(function(W){return"".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))},h),x.map(function(W){return k.createElement("line",_c({},W,{key:"line-".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))}))});return k.createElement(fe,{className:"recharts-errorBars"},g)}}])}(k.Component);$A(pu,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});$A(pu,"displayName","ErrorBar");function kl(e){"@babel/helpers - typeof";return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(e)}function Vx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vx(Object(n),!0).forEach(function(r){Z7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z7(e,t,n){return t=J7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J7(e){var t=e9(e,"string");return kl(t)=="symbol"?t:t+""}function e9(e,t){if(kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jA=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Tt(n,oa);if(!o)return null;var l=oa.defaultProps,u=l!==void 0?Wr(Wr({},l),o.props):{},s;return o.props&&o.props.payload?s=o.props&&o.props.payload:a==="children"?s=(r||[]).reduce(function(f,c){var d=c.item,h=c.props,g=h.sectors||h.data||[];return f.concat(g.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):s=(r||[]).map(function(f){var c=f.item,d=c.type.defaultProps,h=d!==void 0?Wr(Wr({},d),c.props):{},g=h.dataKey,v=h.name,y=h.legendType,p=h.hide;return{inactive:p,dataKey:g,type:u.iconType||y||"square",color:Qy(c),value:v||g,payload:h}}),Wr(Wr(Wr({},u),oa.getWithHeight(o,i)),{},{payload:s,item:o})};function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function Kx(e){return i9(e)||r9(e)||n9(e)||t9()}function t9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
91
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n9(e,t){if(e){if(typeof e=="string")return dv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dv(e,t)}}function r9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i9(e){if(Array.isArray(e))return dv(e)}function dv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gx(Object(n),!0).forEach(function(r){ua(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ua(e,t,n){return t=a9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a9(e){var t=o9(e,"string");return Cl(t)=="symbol"?t:t+""}function o9(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ve(e,t,n){return ne(e)||ne(t)?n:Ge(t)?Mt(e,t,n):te(t)?t(e):n}function Xo(e,t,n,r){var i=r7(e,function(l){return Ve(l,t)});if(n==="number"){var a=i.filter(function(l){return K(l)||parseFloat(l)});return a.length?[Jf(a),Zf(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!ne(l)}):i;return o.map(function(l){return Ge(l)||l instanceof Date?l:""})}var l9=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,s=0;s<l;s++){var f=s>0?i[s-1].coordinate:i[l-1].coordinate,c=i[s].coordinate,d=s>=l-1?i[0].coordinate:i[s+1].coordinate,h=void 0;if(ft(c-f)!==ft(d-c)){var g=[];if(ft(d-c)===ft(u[1]-u[0])){h=d;var v=c+u[1]-u[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{h=f;var y=d+u[1]-u[0];g[0]=Math.min(c,(y+c)/2),g[1]=Math.max(c,(y+c)/2)}var p=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>p[0]&&t<=p[1]||t>=g[0]&&t<=g[1]){o=i[s].index;break}}else{var m=Math.min(f,d),b=Math.max(f,d);if(t>(m+c)/2&&t<=(b+c)/2){o=i[s].index;break}}}else for(var w=0;w<l;w++)if(w===0&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w>0&&w<l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w===l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2){o=r[w].index;break}return o},Qy=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},u9=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,s=l.length;u<s;u++)for(var f=a[l[u]].stackGroups,c=Object.keys(f),d=0,h=c.length;d<h;d++){var g=f[c[d]],v=g.items,y=g.cateAxisId,p=v.filter(function(S){return Hn(S.type).indexOf("Bar")>=0});if(p&&p.length){var m=p[0].type.defaultProps,b=m!==void 0?Me(Me({},m),p[0].props):p[0].props,w=b.barSize,x=b[y];o[x]||(o[x]=[]);var _=ne(w)?n:w;o[x].push({item:p[0],stackList:p.slice(1),barSize:ne(_)?void 0:dt(_,r,0)})}}return o},s9=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var s=dt(n,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/u,g=o.reduce(function(w,x){return w+x.barSize||0},0);g+=(u-1)*s,g>=i&&(g-=(u-1)*s,s=0),g>=i&&h>0&&(d=!0,h*=.9,g=u*h);var v=(i-g)/2>>0,y={offset:v-s,size:0};f=o.reduce(function(w,x){var _={item:x.item,position:{offset:y.offset+y.size+s,size:d?h:x.barSize}},S=[].concat(Kx(w),[_]);return y=S[S.length-1].position,x.stackList&&x.stackList.length&&x.stackList.forEach(function(O){S.push({item:O,position:y})}),S},c)}else{var p=dt(r,i,0,!0);i-2*p-(u-1)*s<=0&&(s=0);var m=(i-2*p-(u-1)*s)/u;m>1&&(m>>=0);var b=l===+l?Math.min(m,l):m;f=o.reduce(function(w,x,_){var S=[].concat(Kx(w),[{item:x.item,position:{offset:p+(m+s)*_+(m-b)/2,size:b}}]);return x.stackList&&x.stackList.length&&x.stackList.forEach(function(O){S.push({item:O,position:S[S.length-1].position})}),S},c)}return f},c9=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,u=o-(l.left||0)-(l.right||0),s=jA({children:a,legendWidth:u});if(s){var f=i||{},c=f.width,d=f.height,h=s.align,g=s.verticalAlign,v=s.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&h!=="center"&&K(t[h]))return Me(Me({},t),{},ua({},h,t[h]+(c||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&g!=="middle"&&K(t[g]))return Me(Me({},t),{},ua({},g,t[g]+(d||0)))}return t},f9=function(t,n,r){return ne(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},kA=function(t,n,r,i,a){var o=n.props.children,l=It(o,pu).filter(function(s){return f9(i,a,s.props.direction)});if(l&&l.length){var u=l.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=Ve(f,r);if(ne(c))return s;var d=Array.isArray(c)?[Jf(c),Zf(c)]:[c,c],h=u.reduce(function(g,v){var y=Ve(f,v,0),p=d[0]-Math.abs(Array.isArray(y)?y[0]:y),m=d[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(p,g[0]),Math.max(m,g[1])]},[1/0,-1/0]);return[Math.min(h[0],s[0]),Math.max(h[1],s[1])]},[1/0,-1/0])}return null},d9=function(t,n,r,i,a){var o=n.map(function(l){return kA(t,l,r,a,i)}).filter(function(l){return!ne(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},CA=function(t,n,r,i,a){var o=n.map(function(u){var s=u.props.dataKey;return r==="number"&&s&&kA(t,u,s,i)||Xo(t,s,r,a)});if(r==="number")return o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,s){for(var f=0,c=s.length;f<c;f++)l[s[f]]||(l[s[f]]=!0,u.push(s[f]));return u},[])},NA=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},ii=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,s=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(s=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?ft(l[0]-l[1])*2*s:s,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+s,value:c,offset:s}});return f.filter(function(c){return!uu(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+s,value:c,index:d,offset:s}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+s,value:c,offset:s}}):i.domain().map(function(c,d){return{coordinate:i(c)+s,value:a?a[c]:c,index:d,offset:s}})},vh=new WeakMap,Xu=function(t,n){if(typeof n!="function")return t;vh.has(t)||vh.set(t,new WeakMap);var r=vh.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},MA=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Pl(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:yc(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Go(),realScaleType:"point"}:a==="category"?{scale:Pl(),realScaleType:"band"}:{scale:yc(),realScaleType:"linear"};if(mi(i)){var u="scale".concat(Rf(i));return{scale:(zx[u]||Go)(),realScaleType:zx[u]?u:"point"}}return te(i)?{scale:i}:{scale:Go(),realScaleType:"point"}},Xx=1e-4,IA=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-Xx,o=Math.max(i[0],i[1])+Xx,l=t(n[0]),u=t(n[r-1]);(l<a||l>o||u<a||u>o)&&t.domain([n[0],n[r-1]])}},h9=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},p9=function(t,n){if(!n||n.length!==2||!K(n[0])||!K(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!K(t[0])||t[0]<r)&&(a[0]=r),(!K(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},v9=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,l=0;l<n;++l){var u=uu(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=a,t[l][r][1]=a+u,a=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1])}},m9=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var l=uu(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},y9={sign:v9,expand:$D,none:ga,silhouette:TD,wiggle:jD,positive:m9},g9=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=y9[r],o=ED().keys(i).value(function(l,u){return+Ve(l,u,0)}).order(Dp).offset(a);return o(t)},b9=function(t,n,r,i,a,o){if(!t)return null;var l=o?n.reverse():n,u={},s=l.reduce(function(c,d){var h,g=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Me(Me({},d.type.defaultProps),d.props):d.props,v=g.stackId,y=g.hide;if(y)return c;var p=g[r],m=c[p]||{hasStack:!1,stackGroups:{}};if(Ge(v)){var b=m.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(d),m.hasStack=!0,m.stackGroups[v]=b}else m.stackGroups[to("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[d]};return Me(Me({},c),{},ua({},p,m))},u),f={};return Object.keys(s).reduce(function(c,d){var h=s[d];if(h.hasStack){var g={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,y){var p=h.stackGroups[y];return Me(Me({},v),{},ua({},y,{numericAxisId:r,cateAxisId:i,items:p.items,stackedData:g9(t,p.items,a)}))},g)}return Me(Me({},c),{},ua({},d,h))},f)},DA=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,l=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=N7(s,a,l);return t.domain([Jf(f),Zf(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=M7(c,a,l);return{niceTicks:d}}return null};function qx(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ne(i[t.dataKey])){var l=qs(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var u=Ve(i,ne(o)?t.dataKey:o);return ne(u)?null:t.scale(u)}var Yx=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var u=Ve(o,n.dataKey,n.domain[l]);return ne(u)?null:n.scale(u)-a/2+i},x9=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},w9=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Ge(a)){var o=n[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},_9=function(t){return t.reduce(function(n,r){return[Jf(r.concat([n[0]]).filter(K)),Zf(r.concat([n[1]]).filter(K))]},[1/0,-1/0])},RA=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(s,f){var c=_9(f.slice(n,r+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Qx=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zx=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hv=function(t,n,r){if(te(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(K(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Qx.test(t[0])){var a=+Qx.exec(t[0])[1];i[0]=n[0]-a}else te(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(K(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(Zx.test(t[1])){var o=+Zx.exec(t[1])[1];i[1]=n[1]+o}else te(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Oc=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=Py(n,function(c){return c.coordinate}),o=1/0,l=1,u=a.length;l<u;l++){var s=a[l],f=a[l-1];o=Math.min((s.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},Jx=function(t,n,r){return!t||!t.length||hu(t,Mt(r,"type.defaultProps.domain"))?n:t},LA=function(t,n){var r=t.type.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,l=r.formatter,u=r.tooltipType,s=r.chartType,f=r.hide;return Me(Me({},J(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:Qy(t),value:Ve(n,i),type:u,payload:n,chartType:s,hide:f})};function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ew(Object(n),!0).forEach(function(r){BA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BA(e,t,n){return t=S9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S9(e){var t=O9(e,"string");return Nl(t)=="symbol"?t:t+""}function O9(e,t){if(Nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P9(e,t){return T9(e)||$9(e,t)||E9(e,t)||A9()}function A9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
92
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E9(e,t){if(e){if(typeof e=="string")return tw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tw(e,t)}}function tw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function T9(e){if(Array.isArray(e))return e}var Pc=Math.PI/180,j9=function(t){return t*180/Math.PI},_e=function(t,n,r,i){return{x:t+Math.cos(-Pc*i)*r,y:n+Math.sin(-Pc*i)*r}},zA=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},k9=function(t,n,r,i,a){var o=t.width,l=t.height,u=t.startAngle,s=t.endAngle,f=dt(t.cx,o,o/2),c=dt(t.cy,l,l/2),d=zA(o,l,r),h=dt(t.innerRadius,d,0),g=dt(t.outerRadius,d,d*.8),v=Object.keys(n);return v.reduce(function(y,p){var m=n[p],b=m.domain,w=m.reversed,x;if(ne(m.range))i==="angleAxis"?x=[u,s]:i==="radiusAxis"&&(x=[h,g]),w&&(x=[x[1],x[0]]);else{x=m.range;var _=x,S=P9(_,2);u=S[0],s=S[1]}var O=MA(m,a),E=O.realScaleType,j=O.scale;j.domain(b).range(x),IA(j);var I=DA(j,In(In({},m),{},{realScaleType:E})),C=In(In(In({},m),I),{},{range:x,radius:g,realScaleType:E,scale:j,cx:f,cy:c,innerRadius:h,outerRadius:g,startAngle:u,endAngle:s});return In(In({},y),{},BA({},p,C))},{})},C9=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},N9=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,l=C9({x:r,y:i},{x:a,y:o});if(l<=0)return{radius:l};var u=(r-a)/l,s=Math.acos(u);return i>o&&(s=2*Math.PI-s),{radius:l,angle:j9(s),angleInRadian:s}},M9=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},I9=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},nw=function(t,n){var r=t.x,i=t.y,a=N9({x:r,y:i},n),o=a.radius,l=a.angle,u=n.innerRadius,s=n.outerRadius;if(o<u||o>s)return!1;if(o===0)return!0;var f=M9(n),c=f.startAngle,d=f.endAngle,h=l,g;if(c<=d){for(;h>d;)h-=360;for(;h<c;)h+=360;g=h>=c&&h<=d}else{for(;h>c;)h-=360;for(;h<d;)h+=360;g=h>=d&&h<=c}return g?In(In({},n),{},{radius:o,angle:I9(h,n)}):null},FA=function(t){return!T.isValidElement(t)&&!te(t)&&typeof t!="boolean"?t.className:""};function Ml(e){"@babel/helpers - typeof";return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}var D9=["offset"];function R9(e){return F9(e)||z9(e)||B9(e)||L9()}function L9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
93
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B9(e,t){if(e){if(typeof e=="string")return pv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pv(e,t)}}function z9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F9(e){if(Array.isArray(e))return pv(e)}function pv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U9(e,t){if(e==null)return{};var n=W9(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W9(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rw(Object(n),!0).forEach(function(r){H9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H9(e,t,n){return t=V9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V9(e){var t=K9(e,"string");return Ml(t)=="symbol"?t:t+""}function K9(e,t){if(Ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Il.apply(this,arguments)}var G9=function(t){var n=t.value,r=t.formatter,i=ne(t.children)?n:t.children;return te(r)?r(i):i},X9=function(t,n){var r=ft(n-t),i=Math.min(Math.abs(n-t),360);return r*i},q9=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,u=a,s=u.cx,f=u.cy,c=u.innerRadius,d=u.outerRadius,h=u.startAngle,g=u.endAngle,v=u.clockWise,y=(c+d)/2,p=X9(h,g),m=p>=0?1:-1,b,w;i==="insideStart"?(b=h+m*o,w=v):i==="insideEnd"?(b=g-m*o,w=!v):i==="end"&&(b=g+m*o,w=v),w=p<=0?w:!w;var x=_e(s,f,y,b),_=_e(s,f,y,b+(w?1:-1)*359),S="M".concat(x.x,",").concat(x.y,`
|
|
95
94
|
A`).concat(y,",").concat(y,",0,1,").concat(w?0:1,`,
|
|
96
|
-
`).concat(_.x,",").concat(_.y),O=ne(t.id)?to("recharts-radial-line-"):t.id;return k.createElement("text",Il({},r,{dominantBaseline:"central",className:ie("recharts-radial-bar-label",l)}),k.createElement("defs",null,k.createElement("path",{id:O,d:S})),k.createElement("textPath",{xlinkHref:"#".concat(O)},n))},
|
|
97
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
95
|
+
`).concat(_.x,",").concat(_.y),O=ne(t.id)?to("recharts-radial-line-"):t.id;return k.createElement("text",Il({},r,{dominantBaseline:"central",className:ie("recharts-radial-bar-label",l)}),k.createElement("defs",null,k.createElement("path",{id:O,d:S})),k.createElement("textPath",{xlinkHref:"#".concat(O)},n))},Y9=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,l=a.cy,u=a.innerRadius,s=a.outerRadius,f=a.startAngle,c=a.endAngle,d=(f+c)/2;if(i==="outside"){var h=_e(o,l,s+r,d),g=h.x,v=h.y;return{x:g,y:v,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(u+s)/2,p=_e(o,l,y,d),m=p.x,b=p.y;return{x:m,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Q9=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,l=o.x,u=o.y,s=o.width,f=o.height,c=f>=0?1:-1,d=c*i,h=c>0?"end":"start",g=c>0?"start":"end",v=s>=0?1:-1,y=v*i,p=v>0?"end":"start",m=v>0?"start":"end";if(a==="top"){var b={x:l+s/2,y:u-c*i,textAnchor:"middle",verticalAnchor:h};return We(We({},b),r?{height:Math.max(u-r.y,0),width:s}:{})}if(a==="bottom"){var w={x:l+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:g};return We(We({},w),r?{height:Math.max(r.y+r.height-(u+f),0),width:s}:{})}if(a==="left"){var x={x:l-y,y:u+f/2,textAnchor:p,verticalAnchor:"middle"};return We(We({},x),r?{width:Math.max(x.x-r.x,0),height:f}:{})}if(a==="right"){var _={x:l+s+y,y:u+f/2,textAnchor:m,verticalAnchor:"middle"};return We(We({},_),r?{width:Math.max(r.x+r.width-_.x,0),height:f}:{})}var S=r?{width:s,height:f}:{};return a==="insideLeft"?We({x:l+y,y:u+f/2,textAnchor:m,verticalAnchor:"middle"},S):a==="insideRight"?We({x:l+s-y,y:u+f/2,textAnchor:p,verticalAnchor:"middle"},S):a==="insideTop"?We({x:l+s/2,y:u+d,textAnchor:"middle",verticalAnchor:g},S):a==="insideBottom"?We({x:l+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:h},S):a==="insideTopLeft"?We({x:l+y,y:u+d,textAnchor:m,verticalAnchor:g},S):a==="insideTopRight"?We({x:l+s-y,y:u+d,textAnchor:p,verticalAnchor:g},S):a==="insideBottomLeft"?We({x:l+y,y:u+f-d,textAnchor:m,verticalAnchor:h},S):a==="insideBottomRight"?We({x:l+s-y,y:u+f-d,textAnchor:p,verticalAnchor:h},S):Qa(a)&&(K(a.x)||ti(a.x))&&(K(a.y)||ti(a.y))?We({x:l+dt(a.x,s),y:u+dt(a.y,f),textAnchor:"end",verticalAnchor:"end"},S):We({x:l+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},S)},Z9=function(t){return"cx"in t&&K(t.cx)};function Qe(e){var t=e.offset,n=t===void 0?5:t,r=U9(e,D9),i=We({offset:n},r),a=i.viewBox,o=i.position,l=i.value,u=i.children,s=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!a||ne(l)&&ne(u)&&!T.isValidElement(s)&&!te(s))return null;if(T.isValidElement(s))return T.cloneElement(s,i);var h;if(te(s)){if(h=T.createElement(s,i),T.isValidElement(h))return h}else h=G9(i);var g=Z9(a),v=J(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return q9(i,h,v);var y=g?Y9(i):Q9(i);return k.createElement(gi,Il({className:ie("recharts-label",c)},v,y,{breakAll:d}),h)}Qe.displayName="Label";var UA=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,h=t.top,g=t.left,v=t.width,y=t.height,p=t.clockWise,m=t.labelViewBox;if(m)return m;if(K(v)&&K(y)){if(K(c)&&K(d))return{x:c,y:d,width:v,height:y};if(K(h)&&K(g))return{x:h,y:g,width:v,height:y}}return K(c)&&K(d)?{x:c,y:d,width:0,height:0}:K(n)&&K(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:s||0,outerRadius:f||u||l||0,clockWise:p}:t.viewBox?t.viewBox:{}},J9=function(t,n){return t?t===!0?k.createElement(Qe,{key:"label-implicit",viewBox:n}):Ge(t)?k.createElement(Qe,{key:"label-implicit",viewBox:n,value:t}):T.isValidElement(t)?t.type===Qe?T.cloneElement(t,{key:"label-implicit",viewBox:n}):k.createElement(Qe,{key:"label-implicit",content:t,viewBox:n}):te(t)?k.createElement(Qe,{key:"label-implicit",content:t,viewBox:n}):Qa(t)?k.createElement(Qe,Il({viewBox:n},t,{key:"label-implicit"})):null:null},eH=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=UA(t),o=It(i,Qe).map(function(u,s){return T.cloneElement(u,{viewBox:n||a,key:"label-".concat(s)})});if(!r)return o;var l=J9(t.label,n||a);return[l].concat(R9(o))};Qe.parseViewBox=UA;Qe.renderCallByParent=eH;function tH(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var nH=tH;const rH=ye(nH);function Dl(e){"@babel/helpers - typeof";return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}var iH=["valueAccessor"],aH=["data","dataKey","clockWise","id","textBreakAll"];function oH(e){return cH(e)||sH(e)||uH(e)||lH()}function lH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uH(e,t){if(e){if(typeof e=="string")return vv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vv(e,t)}}function sH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cH(e){if(Array.isArray(e))return vv(e)}function vv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ac.apply(this,arguments)}function iw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iw(Object(n),!0).forEach(function(r){fH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fH(e,t,n){return t=dH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dH(e){var t=hH(e,"string");return Dl(t)=="symbol"?t:t+""}function hH(e,t){if(Dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ow(e,t){if(e==null)return{};var n=pH(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vH=function(t){return Array.isArray(t.value)?rH(t.value):t.value};function Gn(e){var t=e.valueAccessor,n=t===void 0?vH:t,r=ow(e,iH),i=r.data,a=r.dataKey,o=r.clockWise,l=r.id,u=r.textBreakAll,s=ow(r,aH);return!i||!i.length?null:k.createElement(fe,{className:"recharts-label-list"},i.map(function(f,c){var d=ne(a)?n(f,c):Ve(f&&f.payload,a),h=ne(l)?{}:{id:"".concat(l,"-").concat(c)};return k.createElement(Qe,Ac({},J(f,!0),s,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:Qe.parseViewBox(ne(o)?f:aw(aw({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}Gn.displayName="LabelList";function mH(e,t){return e?e===!0?k.createElement(Gn,{key:"labelList-implicit",data:t}):k.isValidElement(e)||te(e)?k.createElement(Gn,{key:"labelList-implicit",data:t,content:e}):Qa(e)?k.createElement(Gn,Ac({data:t},e,{key:"labelList-implicit"})):null:null}function yH(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=It(r,Gn).map(function(o,l){return T.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var a=mH(e.label,t);return[a].concat(oH(i))}Gn.renderCallByParent=yH;function Rl(e){"@babel/helpers - typeof";return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rl(e)}function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mv.apply(this,arguments)}function lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lw(Object(n),!0).forEach(function(r){gH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gH(e,t,n){return t=bH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bH(e){var t=xH(e,"string");return Rl(t)=="symbol"?t:t+""}function xH(e,t){if(Rl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wH=function(t,n){var r=ft(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},qu=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,u=t.cornerRadius,s=t.cornerIsExternal,f=u*(l?1:-1)+i,c=Math.asin(u/f)/Pc,d=s?a:a+o*c,h=_e(n,r,f,d),g=_e(n,r,i,d),v=s?a-o*c:a,y=_e(n,r,f*Math.cos(c*Pc),v);return{center:h,circleTangency:g,lineTangency:y,theta:c}},WA=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,u=wH(o,l),s=o+u,f=_e(n,r,a,o),c=_e(n,r,a,s),d="M ".concat(f.x,",").concat(f.y,`
|
|
98
97
|
A `).concat(a,",").concat(a,`,0,
|
|
99
98
|
`).concat(+(Math.abs(u)>180),",").concat(+(o>s),`,
|
|
100
99
|
`).concat(c.x,",").concat(c.y,`
|
|
101
100
|
`);if(i>0){var h=_e(n,r,i,o),g=_e(n,r,i,s);d+="L ".concat(g.x,",").concat(g.y,`
|
|
102
101
|
A `).concat(i,",").concat(i,`,0,
|
|
103
102
|
`).concat(+(Math.abs(u)>180),",").concat(+(o<=s),`,
|
|
104
|
-
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},
|
|
103
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},_H=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=ft(f-s),d=qu({cx:n,cy:r,radius:a,angle:s,sign:c,cornerRadius:o,cornerIsExternal:u}),h=d.circleTangency,g=d.lineTangency,v=d.theta,y=qu({cx:n,cy:r,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:u}),p=y.circleTangency,m=y.lineTangency,b=y.theta,w=u?Math.abs(s-f):Math.abs(s-f)-v-b;if(w<0)return l?"M ".concat(g.x,",").concat(g.y,`
|
|
105
104
|
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
106
105
|
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
107
106
|
`):WA({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:s,endAngle:f});var x="M ".concat(g.x,",").concat(g.y,`
|
|
@@ -111,14 +110,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
111
110
|
`);if(i>0){var _=qu({cx:n,cy:r,radius:i,angle:s,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),S=_.circleTangency,O=_.lineTangency,E=_.theta,j=qu({cx:n,cy:r,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),I=j.circleTangency,C=j.lineTangency,B=j.theta,A=u?Math.abs(s-f):Math.abs(s-f)-E-B;if(A<0&&o===0)return"".concat(x,"L").concat(n,",").concat(r,"Z");x+="L".concat(C.x,",").concat(C.y,`
|
|
112
111
|
A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(I.x,",").concat(I.y,`
|
|
113
112
|
A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(c>0),",").concat(S.x,",").concat(S.y,`
|
|
114
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(O.x,",").concat(O.y,"Z")}else x+="L".concat(n,",").concat(r,"Z");return x},_H={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},HA=function(t){var n=uw(uw({},_H),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,u=n.forceCornerRadius,s=n.cornerIsExternal,f=n.startAngle,c=n.endAngle,d=n.className;if(o<a||f===c)return null;var h=ie("recharts-sector",d),g=o-a,v=dt(l,g,0,!0),y;return v>0&&Math.abs(f-c)<360?y=wH({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,g/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):y=WA({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),k.createElement("path",mv({},J(n,!0),{className:h,d:y,role:"img"}))};function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yv.apply(this,arguments)}function sw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sw(Object(n),!0).forEach(function(r){SH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SH(e,t,n){return t=OH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OH(e){var t=PH(e,"string");return Ll(t)=="symbol"?t:t+""}function PH(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fw={curveBasisClosed:vD,curveBasisOpen:mD,curveBasis:pD,curveBumpX:eD,curveBumpY:tD,curveLinearClosed:yD,curveLinear:Bf,curveMonotoneX:gD,curveMonotoneY:bD,curveNatural:xD,curveStep:wD,curveStepAfter:SD,curveStepBefore:_D},Yu=function(t){return t.x===+t.x&&t.y===+t.y},So=function(t){return t.x},Oo=function(t){return t.y},AH=function(t,n){if(te(t))return t;var r="curve".concat(Rf(t));return(r==="curveMonotone"||r==="curveBump")&&n?fw["".concat(r).concat(n==="vertical"?"Y":"X")]:fw[r]||Bf},EH=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,u=t.connectNulls,s=u===void 0?!1:u,f=AH(r,l),c=s?a.filter(function(v){return Yu(v)}):a,d;if(Array.isArray(o)){var h=s?o.filter(function(v){return Yu(v)}):o,g=c.map(function(v,y){return cw(cw({},v),{},{base:h[y]})});return l==="vertical"?d=Bu().y(Oo).x1(So).x0(function(v){return v.base.x}):d=Bu().x(So).y1(Oo).y0(function(v){return v.base.y}),d.defined(Yu).curve(f),d(g)}return l==="vertical"&&K(o)?d=Bu().y(Oo).x1(So).x0(o):K(o)?d=Bu().x(So).y1(Oo).y0(o):d=RO().x(So).y(Oo),d.defined(Yu).curve(f),d(c)},Ec=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?EH(t):i;return T.createElement("path",yv({},J(t,!1),Ys(t),{className:ie("recharts-curve",n),d:o,ref:a}))},VA={exports:{}},$H="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",TH=$H,jH=TH;function KA(){}function GA(){}GA.resetWarningCache=KA;var kH=function(){function e(r,i,a,o,l,u){if(u!==jH){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:GA,resetWarningCache:KA};return n.PropTypes=n,n};VA.exports=kH();var CH=VA.exports;const he=ye(CH),{getOwnPropertyNames:NH,getOwnPropertySymbols:MH}=Object,{hasOwnProperty:IH}=Object.prototype;function mh(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Qu(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),l=a.get(r);if(o&&l)return o===r&&l===n;a.set(n,r),a.set(r,n);const u=e(n,r,i);return a.delete(n),a.delete(r),u}}function DH(e){return e!=null?e[Symbol.toStringTag]:void 0}function dw(e){return NH(e).concat(MH(e))}const RH=Object.hasOwn||((e,t)=>IH.call(e,t));function Ti(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const LH="__v",BH="__o",zH="_owner",{getOwnPropertyDescriptor:hw,keys:pw}=Object;function FH(e,t){return e.byteLength===t.byteLength&&$c(new Uint8Array(e),new Uint8Array(t))}function UH(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function WH(e,t){return e.byteLength===t.byteLength&&$c(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function HH(e,t){return Ti(e.getTime(),t.getTime())}function VH(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function KH(e,t){return e===t}function vw(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,l,u=0;for(;(o=a.next())&&!o.done;){const s=t.entries();let f=!1,c=0;for(;(l=s.next())&&!l.done;){if(i[c]){c++;continue}const d=o.value,h=l.value;if(n.equals(d[0],h[0],u,c,e,t,n)&&n.equals(d[1],h[1],d[0],h[0],e,t,n)){f=i[c]=!0;break}c++}if(!f)return!1;u++}return!0}const GH=Ti;function XH(e,t,n){const r=pw(e);let i=r.length;if(pw(t).length!==i)return!1;for(;i-- >0;)if(!XA(e,t,n,r[i]))return!1;return!0}function Po(e,t,n){const r=dw(e);let i=r.length;if(dw(t).length!==i)return!1;let a,o,l;for(;i-- >0;)if(a=r[i],!XA(e,t,n,a)||(o=hw(e,a),l=hw(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function qH(e,t){return Ti(e.valueOf(),t.valueOf())}function YH(e,t){return e.source===t.source&&e.flags===t.flags}function mw(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const u=t.values();let s=!1,f=0;for(;(l=u.next())&&!l.done;){if(!i[f]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){s=i[f]=!0;break}f++}if(!s)return!1}return!0}function $c(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function QH(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function XA(e,t,n,r){return(r===zH||r===BH||r===LH)&&(e.$$typeof||t.$$typeof)?!0:RH(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const ZH="[object ArrayBuffer]",JH="[object Arguments]",eV="[object Boolean]",tV="[object DataView]",nV="[object Date]",rV="[object Error]",iV="[object Map]",aV="[object Number]",oV="[object Object]",lV="[object RegExp]",uV="[object Set]",sV="[object String]",cV={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},fV="[object URL]",dV=Object.prototype.toString;function hV({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:s,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:g}){return function(y,p,m){if(y===p)return!0;if(y==null||p==null)return!1;const b=typeof y;if(b!==typeof p)return!1;if(b!=="object")return b==="number"?l(y,p,m):b==="function"?a(y,p,m):!1;const w=y.constructor;if(w!==p.constructor)return!1;if(w===Object)return u(y,p,m);if(Array.isArray(y))return t(y,p,m);if(w===Date)return r(y,p,m);if(w===RegExp)return f(y,p,m);if(w===Map)return o(y,p,m);if(w===Set)return c(y,p,m);const x=dV.call(y);if(x===nV)return r(y,p,m);if(x===lV)return f(y,p,m);if(x===iV)return o(y,p,m);if(x===uV)return c(y,p,m);if(x===oV)return typeof y.then!="function"&&typeof p.then!="function"&&u(y,p,m);if(x===fV)return h(y,p,m);if(x===rV)return i(y,p,m);if(x===JH)return u(y,p,m);if(cV[x])return d(y,p,m);if(x===ZH)return e(y,p,m);if(x===tV)return n(y,p,m);if(x===eV||x===aV||x===sV)return s(y,p,m);if(g){let _=g[x];if(!_){const S=DH(y);S&&(_=g[S])}if(_)return _(y,p,m)}return!1}}function pV({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:FH,areArraysEqual:n?Po:UH,areDataViewsEqual:WH,areDatesEqual:HH,areErrorsEqual:VH,areFunctionsEqual:KH,areMapsEqual:n?mh(vw,Po):vw,areNumbersEqual:GH,areObjectsEqual:n?Po:XH,arePrimitiveWrappersEqual:qH,areRegExpsEqual:YH,areSetsEqual:n?mh(mw,Po):mw,areTypedArraysEqual:n?mh($c,Po):$c,areUrlsEqual:QH,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Qu(r.areArraysEqual),a=Qu(r.areMapsEqual),o=Qu(r.areObjectsEqual),l=Qu(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return r}function vV(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function mV({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(l,u){const{cache:s=e?new WeakMap:void 0,meta:f}=n();return t(l,u,{cache:s,equals:r,meta:f,strict:i})};if(e)return function(l,u){return t(l,u,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,u){return t(l,u,a)}}const yV=zr();zr({strict:!0});zr({circular:!0});zr({circular:!0,strict:!0});zr({createInternalComparator:()=>Ti});zr({strict:!0,createInternalComparator:()=>Ti});zr({circular:!0,createInternalComparator:()=>Ti});zr({circular:!0,createInternalComparator:()=>Ti,strict:!0});function zr(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=pV(e),o=hV(a),l=n?n(o):vV(o);return mV({circular:t,comparator:o,createState:r,equals:l,strict:i})}function gV(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function yw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):gV(i)};requestAnimationFrame(r)}function gv(e){"@babel/helpers - typeof";return gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gv(e)}function bV(e){return SV(e)||_V(e)||wV(e)||xV()}function xV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
116
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
117
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YA(e,t){if(e){if(typeof e=="string")return bv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bv(e,t)}}function
|
|
118
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
119
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JA(e,t){if(e){if(typeof e=="string")return wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wv(e,t)}}function wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function
|
|
120
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
121
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
113
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(O.x,",").concat(O.y,"Z")}else x+="L".concat(n,",").concat(r,"Z");return x},SH={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},HA=function(t){var n=uw(uw({},SH),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,u=n.forceCornerRadius,s=n.cornerIsExternal,f=n.startAngle,c=n.endAngle,d=n.className;if(o<a||f===c)return null;var h=ie("recharts-sector",d),g=o-a,v=dt(l,g,0,!0),y;return v>0&&Math.abs(f-c)<360?y=_H({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,g/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):y=WA({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),k.createElement("path",mv({},J(n,!0),{className:h,d:y,role:"img"}))};function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yv.apply(this,arguments)}function sw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sw(Object(n),!0).forEach(function(r){OH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OH(e,t,n){return t=PH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=AH(e,"string");return Ll(t)=="symbol"?t:t+""}function AH(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fw={curveBasisClosed:mD,curveBasisOpen:yD,curveBasis:vD,curveBumpX:tD,curveBumpY:nD,curveLinearClosed:gD,curveLinear:Bf,curveMonotoneX:bD,curveMonotoneY:xD,curveNatural:wD,curveStep:_D,curveStepAfter:OD,curveStepBefore:SD},Yu=function(t){return t.x===+t.x&&t.y===+t.y},So=function(t){return t.x},Oo=function(t){return t.y},EH=function(t,n){if(te(t))return t;var r="curve".concat(Rf(t));return(r==="curveMonotone"||r==="curveBump")&&n?fw["".concat(r).concat(n==="vertical"?"Y":"X")]:fw[r]||Bf},$H=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,u=t.connectNulls,s=u===void 0?!1:u,f=EH(r,l),c=s?a.filter(function(v){return Yu(v)}):a,d;if(Array.isArray(o)){var h=s?o.filter(function(v){return Yu(v)}):o,g=c.map(function(v,y){return cw(cw({},v),{},{base:h[y]})});return l==="vertical"?d=Bu().y(Oo).x1(So).x0(function(v){return v.base.x}):d=Bu().x(So).y1(Oo).y0(function(v){return v.base.y}),d.defined(Yu).curve(f),d(g)}return l==="vertical"&&K(o)?d=Bu().y(Oo).x1(So).x0(o):K(o)?d=Bu().x(So).y1(Oo).y0(o):d=RO().x(So).y(Oo),d.defined(Yu).curve(f),d(c)},Ec=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?$H(t):i;return T.createElement("path",yv({},J(t,!1),Ys(t),{className:ie("recharts-curve",n),d:o,ref:a}))},VA={exports:{}},TH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jH=TH,kH=jH;function KA(){}function GA(){}GA.resetWarningCache=KA;var CH=function(){function e(r,i,a,o,l,u){if(u!==kH){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:GA,resetWarningCache:KA};return n.PropTypes=n,n};VA.exports=CH();var NH=VA.exports;const he=ye(NH),{getOwnPropertyNames:MH,getOwnPropertySymbols:IH}=Object,{hasOwnProperty:DH}=Object.prototype;function mh(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Qu(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),l=a.get(r);if(o&&l)return o===r&&l===n;a.set(n,r),a.set(r,n);const u=e(n,r,i);return a.delete(n),a.delete(r),u}}function RH(e){return e!=null?e[Symbol.toStringTag]:void 0}function dw(e){return MH(e).concat(IH(e))}const LH=Object.hasOwn||((e,t)=>DH.call(e,t));function Ti(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const BH="__v",zH="__o",FH="_owner",{getOwnPropertyDescriptor:hw,keys:pw}=Object;function UH(e,t){return e.byteLength===t.byteLength&&$c(new Uint8Array(e),new Uint8Array(t))}function WH(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function HH(e,t){return e.byteLength===t.byteLength&&$c(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function VH(e,t){return Ti(e.getTime(),t.getTime())}function KH(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function GH(e,t){return e===t}function vw(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,l,u=0;for(;(o=a.next())&&!o.done;){const s=t.entries();let f=!1,c=0;for(;(l=s.next())&&!l.done;){if(i[c]){c++;continue}const d=o.value,h=l.value;if(n.equals(d[0],h[0],u,c,e,t,n)&&n.equals(d[1],h[1],d[0],h[0],e,t,n)){f=i[c]=!0;break}c++}if(!f)return!1;u++}return!0}const XH=Ti;function qH(e,t,n){const r=pw(e);let i=r.length;if(pw(t).length!==i)return!1;for(;i-- >0;)if(!XA(e,t,n,r[i]))return!1;return!0}function Po(e,t,n){const r=dw(e);let i=r.length;if(dw(t).length!==i)return!1;let a,o,l;for(;i-- >0;)if(a=r[i],!XA(e,t,n,a)||(o=hw(e,a),l=hw(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function YH(e,t){return Ti(e.valueOf(),t.valueOf())}function QH(e,t){return e.source===t.source&&e.flags===t.flags}function mw(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const u=t.values();let s=!1,f=0;for(;(l=u.next())&&!l.done;){if(!i[f]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){s=i[f]=!0;break}f++}if(!s)return!1}return!0}function $c(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function ZH(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function XA(e,t,n,r){return(r===FH||r===zH||r===BH)&&(e.$$typeof||t.$$typeof)?!0:LH(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const JH="[object ArrayBuffer]",eV="[object Arguments]",tV="[object Boolean]",nV="[object DataView]",rV="[object Date]",iV="[object Error]",aV="[object Map]",oV="[object Number]",lV="[object Object]",uV="[object RegExp]",sV="[object Set]",cV="[object String]",fV={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},dV="[object URL]",hV=Object.prototype.toString;function pV({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:s,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:g}){return function(y,p,m){if(y===p)return!0;if(y==null||p==null)return!1;const b=typeof y;if(b!==typeof p)return!1;if(b!=="object")return b==="number"?l(y,p,m):b==="function"?a(y,p,m):!1;const w=y.constructor;if(w!==p.constructor)return!1;if(w===Object)return u(y,p,m);if(Array.isArray(y))return t(y,p,m);if(w===Date)return r(y,p,m);if(w===RegExp)return f(y,p,m);if(w===Map)return o(y,p,m);if(w===Set)return c(y,p,m);const x=hV.call(y);if(x===rV)return r(y,p,m);if(x===uV)return f(y,p,m);if(x===aV)return o(y,p,m);if(x===sV)return c(y,p,m);if(x===lV)return typeof y.then!="function"&&typeof p.then!="function"&&u(y,p,m);if(x===dV)return h(y,p,m);if(x===iV)return i(y,p,m);if(x===eV)return u(y,p,m);if(fV[x])return d(y,p,m);if(x===JH)return e(y,p,m);if(x===nV)return n(y,p,m);if(x===tV||x===oV||x===cV)return s(y,p,m);if(g){let _=g[x];if(!_){const S=RH(y);S&&(_=g[S])}if(_)return _(y,p,m)}return!1}}function vV({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:UH,areArraysEqual:n?Po:WH,areDataViewsEqual:HH,areDatesEqual:VH,areErrorsEqual:KH,areFunctionsEqual:GH,areMapsEqual:n?mh(vw,Po):vw,areNumbersEqual:XH,areObjectsEqual:n?Po:qH,arePrimitiveWrappersEqual:YH,areRegExpsEqual:QH,areSetsEqual:n?mh(mw,Po):mw,areTypedArraysEqual:n?mh($c,Po):$c,areUrlsEqual:ZH,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Qu(r.areArraysEqual),a=Qu(r.areMapsEqual),o=Qu(r.areObjectsEqual),l=Qu(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return r}function mV(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function yV({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(l,u){const{cache:s=e?new WeakMap:void 0,meta:f}=n();return t(l,u,{cache:s,equals:r,meta:f,strict:i})};if(e)return function(l,u){return t(l,u,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,u){return t(l,u,a)}}const gV=zr();zr({strict:!0});zr({circular:!0});zr({circular:!0,strict:!0});zr({createInternalComparator:()=>Ti});zr({strict:!0,createInternalComparator:()=>Ti});zr({circular:!0,createInternalComparator:()=>Ti});zr({circular:!0,createInternalComparator:()=>Ti,strict:!0});function zr(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=vV(e),o=pV(a),l=n?n(o):mV(o);return yV({circular:t,comparator:o,createState:r,equals:l,strict:i})}function bV(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function yw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):bV(i)};requestAnimationFrame(r)}function gv(e){"@babel/helpers - typeof";return gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gv(e)}function xV(e){return OV(e)||SV(e)||_V(e)||wV()}function wV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _V(e,t){if(e){if(typeof e=="string")return gw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gw(e,t)}}function gw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function SV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OV(e){if(Array.isArray(e))return e}function PV(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,l=xV(o),u=l[0],s=l.slice(1);if(typeof u=="number"){yw(i.bind(null,s),u);return}i(u),yw(i.bind(null,s));return}gv(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bw(Object(n),!0).forEach(function(r){qA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qA(e,t,n){return t=AV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AV(e){var t=EV(e,"string");return Bl(t)==="symbol"?t:String(t)}function EV(e,t){if(Bl(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bl(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $V=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},TV=function(t){return t},jV=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},qo=function(t,n){return Object.keys(n).reduce(function(r,i){return xw(xw({},r),{},qA({},i,t(i,n[i])))},{})},ww=function(t,n,r){return t.map(function(i){return"".concat(jV(i)," ").concat(n,"ms ").concat(r)}).join(",")};function kV(e,t){return MV(e)||NV(e,t)||YA(e,t)||CV()}function CV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function MV(e){if(Array.isArray(e))return e}function IV(e){return LV(e)||RV(e)||YA(e)||DV()}function DV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
116
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YA(e,t){if(e){if(typeof e=="string")return bv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bv(e,t)}}function RV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LV(e){if(Array.isArray(e))return bv(e)}function bv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tc=1e-4,QA=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},ZA=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},_w=function(t,n){return function(r){var i=QA(t,n);return ZA(i,r)}},BV=function(t,n){return function(r){var i=QA(t,n),a=[].concat(IV(i.map(function(o,l){return o*l}).slice(1)),[0]);return ZA(a,r)}},Sw=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var u=n[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var s=u[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),f=kV(s,4);i=f[0],a=f[1],o=f[2],l=f[3]}}}var c=_w(i,o),d=_w(a,l),h=BV(i,o),g=function(p){return p>1?1:p<0?0:p},v=function(p){for(var m=p>1?1:p,b=m,w=0;w<8;++w){var x=c(b)-m,_=h(b);if(Math.abs(x-m)<Tc||_<Tc)return d(b);b=g(b-x/_)}return d(b)};return v.isStepper=!1,v},zV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,u=function(f,c,d){var h=-(f-c)*r,g=d*a,v=d+(h-g)*l/1e3,y=d*l/1e3+f;return Math.abs(y-c)<Tc&&Math.abs(v)<Tc?[c,0]:[y,v]};return u.isStepper=!0,u.dt=l,u},FV=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Sw(i);case"spring":return zV();default:if(i.split("(")[0]==="cubic-bezier")return Sw(i)}return typeof i=="function"?i:null};function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function Ow(e){return HV(e)||WV(e)||JA(e)||UV()}function UV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
117
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HV(e){if(Array.isArray(e))return wv(e)}function Pw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pw(Object(n),!0).forEach(function(r){xv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xv(e,t,n){return t=VV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VV(e){var t=KV(e,"string");return zl(t)==="symbol"?t:String(t)}function KV(e,t){if(zl(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zl(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GV(e,t){return YV(e)||qV(e,t)||JA(e,t)||XV()}function XV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
118
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JA(e,t){if(e){if(typeof e=="string")return wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wv(e,t)}}function wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function YV(e){if(Array.isArray(e))return e}var jc=function(t,n,r){return t+(n-t)*r},_v=function(t){var n=t.from,r=t.to;return n!==r},QV=function e(t,n,r){var i=qo(function(a,o){if(_v(o)){var l=t(o.from,o.to,o.velocity),u=GV(l,2),s=u[0],f=u[1];return et(et({},o),{},{from:s,velocity:f})}return o},n);return r<1?qo(function(a,o){return _v(o)?et(et({},o),{},{velocity:jc(o.velocity,i[a].velocity,r),from:jc(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const ZV=function(e,t,n,r,i){var a=$V(e,t),o=a.reduce(function(y,p){return et(et({},y),{},xv({},p,[e[p],t[p]]))},{}),l=a.reduce(function(y,p){return et(et({},y),{},xv({},p,{from:e[p],velocity:0,to:t[p]}))},{}),u=-1,s,f,c=function(){return null},d=function(){return qo(function(p,m){return m.from},l)},h=function(){return!Object.values(l).filter(_v).length},g=function(p){s||(s=p);var m=p-s,b=m/n.dt;l=QV(n,l,b),i(et(et(et({},e),t),d())),s=p,h()||(u=requestAnimationFrame(c))},v=function(p){f||(f=p);var m=(p-f)/r,b=qo(function(x,_){return jc.apply(void 0,Ow(_).concat([n(m)]))},o);if(i(et(et(et({},e),t),b)),m<1)u=requestAnimationFrame(c);else{var w=qo(function(x,_){return jc.apply(void 0,Ow(_).concat([n(1)]))},o);i(et(et(et({},e),t),w))}};return c=n.isStepper?g:v,function(){return requestAnimationFrame(c),function(){cancelAnimationFrame(u)}}};function Ea(e){"@babel/helpers - typeof";return Ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(e)}var JV=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function eK(e,t){if(e==null)return{};var n=tK(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tK(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yh(e){return aK(e)||iK(e)||rK(e)||nK()}function nK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
119
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rK(e,t){if(e){if(typeof e=="string")return Sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sv(e,t)}}function iK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aK(e){if(Array.isArray(e))return Sv(e)}function Sv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aw(Object(n),!0).forEach(function(r){Mo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mo(e,t,n){return t=eE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eE(r.key),r)}}function uK(e,t,n){return t&&lK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eE(e){var t=sK(e,"string");return Ea(t)==="symbol"?t:String(t)}function sK(e,t){if(Ea(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ea(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ov(e,t)}function Ov(e,t){return Ov=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ov(e,t)}function fK(e){var t=dK();return function(){var r=kc(e),i;if(t){var a=kc(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return Pv(this,i)}}function Pv(e,t){if(t&&(Ea(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Av(e)}function Av(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dK(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kc(e){return kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kc(e)}var $n=function(e){cK(n,e);var t=fK(n);function n(r,i){var a;oK(this,n),a=t.call(this,r,i);var o=a.props,l=o.isActive,u=o.attributeName,s=o.from,f=o.to,c=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Av(a)),a.changeStyle=a.changeStyle.bind(Av(a)),!l||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Pv(a);if(c&&c.length)a.state={style:c[0].style};else if(s){if(typeof d=="function")return a.state={style:s},Pv(a);a.state={style:u?Mo({},u,s):s}}else a.state={style:{}};return a}return uK(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,u=a.attributeName,s=a.shouldReAnimate,f=a.to,c=a.from,d=this.state.style;if(l){if(!o){var h={style:u?Mo({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(h);return}if(!(gV(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||s?c:i.to;if(this.state&&d){var y={style:u?Mo({},u,v):v};(u&&d[u]!==v||!u&&d!==v)&&this.setState(y)}this.runAnimation(nn(nn({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,u=i.duration,s=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,h=ZV(o,l,FV(s),u,this.changeStyle),g=function(){a.stopJSAnimation=h()};this.manager.start([d,f,g,u,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,s=o[0],f=s.style,c=s.duration,d=c===void 0?0:c,h=function(v,y,p){if(p===0)return v;var m=y.duration,b=y.easing,w=b===void 0?"ease":b,x=y.style,_=y.properties,S=y.onAnimationEnd,O=p>0?o[p-1]:y,E=_||Object.keys(x);if(typeof w=="function"||w==="spring")return[].concat(yh(v),[a.runJSAnimation.bind(a,{from:O.style,to:x,duration:m,easing:w}),m]);var j=ww(E,m,w),I=nn(nn(nn({},O.style),x),{},{transition:j});return[].concat(yh(v),[I,m,S]).filter(TV)};return this.manager.start([u].concat(yh(o.reduce(h,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=PV());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,s=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,h=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof s=="function"||typeof h=="function"||s==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=l?Mo({},l,u):u,y=ww(Object.keys(v),o,s);g.start([f,a,nn(nn({},v),{},{transition:y}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=eK(i,JV),s=T.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||s===0||o<=0)return a;var c=function(h){var g=h.props,v=g.style,y=v===void 0?{}:v,p=g.className,m=T.cloneElement(h,nn(nn({},u),{},{style:nn(nn({},y),f),className:p}));return m};return s===1?c(T.Children.only(a)):k.createElement("div",null,T.Children.map(a,function(d){return c(d)}))}}]),n}(T.PureComponent);$n.displayName="Animate";$n.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};$n.propTypes={from:he.oneOfType([he.object,he.string]),to:he.oneOfType([he.object,he.string]),attributeName:he.string,duration:he.number,begin:he.number,easing:he.oneOfType([he.string,he.func]),steps:he.arrayOf(he.shape({duration:he.number.isRequired,style:he.object.isRequired,easing:he.oneOfType([he.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),he.func]),properties:he.arrayOf("string"),onAnimationEnd:he.func})),children:he.oneOfType([he.node,he.func]),isActive:he.bool,canBegin:he.bool,onAnimationEnd:he.func,shouldReAnimate:he.bool,onAnimationStart:he.func,onAnimationReStart:he.func};function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function Cc(){return Cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cc.apply(this,arguments)}function hK(e,t){return yK(e)||mK(e,t)||vK(e,t)||pK()}function pK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
120
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vK(e,t){if(e){if(typeof e=="string")return Ew(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ew(e,t)}}function Ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function yK(e){if(Array.isArray(e))return e}function $w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$w(Object(n),!0).forEach(function(r){gK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$w(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gK(e,t,n){return t=bK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bK(e){var t=xK(e,"string");return Fl(t)=="symbol"?t:t+""}function xK(e,t){if(Fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jw=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,u=r>=0?1:-1,s=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],d=0,h=4;d<h;d++)c[d]=a[d]>o?o:a[d];f="M".concat(t,",").concat(n+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(n)),f+="L ".concat(t+r-u*c[1],",").concat(n),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`,
|
|
122
121
|
`).concat(t+r,",").concat(n+l*c[1])),f+="L ".concat(t+r,",").concat(n+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`,
|
|
123
122
|
`).concat(t+r-u*c[2],",").concat(n+i)),f+="L ".concat(t+u*c[3],",").concat(n+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`,
|
|
124
123
|
`).concat(t,",").concat(n+i-l*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);f="M ".concat(t,",").concat(n+l*g,`
|
|
@@ -128,13 +127,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
128
127
|
L `).concat(t+r,",").concat(n+i-l*g,`
|
|
129
128
|
A `).concat(g,",").concat(g,",0,0,").concat(s,",").concat(t+r-u*g,",").concat(n+i,`
|
|
130
129
|
L `).concat(t+u*g,",").concat(n+i,`
|
|
131
|
-
A `).concat(g,",").concat(g,",0,0,").concat(s,",").concat(t,",").concat(n+i-l*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},
|
|
132
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AK(e,t){if(e){if(typeof e=="string")return Ev(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ev(e,t)}}function EK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $K(e){if(Array.isArray(e))return Ev(e)}function Ev(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cw=function(t){return t&&t.x===+t.x&&t.y===+t.y},TK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Cw(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Cw(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Yo=function(t,n){var r=TK(t);n&&(r=[r.reduce(function(a,o){return[].concat(kw(a),kw(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,l,u){return"".concat(o).concat(u===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},jK=function(t,n,r){var i=Yo(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Yo(n.reverse(),r).slice(1))},kK=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,o=SK(t,_K);if(!n||!n.length)return null;var l=ie("recharts-polygon",r);if(i&&i.length){var u=o.stroke&&o.stroke!=="none",s=jK(n,i,a);return k.createElement("g",{className:l},k.createElement("path",qi({},J(o,!0),{fill:s.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:s})),u?k.createElement("path",qi({},J(o,!0),{fill:"none",d:Yo(n,a)})):null,u?k.createElement("path",qi({},J(o,!0),{fill:"none",d:Yo(i,a)})):null)}var f=Yo(n,a);return k.createElement("path",qi({},J(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:l,d:f}))};function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$v.apply(this,arguments)}var nd=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ie("recharts-dot",a);return n===+n&&r===+r&&i===+i?T.createElement("circle",$v({},J(t,!1),Ys(t),{className:o,cx:n,cy:r,r:i})):null};function Ul(e){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}var CK=["x","y","top","left","width","height","className"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(this,arguments)}function Nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nw(Object(n),!0).forEach(function(r){MK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MK(e,t,n){return t=IK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IK(e){var t=DK(e,"string");return Ul(t)=="symbol"?t:t+""}function DK(e,t){if(Ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RK(e,t){if(e==null)return{};var n=LK(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var BK=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},zK=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,h=d===void 0?0:d,g=t.className,v=RK(t,CK),y=NK({x:r,y:a,top:l,left:s,width:c,height:h},v);return!K(r)||!K(a)||!K(c)||!K(h)||!K(l)||!K(s)?null:k.createElement("path",Tv({},J(y,!0),{className:ie("recharts-cross",g),d:BK(r,a,c,h,l,s)}))},FK=Qf,UK=hA,WK=Rr;function HK(e,t){return e&&e.length?FK(e,WK(t),UK):void 0}var VK=HK;const KK=ye(VK);var GK=Qf,XK=Rr,qK=pA;function YK(e,t){return e&&e.length?GK(e,XK(t),qK):void 0}var QK=YK;const ZK=ye(QK);var JK=["cx","cy","angle","ticks","axisLine"],eG=["ticks","tick","angle","tickFormatter","stroke"];function $a(e){"@babel/helpers - typeof";return $a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$a(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(this,arguments)}function Mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(n),!0).forEach(function(r){rd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iw(e,t){if(e==null)return{};var n=tG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nE(r.key),r)}}function rG(e,t,n){return t&&Dw(e.prototype,t),n&&Dw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function iG(e,t,n){return t=Nc(t),aG(e,tE()?Reflect.construct(t,n||[],Nc(e).constructor):t.apply(e,n))}function aG(e,t){if(t&&($a(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oG(e)}function oG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tE=function(){return!!e})()}function Nc(e){return Nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nc(e)}function lG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jv(e,t)}function jv(e,t){return jv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jv(e,t)}function rd(e,t,n){return t=nE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nE(e){var t=uG(e,"string");return $a(t)=="symbol"?t:t+""}function uG(e,t){if($a(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($a(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var id=function(e){function t(){return nG(this,t),iG(this,t,arguments)}return lG(t,e),rG(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,o=a.angle,l=a.cx,u=a.cy;return _e(l,u,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,u=KK(l,function(f){return f.coordinate||0}),s=ZK(l,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:s.coordinate||0,outerRadius:u.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,u=r.axisLine,s=Iw(r,JK),f=l.reduce(function(g,v){return[Math.min(g[0],v.coordinate),Math.max(g[1],v.coordinate)]},[1/0,-1/0]),c=_e(i,a,f[0],o),d=_e(i,a,f[1],o),h=Hr(Hr(Hr({},J(s,!1)),{},{fill:"none"},J(u,!1)),{},{x1:c.x,y1:c.y,x2:d.x,y2:d.y});return k.createElement("line",Qo({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.angle,u=i.tickFormatter,s=i.stroke,f=Iw(i,eG),c=this.getTickTextAnchor(),d=J(f,!1),h=J(o,!1),g=a.map(function(v,y){var p=r.getTickValueCoord(v),m=Hr(Hr(Hr(Hr({textAnchor:c,transform:"rotate(".concat(90-l,", ").concat(p.x,", ").concat(p.y,")")},d),{},{stroke:"none",fill:s},h),{},{index:y},p),{},{payload:v});return k.createElement(fe,Qo({className:ie("recharts-polar-radius-axis-tick",FA(o)),key:"tick-".concat(v.coordinate)},yi(r.props,v,y)),t.renderTickItem(o,m,u?u(v.value,y):v.value))});return k.createElement(fe,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,o=r.tick;return!i||!i.length?null:k.createElement(fe,{className:ie("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Qe.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return k.isValidElement(r)?o=k.cloneElement(r,i):te(r)?o=r(i):o=k.createElement(gi,Qo({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(T.PureComponent);rd(id,"displayName","PolarRadiusAxis");rd(id,"axisType","radiusAxis");rd(id,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qr.apply(this,arguments)}function Rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rw(Object(n),!0).forEach(function(r){ad(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iE(r.key),r)}}function cG(e,t,n){return t&&Lw(e.prototype,t),n&&Lw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fG(e,t,n){return t=Mc(t),dG(e,rE()?Reflect.construct(t,n||[],Mc(e).constructor):t.apply(e,n))}function dG(e,t){if(t&&(Ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hG(e)}function hG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rE=function(){return!!e})()}function Mc(e){return Mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mc(e)}function pG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kv(e,t)}function kv(e,t){return kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kv(e,t)}function ad(e,t,n){return t=iE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iE(e){var t=vG(e,"string");return Ta(t)=="symbol"?t:t+""}function vG(e,t){if(Ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mG=Math.PI/180,Bw=1e-5,od=function(e){function t(){return sG(this,t),fG(this,t,arguments)}return pG(t,e),cG(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,o=i.cy,l=i.radius,u=i.orientation,s=i.tickSize,f=s||8,c=_e(a,o,l,r.coordinate),d=_e(a,o,l+(u==="inner"?-1:1)*f,r.coordinate);return{x1:c.x,y1:c.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*mG),o;return a>Bw?o=i==="outer"?"start":"end":a<-Bw?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,l=r.axisLine,u=r.axisLineType,s=Vr(Vr({},J(this.props,!1)),{},{fill:"none"},J(l,!1));if(u==="circle")return k.createElement(nd,Qr({className:"recharts-polar-angle-axis-line"},s,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(d){return _e(i,a,o,d.coordinate)});return k.createElement(kK,Qr({className:"recharts-polar-angle-axis-line"},s,{points:c}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.tickLine,u=i.tickFormatter,s=i.stroke,f=J(this.props,!1),c=J(o,!1),d=Vr(Vr({},f),{},{fill:"none"},J(l,!1)),h=a.map(function(g,v){var y=r.getTickLineCoord(g),p=r.getTickTextAnchor(g),m=Vr(Vr(Vr({textAnchor:p},f),{},{stroke:"none",fill:s},c),{},{index:v,payload:g,x:y.x2,y:y.y2});return k.createElement(fe,Qr({className:ie("recharts-polar-angle-axis-tick",FA(o)),key:"tick-".concat(g.coordinate)},yi(r.props,g,v)),l&&k.createElement("line",Qr({className:"recharts-polar-angle-axis-tick-line"},d,y)),o&&t.renderTickItem(o,m,u?u(g.value,v):g.value))});return k.createElement(fe,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:k.createElement(fe,{className:ie("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return k.isValidElement(r)?o=k.cloneElement(r,i):te(r)?o=r(i):o=k.createElement(gi,Qr({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(T.PureComponent);ad(od,"displayName","PolarAngleAxis");ad(od,"axisType","angleAxis");ad(od,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var yG=lP,gG=yG(Object.getPrototypeOf,Object),bG=gG,xG=rr,wG=bG,_G=ir,SG="[object Object]",OG=Function.prototype,PG=Object.prototype,aE=OG.toString,AG=PG.hasOwnProperty,EG=aE.call(Object);function $G(e){if(!_G(e)||xG(e)!=SG)return!1;var t=wG(e);if(t===null)return!0;var n=AG.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&aE.call(n)==EG}var TG=$G;const jG=ye(TG);var kG=rr,CG=ir,NG="[object Boolean]";function MG(e){return e===!0||e===!1||CG(e)&&kG(e)==NG}var IG=MG;const DG=ye(IG);function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}function RG(e,t){return FG(e)||zG(e,t)||BG(e,t)||LG()}function LG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
133
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BG(e,t){if(e){if(typeof e=="string")return zw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zw(e,t)}}function zw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function FG(e){if(Array.isArray(e))return e}function Fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(n),!0).forEach(function(r){UG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UG(e,t,n){return t=WG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WG(e){var t=HG(e,"string");return Wl(t)=="symbol"?t:t+""}function HG(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ww=function(t,n,r,i,a){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+a),l+="L ".concat(t+r-o/2-i,",").concat(n+a),l+="L ".concat(t,",").concat(n," Z"),l},VG={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},KG=function(t){var n=Uw(Uw({},VG),t),r=T.useRef(),i=T.useState(-1),a=RG(i,2),o=a[0],l=a[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&l(b)}catch{}},[]);var u=n.x,s=n.y,f=n.upperWidth,c=n.lowerWidth,d=n.height,h=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,p=n.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||d!==+d||f===0&&c===0||d===0)return null;var m=ie("recharts-trapezoid",h);return p?k.createElement($n,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:v,animationEasing:g,isActive:p},function(b){var w=b.upperWidth,x=b.lowerWidth,_=b.height,S=b.x,O=b.y;return k.createElement($n,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:g},k.createElement("path",Ic({},J(n,!0),{className:m,d:Ww(S,O,w,x,_),ref:r})))}):k.createElement("g",null,k.createElement("path",Ic({},J(n,!0),{className:m,d:Ww(u,s,f,c,d)})))},GG=["option","shapeType","propTransformer","activeClassName","isActive"];function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function XG(e,t){if(e==null)return{};var n=qG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){YG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YG(e,t,n){return t=QG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QG(e){var t=ZG(e,"string");return Hl(t)=="symbol"?t:t+""}function ZG(e,t){if(Hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JG(e,t){return Dc(Dc({},t),e)}function eX(e,t){return e==="symbols"}function Vw(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return k.createElement(Zy,n);case"trapezoid":return k.createElement(KG,n);case"sector":return k.createElement(HA,n);case"symbols":if(eX(t))return k.createElement(my,n);break;default:return null}}function tX(e){return T.isValidElement(e)?e.props:e}function oE(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?JG:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=XG(e,GG),s;if(T.isValidElement(t))s=T.cloneElement(t,Dc(Dc({},u),tX(t)));else if(te(t))s=t(u);else if(jG(t)&&!DG(t)){var f=i(t,u);s=k.createElement(Vw,{shapeType:n,elementProps:f})}else{var c=u;s=k.createElement(Vw,{shapeType:n,elementProps:c})}return l?k.createElement(fe,{className:o},s):s}function ld(e,t){return t!=null&&"trapezoids"in e.props}function ud(e,t){return t!=null&&"sectors"in e.props}function Vl(e,t){return t!=null&&"points"in e.props}function nX(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function rX(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function iX(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function aX(e,t){var n;return ld(e,t)?n=nX:ud(e,t)?n=rX:Vl(e,t)&&(n=iX),n}function oX(e,t){var n;return ld(e,t)?n="trapezoids":ud(e,t)?n="sectors":Vl(e,t)&&(n="points"),n}function lX(e,t){if(ld(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ud(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Vl(e,t)?t.payload:{}}function uX(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=oX(n,t),a=lX(n,t),o=r.filter(function(u,s){var f=hu(a,u),c=n.props[i].filter(function(g){var v=aX(n,t);return v(g,t)}),d=n.props[i].indexOf(c[c.length-1]),h=s===d;return f&&h}),l=r.indexOf(o[o.length-1]);return l}var gs;function ja(e){"@babel/helpers - typeof";return ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ja(e)}function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yi.apply(this,arguments)}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kw(Object(n),!0).forEach(function(r){Vt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uE(r.key),r)}}function cX(e,t,n){return t&&Gw(e.prototype,t),n&&Gw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fX(e,t,n){return t=Rc(t),dX(e,lE()?Reflect.construct(t,n||[],Rc(e).constructor):t.apply(e,n))}function dX(e,t){if(t&&(ja(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hX(e)}function hX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lE=function(){return!!e})()}function Rc(e){return Rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rc(e)}function pX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cv(e,t)}function Cv(e,t){return Cv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Cv(e,t)}function Vt(e,t,n){return t=uE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uE(e){var t=vX(e,"string");return ja(t)=="symbol"?t:t+""}function vX(e,t){if(ja(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ja(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var or=function(e){function t(n){var r;return sX(this,t),r=fX(this,t,[n]),Vt(r,"pieRef",null),Vt(r,"sectorRefs",[]),Vt(r,"id",to("recharts-pie-")),Vt(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),te(i)&&i()}),Vt(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),te(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return pX(t,e),cX(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,l=a.labelLine,u=a.dataKey,s=a.valueKey,f=J(this.props,!1),c=J(o,!1),d=J(l,!1),h=o&&o.offsetRadius||20,g=r.map(function(v,y){var p=(v.startAngle+v.endAngle)/2,m=_e(v.cx,v.cy,v.outerRadius+h,p),b=be(be(be(be({},f),v),{},{stroke:"none"},c),{},{index:y,textAnchor:t.getTextAnchor(m.x,v.cx)},m),w=be(be(be(be({},f),v),{},{fill:"none",stroke:v.fill},d),{},{index:y,points:[_e(v.cx,v.cy,v.outerRadius,p),m]}),x=u;return ne(u)&&ne(s)?x="value":ne(u)&&(x=s),k.createElement(fe,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(y)},l&&t.renderLabelLineItem(l,w,"line"),t.renderLabelItem(o,b,Ve(v,x)))});return k.createElement(fe,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.activeShape,l=a.blendStroke,u=a.inactiveShape;return r.map(function(s,f){if((s==null?void 0:s.startAngle)===0&&(s==null?void 0:s.endAngle)===0&&r.length!==1)return null;var c=i.isActiveIndex(f),d=u&&i.hasActiveIndex()?u:null,h=c?o:d,g=be(be({},s),{},{stroke:l?s.fill:s.stroke,tabIndex:-1});return k.createElement(fe,Yi({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},yi(i.props,s,f),{key:"sector-".concat(s==null?void 0:s.startAngle,"-").concat(s==null?void 0:s.endAngle,"-").concat(s.midAngle,"-").concat(f)}),k.createElement(oE,Yi({option:h,isActive:c,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,o=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,s=i.animationEasing,f=i.animationId,c=this.state,d=c.prevSectors,h=c.prevIsAnimationActive;return k.createElement($n,{begin:l,duration:u,isActive:o,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var v=g.t,y=[],p=a&&a[0],m=p.startAngle;return a.forEach(function(b,w){var x=d&&d[w],_=w>0?Mt(b,"paddingAngle",0):0;if(x){var S=jt(x.endAngle-x.startAngle,b.endAngle-b.startAngle),O=be(be({},b),{},{startAngle:m+_,endAngle:m+S(v)+_});y.push(O),m=O.endAngle}else{var E=b.endAngle,j=b.startAngle,I=jt(0,E-j),C=I(v),B=be(be({},b),{},{startAngle:m+_,endAngle:m+C+_});y.push(B),m=B.endAngle}}),k.createElement(fe,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!hu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,l=i.className,u=i.label,s=i.cx,f=i.cy,c=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!o||!o.length||!K(s)||!K(f)||!K(c)||!K(d))return null;var v=ie("recharts-pie",l);return k.createElement(fe,{tabIndex:this.props.rootTabIndex,className:v,ref:function(p){r.pieRef=p}},this.renderSectors(),u&&this.renderLabels(o),Qe.renderCallByParent(this.props,null,!1),(!h||g)&&Gn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(k.isValidElement(r))return k.cloneElement(r,i);if(te(r))return r(i);var o=ie("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return k.createElement(Ec,Yi({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,a){if(k.isValidElement(r))return k.cloneElement(r,i);var o=a;if(te(r)&&(o=r(i),k.isValidElement(o)))return o;var l=ie("recharts-pie-label-text",typeof r!="boolean"&&!te(r)?r.className:"");return k.createElement(gi,Yi({},i,{alignmentBaseline:"middle",className:l}),o)}}])}(T.PureComponent);gs=or;Vt(or,"displayName","Pie");Vt(or,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ai.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Vt(or,"parseDeltaAngle",function(e,t){var n=ft(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Vt(or,"getRealPieData",function(e){var t=e.data,n=e.children,r=J(e,!1),i=It(n,Hf);return t&&t.length?t.map(function(a,o){return be(be(be({payload:a},r),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return be(be({},r),a.props)}):[]});Vt(or,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=zA(i,a),l=r+dt(e.cx,i,i/2),u=n+dt(e.cy,a,a/2),s=dt(e.innerRadius,o,0),f=dt(e.outerRadius,o,o*.8),c=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:u,innerRadius:s,outerRadius:f,maxRadius:c}});Vt(or,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?be(be({},t.type.defaultProps),t.props):t.props,i=gs.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,l=r.endAngle,u=r.paddingAngle,s=r.dataKey,f=r.nameKey,c=r.valueKey,d=r.tooltipType,h=Math.abs(r.minAngle),g=gs.parseCoordinateOfPie(r,n),v=gs.parseDeltaAngle(o,l),y=Math.abs(v),p=s;ne(s)&&ne(c)?(Vn(!1,`Use "dataKey" to specify the value of pie,
|
|
130
|
+
A `).concat(g,",").concat(g,",0,0,").concat(s,",").concat(t,",").concat(n+i-l*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},wK=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,l=n.width,u=n.height;if(Math.abs(l)>0&&Math.abs(u)>0){var s=Math.min(a,a+l),f=Math.max(a,a+l),c=Math.min(o,o+u),d=Math.max(o,o+u);return r>=s&&r<=f&&i>=c&&i<=d}return!1},_K={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Zy=function(t){var n=Tw(Tw({},_K),t),r=T.useRef(),i=T.useState(-1),a=hK(i,2),o=a[0],l=a[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&l(w)}catch{}},[]);var u=n.x,s=n.y,f=n.width,c=n.height,d=n.radius,h=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,p=n.isAnimationActive,m=n.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var b=ie("recharts-rectangle",h);return m?k.createElement($n,{canBegin:o>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:v,animationEasing:g,isActive:m},function(w){var x=w.width,_=w.height,S=w.x,O=w.y;return k.createElement($n,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:p,easing:g},k.createElement("path",Cc({},J(n,!0),{className:b,d:jw(S,O,x,_,d),ref:r})))}):k.createElement("path",Cc({},J(n,!0),{className:b,d:jw(u,s,f,c,d)}))},SK=["points","className","baseLinePoints","connectNulls"];function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qi.apply(this,arguments)}function OK(e,t){if(e==null)return{};var n=PK(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kw(e){return TK(e)||$K(e)||EK(e)||AK()}function AK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
131
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EK(e,t){if(e){if(typeof e=="string")return Ev(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ev(e,t)}}function $K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TK(e){if(Array.isArray(e))return Ev(e)}function Ev(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cw=function(t){return t&&t.x===+t.x&&t.y===+t.y},jK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Cw(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Cw(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Yo=function(t,n){var r=jK(t);n&&(r=[r.reduce(function(a,o){return[].concat(kw(a),kw(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,l,u){return"".concat(o).concat(u===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},kK=function(t,n,r){var i=Yo(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Yo(n.reverse(),r).slice(1))},CK=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,o=OK(t,SK);if(!n||!n.length)return null;var l=ie("recharts-polygon",r);if(i&&i.length){var u=o.stroke&&o.stroke!=="none",s=kK(n,i,a);return k.createElement("g",{className:l},k.createElement("path",qi({},J(o,!0),{fill:s.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:s})),u?k.createElement("path",qi({},J(o,!0),{fill:"none",d:Yo(n,a)})):null,u?k.createElement("path",qi({},J(o,!0),{fill:"none",d:Yo(i,a)})):null)}var f=Yo(n,a);return k.createElement("path",qi({},J(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:l,d:f}))};function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$v.apply(this,arguments)}var nd=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ie("recharts-dot",a);return n===+n&&r===+r&&i===+i?T.createElement("circle",$v({},J(t,!1),Ys(t),{className:o,cx:n,cy:r,r:i})):null};function Ul(e){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}var NK=["x","y","top","left","width","height","className"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(this,arguments)}function Nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nw(Object(n),!0).forEach(function(r){IK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IK(e,t,n){return t=DK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DK(e){var t=RK(e,"string");return Ul(t)=="symbol"?t:t+""}function RK(e,t){if(Ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LK(e,t){if(e==null)return{};var n=BK(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var zK=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},FK=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,h=d===void 0?0:d,g=t.className,v=LK(t,NK),y=MK({x:r,y:a,top:l,left:s,width:c,height:h},v);return!K(r)||!K(a)||!K(c)||!K(h)||!K(l)||!K(s)?null:k.createElement("path",Tv({},J(y,!0),{className:ie("recharts-cross",g),d:zK(r,a,c,h,l,s)}))},UK=Qf,WK=hA,HK=Rr;function VK(e,t){return e&&e.length?UK(e,HK(t),WK):void 0}var KK=VK;const GK=ye(KK);var XK=Qf,qK=Rr,YK=pA;function QK(e,t){return e&&e.length?XK(e,qK(t),YK):void 0}var ZK=QK;const JK=ye(ZK);var eG=["cx","cy","angle","ticks","axisLine"],tG=["ticks","tick","angle","tickFormatter","stroke"];function $a(e){"@babel/helpers - typeof";return $a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$a(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(this,arguments)}function Mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(n),!0).forEach(function(r){rd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iw(e,t){if(e==null)return{};var n=nG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nE(r.key),r)}}function iG(e,t,n){return t&&Dw(e.prototype,t),n&&Dw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aG(e,t,n){return t=Nc(t),oG(e,tE()?Reflect.construct(t,n||[],Nc(e).constructor):t.apply(e,n))}function oG(e,t){if(t&&($a(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lG(e)}function lG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tE=function(){return!!e})()}function Nc(e){return Nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nc(e)}function uG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jv(e,t)}function jv(e,t){return jv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jv(e,t)}function rd(e,t,n){return t=nE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nE(e){var t=sG(e,"string");return $a(t)=="symbol"?t:t+""}function sG(e,t){if($a(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($a(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var id=function(e){function t(){return rG(this,t),aG(this,t,arguments)}return uG(t,e),iG(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,o=a.angle,l=a.cx,u=a.cy;return _e(l,u,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,u=GK(l,function(f){return f.coordinate||0}),s=JK(l,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:s.coordinate||0,outerRadius:u.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,u=r.axisLine,s=Iw(r,eG),f=l.reduce(function(g,v){return[Math.min(g[0],v.coordinate),Math.max(g[1],v.coordinate)]},[1/0,-1/0]),c=_e(i,a,f[0],o),d=_e(i,a,f[1],o),h=Hr(Hr(Hr({},J(s,!1)),{},{fill:"none"},J(u,!1)),{},{x1:c.x,y1:c.y,x2:d.x,y2:d.y});return k.createElement("line",Qo({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.angle,u=i.tickFormatter,s=i.stroke,f=Iw(i,tG),c=this.getTickTextAnchor(),d=J(f,!1),h=J(o,!1),g=a.map(function(v,y){var p=r.getTickValueCoord(v),m=Hr(Hr(Hr(Hr({textAnchor:c,transform:"rotate(".concat(90-l,", ").concat(p.x,", ").concat(p.y,")")},d),{},{stroke:"none",fill:s},h),{},{index:y},p),{},{payload:v});return k.createElement(fe,Qo({className:ie("recharts-polar-radius-axis-tick",FA(o)),key:"tick-".concat(v.coordinate)},yi(r.props,v,y)),t.renderTickItem(o,m,u?u(v.value,y):v.value))});return k.createElement(fe,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,o=r.tick;return!i||!i.length?null:k.createElement(fe,{className:ie("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Qe.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return k.isValidElement(r)?o=k.cloneElement(r,i):te(r)?o=r(i):o=k.createElement(gi,Qo({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(T.PureComponent);rd(id,"displayName","PolarRadiusAxis");rd(id,"axisType","radiusAxis");rd(id,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qr.apply(this,arguments)}function Rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rw(Object(n),!0).forEach(function(r){ad(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iE(r.key),r)}}function fG(e,t,n){return t&&Lw(e.prototype,t),n&&Lw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dG(e,t,n){return t=Mc(t),hG(e,rE()?Reflect.construct(t,n||[],Mc(e).constructor):t.apply(e,n))}function hG(e,t){if(t&&(Ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pG(e)}function pG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rE=function(){return!!e})()}function Mc(e){return Mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mc(e)}function vG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kv(e,t)}function kv(e,t){return kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kv(e,t)}function ad(e,t,n){return t=iE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iE(e){var t=mG(e,"string");return Ta(t)=="symbol"?t:t+""}function mG(e,t){if(Ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yG=Math.PI/180,Bw=1e-5,od=function(e){function t(){return cG(this,t),dG(this,t,arguments)}return vG(t,e),fG(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,o=i.cy,l=i.radius,u=i.orientation,s=i.tickSize,f=s||8,c=_e(a,o,l,r.coordinate),d=_e(a,o,l+(u==="inner"?-1:1)*f,r.coordinate);return{x1:c.x,y1:c.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*yG),o;return a>Bw?o=i==="outer"?"start":"end":a<-Bw?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,l=r.axisLine,u=r.axisLineType,s=Vr(Vr({},J(this.props,!1)),{},{fill:"none"},J(l,!1));if(u==="circle")return k.createElement(nd,Qr({className:"recharts-polar-angle-axis-line"},s,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(d){return _e(i,a,o,d.coordinate)});return k.createElement(CK,Qr({className:"recharts-polar-angle-axis-line"},s,{points:c}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.tickLine,u=i.tickFormatter,s=i.stroke,f=J(this.props,!1),c=J(o,!1),d=Vr(Vr({},f),{},{fill:"none"},J(l,!1)),h=a.map(function(g,v){var y=r.getTickLineCoord(g),p=r.getTickTextAnchor(g),m=Vr(Vr(Vr({textAnchor:p},f),{},{stroke:"none",fill:s},c),{},{index:v,payload:g,x:y.x2,y:y.y2});return k.createElement(fe,Qr({className:ie("recharts-polar-angle-axis-tick",FA(o)),key:"tick-".concat(g.coordinate)},yi(r.props,g,v)),l&&k.createElement("line",Qr({className:"recharts-polar-angle-axis-tick-line"},d,y)),o&&t.renderTickItem(o,m,u?u(g.value,v):g.value))});return k.createElement(fe,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:k.createElement(fe,{className:ie("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return k.isValidElement(r)?o=k.cloneElement(r,i):te(r)?o=r(i):o=k.createElement(gi,Qr({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(T.PureComponent);ad(od,"displayName","PolarAngleAxis");ad(od,"axisType","angleAxis");ad(od,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var gG=lP,bG=gG(Object.getPrototypeOf,Object),xG=bG,wG=rr,_G=xG,SG=ir,OG="[object Object]",PG=Function.prototype,AG=Object.prototype,aE=PG.toString,EG=AG.hasOwnProperty,$G=aE.call(Object);function TG(e){if(!SG(e)||wG(e)!=OG)return!1;var t=_G(e);if(t===null)return!0;var n=EG.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&aE.call(n)==$G}var jG=TG;const kG=ye(jG);var CG=rr,NG=ir,MG="[object Boolean]";function IG(e){return e===!0||e===!1||NG(e)&&CG(e)==MG}var DG=IG;const RG=ye(DG);function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}function LG(e,t){return UG(e)||FG(e,t)||zG(e,t)||BG()}function BG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
132
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zG(e,t){if(e){if(typeof e=="string")return zw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zw(e,t)}}function zw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function UG(e){if(Array.isArray(e))return e}function Fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(n),!0).forEach(function(r){WG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WG(e,t,n){return t=HG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HG(e){var t=VG(e,"string");return Wl(t)=="symbol"?t:t+""}function VG(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ww=function(t,n,r,i,a){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+a),l+="L ".concat(t+r-o/2-i,",").concat(n+a),l+="L ".concat(t,",").concat(n," Z"),l},KG={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},GG=function(t){var n=Uw(Uw({},KG),t),r=T.useRef(),i=T.useState(-1),a=LG(i,2),o=a[0],l=a[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&l(b)}catch{}},[]);var u=n.x,s=n.y,f=n.upperWidth,c=n.lowerWidth,d=n.height,h=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,p=n.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||d!==+d||f===0&&c===0||d===0)return null;var m=ie("recharts-trapezoid",h);return p?k.createElement($n,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:v,animationEasing:g,isActive:p},function(b){var w=b.upperWidth,x=b.lowerWidth,_=b.height,S=b.x,O=b.y;return k.createElement($n,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:g},k.createElement("path",Ic({},J(n,!0),{className:m,d:Ww(S,O,w,x,_),ref:r})))}):k.createElement("g",null,k.createElement("path",Ic({},J(n,!0),{className:m,d:Ww(u,s,f,c,d)})))},XG=["option","shapeType","propTransformer","activeClassName","isActive"];function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function qG(e,t){if(e==null)return{};var n=YG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){QG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QG(e,t,n){return t=ZG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZG(e){var t=JG(e,"string");return Hl(t)=="symbol"?t:t+""}function JG(e,t){if(Hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eX(e,t){return Dc(Dc({},t),e)}function tX(e,t){return e==="symbols"}function Vw(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return k.createElement(Zy,n);case"trapezoid":return k.createElement(GG,n);case"sector":return k.createElement(HA,n);case"symbols":if(tX(t))return k.createElement(my,n);break;default:return null}}function nX(e){return T.isValidElement(e)?e.props:e}function oE(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?eX:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=qG(e,XG),s;if(T.isValidElement(t))s=T.cloneElement(t,Dc(Dc({},u),nX(t)));else if(te(t))s=t(u);else if(kG(t)&&!RG(t)){var f=i(t,u);s=k.createElement(Vw,{shapeType:n,elementProps:f})}else{var c=u;s=k.createElement(Vw,{shapeType:n,elementProps:c})}return l?k.createElement(fe,{className:o},s):s}function ld(e,t){return t!=null&&"trapezoids"in e.props}function ud(e,t){return t!=null&&"sectors"in e.props}function Vl(e,t){return t!=null&&"points"in e.props}function rX(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function iX(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function aX(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function oX(e,t){var n;return ld(e,t)?n=rX:ud(e,t)?n=iX:Vl(e,t)&&(n=aX),n}function lX(e,t){var n;return ld(e,t)?n="trapezoids":ud(e,t)?n="sectors":Vl(e,t)&&(n="points"),n}function uX(e,t){if(ld(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ud(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Vl(e,t)?t.payload:{}}function sX(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=lX(n,t),a=uX(n,t),o=r.filter(function(u,s){var f=hu(a,u),c=n.props[i].filter(function(g){var v=oX(n,t);return v(g,t)}),d=n.props[i].indexOf(c[c.length-1]),h=s===d;return f&&h}),l=r.indexOf(o[o.length-1]);return l}var gs;function ja(e){"@babel/helpers - typeof";return ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ja(e)}function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yi.apply(this,arguments)}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kw(Object(n),!0).forEach(function(r){Vt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uE(r.key),r)}}function fX(e,t,n){return t&&Gw(e.prototype,t),n&&Gw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dX(e,t,n){return t=Rc(t),hX(e,lE()?Reflect.construct(t,n||[],Rc(e).constructor):t.apply(e,n))}function hX(e,t){if(t&&(ja(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pX(e)}function pX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lE=function(){return!!e})()}function Rc(e){return Rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rc(e)}function vX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cv(e,t)}function Cv(e,t){return Cv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Cv(e,t)}function Vt(e,t,n){return t=uE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uE(e){var t=mX(e,"string");return ja(t)=="symbol"?t:t+""}function mX(e,t){if(ja(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ja(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var or=function(e){function t(n){var r;return cX(this,t),r=dX(this,t,[n]),Vt(r,"pieRef",null),Vt(r,"sectorRefs",[]),Vt(r,"id",to("recharts-pie-")),Vt(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),te(i)&&i()}),Vt(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),te(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return vX(t,e),fX(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,l=a.labelLine,u=a.dataKey,s=a.valueKey,f=J(this.props,!1),c=J(o,!1),d=J(l,!1),h=o&&o.offsetRadius||20,g=r.map(function(v,y){var p=(v.startAngle+v.endAngle)/2,m=_e(v.cx,v.cy,v.outerRadius+h,p),b=be(be(be(be({},f),v),{},{stroke:"none"},c),{},{index:y,textAnchor:t.getTextAnchor(m.x,v.cx)},m),w=be(be(be(be({},f),v),{},{fill:"none",stroke:v.fill},d),{},{index:y,points:[_e(v.cx,v.cy,v.outerRadius,p),m]}),x=u;return ne(u)&&ne(s)?x="value":ne(u)&&(x=s),k.createElement(fe,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(y)},l&&t.renderLabelLineItem(l,w,"line"),t.renderLabelItem(o,b,Ve(v,x)))});return k.createElement(fe,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.activeShape,l=a.blendStroke,u=a.inactiveShape;return r.map(function(s,f){if((s==null?void 0:s.startAngle)===0&&(s==null?void 0:s.endAngle)===0&&r.length!==1)return null;var c=i.isActiveIndex(f),d=u&&i.hasActiveIndex()?u:null,h=c?o:d,g=be(be({},s),{},{stroke:l?s.fill:s.stroke,tabIndex:-1});return k.createElement(fe,Yi({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},yi(i.props,s,f),{key:"sector-".concat(s==null?void 0:s.startAngle,"-").concat(s==null?void 0:s.endAngle,"-").concat(s.midAngle,"-").concat(f)}),k.createElement(oE,Yi({option:h,isActive:c,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,o=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,s=i.animationEasing,f=i.animationId,c=this.state,d=c.prevSectors,h=c.prevIsAnimationActive;return k.createElement($n,{begin:l,duration:u,isActive:o,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var v=g.t,y=[],p=a&&a[0],m=p.startAngle;return a.forEach(function(b,w){var x=d&&d[w],_=w>0?Mt(b,"paddingAngle",0):0;if(x){var S=jt(x.endAngle-x.startAngle,b.endAngle-b.startAngle),O=be(be({},b),{},{startAngle:m+_,endAngle:m+S(v)+_});y.push(O),m=O.endAngle}else{var E=b.endAngle,j=b.startAngle,I=jt(0,E-j),C=I(v),B=be(be({},b),{},{startAngle:m+_,endAngle:m+C+_});y.push(B),m=B.endAngle}}),k.createElement(fe,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!hu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,l=i.className,u=i.label,s=i.cx,f=i.cy,c=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!o||!o.length||!K(s)||!K(f)||!K(c)||!K(d))return null;var v=ie("recharts-pie",l);return k.createElement(fe,{tabIndex:this.props.rootTabIndex,className:v,ref:function(p){r.pieRef=p}},this.renderSectors(),u&&this.renderLabels(o),Qe.renderCallByParent(this.props,null,!1),(!h||g)&&Gn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(k.isValidElement(r))return k.cloneElement(r,i);if(te(r))return r(i);var o=ie("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return k.createElement(Ec,Yi({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,a){if(k.isValidElement(r))return k.cloneElement(r,i);var o=a;if(te(r)&&(o=r(i),k.isValidElement(o)))return o;var l=ie("recharts-pie-label-text",typeof r!="boolean"&&!te(r)?r.className:"");return k.createElement(gi,Yi({},i,{alignmentBaseline:"middle",className:l}),o)}}])}(T.PureComponent);gs=or;Vt(or,"displayName","Pie");Vt(or,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ai.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Vt(or,"parseDeltaAngle",function(e,t){var n=ft(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Vt(or,"getRealPieData",function(e){var t=e.data,n=e.children,r=J(e,!1),i=It(n,Hf);return t&&t.length?t.map(function(a,o){return be(be(be({payload:a},r),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return be(be({},r),a.props)}):[]});Vt(or,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=zA(i,a),l=r+dt(e.cx,i,i/2),u=n+dt(e.cy,a,a/2),s=dt(e.innerRadius,o,0),f=dt(e.outerRadius,o,o*.8),c=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:u,innerRadius:s,outerRadius:f,maxRadius:c}});Vt(or,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?be(be({},t.type.defaultProps),t.props):t.props,i=gs.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,l=r.endAngle,u=r.paddingAngle,s=r.dataKey,f=r.nameKey,c=r.valueKey,d=r.tooltipType,h=Math.abs(r.minAngle),g=gs.parseCoordinateOfPie(r,n),v=gs.parseDeltaAngle(o,l),y=Math.abs(v),p=s;ne(s)&&ne(c)?(Vn(!1,`Use "dataKey" to specify the value of pie,
|
|
134
133
|
the props "valueKey" will be deprecated in 1.1.0`),p="value"):ne(s)&&(Vn(!1,`Use "dataKey" to specify the value of pie,
|
|
135
|
-
the props "valueKey" will be deprecated in 1.1.0`),p=c);var m=i.filter(function(O){return Ve(O,p,0)!==0}).length,b=(y>=360?m:m-1)*u,w=y-m*h-b,x=i.reduce(function(O,E){var j=Ve(E,p,0);return O+(K(j)?j:0)},0),_;if(x>0){var S;_=i.map(function(O,E){var j=Ve(O,p,0),I=Ve(O,f,E),C=(K(j)?j:0)/x,B;E?B=S.endAngle+ft(v)*u*(j!==0?1:0):B=o;var A=B+ft(v)*((j!==0?h:0)+C*w),M=(B+A)/2,$=(g.innerRadius+g.outerRadius)/2,D=[{name:I,value:j,payload:O,dataKey:p,type:d}],N=_e(g.cx,g.cy,$,M);return S=be(be(be({percent:C,cornerRadius:a,name:I,tooltipPayload:D,midAngle:M,middleRadius:$,tooltipPosition:N},O),g),{},{value:Ve(O,p),startAngle:B,endAngle:A,payload:O,paddingAngle:ft(v)*u}),S})}return be(be({},g),{},{sectors:_,data:i})});var mX=Math.ceil,yX=Math.max;function gX(e,t,n,r){for(var i=-1,a=yX(mX((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var bX=gX,xX=PP,Xw=1/0,wX=17976931348623157e292;function _X(e){if(!e)return e===0?e:0;if(e=xX(e),e===Xw||e===-Xw){var t=e<0?-1:1;return t*wX}return e===e?e:0}var SX=_X,OX=bX,PX=Wf,gh=SX;function AX(e){return function(t,n,r){return r&&typeof r!="number"&&PX(t,n,r)&&(n=r=void 0),t=gh(t),n===void 0?(n=t,t=0):n=gh(n),r=r===void 0?t<n?1:-1:gh(r),OX(t,n,r,e)}}var EX=AX,$X=EX,TX=$X(),jX=TX;const Lc=ye(jX);function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qw(Object(n),!0).forEach(function(r){sE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sE(e,t,n){return t=kX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kX(e){var t=CX(e,"string");return Kl(t)=="symbol"?t:t+""}function CX(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NX=["Webkit","Moz","O","ms"],MX=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=NX.reduce(function(a,o){return Yw(Yw({},a),{},sE({},o+r,n))},{});return i[t]=n,i};function ka(e){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(e)}function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qw(Object(n),!0).forEach(function(r){Et(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fE(r.key),r)}}function DX(e,t,n){return t&&Zw(e.prototype,t),n&&Zw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RX(e,t,n){return t=zc(t),LX(e,cE()?Reflect.construct(t,n||[],zc(e).constructor):t.apply(e,n))}function LX(e,t){if(t&&(ka(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BX(e)}function BX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cE=function(){return!!e})()}function zc(e){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zc(e)}function zX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nv(e,t)}function Nv(e,t){return Nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nv(e,t)}function Et(e,t,n){return t=fE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fE(e){var t=FX(e,"string");return ka(t)=="symbol"?t:t+""}function FX(e,t){if(ka(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ka(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UX=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var u=n.length,s=Go().domain(Lc(0,u)).range([a,a+o-l]),f=s.domain().map(function(c){return s(c)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:s(r),endX:s(i),scale:s,scaleValues:f}},Jw=function(t){return t.changedTouches&&!!t.changedTouches.length},Ca=function(e){function t(n){var r;return IX(this,t),r=RX(this,t,[n]),Et(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Et(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Et(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),r.detachDragEndListener()}),Et(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Et(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Et(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Et(r,"handleSlideDragStart",function(i){var a=Jw(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return zX(t,e),DX(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,l=this.props,u=l.gap,s=l.data,f=s.length-1,c=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,c),g=t.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:g===f?f:g-g%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=Ve(a[r],l,r);return te(o)?o(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,h=u.endIndex,g=u.onChange,v=r.pageX-a;v>0?v=Math.min(v,s+f-c-l,s+f-c-o):v<0&&(v=Math.max(v,s-o,s-l));var y=this.getIndex({startX:o+v,endX:l+v});(y.startIndex!==d||y.endIndex!==h)&&g&&g(y),this.setState({startX:o+v,endX:l+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=Jw(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,s=this.state[o],f=this.props,c=f.x,d=f.width,h=f.travellerWidth,g=f.onChange,v=f.gap,y=f.data,p={startX:this.state.startX,endX:this.state.endX},m=r.pageX-a;m>0?m=Math.min(m,c+d-h-s):m<0&&(m=Math.max(m,c-s)),p[o]=s+m;var b=this.getIndex(p),w=b.startIndex,x=b.endIndex,_=function(){var O=y.length-1;return o==="startX"&&(l>u?w%v===0:x%v===0)||l<u&&x===O||o==="endX"&&(l>u?x%v===0:w%v===0)||l>u&&x===O};this.setState(Et(Et({},o,s+m),"brushMoveStartX",r.pageX),function(){g&&_()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,s=o.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+r;if(!(d===-1||d>=l.length)){var h=l[d];i==="startX"&&h>=s||i==="endX"&&h<=u||this.setState(Et({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.fill,s=r.stroke;return k.createElement("rect",{stroke:s,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.data,s=r.children,f=r.padding,c=T.Children.only(s);return c?k.cloneElement(c,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,l=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,h=u.ariaLabel,g=u.data,v=u.startIndex,y=u.endIndex,p=Math.max(r,this.props.x),m=bh(bh({},J(this.props,!1)),{},{x:p,y:s,width:f,height:c}),b=h||"Min value: ".concat((a=g[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=g[y])===null||o===void 0?void 0:o.name);return k.createElement(fe,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),l.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,m))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,s=a.travellerWidth,f=Math.min(r,i)+s,c=Math.max(Math.abs(i-r)-s,0);return k.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:c,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,l=r.height,u=r.travellerWidth,s=r.stroke,f=this.state,c=f.startX,d=f.endX,h=5,g={pointerEvents:"none",fill:s};return k.createElement(fe,{className:"recharts-brush-texts"},k.createElement(gi,Bc({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:o+l/2},g),this.getTextOfTick(i)),k.createElement(gi,Bc({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+h,y:o+l/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,l=r.x,u=r.y,s=r.width,f=r.height,c=r.alwaysShowText,d=this.state,h=d.startX,g=d.endX,v=d.isTextActive,y=d.isSlideMoving,p=d.isTravellerMoving,m=d.isTravellerFocused;if(!i||!i.length||!K(l)||!K(u)||!K(s)||!K(f)||s<=0||f<=0)return null;var b=ie("recharts-brush",a),w=k.Children.count(o)===1,x=MX("userSelect","none");return k.createElement(fe,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(h,g),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(g,"endX"),(v||y||p||m||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,l=r.height,u=r.stroke,s=Math.floor(a+l/2)-1;return k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),k.createElement("line",{x1:i+1,y1:s,x2:i+o-1,y2:s,fill:"none",stroke:"#fff"}),k.createElement("line",{x1:i+1,y1:s+2,x2:i+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return k.isValidElement(r)?a=k.cloneElement(r,i):te(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,l=r.x,u=r.travellerWidth,s=r.updateId,f=r.startIndex,c=r.endIndex;if(a!==i.prevData||s!==i.prevUpdateId)return bh({prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o},a&&a.length?UX({data:a,width:o,x:l,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);r[u]>i?l=u:o=u}return i>=r[l]?l:o}}])}(T.PureComponent);Et(Ca,"displayName","Brush");Et(Ca,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var WX=Oy;function HX(e,t){var n;return WX(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var VX=HX,KX=JO,GX=Rr,XX=VX,qX=Pt,YX=Wf;function QX(e,t,n){var r=qX(e)?KX:XX;return n&&YX(e,t,n)&&(t=void 0),r(e,GX(t))}var ZX=QX;const JX=ye(ZX);var An=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},e1=xP;function eq(e,t,n){t=="__proto__"&&e1?e1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tq=eq,nq=tq,rq=gP,iq=Rr;function aq(e,t){var n={};return t=iq(t),rq(e,function(r,i,a){nq(n,i,t(r,i,a))}),n}var oq=aq;const lq=ye(oq);function uq(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var sq=uq,cq=Oy;function fq(e,t){var n=!0;return cq(e,function(r,i,a){return n=!!t(r,i,a),n}),n}var dq=fq,hq=sq,pq=dq,vq=Rr,mq=Pt,yq=Wf;function gq(e,t,n){var r=mq(e)?hq:pq;return n&&yq(e,t,n)&&(t=void 0),r(e,vq(t))}var bq=gq;const xq=ye(bq);var wq=["x","y"];function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(this,arguments)}function t1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t1(Object(n),!0).forEach(function(r){_q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _q(e,t,n){return t=Sq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sq(e){var t=Oq(e,"string");return Gl(t)=="symbol"?t:t+""}function Oq(e,t){if(Gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pq(e,t){if(e==null)return{};var n=Aq(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Aq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Eq(e,t){var n=e.x,r=e.y,i=Pq(e,wq),a="".concat(n),o=parseInt(a,10),l="".concat(r),u=parseInt(l,10),s="".concat(t.height||i.height),f=parseInt(s,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Ao(Ao(Ao(Ao(Ao({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function n1(e){return k.createElement(oE,Mv({shapeType:"rectangle",propTransformer:Eq,activeClassName:"recharts-active-bar"},e))}var $q=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=K(r)||BM(r);return a?t(r,i):(a||wi(),n)}},Tq=["value","background"],dE;function Na(e){"@babel/helpers - typeof";return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}function jq(e,t){if(e==null)return{};var n=kq(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function r1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r1(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pE(r.key),r)}}function Nq(e,t,n){return t&&i1(e.prototype,t),n&&i1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mq(e,t,n){return t=Uc(t),Iq(e,hE()?Reflect.construct(t,n||[],Uc(e).constructor):t.apply(e,n))}function Iq(e,t){if(t&&(Na(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dq(e)}function Dq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hE=function(){return!!e})()}function Uc(e){return Uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uc(e)}function Rq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Iv(e,t)}function Iv(e,t){return Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Iv(e,t)}function yr(e,t,n){return t=pE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pE(e){var t=Lq(e,"string");return Na(t)=="symbol"?t:t+""}function Lq(e,t){if(Na(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Na(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vu=function(e){function t(){var n;Cq(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Mq(this,t,[].concat(i)),yr(n,"state",{isAnimationFinished:!1}),yr(n,"id",to("recharts-bar-")),yr(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),yr(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return Rq(t,e),Nq(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,l=a.dataKey,u=a.activeIndex,s=a.activeBar,f=J(this.props,!1);return r&&r.map(function(c,d){var h=d===u,g=h?s:o,v=Re(Re(Re({},f),c),{},{isActive:h,option:g,index:d,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return k.createElement(fe,Fc({className:"recharts-bar-rectangle"},yi(i.props,c,d),{key:"rectangle-".concat(c==null?void 0:c.x,"-").concat(c==null?void 0:c.y,"-").concat(c==null?void 0:c.value,"-").concat(d)}),k.createElement(n1,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,u=i.animationBegin,s=i.animationDuration,f=i.animationEasing,c=i.animationId,d=this.state.prevData;return k.createElement($n,{begin:u,duration:s,isActive:l,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var g=h.t,v=a.map(function(y,p){var m=d&&d[p];if(m){var b=jt(m.x,y.x),w=jt(m.y,y.y),x=jt(m.width,y.width),_=jt(m.height,y.height);return Re(Re({},y),{},{x:b(g),y:w(g),width:x(g),height:_(g)})}if(o==="horizontal"){var S=jt(0,y.height),O=S(g);return Re(Re({},y),{},{y:y.y+y.height-O,height:O})}var E=jt(0,y.width),j=E(g);return Re(Re({},y),{},{width:j})});return k.createElement(fe,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!hu(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,u=J(this.props.background,!1);return a.map(function(s,f){s.value;var c=s.background,d=jq(s,Tq);if(!c)return null;var h=Re(Re(Re(Re(Re({},d),{},{fill:"#eee"},c),u),yi(r.props,s,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return k.createElement(n1,Fc({key:"background-bar-".concat(f),option:r.props.background,isActive:f===l},h))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=It(f,pu);if(!c)return null;var d=s==="vertical"?o[0].height/2:o[0].width/2,h=function(y,p){var m=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:m,errorVal:Ve(y,p)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return k.createElement(fe,g,c.map(function(v){return k.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,l=r.xAxis,u=r.yAxis,s=r.left,f=r.top,c=r.width,d=r.height,h=r.isAnimationActive,g=r.background,v=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,p=ie("recharts-bar",o),m=l&&l.allowDataOverflow,b=u&&u.allowDataOverflow,w=m||b,x=ne(v)?this.id:v;return k.createElement(fe,{className:p},m||b?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(x)},k.createElement("rect",{x:m?s:s-c/2,y:b?f:f-d/2,width:m?c:c*2,height:b?d:d*2}))):null,k.createElement(fe,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(x,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,x),(!h||y)&&Gn.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(T.PureComponent);dE=vu;yr(vu,"displayName","Bar");yr(vu,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ai.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});yr(vu,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,s=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,h=d7(r,n);if(!h)return null;var g=t.layout,v=n.type.defaultProps,y=v!==void 0?Re(Re({},v),n.props):n.props,p=y.dataKey,m=y.children,b=y.minPointSize,w=g==="horizontal"?o:a,x=s?w.scale.domain():null,_=b7({numericAxis:w}),S=It(m,Hf),O=c.map(function(E,j){var I,C,B,A,M,$;s?I=h7(s[f+j],x):(I=Ve(E,p),Array.isArray(I)||(I=[_,I]));var D=$q(b,dE.defaultProps.minPointSize)(I[1],j);if(g==="horizontal"){var N,R=[o.scale(I[0]),o.scale(I[1])],L=R[0],W=R[1];C=Yx({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:E,index:j}),B=(N=W??L)!==null&&N!==void 0?N:void 0,A=h.size;var U=L-W;if(M=Number.isNaN(U)?0:U,$={x:C,y:o.y,width:A,height:o.height},Math.abs(D)>0&&Math.abs(M)<Math.abs(D)){var X=ft(M||D)*(Math.abs(D)-Math.abs(M));B-=X,M+=X}}else{var Z=[a.scale(I[0]),a.scale(I[1])],ae=Z[0],F=Z[1];if(C=ae,B=Yx({axis:o,ticks:u,bandSize:i,offset:h.offset,entry:E,index:j}),A=F-ae,M=h.size,$={x:a.x,y:B,width:a.width,height:M},Math.abs(D)>0&&Math.abs(A)<Math.abs(D)){var Q=ft(A||D)*(Math.abs(D)-Math.abs(A));A+=Q}}return Re(Re(Re({},E),{},{x:C,y:B,width:A,height:M,value:s?I:I[1],payload:E,background:$},S&&S[j]&&S[j].props),{},{tooltipPayload:[LA(n,E)],tooltipPosition:{x:C+A/2,y:B+M/2}})});return Re({data:O,layout:g},d)});function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function Bq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vE(r.key),r)}}function zq(e,t,n){return t&&a1(e.prototype,t),n&&a1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(n),!0).forEach(function(r){sd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sd(e,t,n){return t=vE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(e){var t=Fq(e,"string");return Xl(t)=="symbol"?t:t+""}function Fq(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uq=function(t,n,r,i,a){var o=t.width,l=t.height,u=t.layout,s=t.children,f=Object.keys(n),c={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},d=!!Tt(s,vu);return f.reduce(function(h,g){var v=n[g],y=v.orientation,p=v.domain,m=v.padding,b=m===void 0?{}:m,w=v.mirror,x=v.reversed,_="".concat(y).concat(w?"Mirror":""),S,O,E,j,I;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var C=p[1]-p[0],B=1/0,A=v.categoricalDomain.sort(UM);if(A.forEach(function(Z,ae){ae>0&&(B=Math.min((Z||0)-(A[ae-1]||0),B))}),Number.isFinite(B)){var M=B/C,$=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(S=M*$/2),v.padding==="no-gap"){var D=dt(t.barCategoryGap,M*$),N=M*$/2;S=N-D-(N-D)/$*D}}}i==="xAxis"?O=[r.left+(b.left||0)+(S||0),r.left+r.width-(b.right||0)-(S||0)]:i==="yAxis"?O=u==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(S||0),r.top+r.height-(b.bottom||0)-(S||0)]:O=v.range,x&&(O=[O[1],O[0]]);var R=MA(v,a,d),L=R.scale,W=R.realScaleType;L.domain(p).range(O),IA(L);var U=DA(L,on(on({},v),{},{realScaleType:W}));i==="xAxis"?(I=y==="top"&&!w||y==="bottom"&&w,E=r.left,j=c[_]-I*v.height):i==="yAxis"&&(I=y==="left"&&!w||y==="right"&&w,E=c[_]-I*v.width,j=r.top);var X=on(on(on({},v),U),{},{realScaleType:W,x:E,y:j,scale:L,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return X.bandSize=Oc(X,U),!v.hide&&i==="xAxis"?c[_]+=(I?-1:1)*X.height:v.hide||(c[_]+=(I?-1:1)*X.width),on(on({},h),{},sd({},g,X))},{})},mE=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},Wq=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return mE({x:n,y:r},{x:i,y:a})},yE=function(){function e(t){Bq(this,e),this.scale=t}return zq(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();sd(yE,"EPS",1e-4);var Jy=function(t){var n=Object.keys(t).reduce(function(r,i){return on(on({},r),{},sd({},i,yE.create(t[i])))},{});return on(on({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return lq(i,function(u,s){return n[s].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return xq(i,function(a,o){return n[o].isInRange(a)})}})};function Hq(e){return(e%180+180)%180}var Vq=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Hq(i),o=a*Math.PI/180,l=Math.atan(r/n),u=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(u)},Kq=VN(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),gE=T.createContext(void 0),bE=T.createContext(void 0),xE=T.createContext(void 0),Gq=T.createContext({}),wE=T.createContext(void 0),_E=T.createContext(0),SE=T.createContext(0),l1=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,l=t.children,u=t.width,s=t.height,f=Kq(a);return k.createElement(gE.Provider,{value:r},k.createElement(bE.Provider,{value:i},k.createElement(Gq.Provider,{value:a},k.createElement(xE.Provider,{value:f},k.createElement(wE.Provider,{value:o},k.createElement(_E.Provider,{value:s},k.createElement(SE.Provider,{value:u},l)))))))},Xq=function(){return T.useContext(wE)},OE=function(t){var n=T.useContext(gE);n==null&&wi();var r=n[t];return r==null&&wi(),r},PE=function(t){var n=T.useContext(bE);n==null&&wi();var r=n[t];return r==null&&wi(),r},qq=function(){var t=T.useContext(xE);return t},AE=function(){return T.useContext(SE)},EE=function(){return T.useContext(_E)};function Ma(e){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function Yq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TE(r.key),r)}}function Zq(e,t,n){return t&&Qq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jq(e,t,n){return t=Wc(t),eY(e,$E()?Reflect.construct(t,n||[],Wc(e).constructor):t.apply(e,n))}function eY(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tY(e)}function tY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($E=function(){return!!e})()}function Wc(e){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wc(e)}function nY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dv(e,t)}function Dv(e,t){return Dv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dv(e,t)}function u1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u1(Object(n),!0).forEach(function(r){eg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eg(e,t,n){return t=TE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TE(e){var t=rY(e,"string");return Ma(t)=="symbol"?t:t+""}function rY(e,t){if(Ma(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ma(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function iY(e,t){return uY(e)||lY(e,t)||oY(e,t)||aY()}function aY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oY(e,t){if(e){if(typeof e=="string")return c1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c1(e,t)}}function c1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function uY(e){if(Array.isArray(e))return e}function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rv.apply(this,arguments)}var sY=function(t,n){var r;return k.isValidElement(t)?r=k.cloneElement(t,n):te(t)?r=t(n):r=k.createElement("line",Rv({},n,{className:"recharts-reference-line-line"})),r},cY=function(t,n,r,i,a,o,l,u,s){var f=a.x,c=a.y,d=a.width,h=a.height;if(r){var g=s.y,v=t.y.apply(g,{position:o});if(An(s,"discard")&&!t.y.isInRange(v))return null;var y=[{x:f+d,y:v},{x:f,y:v}];return u==="left"?y.reverse():y}if(n){var p=s.x,m=t.x.apply(p,{position:o});if(An(s,"discard")&&!t.x.isInRange(m))return null;var b=[{x:m,y:c+h},{x:m,y:c}];return l==="top"?b.reverse():b}if(i){var w=s.segment,x=w.map(function(_){return t.apply(_,{position:o})});return An(s,"discard")&&JX(x,function(_){return!t.isInRange(_)})?null:x}return null};function fY(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,u=e.alwaysShow,s=Xq(),f=OE(i),c=PE(a),d=qq();if(!s||!d)return null;Vn(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Jy({x:f.scale,y:c.scale}),g=Ge(t),v=Ge(n),y=r&&r.length===2,p=cY(h,g,v,y,d,e.position,f.orientation,c.orientation,e);if(!p)return null;var m=iY(p,2),b=m[0],w=b.x,x=b.y,_=m[1],S=_.x,O=_.y,E=An(e,"hidden")?"url(#".concat(s,")"):void 0,j=s1(s1({clipPath:E},J(e,!0)),{},{x1:w,y1:x,x2:S,y2:O});return k.createElement(fe,{className:ie("recharts-reference-line",l)},sY(o,j),Qe.renderCallByParent(e,Wq({x1:w,y1:x,x2:S,y2:O})))}var tg=function(e){function t(){return Yq(this,t),Jq(this,t,arguments)}return nY(t,e),Zq(t,[{key:"render",value:function(){return k.createElement(fY,this.props)}}])}(k.Component);eg(tg,"displayName","ReferenceLine");eg(tg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(this,arguments)}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(e)}function f1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function d1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(n),!0).forEach(function(r){cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kE(r.key),r)}}function pY(e,t,n){return t&&hY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vY(e,t,n){return t=Hc(t),mY(e,jE()?Reflect.construct(t,n||[],Hc(e).constructor):t.apply(e,n))}function mY(e,t){if(t&&(Ia(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yY(e)}function yY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jE=function(){return!!e})()}function Hc(e){return Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hc(e)}function gY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bv(e,t)}function Bv(e,t){return Bv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bv(e,t)}function cd(e,t,n){return t=kE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kE(e){var t=bY(e,"string");return Ia(t)=="symbol"?t:t+""}function bY(e,t){if(Ia(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xY=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=Jy({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return An(t,"discard")&&!o.isInRange(l)?null:l},fd=function(e){function t(){return dY(this,t),vY(this,t,arguments)}return gY(t,e),pY(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,l=r.alwaysShow,u=r.clipPathId,s=Ge(i),f=Ge(a);if(Vn(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!f)return null;var c=xY(this.props);if(!c)return null;var d=c.x,h=c.y,g=this.props,v=g.shape,y=g.className,p=An(this.props,"hidden")?"url(#".concat(u,")"):void 0,m=d1(d1({clipPath:p},J(this.props,!0)),{},{cx:d,cy:h});return k.createElement(fe,{className:ie("recharts-reference-dot",y)},t.renderDot(v,m),Qe.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(k.Component);cd(fd,"displayName","ReferenceDot");cd(fd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});cd(fd,"renderDot",function(e,t){var n;return k.isValidElement(e)?n=k.cloneElement(e,t):te(e)?n=e(t):n=k.createElement(nd,Lv({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zv.apply(this,arguments)}function Da(e){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}function h1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h1(Object(n),!0).forEach(function(r){dd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NE(r.key),r)}}function SY(e,t,n){return t&&_Y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OY(e,t,n){return t=Vc(t),PY(e,CE()?Reflect.construct(t,n||[],Vc(e).constructor):t.apply(e,n))}function PY(e,t){if(t&&(Da(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AY(e)}function AY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CE=function(){return!!e})()}function Vc(e){return Vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vc(e)}function EY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fv(e,t)}function Fv(e,t){return Fv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fv(e,t)}function dd(e,t,n){return t=NE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NE(e){var t=$Y(e,"string");return Da(t)=="symbol"?t:t+""}function $Y(e,t){if(Da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TY=function(t,n,r,i,a){var o=a.x1,l=a.x2,u=a.y1,s=a.y2,f=a.xAxis,c=a.yAxis;if(!f||!c)return null;var d=Jy({x:f.scale,y:c.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:r?d.y.apply(u,{position:"start"}):d.y.rangeMin},g={x:n?d.x.apply(l,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(s,{position:"end"}):d.y.rangeMax};return An(a,"discard")&&(!d.isInRange(h)||!d.isInRange(g))?null:mE(h,g)},hd=function(e){function t(){return wY(this,t),OY(this,t,arguments)}return EY(t,e),SY(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,l=r.y2,u=r.className,s=r.alwaysShow,f=r.clipPathId;Vn(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=Ge(i),d=Ge(a),h=Ge(o),g=Ge(l),v=this.props.shape;if(!c&&!d&&!h&&!g&&!v)return null;var y=TY(c,d,h,g,this.props);if(!y&&!v)return null;var p=An(this.props,"hidden")?"url(#".concat(f,")"):void 0;return k.createElement(fe,{className:ie("recharts-reference-area",u)},t.renderRect(v,p1(p1({clipPath:p},J(this.props,!0)),y)),Qe.renderCallByParent(this.props,y))}}])}(k.Component);dd(hd,"displayName","ReferenceArea");dd(hd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dd(hd,"renderRect",function(e,t){var n;return k.isValidElement(e)?n=k.cloneElement(e,t):te(e)?n=e(t):n=k.createElement(Zy,zv({},t,{className:"recharts-reference-area-rect"})),n});function ME(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function jY(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Vq(r,n)}function kY(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function Kc(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function CY(e,t){return ME(e,t+1)}function NY(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,l=t.end,u=0,s=1,f=o,c=function(){var g=r==null?void 0:r[u];if(g===void 0)return{v:ME(r,s)};var v=u,y,p=function(){return y===void 0&&(y=n(g,v)),y},m=g.coordinate,b=u===0||Kc(e,m,p,f,l);b||(u=0,f=o,s+=1),b&&(f=m+e*(p()/2+i),u+=s)},d;s<=a.length;)if(d=c(),d)return d.v;return[]}function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function v1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){MY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MY(e,t,n){return t=IY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IY(e){var t=DY(e,"string");return ql(t)=="symbol"?t:t+""}function DY(e,t){if(ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RY(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,l=t.start,u=t.end,s=function(d){var h=a[d],g,v=function(){return g===void 0&&(g=n(h,d)),g};if(d===o-1){var y=e*(h.coordinate+e*v()/2-u);a[d]=h=ot(ot({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate})}else a[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var p=Kc(e,h.tickCoord,v,l,u);p&&(u=h.tickCoord-e*(v()/2+i),a[d]=ot(ot({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)s(f);return a}function LY(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,u=t.start,s=t.end;if(a){var f=r[l-1],c=n(f,l-1),d=e*(f.coordinate+e*c/2-s);o[l-1]=f=ot(ot({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Kc(e,f.tickCoord,function(){return c},u,s);h&&(s=f.tickCoord-e*(c/2+i),o[l-1]=ot(ot({},f),{},{isShow:!0}))}for(var g=a?l-1:l,v=function(m){var b=o[m],w,x=function(){return w===void 0&&(w=n(b,m)),w};if(m===0){var _=e*(b.coordinate-e*x()/2-u);o[m]=b=ot(ot({},b),{},{tickCoord:_<0?b.coordinate-_*e:b.coordinate})}else o[m]=b=ot(ot({},b),{},{tickCoord:b.coordinate});var S=Kc(e,b.tickCoord,x,u,s);S&&(u=b.tickCoord+e*(x()/2+i),o[m]=ot(ot({},b),{},{isShow:!0}))},y=0;y<g;y++)v(y);return o}function BY(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,u=e.interval,s=e.tickFormatter,f=e.unit,c=e.angle;if(!i||!i.length||!r)return[];if(K(u)||Ai.isSsr)return CY(i,typeof u=="number"&&K(u)?u:0);var d=[],h=l==="top"||l==="bottom"?"width":"height",g=f&&h==="width"?Ko(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(b,w){var x=te(s)?s(b.value,w):b.value;return h==="width"?jY(Ko(x,{fontSize:t,letterSpacing:n}),g,c):Ko(x,{fontSize:t,letterSpacing:n})[h]},y=i.length>=2?ft(i[1].coordinate-i[0].coordinate):1,p=kY(a,y,h);return u==="equidistantPreserveStart"?NY(y,p,v,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=LY(y,p,v,i,o,u==="preserveStartEnd"):d=RY(y,p,v,i,o),d.filter(function(m){return m.isShow}))}var zY=["viewBox"],FY=["viewBox"],UY=["ticks"];function Ra(e){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function m1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m1(Object(n),!0).forEach(function(r){ng(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xh(e,t){if(e==null)return{};var n=WY(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DE(r.key),r)}}function VY(e,t,n){return t&&y1(e.prototype,t),n&&y1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function KY(e,t,n){return t=Gc(t),GY(e,IE()?Reflect.construct(t,n||[],Gc(e).constructor):t.apply(e,n))}function GY(e,t){if(t&&(Ra(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XY(e)}function XY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IE=function(){return!!e})()}function Gc(e){return Gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gc(e)}function qY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uv(e,t)}function Uv(e,t){return Uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uv(e,t)}function ng(e,t,n){return t=DE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e){var t=YY(e,"string");return Ra(t)=="symbol"?t:t+""}function YY(e,t){if(Ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pd=function(e){function t(n){var r;return HY(this,t),r=KY(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return qY(t,e),VY(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=xh(r,zY),l=this.props,u=l.viewBox,s=xh(l,FY);return!aa(a,u)||!aa(o,s)||!aa(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,l=i.width,u=i.height,s=i.orientation,f=i.tickSize,c=i.mirror,d=i.tickMargin,h,g,v,y,p,m,b=c?-1:1,w=r.tickSize||f,x=K(r.tickCoord)?r.tickCoord:r.coordinate;switch(s){case"top":h=g=r.coordinate,y=o+ +!c*u,v=y-b*w,m=v-b*d,p=x;break;case"left":v=y=r.coordinate,g=a+ +!c*l,h=g-b*w,p=h-b*d,m=x;break;case"right":v=y=r.coordinate,g=a+ +c*l,h=g+b*w,p=h+b*d,m=x;break;default:h=g=r.coordinate,y=o+ +c*u,v=y+b*w,m=v+b*d,p=x;break}return{line:{x1:h,y1:v,x2:g,y2:y},tick:{x:p,y:m}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.orientation,s=r.mirror,f=r.axisLine,c=Ue(Ue(Ue({},J(this.props,!1)),J(f,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!s||u==="bottom"&&s);c=Ue(Ue({},c),{},{x1:i,y1:a+d*l,x2:i+o,y2:a+d*l})}else{var h=+(u==="left"&&!s||u==="right"&&s);c=Ue(Ue({},c),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+l})}return k.createElement("line",Qi({},c,{className:ie("recharts-cartesian-axis-line",Mt(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,l=this.props,u=l.tickLine,s=l.stroke,f=l.tick,c=l.tickFormatter,d=l.unit,h=BY(Ue(Ue({},this.props),{},{ticks:r}),i,a),g=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),y=J(this.props,!1),p=J(f,!1),m=Ue(Ue({},y),{},{fill:"none"},J(u,!1)),b=h.map(function(w,x){var _=o.getTickLineCoord(w),S=_.line,O=_.tick,E=Ue(Ue(Ue(Ue({textAnchor:g,verticalAnchor:v},y),{},{stroke:"none",fill:s},p),O),{},{index:x,payload:w,visibleTicksCount:h.length,tickFormatter:c});return k.createElement(fe,Qi({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},yi(o.props,w,x)),u&&k.createElement("line",Qi({},m,S,{className:ie("recharts-cartesian-axis-tick-line",Mt(u,"className"))})),f&&t.renderTickItem(f,E,"".concat(te(c)?c(w.value,x):w.value).concat(d||"")))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,u=i.ticksGenerator,s=i.className,f=i.hide;if(f)return null;var c=this.props,d=c.ticks,h=xh(c,UY),g=d;return te(u)&&(g=d&&d.length>0?u(this.props):u(h)),o<=0||l<=0||!g||!g.length?null:k.createElement(fe,{className:ie("recharts-cartesian-axis",s),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Qe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,l=ie(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(r)?o=k.cloneElement(r,Ue(Ue({},i),{},{className:l})):te(r)?o=r(Ue(Ue({},i),{},{className:l})):o=k.createElement(gi,Qi({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(T.Component);ng(pd,"displayName","CartesianAxis");ng(pd,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var QY=["type","layout","connectNulls","ref"],ZY=["key"];function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function g1(e,t){if(e==null)return{};var n=JY(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(this,arguments)}function b1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(n),!0).forEach(function(r){ln(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mi(e){return rQ(e)||nQ(e)||tQ(e)||eQ()}function eQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
137
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tQ(e,t){if(e){if(typeof e=="string")return Wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wv(e,t)}}function nQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rQ(e){if(Array.isArray(e))return Wv(e)}function Wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LE(r.key),r)}}function aQ(e,t,n){return t&&x1(e.prototype,t),n&&x1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oQ(e,t,n){return t=Xc(t),lQ(e,RE()?Reflect.construct(t,n||[],Xc(e).constructor):t.apply(e,n))}function lQ(e,t){if(t&&(La(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uQ(e)}function uQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RE=function(){return!!e})()}function Xc(e){return Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xc(e)}function sQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hv(e,t)}function ln(e,t,n){return t=LE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LE(e){var t=cQ(e,"string");return La(t)=="symbol"?t:t+""}function cQ(e,t){if(La(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(La(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mu=function(e){function t(){var n;iQ(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=oQ(this,t,[].concat(i)),ln(n,"state",{isAnimationFinished:!0,totalLength:0}),ln(n,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),ln(n,"getStrokeDasharray",function(o,l,u){var s=u.reduce(function(p,m){return p+m});if(!s)return n.generateSimpleStrokeDasharray(l,o);for(var f=Math.floor(o/s),c=o%s,d=l-o,h=[],g=0,v=0;g<u.length;v+=u[g],++g)if(v+u[g]>c){h=[].concat(Mi(u.slice(0,g)),[c-v]);break}var y=h.length%2===0?[0,d]:[d];return[].concat(Mi(t.repeat(u,f)),Mi(h),y).map(function(p){return"".concat(p,"px")}).join(", ")}),ln(n,"id",to("recharts-line-")),ln(n,"pathRef",function(o){n.mainCurve=o}),ln(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),ln(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return sQ(t,e),aQ(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=It(f,pu);if(!c)return null;var d=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:Ve(v.payload,y)}},h={clipPath:r?"url(#clipPath-".concat(i,")"):null};return k.createElement(fe,h,c.map(function(g){return k.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,dataPointFormatter:d})}))}},{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,s=l.points,f=l.dataKey,c=J(this.props,!1),d=J(u,!0),h=s.map(function(v,y){var p=At(At(At({key:"dot-".concat(y),r:3},c),d),{},{index:y,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:s});return t.renderDotItem(u,p)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(fe,Zo({className:"recharts-line-dots",key:"dots"},g),h)}},{key:"renderCurveStatically",value:function(r,i,a,o){var l=this.props,u=l.type,s=l.layout,f=l.connectNulls;l.ref;var c=g1(l,QY),d=At(At(At({},J(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},o),{},{type:u,layout:s,connectNulls:f});return k.createElement(Ec,Zo({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,s=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,h=o.animationId,g=o.animateNewValues,v=o.width,y=o.height,p=this.state,m=p.prevPoints,b=p.totalLength;return k.createElement($n,{begin:f,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var x=w.t;if(m){var _=m.length/l.length,S=l.map(function(C,B){var A=Math.floor(B*_);if(m[A]){var M=m[A],$=jt(M.x,C.x),D=jt(M.y,C.y);return At(At({},C),{},{x:$(x),y:D(x)})}if(g){var N=jt(v*2,C.x),R=jt(y/2,C.y);return At(At({},C),{},{x:N(x),y:R(x)})}return At(At({},C),{},{x:C.x,y:C.y})});return a.renderCurveStatically(S,r,i)}var O=jt(0,b),E=O(x),j;if(u){var I="".concat(u).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});j=a.getStrokeDasharray(E,b,I)}else j=a.generateSimpleStrokeDasharray(b,E);return a.renderCurveStatically(l,r,i,{strokeDasharray:j})})}},{key:"renderCurve",value:function(r,i){var a=this.props,o=a.points,l=a.isAnimationActive,u=this.state,s=u.prevPoints,f=u.totalLength;return l&&o&&o.length&&(!s&&f>0||!hu(s,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,l=i.points,u=i.className,s=i.xAxis,f=i.yAxis,c=i.top,d=i.left,h=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(a||!l||!l.length)return null;var p=this.state.isAnimationFinished,m=l.length===1,b=ie("recharts-line",u),w=s&&s.allowDataOverflow,x=f&&f.allowDataOverflow,_=w||x,S=ne(y)?this.id:y,O=(r=J(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=O.r,j=E===void 0?3:E,I=O.strokeWidth,C=I===void 0?2:I,B=QM(o)?o:{},A=B.clipDot,M=A===void 0?!0:A,$=j*2+C;return k.createElement(fe,{className:b},w||x?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(S)},k.createElement("rect",{x:w?d:d-h/2,y:x?c:c-g/2,width:w?h:h*2,height:x?g:g*2})),!M&&k.createElement("clipPath",{id:"clipPath-dots-".concat(S)},k.createElement("rect",{x:d-$/2,y:c-$/2,width:h+$,height:g+$}))):null,!m&&this.renderCurve(_,S),this.renderErrorBar(_,S),(m||o)&&this.renderDots(_,M,S),(!v||p)&&Gn.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(Mi(r),[0]):r,o=[],l=0;l<i;++l)o=[].concat(Mi(o),Mi(a));return o}},{key:"renderDotItem",value:function(r,i){var a;if(k.isValidElement(r))a=k.cloneElement(r,i);else if(te(r))a=r(i);else{var o=i.key,l=g1(i,ZY),u=ie("recharts-line-dot",typeof r!="boolean"?r.className:"");a=k.createElement(nd,Zo({key:o},l,{className:u}))}return a}}])}(T.PureComponent);ln(mu,"displayName","Line");ln(mu,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ai.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ln(mu,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,l=e.bandSize,u=e.displayedData,s=e.offset,f=t.layout,c=u.map(function(d,h){var g=Ve(d,o);return f==="horizontal"?{x:qx({axis:n,ticks:i,bandSize:l,entry:d,index:h}),y:ne(g)?null:r.scale(g),value:g,payload:d}:{x:ne(g)?null:n.scale(g),y:qx({axis:r,ticks:a,bandSize:l,entry:d,index:h}),value:g,payload:d}});return At({points:c,layout:f},s)});function Ba(e){"@babel/helpers - typeof";return Ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ba(e)}function fQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FE(r.key),r)}}function hQ(e,t,n){return t&&dQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pQ(e,t,n){return t=qc(t),vQ(e,BE()?Reflect.construct(t,n||[],qc(e).constructor):t.apply(e,n))}function vQ(e,t){if(t&&(Ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mQ(e)}function mQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BE=function(){return!!e})()}function qc(e){return qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qc(e)}function yQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vv(e,t)}function Vv(e,t){return Vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vv(e,t)}function zE(e,t,n){return t=FE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FE(e){var t=gQ(e,"string");return Ba(t)=="symbol"?t:t+""}function gQ(e,t){if(Ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ba(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kv.apply(this,arguments)}function bQ(e){var t=e.xAxisId,n=AE(),r=EE(),i=OE(t);return i==null?null:T.createElement(pd,Kv({},i,{className:ie("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return ii(o,!0)}}))}var rg=function(e){function t(){return fQ(this,t),pQ(this,t,arguments)}return yQ(t,e),hQ(t,[{key:"render",value:function(){return T.createElement(bQ,this.props)}}])}(T.Component);zE(rg,"displayName","XAxis");zE(rg,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function xQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HE(r.key),r)}}function _Q(e,t,n){return t&&wQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SQ(e,t,n){return t=Yc(t),OQ(e,UE()?Reflect.construct(t,n||[],Yc(e).constructor):t.apply(e,n))}function OQ(e,t){if(t&&(za(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PQ(e)}function PQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UE=function(){return!!e})()}function Yc(e){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yc(e)}function AQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gv(e,t)}function Gv(e,t){return Gv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gv(e,t)}function WE(e,t,n){return t=HE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HE(e){var t=EQ(e,"string");return za(t)=="symbol"?t:t+""}function EQ(e,t){if(za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xv.apply(this,arguments)}var $Q=function(t){var n=t.yAxisId,r=AE(),i=EE(),a=PE(n);return a==null?null:T.createElement(pd,Xv({},a,{className:ie("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return ii(l,!0)}}))},vd=function(e){function t(){return xQ(this,t),SQ(this,t,arguments)}return AQ(t,e),_Q(t,[{key:"render",value:function(){return T.createElement($Q,this.props)}}])}(T.Component);WE(vd,"displayName","YAxis");WE(vd,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function w1(e){return CQ(e)||kQ(e)||jQ(e)||TQ()}function TQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jQ(e,t){if(e){if(typeof e=="string")return qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qv(e,t)}}function kQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CQ(e){if(Array.isArray(e))return qv(e)}function qv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yv=function(t,n,r,i,a){var o=It(t,tg),l=It(t,fd),u=[].concat(w1(o),w1(l)),s=It(t,hd),f="".concat(i,"Id"),c=i[0],d=n;if(u.length&&(d=u.reduce(function(v,y){if(y.props[f]===r&&An(y.props,"extendDomain")&&K(y.props[c])){var p=y.props[c];return[Math.min(v[0],p),Math.max(v[1],p)]}return v},d)),s.length){var h="".concat(c,"1"),g="".concat(c,"2");d=s.reduce(function(v,y){if(y.props[f]===r&&An(y.props,"extendDomain")&&K(y.props[h])&&K(y.props[g])){var p=y.props[h],m=y.props[g];return[Math.min(v[0],p,m),Math.max(v[1],p,m)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,y){return K(y)?[Math.min(v[0],y),Math.max(v[1],y)]:v},d)),d},VE={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,s,f){this.fn=u,this.context=s,this.once=f||!1}function a(u,s,f,c,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,c||u,d),g=n?n+s:s;return u._events[g]?u._events[g].fn?u._events[g]=[u._events[g],h]:u._events[g].push(h):(u._events[g]=h,u._eventsCount++),u}function o(u,s){--u._eventsCount===0?u._events=new r:delete u._events[s]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var s=[],f,c;if(this._eventsCount===0)return s;for(c in f=this._events)t.call(f,c)&&s.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(f)):s},l.prototype.listeners=function(s){var f=n?n+s:s,c=this._events[f];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,h=c.length,g=new Array(h);d<h;d++)g[d]=c[d].fn;return g},l.prototype.listenerCount=function(s){var f=n?n+s:s,c=this._events[f];return c?c.fn?1:c.length:0},l.prototype.emit=function(s,f,c,d,h,g){var v=n?n+s:s;if(!this._events[v])return!1;var y=this._events[v],p=arguments.length,m,b;if(y.fn){switch(y.once&&this.removeListener(s,y.fn,void 0,!0),p){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,c),!0;case 4:return y.fn.call(y.context,f,c,d),!0;case 5:return y.fn.call(y.context,f,c,d,h),!0;case 6:return y.fn.call(y.context,f,c,d,h,g),!0}for(b=1,m=new Array(p-1);b<p;b++)m[b-1]=arguments[b];y.fn.apply(y.context,m)}else{var w=y.length,x;for(b=0;b<w;b++)switch(y[b].once&&this.removeListener(s,y[b].fn,void 0,!0),p){case 1:y[b].fn.call(y[b].context);break;case 2:y[b].fn.call(y[b].context,f);break;case 3:y[b].fn.call(y[b].context,f,c);break;case 4:y[b].fn.call(y[b].context,f,c,d);break;default:if(!m)for(x=1,m=new Array(p-1);x<p;x++)m[x-1]=arguments[x];y[b].fn.apply(y[b].context,m)}}return!0},l.prototype.on=function(s,f,c){return a(this,s,f,c,!1)},l.prototype.once=function(s,f,c){return a(this,s,f,c,!0)},l.prototype.removeListener=function(s,f,c,d){var h=n?n+s:s;if(!this._events[h])return this;if(!f)return o(this,h),this;var g=this._events[h];if(g.fn)g.fn===f&&(!d||g.once)&&(!c||g.context===c)&&o(this,h);else{for(var v=0,y=[],p=g.length;v<p;v++)(g[v].fn!==f||d&&!g[v].once||c&&g[v].context!==c)&&y.push(g[v]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},l.prototype.removeAllListeners=function(s){var f;return s?(f=n?n+s:s,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(VE);var NQ=VE.exports;const MQ=ye(NQ);var wh=new MQ,_h="recharts.syncMouseEvents";function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function IQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KE(r.key),r)}}function RQ(e,t,n){return t&&DQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sh(e,t,n){return t=KE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KE(e){var t=LQ(e,"string");return Yl(t)=="symbol"?t:t+""}function LQ(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BQ=function(){function e(){IQ(this,e),Sh(this,"activeIndex",0),Sh(this,"coordinateList",[]),Sh(this,"layout","horizontal")}return RQ(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,l=o===void 0?null:o,u=n.layout,s=u===void 0?null:u,f=n.offset,c=f===void 0?null:f,d=n.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=s??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,u=this.coordinateList[this.activeIndex].coordinate,s=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,c=a+u+s,d=o+this.offset.top+l/2+f;this.mouseHandlerCallback({pageX:c,pageY:d})}}}])}();function zQ(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&K(r)&&K(i))return!0}return!1}function FQ(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function GE(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=_e(t,n,r,i),l=_e(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function UQ(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,u=t.cy,s=t.innerRadius,f=t.outerRadius,c=t.angle,d=_e(l,u,s,c),h=_e(l,u,f,c);r=d.x,i=d.y,a=h.x,o=h.y}else return GE(t);return[{x:r,y:i},{x:a,y:o}]}function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function _1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_1(Object(n),!0).forEach(function(r){WQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WQ(e,t,n){return t=HQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HQ(e){var t=VQ(e,"string");return Ql(t)=="symbol"?t:t+""}function VQ(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KQ(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,u=e.offset,s=e.activeTooltipIndex,f=e.tooltipAxisBandSize,c=e.layout,d=e.chartName,h=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!h||!a||!o||d!=="ScatterChart"&&i!=="axis")return null;var g,v=Ec;if(d==="ScatterChart")g=o,v=zK;else if(d==="BarChart")g=FQ(c,o,u,f),v=Zy;else if(c==="radial"){var y=GE(o),p=y.cx,m=y.cy,b=y.radius,w=y.startAngle,x=y.endAngle;g={cx:p,cy:m,startAngle:w,endAngle:x,innerRadius:b,outerRadius:b},v=HA}else g={points:UQ(c,o,u)},v=Ec;var _=Zu(Zu(Zu(Zu({stroke:"#ccc",pointerEvents:"none"},u),g),J(h,!1)),{},{payload:l,payloadIndex:s,className:ie("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,_):T.createElement(v,_)}var GQ=["item"],XQ=["children","className","width","height","style","compact","title","desc"];function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function Zi(){return Zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zi.apply(this,arguments)}function S1(e,t){return QQ(e)||YQ(e,t)||qE(e,t)||qQ()}function qQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
139
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
140
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qE(e,t){if(e){if(typeof e=="string")return Zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zv(e,t)}}function lZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uZ(e){if(Array.isArray(e))return Zv(e)}function Zv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P1(Object(n),!0).forEach(function(r){ee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ee(e,t,n){return t=YE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YE(e){var t=sZ(e,"string");return Fa(t)=="symbol"?t:t+""}function sZ(e,t){if(Fa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cZ={xAxis:["bottom","top"],yAxis:["left","right"]},fZ={width:"100%",height:"100%"},QE={x:0,y:0};function Ju(e){return e}var dZ=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},hZ=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return z(z(z({},i),_e(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,s=i.angle;return z(z(z({},i),_e(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}return QE},md=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(l,u){var s=u.props.data;return s&&s.length?[].concat(Ua(l),Ua(s)):l},[]);return o.length>0?o:t&&t.length&&K(i)&&K(a)?t.slice(i,a+1):[]};function ZE(e){return e==="number"?[0,"auto"]:void 0}var Jv=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=md(n,t);return r<0||!a||!a.length||r>=l.length?null:a.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:n;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=c===void 0?l:c;d=qs(h,o.dataKey,i)}else d=c&&c[r]||l[r];return d?[].concat(Ua(u),[LA(s,d)]):u},[])},A1=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=dZ(a,r),l=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=o7(o,l,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Jv(t,n,f,c),h=hZ(r,l,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},pZ=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,h=NA(f,a);return r.reduce(function(g,v){var y,p=v.type.defaultProps!==void 0?z(z({},v.type.defaultProps),v.props):v.props,m=p.type,b=p.dataKey,w=p.allowDataOverflow,x=p.allowDuplicatedCategory,_=p.scale,S=p.ticks,O=p.includeHidden,E=p[o];if(g[E])return g;var j=md(t.data,{graphicalItems:i.filter(function(U){var X,Z=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o];return Z===E}),dataStartIndex:u,dataEndIndex:s}),I=j.length,C,B,A;zQ(p.domain,w,m)&&(C=hv(p.domain,null,w),h&&(m==="number"||_!=="auto")&&(A=Xo(j,b,"category")));var M=ZE(m);if(!C||C.length===0){var $,D=($=p.domain)!==null&&$!==void 0?$:M;if(b){if(C=Xo(j,b,m),m==="category"&&h){var N=FM(C);x&&N?(B=C,C=Lc(0,I)):x||(C=Jx(D,C,v).reduce(function(U,X){return U.indexOf(X)>=0?U:[].concat(Ua(U),[X])},[]))}else if(m==="category")x?C=C.filter(function(U){return U!==""&&!ne(U)}):C=Jx(D,C,v).reduce(function(U,X){return U.indexOf(X)>=0||X===""||ne(X)?U:[].concat(Ua(U),[X])},[]);else if(m==="number"){var R=f7(j,i.filter(function(U){var X,Z,ae=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o],F="hide"in U.props?U.props.hide:(Z=U.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return ae===E&&(O||!F)}),b,a,f);R&&(C=R)}h&&(m==="number"||_!=="auto")&&(A=Xo(j,b,"category"))}else h?C=Lc(0,I):l&&l[E]&&l[E].hasStack&&m==="number"?C=d==="expand"?[0,1]:RA(l[E].stackGroups,u,s):C=CA(j,i.filter(function(U){var X=o in U.props?U.props[o]:U.type.defaultProps[o],Z="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return X===E&&(O||!Z)}),m,f,!0);if(m==="number")C=Yv(c,C,E,a,S),D&&(C=hv(D,C,w));else if(m==="category"&&D){var L=D,W=C.every(function(U){return L.indexOf(U)>=0});W&&(C=L)}}return z(z({},g),{},ee({},E,z(z({},p),{},{axisType:a,domain:C,categoricalDomain:A,duplicateDomain:B,originalDomain:(y=p.domain)!==null&&y!==void 0?y:M,isCategorical:h,layout:f})))},{})},vZ=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=md(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:s}),h=d.length,g=NA(f,a),v=-1;return r.reduce(function(y,p){var m=p.type.defaultProps!==void 0?z(z({},p.type.defaultProps),p.props):p.props,b=m[o],w=ZE("number");if(!y[b]){v++;var x;return g?x=Lc(0,h):l&&l[b]&&l[b].hasStack?(x=RA(l[b].stackGroups,u,s),x=Yv(c,x,b,a)):(x=hv(w,CA(d,r.filter(function(_){var S,O,E=o in _.props?_.props[o]:(S=_.type.defaultProps)===null||S===void 0?void 0:S[o],j="hide"in _.props?_.props.hide:(O=_.type.defaultProps)===null||O===void 0?void 0:O.hide;return E===b&&!j}),"number",f),i.defaultProps.allowDataOverflow),x=Yv(c,x,b,a)),z(z({},y),{},ee({},b,z(z({axisType:a},i.defaultProps),{},{hide:!0,orientation:Mt(cZ,"".concat(a,".").concat(v%2),null),domain:x,originalDomain:w,isCategorical:g,layout:f})))}return y},{})},mZ=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=It(f,a),h={};return d&&d.length?h=pZ(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s}):o&&o.length&&(h=vZ(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s})),h},yZ=function(t){var n=Ii(t),r=ii(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Py(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Oc(n,r)}},E1=function(t){var n=t.children,r=t.defaultShowTooltip,i=Tt(n,Ca),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},gZ=function(t){return!t||!t.length?!1:t.some(function(n){var r=Hn(n&&n.type);return r&&r.indexOf("Bar")>=0})},$1=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},bZ=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,s=r.width,f=r.height,c=r.children,d=r.margin||{},h=Tt(c,Ca),g=Tt(c,oa),v=Object.keys(u).reduce(function(x,_){var S=u[_],O=S.orientation;return!S.mirror&&!S.hide?z(z({},x),{},ee({},O,x[O]+S.width)):x},{left:d.left||0,right:d.right||0}),y=Object.keys(o).reduce(function(x,_){var S=o[_],O=S.orientation;return!S.mirror&&!S.hide?z(z({},x),{},ee({},O,Mt(x,"".concat(O))+S.height)):x},{top:d.top||0,bottom:d.bottom||0}),p=z(z({},y),v),m=p.bottom;h&&(p.bottom+=h.props.height||Ca.defaultProps.height),g&&n&&(p=s7(p,i,r,n));var b=s-p.left-p.right,w=f-p.top-p.bottom;return z(z({brushBottom:m},p),{},{width:Math.max(b,0),height:Math.max(w,0)})},xZ=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},JE=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(p,m){var b=m.graphicalItems,w=m.stackGroups,x=m.offset,_=m.updateId,S=m.dataStartIndex,O=m.dataEndIndex,E=p.barSize,j=p.layout,I=p.barGap,C=p.barCategoryGap,B=p.maxBarSize,A=$1(j),M=A.numericAxisName,$=A.cateAxisName,D=gZ(b),N=[];return b.forEach(function(R,L){var W=md(p.data,{graphicalItems:[R],dataStartIndex:S,dataEndIndex:O}),U=R.type.defaultProps!==void 0?z(z({},R.type.defaultProps),R.props):R.props,X=U.dataKey,Z=U.maxBarSize,ae=U["".concat(M,"Id")],F=U["".concat($,"Id")],Q={},ce=u.reduce(function(Fr,Ur){var wd=m["".concat(Ur.axisType,"Map")],dg=U["".concat(Ur.axisType,"Id")];wd&&wd[dg]||Ur.axisType==="zAxis"||wi();var hg=wd[dg];return z(z({},Fr),{},ee(ee({},Ur.axisType,hg),"".concat(Ur.axisType,"Ticks"),ii(hg)))},Q),G=ce[$],re=ce["".concat($,"Ticks")],oe=w&&w[ae]&&w[ae].hasStack&&x7(R,w[ae].stackGroups),H=Hn(R.type).indexOf("Bar")>=0,Ce=Oc(G,re),ue=[],ze=D&&l7({barSize:E,stackGroups:w,totalSize:xZ(ce,$)});if(H){var Fe,gt,lr=ne(Z)?B:Z,ji=(Fe=(gt=Oc(G,re,!0))!==null&>!==void 0?gt:lr)!==null&&Fe!==void 0?Fe:0;ue=u7({barGap:I,barCategoryGap:C,bandSize:ji!==Ce?ji:Ce,sizeList:ze[F],maxBarSize:lr}),ji!==Ce&&(ue=ue.map(function(Fr){return z(z({},Fr),{},{position:z(z({},Fr.position),{},{offset:Fr.position.offset-ji/2})})}))}var bu=R&&R.type&&R.type.getComposedData;bu&&N.push({props:z(z({},bu(z(z({},ce),{},{displayedData:W,props:p,dataKey:X,item:R,bandSize:Ce,barPosition:ue,offset:x,stackedData:oe,layout:j,dataStartIndex:S,dataEndIndex:O}))),{},ee(ee(ee({key:R.key||"item-".concat(L)},M,ce[M]),$,ce[$]),"animationId",_)),childIndex:eI(R,p.children),item:R})}),N},h=function(p,m){var b=p.props,w=p.dataStartIndex,x=p.dataEndIndex,_=p.updateId;if(!V0({props:b}))return null;var S=b.children,O=b.layout,E=b.stackOffset,j=b.data,I=b.reverseStackOrder,C=$1(O),B=C.numericAxisName,A=C.cateAxisName,M=It(S,r),$=g7(j,M,"".concat(B,"Id"),"".concat(A,"Id"),E,I),D=u.reduce(function(U,X){var Z="".concat(X.axisType,"Map");return z(z({},U),{},ee({},Z,mZ(b,z(z({},X),{},{graphicalItems:M,stackGroups:X.axisType===B&&$,dataStartIndex:w,dataEndIndex:x}))))},{}),N=bZ(z(z({},D),{},{props:b,graphicalItems:M}),m==null?void 0:m.legendBBox);Object.keys(D).forEach(function(U){D[U]=f(b,D[U],N,U.replace("Map",""),n)});var R=D["".concat(A,"Map")],L=yZ(R),W=d(b,z(z({},D),{},{dataStartIndex:w,dataEndIndex:x,updateId:_,graphicalItems:M,stackGroups:$,offset:N}));return z(z({formattedGraphicalItems:W,graphicalItems:M,offset:N,stackGroups:$},L),D)},g=function(y){function p(m){var b,w,x;return JQ(this,p),x=nZ(this,p,[m]),ee(x,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ee(x,"accessibilityManager",new BQ),ee(x,"handleLegendBBoxUpdate",function(_){if(_){var S=x.state,O=S.dataStartIndex,E=S.dataEndIndex,j=S.updateId;x.setState(z({legendBBox:_},h({props:x.props,dataStartIndex:O,dataEndIndex:E,updateId:j},z(z({},x.state),{},{legendBBox:_}))))}}),ee(x,"handleReceiveSyncEvent",function(_,S,O){if(x.props.syncId===_){if(O===x.eventEmitterSymbol&&typeof x.props.syncMethod!="function")return;x.applySyncEvent(S)}}),ee(x,"handleBrushChange",function(_){var S=_.startIndex,O=_.endIndex;if(S!==x.state.dataStartIndex||O!==x.state.dataEndIndex){var E=x.state.updateId;x.setState(function(){return z({dataStartIndex:S,dataEndIndex:O},h({props:x.props,dataStartIndex:S,dataEndIndex:O,updateId:E},x.state))}),x.triggerSyncEvent({dataStartIndex:S,dataEndIndex:O})}}),ee(x,"handleMouseEnter",function(_){var S=x.getMouseInfo(_);if(S){var O=z(z({},S),{},{isTooltipActive:!0});x.setState(O),x.triggerSyncEvent(O);var E=x.props.onMouseEnter;te(E)&&E(O,_)}}),ee(x,"triggeredAfterMouseMove",function(_){var S=x.getMouseInfo(_),O=S?z(z({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};x.setState(O),x.triggerSyncEvent(O);var E=x.props.onMouseMove;te(E)&&E(O,_)}),ee(x,"handleItemMouseEnter",function(_){x.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),ee(x,"handleItemMouseLeave",function(){x.setState(function(){return{isTooltipActive:!1}})}),ee(x,"handleMouseMove",function(_){_.persist(),x.throttleTriggeredAfterMouseMove(_)}),ee(x,"handleMouseLeave",function(_){x.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};x.setState(S),x.triggerSyncEvent(S);var O=x.props.onMouseLeave;te(O)&&O(S,_)}),ee(x,"handleOuterEvent",function(_){var S=JM(_),O=Mt(x.props,"".concat(S));if(S&&te(O)){var E,j;/.*touch.*/i.test(S)?j=x.getMouseInfo(_.changedTouches[0]):j=x.getMouseInfo(_),O((E=j)!==null&&E!==void 0?E:{},_)}}),ee(x,"handleClick",function(_){var S=x.getMouseInfo(_);if(S){var O=z(z({},S),{},{isTooltipActive:!0});x.setState(O),x.triggerSyncEvent(O);var E=x.props.onClick;te(E)&&E(O,_)}}),ee(x,"handleMouseDown",function(_){var S=x.props.onMouseDown;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleMouseUp",function(_){var S=x.props.onMouseUp;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),ee(x,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.handleMouseDown(_.changedTouches[0])}),ee(x,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.handleMouseUp(_.changedTouches[0])}),ee(x,"handleDoubleClick",function(_){var S=x.props.onDoubleClick;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleContextMenu",function(_){var S=x.props.onContextMenu;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"triggerSyncEvent",function(_){x.props.syncId!==void 0&&wh.emit(_h,x.props.syncId,_,x.eventEmitterSymbol)}),ee(x,"applySyncEvent",function(_){var S=x.props,O=S.layout,E=S.syncMethod,j=x.state.updateId,I=_.dataStartIndex,C=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)x.setState(z({dataStartIndex:I,dataEndIndex:C},h({props:x.props,dataStartIndex:I,dataEndIndex:C,updateId:j},x.state)));else if(_.activeTooltipIndex!==void 0){var B=_.chartX,A=_.chartY,M=_.activeTooltipIndex,$=x.state,D=$.offset,N=$.tooltipTicks;if(!D)return;if(typeof E=="function")M=E(N,_);else if(E==="value"){M=-1;for(var R=0;R<N.length;R++)if(N[R].value===_.activeLabel){M=R;break}}var L=z(z({},D),{},{x:D.left,y:D.top}),W=Math.min(B,L.x+L.width),U=Math.min(A,L.y+L.height),X=N[M]&&N[M].value,Z=Jv(x.state,x.props.data,M),ae=N[M]?{x:O==="horizontal"?N[M].coordinate:W,y:O==="horizontal"?U:N[M].coordinate}:QE;x.setState(z(z({},_),{},{activeLabel:X,activeCoordinate:ae,activePayload:Z,activeTooltipIndex:M}))}else x.setState(_)}),ee(x,"renderCursor",function(_){var S,O=x.state,E=O.isTooltipActive,j=O.activeCoordinate,I=O.activePayload,C=O.offset,B=O.activeTooltipIndex,A=O.tooltipAxisBandSize,M=x.getTooltipEventType(),$=(S=_.props.active)!==null&&S!==void 0?S:E,D=x.props.layout,N=_.key||"_recharts-cursor";return k.createElement(KQ,{key:N,activeCoordinate:j,activePayload:I,activeTooltipIndex:B,chartName:n,element:_,isActive:$,layout:D,offset:C,tooltipAxisBandSize:A,tooltipEventType:M})}),ee(x,"renderPolarAxis",function(_,S,O){var E=Mt(_,"type.axisType"),j=Mt(x.state,"".concat(E,"Map")),I=_.type.defaultProps,C=I!==void 0?z(z({},I),_.props):_.props,B=j&&j[C["".concat(E,"Id")]];return T.cloneElement(_,z(z({},B),{},{className:ie(E,B.className),key:_.key||"".concat(S,"-").concat(O),ticks:ii(B,!0)}))}),ee(x,"renderPolarGrid",function(_){var S=_.props,O=S.radialLines,E=S.polarAngles,j=S.polarRadius,I=x.state,C=I.radiusAxisMap,B=I.angleAxisMap,A=Ii(C),M=Ii(B),$=M.cx,D=M.cy,N=M.innerRadius,R=M.outerRadius;return T.cloneElement(_,{polarAngles:Array.isArray(E)?E:ii(M,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(j)?j:ii(A,!0).map(function(L){return L.coordinate}),cx:$,cy:D,innerRadius:N,outerRadius:R,key:_.key||"polar-grid",radialLines:O})}),ee(x,"renderLegend",function(){var _=x.state.formattedGraphicalItems,S=x.props,O=S.children,E=S.width,j=S.height,I=x.props.margin||{},C=E-(I.left||0)-(I.right||0),B=jA({children:O,formattedGraphicalItems:_,legendWidth:C,legendContent:s});if(!B)return null;var A=B.item,M=O1(B,GQ);return T.cloneElement(A,z(z({},M),{},{chartWidth:E,chartHeight:j,margin:I,onBBoxUpdate:x.handleLegendBBoxUpdate}))}),ee(x,"renderTooltip",function(){var _,S=x.props,O=S.children,E=S.accessibilityLayer,j=Tt(O,bn);if(!j)return null;var I=x.state,C=I.isTooltipActive,B=I.activeCoordinate,A=I.activePayload,M=I.activeLabel,$=I.offset,D=(_=j.props.active)!==null&&_!==void 0?_:C;return T.cloneElement(j,{viewBox:z(z({},$),{},{x:$.left,y:$.top}),active:D,label:M,payload:D?A:[],coordinate:B,accessibilityLayer:E})}),ee(x,"renderBrush",function(_){var S=x.props,O=S.margin,E=S.data,j=x.state,I=j.offset,C=j.dataStartIndex,B=j.dataEndIndex,A=j.updateId;return T.cloneElement(_,{key:_.key||"_recharts-brush",onChange:Xu(x.handleBrushChange,_.props.onChange),data:E,x:K(_.props.x)?_.props.x:I.left,y:K(_.props.y)?_.props.y:I.top+I.height+I.brushBottom-(O.bottom||0),width:K(_.props.width)?_.props.width:I.width,startIndex:C,endIndex:B,updateId:"brush-".concat(A)})}),ee(x,"renderReferenceElement",function(_,S,O){if(!_)return null;var E=x,j=E.clipPathId,I=x.state,C=I.xAxisMap,B=I.yAxisMap,A=I.offset,M=_.type.defaultProps||{},$=_.props,D=$.xAxisId,N=D===void 0?M.xAxisId:D,R=$.yAxisId,L=R===void 0?M.yAxisId:R;return T.cloneElement(_,{key:_.key||"".concat(S,"-").concat(O),xAxis:C[N],yAxis:B[L],viewBox:{x:A.left,y:A.top,width:A.width,height:A.height},clipPathId:j})}),ee(x,"renderActivePoints",function(_){var S=_.item,O=_.activePoint,E=_.basePoint,j=_.childIndex,I=_.isRange,C=[],B=S.props.key,A=S.item.type.defaultProps!==void 0?z(z({},S.item.type.defaultProps),S.item.props):S.item.props,M=A.activeDot,$=A.dataKey,D=z(z({index:j,dataKey:$,cx:O.x,cy:O.y,r:4,fill:Qy(S.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},J(M,!1)),Ys(M));return C.push(p.renderActiveDot(M,D,"".concat(B,"-activePoint-").concat(j))),E?C.push(p.renderActiveDot(M,z(z({},D),{},{cx:E.x,cy:E.y}),"".concat(B,"-basePoint-").concat(j))):I&&C.push(null),C}),ee(x,"renderGraphicChild",function(_,S,O){var E=x.filterFormatItem(_,S,O);if(!E)return null;var j=x.getTooltipEventType(),I=x.state,C=I.isTooltipActive,B=I.tooltipAxis,A=I.activeTooltipIndex,M=I.activeLabel,$=x.props.children,D=Tt($,bn),N=E.props,R=N.points,L=N.isRange,W=N.baseLine,U=E.item.type.defaultProps!==void 0?z(z({},E.item.type.defaultProps),E.item.props):E.item.props,X=U.activeDot,Z=U.hide,ae=U.activeBar,F=U.activeShape,Q=!!(!Z&&C&&D&&(X||ae||F)),ce={};j!=="axis"&&D&&D.props.trigger==="click"?ce={onClick:Xu(x.handleItemMouseEnter,_.props.onClick)}:j!=="axis"&&(ce={onMouseLeave:Xu(x.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:Xu(x.handleItemMouseEnter,_.props.onMouseEnter)});var G=T.cloneElement(_,z(z({},E.props),ce));function re(Ur){return typeof B.dataKey=="function"?B.dataKey(Ur.payload):null}if(Q)if(A>=0){var oe,H;if(B.dataKey&&!B.allowDuplicatedCategory){var Ce=typeof B.dataKey=="function"?re:"payload.".concat(B.dataKey.toString());oe=qs(R,Ce,M),H=L&&W&&qs(W,Ce,M)}else oe=R==null?void 0:R[A],H=L&&W&&W[A];if(F||ae){var ue=_.props.activeIndex!==void 0?_.props.activeIndex:A;return[T.cloneElement(_,z(z(z({},E.props),ce),{},{activeIndex:ue})),null,null]}if(!ne(oe))return[G].concat(Ua(x.renderActivePoints({item:E,activePoint:oe,basePoint:H,childIndex:A,isRange:L})))}else{var ze,Fe=(ze=x.getItemByXY(x.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:G},gt=Fe.graphicalItem,lr=gt.item,ji=lr===void 0?_:lr,bu=gt.childIndex,Fr=z(z(z({},E.props),ce),{},{activeIndex:bu});return[T.cloneElement(ji,Fr),null,null]}return L?[G,null,null]:[G,null]}),ee(x,"renderCustomized",function(_,S,O){return T.cloneElement(_,z(z({key:"recharts-customized-".concat(O)},x.props),x.state))}),ee(x,"renderMap",{CartesianGrid:{handler:Ju,once:!0},ReferenceArea:{handler:x.renderReferenceElement},ReferenceLine:{handler:Ju},ReferenceDot:{handler:x.renderReferenceElement},XAxis:{handler:Ju},YAxis:{handler:Ju},Brush:{handler:x.renderBrush,once:!0},Bar:{handler:x.renderGraphicChild},Line:{handler:x.renderGraphicChild},Area:{handler:x.renderGraphicChild},Radar:{handler:x.renderGraphicChild},RadialBar:{handler:x.renderGraphicChild},Scatter:{handler:x.renderGraphicChild},Pie:{handler:x.renderGraphicChild},Funnel:{handler:x.renderGraphicChild},Tooltip:{handler:x.renderCursor,once:!0},PolarGrid:{handler:x.renderPolarGrid,once:!0},PolarAngleAxis:{handler:x.renderPolarAxis},PolarRadiusAxis:{handler:x.renderPolarAxis},Customized:{handler:x.renderCustomized}}),x.clipPathId="".concat((b=m.id)!==null&&b!==void 0?b:to("recharts"),"-clip"),x.throttleTriggeredAfterMouseMove=AP(x.triggeredAfterMouseMove,(w=m.throttleDelay)!==null&&w!==void 0?w:1e3/60),x.state={},x}return aZ(p,y),tZ(p,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,x=b.data,_=b.height,S=b.layout,O=Tt(w,bn);if(O){var E=O.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var j=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,I=Jv(this.state,x,E,j),C=this.state.tooltipTicks[E].coordinate,B=(this.state.offset.top+_)/2,A=S==="horizontal",M=A?{x:C,y:B}:{y:C,x:B},$=this.state.formattedGraphicalItems.find(function(N){var R=N.item;return R.type.name==="Scatter"});$&&(M=z(z({},M),$.props.points[E].tooltipPosition),I=$.props.points[E].tooltipPayload);var D={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:j,activePayload:I,activeCoordinate:M};this.setState(D),this.renderCursor(O),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var x,_;this.accessibilityManager.setDetails({offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(b){Ep([Tt(b.children,bn)],[Tt(this.props.children,bn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Tt(this.props.children,bn);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,x=w.getBoundingClientRect(),_=E8(x),S={chartX:Math.round(b.pageX-_.left),chartY:Math.round(b.pageY-_.top)},O=x.width/w.offsetWidth||1,E=this.inRange(S.chartX,S.chartY,O);if(!E)return null;var j=this.state,I=j.xAxisMap,C=j.yAxisMap,B=this.getTooltipEventType(),A=A1(this.state,this.props.data,this.props.layout,E);if(B!=="axis"&&I&&C){var M=Ii(I).scale,$=Ii(C).scale,D=M&&M.invert?M.invert(S.chartX):null,N=$&&$.invert?$.invert(S.chartY):null;return z(z({},S),{},{xValue:D,yValue:N},A)}return A?z(z({},S),A):null}},{key:"inRange",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=b/x,O=w/x;if(_==="horizontal"||_==="vertical"){var E=this.state.offset,j=S>=E.left&&S<=E.left+E.width&&O>=E.top&&O<=E.top+E.height;return j?{x:S,y:O}:null}var I=this.state,C=I.angleAxisMap,B=I.radiusAxisMap;if(C&&B){var A=Ii(C);return nw({x:S,y:O},A)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),x=Tt(b,bn),_={};x&&w==="axis"&&(x.props.trigger==="click"?_={onClick:this.handleClick}:_={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Ys(this.props,this.handleOuterEvent);return z(z({},S),_)}},{key:"addListener",value:function(){wh.on(_h,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){wh.removeListener(_h,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,x){for(var _=this.state.formattedGraphicalItems,S=0,O=_.length;S<O;S++){var E=_[S];if(E.item===b||E.props.key===b.key||w===Hn(E.item.type)&&x===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,x=w.left,_=w.top,S=w.height,O=w.width;return k.createElement("defs",null,k.createElement("clipPath",{id:b},k.createElement("rect",{x,y:_,height:S,width:O})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,x){var _=S1(x,2),S=_[0],O=_[1];return z(z({},w),{},ee({},S,O.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,x){var _=S1(x,2),S=_[0],O=_[1];return z(z({},w),{},ee({},S,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,x=w.formattedGraphicalItems,_=w.activeItem;if(x&&x.length)for(var S=0,O=x.length;S<O;S++){var E=x[S],j=E.props,I=E.item,C=I.type.defaultProps!==void 0?z(z({},I.type.defaultProps),I.props):I.props,B=Hn(I.type);if(B==="Bar"){var A=(j.data||[]).find(function(N){return xK(b,N)});if(A)return{graphicalItem:E,payload:A}}else if(B==="RadialBar"){var M=(j.data||[]).find(function(N){return nw(b,N)});if(M)return{graphicalItem:E,payload:M}}else if(ld(E,_)||ud(E,_)||Vl(E,_)){var $=uX({graphicalItem:E,activeTooltipItem:_,itemData:C.data}),D=C.activeIndex===void 0?$:C.activeIndex;return{graphicalItem:z(z({},E),{},{childIndex:D}),payload:Vl(E,_)?C.data[$]:E.props.data[$]}}}return null}},{key:"render",value:function(){var b=this;if(!V0(this))return null;var w=this.props,x=w.children,_=w.className,S=w.width,O=w.height,E=w.style,j=w.compact,I=w.title,C=w.desc,B=O1(w,XQ),A=J(B,!1);if(j)return k.createElement(l1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement(Tp,Zi({},A,{width:S,height:O,title:I,desc:C}),this.renderClipPath(),G0(x,this.renderMap)));if(this.props.accessibilityLayer){var M,$;A.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,A.role=($=this.props.role)!==null&&$!==void 0?$:"application",A.onKeyDown=function(N){b.accessibilityManager.keyboardEvent(N)},A.onFocus=function(){b.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return k.createElement(l1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement("div",Zi({className:ie("recharts-wrapper",_),style:z({position:"relative",cursor:"default",width:S,height:O},E)},D,{ref:function(R){b.container=R}}),k.createElement(Tp,Zi({},A,{width:S,height:O,title:I,desc:C,style:fZ}),this.renderClipPath(),G0(x,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);ee(g,"displayName",n),ee(g,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),ee(g,"getDerivedStateFromProps",function(y,p){var m=y.dataKey,b=y.data,w=y.children,x=y.width,_=y.height,S=y.layout,O=y.stackOffset,E=y.margin,j=p.dataStartIndex,I=p.dataEndIndex;if(p.updateId===void 0){var C=E1(y);return z(z(z({},C),{},{updateId:0},h(z(z({props:y},C),{},{updateId:0}),p)),{},{prevDataKey:m,prevData:b,prevWidth:x,prevHeight:_,prevLayout:S,prevStackOffset:O,prevMargin:E,prevChildren:w})}if(m!==p.prevDataKey||b!==p.prevData||x!==p.prevWidth||_!==p.prevHeight||S!==p.prevLayout||O!==p.prevStackOffset||!aa(E,p.prevMargin)){var B=E1(y),A={chartX:p.chartX,chartY:p.chartY,isTooltipActive:p.isTooltipActive},M=z(z({},A1(p,b,S)),{},{updateId:p.updateId+1}),$=z(z(z({},B),A),M);return z(z(z({},$),h(z({props:y},$),p)),{},{prevDataKey:m,prevData:b,prevWidth:x,prevHeight:_,prevLayout:S,prevStackOffset:O,prevMargin:E,prevChildren:w})}if(!Ep(w,p.prevChildren)){var D,N,R,L,W=Tt(w,Ca),U=W&&(D=(N=W.props)===null||N===void 0?void 0:N.startIndex)!==null&&D!==void 0?D:j,X=W&&(R=(L=W.props)===null||L===void 0?void 0:L.endIndex)!==null&&R!==void 0?R:I,Z=U!==j||X!==I,ae=!ne(b),F=ae&&!Z?p.updateId:p.updateId+1;return z(z({updateId:F},h(z(z({props:y},p),{},{updateId:F,dataStartIndex:U,dataEndIndex:X}),p)),{},{prevChildren:w,dataStartIndex:U,dataEndIndex:X})}return null}),ee(g,"renderActiveDot",function(y,p,m){var b;return T.isValidElement(y)?b=T.cloneElement(y,p):te(y)?b=y(p):b=k.createElement(nd,p),k.createElement(fe,{className:"recharts-active-dot",key:m},b)});var v=T.forwardRef(function(p,m){return k.createElement(g,Zi({},p,{ref:m}))});return v.displayName=g.displayName,v},wZ=JE({chartName:"LineChart",GraphicalChild:mu,axisComponents:[{axisType:"xAxis",AxisComp:rg},{axisType:"yAxis",AxisComp:vd}],formatAxisMap:Uq}),_Z=JE({chartName:"PieChart",GraphicalChild:or,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:od},{axisType:"radiusAxis",AxisComp:id}],formatAxisMap:j7,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function SZ(e){const[t,n]=T.useState("");return T.useEffect(()=>{if(!e)return;function r(){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);a<60?n(`${a}s ago`):a<3600?n(`${Math.floor(a/60)}m ago`):n(`${Math.floor(a/3600)}h ago`)}r();const i=setInterval(r,1e4);return()=>clearInterval(i)},[e]),t}function Oh(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const OZ={critical:"#ef4444",high:"#f97316",medium:"#eab308",low:"#22c55e"};function PZ(){const e=li(wn.overview),t=li(wn.status),n=li(wn.tokens),[r,i]=T.useState(!1),[a,o]=T.useState(),l=SZ(a);T.useEffect(()=>{t.status==="success"&&o(t.data.lastIndexed)},[t]);async function u(){i(!0);try{const d=await wn.refresh();d.ok&&(o(d.lastIndexed),window.location.reload())}finally{i(!1)}}if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{data:s}=e,f=Object.entries(s.risk).map(([d,h])=>({name:d,value:h})),c=P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Overview"}),P.jsxs("div",{className:"flex items-center gap-3",children:[l&&P.jsxs("span",{className:"text-white/30 text-xs",children:["indexed ",l]}),P.jsx("button",{onClick:u,disabled:r,className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-[#603dc6]/20 text-[#a78bfa] hover:bg-[#603dc6]/30 transition-colors disabled:opacity-50",children:r?"Refreshing…":"↻ Refresh"})]})]});return P.jsxs("div",{className:"space-y-8",children:[c,P.jsxs("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[P.jsx(No,{to:"/graph",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Files",value:s.totalFiles})}),P.jsx(No,{to:"/graph",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Edges",value:s.totalEdges})}),P.jsx(No,{to:"/communities",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Communities",value:s.totalCommunities})}),P.jsx(No,{to:"/risk",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Git history",value:s.gitEnabled?"enabled":"disabled"})})]}),P.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Risk breakdown"}),P.jsxs("div",{className:"flex items-center gap-6",children:[P.jsx(EP,{width:140,height:140,children:P.jsxs(_Z,{style:{background:"transparent"},children:[P.jsx(or,{data:f,dataKey:"value",cx:"50%",cy:"50%",innerRadius:40,outerRadius:60,children:f.map(d=>P.jsx(Hf,{fill:OZ[d.name]??"#ccc"},d.name))}),P.jsx(bn,{contentStyle:{background:"#1e1d2a",border:"1px solid rgba(255,255,255,0.10)",borderRadius:"0.625rem",color:"#fafafa"}})]})}),P.jsx("div",{className:"space-y-2",children:f.map(({name:d,value:h})=>P.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[P.jsx(fO,{level:d}),P.jsxs("span",{className:"text-white/70",children:[h," files"]})]},d))})]})]}),n.status==="success"&&P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5 lg:col-span-2",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Token consumption"}),P.jsxs("div",{className:"flex flex-col gap-4",children:[P.jsxs("div",{className:"flex items-end justify-between",children:[P.jsxs("div",{children:[P.jsx("p",{className:"text-white/50 text-xs mb-1",children:"Actual tokens used (with skeletonization)"}),P.jsx("p",{className:"text-white text-3xl font-semibold",children:Oh(n.data.skeletonTokens)})]}),P.jsxs("div",{className:"text-right",children:[P.jsx("p",{className:"text-white/50 text-xs mb-1",children:"Would have been (full files)"}),P.jsx("p",{className:"text-white/60 text-3xl font-semibold line-through decoration-white/30",children:Oh(n.data.fullTokens)})]})]}),P.jsxs("div",{children:[P.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[P.jsxs("span",{className:"text-white/40 text-xs",children:[Oh(n.data.savedTokens)," tokens saved"]}),P.jsxs("span",{className:"text-[#a78bfa] text-sm font-semibold",children:[n.data.reductionPercent,"% reduction"]})]}),P.jsx("div",{className:"w-full bg-white/10 rounded-full h-2",children:P.jsx("div",{className:"bg-[#603dc6] h-2 rounded-full transition-all",style:{width:`${n.data.reductionPercent}%`}})}),P.jsxs("div",{className:"flex justify-between mt-1",children:[P.jsx("span",{className:"text-white/20 text-xs",children:"0"}),P.jsx("span",{className:"text-white/20 text-xs",children:"100%"})]})]})]})]}),P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Top architectural hubs"}),P.jsx("ul",{className:"space-y-2",children:s.topHubs.slice(0,8).map(d=>P.jsxs("li",{className:"flex items-center justify-between text-sm",children:[P.jsx("span",{className:"truncate text-white/80 max-w-[60%]",title:d.file,children:d.file.split("/").pop()}),P.jsxs("span",{className:"text-white/40 text-xs",children:["↑",d.inDegree," ↓",d.outDegree]})]},d.file))})]})]})]})}var AZ={value:()=>{}};function yu(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bs(n)}function bs(e){this._=e}function EZ(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bs.prototype=yu.prototype={constructor:bs,on:function(e,t){var n=this._,r=EZ(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=$Z(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=T1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=T1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function $Z(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function T1(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=AZ,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var em="http://www.w3.org/1999/xhtml";const j1={svg:"http://www.w3.org/2000/svg",xhtml:em,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yd(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),j1.hasOwnProperty(t)?{space:j1[t],local:e}:e}function TZ(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===em&&t.documentElement.namespaceURI===em?t.createElement(e):t.createElementNS(n,e)}}function jZ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function e$(e){var t=yd(e);return(t.local?jZ:TZ)(t)}function kZ(){}function ig(e){return e==null?kZ:function(){return this.querySelector(e)}}function CZ(e){typeof e!="function"&&(e=ig(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),u,s,f=0;f<o;++f)(u=a[f])&&(s=e.call(u,u.__data__,f,a))&&("__data__"in u&&(s.__data__=u.__data__),l[f]=s);return new Rt(r,this._parents)}function NZ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function MZ(){return[]}function t$(e){return e==null?MZ:function(){return this.querySelectorAll(e)}}function IZ(e){return function(){return NZ(e.apply(this,arguments))}}function DZ(e){typeof e=="function"?e=IZ(e):e=t$(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,u,s=0;s<l;++s)(u=o[s])&&(r.push(e.call(u,u.__data__,s,o)),i.push(u));return new Rt(r,i)}function n$(e){return function(){return this.matches(e)}}function r$(e){return function(t){return t.matches(e)}}var RZ=Array.prototype.find;function LZ(e){return function(){return RZ.call(this.children,e)}}function BZ(){return this.firstElementChild}function zZ(e){return this.select(e==null?BZ:LZ(typeof e=="function"?e:r$(e)))}var FZ=Array.prototype.filter;function UZ(){return Array.from(this.children)}function WZ(e){return function(){return FZ.call(this.children,e)}}function HZ(e){return this.selectAll(e==null?UZ:WZ(typeof e=="function"?e:r$(e)))}function VZ(e){typeof e!="function"&&(e=n$(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,s=0;s<o;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&l.push(u);return new Rt(r,this._parents)}function i$(e){return new Array(e.length)}function KZ(){return new Rt(this._enter||this._groups.map(i$),this._parents)}function Zc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zc.prototype={constructor:Zc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function GZ(e){return function(){return e}}function XZ(e,t,n,r,i,a){for(var o=0,l,u=t.length,s=a.length;o<s;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new Zc(e,a[o]);for(;o<u;++o)(l=t[o])&&(i[o]=l)}function qZ(e,t,n,r,i,a,o){var l,u,s=new Map,f=t.length,c=a.length,d=new Array(f),h;for(l=0;l<f;++l)(u=t[l])&&(d[l]=h=o.call(u,u.__data__,l,t)+"",s.has(h)?i[l]=u:s.set(h,u));for(l=0;l<c;++l)h=o.call(e,a[l],l,a)+"",(u=s.get(h))?(r[l]=u,u.__data__=a[l],s.delete(h)):n[l]=new Zc(e,a[l]);for(l=0;l<f;++l)(u=t[l])&&s.get(d[l])===u&&(i[l]=u)}function YZ(e){return e.__data__}function QZ(e,t){if(!arguments.length)return Array.from(this,YZ);var n=t?qZ:XZ,r=this._parents,i=this._groups;typeof e!="function"&&(e=GZ(e));for(var a=i.length,o=new Array(a),l=new Array(a),u=new Array(a),s=0;s<a;++s){var f=r[s],c=i[s],d=c.length,h=ZZ(e.call(f,f&&f.__data__,s,r)),g=h.length,v=l[s]=new Array(g),y=o[s]=new Array(g),p=u[s]=new Array(d);n(f,c,v,y,p,h,t);for(var m=0,b=0,w,x;m<g;++m)if(w=v[m]){for(m>=b&&(b=m+1);!(x=y[b])&&++b<g;);w._next=x||null}}return o=new Rt(o,r),o._enter=l,o._exit=u,o}function ZZ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JZ(){return new Rt(this._exit||this._groups.map(i$),this._parents)}function eJ(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function tJ(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),u=0;u<o;++u)for(var s=n[u],f=r[u],c=s.length,d=l[u]=new Array(c),h,g=0;g<c;++g)(h=s[g]||f[g])&&(d[g]=h);for(;u<i;++u)l[u]=n[u];return new Rt(l,this._parents)}function nJ(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function rJ(e){e||(e=iJ);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,u=i[a]=new Array(l),s,f=0;f<l;++f)(s=o[f])&&(u[f]=s);u.sort(t)}return new Rt(i,this._parents).order()}function iJ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function aJ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function oJ(){return Array.from(this)}function lJ(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function uJ(){let e=0;for(const t of this)++e;return e}function sJ(){return!this.node()}function cJ(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function fJ(e){return function(){this.removeAttribute(e)}}function dJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hJ(e,t){return function(){this.setAttribute(e,t)}}function pJ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function vJ(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function mJ(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function yJ(e,t){var n=yd(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?dJ:fJ:typeof t=="function"?n.local?mJ:vJ:n.local?pJ:hJ)(n,t))}function a$(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gJ(e){return function(){this.style.removeProperty(e)}}function bJ(e,t,n){return function(){this.style.setProperty(e,t,n)}}function xJ(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function wJ(e,t,n){return arguments.length>1?this.each((t==null?gJ:typeof t=="function"?xJ:bJ)(e,t,n??"")):Wa(this.node(),e)}function Wa(e,t){return e.style.getPropertyValue(t)||a$(e).getComputedStyle(e,null).getPropertyValue(t)}function _J(e){return function(){delete this[e]}}function SJ(e,t){return function(){this[e]=t}}function OJ(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function PJ(e,t){return arguments.length>1?this.each((t==null?_J:typeof t=="function"?OJ:SJ)(e,t)):this.node()[e]}function o$(e){return e.trim().split(/^|\s+/)}function ag(e){return e.classList||new l$(e)}function l$(e){this._node=e,this._names=o$(e.getAttribute("class")||"")}l$.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function u$(e,t){for(var n=ag(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function s$(e,t){for(var n=ag(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function AJ(e){return function(){u$(this,e)}}function EJ(e){return function(){s$(this,e)}}function $J(e,t){return function(){(t.apply(this,arguments)?u$:s$)(this,e)}}function TJ(e,t){var n=o$(e+"");if(arguments.length<2){for(var r=ag(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?$J:t?AJ:EJ)(n,t))}function jJ(){this.textContent=""}function kJ(e){return function(){this.textContent=e}}function CJ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function NJ(e){return arguments.length?this.each(e==null?jJ:(typeof e=="function"?CJ:kJ)(e)):this.node().textContent}function MJ(){this.innerHTML=""}function IJ(e){return function(){this.innerHTML=e}}function DJ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function RJ(e){return arguments.length?this.each(e==null?MJ:(typeof e=="function"?DJ:IJ)(e)):this.node().innerHTML}function LJ(){this.nextSibling&&this.parentNode.appendChild(this)}function BJ(){return this.each(LJ)}function zJ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function FJ(){return this.each(zJ)}function UJ(e){var t=typeof e=="function"?e:e$(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function WJ(){return null}function HJ(e,t){var n=typeof e=="function"?e:e$(e),r=t==null?WJ:typeof t=="function"?t:ig(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function VJ(){var e=this.parentNode;e&&e.removeChild(this)}function KJ(){return this.each(VJ)}function GJ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function XJ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qJ(e){return this.select(e?XJ:GJ)}function YJ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function QJ(e){return function(t){e.call(this,t,this.__data__)}}function ZJ(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function JJ(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function eee(e,t,n){return function(){var r=this.__on,i,a=QJ(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function tee(e,t,n){var r=ZJ(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,s=l.length,f;u<s;++u)for(i=0,f=l[u];i<a;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=t?eee:JJ,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function c$(e,t,n){var r=a$(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function nee(e,t){return function(){return c$(this,e,t)}}function ree(e,t){return function(){return c$(this,e,t.apply(this,arguments))}}function iee(e,t){return this.each((typeof t=="function"?ree:nee)(e,t))}function*aee(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var f$=[null];function Rt(e,t){this._groups=e,this._parents=t}function gu(){return new Rt([[document.documentElement]],f$)}function oee(){return this}Rt.prototype=gu.prototype={constructor:Rt,select:CZ,selectAll:DZ,selectChild:zZ,selectChildren:HZ,filter:VZ,data:QZ,enter:KZ,exit:JZ,join:eJ,merge:tJ,selection:oee,order:nJ,sort:rJ,call:aJ,nodes:oJ,node:lJ,size:uJ,empty:sJ,each:cJ,attr:yJ,style:wJ,property:PJ,classed:TJ,text:NJ,html:RJ,raise:BJ,lower:FJ,append:UJ,insert:HJ,remove:KJ,clone:qJ,datum:YJ,on:tee,dispatch:iee,[Symbol.iterator]:aee};function fn(e){return typeof e=="string"?new Rt([[document.querySelector(e)]],[document.documentElement]):new Rt([[e]],f$)}function lee(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Dn(e,t){if(e=lee(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const uee={passive:!1},Zl={capture:!0,passive:!1};function Ph(e){e.stopImmediatePropagation()}function sa(e){e.preventDefault(),e.stopImmediatePropagation()}function d$(e){var t=e.document.documentElement,n=fn(e).on("dragstart.drag",sa,Zl);"onselectstart"in t?n.on("selectstart.drag",sa,Zl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function h$(e,t){var n=e.document.documentElement,r=fn(e).on("dragstart.drag",null);t&&(r.on("click.drag",sa,Zl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const es=e=>()=>e;function tm(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:u,dy:s,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:f}})}tm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function see(e){return!e.ctrlKey&&!e.button}function cee(){return this.parentNode}function fee(e,t){return t??{x:e.x,y:e.y}}function dee(){return navigator.maxTouchPoints||"ontouchstart"in this}function hee(){var e=see,t=cee,n=fee,r=dee,i={},a=yu("start","drag","end"),o=0,l,u,s,f,c=0;function d(w){w.on("mousedown.drag",h).filter(r).on("touchstart.drag",y).on("touchmove.drag",p,uee).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(w,x){if(!(f||!e.call(this,w,x))){var _=b(this,t.call(this,w,x),w,x,"mouse");_&&(fn(w.view).on("mousemove.drag",g,Zl).on("mouseup.drag",v,Zl),d$(w.view),Ph(w),s=!1,l=w.clientX,u=w.clientY,_("start",w))}}function g(w){if(sa(w),!s){var x=w.clientX-l,_=w.clientY-u;s=x*x+_*_>c}i.mouse("drag",w)}function v(w){fn(w.view).on("mousemove.drag mouseup.drag",null),h$(w.view,s),sa(w),i.mouse("end",w)}function y(w,x){if(e.call(this,w,x)){var _=w.changedTouches,S=t.call(this,w,x),O=_.length,E,j;for(E=0;E<O;++E)(j=b(this,S,w,x,_[E].identifier,_[E]))&&(Ph(w),j("start",w,_[E]))}}function p(w){var x=w.changedTouches,_=x.length,S,O;for(S=0;S<_;++S)(O=i[x[S].identifier])&&(sa(w),O("drag",w,x[S]))}function m(w){var x=w.changedTouches,_=x.length,S,O;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),S=0;S<_;++S)(O=i[x[S].identifier])&&(Ph(w),O("end",w,x[S]))}function b(w,x,_,S,O,E){var j=a.copy(),I=Dn(E||_,x),C,B,A;if((A=n.call(w,new tm("beforestart",{sourceEvent:_,target:d,identifier:O,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:j}),S))!=null)return C=A.x-I[0]||0,B=A.y-I[1]||0,function M($,D,N){var R=I,L;switch($){case"start":i[O]=M,L=o++;break;case"end":delete i[O],--o;case"drag":I=Dn(N||D,x),L=o;break}j.call($,w,new tm($,{sourceEvent:D,subject:A,target:d,identifier:O,active:L,x:I[0]+C,y:I[1]+B,dx:I[0]-R[0],dy:I[1]-R[1],dispatch:j}),S)}}return d.filter=function(w){return arguments.length?(e=typeof w=="function"?w:es(!!w),d):e},d.container=function(w){return arguments.length?(t=typeof w=="function"?w:es(w),d):t},d.subject=function(w){return arguments.length?(n=typeof w=="function"?w:es(w),d):n},d.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:es(!!w),d):r},d.on=function(){var w=a.on.apply(a,arguments);return w===a?d:w},d.clickDistance=function(w){return arguments.length?(c=(w=+w)*w,d):Math.sqrt(c)},d}var Ha=0,Io=0,Eo=0,p$=1e3,Jc,Do,ef=0,_i=0,gd=0,Jl=typeof performance=="object"&&performance.now?performance:Date,v$=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function og(){return _i||(v$(pee),_i=Jl.now()+gd)}function pee(){_i=0}function tf(){this._call=this._time=this._next=null}tf.prototype=lg.prototype={constructor:tf,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?og():+n)+(t==null?0:+t),!this._next&&Do!==this&&(Do?Do._next=this:Jc=this,Do=this),this._call=e,this._time=n,nm()},stop:function(){this._call&&(this._call=null,this._time=1/0,nm())}};function lg(e,t,n){var r=new tf;return r.restart(e,t,n),r}function vee(){og(),++Ha;for(var e=Jc,t;e;)(t=_i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ha}function k1(){_i=(ef=Jl.now())+gd,Ha=Io=0;try{vee()}finally{Ha=0,yee(),_i=0}}function mee(){var e=Jl.now(),t=e-ef;t>p$&&(gd-=t,ef=e)}function yee(){for(var e,t=Jc,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jc=n);Do=e,nm(r)}function nm(e){if(!Ha){Io&&(Io=clearTimeout(Io));var t=e-_i;t>24?(e<1/0&&(Io=setTimeout(k1,e-Jl.now()-gd)),Eo&&(Eo=clearInterval(Eo))):(Eo||(ef=Jl.now(),Eo=setInterval(mee,p$)),Ha=1,v$(k1))}}function C1(e,t,n){var r=new tf;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var gee=yu("start","end","cancel","interrupt"),bee=[],m$=0,N1=1,rm=2,xs=3,M1=4,im=5,ws=6;function bd(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;xee(e,n,{name:t,index:r,group:i,on:gee,tween:bee,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:m$})}function ug(e,t){var n=mn(e,t);if(n.state>m$)throw new Error("too late; already scheduled");return n}function jn(e,t){var n=mn(e,t);if(n.state>xs)throw new Error("too late; already running");return n}function mn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function xee(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=lg(a,0,n.time);function a(s){n.state=N1,n.timer.restart(o,n.delay,n.time),n.delay<=s&&o(s-n.delay)}function o(s){var f,c,d,h;if(n.state!==N1)return u();for(f in r)if(h=r[f],h.name===n.name){if(h.state===xs)return C1(o);h.state===M1?(h.state=ws,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+f<t&&(h.state=ws,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[f])}if(C1(function(){n.state===xs&&(n.state=M1,n.timer.restart(l,n.delay,n.time),l(s))}),n.state=rm,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rm){for(n.state=xs,i=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(h=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(i[++c]=h);i.length=c+1}}function l(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(u),n.state=im,1),c=-1,d=i.length;++c<d;)i[c].call(e,f);n.state===im&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ws,n.timer.stop(),delete r[t];for(var s in r)return;delete e.__transition}}function _s(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>rm&&r.state<im,r.state=ws,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function wee(e){return this.each(function(){_s(this,e)})}function _ee(e,t){var n,r;return function(){var i=jn(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function See(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=jn(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function Oee(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mn(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?_ee:See)(n,e,t))}function sg(e,t,n){var r=e._id;return e.each(function(){var i=jn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return mn(i,r).value[t]}}function y$(e,t){var n;return(typeof t=="number"?sn:t instanceof bi?hc:(n=bi(t))?(t=n,hc):BP)(e,t)}function Pee(e){return function(){this.removeAttribute(e)}}function Aee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Eee(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function $ee(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Tee(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function jee(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function kee(e,t){var n=yd(e),r=n==="transform"?R6:y$;return this.attrTween(e,typeof t=="function"?(n.local?jee:Tee)(n,r,sg(this,"attr."+e,t)):t==null?(n.local?Aee:Pee)(n):(n.local?$ee:Eee)(n,r,t))}function Cee(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Nee(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Mee(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Nee(e,a)),n}return i._value=t,i}function Iee(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Cee(e,a)),n}return i._value=t,i}function Dee(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=yd(e);return this.tween(n,(r.local?Mee:Iee)(r,t))}function Ree(e,t){return function(){ug(this,e).delay=+t.apply(this,arguments)}}function Lee(e,t){return t=+t,function(){ug(this,e).delay=t}}function Bee(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ree:Lee)(t,e)):mn(this.node(),t).delay}function zee(e,t){return function(){jn(this,e).duration=+t.apply(this,arguments)}}function Fee(e,t){return t=+t,function(){jn(this,e).duration=t}}function Uee(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zee:Fee)(t,e)):mn(this.node(),t).duration}function Wee(e,t){if(typeof t!="function")throw new Error;return function(){jn(this,e).ease=t}}function Hee(e){var t=this._id;return arguments.length?this.each(Wee(t,e)):mn(this.node(),t).ease}function Vee(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;jn(this,e).ease=n}}function Kee(e){if(typeof e!="function")throw new Error;return this.each(Vee(this._id,e))}function Gee(e){typeof e!="function"&&(e=n$(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,s=0;s<o;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&l.push(u);return new tr(r,this._parents,this._name,this._id)}function Xee(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u=t[l],s=n[l],f=u.length,c=o[l]=new Array(f),d,h=0;h<f;++h)(d=u[h]||s[h])&&(c[h]=d);for(;l<r;++l)o[l]=t[l];return new tr(o,this._parents,this._name,this._id)}function qee(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Yee(e,t,n){var r,i,a=qee(t)?ug:jn;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function Qee(e,t){var n=this._id;return arguments.length<2?mn(this.node(),n).on.on(e):this.each(Yee(n,e,t))}function Zee(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Jee(){return this.on("end.remove",Zee(this._id))}function ete(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ig(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],u=l.length,s=a[o]=new Array(u),f,c,d=0;d<u;++d)(f=l[d])&&(c=e.call(f,f.__data__,d,l))&&("__data__"in f&&(c.__data__=f.__data__),s[d]=c,bd(s[d],t,n,d,s,mn(f,n)));return new tr(a,this._parents,t,n)}function tte(e){var t=this._name,n=this._id;typeof e!="function"&&(e=t$(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u=r[l],s=u.length,f,c=0;c<s;++c)if(f=u[c]){for(var d=e.call(f,f.__data__,c,u),h,g=mn(f,n),v=0,y=d.length;v<y;++v)(h=d[v])&&bd(h,t,n,v,d,g);a.push(d),o.push(f)}return new tr(a,o,t,n)}var nte=gu.prototype.constructor;function rte(){return new nte(this._groups,this._parents)}function ite(e,t){var n,r,i;return function(){var a=Wa(this,e),o=(this.style.removeProperty(e),Wa(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function g$(e){return function(){this.style.removeProperty(e)}}function ate(e,t,n){var r,i=n+"",a;return function(){var o=Wa(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function ote(e,t,n){var r,i,a;return function(){var o=Wa(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Wa(this,e))),o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l))}}function lte(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var u=jn(this,e),s=u.on,f=u.value[a]==null?l||(l=g$(t)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(o,i=f),u.on=r}}function ute(e,t,n){var r=(e+="")=="transform"?D6:y$;return t==null?this.styleTween(e,ite(e,r)).on("end.style."+e,g$(e)):typeof t=="function"?this.styleTween(e,ote(e,r,sg(this,"style."+e,t))).each(lte(this._id,e)):this.styleTween(e,ate(e,r,t),n).on("end.style."+e,null)}function ste(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function cte(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&ste(e,o,n)),r}return a._value=t,a}function fte(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,cte(e,t,n??""))}function dte(e){return function(){this.textContent=e}}function hte(e){return function(){var t=e(this);this.textContent=t??""}}function pte(e){return this.tween("text",typeof e=="function"?hte(sg(this,"text",e)):dte(e==null?"":e+""))}function vte(e){return function(t){this.textContent=e.call(this,t)}}function mte(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&vte(i)),t}return r._value=e,r}function yte(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,mte(e))}function gte(){for(var e=this._name,t=this._id,n=b$(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,s=0;s<l;++s)if(u=o[s]){var f=mn(u,t);bd(u,e,n,s,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new tr(r,this._parents,e,n)}function bte(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},u={value:function(){--i===0&&a()}};n.each(function(){var s=jn(this,r),f=s.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),s.on=t}),i===0&&a()})}var xte=0;function tr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function b$(){return++xte}var Cn=gu.prototype;tr.prototype={constructor:tr,select:ete,selectAll:tte,selectChild:Cn.selectChild,selectChildren:Cn.selectChildren,filter:Gee,merge:Xee,selection:rte,transition:gte,call:Cn.call,nodes:Cn.nodes,node:Cn.node,size:Cn.size,empty:Cn.empty,each:Cn.each,on:Qee,attr:kee,attrTween:Dee,style:ute,styleTween:fte,text:pte,textTween:yte,remove:Jee,tween:Oee,delay:Bee,duration:Uee,ease:Hee,easeVarying:Kee,end:bte,[Symbol.iterator]:Cn[Symbol.iterator]};function wte(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var _te={time:null,delay:0,duration:250,ease:wte};function Ste(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Ote(e){var t,n;e instanceof tr?(t=e._id,e=e._name):(t=b$(),(n=_te).time=og(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,s=0;s<l;++s)(u=o[s])&&bd(u,e,t,s,o,n||Ste(u,t));return new tr(r,this._parents,e,t)}gu.prototype.interrupt=wee;gu.prototype.transition=Ote;function Pte(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=n.length,l,u=0,s=0;for(a=0;a<o;++a)l=n[a],u+=l.x,s+=l.y;for(u=(u/o-e)*r,s=(s/o-t)*r,a=0;a<o;++a)l=n[a],l.x-=u,l.y-=s}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(e=+a,i):e},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Ate(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return x$(this.cover(t,n),t,n,e)}function x$(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},l=e._x0,u=e._y0,s=e._x1,f=e._y1,c,d,h,g,v,y,p,m;if(!a)return e._root=o,e;for(;a.length;)if((v=t>=(c=(l+s)/2))?l=c:s=c,(y=n>=(d=(u+f)/2))?u=d:f=d,i=a,!(a=a[p=y<<1|v]))return i[p]=o,e;if(h=+e._x.call(null,a.data),g=+e._y.call(null,a.data),t===h&&n===g)return o.next=a,i?i[p]=o:e._root=o,e;do i=i?i[p]=new Array(4):e._root=new Array(4),(v=t>=(c=(l+s)/2))?l=c:s=c,(y=n>=(d=(u+f)/2))?u=d:f=d;while((p=y<<1|v)===(m=(g>=d)<<1|h>=c));return i[m]=a,i[p]=o,e}function Ete(e){var t,n,r=e.length,i,a,o=new Array(r),l=new Array(r),u=1/0,s=1/0,f=-1/0,c=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,l[n]=a,i<u&&(u=i),i>f&&(f=i),a<s&&(s=a),a>c&&(c=a));if(u>f||s>c)return this;for(this.cover(u,s).cover(f,c),n=0;n<r;++n)x$(this,o[n],l[n],e[n]);return this}function $te(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,l=this._root,u,s;n>e||e>=i||r>t||t>=a;)switch(s=(t<r)<<1|e<n,u=new Array(4),u[s]=l,l=u,o*=2,s){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function Tte(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function jte(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ct(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function kte(e,t,n){var r,i=this._x0,a=this._y0,o,l,u,s,f=this._x1,c=this._y1,d=[],h=this._root,g,v;for(h&&d.push(new ct(h,i,a,f,c)),n==null?n=1/0:(i=e-n,a=t-n,f=e+n,c=t+n,n*=n);g=d.pop();)if(!(!(h=g.node)||(o=g.x0)>f||(l=g.y0)>c||(u=g.x1)<i||(s=g.y1)<a))if(h.length){var y=(o+u)/2,p=(l+s)/2;d.push(new ct(h[3],y,p,u,s),new ct(h[2],o,p,y,s),new ct(h[1],y,l,u,p),new ct(h[0],o,l,y,p)),(v=(t>=p)<<1|e>=y)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=g)}else{var m=e-+this._x.call(null,h.data),b=t-+this._y.call(null,h.data),w=m*m+b*b;if(w<n){var x=Math.sqrt(n=w);i=e-x,a=t-x,f=e+x,c=t+x,r=h.data}}return r}function Cte(e){if(isNaN(f=+this._x.call(null,e))||isNaN(c=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,l=this._y0,u=this._x1,s=this._y1,f,c,d,h,g,v,y,p;if(!n)return this;if(n.length)for(;;){if((g=f>=(d=(o+u)/2))?o=d:u=d,(v=c>=(h=(l+s)/2))?l=h:s=h,t=n,!(n=n[y=v<<1|g]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(r=t,p=y)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[y]=a:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[p]=n:this._root=n),this):(this._root=a,this)}function Nte(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Mte(){return this._root}function Ite(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Dte(e){var t=[],n,r=this._root,i,a,o,l,u;for(r&&t.push(new ct(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,l=n.x1,u=n.y1)&&r.length){var s=(a+l)/2,f=(o+u)/2;(i=r[3])&&t.push(new ct(i,s,f,l,u)),(i=r[2])&&t.push(new ct(i,a,f,s,u)),(i=r[1])&&t.push(new ct(i,s,o,l,f)),(i=r[0])&&t.push(new ct(i,a,o,s,f))}return this}function Rte(e){var t=[],n=[],r;for(this._root&&t.push(new ct(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,l=r.y0,u=r.x1,s=r.y1,f=(o+u)/2,c=(l+s)/2;(a=i[0])&&t.push(new ct(a,o,l,f,c)),(a=i[1])&&t.push(new ct(a,f,l,u,c)),(a=i[2])&&t.push(new ct(a,o,c,f,s)),(a=i[3])&&t.push(new ct(a,f,c,u,s))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Lte(e){return e[0]}function Bte(e){return arguments.length?(this._x=e,this):this._x}function zte(e){return e[1]}function Fte(e){return arguments.length?(this._y=e,this):this._y}function cg(e,t,n){var r=new fg(t??Lte,n??zte,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function fg(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function I1(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var yt=cg.prototype=fg.prototype;yt.copy=function(){var e=new fg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=I1(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=I1(r));return e};yt.add=Ate;yt.addAll=Ete;yt.cover=$te;yt.data=Tte;yt.extent=jte;yt.find=kte;yt.remove=Cte;yt.removeAll=Nte;yt.root=Mte;yt.size=Ite;yt.visit=Dte;yt.visitAfter=Rte;yt.x=Bte;yt.y=Fte;function ci(e){return function(){return e}}function gr(e){return(e()-.5)*1e-6}function Ute(e){return e.x+e.vx}function Wte(e){return e.y+e.vy}function Hte(e){var t,n,r,i=1,a=1;typeof e!="function"&&(e=ci(e==null?1:+e));function o(){for(var s,f=t.length,c,d,h,g,v,y,p=0;p<a;++p)for(c=cg(t,Ute,Wte).visitAfter(l),s=0;s<f;++s)d=t[s],v=n[d.index],y=v*v,h=d.x+d.vx,g=d.y+d.vy,c.visit(m);function m(b,w,x,_,S){var O=b.data,E=b.r,j=v+E;if(O){if(O.index>d.index){var I=h-O.x-O.vx,C=g-O.y-O.vy,B=I*I+C*C;B<j*j&&(I===0&&(I=gr(r),B+=I*I),C===0&&(C=gr(r),B+=C*C),B=(j-(B=Math.sqrt(B)))/B*i,d.vx+=(I*=B)*(j=(E*=E)/(y+E)),d.vy+=(C*=B)*j,O.vx-=I*(j=1-j),O.vy-=C*j)}return}return w>h+j||_<h-j||x>g+j||S<g-j}}function l(s){if(s.data)return s.r=n[s.data.index];for(var f=s.r=0;f<4;++f)s[f]&&s[f].r>s.r&&(s.r=s[f].r)}function u(){if(t){var s,f=t.length,c;for(n=new Array(f),s=0;s<f;++s)c=t[s],n[c.index]=+e(c,s,t)}}return o.initialize=function(s,f){t=s,r=f,u()},o.iterations=function(s){return arguments.length?(a=+s,o):a},o.strength=function(s){return arguments.length?(i=+s,o):i},o.radius=function(s){return arguments.length?(e=typeof s=="function"?s:ci(+s),u(),o):e},o}function Vte(e){return e.index}function D1(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Kte(e){var t=Vte,n=c,r,i=ci(30),a,o,l,u,s,f=1;e==null&&(e=[]);function c(y){return 1/Math.min(l[y.source.index],l[y.target.index])}function d(y){for(var p=0,m=e.length;p<f;++p)for(var b=0,w,x,_,S,O,E,j;b<m;++b)w=e[b],x=w.source,_=w.target,S=_.x+_.vx-x.x-x.vx||gr(s),O=_.y+_.vy-x.y-x.vy||gr(s),E=Math.sqrt(S*S+O*O),E=(E-a[b])/E*y*r[b],S*=E,O*=E,_.vx-=S*(j=u[b]),_.vy-=O*j,x.vx+=S*(j=1-j),x.vy+=O*j}function h(){if(o){var y,p=o.length,m=e.length,b=new Map(o.map((x,_)=>[t(x,_,o),x])),w;for(y=0,l=new Array(p);y<m;++y)w=e[y],w.index=y,typeof w.source!="object"&&(w.source=D1(b,w.source)),typeof w.target!="object"&&(w.target=D1(b,w.target)),l[w.source.index]=(l[w.source.index]||0)+1,l[w.target.index]=(l[w.target.index]||0)+1;for(y=0,u=new Array(m);y<m;++y)w=e[y],u[y]=l[w.source.index]/(l[w.source.index]+l[w.target.index]);r=new Array(m),g(),a=new Array(m),v()}}function g(){if(o)for(var y=0,p=e.length;y<p;++y)r[y]=+n(e[y],y,e)}function v(){if(o)for(var y=0,p=e.length;y<p;++y)a[y]=+i(e[y],y,e)}return d.initialize=function(y,p){o=y,s=p,h()},d.links=function(y){return arguments.length?(e=y,h(),d):e},d.id=function(y){return arguments.length?(t=y,d):t},d.iterations=function(y){return arguments.length?(f=+y,d):f},d.strength=function(y){return arguments.length?(n=typeof y=="function"?y:ci(+y),g(),d):n},d.distance=function(y){return arguments.length?(i=typeof y=="function"?y:ci(+y),v(),d):i},d}const Gte=1664525,Xte=1013904223,R1=4294967296;function qte(){let e=1;return()=>(e=(Gte*e+Xte)%R1)/R1}function Yte(e){return e.x}function Qte(e){return e.y}var Zte=10,Jte=Math.PI*(3-Math.sqrt(5));function ene(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,l=new Map,u=lg(c),s=yu("tick","end"),f=qte();e==null&&(e=[]);function c(){d(),s.call("tick",t),n<r&&(u.stop(),s.call("end",t))}function d(v){var y,p=e.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,l.forEach(function(w){w(n)}),y=0;y<p;++y)m=e[y],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return t}function h(){for(var v=0,y=e.length,p;v<y;++v){if(p=e[v],p.index=v,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var m=Zte*Math.sqrt(.5+v),b=v*Jte;p.x=m*Math.cos(b),p.y=m*Math.sin(b)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.vy=0)}}function g(v){return v.initialize&&v.initialize(e,f),v}return h(),t={tick:d,restart:function(){return u.restart(c),t},stop:function(){return u.stop(),t},nodes:function(v){return arguments.length?(e=v,h(),l.forEach(g),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(a=+v,t):a},velocityDecay:function(v){return arguments.length?(o=1-v,t):1-o},randomSource:function(v){return arguments.length?(f=v,l.forEach(g),t):f},force:function(v,y){return arguments.length>1?(y==null?l.delete(v):l.set(v,g(y)),t):l.get(v)},find:function(v,y,p){var m=0,b=e.length,w,x,_,S,O;for(p==null?p=1/0:p*=p,m=0;m<b;++m)S=e[m],w=v-S.x,x=y-S.y,_=w*w+x*x,_<p&&(O=S,p=_);return O},on:function(v,y){return arguments.length>1?(s.on(v,y),t):s.on(v)}}}function tne(){var e,t,n,r,i=ci(-30),a,o=1,l=1/0,u=.81;function s(h){var g,v=e.length,y=cg(e,Yte,Qte).visitAfter(c);for(r=h,g=0;g<v;++g)t=e[g],y.visit(d)}function f(){if(e){var h,g=e.length,v;for(a=new Array(g),h=0;h<g;++h)v=e[h],a[v.index]=+i(v,h,e)}}function c(h){var g=0,v,y,p=0,m,b,w;if(h.length){for(m=b=w=0;w<4;++w)(v=h[w])&&(y=Math.abs(v.value))&&(g+=v.value,p+=y,m+=y*v.x,b+=y*v.y);h.x=m/p,h.y=b/p}else{v=h,v.x=v.data.x,v.y=v.data.y;do g+=a[v.data.index];while(v=v.next)}h.value=g}function d(h,g,v,y){if(!h.value)return!0;var p=h.x-t.x,m=h.y-t.y,b=y-g,w=p*p+m*m;if(b*b/u<w)return w<l&&(p===0&&(p=gr(n),w+=p*p),m===0&&(m=gr(n),w+=m*m),w<o&&(w=Math.sqrt(o*w)),t.vx+=p*h.value*r/w,t.vy+=m*h.value*r/w),!0;if(h.length||w>=l)return;(h.data!==t||h.next)&&(p===0&&(p=gr(n),w+=p*p),m===0&&(m=gr(n),w+=m*m),w<o&&(w=Math.sqrt(o*w)));do h.data!==t&&(b=a[h.data.index]*r/w,t.vx+=p*b,t.vy+=m*b);while(h=h.next)}return s.initialize=function(h,g){e=h,n=g,f()},s.strength=function(h){return arguments.length?(i=typeof h=="function"?h:ci(+h),f(),s):i},s.distanceMin=function(h){return arguments.length?(o=h*h,s):Math.sqrt(o)},s.distanceMax=function(h){return arguments.length?(l=h*h,s):Math.sqrt(l)},s.theta=function(h){return arguments.length?(u=h*h,s):Math.sqrt(u)},s}function nne(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const rne=nne("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),ts=e=>()=>e;function ine(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Un(e,t,n){this.k=e,this.x=t,this.y=n}Un.prototype={constructor:Un,scale:function(e){return e===1?this:new Un(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Un(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var w$=new Un(1,0,0);Un.prototype;function Ah(e){e.stopImmediatePropagation()}function $o(e){e.preventDefault(),e.stopImmediatePropagation()}function ane(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function one(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function L1(){return this.__zoom||w$}function lne(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function une(){return navigator.maxTouchPoints||"ontouchstart"in this}function sne(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function cne(){var e=ane,t=one,n=sne,r=lne,i=une,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,u=F6,s=yu("start","zoom","end"),f,c,d,h=500,g=150,v=0,y=10;function p(A){A.property("__zoom",L1).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",j).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(A,M,$,D){var N=A.selection?A.selection():A;N.property("__zoom",L1),A!==N?x(A,M,$,D):N.interrupt().each(function(){_(this,arguments).event(D).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},p.scaleBy=function(A,M,$,D){p.scaleTo(A,function(){var N=this.__zoom.k,R=typeof M=="function"?M.apply(this,arguments):M;return N*R},$,D)},p.scaleTo=function(A,M,$,D){p.transform(A,function(){var N=t.apply(this,arguments),R=this.__zoom,L=$==null?w(N):typeof $=="function"?$.apply(this,arguments):$,W=R.invert(L),U=typeof M=="function"?M.apply(this,arguments):M;return n(b(m(R,U),L,W),N,o)},$,D)},p.translateBy=function(A,M,$,D){p.transform(A,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),o)},null,D)},p.translateTo=function(A,M,$,D,N){p.transform(A,function(){var R=t.apply(this,arguments),L=this.__zoom,W=D==null?w(R):typeof D=="function"?D.apply(this,arguments):D;return n(w$.translate(W[0],W[1]).scale(L.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof $=="function"?-$.apply(this,arguments):-$),R,o)},D,N)};function m(A,M){return M=Math.max(a[0],Math.min(a[1],M)),M===A.k?A:new Un(M,A.x,A.y)}function b(A,M,$){var D=M[0]-$[0]*A.k,N=M[1]-$[1]*A.k;return D===A.x&&N===A.y?A:new Un(A.k,D,N)}function w(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function x(A,M,$,D){A.on("start.zoom",function(){_(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(D).end()}).tween("zoom",function(){var N=this,R=arguments,L=_(N,R).event(D),W=t.apply(N,R),U=$==null?w(W):typeof $=="function"?$.apply(N,R):$,X=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),Z=N.__zoom,ae=typeof M=="function"?M.apply(N,R):M,F=u(Z.invert(U).concat(X/Z.k),ae.invert(U).concat(X/ae.k));return function(Q){if(Q===1)Q=ae;else{var ce=F(Q),G=X/ce[2];Q=new Un(G,U[0]-ce[0]*G,U[1]-ce[1]*G)}L.zoom(null,Q)}})}function _(A,M,$){return!$&&A.__zooming||new S(A,M)}function S(A,M){this.that=A,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,M),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,M){return this.mouse&&A!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var M=fn(this.that).datum();s.call(A,this.that,new ine(A,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:s}),M)}};function O(A,...M){if(!e.apply(this,arguments))return;var $=_(this,M).event(A),D=this.__zoom,N=Math.max(a[0],Math.min(a[1],D.k*Math.pow(2,r.apply(this,arguments)))),R=Dn(A);if($.wheel)($.mouse[0][0]!==R[0]||$.mouse[0][1]!==R[1])&&($.mouse[1]=D.invert($.mouse[0]=R)),clearTimeout($.wheel);else{if(D.k===N)return;$.mouse=[R,D.invert(R)],_s(this),$.start()}$o(A),$.wheel=setTimeout(L,g),$.zoom("mouse",n(b(m(D,N),$.mouse[0],$.mouse[1]),$.extent,o));function L(){$.wheel=null,$.end()}}function E(A,...M){if(d||!e.apply(this,arguments))return;var $=A.currentTarget,D=_(this,M,!0).event(A),N=fn(A.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",X,!0),R=Dn(A,$),L=A.clientX,W=A.clientY;d$(A.view),Ah(A),D.mouse=[R,this.__zoom.invert(R)],_s(this),D.start();function U(Z){if($o(Z),!D.moved){var ae=Z.clientX-L,F=Z.clientY-W;D.moved=ae*ae+F*F>v}D.event(Z).zoom("mouse",n(b(D.that.__zoom,D.mouse[0]=Dn(Z,$),D.mouse[1]),D.extent,o))}function X(Z){N.on("mousemove.zoom mouseup.zoom",null),h$(Z.view,D.moved),$o(Z),D.event(Z).end()}}function j(A,...M){if(e.apply(this,arguments)){var $=this.__zoom,D=Dn(A.changedTouches?A.changedTouches[0]:A,this),N=$.invert(D),R=$.k*(A.shiftKey?.5:2),L=n(b(m($,R),D,N),t.apply(this,M),o);$o(A),l>0?fn(this).transition().duration(l).call(x,L,D,A):fn(this).call(p.transform,L,D,A)}}function I(A,...M){if(e.apply(this,arguments)){var $=A.touches,D=$.length,N=_(this,M,A.changedTouches.length===D).event(A),R,L,W,U;for(Ah(A),L=0;L<D;++L)W=$[L],U=Dn(W,this),U=[U,this.__zoom.invert(U),W.identifier],N.touch0?!N.touch1&&N.touch0[2]!==U[2]&&(N.touch1=U,N.taps=0):(N.touch0=U,R=!0,N.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(N.taps<2&&(c=U[0],f=setTimeout(function(){f=null},h)),_s(this),N.start())}}function C(A,...M){if(this.__zooming){var $=_(this,M).event(A),D=A.changedTouches,N=D.length,R,L,W,U;for($o(A),R=0;R<N;++R)L=D[R],W=Dn(L,this),$.touch0&&$.touch0[2]===L.identifier?$.touch0[0]=W:$.touch1&&$.touch1[2]===L.identifier&&($.touch1[0]=W);if(L=$.that.__zoom,$.touch1){var X=$.touch0[0],Z=$.touch0[1],ae=$.touch1[0],F=$.touch1[1],Q=(Q=ae[0]-X[0])*Q+(Q=ae[1]-X[1])*Q,ce=(ce=F[0]-Z[0])*ce+(ce=F[1]-Z[1])*ce;L=m(L,Math.sqrt(Q/ce)),W=[(X[0]+ae[0])/2,(X[1]+ae[1])/2],U=[(Z[0]+F[0])/2,(Z[1]+F[1])/2]}else if($.touch0)W=$.touch0[0],U=$.touch0[1];else return;$.zoom("touch",n(b(L,W,U),$.extent,o))}}function B(A,...M){if(this.__zooming){var $=_(this,M).event(A),D=A.changedTouches,N=D.length,R,L;for(Ah(A),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),R=0;R<N;++R)L=D[R],$.touch0&&$.touch0[2]===L.identifier?delete $.touch0:$.touch1&&$.touch1[2]===L.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(L=Dn(L,this),Math.hypot(c[0]-L[0],c[1]-L[1])<y)){var W=fn(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return p.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:ts(+A),p):r},p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:ts(!!A),p):e},p.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:ts(!!A),p):i},p.extent=function(A){return arguments.length?(t=typeof A=="function"?A:ts([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),p):t},p.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],p):[a[0],a[1]]},p.translateExtent=function(A){return arguments.length?(o[0][0]=+A[0][0],o[1][0]=+A[1][0],o[0][1]=+A[0][1],o[1][1]=+A[1][1],p):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},p.constrain=function(A){return arguments.length?(n=A,p):n},p.duration=function(A){return arguments.length?(l=+A,p):l},p.interpolate=function(A){return arguments.length?(u=A,p):u},p.on=function(){var A=s.on.apply(s,arguments);return A===s?p:A},p.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,p):Math.sqrt(v)},p.tapDistance=function(A){return arguments.length?(y=+A,p):y},p}function xd({file:e,onClose:t}){const[n,r]=T.useState(null),[i,a]=T.useState(!1),[o,l]=T.useState(!1);T.useEffect(()=>{if(!e){r(null);return}a(!0),fetch(`/api/file?path=${encodeURIComponent(e)}`).then(f=>f.ok?f.json():null).then(f=>r(f)).finally(()=>a(!1))},[e]);async function u(){e&&(l(!0),await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),l(!1))}if(!e)return null;const s=e.split("/").pop()??e;return P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"fixed inset-0 bg-black/40 z-40",onClick:t}),P.jsxs("div",{className:"fixed right-0 top-0 h-full w-[680px] max-w-full z-50 flex flex-col",style:{background:"#131220",borderLeft:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"flex items-center justify-between px-5 py-4 shrink-0",style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"min-w-0",children:[P.jsx("p",{className:"text-white font-medium text-sm truncate",children:s}),P.jsx("p",{className:"text-white/30 text-xs font-mono truncate mt-0.5",children:e})]}),P.jsxs("div",{className:"flex items-center gap-2 ml-4 shrink-0",children:[P.jsx("button",{onClick:u,disabled:o,className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-[#603dc6]/20 text-[#a78bfa] hover:bg-[#603dc6]/30 transition-colors disabled:opacity-50",children:o?"Opening…":"↗ Open in IDE"}),P.jsx("button",{onClick:t,className:"text-white/30 hover:text-white/70 transition-colors text-lg leading-none px-1",children:"✕"})]})]}),P.jsxs("div",{className:"flex-1 overflow-auto",children:[i&&P.jsx("div",{className:"p-5 text-white/30 text-sm",children:"Loading\\u2026"}),!i&&n&&P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"px-5 py-2 text-white/20 text-xs",style:{borderBottom:"1px solid rgba(255,255,255,0.05)"},children:[n.lines," lines · .",n.ext]}),P.jsx("pre",{className:"p-5 text-xs font-mono text-white/70 leading-relaxed whitespace-pre overflow-x-auto",children:n.content})]}),!i&&!n&&P.jsx("div",{className:"p-5 text-white/30 text-sm",children:"Could not load file."})]})]})]})}const ns=rne;function Eh(e){return e.split("/").pop()??e}function fne(){const e=li(wn.graph),t=T.useRef(null),n=T.useRef(null),r=T.useRef(null),i=T.useRef([]),[a,o]=T.useState(null),[l,u]=T.useState({x:0,y:0}),[s,f]=T.useState(null),[c,d]=T.useState(null),[h,g]=T.useState(""),[v,y]=T.useState([]),p=T.useCallback(m=>{if(!m.trim()||!t.current||!r.current)return;const b=m.toLowerCase(),w=i.current.find(x=>Eh(x.id).toLowerCase().includes(b)||x.id.toLowerCase().includes(b));w&&w.x!=null&&w.y!=null&&fn(t.current).transition().duration(500).call(r.current.translateTo,w.x,w.y)},[]);return T.useEffect(()=>{p(h)},[h,p]),T.useEffect(()=>{var Z,ae;if(e.status!=="success"||!t.current)return;const{nodes:m,edges:b}=e.data,w=[...m].sort((F,Q)=>Q.inDegree+Q.outDegree-(F.inDegree+F.outDegree)).slice(0,300),x=new Set(w.map(F=>F.id)),_=b.filter(F=>x.has(F.source)&&x.has(F.target)),S=[...new Set(w.map(F=>F.community))].sort((F,Q)=>F-Q);y(S);const O=new Set([...w].sort((F,Q)=>Q.inDegree+Q.outDegree-(F.inDegree+F.outDegree)).slice(0,15).map(F=>F.id)),E=t.current,j=E.clientWidth||900,I=E.clientHeight||600,C=fn(E);C.selectAll("*").remove();const B=C.append("g"),A=cne().scaleExtent([.1,8]).on("zoom",F=>B.attr("transform",F.transform));r.current=A,C.call(A),C.on("click",F=>{F.target===E&&f(null)});const M=w.map(F=>({...F}));i.current=M;const $=new Map(M.map(F=>[F.id,F])),D=_.map(F=>({source:$.get(F.source),target:$.get(F.target)})).filter(F=>F.source&&F.target),N=new Map;for(const F of M)N.set(F.id,new Set);for(const F of D)(Z=N.get(F.source.id))==null||Z.add(F.target.id),(ae=N.get(F.target.id))==null||ae.add(F.source.id);const R=ene(M).force("link",Kte(D).id(F=>F.id).distance(60)).force("charge",tne().strength(-120)).force("center",Pte(j/2,I/2)).force("collision",Hte(8)),L=B.append("g").selectAll("line").data(D).join("line").attr("stroke","rgba(255,255,255,0.1)").attr("stroke-width",.8).attr("stroke-opacity",.6),W=B.append("g").selectAll("g").data(M).join("g").style("cursor","pointer").call(hee().on("start",(F,Q)=>{F.active||R.alphaTarget(.3).restart(),Q.fx=Q.x,Q.fy=Q.y}).on("drag",(F,Q)=>{Q.fx=F.x,Q.fy=F.y}).on("end",(F,Q)=>{F.active||R.alphaTarget(0),Q.fx=null,Q.fy=null}));W.filter(F=>(F.riskScore??0)>.6).append("circle").attr("class","risk-ring").attr("r",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)+3).attr("fill","none").attr("stroke","#ef4444").attr("stroke-opacity",.6).attr("stroke-width",F=>(F.riskScore??0)>.8?2.5:1.5);const U=W.append("circle").attr("r",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)).attr("fill",F=>ns[F.community%ns.length]).attr("stroke","rgba(255,255,255,0.15)").attr("stroke-width",1);W.filter(F=>O.has(F.id)).append("text").attr("dy",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)+11).attr("text-anchor","middle").attr("font-size",9).attr("fill","rgba(255,255,255,0.6)").attr("pointer-events","none").text(F=>Eh(F.id)),W.on("mouseover",(F,Q)=>{o({id:Q.id,label:Q.label,inDegree:Q.inDegree,outDegree:Q.outDegree,riskScore:Q.riskScore})}).on("mousemove",F=>{const Q=E.getBoundingClientRect();u({x:F.clientX-Q.left+12,y:F.clientY-Q.top-8})}).on("mouseout",()=>{o(null)}).on("click",(F,Q)=>{F.stopPropagation(),f(ce=>ce===Q.id?null:Q.id),d(Q.id)});function X(F){if(F===null)W.attr("opacity",1),U.attr("opacity",1),L.attr("opacity",.6);else{const Q=N.get(F)??new Set;W.attr("opacity",ce=>ce.id===F||Q.has(ce.id)?1:.15),L.attr("opacity",ce=>{const G=ce.source.id,re=ce.target.id;return G===F||re===F?.9:.05})}}return t.current._applyHighlight=X,R.on("tick",()=>{L.attr("x1",F=>F.source.x??0).attr("y1",F=>F.source.y??0).attr("x2",F=>F.target.x??0).attr("y2",F=>F.target.y??0),W.attr("transform",F=>`translate(${F.x??0},${F.y??0})`)}),R.on("end",()=>{i.current=M}),()=>{R.stop(),t.current&&delete t.current._applyHighlight}},[e]),T.useEffect(()=>{if(!t.current)return;const m=t.current._applyHighlight;m&&m(s)},[s]),e.status==="loading"?P.jsx("div",{className:"text-white/40 text-sm",children:"Building graph..."}):e.status==="error"?P.jsx(qa,{message:e.message}):P.jsxs("div",{className:"space-y-4 h-full",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Dependency Graph"}),P.jsxs("span",{className:"text-xs text-white/40",children:[e.data.nodes.length," nodes · ",e.data.edges.length," edges · scroll to zoom · drag to pan"]})]}),P.jsxs("div",{ref:n,className:"rounded-xl border border-white/10 bg-[#18181f] relative overflow-hidden",style:{height:"calc(100vh - 160px)"},children:[P.jsx("div",{className:"absolute top-3 right-3 z-10",children:P.jsx("input",{type:"text",placeholder:"Search node...",value:h,onChange:m=>g(m.target.value),className:"bg-[#131220] border border-white/10 text-white placeholder:text-white/30 rounded-md px-2 py-1 text-xs w-48 outline-none focus:ring-1 focus:ring-[#603dc6]/50"})}),v.length>0&&P.jsxs("div",{className:"absolute bottom-3 left-3 z-10 bg-[#1e1d2a] border border-white/10 rounded-lg px-3 py-2 max-h-48 overflow-y-auto","aria-label":"Community legend",children:[P.jsx("p",{className:"text-white/40 text-[10px] uppercase tracking-wider mb-2",children:"Communities"}),P.jsx("div",{className:"space-y-1",children:v.map(m=>P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:ns[m%ns.length]}}),P.jsx("span",{className:"text-white/60 text-[10px]",children:m})]},m))})]}),P.jsx("svg",{ref:t,width:"100%",height:"100%",style:{background:"#18181f",borderRadius:"0.75rem"}}),a&&P.jsxs("div",{className:"absolute pointer-events-none z-20 bg-[#1e1d2a] border border-white/10 rounded-lg px-3 py-2 text-xs text-white shadow-lg",style:{left:l.x,top:l.y,maxWidth:260},role:"tooltip",children:[P.jsx("p",{className:"font-bold truncate",children:Eh(a.id)}),P.jsx("p",{className:"text-white/40 truncate mt-0.5",children:a.id}),P.jsxs("div",{className:"mt-2 space-y-0.5 text-white/70",children:[P.jsxs("p",{children:["In-degree: ",P.jsx("span",{className:"text-white",children:a.inDegree})]}),P.jsxs("p",{children:["Out-degree: ",P.jsx("span",{className:"text-white",children:a.outDegree})]}),P.jsxs("p",{children:["Risk score:"," ",P.jsx("span",{className:"text-white",children:a.riskScore!=null?a.riskScore.toFixed(2):"—"})]})]})]})]}),P.jsx(xd,{file:c,onClose:()=>d(null)})]})}function dne(){const e=li(wn.risk),[t,n]=T.useState("riskScore"),[r,i]=T.useState(""),[a,o]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{entries:l,overallRiskScore:u}=e.data;if(l.length===0)return P.jsxs("div",{className:"space-y-4",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Risk"}),P.jsxs("p",{className:"text-white/40 text-sm",children:["No git history available. Run ",P.jsx("code",{className:"text-[#a78bfa]",children:"ctxloom index --with-git"})," to enable risk analysis."]})]});const s=l.filter(c=>c.file.toLowerCase().includes(r.toLowerCase())).sort((c,d)=>d[t]-c[t]),f=[{key:"riskScore",label:"Risk"},{key:"churnLines",label:"Churn lines"},{key:"busFactor",label:"Bus factor"},{key:"couplingFanOut",label:"Coupling"},{key:"bugDensity",label:"Bug density"}];return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Risk"}),P.jsxs("span",{className:"text-sm text-white/40",children:["avg score: ",u]})]}),P.jsx("input",{type:"text",placeholder:"Filter by file...",value:r,onChange:c=>i(c.target.value),className:"w-full rounded-md border border-white/10 bg-[#1e1d2a] px-3 py-2 text-sm text-white placeholder:text-white/30 outline-none focus:ring-2 focus:ring-[#603dc6]/50 focus:border-[#603dc6]/50"}),P.jsx("div",{className:"overflow-x-auto rounded-xl border border-white/10 bg-[#1e1d2a]",children:P.jsxs("table",{className:"min-w-full text-sm",children:[P.jsx("thead",{className:"border-b border-white/10 bg-[#131220]",children:P.jsxs("tr",{children:[P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"File"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Owner"}),f.map(c=>P.jsxs("th",{onClick:()=>n(c.key),className:`px-4 py-3 text-left text-xs font-medium cursor-pointer select-none ${t===c.key?"text-[#a78bfa]":"text-white/40"}`,children:[c.label," ",t===c.key?"↓":""]},c.key))]})}),P.jsx("tbody",{className:"divide-y divide-[rgba(255,255,255,0.05)]",children:s.map(c=>P.jsxs("tr",{className:"hover:bg-white/5",children:[P.jsx("td",{className:"px-4 py-3 font-mono text-xs text-white/60 max-w-xs truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:c.file,onClick:()=>o(c.file),children:c.file}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/50",children:c.topOwner??"—"}),P.jsx("td",{className:"px-4 py-3",children:P.jsx(fO,{level:c.riskLabel})}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.churnLines.toLocaleString()}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.busFactor}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.couplingFanOut}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.bugDensity.toFixed(2)})]},c.file))})]})}),P.jsx(xd,{file:a,onClose:()=>o(null)})]})}function hne(e,t,n){if(e===0){if(t===0)return{label:"→ stable",tone:"neutral"};const u=t>0;return{label:"↑ new",tone:n==="up"===u?"good":"bad"}}const r=(t-e)/e,i=Math.abs(r);if(i<.01)return{label:"→ stable",tone:"neutral"};const a=r>0?"↑":"↓",o=r>0,l=n==="up"===o;return{label:`${a} ${(i*100).toFixed(0)}%`,tone:l?"good":"bad"}}const pne={good:"#22c55e",bad:"#ef4444",neutral:"#a1a1aa"},vne="#a78bfa";function rs({label:e,currentValue:t,series:n,goodDirection:r,format:i,gitRequired:a=!1,gitEnabled:o}){if(a&&!o)return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsx("p",{className:"text-white/30 text-sm",children:"Git history disabled"})]});const l=n.filter(c=>typeof c.v=="number");if(l.length<2||t===null)return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsxs("p",{className:"text-white/30 text-sm",children:["Collecting data — edit some files or run ",P.jsx("code",{className:"text-white/50",children:"ctxloom index"})]})]});const u=l[0].v,s=l[l.length-1].v,f=hne(u,s,r);return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsxs("div",{className:"flex items-baseline gap-3 mb-3",children:[P.jsx("span",{className:"text-white text-2xl font-semibold",children:i(t)}),P.jsx("span",{className:"text-xs font-medium",style:{color:pne[f.tone]},children:f.label})]}),P.jsx("div",{className:"h-12",children:P.jsx(EP,{width:"100%",height:"100%",children:P.jsxs(wZ,{data:l,margin:{top:4,right:4,bottom:4,left:4},children:[P.jsx(vd,{hide:!0,domain:["auto","auto"]}),P.jsx(mu,{type:"monotone",dataKey:"v",stroke:vne,strokeWidth:2,dot:!1,isAnimationActive:!1})]})})})]})}const mne=[{value:"7d",label:"7d"},{value:"30d",label:"30d"},{value:"90d",label:"90d"}];function yne({value:e,onChange:t}){return P.jsx("div",{className:"inline-flex rounded-md bg-[#131220] border border-white/10 p-0.5",children:mne.map(n=>P.jsx("button",{onClick:()=>t(n.value),"aria-pressed":e===n.value,className:`px-3 py-1 text-xs font-medium rounded ${e===n.value?"bg-[#603dc6]/20 text-[#a78bfa]":"text-white/40 hover:text-white/70"}`,children:n.label},n.value))})}function B1(e){return String(Math.round(e))}function gne(e){return e.toFixed(1)}function bne(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function is(e,t){return e.map(n=>({t:n.unixSeconds,v:n[t]}))}function as(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n][t];if(typeof r=="number")return r}return null}function xne(){const[e,t]=T.useState("30d"),[n,r]=T.useState({status:"loading"});if(T.useEffect(()=>{let o=!1;return r({status:"loading"}),fetch(`/api/trends?range=${e}`).then(async l=>{if(!l.ok)throw new Error(`API failed: ${l.status}`);return l.json()}).then(l=>{o||r({status:"success",data:l})}).catch(l=>{o||r({status:"error",message:l instanceof Error?l.message:String(l)})}),()=>{o=!0}},[e]),n.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(n.status==="error")return P.jsx(qa,{message:n.message});const{snapshots:i,gitEnabled:a}=n.data;return P.jsxs("div",{className:"space-y-8",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Trends"}),P.jsx(yne,{value:e,onChange:t})]}),P.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[P.jsx(rs,{label:"Dead files",currentValue:as(i,"deadFiles"),series:is(i,"deadFiles"),goodDirection:"down",format:B1,gitEnabled:a}),P.jsx(rs,{label:"Avg bus factor",currentValue:as(i,"avgBusFactor"),series:is(i,"avgBusFactor"),goodDirection:"up",format:gne,gitRequired:!0,gitEnabled:a}),P.jsx(rs,{label:"High-risk files",currentValue:as(i,"highRiskFiles"),series:is(i,"highRiskFiles"),goodDirection:"down",format:B1,gitRequired:!0,gitEnabled:a}),P.jsx(rs,{label:"Churn lines / week",currentValue:as(i,"churnLinesLast7d"),series:is(i,"churnLinesLast7d"),goodDirection:"down",format:bne,gitRequired:!0,gitEnabled:a})]})]})}function wne(){const e=li(wn.communities),[t,n]=T.useState(null),[r,i]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{communities:a,totalFiles:o,totalEdges:l}=e.data;return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Communities"}),P.jsxs("span",{className:"text-sm text-white/40",children:[a.length," clusters · ",o," files · ",l," edges"]})]}),P.jsx("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:a.map(u=>P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-4 transition-colors hover:border-white/20",children:[P.jsxs("button",{className:"w-full flex items-center justify-between text-left",onClick:()=>n(t===u.id?null:u.id),children:[P.jsxs("div",{children:[P.jsx("span",{className:"text-white/80 text-sm font-medium",children:u.name}),P.jsxs("span",{className:"ml-2 text-xs text-white/40",children:[u.size," files"]})]}),P.jsx("span",{className:"text-white/30 text-xs",children:t===u.id?"▲":"▼"})]}),t===u.id&&P.jsx("ul",{className:"mt-3 space-y-1 border-t border-white/10 pt-3",children:u.files.map(s=>P.jsx("li",{className:"font-mono text-xs text-white/40 truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:s,onClick:()=>i(s),children:s},s))})]},u.id))}),P.jsx(xd,{file:r,onClose:()=>i(null)})]})}function _ne(){const e=li(wn.ownership),[t,n]=T.useState(""),[r,i]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{entries:a,totalAuthors:o}=e.data;if(a.length===0)return P.jsxs("div",{className:"space-y-4",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Ownership"}),P.jsxs("p",{className:"text-white/40 text-sm",children:["No git history available. Run ",P.jsx("code",{className:"text-[#a78bfa]",children:"ctxloom index --with-git"})," to enable ownership analysis."]})]});const l=a.filter(s=>s.file.toLowerCase().includes(t.toLowerCase())||s.primaryOwner.toLowerCase().includes(t.toLowerCase())),u=a.filter(s=>s.busFactor===1).length;return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Ownership"}),P.jsxs("span",{className:"text-sm text-white/40",children:[o," authors · ",u," single-owner files"]})]}),u>0&&P.jsxs("div",{className:"bg-yellow-900/20 border border-yellow-500/30 text-yellow-300 rounded-lg p-3 text-sm",children:["⚠ ",u," files have only one contributor — bus factor risk."]}),P.jsx("input",{type:"text",placeholder:"Filter by file or owner...",value:t,onChange:s=>n(s.target.value),className:"w-full rounded-md border border-white/10 bg-[#1e1d2a] px-3 py-2 text-sm text-white placeholder:text-white/30 outline-none focus:ring-2 focus:ring-[#603dc6]/50 focus:border-[#603dc6]/50"}),P.jsx("div",{className:"overflow-x-auto rounded-xl border border-white/10 bg-[#1e1d2a]",children:P.jsxs("table",{className:"min-w-full text-sm",children:[P.jsx("thead",{className:"border-b border-white/10 bg-[#131220]",children:P.jsxs("tr",{children:[P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"File"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Primary owner"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Share"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Contributors"})]})}),P.jsx("tbody",{className:"divide-y divide-[rgba(255,255,255,0.05)]",children:l.map(s=>P.jsxs("tr",{className:`hover:bg-white/5 ${s.busFactor===1?"bg-yellow-900/10":""}`,children:[P.jsx("td",{className:"px-4 py-3 font-mono text-xs text-white/60 max-w-xs truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:s.file,onClick:()=>i(s.file),children:s.file}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/70",children:s.primaryOwner}),P.jsxs("td",{className:"px-4 py-3 text-xs text-white/50",children:[Math.round(s.primaryShare*100),"%"]}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/50",children:s.busFactor===1?P.jsx("span",{className:"text-yellow-400 font-medium",children:"sole owner"}):s.busFactor})]},s.file))})]})}),P.jsx(xd,{file:r,onClose:()=>i(null)})]})}const z1=[{id:"overview",title:"Overview",icon:"◈",summary:"Your codebase at a glance — health snapshot and architectural hotspots.",items:[{term:"Files",def:"Total source files indexed. Click to open the Dependency Graph."},{term:"Edges",def:"Total import/dependency relationships between files. A high edge count relative to file count means a densely coupled codebase."},{term:"Communities",def:'Logical modules detected automatically by grouping files that import each other heavily (Louvain algorithm). Think of them as architectural "neighbourhoods".'},{term:"Git history",def:'"enabled" means git overlay data is loaded — Risk, Churn, and Ownership metrics will show real values. "disabled" means only static graph metrics are available. Run ctxloom index --with-git to enable.'},{term:"Risk breakdown donut",def:'Distribution of files across four risk tiers. A healthy codebase has most files in "low" and very few in "critical". Each slice is sized by file count.'},{term:"Risk tiers",def:"critical (score > 0.8) — urgent attention needed. high (> 0.6) — should be addressed soon. medium (> 0.3) — monitor. low (≤ 0.3) — acceptable."},{term:"Top architectural hubs",def:"Files most imported by others (high in-degree ↑) or that import the most (high out-degree ↓). Hubs are load-bearing — a bug here ripples everywhere."}]},{id:"graph",title:"Dependency Graph",icon:"⬡",summary:"Interactive force-directed map of every import relationship in your codebase.",items:[{term:"Nodes (dots)",def:"Each node is a file. Size reflects total degree (imports + importers) — bigger means more connected."},{term:"Node colour",def:"Colour encodes the Louvain community. Files in the same community share many imports with each other. The community legend (bottom-left) maps colours to community IDs."},{term:"Red ring around a node",def:"Risk alert. A thin red ring means riskScore > 0.6 (high). A thick red ring means riskScore > 0.8 (critical). These files need attention."},{term:"Edges (lines)",def:"A line from A to B means A imports B. The direction shows dependency flow."},{term:"Labels",def:"The top-15 most-connected files always show their filename. Hover any node to see full details."},{term:"Hover tooltip",def:"Shows the full file path, in-degree (how many files import this), out-degree (how many files this imports), and risk score."},{term:"Click to highlight",def:"Clicking a node dims everything except its direct neighbours. This reveals the file's immediate dependency context. Click again to reset."},{term:"Search box",def:"Type a filename fragment to pan the viewport to the first matching node."},{term:"Zoom / pan",def:"Scroll to zoom. Drag the background to pan. Drag individual nodes to reposition them."},{term:"Isolated nodes (far from centre)",def:"Files with few or no dependencies — utilities, config files, or dead code candidates."}]},{id:"risk",title:"Risk",icon:"⚠",summary:"Composite risk score per file, combining git churn, ownership concentration, and coupling.",items:[{term:"Risk score",def:"Weighted composite: (churn × 0.4) + (bus factor × 0.3) + (coupling × 0.3), normalised 0–1. Higher is riskier. Click the column header to sort."},{term:"Risk label (badge)",def:"critical / high / medium / low — derived from the risk score thresholds above. Critical files deserve immediate review."},{term:"Churn lines",def:"Total lines added + removed across all commits in the git window (default 365 days). High churn means the file changes frequently — volatility that correlates with bugs."},{term:"Bug density",def:"Ratio of commits with bug-fix keywords (fix, bug, hotfix, patch) to total commits touching this file. A value of 0.30 means 30% of its commits were bug fixes — a strong signal of instability."},{term:"Bus factor",def:"Minimum number of contributors whose loss would leave > 50% of this file's git history without a knowledgeable owner. Bus factor 1 = single point of failure."},{term:"Coupling",def:"Number of other files that import this file (fan-out of its importers). High coupling = many blast radius victims when this file changes."},{term:"Owner",def:"The git author responsible for the most lines of the file's history (by commit count share)."},{term:"avg score",def:"Mean risk score across all files shown. Use it as a baseline — individual files above this average warrant closer inspection."}]},{id:"communities",title:"Communities",icon:"⬡⬡",summary:"Auto-detected architectural modules — files that belong together by import density.",items:[{term:"What is a community?",def:"A group of files that import each other more than they import files outside the group. Detected via the Louvain modularity algorithm on the dependency graph."},{term:"Community name",def:"Named after the highest-degree file in the group (the hub). It's a label, not a hard boundary."},{term:"Size",def:"Number of files in the community. Very large communities (50+ files) may indicate an overgrown module that should be split. Very small ones (1–2 files) may be isolated utilities."},{term:"Expanding a community",def:"Click the row to expand and see all member files. This helps you verify whether the auto-grouping makes architectural sense."},{term:"What to look for",def:"Ideally, communities map to feature domains (auth, payments, graph). If unrelated files appear in the same community, they may be over-coupled. If a feature is split across many communities, its modules may be too tangled."},{term:"87 clusters",def:"A high community count vs file count ratio is normal — many files are singletons or small isolated groups (config, fixtures, types)."}]},{id:"ownership",title:"Ownership",icon:"◎",summary:"Per-file git ownership — who knows the code and where knowledge is concentrated.",items:[{term:"Primary owner",def:"The contributor with the highest share of commits touching this file."},{term:"Share %",def:"Percentage of commits to this file authored by the primary owner. 100% = sole owner."},{term:"Contributors column",def:'Shows "sole owner" (bus factor 1) or the count of meaningful contributors (bus factor > 1).'},{term:"Bus factor risk banner",def:"Appears when many files have only one contributor. If that person is unavailable, those files become a knowledge black hole."},{term:"Sole owner (highlighted in yellow)",def:"This file has exactly one person who understands it. It's the most critical ownership risk — prioritise review, documentation, or pair programming for these files."},{term:"What to do with this data",def:"Cross-reference with the Risk table. A file that is both high-churn AND sole-owner is extremely fragile. Target it for code review and knowledge transfer."},{term:"Filter",def:"Filter by filename or owner name to focus on a specific contributor's footprint or a specific directory."}]}];function Sne(){return P.jsxs("div",{className:"max-w-3xl space-y-10 pb-16",children:[P.jsxs("div",{children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Guide"}),P.jsx("p",{className:"mt-1 text-white/50 text-sm",children:"How to read and interpret each dashboard view."})]}),P.jsx("div",{className:"flex flex-wrap gap-2",children:z1.map(e=>P.jsx("a",{href:`#${e.id}`,className:"rounded-full border border-white/10 px-3 py-1 text-xs text-white/50 hover:border-[#603dc6]/60 hover:text-[#a78bfa] transition-colors",children:e.title},e.id))}),z1.map(e=>P.jsxs("section",{id:e.id,className:"scroll-mt-6",children:[P.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[P.jsx("span",{className:"text-[#603dc6] text-lg select-none",children:e.icon}),P.jsx("h2",{className:"text-white font-semibold text-base",children:e.title})]}),P.jsx("p",{className:"text-white/50 text-sm mb-5 leading-relaxed",children:e.summary}),P.jsx("div",{className:"rounded-xl border border-white/10 bg-[#1e1d2a] overflow-hidden",children:e.items.map((t,n)=>P.jsxs("div",{className:`flex gap-4 px-5 py-4 ${n<e.items.length-1?"border-b border-[rgba(255,255,255,0.05)]":""}`,children:[P.jsx("dt",{className:"w-36 shrink-0 text-xs font-medium text-[#a78bfa] pt-0.5 leading-relaxed",children:t.term}),P.jsx("dd",{className:"text-sm text-white/60 leading-relaxed",children:t.def})]},t.term))})]},e.id))]})}function One(){return P.jsx(Wk,{children:P.jsxs(Nn,{element:P.jsx(l2,{}),children:[P.jsx(Nn,{index:!0,element:P.jsx(PZ,{})}),P.jsx(Nn,{path:"graph",element:P.jsx(fne,{})}),P.jsx(Nn,{path:"risk",element:P.jsx(dne,{})}),P.jsx(Nn,{path:"trends",element:P.jsx(xne,{})}),P.jsx(Nn,{path:"communities",element:P.jsx(wne,{})}),P.jsx(Nn,{path:"ownership",element:P.jsx(_ne,{})}),P.jsx(Nn,{path:"guide",element:P.jsx(Sne,{})})]})})}$h.createRoot(document.getElementById("root")).render(P.jsx(k.StrictMode,{children:P.jsx(Qk,{children:P.jsx(One,{})})}));
|
|
134
|
+
the props "valueKey" will be deprecated in 1.1.0`),p=c);var m=i.filter(function(O){return Ve(O,p,0)!==0}).length,b=(y>=360?m:m-1)*u,w=y-m*h-b,x=i.reduce(function(O,E){var j=Ve(E,p,0);return O+(K(j)?j:0)},0),_;if(x>0){var S;_=i.map(function(O,E){var j=Ve(O,p,0),I=Ve(O,f,E),C=(K(j)?j:0)/x,B;E?B=S.endAngle+ft(v)*u*(j!==0?1:0):B=o;var A=B+ft(v)*((j!==0?h:0)+C*w),M=(B+A)/2,$=(g.innerRadius+g.outerRadius)/2,D=[{name:I,value:j,payload:O,dataKey:p,type:d}],N=_e(g.cx,g.cy,$,M);return S=be(be(be({percent:C,cornerRadius:a,name:I,tooltipPayload:D,midAngle:M,middleRadius:$,tooltipPosition:N},O),g),{},{value:Ve(O,p),startAngle:B,endAngle:A,payload:O,paddingAngle:ft(v)*u}),S})}return be(be({},g),{},{sectors:_,data:i})});var yX=Math.ceil,gX=Math.max;function bX(e,t,n,r){for(var i=-1,a=gX(yX((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var xX=bX,wX=PP,Xw=1/0,_X=17976931348623157e292;function SX(e){if(!e)return e===0?e:0;if(e=wX(e),e===Xw||e===-Xw){var t=e<0?-1:1;return t*_X}return e===e?e:0}var OX=SX,PX=xX,AX=Wf,gh=OX;function EX(e){return function(t,n,r){return r&&typeof r!="number"&&AX(t,n,r)&&(n=r=void 0),t=gh(t),n===void 0?(n=t,t=0):n=gh(n),r=r===void 0?t<n?1:-1:gh(r),PX(t,n,r,e)}}var $X=EX,TX=$X,jX=TX(),kX=jX;const Lc=ye(kX);function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qw(Object(n),!0).forEach(function(r){sE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sE(e,t,n){return t=CX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CX(e){var t=NX(e,"string");return Kl(t)=="symbol"?t:t+""}function NX(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MX=["Webkit","Moz","O","ms"],IX=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=MX.reduce(function(a,o){return Yw(Yw({},a),{},sE({},o+r,n))},{});return i[t]=n,i};function ka(e){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(e)}function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qw(Object(n),!0).forEach(function(r){Et(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fE(r.key),r)}}function RX(e,t,n){return t&&Zw(e.prototype,t),n&&Zw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function LX(e,t,n){return t=zc(t),BX(e,cE()?Reflect.construct(t,n||[],zc(e).constructor):t.apply(e,n))}function BX(e,t){if(t&&(ka(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zX(e)}function zX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cE=function(){return!!e})()}function zc(e){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zc(e)}function FX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nv(e,t)}function Nv(e,t){return Nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nv(e,t)}function Et(e,t,n){return t=fE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fE(e){var t=UX(e,"string");return ka(t)=="symbol"?t:t+""}function UX(e,t){if(ka(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ka(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var WX=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var u=n.length,s=Go().domain(Lc(0,u)).range([a,a+o-l]),f=s.domain().map(function(c){return s(c)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:s(r),endX:s(i),scale:s,scaleValues:f}},Jw=function(t){return t.changedTouches&&!!t.changedTouches.length},Ca=function(e){function t(n){var r;return DX(this,t),r=LX(this,t,[n]),Et(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Et(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Et(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),r.detachDragEndListener()}),Et(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Et(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Et(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Et(r,"handleSlideDragStart",function(i){var a=Jw(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return FX(t,e),RX(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,l=this.props,u=l.gap,s=l.data,f=s.length-1,c=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,c),g=t.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:g===f?f:g-g%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=Ve(a[r],l,r);return te(o)?o(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,h=u.endIndex,g=u.onChange,v=r.pageX-a;v>0?v=Math.min(v,s+f-c-l,s+f-c-o):v<0&&(v=Math.max(v,s-o,s-l));var y=this.getIndex({startX:o+v,endX:l+v});(y.startIndex!==d||y.endIndex!==h)&&g&&g(y),this.setState({startX:o+v,endX:l+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=Jw(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,s=this.state[o],f=this.props,c=f.x,d=f.width,h=f.travellerWidth,g=f.onChange,v=f.gap,y=f.data,p={startX:this.state.startX,endX:this.state.endX},m=r.pageX-a;m>0?m=Math.min(m,c+d-h-s):m<0&&(m=Math.max(m,c-s)),p[o]=s+m;var b=this.getIndex(p),w=b.startIndex,x=b.endIndex,_=function(){var O=y.length-1;return o==="startX"&&(l>u?w%v===0:x%v===0)||l<u&&x===O||o==="endX"&&(l>u?x%v===0:w%v===0)||l>u&&x===O};this.setState(Et(Et({},o,s+m),"brushMoveStartX",r.pageX),function(){g&&_()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,s=o.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+r;if(!(d===-1||d>=l.length)){var h=l[d];i==="startX"&&h>=s||i==="endX"&&h<=u||this.setState(Et({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.fill,s=r.stroke;return k.createElement("rect",{stroke:s,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.data,s=r.children,f=r.padding,c=T.Children.only(s);return c?k.cloneElement(c,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,l=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,h=u.ariaLabel,g=u.data,v=u.startIndex,y=u.endIndex,p=Math.max(r,this.props.x),m=bh(bh({},J(this.props,!1)),{},{x:p,y:s,width:f,height:c}),b=h||"Min value: ".concat((a=g[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=g[y])===null||o===void 0?void 0:o.name);return k.createElement(fe,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),l.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,m))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,s=a.travellerWidth,f=Math.min(r,i)+s,c=Math.max(Math.abs(i-r)-s,0);return k.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:c,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,l=r.height,u=r.travellerWidth,s=r.stroke,f=this.state,c=f.startX,d=f.endX,h=5,g={pointerEvents:"none",fill:s};return k.createElement(fe,{className:"recharts-brush-texts"},k.createElement(gi,Bc({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:o+l/2},g),this.getTextOfTick(i)),k.createElement(gi,Bc({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+h,y:o+l/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,l=r.x,u=r.y,s=r.width,f=r.height,c=r.alwaysShowText,d=this.state,h=d.startX,g=d.endX,v=d.isTextActive,y=d.isSlideMoving,p=d.isTravellerMoving,m=d.isTravellerFocused;if(!i||!i.length||!K(l)||!K(u)||!K(s)||!K(f)||s<=0||f<=0)return null;var b=ie("recharts-brush",a),w=k.Children.count(o)===1,x=IX("userSelect","none");return k.createElement(fe,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(h,g),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(g,"endX"),(v||y||p||m||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,l=r.height,u=r.stroke,s=Math.floor(a+l/2)-1;return k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),k.createElement("line",{x1:i+1,y1:s,x2:i+o-1,y2:s,fill:"none",stroke:"#fff"}),k.createElement("line",{x1:i+1,y1:s+2,x2:i+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return k.isValidElement(r)?a=k.cloneElement(r,i):te(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,l=r.x,u=r.travellerWidth,s=r.updateId,f=r.startIndex,c=r.endIndex;if(a!==i.prevData||s!==i.prevUpdateId)return bh({prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o},a&&a.length?WX({data:a,width:o,x:l,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);r[u]>i?l=u:o=u}return i>=r[l]?l:o}}])}(T.PureComponent);Et(Ca,"displayName","Brush");Et(Ca,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var HX=Oy;function VX(e,t){var n;return HX(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var KX=VX,GX=JO,XX=Rr,qX=KX,YX=Pt,QX=Wf;function ZX(e,t,n){var r=YX(e)?GX:qX;return n&&QX(e,t,n)&&(t=void 0),r(e,XX(t))}var JX=ZX;const eq=ye(JX);var An=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},e1=xP;function tq(e,t,n){t=="__proto__"&&e1?e1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var nq=tq,rq=nq,iq=gP,aq=Rr;function oq(e,t){var n={};return t=aq(t),iq(e,function(r,i,a){rq(n,i,t(r,i,a))}),n}var lq=oq;const uq=ye(lq);function sq(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var cq=sq,fq=Oy;function dq(e,t){var n=!0;return fq(e,function(r,i,a){return n=!!t(r,i,a),n}),n}var hq=dq,pq=cq,vq=hq,mq=Rr,yq=Pt,gq=Wf;function bq(e,t,n){var r=yq(e)?pq:vq;return n&&gq(e,t,n)&&(t=void 0),r(e,mq(t))}var xq=bq;const wq=ye(xq);var _q=["x","y"];function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(this,arguments)}function t1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t1(Object(n),!0).forEach(function(r){Sq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sq(e,t,n){return t=Oq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e){var t=Pq(e,"string");return Gl(t)=="symbol"?t:t+""}function Pq(e,t){if(Gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aq(e,t){if(e==null)return{};var n=Eq(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $q(e,t){var n=e.x,r=e.y,i=Aq(e,_q),a="".concat(n),o=parseInt(a,10),l="".concat(r),u=parseInt(l,10),s="".concat(t.height||i.height),f=parseInt(s,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Ao(Ao(Ao(Ao(Ao({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function n1(e){return k.createElement(oE,Mv({shapeType:"rectangle",propTransformer:$q,activeClassName:"recharts-active-bar"},e))}var Tq=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=K(r)||zM(r);return a?t(r,i):(a||wi(),n)}},jq=["value","background"],dE;function Na(e){"@babel/helpers - typeof";return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}function kq(e,t){if(e==null)return{};var n=Cq(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function r1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r1(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pE(r.key),r)}}function Mq(e,t,n){return t&&i1(e.prototype,t),n&&i1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Iq(e,t,n){return t=Uc(t),Dq(e,hE()?Reflect.construct(t,n||[],Uc(e).constructor):t.apply(e,n))}function Dq(e,t){if(t&&(Na(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rq(e)}function Rq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hE=function(){return!!e})()}function Uc(e){return Uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uc(e)}function Lq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Iv(e,t)}function Iv(e,t){return Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Iv(e,t)}function yr(e,t,n){return t=pE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pE(e){var t=Bq(e,"string");return Na(t)=="symbol"?t:t+""}function Bq(e,t){if(Na(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Na(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vu=function(e){function t(){var n;Nq(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Iq(this,t,[].concat(i)),yr(n,"state",{isAnimationFinished:!1}),yr(n,"id",to("recharts-bar-")),yr(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),yr(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return Lq(t,e),Mq(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,l=a.dataKey,u=a.activeIndex,s=a.activeBar,f=J(this.props,!1);return r&&r.map(function(c,d){var h=d===u,g=h?s:o,v=Re(Re(Re({},f),c),{},{isActive:h,option:g,index:d,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return k.createElement(fe,Fc({className:"recharts-bar-rectangle"},yi(i.props,c,d),{key:"rectangle-".concat(c==null?void 0:c.x,"-").concat(c==null?void 0:c.y,"-").concat(c==null?void 0:c.value,"-").concat(d)}),k.createElement(n1,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,u=i.animationBegin,s=i.animationDuration,f=i.animationEasing,c=i.animationId,d=this.state.prevData;return k.createElement($n,{begin:u,duration:s,isActive:l,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var g=h.t,v=a.map(function(y,p){var m=d&&d[p];if(m){var b=jt(m.x,y.x),w=jt(m.y,y.y),x=jt(m.width,y.width),_=jt(m.height,y.height);return Re(Re({},y),{},{x:b(g),y:w(g),width:x(g),height:_(g)})}if(o==="horizontal"){var S=jt(0,y.height),O=S(g);return Re(Re({},y),{},{y:y.y+y.height-O,height:O})}var E=jt(0,y.width),j=E(g);return Re(Re({},y),{},{width:j})});return k.createElement(fe,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!hu(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,u=J(this.props.background,!1);return a.map(function(s,f){s.value;var c=s.background,d=kq(s,jq);if(!c)return null;var h=Re(Re(Re(Re(Re({},d),{},{fill:"#eee"},c),u),yi(r.props,s,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return k.createElement(n1,Fc({key:"background-bar-".concat(f),option:r.props.background,isActive:f===l},h))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=It(f,pu);if(!c)return null;var d=s==="vertical"?o[0].height/2:o[0].width/2,h=function(y,p){var m=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:m,errorVal:Ve(y,p)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return k.createElement(fe,g,c.map(function(v){return k.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,l=r.xAxis,u=r.yAxis,s=r.left,f=r.top,c=r.width,d=r.height,h=r.isAnimationActive,g=r.background,v=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,p=ie("recharts-bar",o),m=l&&l.allowDataOverflow,b=u&&u.allowDataOverflow,w=m||b,x=ne(v)?this.id:v;return k.createElement(fe,{className:p},m||b?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(x)},k.createElement("rect",{x:m?s:s-c/2,y:b?f:f-d/2,width:m?c:c*2,height:b?d:d*2}))):null,k.createElement(fe,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(x,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,x),(!h||y)&&Gn.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(T.PureComponent);dE=vu;yr(vu,"displayName","Bar");yr(vu,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ai.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});yr(vu,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,s=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,h=h9(r,n);if(!h)return null;var g=t.layout,v=n.type.defaultProps,y=v!==void 0?Re(Re({},v),n.props):n.props,p=y.dataKey,m=y.children,b=y.minPointSize,w=g==="horizontal"?o:a,x=s?w.scale.domain():null,_=x9({numericAxis:w}),S=It(m,Hf),O=c.map(function(E,j){var I,C,B,A,M,$;s?I=p9(s[f+j],x):(I=Ve(E,p),Array.isArray(I)||(I=[_,I]));var D=Tq(b,dE.defaultProps.minPointSize)(I[1],j);if(g==="horizontal"){var N,R=[o.scale(I[0]),o.scale(I[1])],L=R[0],W=R[1];C=Yx({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:E,index:j}),B=(N=W??L)!==null&&N!==void 0?N:void 0,A=h.size;var U=L-W;if(M=Number.isNaN(U)?0:U,$={x:C,y:o.y,width:A,height:o.height},Math.abs(D)>0&&Math.abs(M)<Math.abs(D)){var X=ft(M||D)*(Math.abs(D)-Math.abs(M));B-=X,M+=X}}else{var Z=[a.scale(I[0]),a.scale(I[1])],ae=Z[0],F=Z[1];if(C=ae,B=Yx({axis:o,ticks:u,bandSize:i,offset:h.offset,entry:E,index:j}),A=F-ae,M=h.size,$={x:a.x,y:B,width:a.width,height:M},Math.abs(D)>0&&Math.abs(A)<Math.abs(D)){var Q=ft(A||D)*(Math.abs(D)-Math.abs(A));A+=Q}}return Re(Re(Re({},E),{},{x:C,y:B,width:A,height:M,value:s?I:I[1],payload:E,background:$},S&&S[j]&&S[j].props),{},{tooltipPayload:[LA(n,E)],tooltipPosition:{x:C+A/2,y:B+M/2}})});return Re({data:O,layout:g},d)});function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function zq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vE(r.key),r)}}function Fq(e,t,n){return t&&a1(e.prototype,t),n&&a1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(n),!0).forEach(function(r){sd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sd(e,t,n){return t=vE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(e){var t=Uq(e,"string");return Xl(t)=="symbol"?t:t+""}function Uq(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wq=function(t,n,r,i,a){var o=t.width,l=t.height,u=t.layout,s=t.children,f=Object.keys(n),c={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},d=!!Tt(s,vu);return f.reduce(function(h,g){var v=n[g],y=v.orientation,p=v.domain,m=v.padding,b=m===void 0?{}:m,w=v.mirror,x=v.reversed,_="".concat(y).concat(w?"Mirror":""),S,O,E,j,I;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var C=p[1]-p[0],B=1/0,A=v.categoricalDomain.sort(WM);if(A.forEach(function(Z,ae){ae>0&&(B=Math.min((Z||0)-(A[ae-1]||0),B))}),Number.isFinite(B)){var M=B/C,$=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(S=M*$/2),v.padding==="no-gap"){var D=dt(t.barCategoryGap,M*$),N=M*$/2;S=N-D-(N-D)/$*D}}}i==="xAxis"?O=[r.left+(b.left||0)+(S||0),r.left+r.width-(b.right||0)-(S||0)]:i==="yAxis"?O=u==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(S||0),r.top+r.height-(b.bottom||0)-(S||0)]:O=v.range,x&&(O=[O[1],O[0]]);var R=MA(v,a,d),L=R.scale,W=R.realScaleType;L.domain(p).range(O),IA(L);var U=DA(L,on(on({},v),{},{realScaleType:W}));i==="xAxis"?(I=y==="top"&&!w||y==="bottom"&&w,E=r.left,j=c[_]-I*v.height):i==="yAxis"&&(I=y==="left"&&!w||y==="right"&&w,E=c[_]-I*v.width,j=r.top);var X=on(on(on({},v),U),{},{realScaleType:W,x:E,y:j,scale:L,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return X.bandSize=Oc(X,U),!v.hide&&i==="xAxis"?c[_]+=(I?-1:1)*X.height:v.hide||(c[_]+=(I?-1:1)*X.width),on(on({},h),{},sd({},g,X))},{})},mE=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},Hq=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return mE({x:n,y:r},{x:i,y:a})},yE=function(){function e(t){zq(this,e),this.scale=t}return Fq(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();sd(yE,"EPS",1e-4);var Jy=function(t){var n=Object.keys(t).reduce(function(r,i){return on(on({},r),{},sd({},i,yE.create(t[i])))},{});return on(on({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return uq(i,function(u,s){return n[s].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return wq(i,function(a,o){return n[o].isInRange(a)})}})};function Vq(e){return(e%180+180)%180}var Kq=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Vq(i),o=a*Math.PI/180,l=Math.atan(r/n),u=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(u)},Gq=KN(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),gE=T.createContext(void 0),bE=T.createContext(void 0),xE=T.createContext(void 0),Xq=T.createContext({}),wE=T.createContext(void 0),_E=T.createContext(0),SE=T.createContext(0),l1=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,l=t.children,u=t.width,s=t.height,f=Gq(a);return k.createElement(gE.Provider,{value:r},k.createElement(bE.Provider,{value:i},k.createElement(Xq.Provider,{value:a},k.createElement(xE.Provider,{value:f},k.createElement(wE.Provider,{value:o},k.createElement(_E.Provider,{value:s},k.createElement(SE.Provider,{value:u},l)))))))},qq=function(){return T.useContext(wE)},OE=function(t){var n=T.useContext(gE);n==null&&wi();var r=n[t];return r==null&&wi(),r},PE=function(t){var n=T.useContext(bE);n==null&&wi();var r=n[t];return r==null&&wi(),r},Yq=function(){var t=T.useContext(xE);return t},AE=function(){return T.useContext(SE)},EE=function(){return T.useContext(_E)};function Ma(e){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function Qq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TE(r.key),r)}}function Jq(e,t,n){return t&&Zq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eY(e,t,n){return t=Wc(t),tY(e,$E()?Reflect.construct(t,n||[],Wc(e).constructor):t.apply(e,n))}function tY(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nY(e)}function nY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($E=function(){return!!e})()}function Wc(e){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wc(e)}function rY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dv(e,t)}function Dv(e,t){return Dv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dv(e,t)}function u1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u1(Object(n),!0).forEach(function(r){eg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eg(e,t,n){return t=TE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TE(e){var t=iY(e,"string");return Ma(t)=="symbol"?t:t+""}function iY(e,t){if(Ma(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ma(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function aY(e,t){return sY(e)||uY(e,t)||lY(e,t)||oY()}function oY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
135
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lY(e,t){if(e){if(typeof e=="string")return c1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c1(e,t)}}function c1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function sY(e){if(Array.isArray(e))return e}function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rv.apply(this,arguments)}var cY=function(t,n){var r;return k.isValidElement(t)?r=k.cloneElement(t,n):te(t)?r=t(n):r=k.createElement("line",Rv({},n,{className:"recharts-reference-line-line"})),r},fY=function(t,n,r,i,a,o,l,u,s){var f=a.x,c=a.y,d=a.width,h=a.height;if(r){var g=s.y,v=t.y.apply(g,{position:o});if(An(s,"discard")&&!t.y.isInRange(v))return null;var y=[{x:f+d,y:v},{x:f,y:v}];return u==="left"?y.reverse():y}if(n){var p=s.x,m=t.x.apply(p,{position:o});if(An(s,"discard")&&!t.x.isInRange(m))return null;var b=[{x:m,y:c+h},{x:m,y:c}];return l==="top"?b.reverse():b}if(i){var w=s.segment,x=w.map(function(_){return t.apply(_,{position:o})});return An(s,"discard")&&eq(x,function(_){return!t.isInRange(_)})?null:x}return null};function dY(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,u=e.alwaysShow,s=qq(),f=OE(i),c=PE(a),d=Yq();if(!s||!d)return null;Vn(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Jy({x:f.scale,y:c.scale}),g=Ge(t),v=Ge(n),y=r&&r.length===2,p=fY(h,g,v,y,d,e.position,f.orientation,c.orientation,e);if(!p)return null;var m=aY(p,2),b=m[0],w=b.x,x=b.y,_=m[1],S=_.x,O=_.y,E=An(e,"hidden")?"url(#".concat(s,")"):void 0,j=s1(s1({clipPath:E},J(e,!0)),{},{x1:w,y1:x,x2:S,y2:O});return k.createElement(fe,{className:ie("recharts-reference-line",l)},cY(o,j),Qe.renderCallByParent(e,Hq({x1:w,y1:x,x2:S,y2:O})))}var tg=function(e){function t(){return Qq(this,t),eY(this,t,arguments)}return rY(t,e),Jq(t,[{key:"render",value:function(){return k.createElement(dY,this.props)}}])}(k.Component);eg(tg,"displayName","ReferenceLine");eg(tg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(this,arguments)}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(e)}function f1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function d1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(n),!0).forEach(function(r){cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kE(r.key),r)}}function vY(e,t,n){return t&&pY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mY(e,t,n){return t=Hc(t),yY(e,jE()?Reflect.construct(t,n||[],Hc(e).constructor):t.apply(e,n))}function yY(e,t){if(t&&(Ia(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gY(e)}function gY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jE=function(){return!!e})()}function Hc(e){return Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hc(e)}function bY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bv(e,t)}function Bv(e,t){return Bv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bv(e,t)}function cd(e,t,n){return t=kE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kE(e){var t=xY(e,"string");return Ia(t)=="symbol"?t:t+""}function xY(e,t){if(Ia(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wY=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=Jy({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return An(t,"discard")&&!o.isInRange(l)?null:l},fd=function(e){function t(){return hY(this,t),mY(this,t,arguments)}return bY(t,e),vY(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,l=r.alwaysShow,u=r.clipPathId,s=Ge(i),f=Ge(a);if(Vn(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!f)return null;var c=wY(this.props);if(!c)return null;var d=c.x,h=c.y,g=this.props,v=g.shape,y=g.className,p=An(this.props,"hidden")?"url(#".concat(u,")"):void 0,m=d1(d1({clipPath:p},J(this.props,!0)),{},{cx:d,cy:h});return k.createElement(fe,{className:ie("recharts-reference-dot",y)},t.renderDot(v,m),Qe.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(k.Component);cd(fd,"displayName","ReferenceDot");cd(fd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});cd(fd,"renderDot",function(e,t){var n;return k.isValidElement(e)?n=k.cloneElement(e,t):te(e)?n=e(t):n=k.createElement(nd,Lv({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zv.apply(this,arguments)}function Da(e){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}function h1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h1(Object(n),!0).forEach(function(r){dd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NE(r.key),r)}}function OY(e,t,n){return t&&SY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PY(e,t,n){return t=Vc(t),AY(e,CE()?Reflect.construct(t,n||[],Vc(e).constructor):t.apply(e,n))}function AY(e,t){if(t&&(Da(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EY(e)}function EY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CE=function(){return!!e})()}function Vc(e){return Vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vc(e)}function $Y(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fv(e,t)}function Fv(e,t){return Fv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fv(e,t)}function dd(e,t,n){return t=NE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NE(e){var t=TY(e,"string");return Da(t)=="symbol"?t:t+""}function TY(e,t){if(Da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jY=function(t,n,r,i,a){var o=a.x1,l=a.x2,u=a.y1,s=a.y2,f=a.xAxis,c=a.yAxis;if(!f||!c)return null;var d=Jy({x:f.scale,y:c.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:r?d.y.apply(u,{position:"start"}):d.y.rangeMin},g={x:n?d.x.apply(l,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(s,{position:"end"}):d.y.rangeMax};return An(a,"discard")&&(!d.isInRange(h)||!d.isInRange(g))?null:mE(h,g)},hd=function(e){function t(){return _Y(this,t),PY(this,t,arguments)}return $Y(t,e),OY(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,l=r.y2,u=r.className,s=r.alwaysShow,f=r.clipPathId;Vn(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=Ge(i),d=Ge(a),h=Ge(o),g=Ge(l),v=this.props.shape;if(!c&&!d&&!h&&!g&&!v)return null;var y=jY(c,d,h,g,this.props);if(!y&&!v)return null;var p=An(this.props,"hidden")?"url(#".concat(f,")"):void 0;return k.createElement(fe,{className:ie("recharts-reference-area",u)},t.renderRect(v,p1(p1({clipPath:p},J(this.props,!0)),y)),Qe.renderCallByParent(this.props,y))}}])}(k.Component);dd(hd,"displayName","ReferenceArea");dd(hd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dd(hd,"renderRect",function(e,t){var n;return k.isValidElement(e)?n=k.cloneElement(e,t):te(e)?n=e(t):n=k.createElement(Zy,zv({},t,{className:"recharts-reference-area-rect"})),n});function ME(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function kY(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Kq(r,n)}function CY(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function Kc(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function NY(e,t){return ME(e,t+1)}function MY(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,l=t.end,u=0,s=1,f=o,c=function(){var g=r==null?void 0:r[u];if(g===void 0)return{v:ME(r,s)};var v=u,y,p=function(){return y===void 0&&(y=n(g,v)),y},m=g.coordinate,b=u===0||Kc(e,m,p,f,l);b||(u=0,f=o,s+=1),b&&(f=m+e*(p()/2+i),u+=s)},d;s<=a.length;)if(d=c(),d)return d.v;return[]}function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function v1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){IY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IY(e,t,n){return t=DY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DY(e){var t=RY(e,"string");return ql(t)=="symbol"?t:t+""}function RY(e,t){if(ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LY(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,l=t.start,u=t.end,s=function(d){var h=a[d],g,v=function(){return g===void 0&&(g=n(h,d)),g};if(d===o-1){var y=e*(h.coordinate+e*v()/2-u);a[d]=h=ot(ot({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate})}else a[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var p=Kc(e,h.tickCoord,v,l,u);p&&(u=h.tickCoord-e*(v()/2+i),a[d]=ot(ot({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)s(f);return a}function BY(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,u=t.start,s=t.end;if(a){var f=r[l-1],c=n(f,l-1),d=e*(f.coordinate+e*c/2-s);o[l-1]=f=ot(ot({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Kc(e,f.tickCoord,function(){return c},u,s);h&&(s=f.tickCoord-e*(c/2+i),o[l-1]=ot(ot({},f),{},{isShow:!0}))}for(var g=a?l-1:l,v=function(m){var b=o[m],w,x=function(){return w===void 0&&(w=n(b,m)),w};if(m===0){var _=e*(b.coordinate-e*x()/2-u);o[m]=b=ot(ot({},b),{},{tickCoord:_<0?b.coordinate-_*e:b.coordinate})}else o[m]=b=ot(ot({},b),{},{tickCoord:b.coordinate});var S=Kc(e,b.tickCoord,x,u,s);S&&(u=b.tickCoord+e*(x()/2+i),o[m]=ot(ot({},b),{},{isShow:!0}))},y=0;y<g;y++)v(y);return o}function zY(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,u=e.interval,s=e.tickFormatter,f=e.unit,c=e.angle;if(!i||!i.length||!r)return[];if(K(u)||Ai.isSsr)return NY(i,typeof u=="number"&&K(u)?u:0);var d=[],h=l==="top"||l==="bottom"?"width":"height",g=f&&h==="width"?Ko(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(b,w){var x=te(s)?s(b.value,w):b.value;return h==="width"?kY(Ko(x,{fontSize:t,letterSpacing:n}),g,c):Ko(x,{fontSize:t,letterSpacing:n})[h]},y=i.length>=2?ft(i[1].coordinate-i[0].coordinate):1,p=CY(a,y,h);return u==="equidistantPreserveStart"?MY(y,p,v,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=BY(y,p,v,i,o,u==="preserveStartEnd"):d=LY(y,p,v,i,o),d.filter(function(m){return m.isShow}))}var FY=["viewBox"],UY=["viewBox"],WY=["ticks"];function Ra(e){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function m1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m1(Object(n),!0).forEach(function(r){ng(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xh(e,t){if(e==null)return{};var n=HY(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function VY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DE(r.key),r)}}function KY(e,t,n){return t&&y1(e.prototype,t),n&&y1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function GY(e,t,n){return t=Gc(t),XY(e,IE()?Reflect.construct(t,n||[],Gc(e).constructor):t.apply(e,n))}function XY(e,t){if(t&&(Ra(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qY(e)}function qY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IE=function(){return!!e})()}function Gc(e){return Gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gc(e)}function YY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uv(e,t)}function Uv(e,t){return Uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uv(e,t)}function ng(e,t,n){return t=DE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e){var t=QY(e,"string");return Ra(t)=="symbol"?t:t+""}function QY(e,t){if(Ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pd=function(e){function t(n){var r;return VY(this,t),r=GY(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return YY(t,e),KY(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=xh(r,FY),l=this.props,u=l.viewBox,s=xh(l,UY);return!aa(a,u)||!aa(o,s)||!aa(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,l=i.width,u=i.height,s=i.orientation,f=i.tickSize,c=i.mirror,d=i.tickMargin,h,g,v,y,p,m,b=c?-1:1,w=r.tickSize||f,x=K(r.tickCoord)?r.tickCoord:r.coordinate;switch(s){case"top":h=g=r.coordinate,y=o+ +!c*u,v=y-b*w,m=v-b*d,p=x;break;case"left":v=y=r.coordinate,g=a+ +!c*l,h=g-b*w,p=h-b*d,m=x;break;case"right":v=y=r.coordinate,g=a+ +c*l,h=g+b*w,p=h+b*d,m=x;break;default:h=g=r.coordinate,y=o+ +c*u,v=y+b*w,m=v+b*d,p=x;break}return{line:{x1:h,y1:v,x2:g,y2:y},tick:{x:p,y:m}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.orientation,s=r.mirror,f=r.axisLine,c=Ue(Ue(Ue({},J(this.props,!1)),J(f,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!s||u==="bottom"&&s);c=Ue(Ue({},c),{},{x1:i,y1:a+d*l,x2:i+o,y2:a+d*l})}else{var h=+(u==="left"&&!s||u==="right"&&s);c=Ue(Ue({},c),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+l})}return k.createElement("line",Qi({},c,{className:ie("recharts-cartesian-axis-line",Mt(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,l=this.props,u=l.tickLine,s=l.stroke,f=l.tick,c=l.tickFormatter,d=l.unit,h=zY(Ue(Ue({},this.props),{},{ticks:r}),i,a),g=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),y=J(this.props,!1),p=J(f,!1),m=Ue(Ue({},y),{},{fill:"none"},J(u,!1)),b=h.map(function(w,x){var _=o.getTickLineCoord(w),S=_.line,O=_.tick,E=Ue(Ue(Ue(Ue({textAnchor:g,verticalAnchor:v},y),{},{stroke:"none",fill:s},p),O),{},{index:x,payload:w,visibleTicksCount:h.length,tickFormatter:c});return k.createElement(fe,Qi({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},yi(o.props,w,x)),u&&k.createElement("line",Qi({},m,S,{className:ie("recharts-cartesian-axis-tick-line",Mt(u,"className"))})),f&&t.renderTickItem(f,E,"".concat(te(c)?c(w.value,x):w.value).concat(d||"")))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,u=i.ticksGenerator,s=i.className,f=i.hide;if(f)return null;var c=this.props,d=c.ticks,h=xh(c,WY),g=d;return te(u)&&(g=d&&d.length>0?u(this.props):u(h)),o<=0||l<=0||!g||!g.length?null:k.createElement(fe,{className:ie("recharts-cartesian-axis",s),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Qe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,l=ie(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(r)?o=k.cloneElement(r,Ue(Ue({},i),{},{className:l})):te(r)?o=r(Ue(Ue({},i),{},{className:l})):o=k.createElement(gi,Qi({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(T.Component);ng(pd,"displayName","CartesianAxis");ng(pd,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var ZY=["type","layout","connectNulls","ref"],JY=["key"];function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function g1(e,t){if(e==null)return{};var n=eQ(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(this,arguments)}function b1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(n),!0).forEach(function(r){ln(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mi(e){return iQ(e)||rQ(e)||nQ(e)||tQ()}function tQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nQ(e,t){if(e){if(typeof e=="string")return Wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wv(e,t)}}function rQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iQ(e){if(Array.isArray(e))return Wv(e)}function Wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LE(r.key),r)}}function oQ(e,t,n){return t&&x1(e.prototype,t),n&&x1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lQ(e,t,n){return t=Xc(t),uQ(e,RE()?Reflect.construct(t,n||[],Xc(e).constructor):t.apply(e,n))}function uQ(e,t){if(t&&(La(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sQ(e)}function sQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RE=function(){return!!e})()}function Xc(e){return Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xc(e)}function cQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hv(e,t)}function ln(e,t,n){return t=LE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LE(e){var t=fQ(e,"string");return La(t)=="symbol"?t:t+""}function fQ(e,t){if(La(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(La(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mu=function(e){function t(){var n;aQ(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=lQ(this,t,[].concat(i)),ln(n,"state",{isAnimationFinished:!0,totalLength:0}),ln(n,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),ln(n,"getStrokeDasharray",function(o,l,u){var s=u.reduce(function(p,m){return p+m});if(!s)return n.generateSimpleStrokeDasharray(l,o);for(var f=Math.floor(o/s),c=o%s,d=l-o,h=[],g=0,v=0;g<u.length;v+=u[g],++g)if(v+u[g]>c){h=[].concat(Mi(u.slice(0,g)),[c-v]);break}var y=h.length%2===0?[0,d]:[d];return[].concat(Mi(t.repeat(u,f)),Mi(h),y).map(function(p){return"".concat(p,"px")}).join(", ")}),ln(n,"id",to("recharts-line-")),ln(n,"pathRef",function(o){n.mainCurve=o}),ln(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),ln(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return cQ(t,e),oQ(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=It(f,pu);if(!c)return null;var d=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:Ve(v.payload,y)}},h={clipPath:r?"url(#clipPath-".concat(i,")"):null};return k.createElement(fe,h,c.map(function(g){return k.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,dataPointFormatter:d})}))}},{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,s=l.points,f=l.dataKey,c=J(this.props,!1),d=J(u,!0),h=s.map(function(v,y){var p=At(At(At({key:"dot-".concat(y),r:3},c),d),{},{index:y,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:s});return t.renderDotItem(u,p)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(fe,Zo({className:"recharts-line-dots",key:"dots"},g),h)}},{key:"renderCurveStatically",value:function(r,i,a,o){var l=this.props,u=l.type,s=l.layout,f=l.connectNulls;l.ref;var c=g1(l,ZY),d=At(At(At({},J(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},o),{},{type:u,layout:s,connectNulls:f});return k.createElement(Ec,Zo({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,s=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,h=o.animationId,g=o.animateNewValues,v=o.width,y=o.height,p=this.state,m=p.prevPoints,b=p.totalLength;return k.createElement($n,{begin:f,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var x=w.t;if(m){var _=m.length/l.length,S=l.map(function(C,B){var A=Math.floor(B*_);if(m[A]){var M=m[A],$=jt(M.x,C.x),D=jt(M.y,C.y);return At(At({},C),{},{x:$(x),y:D(x)})}if(g){var N=jt(v*2,C.x),R=jt(y/2,C.y);return At(At({},C),{},{x:N(x),y:R(x)})}return At(At({},C),{},{x:C.x,y:C.y})});return a.renderCurveStatically(S,r,i)}var O=jt(0,b),E=O(x),j;if(u){var I="".concat(u).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});j=a.getStrokeDasharray(E,b,I)}else j=a.generateSimpleStrokeDasharray(b,E);return a.renderCurveStatically(l,r,i,{strokeDasharray:j})})}},{key:"renderCurve",value:function(r,i){var a=this.props,o=a.points,l=a.isAnimationActive,u=this.state,s=u.prevPoints,f=u.totalLength;return l&&o&&o.length&&(!s&&f>0||!hu(s,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,l=i.points,u=i.className,s=i.xAxis,f=i.yAxis,c=i.top,d=i.left,h=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(a||!l||!l.length)return null;var p=this.state.isAnimationFinished,m=l.length===1,b=ie("recharts-line",u),w=s&&s.allowDataOverflow,x=f&&f.allowDataOverflow,_=w||x,S=ne(y)?this.id:y,O=(r=J(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=O.r,j=E===void 0?3:E,I=O.strokeWidth,C=I===void 0?2:I,B=ZM(o)?o:{},A=B.clipDot,M=A===void 0?!0:A,$=j*2+C;return k.createElement(fe,{className:b},w||x?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(S)},k.createElement("rect",{x:w?d:d-h/2,y:x?c:c-g/2,width:w?h:h*2,height:x?g:g*2})),!M&&k.createElement("clipPath",{id:"clipPath-dots-".concat(S)},k.createElement("rect",{x:d-$/2,y:c-$/2,width:h+$,height:g+$}))):null,!m&&this.renderCurve(_,S),this.renderErrorBar(_,S),(m||o)&&this.renderDots(_,M,S),(!v||p)&&Gn.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(Mi(r),[0]):r,o=[],l=0;l<i;++l)o=[].concat(Mi(o),Mi(a));return o}},{key:"renderDotItem",value:function(r,i){var a;if(k.isValidElement(r))a=k.cloneElement(r,i);else if(te(r))a=r(i);else{var o=i.key,l=g1(i,JY),u=ie("recharts-line-dot",typeof r!="boolean"?r.className:"");a=k.createElement(nd,Zo({key:o},l,{className:u}))}return a}}])}(T.PureComponent);ln(mu,"displayName","Line");ln(mu,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ai.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ln(mu,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,l=e.bandSize,u=e.displayedData,s=e.offset,f=t.layout,c=u.map(function(d,h){var g=Ve(d,o);return f==="horizontal"?{x:qx({axis:n,ticks:i,bandSize:l,entry:d,index:h}),y:ne(g)?null:r.scale(g),value:g,payload:d}:{x:ne(g)?null:n.scale(g),y:qx({axis:r,ticks:a,bandSize:l,entry:d,index:h}),value:g,payload:d}});return At({points:c,layout:f},s)});function Ba(e){"@babel/helpers - typeof";return Ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ba(e)}function dQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FE(r.key),r)}}function pQ(e,t,n){return t&&hQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vQ(e,t,n){return t=qc(t),mQ(e,BE()?Reflect.construct(t,n||[],qc(e).constructor):t.apply(e,n))}function mQ(e,t){if(t&&(Ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yQ(e)}function yQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BE=function(){return!!e})()}function qc(e){return qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qc(e)}function gQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vv(e,t)}function Vv(e,t){return Vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vv(e,t)}function zE(e,t,n){return t=FE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FE(e){var t=bQ(e,"string");return Ba(t)=="symbol"?t:t+""}function bQ(e,t){if(Ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ba(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kv.apply(this,arguments)}function xQ(e){var t=e.xAxisId,n=AE(),r=EE(),i=OE(t);return i==null?null:T.createElement(pd,Kv({},i,{className:ie("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return ii(o,!0)}}))}var rg=function(e){function t(){return dQ(this,t),vQ(this,t,arguments)}return gQ(t,e),pQ(t,[{key:"render",value:function(){return T.createElement(xQ,this.props)}}])}(T.Component);zE(rg,"displayName","XAxis");zE(rg,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function wQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HE(r.key),r)}}function SQ(e,t,n){return t&&_Q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OQ(e,t,n){return t=Yc(t),PQ(e,UE()?Reflect.construct(t,n||[],Yc(e).constructor):t.apply(e,n))}function PQ(e,t){if(t&&(za(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AQ(e)}function AQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UE=function(){return!!e})()}function Yc(e){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yc(e)}function EQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gv(e,t)}function Gv(e,t){return Gv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gv(e,t)}function WE(e,t,n){return t=HE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HE(e){var t=$Q(e,"string");return za(t)=="symbol"?t:t+""}function $Q(e,t){if(za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xv.apply(this,arguments)}var TQ=function(t){var n=t.yAxisId,r=AE(),i=EE(),a=PE(n);return a==null?null:T.createElement(pd,Xv({},a,{className:ie("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return ii(l,!0)}}))},vd=function(e){function t(){return wQ(this,t),OQ(this,t,arguments)}return EQ(t,e),SQ(t,[{key:"render",value:function(){return T.createElement(TQ,this.props)}}])}(T.Component);WE(vd,"displayName","YAxis");WE(vd,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function w1(e){return NQ(e)||CQ(e)||kQ(e)||jQ()}function jQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
137
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kQ(e,t){if(e){if(typeof e=="string")return qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qv(e,t)}}function CQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NQ(e){if(Array.isArray(e))return qv(e)}function qv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yv=function(t,n,r,i,a){var o=It(t,tg),l=It(t,fd),u=[].concat(w1(o),w1(l)),s=It(t,hd),f="".concat(i,"Id"),c=i[0],d=n;if(u.length&&(d=u.reduce(function(v,y){if(y.props[f]===r&&An(y.props,"extendDomain")&&K(y.props[c])){var p=y.props[c];return[Math.min(v[0],p),Math.max(v[1],p)]}return v},d)),s.length){var h="".concat(c,"1"),g="".concat(c,"2");d=s.reduce(function(v,y){if(y.props[f]===r&&An(y.props,"extendDomain")&&K(y.props[h])&&K(y.props[g])){var p=y.props[h],m=y.props[g];return[Math.min(v[0],p,m),Math.max(v[1],p,m)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,y){return K(y)?[Math.min(v[0],y),Math.max(v[1],y)]:v},d)),d},VE={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,s,f){this.fn=u,this.context=s,this.once=f||!1}function a(u,s,f,c,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,c||u,d),g=n?n+s:s;return u._events[g]?u._events[g].fn?u._events[g]=[u._events[g],h]:u._events[g].push(h):(u._events[g]=h,u._eventsCount++),u}function o(u,s){--u._eventsCount===0?u._events=new r:delete u._events[s]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var s=[],f,c;if(this._eventsCount===0)return s;for(c in f=this._events)t.call(f,c)&&s.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(f)):s},l.prototype.listeners=function(s){var f=n?n+s:s,c=this._events[f];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,h=c.length,g=new Array(h);d<h;d++)g[d]=c[d].fn;return g},l.prototype.listenerCount=function(s){var f=n?n+s:s,c=this._events[f];return c?c.fn?1:c.length:0},l.prototype.emit=function(s,f,c,d,h,g){var v=n?n+s:s;if(!this._events[v])return!1;var y=this._events[v],p=arguments.length,m,b;if(y.fn){switch(y.once&&this.removeListener(s,y.fn,void 0,!0),p){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,c),!0;case 4:return y.fn.call(y.context,f,c,d),!0;case 5:return y.fn.call(y.context,f,c,d,h),!0;case 6:return y.fn.call(y.context,f,c,d,h,g),!0}for(b=1,m=new Array(p-1);b<p;b++)m[b-1]=arguments[b];y.fn.apply(y.context,m)}else{var w=y.length,x;for(b=0;b<w;b++)switch(y[b].once&&this.removeListener(s,y[b].fn,void 0,!0),p){case 1:y[b].fn.call(y[b].context);break;case 2:y[b].fn.call(y[b].context,f);break;case 3:y[b].fn.call(y[b].context,f,c);break;case 4:y[b].fn.call(y[b].context,f,c,d);break;default:if(!m)for(x=1,m=new Array(p-1);x<p;x++)m[x-1]=arguments[x];y[b].fn.apply(y[b].context,m)}}return!0},l.prototype.on=function(s,f,c){return a(this,s,f,c,!1)},l.prototype.once=function(s,f,c){return a(this,s,f,c,!0)},l.prototype.removeListener=function(s,f,c,d){var h=n?n+s:s;if(!this._events[h])return this;if(!f)return o(this,h),this;var g=this._events[h];if(g.fn)g.fn===f&&(!d||g.once)&&(!c||g.context===c)&&o(this,h);else{for(var v=0,y=[],p=g.length;v<p;v++)(g[v].fn!==f||d&&!g[v].once||c&&g[v].context!==c)&&y.push(g[v]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},l.prototype.removeAllListeners=function(s){var f;return s?(f=n?n+s:s,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(VE);var MQ=VE.exports;const IQ=ye(MQ);var wh=new IQ,_h="recharts.syncMouseEvents";function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function DQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KE(r.key),r)}}function LQ(e,t,n){return t&&RQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sh(e,t,n){return t=KE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KE(e){var t=BQ(e,"string");return Yl(t)=="symbol"?t:t+""}function BQ(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zQ=function(){function e(){DQ(this,e),Sh(this,"activeIndex",0),Sh(this,"coordinateList",[]),Sh(this,"layout","horizontal")}return LQ(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,l=o===void 0?null:o,u=n.layout,s=u===void 0?null:u,f=n.offset,c=f===void 0?null:f,d=n.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=s??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,u=this.coordinateList[this.activeIndex].coordinate,s=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,c=a+u+s,d=o+this.offset.top+l/2+f;this.mouseHandlerCallback({pageX:c,pageY:d})}}}])}();function FQ(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&K(r)&&K(i))return!0}return!1}function UQ(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function GE(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=_e(t,n,r,i),l=_e(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function WQ(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,u=t.cy,s=t.innerRadius,f=t.outerRadius,c=t.angle,d=_e(l,u,s,c),h=_e(l,u,f,c);r=d.x,i=d.y,a=h.x,o=h.y}else return GE(t);return[{x:r,y:i},{x:a,y:o}]}function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function _1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_1(Object(n),!0).forEach(function(r){HQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HQ(e,t,n){return t=VQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VQ(e){var t=KQ(e,"string");return Ql(t)=="symbol"?t:t+""}function KQ(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GQ(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,u=e.offset,s=e.activeTooltipIndex,f=e.tooltipAxisBandSize,c=e.layout,d=e.chartName,h=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!h||!a||!o||d!=="ScatterChart"&&i!=="axis")return null;var g,v=Ec;if(d==="ScatterChart")g=o,v=FK;else if(d==="BarChart")g=UQ(c,o,u,f),v=Zy;else if(c==="radial"){var y=GE(o),p=y.cx,m=y.cy,b=y.radius,w=y.startAngle,x=y.endAngle;g={cx:p,cy:m,startAngle:w,endAngle:x,innerRadius:b,outerRadius:b},v=HA}else g={points:WQ(c,o,u)},v=Ec;var _=Zu(Zu(Zu(Zu({stroke:"#ccc",pointerEvents:"none"},u),g),J(h,!1)),{},{payload:l,payloadIndex:s,className:ie("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,_):T.createElement(v,_)}var XQ=["item"],qQ=["children","className","width","height","style","compact","title","desc"];function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function Zi(){return Zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zi.apply(this,arguments)}function S1(e,t){return ZQ(e)||QQ(e,t)||qE(e,t)||YQ()}function YQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(f){s=!0,i=f}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function ZQ(e){if(Array.isArray(e))return e}function O1(e,t){if(e==null)return{};var n=JQ(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function eZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YE(r.key),r)}}function nZ(e,t,n){return t&&tZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rZ(e,t,n){return t=Qc(t),iZ(e,XE()?Reflect.construct(t,n||[],Qc(e).constructor):t.apply(e,n))}function iZ(e,t){if(t&&(Fa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aZ(e)}function aZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XE=function(){return!!e})()}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qc(e)}function oZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qv(e,t)}function Qv(e,t){return Qv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Qv(e,t)}function Ua(e){return sZ(e)||uZ(e)||qE(e)||lZ()}function lZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qE(e,t){if(e){if(typeof e=="string")return Zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zv(e,t)}}function uZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sZ(e){if(Array.isArray(e))return Zv(e)}function Zv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P1(Object(n),!0).forEach(function(r){ee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ee(e,t,n){return t=YE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YE(e){var t=cZ(e,"string");return Fa(t)=="symbol"?t:t+""}function cZ(e,t){if(Fa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fZ={xAxis:["bottom","top"],yAxis:["left","right"]},dZ={width:"100%",height:"100%"},QE={x:0,y:0};function Ju(e){return e}var hZ=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},pZ=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return z(z(z({},i),_e(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,s=i.angle;return z(z(z({},i),_e(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}return QE},md=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(l,u){var s=u.props.data;return s&&s.length?[].concat(Ua(l),Ua(s)):l},[]);return o.length>0?o:t&&t.length&&K(i)&&K(a)?t.slice(i,a+1):[]};function ZE(e){return e==="number"?[0,"auto"]:void 0}var Jv=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=md(n,t);return r<0||!a||!a.length||r>=l.length?null:a.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:n;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=c===void 0?l:c;d=qs(h,o.dataKey,i)}else d=c&&c[r]||l[r];return d?[].concat(Ua(u),[LA(s,d)]):u},[])},A1=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=hZ(a,r),l=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=l9(o,l,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Jv(t,n,f,c),h=pZ(r,l,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},vZ=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,h=NA(f,a);return r.reduce(function(g,v){var y,p=v.type.defaultProps!==void 0?z(z({},v.type.defaultProps),v.props):v.props,m=p.type,b=p.dataKey,w=p.allowDataOverflow,x=p.allowDuplicatedCategory,_=p.scale,S=p.ticks,O=p.includeHidden,E=p[o];if(g[E])return g;var j=md(t.data,{graphicalItems:i.filter(function(U){var X,Z=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o];return Z===E}),dataStartIndex:u,dataEndIndex:s}),I=j.length,C,B,A;FQ(p.domain,w,m)&&(C=hv(p.domain,null,w),h&&(m==="number"||_!=="auto")&&(A=Xo(j,b,"category")));var M=ZE(m);if(!C||C.length===0){var $,D=($=p.domain)!==null&&$!==void 0?$:M;if(b){if(C=Xo(j,b,m),m==="category"&&h){var N=UM(C);x&&N?(B=C,C=Lc(0,I)):x||(C=Jx(D,C,v).reduce(function(U,X){return U.indexOf(X)>=0?U:[].concat(Ua(U),[X])},[]))}else if(m==="category")x?C=C.filter(function(U){return U!==""&&!ne(U)}):C=Jx(D,C,v).reduce(function(U,X){return U.indexOf(X)>=0||X===""||ne(X)?U:[].concat(Ua(U),[X])},[]);else if(m==="number"){var R=d9(j,i.filter(function(U){var X,Z,ae=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o],F="hide"in U.props?U.props.hide:(Z=U.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return ae===E&&(O||!F)}),b,a,f);R&&(C=R)}h&&(m==="number"||_!=="auto")&&(A=Xo(j,b,"category"))}else h?C=Lc(0,I):l&&l[E]&&l[E].hasStack&&m==="number"?C=d==="expand"?[0,1]:RA(l[E].stackGroups,u,s):C=CA(j,i.filter(function(U){var X=o in U.props?U.props[o]:U.type.defaultProps[o],Z="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return X===E&&(O||!Z)}),m,f,!0);if(m==="number")C=Yv(c,C,E,a,S),D&&(C=hv(D,C,w));else if(m==="category"&&D){var L=D,W=C.every(function(U){return L.indexOf(U)>=0});W&&(C=L)}}return z(z({},g),{},ee({},E,z(z({},p),{},{axisType:a,domain:C,categoricalDomain:A,duplicateDomain:B,originalDomain:(y=p.domain)!==null&&y!==void 0?y:M,isCategorical:h,layout:f})))},{})},mZ=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=md(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:s}),h=d.length,g=NA(f,a),v=-1;return r.reduce(function(y,p){var m=p.type.defaultProps!==void 0?z(z({},p.type.defaultProps),p.props):p.props,b=m[o],w=ZE("number");if(!y[b]){v++;var x;return g?x=Lc(0,h):l&&l[b]&&l[b].hasStack?(x=RA(l[b].stackGroups,u,s),x=Yv(c,x,b,a)):(x=hv(w,CA(d,r.filter(function(_){var S,O,E=o in _.props?_.props[o]:(S=_.type.defaultProps)===null||S===void 0?void 0:S[o],j="hide"in _.props?_.props.hide:(O=_.type.defaultProps)===null||O===void 0?void 0:O.hide;return E===b&&!j}),"number",f),i.defaultProps.allowDataOverflow),x=Yv(c,x,b,a)),z(z({},y),{},ee({},b,z(z({axisType:a},i.defaultProps),{},{hide:!0,orientation:Mt(fZ,"".concat(a,".").concat(v%2),null),domain:x,originalDomain:w,isCategorical:g,layout:f})))}return y},{})},yZ=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=It(f,a),h={};return d&&d.length?h=vZ(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s}):o&&o.length&&(h=mZ(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s})),h},gZ=function(t){var n=Ii(t),r=ii(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Py(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Oc(n,r)}},E1=function(t){var n=t.children,r=t.defaultShowTooltip,i=Tt(n,Ca),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},bZ=function(t){return!t||!t.length?!1:t.some(function(n){var r=Hn(n&&n.type);return r&&r.indexOf("Bar")>=0})},$1=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},xZ=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,s=r.width,f=r.height,c=r.children,d=r.margin||{},h=Tt(c,Ca),g=Tt(c,oa),v=Object.keys(u).reduce(function(x,_){var S=u[_],O=S.orientation;return!S.mirror&&!S.hide?z(z({},x),{},ee({},O,x[O]+S.width)):x},{left:d.left||0,right:d.right||0}),y=Object.keys(o).reduce(function(x,_){var S=o[_],O=S.orientation;return!S.mirror&&!S.hide?z(z({},x),{},ee({},O,Mt(x,"".concat(O))+S.height)):x},{top:d.top||0,bottom:d.bottom||0}),p=z(z({},y),v),m=p.bottom;h&&(p.bottom+=h.props.height||Ca.defaultProps.height),g&&n&&(p=c9(p,i,r,n));var b=s-p.left-p.right,w=f-p.top-p.bottom;return z(z({brushBottom:m},p),{},{width:Math.max(b,0),height:Math.max(w,0)})},wZ=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},JE=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(p,m){var b=m.graphicalItems,w=m.stackGroups,x=m.offset,_=m.updateId,S=m.dataStartIndex,O=m.dataEndIndex,E=p.barSize,j=p.layout,I=p.barGap,C=p.barCategoryGap,B=p.maxBarSize,A=$1(j),M=A.numericAxisName,$=A.cateAxisName,D=bZ(b),N=[];return b.forEach(function(R,L){var W=md(p.data,{graphicalItems:[R],dataStartIndex:S,dataEndIndex:O}),U=R.type.defaultProps!==void 0?z(z({},R.type.defaultProps),R.props):R.props,X=U.dataKey,Z=U.maxBarSize,ae=U["".concat(M,"Id")],F=U["".concat($,"Id")],Q={},ce=u.reduce(function(Fr,Ur){var wd=m["".concat(Ur.axisType,"Map")],dg=U["".concat(Ur.axisType,"Id")];wd&&wd[dg]||Ur.axisType==="zAxis"||wi();var hg=wd[dg];return z(z({},Fr),{},ee(ee({},Ur.axisType,hg),"".concat(Ur.axisType,"Ticks"),ii(hg)))},Q),G=ce[$],re=ce["".concat($,"Ticks")],oe=w&&w[ae]&&w[ae].hasStack&&w9(R,w[ae].stackGroups),H=Hn(R.type).indexOf("Bar")>=0,Ce=Oc(G,re),ue=[],ze=D&&u9({barSize:E,stackGroups:w,totalSize:wZ(ce,$)});if(H){var Fe,gt,lr=ne(Z)?B:Z,ji=(Fe=(gt=Oc(G,re,!0))!==null&>!==void 0?gt:lr)!==null&&Fe!==void 0?Fe:0;ue=s9({barGap:I,barCategoryGap:C,bandSize:ji!==Ce?ji:Ce,sizeList:ze[F],maxBarSize:lr}),ji!==Ce&&(ue=ue.map(function(Fr){return z(z({},Fr),{},{position:z(z({},Fr.position),{},{offset:Fr.position.offset-ji/2})})}))}var bu=R&&R.type&&R.type.getComposedData;bu&&N.push({props:z(z({},bu(z(z({},ce),{},{displayedData:W,props:p,dataKey:X,item:R,bandSize:Ce,barPosition:ue,offset:x,stackedData:oe,layout:j,dataStartIndex:S,dataEndIndex:O}))),{},ee(ee(ee({key:R.key||"item-".concat(L)},M,ce[M]),$,ce[$]),"animationId",_)),childIndex:tI(R,p.children),item:R})}),N},h=function(p,m){var b=p.props,w=p.dataStartIndex,x=p.dataEndIndex,_=p.updateId;if(!V0({props:b}))return null;var S=b.children,O=b.layout,E=b.stackOffset,j=b.data,I=b.reverseStackOrder,C=$1(O),B=C.numericAxisName,A=C.cateAxisName,M=It(S,r),$=b9(j,M,"".concat(B,"Id"),"".concat(A,"Id"),E,I),D=u.reduce(function(U,X){var Z="".concat(X.axisType,"Map");return z(z({},U),{},ee({},Z,yZ(b,z(z({},X),{},{graphicalItems:M,stackGroups:X.axisType===B&&$,dataStartIndex:w,dataEndIndex:x}))))},{}),N=xZ(z(z({},D),{},{props:b,graphicalItems:M}),m==null?void 0:m.legendBBox);Object.keys(D).forEach(function(U){D[U]=f(b,D[U],N,U.replace("Map",""),n)});var R=D["".concat(A,"Map")],L=gZ(R),W=d(b,z(z({},D),{},{dataStartIndex:w,dataEndIndex:x,updateId:_,graphicalItems:M,stackGroups:$,offset:N}));return z(z({formattedGraphicalItems:W,graphicalItems:M,offset:N,stackGroups:$},L),D)},g=function(y){function p(m){var b,w,x;return eZ(this,p),x=rZ(this,p,[m]),ee(x,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ee(x,"accessibilityManager",new zQ),ee(x,"handleLegendBBoxUpdate",function(_){if(_){var S=x.state,O=S.dataStartIndex,E=S.dataEndIndex,j=S.updateId;x.setState(z({legendBBox:_},h({props:x.props,dataStartIndex:O,dataEndIndex:E,updateId:j},z(z({},x.state),{},{legendBBox:_}))))}}),ee(x,"handleReceiveSyncEvent",function(_,S,O){if(x.props.syncId===_){if(O===x.eventEmitterSymbol&&typeof x.props.syncMethod!="function")return;x.applySyncEvent(S)}}),ee(x,"handleBrushChange",function(_){var S=_.startIndex,O=_.endIndex;if(S!==x.state.dataStartIndex||O!==x.state.dataEndIndex){var E=x.state.updateId;x.setState(function(){return z({dataStartIndex:S,dataEndIndex:O},h({props:x.props,dataStartIndex:S,dataEndIndex:O,updateId:E},x.state))}),x.triggerSyncEvent({dataStartIndex:S,dataEndIndex:O})}}),ee(x,"handleMouseEnter",function(_){var S=x.getMouseInfo(_);if(S){var O=z(z({},S),{},{isTooltipActive:!0});x.setState(O),x.triggerSyncEvent(O);var E=x.props.onMouseEnter;te(E)&&E(O,_)}}),ee(x,"triggeredAfterMouseMove",function(_){var S=x.getMouseInfo(_),O=S?z(z({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};x.setState(O),x.triggerSyncEvent(O);var E=x.props.onMouseMove;te(E)&&E(O,_)}),ee(x,"handleItemMouseEnter",function(_){x.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),ee(x,"handleItemMouseLeave",function(){x.setState(function(){return{isTooltipActive:!1}})}),ee(x,"handleMouseMove",function(_){_.persist(),x.throttleTriggeredAfterMouseMove(_)}),ee(x,"handleMouseLeave",function(_){x.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};x.setState(S),x.triggerSyncEvent(S);var O=x.props.onMouseLeave;te(O)&&O(S,_)}),ee(x,"handleOuterEvent",function(_){var S=eI(_),O=Mt(x.props,"".concat(S));if(S&&te(O)){var E,j;/.*touch.*/i.test(S)?j=x.getMouseInfo(_.changedTouches[0]):j=x.getMouseInfo(_),O((E=j)!==null&&E!==void 0?E:{},_)}}),ee(x,"handleClick",function(_){var S=x.getMouseInfo(_);if(S){var O=z(z({},S),{},{isTooltipActive:!0});x.setState(O),x.triggerSyncEvent(O);var E=x.props.onClick;te(E)&&E(O,_)}}),ee(x,"handleMouseDown",function(_){var S=x.props.onMouseDown;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleMouseUp",function(_){var S=x.props.onMouseUp;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),ee(x,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.handleMouseDown(_.changedTouches[0])}),ee(x,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&x.handleMouseUp(_.changedTouches[0])}),ee(x,"handleDoubleClick",function(_){var S=x.props.onDoubleClick;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"handleContextMenu",function(_){var S=x.props.onContextMenu;if(te(S)){var O=x.getMouseInfo(_);S(O,_)}}),ee(x,"triggerSyncEvent",function(_){x.props.syncId!==void 0&&wh.emit(_h,x.props.syncId,_,x.eventEmitterSymbol)}),ee(x,"applySyncEvent",function(_){var S=x.props,O=S.layout,E=S.syncMethod,j=x.state.updateId,I=_.dataStartIndex,C=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)x.setState(z({dataStartIndex:I,dataEndIndex:C},h({props:x.props,dataStartIndex:I,dataEndIndex:C,updateId:j},x.state)));else if(_.activeTooltipIndex!==void 0){var B=_.chartX,A=_.chartY,M=_.activeTooltipIndex,$=x.state,D=$.offset,N=$.tooltipTicks;if(!D)return;if(typeof E=="function")M=E(N,_);else if(E==="value"){M=-1;for(var R=0;R<N.length;R++)if(N[R].value===_.activeLabel){M=R;break}}var L=z(z({},D),{},{x:D.left,y:D.top}),W=Math.min(B,L.x+L.width),U=Math.min(A,L.y+L.height),X=N[M]&&N[M].value,Z=Jv(x.state,x.props.data,M),ae=N[M]?{x:O==="horizontal"?N[M].coordinate:W,y:O==="horizontal"?U:N[M].coordinate}:QE;x.setState(z(z({},_),{},{activeLabel:X,activeCoordinate:ae,activePayload:Z,activeTooltipIndex:M}))}else x.setState(_)}),ee(x,"renderCursor",function(_){var S,O=x.state,E=O.isTooltipActive,j=O.activeCoordinate,I=O.activePayload,C=O.offset,B=O.activeTooltipIndex,A=O.tooltipAxisBandSize,M=x.getTooltipEventType(),$=(S=_.props.active)!==null&&S!==void 0?S:E,D=x.props.layout,N=_.key||"_recharts-cursor";return k.createElement(GQ,{key:N,activeCoordinate:j,activePayload:I,activeTooltipIndex:B,chartName:n,element:_,isActive:$,layout:D,offset:C,tooltipAxisBandSize:A,tooltipEventType:M})}),ee(x,"renderPolarAxis",function(_,S,O){var E=Mt(_,"type.axisType"),j=Mt(x.state,"".concat(E,"Map")),I=_.type.defaultProps,C=I!==void 0?z(z({},I),_.props):_.props,B=j&&j[C["".concat(E,"Id")]];return T.cloneElement(_,z(z({},B),{},{className:ie(E,B.className),key:_.key||"".concat(S,"-").concat(O),ticks:ii(B,!0)}))}),ee(x,"renderPolarGrid",function(_){var S=_.props,O=S.radialLines,E=S.polarAngles,j=S.polarRadius,I=x.state,C=I.radiusAxisMap,B=I.angleAxisMap,A=Ii(C),M=Ii(B),$=M.cx,D=M.cy,N=M.innerRadius,R=M.outerRadius;return T.cloneElement(_,{polarAngles:Array.isArray(E)?E:ii(M,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(j)?j:ii(A,!0).map(function(L){return L.coordinate}),cx:$,cy:D,innerRadius:N,outerRadius:R,key:_.key||"polar-grid",radialLines:O})}),ee(x,"renderLegend",function(){var _=x.state.formattedGraphicalItems,S=x.props,O=S.children,E=S.width,j=S.height,I=x.props.margin||{},C=E-(I.left||0)-(I.right||0),B=jA({children:O,formattedGraphicalItems:_,legendWidth:C,legendContent:s});if(!B)return null;var A=B.item,M=O1(B,XQ);return T.cloneElement(A,z(z({},M),{},{chartWidth:E,chartHeight:j,margin:I,onBBoxUpdate:x.handleLegendBBoxUpdate}))}),ee(x,"renderTooltip",function(){var _,S=x.props,O=S.children,E=S.accessibilityLayer,j=Tt(O,bn);if(!j)return null;var I=x.state,C=I.isTooltipActive,B=I.activeCoordinate,A=I.activePayload,M=I.activeLabel,$=I.offset,D=(_=j.props.active)!==null&&_!==void 0?_:C;return T.cloneElement(j,{viewBox:z(z({},$),{},{x:$.left,y:$.top}),active:D,label:M,payload:D?A:[],coordinate:B,accessibilityLayer:E})}),ee(x,"renderBrush",function(_){var S=x.props,O=S.margin,E=S.data,j=x.state,I=j.offset,C=j.dataStartIndex,B=j.dataEndIndex,A=j.updateId;return T.cloneElement(_,{key:_.key||"_recharts-brush",onChange:Xu(x.handleBrushChange,_.props.onChange),data:E,x:K(_.props.x)?_.props.x:I.left,y:K(_.props.y)?_.props.y:I.top+I.height+I.brushBottom-(O.bottom||0),width:K(_.props.width)?_.props.width:I.width,startIndex:C,endIndex:B,updateId:"brush-".concat(A)})}),ee(x,"renderReferenceElement",function(_,S,O){if(!_)return null;var E=x,j=E.clipPathId,I=x.state,C=I.xAxisMap,B=I.yAxisMap,A=I.offset,M=_.type.defaultProps||{},$=_.props,D=$.xAxisId,N=D===void 0?M.xAxisId:D,R=$.yAxisId,L=R===void 0?M.yAxisId:R;return T.cloneElement(_,{key:_.key||"".concat(S,"-").concat(O),xAxis:C[N],yAxis:B[L],viewBox:{x:A.left,y:A.top,width:A.width,height:A.height},clipPathId:j})}),ee(x,"renderActivePoints",function(_){var S=_.item,O=_.activePoint,E=_.basePoint,j=_.childIndex,I=_.isRange,C=[],B=S.props.key,A=S.item.type.defaultProps!==void 0?z(z({},S.item.type.defaultProps),S.item.props):S.item.props,M=A.activeDot,$=A.dataKey,D=z(z({index:j,dataKey:$,cx:O.x,cy:O.y,r:4,fill:Qy(S.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},J(M,!1)),Ys(M));return C.push(p.renderActiveDot(M,D,"".concat(B,"-activePoint-").concat(j))),E?C.push(p.renderActiveDot(M,z(z({},D),{},{cx:E.x,cy:E.y}),"".concat(B,"-basePoint-").concat(j))):I&&C.push(null),C}),ee(x,"renderGraphicChild",function(_,S,O){var E=x.filterFormatItem(_,S,O);if(!E)return null;var j=x.getTooltipEventType(),I=x.state,C=I.isTooltipActive,B=I.tooltipAxis,A=I.activeTooltipIndex,M=I.activeLabel,$=x.props.children,D=Tt($,bn),N=E.props,R=N.points,L=N.isRange,W=N.baseLine,U=E.item.type.defaultProps!==void 0?z(z({},E.item.type.defaultProps),E.item.props):E.item.props,X=U.activeDot,Z=U.hide,ae=U.activeBar,F=U.activeShape,Q=!!(!Z&&C&&D&&(X||ae||F)),ce={};j!=="axis"&&D&&D.props.trigger==="click"?ce={onClick:Xu(x.handleItemMouseEnter,_.props.onClick)}:j!=="axis"&&(ce={onMouseLeave:Xu(x.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:Xu(x.handleItemMouseEnter,_.props.onMouseEnter)});var G=T.cloneElement(_,z(z({},E.props),ce));function re(Ur){return typeof B.dataKey=="function"?B.dataKey(Ur.payload):null}if(Q)if(A>=0){var oe,H;if(B.dataKey&&!B.allowDuplicatedCategory){var Ce=typeof B.dataKey=="function"?re:"payload.".concat(B.dataKey.toString());oe=qs(R,Ce,M),H=L&&W&&qs(W,Ce,M)}else oe=R==null?void 0:R[A],H=L&&W&&W[A];if(F||ae){var ue=_.props.activeIndex!==void 0?_.props.activeIndex:A;return[T.cloneElement(_,z(z(z({},E.props),ce),{},{activeIndex:ue})),null,null]}if(!ne(oe))return[G].concat(Ua(x.renderActivePoints({item:E,activePoint:oe,basePoint:H,childIndex:A,isRange:L})))}else{var ze,Fe=(ze=x.getItemByXY(x.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:G},gt=Fe.graphicalItem,lr=gt.item,ji=lr===void 0?_:lr,bu=gt.childIndex,Fr=z(z(z({},E.props),ce),{},{activeIndex:bu});return[T.cloneElement(ji,Fr),null,null]}return L?[G,null,null]:[G,null]}),ee(x,"renderCustomized",function(_,S,O){return T.cloneElement(_,z(z({key:"recharts-customized-".concat(O)},x.props),x.state))}),ee(x,"renderMap",{CartesianGrid:{handler:Ju,once:!0},ReferenceArea:{handler:x.renderReferenceElement},ReferenceLine:{handler:Ju},ReferenceDot:{handler:x.renderReferenceElement},XAxis:{handler:Ju},YAxis:{handler:Ju},Brush:{handler:x.renderBrush,once:!0},Bar:{handler:x.renderGraphicChild},Line:{handler:x.renderGraphicChild},Area:{handler:x.renderGraphicChild},Radar:{handler:x.renderGraphicChild},RadialBar:{handler:x.renderGraphicChild},Scatter:{handler:x.renderGraphicChild},Pie:{handler:x.renderGraphicChild},Funnel:{handler:x.renderGraphicChild},Tooltip:{handler:x.renderCursor,once:!0},PolarGrid:{handler:x.renderPolarGrid,once:!0},PolarAngleAxis:{handler:x.renderPolarAxis},PolarRadiusAxis:{handler:x.renderPolarAxis},Customized:{handler:x.renderCustomized}}),x.clipPathId="".concat((b=m.id)!==null&&b!==void 0?b:to("recharts"),"-clip"),x.throttleTriggeredAfterMouseMove=AP(x.triggeredAfterMouseMove,(w=m.throttleDelay)!==null&&w!==void 0?w:1e3/60),x.state={},x}return oZ(p,y),nZ(p,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,x=b.data,_=b.height,S=b.layout,O=Tt(w,bn);if(O){var E=O.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var j=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,I=Jv(this.state,x,E,j),C=this.state.tooltipTicks[E].coordinate,B=(this.state.offset.top+_)/2,A=S==="horizontal",M=A?{x:C,y:B}:{y:C,x:B},$=this.state.formattedGraphicalItems.find(function(N){var R=N.item;return R.type.name==="Scatter"});$&&(M=z(z({},M),$.props.points[E].tooltipPosition),I=$.props.points[E].tooltipPayload);var D={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:j,activePayload:I,activeCoordinate:M};this.setState(D),this.renderCursor(O),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var x,_;this.accessibilityManager.setDetails({offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(b){Ep([Tt(b.children,bn)],[Tt(this.props.children,bn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Tt(this.props.children,bn);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,x=w.getBoundingClientRect(),_=$8(x),S={chartX:Math.round(b.pageX-_.left),chartY:Math.round(b.pageY-_.top)},O=x.width/w.offsetWidth||1,E=this.inRange(S.chartX,S.chartY,O);if(!E)return null;var j=this.state,I=j.xAxisMap,C=j.yAxisMap,B=this.getTooltipEventType(),A=A1(this.state,this.props.data,this.props.layout,E);if(B!=="axis"&&I&&C){var M=Ii(I).scale,$=Ii(C).scale,D=M&&M.invert?M.invert(S.chartX):null,N=$&&$.invert?$.invert(S.chartY):null;return z(z({},S),{},{xValue:D,yValue:N},A)}return A?z(z({},S),A):null}},{key:"inRange",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=b/x,O=w/x;if(_==="horizontal"||_==="vertical"){var E=this.state.offset,j=S>=E.left&&S<=E.left+E.width&&O>=E.top&&O<=E.top+E.height;return j?{x:S,y:O}:null}var I=this.state,C=I.angleAxisMap,B=I.radiusAxisMap;if(C&&B){var A=Ii(C);return nw({x:S,y:O},A)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),x=Tt(b,bn),_={};x&&w==="axis"&&(x.props.trigger==="click"?_={onClick:this.handleClick}:_={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Ys(this.props,this.handleOuterEvent);return z(z({},S),_)}},{key:"addListener",value:function(){wh.on(_h,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){wh.removeListener(_h,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,x){for(var _=this.state.formattedGraphicalItems,S=0,O=_.length;S<O;S++){var E=_[S];if(E.item===b||E.props.key===b.key||w===Hn(E.item.type)&&x===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,x=w.left,_=w.top,S=w.height,O=w.width;return k.createElement("defs",null,k.createElement("clipPath",{id:b},k.createElement("rect",{x,y:_,height:S,width:O})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,x){var _=S1(x,2),S=_[0],O=_[1];return z(z({},w),{},ee({},S,O.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,x){var _=S1(x,2),S=_[0],O=_[1];return z(z({},w),{},ee({},S,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,x=w.formattedGraphicalItems,_=w.activeItem;if(x&&x.length)for(var S=0,O=x.length;S<O;S++){var E=x[S],j=E.props,I=E.item,C=I.type.defaultProps!==void 0?z(z({},I.type.defaultProps),I.props):I.props,B=Hn(I.type);if(B==="Bar"){var A=(j.data||[]).find(function(N){return wK(b,N)});if(A)return{graphicalItem:E,payload:A}}else if(B==="RadialBar"){var M=(j.data||[]).find(function(N){return nw(b,N)});if(M)return{graphicalItem:E,payload:M}}else if(ld(E,_)||ud(E,_)||Vl(E,_)){var $=sX({graphicalItem:E,activeTooltipItem:_,itemData:C.data}),D=C.activeIndex===void 0?$:C.activeIndex;return{graphicalItem:z(z({},E),{},{childIndex:D}),payload:Vl(E,_)?C.data[$]:E.props.data[$]}}}return null}},{key:"render",value:function(){var b=this;if(!V0(this))return null;var w=this.props,x=w.children,_=w.className,S=w.width,O=w.height,E=w.style,j=w.compact,I=w.title,C=w.desc,B=O1(w,qQ),A=J(B,!1);if(j)return k.createElement(l1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement(Tp,Zi({},A,{width:S,height:O,title:I,desc:C}),this.renderClipPath(),G0(x,this.renderMap)));if(this.props.accessibilityLayer){var M,$;A.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,A.role=($=this.props.role)!==null&&$!==void 0?$:"application",A.onKeyDown=function(N){b.accessibilityManager.keyboardEvent(N)},A.onFocus=function(){b.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return k.createElement(l1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement("div",Zi({className:ie("recharts-wrapper",_),style:z({position:"relative",cursor:"default",width:S,height:O},E)},D,{ref:function(R){b.container=R}}),k.createElement(Tp,Zi({},A,{width:S,height:O,title:I,desc:C,style:dZ}),this.renderClipPath(),G0(x,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);ee(g,"displayName",n),ee(g,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),ee(g,"getDerivedStateFromProps",function(y,p){var m=y.dataKey,b=y.data,w=y.children,x=y.width,_=y.height,S=y.layout,O=y.stackOffset,E=y.margin,j=p.dataStartIndex,I=p.dataEndIndex;if(p.updateId===void 0){var C=E1(y);return z(z(z({},C),{},{updateId:0},h(z(z({props:y},C),{},{updateId:0}),p)),{},{prevDataKey:m,prevData:b,prevWidth:x,prevHeight:_,prevLayout:S,prevStackOffset:O,prevMargin:E,prevChildren:w})}if(m!==p.prevDataKey||b!==p.prevData||x!==p.prevWidth||_!==p.prevHeight||S!==p.prevLayout||O!==p.prevStackOffset||!aa(E,p.prevMargin)){var B=E1(y),A={chartX:p.chartX,chartY:p.chartY,isTooltipActive:p.isTooltipActive},M=z(z({},A1(p,b,S)),{},{updateId:p.updateId+1}),$=z(z(z({},B),A),M);return z(z(z({},$),h(z({props:y},$),p)),{},{prevDataKey:m,prevData:b,prevWidth:x,prevHeight:_,prevLayout:S,prevStackOffset:O,prevMargin:E,prevChildren:w})}if(!Ep(w,p.prevChildren)){var D,N,R,L,W=Tt(w,Ca),U=W&&(D=(N=W.props)===null||N===void 0?void 0:N.startIndex)!==null&&D!==void 0?D:j,X=W&&(R=(L=W.props)===null||L===void 0?void 0:L.endIndex)!==null&&R!==void 0?R:I,Z=U!==j||X!==I,ae=!ne(b),F=ae&&!Z?p.updateId:p.updateId+1;return z(z({updateId:F},h(z(z({props:y},p),{},{updateId:F,dataStartIndex:U,dataEndIndex:X}),p)),{},{prevChildren:w,dataStartIndex:U,dataEndIndex:X})}return null}),ee(g,"renderActiveDot",function(y,p,m){var b;return T.isValidElement(y)?b=T.cloneElement(y,p):te(y)?b=y(p):b=k.createElement(nd,p),k.createElement(fe,{className:"recharts-active-dot",key:m},b)});var v=T.forwardRef(function(p,m){return k.createElement(g,Zi({},p,{ref:m}))});return v.displayName=g.displayName,v},_Z=JE({chartName:"LineChart",GraphicalChild:mu,axisComponents:[{axisType:"xAxis",AxisComp:rg},{axisType:"yAxis",AxisComp:vd}],formatAxisMap:Wq}),SZ=JE({chartName:"PieChart",GraphicalChild:or,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:od},{axisType:"radiusAxis",AxisComp:id}],formatAxisMap:k9,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function OZ(e){const[t,n]=T.useState("");return T.useEffect(()=>{if(!e)return;function r(){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);a<60?n(`${a}s ago`):a<3600?n(`${Math.floor(a/60)}m ago`):n(`${Math.floor(a/3600)}h ago`)}r();const i=setInterval(r,1e4);return()=>clearInterval(i)},[e]),t}function Oh(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const PZ={critical:"#ef4444",high:"#f97316",medium:"#eab308",low:"#22c55e"};function AZ(){const e=li(wn.overview),t=li(wn.status),n=li(wn.tokens),[r,i]=T.useState(!1),[a,o]=T.useState(),l=OZ(a);T.useEffect(()=>{t.status==="success"&&o(t.data.lastIndexed)},[t]);async function u(){i(!0);try{const d=await wn.refresh();d.ok&&(o(d.lastIndexed),window.location.reload())}finally{i(!1)}}if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{data:s}=e,f=Object.entries(s.risk).map(([d,h])=>({name:d,value:h})),c=P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Overview"}),P.jsxs("div",{className:"flex items-center gap-3",children:[l&&P.jsxs("span",{className:"text-white/30 text-xs",children:["indexed ",l]}),P.jsx("button",{onClick:u,disabled:r,className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-[#603dc6]/20 text-[#a78bfa] hover:bg-[#603dc6]/30 transition-colors disabled:opacity-50",children:r?"Refreshing…":"↻ Refresh"})]})]});return P.jsxs("div",{className:"space-y-8",children:[c,P.jsxs("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[P.jsx(No,{to:"/graph",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Files",value:s.totalFiles})}),P.jsx(No,{to:"/graph",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Edges",value:s.totalEdges})}),P.jsx(No,{to:"/communities",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Communities",value:s.totalCommunities})}),P.jsx(No,{to:"/risk",className:"cursor-pointer rounded-xl hover:ring-1 hover:ring-[#603dc6]/40",children:P.jsx(Lu,{label:"Git history",value:s.gitEnabled?"enabled":"disabled"})})]}),P.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Risk breakdown"}),P.jsxs("div",{className:"flex items-center gap-6",children:[P.jsx(EP,{width:140,height:140,children:P.jsxs(SZ,{style:{background:"transparent"},children:[P.jsx(or,{data:f,dataKey:"value",cx:"50%",cy:"50%",innerRadius:40,outerRadius:60,children:f.map(d=>P.jsx(Hf,{fill:PZ[d.name]??"#ccc"},d.name))}),P.jsx(bn,{contentStyle:{background:"#1e1d2a",border:"1px solid rgba(255,255,255,0.10)",borderRadius:"0.625rem",color:"#fafafa"}})]})}),P.jsx("div",{className:"space-y-2",children:f.map(({name:d,value:h})=>P.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[P.jsx(fO,{level:d}),P.jsxs("span",{className:"text-white/70",children:[h," files"]})]},d))})]})]}),n.status==="success"&&P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Token consumption"}),P.jsxs("div",{className:"flex flex-col gap-4",children:[P.jsxs("div",{className:"flex items-end justify-between",children:[P.jsxs("div",{children:[P.jsx("p",{className:"text-white/50 text-xs mb-1",children:"Actual tokens used (with skeletonization)"}),P.jsx("p",{className:"text-white text-3xl font-semibold",children:Oh(n.data.skeletonTokens)})]}),P.jsxs("div",{className:"text-right",children:[P.jsx("p",{className:"text-white/50 text-xs mb-1",children:"Would have been (full files)"}),P.jsx("p",{className:"text-white/60 text-3xl font-semibold line-through decoration-white/30",children:Oh(n.data.fullTokens)})]})]}),P.jsxs("div",{children:[P.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[P.jsxs("span",{className:"text-white/40 text-xs",children:[Oh(n.data.savedTokens)," tokens saved"]}),P.jsxs("span",{className:"text-[#a78bfa] text-sm font-semibold",children:[n.data.reductionPercent,"% reduction"]})]}),P.jsx("div",{className:"w-full bg-white/10 rounded-full h-2",children:P.jsx("div",{className:"bg-[#603dc6] h-2 rounded-full transition-all",style:{width:`${n.data.reductionPercent}%`}})}),P.jsxs("div",{className:"flex justify-between mt-1",children:[P.jsx("span",{className:"text-white/20 text-xs",children:"0"}),P.jsx("span",{className:"text-white/20 text-xs",children:"100%"})]})]})]})]}),P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/50 text-xs uppercase tracking-wider mb-4",children:"Top architectural hubs"}),P.jsx("ul",{className:"space-y-2",children:s.topHubs.slice(0,8).map(d=>P.jsxs("li",{className:"flex items-center justify-between text-sm",children:[P.jsx("span",{className:"truncate text-white/80 max-w-[60%]",title:d.file,children:d.file.split("/").pop()}),P.jsxs("span",{className:"text-white/40 text-xs",children:["↑",d.inDegree," ↓",d.outDegree]})]},d.file))})]})]})]})}var EZ={value:()=>{}};function yu(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bs(n)}function bs(e){this._=e}function $Z(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bs.prototype=yu.prototype={constructor:bs,on:function(e,t){var n=this._,r=$Z(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=TZ(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=T1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=T1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function TZ(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function T1(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=EZ,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var em="http://www.w3.org/1999/xhtml";const j1={svg:"http://www.w3.org/2000/svg",xhtml:em,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yd(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),j1.hasOwnProperty(t)?{space:j1[t],local:e}:e}function jZ(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===em&&t.documentElement.namespaceURI===em?t.createElement(e):t.createElementNS(n,e)}}function kZ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function e$(e){var t=yd(e);return(t.local?kZ:jZ)(t)}function CZ(){}function ig(e){return e==null?CZ:function(){return this.querySelector(e)}}function NZ(e){typeof e!="function"&&(e=ig(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),u,s,f=0;f<o;++f)(u=a[f])&&(s=e.call(u,u.__data__,f,a))&&("__data__"in u&&(s.__data__=u.__data__),l[f]=s);return new Rt(r,this._parents)}function MZ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function IZ(){return[]}function t$(e){return e==null?IZ:function(){return this.querySelectorAll(e)}}function DZ(e){return function(){return MZ(e.apply(this,arguments))}}function RZ(e){typeof e=="function"?e=DZ(e):e=t$(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,u,s=0;s<l;++s)(u=o[s])&&(r.push(e.call(u,u.__data__,s,o)),i.push(u));return new Rt(r,i)}function n$(e){return function(){return this.matches(e)}}function r$(e){return function(t){return t.matches(e)}}var LZ=Array.prototype.find;function BZ(e){return function(){return LZ.call(this.children,e)}}function zZ(){return this.firstElementChild}function FZ(e){return this.select(e==null?zZ:BZ(typeof e=="function"?e:r$(e)))}var UZ=Array.prototype.filter;function WZ(){return Array.from(this.children)}function HZ(e){return function(){return UZ.call(this.children,e)}}function VZ(e){return this.selectAll(e==null?WZ:HZ(typeof e=="function"?e:r$(e)))}function KZ(e){typeof e!="function"&&(e=n$(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,s=0;s<o;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&l.push(u);return new Rt(r,this._parents)}function i$(e){return new Array(e.length)}function GZ(){return new Rt(this._enter||this._groups.map(i$),this._parents)}function Zc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zc.prototype={constructor:Zc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function XZ(e){return function(){return e}}function qZ(e,t,n,r,i,a){for(var o=0,l,u=t.length,s=a.length;o<s;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new Zc(e,a[o]);for(;o<u;++o)(l=t[o])&&(i[o]=l)}function YZ(e,t,n,r,i,a,o){var l,u,s=new Map,f=t.length,c=a.length,d=new Array(f),h;for(l=0;l<f;++l)(u=t[l])&&(d[l]=h=o.call(u,u.__data__,l,t)+"",s.has(h)?i[l]=u:s.set(h,u));for(l=0;l<c;++l)h=o.call(e,a[l],l,a)+"",(u=s.get(h))?(r[l]=u,u.__data__=a[l],s.delete(h)):n[l]=new Zc(e,a[l]);for(l=0;l<f;++l)(u=t[l])&&s.get(d[l])===u&&(i[l]=u)}function QZ(e){return e.__data__}function ZZ(e,t){if(!arguments.length)return Array.from(this,QZ);var n=t?YZ:qZ,r=this._parents,i=this._groups;typeof e!="function"&&(e=XZ(e));for(var a=i.length,o=new Array(a),l=new Array(a),u=new Array(a),s=0;s<a;++s){var f=r[s],c=i[s],d=c.length,h=JZ(e.call(f,f&&f.__data__,s,r)),g=h.length,v=l[s]=new Array(g),y=o[s]=new Array(g),p=u[s]=new Array(d);n(f,c,v,y,p,h,t);for(var m=0,b=0,w,x;m<g;++m)if(w=v[m]){for(m>=b&&(b=m+1);!(x=y[b])&&++b<g;);w._next=x||null}}return o=new Rt(o,r),o._enter=l,o._exit=u,o}function JZ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eJ(){return new Rt(this._exit||this._groups.map(i$),this._parents)}function tJ(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function nJ(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),u=0;u<o;++u)for(var s=n[u],f=r[u],c=s.length,d=l[u]=new Array(c),h,g=0;g<c;++g)(h=s[g]||f[g])&&(d[g]=h);for(;u<i;++u)l[u]=n[u];return new Rt(l,this._parents)}function rJ(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function iJ(e){e||(e=aJ);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,u=i[a]=new Array(l),s,f=0;f<l;++f)(s=o[f])&&(u[f]=s);u.sort(t)}return new Rt(i,this._parents).order()}function aJ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function oJ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lJ(){return Array.from(this)}function uJ(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function sJ(){let e=0;for(const t of this)++e;return e}function cJ(){return!this.node()}function fJ(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function dJ(e){return function(){this.removeAttribute(e)}}function hJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pJ(e,t){return function(){this.setAttribute(e,t)}}function vJ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mJ(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function yJ(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function gJ(e,t){var n=yd(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?hJ:dJ:typeof t=="function"?n.local?yJ:mJ:n.local?vJ:pJ)(n,t))}function a$(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bJ(e){return function(){this.style.removeProperty(e)}}function xJ(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wJ(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function _J(e,t,n){return arguments.length>1?this.each((t==null?bJ:typeof t=="function"?wJ:xJ)(e,t,n??"")):Wa(this.node(),e)}function Wa(e,t){return e.style.getPropertyValue(t)||a$(e).getComputedStyle(e,null).getPropertyValue(t)}function SJ(e){return function(){delete this[e]}}function OJ(e,t){return function(){this[e]=t}}function PJ(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function AJ(e,t){return arguments.length>1?this.each((t==null?SJ:typeof t=="function"?PJ:OJ)(e,t)):this.node()[e]}function o$(e){return e.trim().split(/^|\s+/)}function ag(e){return e.classList||new l$(e)}function l$(e){this._node=e,this._names=o$(e.getAttribute("class")||"")}l$.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function u$(e,t){for(var n=ag(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function s$(e,t){for(var n=ag(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function EJ(e){return function(){u$(this,e)}}function $J(e){return function(){s$(this,e)}}function TJ(e,t){return function(){(t.apply(this,arguments)?u$:s$)(this,e)}}function jJ(e,t){var n=o$(e+"");if(arguments.length<2){for(var r=ag(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?TJ:t?EJ:$J)(n,t))}function kJ(){this.textContent=""}function CJ(e){return function(){this.textContent=e}}function NJ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function MJ(e){return arguments.length?this.each(e==null?kJ:(typeof e=="function"?NJ:CJ)(e)):this.node().textContent}function IJ(){this.innerHTML=""}function DJ(e){return function(){this.innerHTML=e}}function RJ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function LJ(e){return arguments.length?this.each(e==null?IJ:(typeof e=="function"?RJ:DJ)(e)):this.node().innerHTML}function BJ(){this.nextSibling&&this.parentNode.appendChild(this)}function zJ(){return this.each(BJ)}function FJ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function UJ(){return this.each(FJ)}function WJ(e){var t=typeof e=="function"?e:e$(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function HJ(){return null}function VJ(e,t){var n=typeof e=="function"?e:e$(e),r=t==null?HJ:typeof t=="function"?t:ig(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function KJ(){var e=this.parentNode;e&&e.removeChild(this)}function GJ(){return this.each(KJ)}function XJ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qJ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function YJ(e){return this.select(e?qJ:XJ)}function QJ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ZJ(e){return function(t){e.call(this,t,this.__data__)}}function JJ(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function eee(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function tee(e,t,n){return function(){var r=this.__on,i,a=ZJ(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function nee(e,t,n){var r=JJ(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,s=l.length,f;u<s;++u)for(i=0,f=l[u];i<a;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=t?tee:eee,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function c$(e,t,n){var r=a$(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ree(e,t){return function(){return c$(this,e,t)}}function iee(e,t){return function(){return c$(this,e,t.apply(this,arguments))}}function aee(e,t){return this.each((typeof t=="function"?iee:ree)(e,t))}function*oee(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var f$=[null];function Rt(e,t){this._groups=e,this._parents=t}function gu(){return new Rt([[document.documentElement]],f$)}function lee(){return this}Rt.prototype=gu.prototype={constructor:Rt,select:NZ,selectAll:RZ,selectChild:FZ,selectChildren:VZ,filter:KZ,data:ZZ,enter:GZ,exit:eJ,join:tJ,merge:nJ,selection:lee,order:rJ,sort:iJ,call:oJ,nodes:lJ,node:uJ,size:sJ,empty:cJ,each:fJ,attr:gJ,style:_J,property:AJ,classed:jJ,text:MJ,html:LJ,raise:zJ,lower:UJ,append:WJ,insert:VJ,remove:GJ,clone:YJ,datum:QJ,on:nee,dispatch:aee,[Symbol.iterator]:oee};function fn(e){return typeof e=="string"?new Rt([[document.querySelector(e)]],[document.documentElement]):new Rt([[e]],f$)}function uee(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Dn(e,t){if(e=uee(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const see={passive:!1},Zl={capture:!0,passive:!1};function Ph(e){e.stopImmediatePropagation()}function sa(e){e.preventDefault(),e.stopImmediatePropagation()}function d$(e){var t=e.document.documentElement,n=fn(e).on("dragstart.drag",sa,Zl);"onselectstart"in t?n.on("selectstart.drag",sa,Zl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function h$(e,t){var n=e.document.documentElement,r=fn(e).on("dragstart.drag",null);t&&(r.on("click.drag",sa,Zl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const es=e=>()=>e;function tm(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:u,dy:s,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:f}})}tm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function cee(e){return!e.ctrlKey&&!e.button}function fee(){return this.parentNode}function dee(e,t){return t??{x:e.x,y:e.y}}function hee(){return navigator.maxTouchPoints||"ontouchstart"in this}function pee(){var e=cee,t=fee,n=dee,r=hee,i={},a=yu("start","drag","end"),o=0,l,u,s,f,c=0;function d(w){w.on("mousedown.drag",h).filter(r).on("touchstart.drag",y).on("touchmove.drag",p,see).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(w,x){if(!(f||!e.call(this,w,x))){var _=b(this,t.call(this,w,x),w,x,"mouse");_&&(fn(w.view).on("mousemove.drag",g,Zl).on("mouseup.drag",v,Zl),d$(w.view),Ph(w),s=!1,l=w.clientX,u=w.clientY,_("start",w))}}function g(w){if(sa(w),!s){var x=w.clientX-l,_=w.clientY-u;s=x*x+_*_>c}i.mouse("drag",w)}function v(w){fn(w.view).on("mousemove.drag mouseup.drag",null),h$(w.view,s),sa(w),i.mouse("end",w)}function y(w,x){if(e.call(this,w,x)){var _=w.changedTouches,S=t.call(this,w,x),O=_.length,E,j;for(E=0;E<O;++E)(j=b(this,S,w,x,_[E].identifier,_[E]))&&(Ph(w),j("start",w,_[E]))}}function p(w){var x=w.changedTouches,_=x.length,S,O;for(S=0;S<_;++S)(O=i[x[S].identifier])&&(sa(w),O("drag",w,x[S]))}function m(w){var x=w.changedTouches,_=x.length,S,O;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),S=0;S<_;++S)(O=i[x[S].identifier])&&(Ph(w),O("end",w,x[S]))}function b(w,x,_,S,O,E){var j=a.copy(),I=Dn(E||_,x),C,B,A;if((A=n.call(w,new tm("beforestart",{sourceEvent:_,target:d,identifier:O,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:j}),S))!=null)return C=A.x-I[0]||0,B=A.y-I[1]||0,function M($,D,N){var R=I,L;switch($){case"start":i[O]=M,L=o++;break;case"end":delete i[O],--o;case"drag":I=Dn(N||D,x),L=o;break}j.call($,w,new tm($,{sourceEvent:D,subject:A,target:d,identifier:O,active:L,x:I[0]+C,y:I[1]+B,dx:I[0]-R[0],dy:I[1]-R[1],dispatch:j}),S)}}return d.filter=function(w){return arguments.length?(e=typeof w=="function"?w:es(!!w),d):e},d.container=function(w){return arguments.length?(t=typeof w=="function"?w:es(w),d):t},d.subject=function(w){return arguments.length?(n=typeof w=="function"?w:es(w),d):n},d.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:es(!!w),d):r},d.on=function(){var w=a.on.apply(a,arguments);return w===a?d:w},d.clickDistance=function(w){return arguments.length?(c=(w=+w)*w,d):Math.sqrt(c)},d}var Ha=0,Io=0,Eo=0,p$=1e3,Jc,Do,ef=0,_i=0,gd=0,Jl=typeof performance=="object"&&performance.now?performance:Date,v$=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function og(){return _i||(v$(vee),_i=Jl.now()+gd)}function vee(){_i=0}function tf(){this._call=this._time=this._next=null}tf.prototype=lg.prototype={constructor:tf,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?og():+n)+(t==null?0:+t),!this._next&&Do!==this&&(Do?Do._next=this:Jc=this,Do=this),this._call=e,this._time=n,nm()},stop:function(){this._call&&(this._call=null,this._time=1/0,nm())}};function lg(e,t,n){var r=new tf;return r.restart(e,t,n),r}function mee(){og(),++Ha;for(var e=Jc,t;e;)(t=_i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ha}function k1(){_i=(ef=Jl.now())+gd,Ha=Io=0;try{mee()}finally{Ha=0,gee(),_i=0}}function yee(){var e=Jl.now(),t=e-ef;t>p$&&(gd-=t,ef=e)}function gee(){for(var e,t=Jc,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jc=n);Do=e,nm(r)}function nm(e){if(!Ha){Io&&(Io=clearTimeout(Io));var t=e-_i;t>24?(e<1/0&&(Io=setTimeout(k1,e-Jl.now()-gd)),Eo&&(Eo=clearInterval(Eo))):(Eo||(ef=Jl.now(),Eo=setInterval(yee,p$)),Ha=1,v$(k1))}}function C1(e,t,n){var r=new tf;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var bee=yu("start","end","cancel","interrupt"),xee=[],m$=0,N1=1,rm=2,xs=3,M1=4,im=5,ws=6;function bd(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;wee(e,n,{name:t,index:r,group:i,on:bee,tween:xee,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:m$})}function ug(e,t){var n=mn(e,t);if(n.state>m$)throw new Error("too late; already scheduled");return n}function jn(e,t){var n=mn(e,t);if(n.state>xs)throw new Error("too late; already running");return n}function mn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wee(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=lg(a,0,n.time);function a(s){n.state=N1,n.timer.restart(o,n.delay,n.time),n.delay<=s&&o(s-n.delay)}function o(s){var f,c,d,h;if(n.state!==N1)return u();for(f in r)if(h=r[f],h.name===n.name){if(h.state===xs)return C1(o);h.state===M1?(h.state=ws,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+f<t&&(h.state=ws,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[f])}if(C1(function(){n.state===xs&&(n.state=M1,n.timer.restart(l,n.delay,n.time),l(s))}),n.state=rm,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rm){for(n.state=xs,i=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(h=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(i[++c]=h);i.length=c+1}}function l(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(u),n.state=im,1),c=-1,d=i.length;++c<d;)i[c].call(e,f);n.state===im&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ws,n.timer.stop(),delete r[t];for(var s in r)return;delete e.__transition}}function _s(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>rm&&r.state<im,r.state=ws,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function _ee(e){return this.each(function(){_s(this,e)})}function See(e,t){var n,r;return function(){var i=jn(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Oee(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=jn(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function Pee(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mn(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?See:Oee)(n,e,t))}function sg(e,t,n){var r=e._id;return e.each(function(){var i=jn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return mn(i,r).value[t]}}function y$(e,t){var n;return(typeof t=="number"?sn:t instanceof bi?hc:(n=bi(t))?(t=n,hc):BP)(e,t)}function Aee(e){return function(){this.removeAttribute(e)}}function Eee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $ee(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Tee(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function jee(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function kee(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function Cee(e,t){var n=yd(e),r=n==="transform"?L6:y$;return this.attrTween(e,typeof t=="function"?(n.local?kee:jee)(n,r,sg(this,"attr."+e,t)):t==null?(n.local?Eee:Aee)(n):(n.local?Tee:$ee)(n,r,t))}function Nee(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Mee(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Iee(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Mee(e,a)),n}return i._value=t,i}function Dee(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Nee(e,a)),n}return i._value=t,i}function Ree(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=yd(e);return this.tween(n,(r.local?Iee:Dee)(r,t))}function Lee(e,t){return function(){ug(this,e).delay=+t.apply(this,arguments)}}function Bee(e,t){return t=+t,function(){ug(this,e).delay=t}}function zee(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Lee:Bee)(t,e)):mn(this.node(),t).delay}function Fee(e,t){return function(){jn(this,e).duration=+t.apply(this,arguments)}}function Uee(e,t){return t=+t,function(){jn(this,e).duration=t}}function Wee(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fee:Uee)(t,e)):mn(this.node(),t).duration}function Hee(e,t){if(typeof t!="function")throw new Error;return function(){jn(this,e).ease=t}}function Vee(e){var t=this._id;return arguments.length?this.each(Hee(t,e)):mn(this.node(),t).ease}function Kee(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;jn(this,e).ease=n}}function Gee(e){if(typeof e!="function")throw new Error;return this.each(Kee(this._id,e))}function Xee(e){typeof e!="function"&&(e=n$(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,s=0;s<o;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&l.push(u);return new tr(r,this._parents,this._name,this._id)}function qee(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u=t[l],s=n[l],f=u.length,c=o[l]=new Array(f),d,h=0;h<f;++h)(d=u[h]||s[h])&&(c[h]=d);for(;l<r;++l)o[l]=t[l];return new tr(o,this._parents,this._name,this._id)}function Yee(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Qee(e,t,n){var r,i,a=Yee(t)?ug:jn;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function Zee(e,t){var n=this._id;return arguments.length<2?mn(this.node(),n).on.on(e):this.each(Qee(n,e,t))}function Jee(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ete(){return this.on("end.remove",Jee(this._id))}function tte(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ig(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],u=l.length,s=a[o]=new Array(u),f,c,d=0;d<u;++d)(f=l[d])&&(c=e.call(f,f.__data__,d,l))&&("__data__"in f&&(c.__data__=f.__data__),s[d]=c,bd(s[d],t,n,d,s,mn(f,n)));return new tr(a,this._parents,t,n)}function nte(e){var t=this._name,n=this._id;typeof e!="function"&&(e=t$(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u=r[l],s=u.length,f,c=0;c<s;++c)if(f=u[c]){for(var d=e.call(f,f.__data__,c,u),h,g=mn(f,n),v=0,y=d.length;v<y;++v)(h=d[v])&&bd(h,t,n,v,d,g);a.push(d),o.push(f)}return new tr(a,o,t,n)}var rte=gu.prototype.constructor;function ite(){return new rte(this._groups,this._parents)}function ate(e,t){var n,r,i;return function(){var a=Wa(this,e),o=(this.style.removeProperty(e),Wa(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function g$(e){return function(){this.style.removeProperty(e)}}function ote(e,t,n){var r,i=n+"",a;return function(){var o=Wa(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function lte(e,t,n){var r,i,a;return function(){var o=Wa(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Wa(this,e))),o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l))}}function ute(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var u=jn(this,e),s=u.on,f=u.value[a]==null?l||(l=g$(t)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(o,i=f),u.on=r}}function ste(e,t,n){var r=(e+="")=="transform"?R6:y$;return t==null?this.styleTween(e,ate(e,r)).on("end.style."+e,g$(e)):typeof t=="function"?this.styleTween(e,lte(e,r,sg(this,"style."+e,t))).each(ute(this._id,e)):this.styleTween(e,ote(e,r,t),n).on("end.style."+e,null)}function cte(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fte(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&cte(e,o,n)),r}return a._value=t,a}function dte(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,fte(e,t,n??""))}function hte(e){return function(){this.textContent=e}}function pte(e){return function(){var t=e(this);this.textContent=t??""}}function vte(e){return this.tween("text",typeof e=="function"?pte(sg(this,"text",e)):hte(e==null?"":e+""))}function mte(e){return function(t){this.textContent=e.call(this,t)}}function yte(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&mte(i)),t}return r._value=e,r}function gte(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,yte(e))}function bte(){for(var e=this._name,t=this._id,n=b$(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,s=0;s<l;++s)if(u=o[s]){var f=mn(u,t);bd(u,e,n,s,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new tr(r,this._parents,e,n)}function xte(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},u={value:function(){--i===0&&a()}};n.each(function(){var s=jn(this,r),f=s.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),s.on=t}),i===0&&a()})}var wte=0;function tr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function b$(){return++wte}var Cn=gu.prototype;tr.prototype={constructor:tr,select:tte,selectAll:nte,selectChild:Cn.selectChild,selectChildren:Cn.selectChildren,filter:Xee,merge:qee,selection:ite,transition:bte,call:Cn.call,nodes:Cn.nodes,node:Cn.node,size:Cn.size,empty:Cn.empty,each:Cn.each,on:Zee,attr:Cee,attrTween:Ree,style:ste,styleTween:dte,text:vte,textTween:gte,remove:ete,tween:Pee,delay:zee,duration:Wee,ease:Vee,easeVarying:Gee,end:xte,[Symbol.iterator]:Cn[Symbol.iterator]};function _te(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ste={time:null,delay:0,duration:250,ease:_te};function Ote(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Pte(e){var t,n;e instanceof tr?(t=e._id,e=e._name):(t=b$(),(n=Ste).time=og(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,s=0;s<l;++s)(u=o[s])&&bd(u,e,t,s,o,n||Ote(u,t));return new tr(r,this._parents,e,t)}gu.prototype.interrupt=_ee;gu.prototype.transition=Pte;function Ate(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=n.length,l,u=0,s=0;for(a=0;a<o;++a)l=n[a],u+=l.x,s+=l.y;for(u=(u/o-e)*r,s=(s/o-t)*r,a=0;a<o;++a)l=n[a],l.x-=u,l.y-=s}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(e=+a,i):e},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Ete(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return x$(this.cover(t,n),t,n,e)}function x$(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},l=e._x0,u=e._y0,s=e._x1,f=e._y1,c,d,h,g,v,y,p,m;if(!a)return e._root=o,e;for(;a.length;)if((v=t>=(c=(l+s)/2))?l=c:s=c,(y=n>=(d=(u+f)/2))?u=d:f=d,i=a,!(a=a[p=y<<1|v]))return i[p]=o,e;if(h=+e._x.call(null,a.data),g=+e._y.call(null,a.data),t===h&&n===g)return o.next=a,i?i[p]=o:e._root=o,e;do i=i?i[p]=new Array(4):e._root=new Array(4),(v=t>=(c=(l+s)/2))?l=c:s=c,(y=n>=(d=(u+f)/2))?u=d:f=d;while((p=y<<1|v)===(m=(g>=d)<<1|h>=c));return i[m]=a,i[p]=o,e}function $te(e){var t,n,r=e.length,i,a,o=new Array(r),l=new Array(r),u=1/0,s=1/0,f=-1/0,c=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,l[n]=a,i<u&&(u=i),i>f&&(f=i),a<s&&(s=a),a>c&&(c=a));if(u>f||s>c)return this;for(this.cover(u,s).cover(f,c),n=0;n<r;++n)x$(this,o[n],l[n],e[n]);return this}function Tte(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,l=this._root,u,s;n>e||e>=i||r>t||t>=a;)switch(s=(t<r)<<1|e<n,u=new Array(4),u[s]=l,l=u,o*=2,s){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function jte(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function kte(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ct(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Cte(e,t,n){var r,i=this._x0,a=this._y0,o,l,u,s,f=this._x1,c=this._y1,d=[],h=this._root,g,v;for(h&&d.push(new ct(h,i,a,f,c)),n==null?n=1/0:(i=e-n,a=t-n,f=e+n,c=t+n,n*=n);g=d.pop();)if(!(!(h=g.node)||(o=g.x0)>f||(l=g.y0)>c||(u=g.x1)<i||(s=g.y1)<a))if(h.length){var y=(o+u)/2,p=(l+s)/2;d.push(new ct(h[3],y,p,u,s),new ct(h[2],o,p,y,s),new ct(h[1],y,l,u,p),new ct(h[0],o,l,y,p)),(v=(t>=p)<<1|e>=y)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=g)}else{var m=e-+this._x.call(null,h.data),b=t-+this._y.call(null,h.data),w=m*m+b*b;if(w<n){var x=Math.sqrt(n=w);i=e-x,a=t-x,f=e+x,c=t+x,r=h.data}}return r}function Nte(e){if(isNaN(f=+this._x.call(null,e))||isNaN(c=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,l=this._y0,u=this._x1,s=this._y1,f,c,d,h,g,v,y,p;if(!n)return this;if(n.length)for(;;){if((g=f>=(d=(o+u)/2))?o=d:u=d,(v=c>=(h=(l+s)/2))?l=h:s=h,t=n,!(n=n[y=v<<1|g]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(r=t,p=y)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[y]=a:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[p]=n:this._root=n),this):(this._root=a,this)}function Mte(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Ite(){return this._root}function Dte(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Rte(e){var t=[],n,r=this._root,i,a,o,l,u;for(r&&t.push(new ct(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,l=n.x1,u=n.y1)&&r.length){var s=(a+l)/2,f=(o+u)/2;(i=r[3])&&t.push(new ct(i,s,f,l,u)),(i=r[2])&&t.push(new ct(i,a,f,s,u)),(i=r[1])&&t.push(new ct(i,s,o,l,f)),(i=r[0])&&t.push(new ct(i,a,o,s,f))}return this}function Lte(e){var t=[],n=[],r;for(this._root&&t.push(new ct(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,l=r.y0,u=r.x1,s=r.y1,f=(o+u)/2,c=(l+s)/2;(a=i[0])&&t.push(new ct(a,o,l,f,c)),(a=i[1])&&t.push(new ct(a,f,l,u,c)),(a=i[2])&&t.push(new ct(a,o,c,f,s)),(a=i[3])&&t.push(new ct(a,f,c,u,s))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Bte(e){return e[0]}function zte(e){return arguments.length?(this._x=e,this):this._x}function Fte(e){return e[1]}function Ute(e){return arguments.length?(this._y=e,this):this._y}function cg(e,t,n){var r=new fg(t??Bte,n??Fte,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function fg(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function I1(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var yt=cg.prototype=fg.prototype;yt.copy=function(){var e=new fg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=I1(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=I1(r));return e};yt.add=Ete;yt.addAll=$te;yt.cover=Tte;yt.data=jte;yt.extent=kte;yt.find=Cte;yt.remove=Nte;yt.removeAll=Mte;yt.root=Ite;yt.size=Dte;yt.visit=Rte;yt.visitAfter=Lte;yt.x=zte;yt.y=Ute;function ci(e){return function(){return e}}function gr(e){return(e()-.5)*1e-6}function Wte(e){return e.x+e.vx}function Hte(e){return e.y+e.vy}function Vte(e){var t,n,r,i=1,a=1;typeof e!="function"&&(e=ci(e==null?1:+e));function o(){for(var s,f=t.length,c,d,h,g,v,y,p=0;p<a;++p)for(c=cg(t,Wte,Hte).visitAfter(l),s=0;s<f;++s)d=t[s],v=n[d.index],y=v*v,h=d.x+d.vx,g=d.y+d.vy,c.visit(m);function m(b,w,x,_,S){var O=b.data,E=b.r,j=v+E;if(O){if(O.index>d.index){var I=h-O.x-O.vx,C=g-O.y-O.vy,B=I*I+C*C;B<j*j&&(I===0&&(I=gr(r),B+=I*I),C===0&&(C=gr(r),B+=C*C),B=(j-(B=Math.sqrt(B)))/B*i,d.vx+=(I*=B)*(j=(E*=E)/(y+E)),d.vy+=(C*=B)*j,O.vx-=I*(j=1-j),O.vy-=C*j)}return}return w>h+j||_<h-j||x>g+j||S<g-j}}function l(s){if(s.data)return s.r=n[s.data.index];for(var f=s.r=0;f<4;++f)s[f]&&s[f].r>s.r&&(s.r=s[f].r)}function u(){if(t){var s,f=t.length,c;for(n=new Array(f),s=0;s<f;++s)c=t[s],n[c.index]=+e(c,s,t)}}return o.initialize=function(s,f){t=s,r=f,u()},o.iterations=function(s){return arguments.length?(a=+s,o):a},o.strength=function(s){return arguments.length?(i=+s,o):i},o.radius=function(s){return arguments.length?(e=typeof s=="function"?s:ci(+s),u(),o):e},o}function Kte(e){return e.index}function D1(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Gte(e){var t=Kte,n=c,r,i=ci(30),a,o,l,u,s,f=1;e==null&&(e=[]);function c(y){return 1/Math.min(l[y.source.index],l[y.target.index])}function d(y){for(var p=0,m=e.length;p<f;++p)for(var b=0,w,x,_,S,O,E,j;b<m;++b)w=e[b],x=w.source,_=w.target,S=_.x+_.vx-x.x-x.vx||gr(s),O=_.y+_.vy-x.y-x.vy||gr(s),E=Math.sqrt(S*S+O*O),E=(E-a[b])/E*y*r[b],S*=E,O*=E,_.vx-=S*(j=u[b]),_.vy-=O*j,x.vx+=S*(j=1-j),x.vy+=O*j}function h(){if(o){var y,p=o.length,m=e.length,b=new Map(o.map((x,_)=>[t(x,_,o),x])),w;for(y=0,l=new Array(p);y<m;++y)w=e[y],w.index=y,typeof w.source!="object"&&(w.source=D1(b,w.source)),typeof w.target!="object"&&(w.target=D1(b,w.target)),l[w.source.index]=(l[w.source.index]||0)+1,l[w.target.index]=(l[w.target.index]||0)+1;for(y=0,u=new Array(m);y<m;++y)w=e[y],u[y]=l[w.source.index]/(l[w.source.index]+l[w.target.index]);r=new Array(m),g(),a=new Array(m),v()}}function g(){if(o)for(var y=0,p=e.length;y<p;++y)r[y]=+n(e[y],y,e)}function v(){if(o)for(var y=0,p=e.length;y<p;++y)a[y]=+i(e[y],y,e)}return d.initialize=function(y,p){o=y,s=p,h()},d.links=function(y){return arguments.length?(e=y,h(),d):e},d.id=function(y){return arguments.length?(t=y,d):t},d.iterations=function(y){return arguments.length?(f=+y,d):f},d.strength=function(y){return arguments.length?(n=typeof y=="function"?y:ci(+y),g(),d):n},d.distance=function(y){return arguments.length?(i=typeof y=="function"?y:ci(+y),v(),d):i},d}const Xte=1664525,qte=1013904223,R1=4294967296;function Yte(){let e=1;return()=>(e=(Xte*e+qte)%R1)/R1}function Qte(e){return e.x}function Zte(e){return e.y}var Jte=10,ene=Math.PI*(3-Math.sqrt(5));function tne(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,l=new Map,u=lg(c),s=yu("tick","end"),f=Yte();e==null&&(e=[]);function c(){d(),s.call("tick",t),n<r&&(u.stop(),s.call("end",t))}function d(v){var y,p=e.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,l.forEach(function(w){w(n)}),y=0;y<p;++y)m=e[y],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return t}function h(){for(var v=0,y=e.length,p;v<y;++v){if(p=e[v],p.index=v,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var m=Jte*Math.sqrt(.5+v),b=v*ene;p.x=m*Math.cos(b),p.y=m*Math.sin(b)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.vy=0)}}function g(v){return v.initialize&&v.initialize(e,f),v}return h(),t={tick:d,restart:function(){return u.restart(c),t},stop:function(){return u.stop(),t},nodes:function(v){return arguments.length?(e=v,h(),l.forEach(g),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(a=+v,t):a},velocityDecay:function(v){return arguments.length?(o=1-v,t):1-o},randomSource:function(v){return arguments.length?(f=v,l.forEach(g),t):f},force:function(v,y){return arguments.length>1?(y==null?l.delete(v):l.set(v,g(y)),t):l.get(v)},find:function(v,y,p){var m=0,b=e.length,w,x,_,S,O;for(p==null?p=1/0:p*=p,m=0;m<b;++m)S=e[m],w=v-S.x,x=y-S.y,_=w*w+x*x,_<p&&(O=S,p=_);return O},on:function(v,y){return arguments.length>1?(s.on(v,y),t):s.on(v)}}}function nne(){var e,t,n,r,i=ci(-30),a,o=1,l=1/0,u=.81;function s(h){var g,v=e.length,y=cg(e,Qte,Zte).visitAfter(c);for(r=h,g=0;g<v;++g)t=e[g],y.visit(d)}function f(){if(e){var h,g=e.length,v;for(a=new Array(g),h=0;h<g;++h)v=e[h],a[v.index]=+i(v,h,e)}}function c(h){var g=0,v,y,p=0,m,b,w;if(h.length){for(m=b=w=0;w<4;++w)(v=h[w])&&(y=Math.abs(v.value))&&(g+=v.value,p+=y,m+=y*v.x,b+=y*v.y);h.x=m/p,h.y=b/p}else{v=h,v.x=v.data.x,v.y=v.data.y;do g+=a[v.data.index];while(v=v.next)}h.value=g}function d(h,g,v,y){if(!h.value)return!0;var p=h.x-t.x,m=h.y-t.y,b=y-g,w=p*p+m*m;if(b*b/u<w)return w<l&&(p===0&&(p=gr(n),w+=p*p),m===0&&(m=gr(n),w+=m*m),w<o&&(w=Math.sqrt(o*w)),t.vx+=p*h.value*r/w,t.vy+=m*h.value*r/w),!0;if(h.length||w>=l)return;(h.data!==t||h.next)&&(p===0&&(p=gr(n),w+=p*p),m===0&&(m=gr(n),w+=m*m),w<o&&(w=Math.sqrt(o*w)));do h.data!==t&&(b=a[h.data.index]*r/w,t.vx+=p*b,t.vy+=m*b);while(h=h.next)}return s.initialize=function(h,g){e=h,n=g,f()},s.strength=function(h){return arguments.length?(i=typeof h=="function"?h:ci(+h),f(),s):i},s.distanceMin=function(h){return arguments.length?(o=h*h,s):Math.sqrt(o)},s.distanceMax=function(h){return arguments.length?(l=h*h,s):Math.sqrt(l)},s.theta=function(h){return arguments.length?(u=h*h,s):Math.sqrt(u)},s}function rne(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const ine=rne("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),ts=e=>()=>e;function ane(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Un(e,t,n){this.k=e,this.x=t,this.y=n}Un.prototype={constructor:Un,scale:function(e){return e===1?this:new Un(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Un(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var w$=new Un(1,0,0);Un.prototype;function Ah(e){e.stopImmediatePropagation()}function $o(e){e.preventDefault(),e.stopImmediatePropagation()}function one(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function lne(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function L1(){return this.__zoom||w$}function une(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function sne(){return navigator.maxTouchPoints||"ontouchstart"in this}function cne(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function fne(){var e=one,t=lne,n=cne,r=une,i=sne,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,u=U6,s=yu("start","zoom","end"),f,c,d,h=500,g=150,v=0,y=10;function p(A){A.property("__zoom",L1).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",j).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(A,M,$,D){var N=A.selection?A.selection():A;N.property("__zoom",L1),A!==N?x(A,M,$,D):N.interrupt().each(function(){_(this,arguments).event(D).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},p.scaleBy=function(A,M,$,D){p.scaleTo(A,function(){var N=this.__zoom.k,R=typeof M=="function"?M.apply(this,arguments):M;return N*R},$,D)},p.scaleTo=function(A,M,$,D){p.transform(A,function(){var N=t.apply(this,arguments),R=this.__zoom,L=$==null?w(N):typeof $=="function"?$.apply(this,arguments):$,W=R.invert(L),U=typeof M=="function"?M.apply(this,arguments):M;return n(b(m(R,U),L,W),N,o)},$,D)},p.translateBy=function(A,M,$,D){p.transform(A,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),o)},null,D)},p.translateTo=function(A,M,$,D,N){p.transform(A,function(){var R=t.apply(this,arguments),L=this.__zoom,W=D==null?w(R):typeof D=="function"?D.apply(this,arguments):D;return n(w$.translate(W[0],W[1]).scale(L.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof $=="function"?-$.apply(this,arguments):-$),R,o)},D,N)};function m(A,M){return M=Math.max(a[0],Math.min(a[1],M)),M===A.k?A:new Un(M,A.x,A.y)}function b(A,M,$){var D=M[0]-$[0]*A.k,N=M[1]-$[1]*A.k;return D===A.x&&N===A.y?A:new Un(A.k,D,N)}function w(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function x(A,M,$,D){A.on("start.zoom",function(){_(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(D).end()}).tween("zoom",function(){var N=this,R=arguments,L=_(N,R).event(D),W=t.apply(N,R),U=$==null?w(W):typeof $=="function"?$.apply(N,R):$,X=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),Z=N.__zoom,ae=typeof M=="function"?M.apply(N,R):M,F=u(Z.invert(U).concat(X/Z.k),ae.invert(U).concat(X/ae.k));return function(Q){if(Q===1)Q=ae;else{var ce=F(Q),G=X/ce[2];Q=new Un(G,U[0]-ce[0]*G,U[1]-ce[1]*G)}L.zoom(null,Q)}})}function _(A,M,$){return!$&&A.__zooming||new S(A,M)}function S(A,M){this.that=A,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,M),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,M){return this.mouse&&A!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var M=fn(this.that).datum();s.call(A,this.that,new ane(A,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:s}),M)}};function O(A,...M){if(!e.apply(this,arguments))return;var $=_(this,M).event(A),D=this.__zoom,N=Math.max(a[0],Math.min(a[1],D.k*Math.pow(2,r.apply(this,arguments)))),R=Dn(A);if($.wheel)($.mouse[0][0]!==R[0]||$.mouse[0][1]!==R[1])&&($.mouse[1]=D.invert($.mouse[0]=R)),clearTimeout($.wheel);else{if(D.k===N)return;$.mouse=[R,D.invert(R)],_s(this),$.start()}$o(A),$.wheel=setTimeout(L,g),$.zoom("mouse",n(b(m(D,N),$.mouse[0],$.mouse[1]),$.extent,o));function L(){$.wheel=null,$.end()}}function E(A,...M){if(d||!e.apply(this,arguments))return;var $=A.currentTarget,D=_(this,M,!0).event(A),N=fn(A.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",X,!0),R=Dn(A,$),L=A.clientX,W=A.clientY;d$(A.view),Ah(A),D.mouse=[R,this.__zoom.invert(R)],_s(this),D.start();function U(Z){if($o(Z),!D.moved){var ae=Z.clientX-L,F=Z.clientY-W;D.moved=ae*ae+F*F>v}D.event(Z).zoom("mouse",n(b(D.that.__zoom,D.mouse[0]=Dn(Z,$),D.mouse[1]),D.extent,o))}function X(Z){N.on("mousemove.zoom mouseup.zoom",null),h$(Z.view,D.moved),$o(Z),D.event(Z).end()}}function j(A,...M){if(e.apply(this,arguments)){var $=this.__zoom,D=Dn(A.changedTouches?A.changedTouches[0]:A,this),N=$.invert(D),R=$.k*(A.shiftKey?.5:2),L=n(b(m($,R),D,N),t.apply(this,M),o);$o(A),l>0?fn(this).transition().duration(l).call(x,L,D,A):fn(this).call(p.transform,L,D,A)}}function I(A,...M){if(e.apply(this,arguments)){var $=A.touches,D=$.length,N=_(this,M,A.changedTouches.length===D).event(A),R,L,W,U;for(Ah(A),L=0;L<D;++L)W=$[L],U=Dn(W,this),U=[U,this.__zoom.invert(U),W.identifier],N.touch0?!N.touch1&&N.touch0[2]!==U[2]&&(N.touch1=U,N.taps=0):(N.touch0=U,R=!0,N.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(N.taps<2&&(c=U[0],f=setTimeout(function(){f=null},h)),_s(this),N.start())}}function C(A,...M){if(this.__zooming){var $=_(this,M).event(A),D=A.changedTouches,N=D.length,R,L,W,U;for($o(A),R=0;R<N;++R)L=D[R],W=Dn(L,this),$.touch0&&$.touch0[2]===L.identifier?$.touch0[0]=W:$.touch1&&$.touch1[2]===L.identifier&&($.touch1[0]=W);if(L=$.that.__zoom,$.touch1){var X=$.touch0[0],Z=$.touch0[1],ae=$.touch1[0],F=$.touch1[1],Q=(Q=ae[0]-X[0])*Q+(Q=ae[1]-X[1])*Q,ce=(ce=F[0]-Z[0])*ce+(ce=F[1]-Z[1])*ce;L=m(L,Math.sqrt(Q/ce)),W=[(X[0]+ae[0])/2,(X[1]+ae[1])/2],U=[(Z[0]+F[0])/2,(Z[1]+F[1])/2]}else if($.touch0)W=$.touch0[0],U=$.touch0[1];else return;$.zoom("touch",n(b(L,W,U),$.extent,o))}}function B(A,...M){if(this.__zooming){var $=_(this,M).event(A),D=A.changedTouches,N=D.length,R,L;for(Ah(A),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),R=0;R<N;++R)L=D[R],$.touch0&&$.touch0[2]===L.identifier?delete $.touch0:$.touch1&&$.touch1[2]===L.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(L=Dn(L,this),Math.hypot(c[0]-L[0],c[1]-L[1])<y)){var W=fn(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return p.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:ts(+A),p):r},p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:ts(!!A),p):e},p.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:ts(!!A),p):i},p.extent=function(A){return arguments.length?(t=typeof A=="function"?A:ts([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),p):t},p.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],p):[a[0],a[1]]},p.translateExtent=function(A){return arguments.length?(o[0][0]=+A[0][0],o[1][0]=+A[1][0],o[0][1]=+A[0][1],o[1][1]=+A[1][1],p):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},p.constrain=function(A){return arguments.length?(n=A,p):n},p.duration=function(A){return arguments.length?(l=+A,p):l},p.interpolate=function(A){return arguments.length?(u=A,p):u},p.on=function(){var A=s.on.apply(s,arguments);return A===s?p:A},p.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,p):Math.sqrt(v)},p.tapDistance=function(A){return arguments.length?(y=+A,p):y},p}function xd({file:e,onClose:t}){const[n,r]=T.useState(null),[i,a]=T.useState(!1),[o,l]=T.useState(!1);T.useEffect(()=>{if(!e){r(null);return}a(!0),fetch(`/api/file?path=${encodeURIComponent(e)}`).then(f=>f.ok?f.json():null).then(f=>r(f)).finally(()=>a(!1))},[e]);async function u(){e&&(l(!0),await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),l(!1))}if(!e)return null;const s=e.split("/").pop()??e;return P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"fixed inset-0 bg-black/40 z-40",onClick:t}),P.jsxs("div",{className:"fixed right-0 top-0 h-full w-[680px] max-w-full z-50 flex flex-col",style:{background:"#131220",borderLeft:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"flex items-center justify-between px-5 py-4 shrink-0",style:{borderBottom:"1px solid rgba(255,255,255,0.07)"},children:[P.jsxs("div",{className:"min-w-0",children:[P.jsx("p",{className:"text-white font-medium text-sm truncate",children:s}),P.jsx("p",{className:"text-white/30 text-xs font-mono truncate mt-0.5",children:e})]}),P.jsxs("div",{className:"flex items-center gap-2 ml-4 shrink-0",children:[P.jsx("button",{onClick:u,disabled:o,className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-[#603dc6]/20 text-[#a78bfa] hover:bg-[#603dc6]/30 transition-colors disabled:opacity-50",children:o?"Opening…":"↗ Open in IDE"}),P.jsx("button",{onClick:t,className:"text-white/30 hover:text-white/70 transition-colors text-lg leading-none px-1",children:"✕"})]})]}),P.jsxs("div",{className:"flex-1 overflow-auto",children:[i&&P.jsx("div",{className:"p-5 text-white/30 text-sm",children:"Loading\\u2026"}),!i&&n&&P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"px-5 py-2 text-white/20 text-xs",style:{borderBottom:"1px solid rgba(255,255,255,0.05)"},children:[n.lines," lines · .",n.ext]}),P.jsx("pre",{className:"p-5 text-xs font-mono text-white/70 leading-relaxed whitespace-pre overflow-x-auto",children:n.content})]}),!i&&!n&&P.jsx("div",{className:"p-5 text-white/30 text-sm",children:"Could not load file."})]})]})]})}const ns=ine;function Eh(e){return e.split("/").pop()??e}function dne(){const e=li(wn.graph),t=T.useRef(null),n=T.useRef(null),r=T.useRef(null),i=T.useRef([]),[a,o]=T.useState(null),[l,u]=T.useState({x:0,y:0}),[s,f]=T.useState(null),[c,d]=T.useState(null),[h,g]=T.useState(""),[v,y]=T.useState([]),p=T.useCallback(m=>{if(!m.trim()||!t.current||!r.current)return;const b=m.toLowerCase(),w=i.current.find(x=>Eh(x.id).toLowerCase().includes(b)||x.id.toLowerCase().includes(b));w&&w.x!=null&&w.y!=null&&fn(t.current).transition().duration(500).call(r.current.translateTo,w.x,w.y)},[]);return T.useEffect(()=>{p(h)},[h,p]),T.useEffect(()=>{var Z,ae;if(e.status!=="success"||!t.current)return;const{nodes:m,edges:b}=e.data,w=[...m].sort((F,Q)=>Q.inDegree+Q.outDegree-(F.inDegree+F.outDegree)).slice(0,300),x=new Set(w.map(F=>F.id)),_=b.filter(F=>x.has(F.source)&&x.has(F.target)),S=[...new Set(w.map(F=>F.community))].sort((F,Q)=>F-Q);y(S);const O=new Set([...w].sort((F,Q)=>Q.inDegree+Q.outDegree-(F.inDegree+F.outDegree)).slice(0,15).map(F=>F.id)),E=t.current,j=E.clientWidth||900,I=E.clientHeight||600,C=fn(E);C.selectAll("*").remove();const B=C.append("g"),A=fne().scaleExtent([.1,8]).on("zoom",F=>B.attr("transform",F.transform));r.current=A,C.call(A),C.on("click",F=>{F.target===E&&f(null)});const M=w.map(F=>({...F}));i.current=M;const $=new Map(M.map(F=>[F.id,F])),D=_.map(F=>({source:$.get(F.source),target:$.get(F.target)})).filter(F=>F.source&&F.target),N=new Map;for(const F of M)N.set(F.id,new Set);for(const F of D)(Z=N.get(F.source.id))==null||Z.add(F.target.id),(ae=N.get(F.target.id))==null||ae.add(F.source.id);const R=tne(M).force("link",Gte(D).id(F=>F.id).distance(60)).force("charge",nne().strength(-120)).force("center",Ate(j/2,I/2)).force("collision",Vte(8)),L=B.append("g").selectAll("line").data(D).join("line").attr("stroke","rgba(255,255,255,0.1)").attr("stroke-width",.8).attr("stroke-opacity",.6),W=B.append("g").selectAll("g").data(M).join("g").style("cursor","pointer").call(pee().on("start",(F,Q)=>{F.active||R.alphaTarget(.3).restart(),Q.fx=Q.x,Q.fy=Q.y}).on("drag",(F,Q)=>{Q.fx=F.x,Q.fy=F.y}).on("end",(F,Q)=>{F.active||R.alphaTarget(0),Q.fx=null,Q.fy=null}));W.filter(F=>(F.riskScore??0)>.6).append("circle").attr("class","risk-ring").attr("r",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)+3).attr("fill","none").attr("stroke","#ef4444").attr("stroke-opacity",.6).attr("stroke-width",F=>(F.riskScore??0)>.8?2.5:1.5);const U=W.append("circle").attr("r",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)).attr("fill",F=>ns[F.community%ns.length]).attr("stroke","rgba(255,255,255,0.15)").attr("stroke-width",1);W.filter(F=>O.has(F.id)).append("text").attr("dy",F=>3+Math.min(10,(F.inDegree+F.outDegree)*.5)+11).attr("text-anchor","middle").attr("font-size",9).attr("fill","rgba(255,255,255,0.6)").attr("pointer-events","none").text(F=>Eh(F.id)),W.on("mouseover",(F,Q)=>{o({id:Q.id,label:Q.label,inDegree:Q.inDegree,outDegree:Q.outDegree,riskScore:Q.riskScore})}).on("mousemove",F=>{const Q=E.getBoundingClientRect();u({x:F.clientX-Q.left+12,y:F.clientY-Q.top-8})}).on("mouseout",()=>{o(null)}).on("click",(F,Q)=>{F.stopPropagation(),f(ce=>ce===Q.id?null:Q.id),d(Q.id)});function X(F){if(F===null)W.attr("opacity",1),U.attr("opacity",1),L.attr("opacity",.6);else{const Q=N.get(F)??new Set;W.attr("opacity",ce=>ce.id===F||Q.has(ce.id)?1:.15),L.attr("opacity",ce=>{const G=ce.source.id,re=ce.target.id;return G===F||re===F?.9:.05})}}return t.current._applyHighlight=X,R.on("tick",()=>{L.attr("x1",F=>F.source.x??0).attr("y1",F=>F.source.y??0).attr("x2",F=>F.target.x??0).attr("y2",F=>F.target.y??0),W.attr("transform",F=>`translate(${F.x??0},${F.y??0})`)}),R.on("end",()=>{i.current=M}),()=>{R.stop(),t.current&&delete t.current._applyHighlight}},[e]),T.useEffect(()=>{if(!t.current)return;const m=t.current._applyHighlight;m&&m(s)},[s]),e.status==="loading"?P.jsx("div",{className:"text-white/40 text-sm",children:"Building graph..."}):e.status==="error"?P.jsx(qa,{message:e.message}):P.jsxs("div",{className:"space-y-4 h-full",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Dependency Graph"}),P.jsxs("span",{className:"text-xs text-white/40",children:[e.data.nodes.length," nodes · ",e.data.edges.length," edges · scroll to zoom · drag to pan"]})]}),P.jsxs("div",{ref:n,className:"rounded-xl border border-white/10 bg-[#18181f] relative overflow-hidden",style:{height:"calc(100vh - 160px)"},children:[P.jsx("div",{className:"absolute top-3 right-3 z-10",children:P.jsx("input",{type:"text",placeholder:"Search node...",value:h,onChange:m=>g(m.target.value),className:"bg-[#131220] border border-white/10 text-white placeholder:text-white/30 rounded-md px-2 py-1 text-xs w-48 outline-none focus:ring-1 focus:ring-[#603dc6]/50"})}),v.length>0&&P.jsxs("div",{className:"absolute bottom-3 left-3 z-10 bg-[#1e1d2a] border border-white/10 rounded-lg px-3 py-2 max-h-48 overflow-y-auto","aria-label":"Community legend",children:[P.jsx("p",{className:"text-white/40 text-[10px] uppercase tracking-wider mb-2",children:"Communities"}),P.jsx("div",{className:"space-y-1",children:v.map(m=>P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:ns[m%ns.length]}}),P.jsx("span",{className:"text-white/60 text-[10px]",children:m})]},m))})]}),P.jsx("svg",{ref:t,width:"100%",height:"100%",style:{background:"#18181f",borderRadius:"0.75rem"}}),a&&P.jsxs("div",{className:"absolute pointer-events-none z-20 bg-[#1e1d2a] border border-white/10 rounded-lg px-3 py-2 text-xs text-white shadow-lg",style:{left:l.x,top:l.y,maxWidth:260},role:"tooltip",children:[P.jsx("p",{className:"font-bold truncate",children:Eh(a.id)}),P.jsx("p",{className:"text-white/40 truncate mt-0.5",children:a.id}),P.jsxs("div",{className:"mt-2 space-y-0.5 text-white/70",children:[P.jsxs("p",{children:["In-degree: ",P.jsx("span",{className:"text-white",children:a.inDegree})]}),P.jsxs("p",{children:["Out-degree: ",P.jsx("span",{className:"text-white",children:a.outDegree})]}),P.jsxs("p",{children:["Risk score:"," ",P.jsx("span",{className:"text-white",children:a.riskScore!=null?a.riskScore.toFixed(2):"—"})]})]})]})]}),P.jsx(xd,{file:c,onClose:()=>d(null)})]})}function hne(){const e=li(wn.risk),[t,n]=T.useState("riskScore"),[r,i]=T.useState(""),[a,o]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{entries:l,overallRiskScore:u}=e.data;if(l.length===0)return P.jsxs("div",{className:"space-y-4",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Risk"}),P.jsxs("p",{className:"text-white/40 text-sm",children:["No git history available. Run ",P.jsx("code",{className:"text-[#a78bfa]",children:"ctxloom index --with-git"})," to enable risk analysis."]})]});const s=l.filter(c=>c.file.toLowerCase().includes(r.toLowerCase())).sort((c,d)=>d[t]-c[t]),f=[{key:"riskScore",label:"Risk"},{key:"churnLines",label:"Churn lines"},{key:"busFactor",label:"Bus factor"},{key:"couplingFanOut",label:"Coupling"},{key:"bugDensity",label:"Bug density"}];return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Risk"}),P.jsxs("span",{className:"text-sm text-white/40",children:["avg score: ",u]})]}),P.jsx("input",{type:"text",placeholder:"Filter by file...",value:r,onChange:c=>i(c.target.value),className:"w-full rounded-md border border-white/10 bg-[#1e1d2a] px-3 py-2 text-sm text-white placeholder:text-white/30 outline-none focus:ring-2 focus:ring-[#603dc6]/50 focus:border-[#603dc6]/50"}),P.jsx("div",{className:"overflow-x-auto rounded-xl border border-white/10 bg-[#1e1d2a]",children:P.jsxs("table",{className:"min-w-full text-sm",children:[P.jsx("thead",{className:"border-b border-white/10 bg-[#131220]",children:P.jsxs("tr",{children:[P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"File"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Owner"}),f.map(c=>P.jsxs("th",{onClick:()=>n(c.key),className:`px-4 py-3 text-left text-xs font-medium cursor-pointer select-none ${t===c.key?"text-[#a78bfa]":"text-white/40"}`,children:[c.label," ",t===c.key?"↓":""]},c.key))]})}),P.jsx("tbody",{className:"divide-y divide-[rgba(255,255,255,0.05)]",children:s.map(c=>P.jsxs("tr",{className:"hover:bg-white/5",children:[P.jsx("td",{className:"px-4 py-3 font-mono text-xs text-white/60 max-w-xs truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:c.file,onClick:()=>o(c.file),children:c.file}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/50",children:c.topOwner??"—"}),P.jsx("td",{className:"px-4 py-3",children:P.jsx(fO,{level:c.riskLabel})}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.churnLines.toLocaleString()}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.busFactor}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.couplingFanOut}),P.jsx("td",{className:"px-4 py-3 text-white/70",children:c.bugDensity.toFixed(2)})]},c.file))})]})}),P.jsx(xd,{file:a,onClose:()=>o(null)})]})}function pne(e,t,n){if(e===0){if(t===0)return{label:"→ stable",tone:"neutral"};const u=t>0;return{label:"↑ new",tone:n==="up"===u?"good":"bad"}}const r=(t-e)/e,i=Math.abs(r);if(i<.01)return{label:"→ stable",tone:"neutral"};const a=r>0?"↑":"↓",o=r>0,l=n==="up"===o;return{label:`${a} ${(i*100).toFixed(0)}%`,tone:l?"good":"bad"}}const vne={good:"#22c55e",bad:"#ef4444",neutral:"#a1a1aa"},mne="#a78bfa";function rs({label:e,currentValue:t,series:n,goodDirection:r,format:i,gitRequired:a=!1,gitEnabled:o}){if(a&&!o)return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsx("p",{className:"text-white/30 text-sm",children:"Git history disabled"})]});const l=n.filter(c=>typeof c.v=="number");if(l.length<2||t===null)return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsxs("p",{className:"text-white/30 text-sm",children:["Collecting data — edit some files or run ",P.jsx("code",{className:"text-white/50",children:"ctxloom index"})]})]});const u=l[0].v,s=l[l.length-1].v,f=pne(u,s,r);return P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-5",children:[P.jsx("h2",{className:"text-white/40 text-xs uppercase tracking-wider mb-2",children:e}),P.jsxs("div",{className:"flex items-baseline gap-3 mb-3",children:[P.jsx("span",{className:"text-white text-2xl font-semibold",children:i(t)}),P.jsx("span",{className:"text-xs font-medium",style:{color:vne[f.tone]},children:f.label})]}),P.jsx("div",{className:"h-12",children:P.jsx(EP,{width:"100%",height:"100%",children:P.jsxs(_Z,{data:l,margin:{top:4,right:4,bottom:4,left:4},children:[P.jsx(vd,{hide:!0,domain:["auto","auto"]}),P.jsx(mu,{type:"monotone",dataKey:"v",stroke:mne,strokeWidth:2,dot:!1,isAnimationActive:!1})]})})})]})}const yne=[{value:"7d",label:"7d"},{value:"30d",label:"30d"},{value:"90d",label:"90d"}];function gne({value:e,onChange:t}){return P.jsx("div",{className:"inline-flex rounded-md bg-[#131220] border border-white/10 p-0.5",children:yne.map(n=>P.jsx("button",{onClick:()=>t(n.value),"aria-pressed":e===n.value,className:`px-3 py-1 text-xs font-medium rounded ${e===n.value?"bg-[#603dc6]/20 text-[#a78bfa]":"text-white/40 hover:text-white/70"}`,children:n.label},n.value))})}function B1(e){return String(Math.round(e))}function bne(e){return e.toFixed(1)}function xne(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function is(e,t){return e.map(n=>({t:n.unixSeconds,v:n[t]}))}function as(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n][t];if(typeof r=="number")return r}return null}function wne(){const[e,t]=T.useState("30d"),[n,r]=T.useState({status:"loading"});if(T.useEffect(()=>{let o=!1;return r({status:"loading"}),fetch(`/api/trends?range=${e}`).then(async l=>{if(!l.ok)throw new Error(`API failed: ${l.status}`);return l.json()}).then(l=>{o||r({status:"success",data:l})}).catch(l=>{o||r({status:"error",message:l instanceof Error?l.message:String(l)})}),()=>{o=!0}},[e]),n.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(n.status==="error")return P.jsx(qa,{message:n.message});const{snapshots:i,gitEnabled:a}=n.data;return P.jsxs("div",{className:"space-y-8",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Trends"}),P.jsx(gne,{value:e,onChange:t})]}),P.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[P.jsx(rs,{label:"Dead files",currentValue:as(i,"deadFiles"),series:is(i,"deadFiles"),goodDirection:"down",format:B1,gitEnabled:a}),P.jsx(rs,{label:"Avg bus factor",currentValue:as(i,"avgBusFactor"),series:is(i,"avgBusFactor"),goodDirection:"up",format:bne,gitRequired:!0,gitEnabled:a}),P.jsx(rs,{label:"High-risk files",currentValue:as(i,"highRiskFiles"),series:is(i,"highRiskFiles"),goodDirection:"down",format:B1,gitRequired:!0,gitEnabled:a}),P.jsx(rs,{label:"Churn lines / week",currentValue:as(i,"churnLinesLast7d"),series:is(i,"churnLinesLast7d"),goodDirection:"down",format:xne,gitRequired:!0,gitEnabled:a})]})]})}function _ne(){const e=li(wn.communities),[t,n]=T.useState(null),[r,i]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{communities:a,totalFiles:o,totalEdges:l}=e.data;return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Communities"}),P.jsxs("span",{className:"text-sm text-white/40",children:[a.length," clusters · ",o," files · ",l," edges"]})]}),P.jsx("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:a.map(u=>P.jsxs("div",{className:"bg-[#1e1d2a] border border-white/10 rounded-xl p-4 transition-colors hover:border-white/20",children:[P.jsxs("button",{className:"w-full flex items-center justify-between text-left",onClick:()=>n(t===u.id?null:u.id),children:[P.jsxs("div",{children:[P.jsx("span",{className:"text-white/80 text-sm font-medium",children:u.name}),P.jsxs("span",{className:"ml-2 text-xs text-white/40",children:[u.size," files"]})]}),P.jsx("span",{className:"text-white/30 text-xs",children:t===u.id?"▲":"▼"})]}),t===u.id&&P.jsx("ul",{className:"mt-3 space-y-1 border-t border-white/10 pt-3",children:u.files.map(s=>P.jsx("li",{className:"font-mono text-xs text-white/40 truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:s,onClick:()=>i(s),children:s},s))})]},u.id))}),P.jsx(xd,{file:r,onClose:()=>i(null)})]})}function Sne(){const e=li(wn.ownership),[t,n]=T.useState(""),[r,i]=T.useState(null);if(e.status==="loading")return P.jsx("div",{className:"text-white/40 text-sm",children:"Loading..."});if(e.status==="error")return P.jsx(qa,{message:e.message});const{entries:a,totalAuthors:o}=e.data;if(a.length===0)return P.jsxs("div",{className:"space-y-4",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Ownership"}),P.jsxs("p",{className:"text-white/40 text-sm",children:["No git history available. Run ",P.jsx("code",{className:"text-[#a78bfa]",children:"ctxloom index --with-git"})," to enable ownership analysis."]})]});const l=a.filter(s=>s.file.toLowerCase().includes(t.toLowerCase())||s.primaryOwner.toLowerCase().includes(t.toLowerCase())),u=a.filter(s=>s.busFactor===1).length;return P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Ownership"}),P.jsxs("span",{className:"text-sm text-white/40",children:[o," authors · ",u," single-owner files"]})]}),u>0&&P.jsxs("div",{className:"bg-yellow-900/20 border border-yellow-500/30 text-yellow-300 rounded-lg p-3 text-sm",children:["⚠ ",u," files have only one contributor — bus factor risk."]}),P.jsx("input",{type:"text",placeholder:"Filter by file or owner...",value:t,onChange:s=>n(s.target.value),className:"w-full rounded-md border border-white/10 bg-[#1e1d2a] px-3 py-2 text-sm text-white placeholder:text-white/30 outline-none focus:ring-2 focus:ring-[#603dc6]/50 focus:border-[#603dc6]/50"}),P.jsx("div",{className:"overflow-x-auto rounded-xl border border-white/10 bg-[#1e1d2a]",children:P.jsxs("table",{className:"min-w-full text-sm",children:[P.jsx("thead",{className:"border-b border-white/10 bg-[#131220]",children:P.jsxs("tr",{children:[P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"File"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Primary owner"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Share"}),P.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-white/40",children:"Contributors"})]})}),P.jsx("tbody",{className:"divide-y divide-[rgba(255,255,255,0.05)]",children:l.map(s=>P.jsxs("tr",{className:`hover:bg-white/5 ${s.busFactor===1?"bg-yellow-900/10":""}`,children:[P.jsx("td",{className:"px-4 py-3 font-mono text-xs text-white/60 max-w-xs truncate cursor-pointer hover:text-[#a78bfa] transition-colors",title:s.file,onClick:()=>i(s.file),children:s.file}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/70",children:s.primaryOwner}),P.jsxs("td",{className:"px-4 py-3 text-xs text-white/50",children:[Math.round(s.primaryShare*100),"%"]}),P.jsx("td",{className:"px-4 py-3 text-xs text-white/50",children:s.busFactor===1?P.jsx("span",{className:"text-yellow-400 font-medium",children:"sole owner"}):s.busFactor})]},s.file))})]})}),P.jsx(xd,{file:r,onClose:()=>i(null)})]})}const z1=[{id:"overview",title:"Overview",icon:"◈",summary:"Your codebase at a glance — health snapshot and architectural hotspots.",items:[{term:"Files",def:"Total source files indexed. Click to open the Dependency Graph."},{term:"Edges",def:"Total import/dependency relationships between files. A high edge count relative to file count means a densely coupled codebase."},{term:"Communities",def:'Logical modules detected automatically by grouping files that import each other heavily (Louvain algorithm). Think of them as architectural "neighbourhoods".'},{term:"Git history",def:'"enabled" means git overlay data is loaded — Risk, Churn, and Ownership metrics will show real values. "disabled" means only static graph metrics are available. Run ctxloom index --with-git to enable.'},{term:"Risk breakdown donut",def:'Distribution of files across four risk tiers. A healthy codebase has most files in "low" and very few in "critical". Each slice is sized by file count.'},{term:"Risk tiers",def:"critical (score > 0.8) — urgent attention needed. high (> 0.6) — should be addressed soon. medium (> 0.3) — monitor. low (≤ 0.3) — acceptable."},{term:"Top architectural hubs",def:"Files most imported by others (high in-degree ↑) or that import the most (high out-degree ↓). Hubs are load-bearing — a bug here ripples everywhere."}]},{id:"graph",title:"Dependency Graph",icon:"⬡",summary:"Interactive force-directed map of every import relationship in your codebase.",items:[{term:"Nodes (dots)",def:"Each node is a file. Size reflects total degree (imports + importers) — bigger means more connected."},{term:"Node colour",def:"Colour encodes the Louvain community. Files in the same community share many imports with each other. The community legend (bottom-left) maps colours to community IDs."},{term:"Red ring around a node",def:"Risk alert. A thin red ring means riskScore > 0.6 (high). A thick red ring means riskScore > 0.8 (critical). These files need attention."},{term:"Edges (lines)",def:"A line from A to B means A imports B. The direction shows dependency flow."},{term:"Labels",def:"The top-15 most-connected files always show their filename. Hover any node to see full details."},{term:"Hover tooltip",def:"Shows the full file path, in-degree (how many files import this), out-degree (how many files this imports), and risk score."},{term:"Click to highlight",def:"Clicking a node dims everything except its direct neighbours. This reveals the file's immediate dependency context. Click again to reset."},{term:"Search box",def:"Type a filename fragment to pan the viewport to the first matching node."},{term:"Zoom / pan",def:"Scroll to zoom. Drag the background to pan. Drag individual nodes to reposition them."},{term:"Isolated nodes (far from centre)",def:"Files with few or no dependencies — utilities, config files, or dead code candidates."}]},{id:"risk",title:"Risk",icon:"⚠",summary:"Composite risk score per file, combining git churn, ownership concentration, and coupling.",items:[{term:"Risk score",def:"Weighted composite: (churn × 0.4) + (bus factor × 0.3) + (coupling × 0.3), normalised 0–1. Higher is riskier. Click the column header to sort."},{term:"Risk label (badge)",def:"critical / high / medium / low — derived from the risk score thresholds above. Critical files deserve immediate review."},{term:"Churn lines",def:"Total lines added + removed across all commits in the git window (default 365 days). High churn means the file changes frequently — volatility that correlates with bugs."},{term:"Bug density",def:"Ratio of commits with bug-fix keywords (fix, bug, hotfix, patch) to total commits touching this file. A value of 0.30 means 30% of its commits were bug fixes — a strong signal of instability."},{term:"Bus factor",def:"Minimum number of contributors whose loss would leave > 50% of this file's git history without a knowledgeable owner. Bus factor 1 = single point of failure."},{term:"Coupling",def:"Number of other files that import this file (fan-out of its importers). High coupling = many blast radius victims when this file changes."},{term:"Owner",def:"The git author responsible for the most lines of the file's history (by commit count share)."},{term:"avg score",def:"Mean risk score across all files shown. Use it as a baseline — individual files above this average warrant closer inspection."}]},{id:"communities",title:"Communities",icon:"⬡⬡",summary:"Auto-detected architectural modules — files that belong together by import density.",items:[{term:"What is a community?",def:"A group of files that import each other more than they import files outside the group. Detected via the Louvain modularity algorithm on the dependency graph."},{term:"Community name",def:"Named after the highest-degree file in the group (the hub). It's a label, not a hard boundary."},{term:"Size",def:"Number of files in the community. Very large communities (50+ files) may indicate an overgrown module that should be split. Very small ones (1–2 files) may be isolated utilities."},{term:"Expanding a community",def:"Click the row to expand and see all member files. This helps you verify whether the auto-grouping makes architectural sense."},{term:"What to look for",def:"Ideally, communities map to feature domains (auth, payments, graph). If unrelated files appear in the same community, they may be over-coupled. If a feature is split across many communities, its modules may be too tangled."},{term:"87 clusters",def:"A high community count vs file count ratio is normal — many files are singletons or small isolated groups (config, fixtures, types)."}]},{id:"ownership",title:"Ownership",icon:"◎",summary:"Per-file git ownership — who knows the code and where knowledge is concentrated.",items:[{term:"Primary owner",def:"The contributor with the highest share of commits touching this file."},{term:"Share %",def:"Percentage of commits to this file authored by the primary owner. 100% = sole owner."},{term:"Contributors column",def:'Shows "sole owner" (bus factor 1) or the count of meaningful contributors (bus factor > 1).'},{term:"Bus factor risk banner",def:"Appears when many files have only one contributor. If that person is unavailable, those files become a knowledge black hole."},{term:"Sole owner (highlighted in yellow)",def:"This file has exactly one person who understands it. It's the most critical ownership risk — prioritise review, documentation, or pair programming for these files."},{term:"What to do with this data",def:"Cross-reference with the Risk table. A file that is both high-churn AND sole-owner is extremely fragile. Target it for code review and knowledge transfer."},{term:"Filter",def:"Filter by filename or owner name to focus on a specific contributor's footprint or a specific directory."}]}];function One(){return P.jsxs("div",{className:"max-w-3xl space-y-10 pb-16",children:[P.jsxs("div",{children:[P.jsx("h1",{className:"text-white text-xl font-semibold",children:"Guide"}),P.jsx("p",{className:"mt-1 text-white/50 text-sm",children:"How to read and interpret each dashboard view."})]}),P.jsx("div",{className:"flex flex-wrap gap-2",children:z1.map(e=>P.jsx("a",{href:`#${e.id}`,className:"rounded-full border border-white/10 px-3 py-1 text-xs text-white/50 hover:border-[#603dc6]/60 hover:text-[#a78bfa] transition-colors",children:e.title},e.id))}),z1.map(e=>P.jsxs("section",{id:e.id,className:"scroll-mt-6",children:[P.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[P.jsx("span",{className:"text-[#603dc6] text-lg select-none",children:e.icon}),P.jsx("h2",{className:"text-white font-semibold text-base",children:e.title})]}),P.jsx("p",{className:"text-white/50 text-sm mb-5 leading-relaxed",children:e.summary}),P.jsx("div",{className:"rounded-xl border border-white/10 bg-[#1e1d2a] overflow-hidden",children:e.items.map((t,n)=>P.jsxs("div",{className:`flex gap-4 px-5 py-4 ${n<e.items.length-1?"border-b border-[rgba(255,255,255,0.05)]":""}`,children:[P.jsx("dt",{className:"w-36 shrink-0 text-xs font-medium text-[#a78bfa] pt-0.5 leading-relaxed",children:t.term}),P.jsx("dd",{className:"text-sm text-white/60 leading-relaxed",children:t.def})]},t.term))})]},e.id))]})}function Pne(){return P.jsx(Wk,{children:P.jsxs(Nn,{element:P.jsx(u2,{}),children:[P.jsx(Nn,{index:!0,element:P.jsx(AZ,{})}),P.jsx(Nn,{path:"graph",element:P.jsx(dne,{})}),P.jsx(Nn,{path:"risk",element:P.jsx(hne,{})}),P.jsx(Nn,{path:"trends",element:P.jsx(wne,{})}),P.jsx(Nn,{path:"communities",element:P.jsx(_ne,{})}),P.jsx(Nn,{path:"ownership",element:P.jsx(Sne,{})}),P.jsx(Nn,{path:"guide",element:P.jsx(One,{})})]})})}$h.createRoot(document.getElementById("root")).render(P.jsx(k.StrictMode,{children:P.jsx(Qk,{children:P.jsx(Pne,{})})}));
|