anarock-widgets 1.0.181 → 1.0.182
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/dist/index.cjs.js +4 -4
- package/dist/index.es.js +371 -377
- package/dist/index.umd.js +7 -7
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -200,13 +200,13 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
200
200
|
`);if(r>0){var{circleTangency:w,lineTangency:x,theta:_}=dd({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:E,lineTangency:C,theta:D}=dd({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-_-D;if(T<0&&o===0)return"".concat(S,"L").concat(t,",").concat(n,"Z");S+="L".concat(C.x,",").concat(C.y,`
|
|
201
201
|
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,`
|
|
202
202
|
A`).concat(r,",").concat(r,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
|
|
203
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},tH={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},CA=e=>{var t=qt(e,tH),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=oe("recharts-sector",d),p=o-i,m=Pn(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=eH({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=kA({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",Jv({},ct(t,!0),{className:f,d:h}))};function nH(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return PA(t);return[{x:r,y:i},{x:o,y:a}]}var yg={},bg={},xg={},US;function rH(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(xg)),xg}var KS;function iH(){return KS||(KS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rH();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(bg)),bg}var qS;function oH(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TD(),n=iH();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(yg)),yg}var wg,GS;function aH(){return GS||(GS=1,wg=oH().range),wg}var sH=aH();const DA=ho(sH);function Bo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function lH(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Hb(e){let t,n,r;e.length!==2?(t=Bo,n=(s,l)=>Bo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bo||e===lH?e:cH,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function cH(){return 0}function AA(e){return e===null?NaN:+e}function*uH(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const dH=Hb(Bo),xu=dH.right;Hb(AA).center;class XS extends Map{constructor(t,n=hH){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(QS(this,t))}has(t){return super.has(QS(this,t))}set(t,n){return super.set(fH(this,t),n)}delete(t){return super.delete(pH(this,t))}}function QS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fH({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function pH({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function hH(e){return e!==null&&typeof e=="object"?e.valueOf():e}function mH(e=Bo){if(e===Bo)return TA;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 TA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const gH=Math.sqrt(50),vH=Math.sqrt(10),yH=Math.sqrt(2);function Bf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=gH?10:o>=vH?5:o>=yH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Bf(e,t,n*2):[s,l,c]}function ey(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Bf(t,e,n):Bf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function ty(e,t,n){return t=+t,e=+e,n=+n,Bf(e,t,n)[2]}function ny(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ty(t,e,n):ty(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ZS(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function JS(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function MA(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?TA:mH(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));MA(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Ll(e,n,t),i(e[r],o)>0&&Ll(e,n,r);a<s;){for(Ll(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Ll(e,n,s):(++s,Ll(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ll(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function bH(e,t,n){if(e=Float64Array.from(uH(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return JS(e);if(t>=1)return ZS(e);var r,i=(r-1)*t,o=Math.floor(i),a=ZS(MA(e,o).subarray(0,o+1)),s=JS(e.subarray(o+1));return a+(s-a)*(i-o)}}function xH(e,t,n=AA){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,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function wH(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xo(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 ry=Symbol("implicit");function Yb(){var e=new XS,t=[],n=[],r=ry;function i(o){let a=e.get(o);if(a===void 0){if(r!==ry)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new XS;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Yb(t,n).unknown(r)},Vr.apply(i,arguments),i}function Ub(){var e=Yb().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var v=wH(f).map(function(b){return m+o*b});return n(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Ub(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function NA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return NA(t())},e}function _H(){return NA(Ub.apply(null,arguments).paddingInner(1))}function Kb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jA(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wu(){}var Fc=.7,Wf=1/Fc,js="\\s*([+-]?\\d+)\\s*",Lc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SH=/^#([0-9a-f]{3,8})$/,OH=new RegExp(`^rgb\\(${js},${js},${js}\\)$`),EH=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),PH=new RegExp(`^rgba\\(${js},${js},${js},${Lc}\\)$`),kH=new RegExp(`^rgba\\(${bi},${bi},${bi},${Lc}\\)$`),CH=new RegExp(`^hsl\\(${Lc},${bi},${bi}\\)$`),DH=new RegExp(`^hsla\\(${Lc},${bi},${bi},${Lc}\\)$`),eO={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};Kb(wu,$c,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tO,formatHex:tO,formatHex8:AH,formatHsl:TH,formatRgb:nO,toString:nO});function tO(){return this.rgb().formatHex()}function AH(){return this.rgb().formatHex8()}function TH(){return RA(this).formatHsl()}function nO(){return this.rgb().formatRgb()}function $c(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rO(t):n===3?new Xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fd(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=OH.exec(e))?new Xn(t[1],t[2],t[3],1):(t=EH.exec(e))?new Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=PH.exec(e))?fd(t[1],t[2],t[3],t[4]):(t=kH.exec(e))?fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CH.exec(e))?aO(t[1],t[2]/100,t[3]/100,1):(t=DH.exec(e))?aO(t[1],t[2]/100,t[3]/100,t[4]):eO.hasOwnProperty(e)?rO(eO[e]):e==="transparent"?new Xn(NaN,NaN,NaN,0):null}function rO(e){return new Xn(e>>16&255,e>>8&255,e&255,1)}function fd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xn(e,t,n,r)}function MH(e){return e instanceof wu||(e=$c(e)),e?(e=e.rgb(),new Xn(e.r,e.g,e.b,e.opacity)):new Xn}function iy(e,t,n,r){return arguments.length===1?MH(e):new Xn(e,t,n,r??1)}function Xn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Kb(Xn,iy,jA(wu,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fc:Math.pow(Fc,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xn(Ba(this.r),Ba(this.g),Ba(this.b),zf(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:iO,formatHex:iO,formatHex8:NH,formatRgb:oO,toString:oO}));function iO(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function NH(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function oO(){const e=zf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ba(this.r)}, ${Ba(this.g)}, ${Ba(this.b)}${e===1?")":`, ${e})`}`}function zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ba(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ta(e){return e=Ba(e),(e<16?"0":"")+e.toString(16)}function aO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kr(e,t,n,r)}function RA(e){if(e instanceof Kr)return new Kr(e.h,e.s,e.l,e.opacity);if(e instanceof wu||(e=$c(e)),!e)return new Kr;if(e instanceof Kr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Kr(a,s,l,e.opacity)}function jH(e,t,n,r){return arguments.length===1?RA(e):new Kr(e,t,n,r??1)}function Kr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Kb(Kr,jH,jA(wu,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fc:Math.pow(Fc,e),new Kr(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 Xn(_g(e>=240?e-240:e+120,i,r),_g(e,i,r),_g(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kr(sO(this.h),pd(this.s),pd(this.l),zf(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=zf(this.opacity);return`${e===1?"hsl(":"hsla("}${sO(this.h)}, ${pd(this.s)*100}%, ${pd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sO(e){return e=(e||0)%360,e<0?e+360:e}function pd(e){return Math.max(0,Math.min(1,e||0))}function _g(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 qb=e=>()=>e;function RH(e,t){return function(n){return e+n*t}}function IH(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 FH(e){return(e=+e)==1?IA:function(t,n){return n-t?IH(t,n,e):qb(isNaN(t)?n:t)}}function IA(e,t){var n=t-e;return n?RH(e,n):qb(isNaN(e)?t:e)}const lO=(function e(t){var n=FH(t);function r(i,o){var a=n((i=iy(i)).r,(o=iy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=IA(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function LH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function $H(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function BH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=fl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function WH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Vf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zH(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]=fl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var oy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sg=new RegExp(oy.source,"g");function VH(e){return function(){return e}}function HH(e){return function(t){return e(t)+""}}function YH(e,t){var n=oy.lastIndex=Sg.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=oy.exec(e))&&(i=Sg.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Vf(r,i)})),n=Sg.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?HH(l[0].x):VH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function fl(e,t){var n=typeof t,r;return t==null||n==="boolean"?qb(t):(n==="number"?Vf:n==="string"?(r=$c(t))?(t=r,lO):YH:t instanceof $c?lO:t instanceof Date?WH:$H(t)?LH:Array.isArray(t)?BH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zH:Vf)(e,t)}function Gb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function UH(e,t){t===void 0&&(t=e,e=fl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function KH(e){return function(){return e}}function Hf(e){return+e}var cO=[0,1];function jn(e){return e}function ay(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KH(isNaN(t)?NaN:.5)}function qH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function GH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=ay(i,r),o=n(a,o)):(r=ay(r,i),o=n(o,a)),function(s){return o(r(s))}}function XH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=ay(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=xu(e,s,1,r)-1;return o[l](i[l](s))}}function _u(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ph(){var e=cO,t=cO,n=fl,r,i,o,a=jn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==jn&&(a=qH(e[0],e[f-1])),s=f>2?XH:GH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),Vf)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Hf),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Gb,u()},d.clamp=function(f){return arguments.length?(a=f?!0:jn,u()):a!==jn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function Xb(){return ph()(jn,jn)}function QH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Xs(e){return e=Yf(Math.abs(e)),e?e[1]:NaN}function ZH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function JH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var eY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(e){if(!(t=eY.exec(e)))throw new Error("invalid format: "+e);var t;return new Qb({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]})}Bc.prototype=Qb.prototype;function Qb(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+""}Qb.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 tY(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 FA;function nY(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(FA=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yf(e,Math.max(0,t+o-1))[0]}function uO(e,t){var n=Yf(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 dO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QH,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)=>uO(e*100,t),r:uO,s:nY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fO(e){return e}var pO=Array.prototype.map,hO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rY(e){var t=e.grouping===void 0||e.thousands===void 0?fO:ZH(pO.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+"",o=e.numerals===void 0?fO:JH(pO.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Bc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,v=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):dO[_]||(w===void 0&&(w=12),x=!0,_="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=dO[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function j(A){var P=E,N=C,M,I,F;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=tY(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?hO[8+FA/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,I=A.length;++M<I;)if(F=A.charCodeAt(M),48>F||F>57){N=(F===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!v&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&v&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Bc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Xs(f)/3)))*3,h=Math.pow(10,-m),v=hO[8+m/3];return function(b){return p(h*b)+v}}return{format:c,formatPrefix:u}}var hd,Zb,LA;iY({thousands:",",grouping:[3],currency:["$",""]});function iY(e){return hd=rY(e),Zb=hd.format,LA=hd.formatPrefix,hd}function oY(e){return Math.max(0,-Xs(Math.abs(e)))}function aY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xs(t)/3)))*3-Xs(Math.abs(e)))}function sY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xs(t)-Xs(e))+1}function $A(e,t,n,r){var i=ny(e,t,n),o;switch(r=Bc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=aY(i,a))&&(r.precision=o),LA(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=sY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=oY(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zb(r)}function ea(e){var t=e.domain;return e.ticks=function(n){var r=t();return ey(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return $A(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=ty(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function BA(){var e=Xb();return e.copy=function(){return _u(e,BA())},Vr.apply(e,arguments),ea(e)}function WA(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,Hf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return WA(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],ea(n)}function zA(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function mO(e){return Math.log(e)}function gO(e){return Math.exp(e)}function lY(e){return-Math.log(-e)}function cY(e){return-Math.exp(-e)}function uY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dY(e){return e===10?uY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fY(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 vO(e){return(t,n)=>-e(-t,n)}function Jb(e){const t=e(mO,gO),n=t.domain;let r=10,i,o;function a(){return i=fY(r),o=dY(r),n()[0]<0?(i=vO(i),o=vO(o),e(lY,cY)):e(mO,gO),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const v=s==null?10:+s;let b=[];if(!(r%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<v&&(b=ey(c,u,v))}else b=ey(f,p,Math.min(p-f,v)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Bc(l)).precision==null&&(l.trim=!0),l=Zb(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(zA(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function VA(){const e=Jb(ph()).domain([1,10]);return e.copy=()=>_u(e,VA()).base(e.base()),Vr.apply(e,arguments),e}function yO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function e0(e){var t=1,n=e(yO(t),bO(t));return n.constant=function(r){return arguments.length?e(yO(t=+r),bO(t)):t},ea(n)}function HA(){var e=e0(ph());return e.copy=function(){return _u(e,HA()).constant(e.constant())},Vr.apply(e,arguments)}function xO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hY(e){return e<0?-e*e:e*e}function t0(e){var t=e(jn,jn),n=1;function r(){return n===1?e(jn,jn):n===.5?e(pY,hY):e(xO(n),xO(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ea(t)}function n0(){var e=t0(ph());return e.copy=function(){return _u(e,n0()).exponent(e.exponent())},Vr.apply(e,arguments),e}function mY(){return n0.apply(null,arguments).exponent(.5)}function wO(e){return Math.sign(e)*e*e}function gY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function YA(){var e=Xb(),t=[0,1],n=!1,r;function i(o){var a=gY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(wO(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hf)).map(wO)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return YA(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vr.apply(i,arguments),ea(i)}function UA(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=xH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[xu(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Bo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return UA().domain(e).range(t).unknown(r)},Vr.apply(o,arguments)}function KA(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[xu(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return KA().domain([e,t]).range(i).unknown(o)},Vr.apply(ea(a),arguments)}function qA(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[xu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return qA().domain(e).range(t).unknown(n)},Vr.apply(i,arguments)}const Og=new Date,Eg=new Date;function Gt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Gt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Og.setTime(+o),Eg.setTime(+a),e(Og),e(Eg),Math.floor(n(Og,Eg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Uf=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uf);Uf.range;const qi=1e3,Mr=qi*60,Gi=Mr*60,lo=Gi*24,r0=lo*7,_O=lo*30,Pg=lo*365,Ma=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qi)},(e,t)=>(t-e)/qi,e=>e.getUTCSeconds());Ma.range;const i0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getMinutes());i0.range;const o0=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getUTCMinutes());o0.range;const a0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi-e.getMinutes()*Mr)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getHours());a0.range;const s0=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCHours());s0.range;const Su=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mr)/lo,e=>e.getDate()-1);Su.range;const hh=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);hh.range;const GA=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));GA.range;function os(e){return Gt(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())*Mr)/r0)}const mh=os(0),Kf=os(1),vY=os(2),yY=os(3),Qs=os(4),bY=os(5),xY=os(6);mh.range;Kf.range;vY.range;yY.range;Qs.range;bY.range;xY.range;function as(e){return Gt(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)/r0)}const gh=as(0),qf=as(1),wY=as(2),_Y=as(3),Zs=as(4),SY=as(5),OY=as(6);gh.range;qf.range;wY.range;_Y.range;Zs.range;SY.range;OY.range;const l0=Gt(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());l0.range;const c0=Gt(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());c0.range;const co=Gt(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());co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(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)});co.range;const uo=Gt(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());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(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)});uo.range;function XA(e,t,n,r,i,o){const a=[[Ma,1,qi],[Ma,5,5*qi],[Ma,15,15*qi],[Ma,30,30*qi],[o,1,Mr],[o,5,5*Mr],[o,15,15*Mr],[o,30,30*Mr],[i,1,Gi],[i,3,3*Gi],[i,6,6*Gi],[i,12,12*Gi],[r,1,lo],[r,2,2*lo],[n,1,r0],[t,1,_O],[t,3,3*_O],[e,1,Pg]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=Hb(([,,v])=>v).right(a,f);if(p===a.length)return e.every(ny(c/Pg,u/Pg,d));if(p===0)return Uf.every(Math.max(ny(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[EY,PY]=XA(uo,c0,gh,GA,s0,o0),[kY,CY]=XA(co,l0,mh,Su,a0,i0);function kg(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 Cg(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 $l(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function DY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Bl(i),u=Wl(i),d=Bl(o),f=Wl(o),p=Bl(a),m=Wl(a),h=Bl(s),v=Wl(s),b=Bl(l),S=Wl(l),w={a:$,A:V,b:z,B,c:null,d:CO,e:CO,f:ZY,g:l9,G:u9,H:GY,I:XY,j:QY,L:QA,m:JY,M:e9,p:X,q,Q:TO,s:MO,S:t9,u:n9,U:r9,V:i9,w:o9,W:a9,x:null,X:null,y:s9,Y:c9,Z:d9,"%":AO},x={a:re,A:J,b:ee,B:ie,c:null,d:DO,e:DO,f:m9,g:E9,G:k9,H:f9,I:p9,j:h9,L:JA,m:g9,M:v9,p:ae,q:ue,Q:TO,s:MO,S:y9,u:b9,U:x9,V:w9,w:_9,W:S9,x:null,X:null,y:O9,Y:P9,Z:C9,"%":AO},_={a:j,A,b:P,B:N,c:M,d:PO,e:PO,f:YY,g:EO,G:OO,H:kO,I:kO,j:WY,L:HY,m:BY,M:zY,p:T,q:$Y,Q:KY,s:qY,S:VY,u:jY,U:RY,V:IY,w:NY,W:FY,x:I,X:F,y:EO,Y:OO,Z:LY,"%":UY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var R=[],ge=-1,te=0,ve=U.length,we,Le,st;for(Z instanceof Date||(Z=new Date(+Z));++ge<ve;)U.charCodeAt(ge)===37&&(R.push(U.slice(te,ge)),(Le=SO[we=U.charAt(++ge)])!=null?we=U.charAt(++ge):Le=we==="e"?" ":"0",(st=K[we])&&(we=st(Z,Le)),R.push(we),te=ge+1);return R.push(U.slice(te,ge)),R.join("")}}function C(U,K){return function(Z){var R=$l(1900,void 0,1),ge=D(R,U,Z+="",0),te,ve;if(ge!=Z.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(K&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(te=Cg($l(R.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?qf.ceil(te):qf(te),te=hh.offset(te,(R.V-1)*7),R.y=te.getUTCFullYear(),R.m=te.getUTCMonth(),R.d=te.getUTCDate()+(R.w+6)%7):(te=kg($l(R.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Kf.ceil(te):Kf(te),te=Su.offset(te,(R.V-1)*7),R.y=te.getFullYear(),R.m=te.getMonth(),R.d=te.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ve="Z"in R?Cg($l(R.y,0,1)).getUTCDay():kg($l(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ve+5)%7:R.w+R.U*7-(ve+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Cg(R)):kg(R)}}function D(U,K,Z,R){for(var ge=0,te=K.length,ve=Z.length,we,Le;ge<te;){if(R>=ve)return-1;if(we=K.charCodeAt(ge++),we===37){if(we=K.charAt(ge++),Le=_[we in SO?K.charAt(ge++):we],!Le||(R=Le(U,Z,R))<0)return-1}else if(we!=Z.charCodeAt(R++))return-1}return R}function T(U,K,Z){var R=c.exec(K.slice(Z));return R?(U.p=u.get(R[0].toLowerCase()),Z+R[0].length):-1}function j(U,K,Z){var R=p.exec(K.slice(Z));return R?(U.w=m.get(R[0].toLowerCase()),Z+R[0].length):-1}function A(U,K,Z){var R=d.exec(K.slice(Z));return R?(U.w=f.get(R[0].toLowerCase()),Z+R[0].length):-1}function P(U,K,Z){var R=b.exec(K.slice(Z));return R?(U.m=S.get(R[0].toLowerCase()),Z+R[0].length):-1}function N(U,K,Z){var R=h.exec(K.slice(Z));return R?(U.m=v.get(R[0].toLowerCase()),Z+R[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function I(U,K,Z){return D(U,n,K,Z)}function F(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function ie(U){return s[U.getUTCMonth()]}function ae(U){return i[+(U.getUTCHours()>=12)]}function ue(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var SO={"-":"",_:" ",0:"0"},nn=/^\s*\d+/,AY=/^%/,TY=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function MY(e){return e.replace(TY,"\\$&")}function Bl(e){return new RegExp("^(?:"+e.map(MY).join("|")+")","i")}function Wl(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function NY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function RY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function IY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function FY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function OO(e,t,n){var r=nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function EO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LY(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 $Y(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function BY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function PO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function WY(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HY(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function YY(e,t,n){var r=nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function UY(e,t,n){var r=AY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function KY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function CO(e,t){return Ne(e.getDate(),t,2)}function GY(e,t){return Ne(e.getHours(),t,2)}function XY(e,t){return Ne(e.getHours()%12||12,t,2)}function QY(e,t){return Ne(1+Su.count(co(e),e),t,3)}function QA(e,t){return Ne(e.getMilliseconds(),t,3)}function ZY(e,t){return QA(e,t)+"000"}function JY(e,t){return Ne(e.getMonth()+1,t,2)}function e9(e,t){return Ne(e.getMinutes(),t,2)}function t9(e,t){return Ne(e.getSeconds(),t,2)}function n9(e){var t=e.getDay();return t===0?7:t}function r9(e,t){return Ne(mh.count(co(e)-1,e),t,2)}function ZA(e){var t=e.getDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function i9(e,t){return e=ZA(e),Ne(Qs.count(co(e),e)+(co(e).getDay()===4),t,2)}function o9(e){return e.getDay()}function a9(e,t){return Ne(Kf.count(co(e)-1,e),t,2)}function s9(e,t){return Ne(e.getFullYear()%100,t,2)}function l9(e,t){return e=ZA(e),Ne(e.getFullYear()%100,t,2)}function c9(e,t){return Ne(e.getFullYear()%1e4,t,4)}function u9(e,t){var n=e.getDay();return e=n>=4||n===0?Qs(e):Qs.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function d9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function DO(e,t){return Ne(e.getUTCDate(),t,2)}function f9(e,t){return Ne(e.getUTCHours(),t,2)}function p9(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function h9(e,t){return Ne(1+hh.count(uo(e),e),t,3)}function JA(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function m9(e,t){return JA(e,t)+"000"}function g9(e,t){return Ne(e.getUTCMonth()+1,t,2)}function v9(e,t){return Ne(e.getUTCMinutes(),t,2)}function y9(e,t){return Ne(e.getUTCSeconds(),t,2)}function b9(e){var t=e.getUTCDay();return t===0?7:t}function x9(e,t){return Ne(gh.count(uo(e)-1,e),t,2)}function eT(e){var t=e.getUTCDay();return t>=4||t===0?Zs(e):Zs.ceil(e)}function w9(e,t){return e=eT(e),Ne(Zs.count(uo(e),e)+(uo(e).getUTCDay()===4),t,2)}function _9(e){return e.getUTCDay()}function S9(e,t){return Ne(qf.count(uo(e)-1,e),t,2)}function O9(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function E9(e,t){return e=eT(e),Ne(e.getUTCFullYear()%100,t,2)}function P9(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function k9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zs(e):Zs.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function C9(){return"+0000"}function AO(){return"%"}function TO(e){return+e}function MO(e){return Math.floor(+e/1e3)}var ys,tT,nT;D9({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 D9(e){return ys=DY(e),tT=ys.format,ys.parse,nT=ys.utcFormat,ys.utcParse,ys}function A9(e){return new Date(e)}function T9(e){return e instanceof Date?+e:+new Date(+e)}function u0(e,t,n,r,i,o,a,s,l,c){var u=Xb(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),v=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?v:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,T9)):f().map(A9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(zA(C,E)):u},u.copy=function(){return _u(u,u0(e,t,n,r,i,o,a,s,l,c))},u}function M9(){return Vr.apply(u0(kY,CY,co,l0,mh,Su,a0,i0,Ma,tT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function N9(){return Vr.apply(u0(EY,PY,uo,c0,gh,hh,s0,o0,Ma,nT).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function vh(){var e=0,t=1,n,r,i,o,a=jn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(fl),c.rangeRound=u(Gb),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function ta(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function rT(){var e=ea(vh()(jn));return e.copy=function(){return ta(e,rT())},xo.apply(e,arguments)}function iT(){var e=Jb(vh()).domain([1,10]);return e.copy=function(){return ta(e,iT()).base(e.base())},xo.apply(e,arguments)}function oT(){var e=e0(vh());return e.copy=function(){return ta(e,oT()).constant(e.constant())},xo.apply(e,arguments)}function d0(){var e=t0(vh());return e.copy=function(){return ta(e,d0()).exponent(e.exponent())},xo.apply(e,arguments)}function j9(){return d0.apply(null,arguments).exponent(.5)}function aT(){var e=[],t=jn;function n(r){if(r!=null&&!isNaN(r=+r))return t((xu(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(Bo),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,o)=>bH(e,o/r))},n.copy=function(){return aT(t).domain(e)},xo.apply(n,arguments)}function yh(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=jn,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(v){var b,S,w;return arguments.length?([b,S,w]=v,c=UH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(fl),p.rangeRound=m(Gb),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function sT(){var e=ea(yh()(jn));return e.copy=function(){return ta(e,sT())},xo.apply(e,arguments)}function lT(){var e=Jb(yh()).domain([.1,1,10]);return e.copy=function(){return ta(e,lT()).base(e.base())},xo.apply(e,arguments)}function cT(){var e=e0(yh());return e.copy=function(){return ta(e,cT()).constant(e.constant())},xo.apply(e,arguments)}function f0(){var e=t0(yh());return e.copy=function(){return ta(e,f0()).exponent(e.exponent())},xo.apply(e,arguments)}function R9(){return f0.apply(null,arguments).exponent(.5)}const ac=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ub,scaleDiverging:sT,scaleDivergingLog:lT,scaleDivergingPow:f0,scaleDivergingSqrt:R9,scaleDivergingSymlog:cT,scaleIdentity:WA,scaleImplicit:ry,scaleLinear:BA,scaleLog:VA,scaleOrdinal:Yb,scalePoint:_H,scalePow:n0,scaleQuantile:UA,scaleQuantize:KA,scaleRadial:YA,scaleSequential:rT,scaleSequentialLog:iT,scaleSequentialPow:d0,scaleSequentialQuantile:aT,scaleSequentialSqrt:j9,scaleSequentialSymlog:oT,scaleSqrt:mY,scaleSymlog:HA,scaleThreshold:qA,scaleTime:M9,scaleUtc:N9,tickFormat:$A},Symbol.toStringTag,{value:"Module"}));var na=e=>e.chartData,p0=W([na],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ou=(e,t,n,r)=>r?p0(e):na(e);function Js(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(dn(t)&&dn(n))return!0}return!1}function NO(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function I9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(dn(n))i=n;else if(typeof n=="function")return;if(dn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(Js(a))return a}}function F9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Js(r))return NO(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(pe(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&SS.test(i)){var l=SS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(pe(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&OS.test(o)){var u=OS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(Js(f))return t==null?f:NO(f,t,n)}}}var pl=1e9,L9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},m0,bt=!0,Fr="[DecimalError] ",Wa=Fr+"Invalid argument: ",h0=Fr+"Exponent out of range: ",hl=Math.floor,xa=Math.pow,$9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fr,Jt=1e7,ft=7,uT=9007199254740991,Gf=hl(uT/ft),fe={};fe.absoluteValue=fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};fe.comparedTo=fe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ft;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return to(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return at(to(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return zt(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fr))throw Error(Fr+"NaN");if(n.s<1)throw Error(Fr+(n.s?"NaN":"-Infinity"));return n.eq(fr)?new r(0):(bt=!1,t=to(Wc(n,o),Wc(e,o),o),bt=!0,at(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pT(t,e):dT(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Fr+"NaN");return n.s?(bt=!1,t=to(n,e,0,1).times(e),bt=!0,n.minus(t)):at(new r(n),i)};fe.naturalExponential=fe.exp=function(){return fT(this)};fe.naturalLogarithm=fe.ln=function(){return Wc(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dT(t,e):pT(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wa+e);if(t=zt(i)+1,r=i.d.length-1,n=r*ft+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};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Fr+"NaN")}for(e=zt(s),bt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=mi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=hl((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 l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(to(s,o,a+2)).times(.5),mi(o.d).slice(0,a)===(t=mi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(at(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return bt=!0,at(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%Jt|0,t=s/Jt|0;o[i]=(o[i]+t)%Jt|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,bt?at(e,d.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Oi(e,0,pl),t===void 0?t=r.rounding:Oi(t,0,8),at(n,e+zt(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xa(r,!0):(Oi(e,0,pl),t===void 0?t=i.rounding:Oi(t,0,8),r=at(new i(r),e+1,t),n=Xa(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xa(i):(Oi(e,0,pl),t===void 0?t=o.rounding:Oi(t,0,8),r=at(new o(i),e+zt(i)+1,t),n=Xa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return at(new t(e),zt(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(fr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Fr+"Infinity");return s}if(s.eq(fr))return s;if(r=l.precision,e.eq(fr))return at(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=uT){for(i=new l(fr),t=Math.ceil(r/ft+4),bt=!1;n%2&&(i=i.times(s),RO(i.d,t)),n=hl(n/2),n!==0;)s=s.times(s),RO(s.d,t);return bt=!0,e.s<0?new l(fr).div(i):at(i,r)}}else if(o<0)throw Error(Fr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,bt=!1,i=e.times(Wc(s,r+c)),bt=!0,i=fT(i),i.s=o,i};fe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Xa(i,n<=o.toExpNeg||n>=o.toExpPos)):(Oi(e,1,pl),t===void 0?t=o.rounding:Oi(t,0,8),i=at(new o(i),e,t),n=zt(i),r=Xa(i,e<=n||n<=o.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Oi(e,1,pl),t===void 0?t=r.rounding:Oi(t,0,8)),at(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Xa(e,t<=n.toExpNeg||t>=n.toExpPos)};function dT(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),bt?at(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/ft),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/Jt|0,l[o]%=Jt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,bt?at(t,d):t}function Oi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Wa+e)}function mi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=ft-r.length,n&&(o+=Do(n)),o+=r;a=e[t],r=a+"",n=ft-r.length,n&&(o+=Do(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var to=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%Jt|0,a=o/Jt|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*Jt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,v,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Fr+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/ft+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*Jt+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=Jt/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),v=h.length;v<C;)h[v++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=Jt/2&&++E;do u=0,s=t(P,h,C,v),s<0?(b=h[0],C!=v&&(b=b*Jt+(h[1]||0)),u=b/E|0,u>1?(u>=Jt&&(u=Jt-1),d=e(P,u),f=d.length,v=h.length,s=t(d,h,f,v),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<v&&d.unshift(0),n(h,d,v),s==-1&&(v=h.length,s=t(P,h,C,v),s<1&&(u++,n(h,C<v?D:P,v))),v=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[v++]=A[x]||0:(h=[A[x]],v=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,at(p,a?o+zt(p)+1:o)}})();function fT(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(h0+zt(e));if(!e.s)return new u(fr);for(bt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(xa(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(fr),u.precision=s;;){if(i=at(i.times(e),s),n=n.times(++l),a=o.plus(to(i,n,s)),mi(a.d).slice(0,s)===mi(o.d).slice(0,s)){for(;c--;)o=at(o.times(o),s);return u.precision=d,t==null?(bt=!0,at(o,d)):o}o=a}}function zt(e){for(var t=e.e*ft,n=e.d[0];n>=10;n/=10)t++;return t}function Dg(e,t,n){if(t>e.LN10.sd())throw bt=!0,n&&(e.precision=n),Error(Fr+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Do(e){for(var t="";e--;)t+="0";return t}function Wc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,v=h.precision;if(p.s<1)throw Error(Fr+(p.s?"NaN":"-Infinity"));if(p.eq(fr))return new h(0);if(t==null?(bt=!1,c=v):c=t,p.eq(10))return t==null&&(bt=!0),Dg(h,c);if(c+=f,h.precision=c,n=mi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=mi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Dg(h,c+2,v).times(o+""),p=Wc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=v,t==null?(bt=!0,at(p,v)):p;for(s=a=p=to(p.minus(fr),p.plus(fr),c),u=at(p.times(p),c),i=3;;){if(a=at(a.times(u),c),l=s.plus(to(a,new h(i),c)),mi(l.d).slice(0,c)===mi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Dg(h,c+2,v).times(o+""))),s=to(s,new h(d),c),h.precision=v,t==null?(bt=!0,at(s,v)):s;s=l,i+=2}}function jO(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=hl(n/ft),e.d=[],r=(n+1)%ft,n<0&&(r+=ft),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=ft;r<i;)e.d.push(+t.slice(r,r+=ft));t=t.slice(r),r=ft-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bt&&(e.e>Gf||e.e<-Gf))throw Error(h0+n)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=ft,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/ft),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=ft,i=r-ft+a}if(n!==void 0&&(o=xa(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/xa(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=xa(10,(ft-t%ft)%ft),e.e=hl(-t/ft)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=xa(10,ft-r),d[u]=i>0?(c/xa(10,a-i)%xa(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==Jt&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=Jt)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(bt&&(e.e>Gf||e.e<-Gf))throw Error(h0+zt(e));return e}function pT(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),bt?at(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/ft),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=Jt-1;--l[o],l[i]+=Jt}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,bt?at(t,p):t):new f(0)}function Xa(e,t,n){var r,i=zt(e),o=mi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Do(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Do(-i-1)+o,n&&(r=n-a)>0&&(o+=Do(r))):i>=a?(o+=Do(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Do(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Do(r))),e.s<0?"-"+o:o}function RO(e,t){if(e.length>t)return e.length=t,!0}function hT(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Wa+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return jO(a,o.toString())}else if(typeof o!="string")throw Error(Wa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,$9.test(o))jO(a,o);else throw Error(Wa+o)}if(i.prototype=fe,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=hT,i.config=i.set=B9,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 B9(e){if(!e||typeof e!="object")throw Error(Fr+"Object expected");var t,n,r,i=["precision",1,pl,"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(hl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Wa+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Wa+n+": "+r);return this}var m0=hT(L9);fr=new m0(1);const Qe=m0;var W9=e=>e,mT={},gT=e=>e===mT,IO=e=>function t(){return arguments.length===0||arguments.length===1&&gT(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},vT=(e,t)=>e===1?t:IO(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==mT).length;return o>=e?t(...r):vT(e-o,IO(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>gT(u)?s.shift():u);return t(...c,...s)}))}),bh=e=>vT(e.length,e),sy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},z9=bh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),V9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return W9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},ly=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),yT=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function bT(e){var t;return e===0?t=1:t=Math.floor(new Qe(e).abs().log(10).toNumber())+1,t}function xT(e,t,n){for(var r=new Qe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}bh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});bh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});bh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var wT=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},_T=(e,t,n)=>{if(e.lte(0))return new Qe(0);var r=bT(e.toNumber()),i=new Qe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Qe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Qe(l.toNumber()):new Qe(Math.ceil(l.toNumber()))},H9=(e,t,n)=>{var r=new Qe(1),i=new Qe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Qe(10).pow(bT(e)-1),i=new Qe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Qe(Math.floor(e)))}else e===0?i=new Qe(Math.floor((t-1)/2)):n||(i=new Qe(Math.floor(e)));var a=Math.floor((t-1)/2),s=V9(z9(l=>i.add(new Qe(l-a).mul(r)).toNumber()),sy);return s(0,t)},ST=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=_T(new Qe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Qe(0):(s=new Qe(t).add(n).div(2),s=s.sub(new Qe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Qe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?ST(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Qe(l).mul(a)),tickMax:s.add(new Qe(c).mul(a))})};function Y9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=wT([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...sy(0,r-1).map(()=>1/0)]:[...sy(0,r-1).map(()=>-1/0),s];return t>n?ly(l):l}if(a===s)return H9(a,r,i);var{step:c,tickMin:u,tickMax:d}=ST(a,s,o,i,0),f=xT(u,d.add(new Qe(.1).mul(c)),c);return t>n?ly(f):f}function U9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=wT([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=_T(new Qe(a).sub(o).div(s-1),i,0),c=[...xT(new Qe(o),new Qe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?ly(c):c}var K9=yT(Y9),q9=yT(U9),OT=e=>e.rootProps.maxBarSize,G9=e=>e.rootProps.barGap,ET=e=>e.rootProps.barCategoryGap,X9=e=>e.rootProps.barSize,Eu=e=>e.rootProps.stackOffset,g0=e=>e.options.chartName,v0=e=>e.rootProps.syncId,PT=e=>e.rootProps.syncMethod,y0=e=>e.options.eventEmitter,Hi={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},cr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},xh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Q9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:Hi.reversed,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:Hi.type,unit:void 0},Z9={allowDataOverflow:cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:cr.scale,tick:cr.tick,tickCount:cr.tickCount,ticks:void 0,type:cr.type,unit:void 0},J9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},eU={allowDataOverflow:cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:cr.scale,tick:cr.tick,tickCount:cr.tickCount,ticks:void 0,type:"category",unit:void 0},b0=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?J9:Q9,x0=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?eU:Z9,wh=e=>e.polarOptions,w0=W([vo,yo,Kt],lA),kT=W([wh,w0],(e,t)=>{if(e!=null)return Pn(e.innerRadius,t,0)}),CT=W([wh,w0],(e,t)=>{if(e!=null)return Pn(e.outerRadius,t,t*.8)}),tU=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},DT=W([wh],tU);W([b0,DT],xh);var AT=W([w0,kT,CT],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([x0,AT],xh);var TT=W([Ee,wh,kT,CT,vo,yo],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:Pn(a,i,i/2),cy:Pn(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),wt=(e,t)=>t,Pu=(e,t,n)=>n;function _h(e){return e?.id}var Xt=e=>{var t=Ee(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},ml=e=>e.tooltip.settings.axisId,rn=e=>{var t=Xt(e),n=ml(e);return ku(e,t,n)},MT=W([rn],e=>e?.dataKey);function NT(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=_h(s);c.forEach((d,f)=>{var p=o==null||i?f:String(nt(d,o,null)),m=nt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function Sh(e){return e.stackId!=null&&e.dataKey!=null}function FO(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 Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FO(Object(n),!0).forEach(function(r){nU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nU(e,t,n){return(t=rU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rU(e){var t=iU(e,"string");return typeof t=="symbol"?t:t+""}function iU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=[0,"auto"],or={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},jT=(e,t)=>e.cartesianAxis.xAxis[t],Ai=(e,t)=>{var n=jT(e,t);return n??or},ar={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:cy,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:yu},RT=(e,t)=>e.cartesianAxis.yAxis[t],Ti=(e,t)=>{var n=RT(e,t);return n??ar},oU={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},_0=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??oU},Ft=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"zAxis":return _0(e,n);case"angleAxis":return b0(e,n);case"radiusAxis":return x0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},aU=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},ku=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"angleAxis":return b0(e,n);case"radiusAxis":return x0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},IT=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function S0(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Cu=e=>e.graphicalItems.cartesianItems,sU=W([wt,Pu],S0),O0=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Du=W([Cu,Ft,sU],O0),FT=W([Du],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Sh)),LT=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),$T=W([Du],LT),E0=e=>e.map(t=>t.data).filter(Boolean).flat(1),lU=W([Du],E0),P0=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},k0=W([lU,Ou],P0),C0=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:nt(i,r)}))):e.map(r=>({value:r})),Oh=W([k0,Ft,Du],C0);function BT(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ss(e){return e.filter(t=>Rr(t)||t instanceof Date).map(Number).filter(t=>kn(t)===!1)}function cU(e,t,n){return!n||typeof t!="number"||kn(t)?[]:n.length?ss(n.flatMap(r=>{var i=nt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!dn(o)||!dn(a)))return[t-o,t+a]})):[]}var uU=W([FT,Ou,rn],NT),WT=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(_h);return[a,{stackedData:m7(e,l,n),graphicalItems:s}]}))},zc=W([uU,FT,Eu],WT),zT=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=b7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},dU=W([zc,na,wt],zT),VT=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>BT(i,d)),u=nt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:cU(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:nt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Eh=e=>e.errorBars,HT=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>BT(n,r));W([$T,Eh,wt],HT);var fU=W([k0,Ft,$T,Eh,wt],VT);function pU(e){var{value:t}=e;if(Rr(t)||t instanceof Date)return t}var LO=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ss(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},hU=(e,t,n)=>{var r=e.map(pU).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&QC(r))?DA(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},D0=e=>{var t;if(e==null||!("domain"in e))return cy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ss(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:cy},Qf=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},YT=e=>e.referenceElements.dots,gl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),mU=W([YT,wt,Pu],gl),UT=e=>e.referenceElements.areas,gU=W([UT,wt,Pu],gl),KT=e=>e.referenceElements.lines,vU=W([KT,wt,Pu],gl),qT=(e,t)=>{var n=ss(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},yU=W(mU,wt,qT),GT=(e,t)=>{var n=ss(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},bU=W([gU,wt],GT),XT=(e,t)=>{var n=ss(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},xU=W(vU,wt,XT),wU=W(yU,xU,bU,(e,t,n)=>Qf(e,n,t)),QT=W([Ft],D0),A0=(e,t,n,r,i,o,a)=>{var s=I9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Qf(n,i,LO(r)):Qf(i,LO(r));return F9(t,c,e.allowDataOverflow)},_U=W([Ft,QT,dU,fU,wU,Ee,wt],A0),SU=[0,1],T0=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Di(t,o);return c&&s==null?DA(0,n.length):l==="category"?hU(r,e,c):i==="expand"?SU:a}},M0=W([Ft,Ee,k0,Oh,Eu,wt,_U],T0),ZT=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(fu(o));return s in ac?s:"point"}}},vl=W([Ft,Ee,IT,g0,wt],ZT);function OU(e){if(e!=null){if(e in ac)return ac[e]();var t="scale".concat(fu(e));if(t in ac)return ac[t]()}}function N0(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=OU(t);if(i!=null){var o=i.domain(n).range(r);return u7(o),o}}}var j0=(e,t,n)=>{var r=D0(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&Js(e))return K9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Js(e))return q9(e,t.tickCount,t.allowDecimals)}},R0=W([M0,ku,vl],j0),I0=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&Js(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},EU=W([Ft,M0,R0,wt],I0),PU=W(Oh,Ft,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ss(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),JT=W(PU,Ee,ET,Kt,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!dn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=Pn(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),kU=(e,t)=>{var n=Ai(e,t);return n==null||typeof n.padding!="string"?0:JT(e,"xAxis",t,n.padding)},CU=(e,t)=>{var n=Ti(e,t);return n==null||typeof n.padding!="string"?0:JT(e,"yAxis",t,n.padding)},DU=W(Ai,kU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),AU=W(Ti,CU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),TU=W([Kt,DU,uh,ch,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),MU=W([Kt,Ee,AU,uh,ch,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Au=(e,t,n,r)=>{var i;switch(t){case"xAxis":return TU(e,n,r);case"yAxis":return MU(e,n,r);case"zAxis":return(i=_0(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return DT(e);case"radiusAxis":return AT(e,n);default:return}},eM=W([Ft,Au],xh),Ko=W([Ft,vl,EU,eM],N0);W([Du,Eh,wt],HT);function tM(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ph=(e,t)=>t,kh=(e,t,n)=>n,NU=W(sh,Ph,kh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(tM)),jU=W(lh,Ph,kh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(tM)),nM=(e,t)=>({width:e.width,height:t.height}),RU=(e,t)=>{var n=typeof t.width=="number"?t.width:yu;return{width:n,height:e.height}},rM=W(Kt,Ai,nM),IU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},FU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},LU=W(yo,Kt,NU,Ph,kh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=nM(t,s);a==null&&(a=IU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),$U=W(vo,Kt,jU,Ph,kh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=RU(t,s);a==null&&(a=FU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),BU=(e,t)=>{var n=Ai(e,t);if(n!=null)return LU(e,n.orientation,n.mirror)},WU=W([Kt,Ai,BU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),zU=(e,t)=>{var n=Ti(e,t);if(n!=null)return $U(e,n.orientation,n.mirror)},VU=W([Kt,Ti,zU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),iM=W(Kt,Ti,(e,t)=>{var n=typeof t.width=="number"?t.width:yu;return{width:n,height:e.height}}),$O=(e,t,n)=>{switch(t){case"xAxis":return rM(e,n).width;case"yAxis":return iM(e,n).height;default:return}},oM=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Di(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&QC(l))return l}},F0=W([Ee,Oh,Ft,wt],oM),aM=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Di(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},L0=W([Ee,Oh,ku,wt],aM),BO=W([Ee,aU,vl,Ko,F0,L0,Au,R0,wt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Di(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),HU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Di(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?tn(o[0]-o[1])*2*m:m;var h=d||i;if(h){var v=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return v.filter(b=>!kn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},sM=W([Ee,ku,vl,Ko,R0,Au,F0,L0,wt],HU),YU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Di(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?tn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Ei=W([Ee,ku,Ko,Au,F0,L0,wt],YU),Pi=W(Ft,Ko,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),UU=W([Ft,vl,M0,eM],N0);W((e,t,n)=>_0(e,n),UU,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var KU=W([Ee,sh,lh],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),lM=e=>e.options.defaultTooltipEventType,cM=e=>e.options.validateTooltipEventTypes;function uM(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function $0(e,t){var n=lM(e),r=cM(e);return uM(t,n,r)}function qU(e){return ce(t=>$0(t,e))}var dM=(e,t)=>{var n,r=Number(t);if(!(kn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},GU=e=>e.tooltip.settings,To={active:!1,index:null,dataKey:void 0,coordinate:void 0},XU={itemInteraction:{click:To,hover:To},axisInteraction:{click:To,hover:To},keyboardInteraction:To,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},fM=br({name:"tooltip",initialState:XU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=eo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:QU,removeTooltipEntrySettings:ZU,setTooltipSettingsState:JU,setActiveMouseOverItemIndex:pM,mouseLeaveItem:eK,mouseLeaveChart:hM,setActiveClickItemIndex:tK,setMouseOverAxisIndex:mM,setMouseClickAxisIndex:nK,setSyncInteraction:uy,setKeyboardInteraction:dy}=fM.actions,rK=fM.reducer;function WO(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 md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){iK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iK(e,t,n){return(t=oK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oK(e){var t=aK(e,"string");return typeof t=="symbol"?t:t+""}function aK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sK(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function lK(e){return e.index!=null}var gM=(e,t,n,r)=>{if(t==null)return To;var i=sK(e,t,n);if(i==null)return To;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(lK(i)){if(o)return md(md({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return md(md({},To),{},{coordinate:i.coordinate})},B0=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!dn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},vM=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},yM=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Tu=e=>e.options.tooltipPayloadSearcher,yl=e=>e.tooltip;function zO(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 VO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){cK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cK(e,t,n){return(t=uK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uK(e){var t=dK(e,"string");return typeof t=="symbol"?t:t+""}function dK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fK(e,t){return e??t}var bM=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:v}=p,b=fK(h,s),S=Array.isArray(b)?cA(b,c,u):b,w=(m=v?.dataKey)!==null&&m!==void 0?m:r,x=v?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=ZC(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=VO(VO({},v),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(ES({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:nt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(ES({tooltipEntrySettings:v,dataKey:w,payload:_,value:nt(_,w),name:(E=nt(_,x))!==null&&E!==void 0?E:v?.name}))}return f},d)}},W0=W([rn,Ee,IT,g0,Xt],ZT),pK=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),hK=W([Xt,ml],S0),Mu=W([pK,rn,hK],O0),mK=W([Mu],e=>e.filter(Sh)),gK=W([Mu],E0),bl=W([gK,na],P0),vK=W([mK,na,rn],NT),z0=W([bl,rn,Mu],C0),yK=W([rn],D0),bK=W([Mu],e=>e.filter(Sh)),xK=W([vK,bK,Eu],WT),wK=W([xK,na,Xt],zT),_K=W([Mu],LT),SK=W([bl,rn,_K,Eh,Xt],VT),OK=W([YT,Xt,ml],gl),EK=W([OK,Xt],qT),PK=W([UT,Xt,ml],gl),kK=W([PK,Xt],GT),CK=W([KT,Xt,ml],gl),DK=W([CK,Xt],XT),AK=W([EK,DK,kK],Qf),TK=W([rn,yK,wK,SK,AK,Ee,Xt],A0),xM=W([rn,Ee,bl,z0,Eu,Xt,TK],T0),MK=W([xM,rn,W0],j0),NK=W([rn,xM,MK,Xt],I0),wM=e=>{var t=Xt(e),n=ml(e),r=!1;return Au(e,t,n,r)},_M=W([rn,wM],xh),SM=W([rn,W0,NK,_M],N0),jK=W([Ee,z0,rn,Xt],oM),RK=W([Ee,z0,rn,Xt],aM),IK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Di(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?tn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},wo=W([Ee,rn,W0,SM,wM,jK,RK,Xt],IK),V0=W([lM,cM,GU],(e,t,n)=>uM(n.shared,e,t)),OM=e=>e.tooltip.settings.trigger,H0=e=>e.tooltip.settings.defaultIndex,Ch=W([yl,V0,OM,H0],gM),qo=W([Ch,bl],B0),EM=W([wo,qo],dM),PM=W([Ch],e=>{if(e)return e.dataKey}),kM=W([yl,V0,OM,H0],yM),FK=W([vo,yo,Ee,Kt,wo,H0,kM,Tu],vM),LK=W([Ch,FK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),$K=W([Ch],e=>e.active),BK=W([kM,qo,na,MT,EM,Tu,V0],bM),WK=W([BK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function HO(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 YO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(n),!0).forEach(function(r){zK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zK(e,t,n){return(t=VK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VK(e){var t=HK(e,"string");return typeof t=="symbol"?t:t+""}function HK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YK=()=>ce(rn),UK=()=>{var e=YK(),t=ce(wo),n=ce(SM);return Ga(YO(YO({},e),{},{scale:n}),t)},CM=()=>ce(g0),Y0=(e,t)=>t,DM=(e,t,n)=>n,U0=(e,t,n,r)=>r,KK=W(wo,e=>nh(e,t=>t.coordinate)),K0=W([yl,Y0,DM,U0],gM),AM=W([K0,bl],B0),qK=(e,t,n)=>{if(t!=null){var r=yl(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},TM=W([yl,Y0,DM,U0],yM),Zf=W([vo,yo,Ee,Kt,wo,U0,TM,Tu],vM),GK=W([K0,Zf],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),MM=W(wo,AM,dM),XK=W([TM,AM,na,MT,MM,Tu,Y0],bM),QK=W([K0],e=>({isActive:e.active,activeIndex:e.index})),ZK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=x7(e.chartX,e.chartY,t,n,s);if(l){var c=_7(l,t),u=l7(c,a,o,r,i),d=w7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(null,arguments)}function UO(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 gd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){JK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JK(e,t,n){return(t=eq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eq(e){var t=tq(e,"string");return typeof t=="symbol"?t:t+""}function tq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nq(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=_V;else if(c==="BarChart")p=SV(a,u,i,o),m=EA;else if(a==="radial"){var{cx:h,cy:v,radius:b,startAngle:S,endAngle:w}=PA(u);p={cx:h,cy:v,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=CA}else p={points:nH(a,u,i)},m=Ns;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=gd(gd(gd(gd({stroke:"#ccc",pointerEvents:"none"},i),p),ct(s,!1)),{},{payload:d,payloadIndex:f,className:oe("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function rq(e){var t=UK(),n=gA(),r=bu(),i=CM();return O.createElement(nq,fy({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var NM=k.createContext(null),iq=()=>k.useContext(NM),Ag={exports:{}},KO;function oq(){return KO||(KO=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var v=this._events[h],b=arguments.length,S,w;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,d),!0;case 4:return v.fn.call(v.context,u,d,f),!0;case 5:return v.fn.call(v.context,u,d,f,p),!0;case 6:return v.fn.call(v.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];v.fn.apply(v.context,S)}else{var x=v.length,_;for(w=0;w<x;w++)switch(v[w].once&&this.removeListener(c,v[w].fn,void 0,!0),b){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,d);break;case 4:v[w].fn.call(v[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];v[w].fn.apply(v[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,v=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&v.push(m[h]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Ag)),Ag.exports}var aq=oq();const sq=ho(aq);var Vc=new sq,py="recharts.syncEvent.tooltip",qO="recharts.syncEvent.brush";function Dh(e,t){if(t){var n=Number.parseInt(t,10);if(!kn(n))return e?.[n]}}var lq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},jM=br({name:"options",initialState:lq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),cq=jM.reducer,{createEventEmitter:uq}=jM.actions;function dq(e){return e.tooltip.syncInteraction}var fq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},RM=br({name:"chartData",initialState:fq,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:GO,setDataStartEndIndexes:pq,setComputedData:pfe}=RM.actions,hq=RM.reducer,mq=["x","y"];function XO(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 da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(r){gq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gq(e,t,n){return(t=vq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vq(e){var t=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bq(e,t){if(e==null)return{};var n,r,i=xq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var IM=()=>{};function wq(){var e=ce(v0),t=ce(y0),n=xt(),r=ce(PT),i=ce(wo),o=bu(),a=dh(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return IM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,v=bq(p,mq),b=da(da(da({},v),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=da(da({},u),{},{payload:da(da({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(uy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=uy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Vc.on(py,l),()=>{Vc.off(py,l)}},[s,n,t,e,r,i,o,a])}function _q(){var e=ce(v0),t=ce(y0),n=xt();k.useEffect(()=>{if(e==null)return IM;var r=(i,o,a)=>{t!==a&&e===i&&n(pq(o))};return Vc.on(qO,r),()=>{Vc.off(qO,r)}},[n,t,e])}function Sq(){var e=xt();k.useEffect(()=>{e(uq())},[e]),wq(),_q()}function Oq(e,t,n,r,i,o){var a=ce(f=>qK(f,e,t)),s=ce(y0),l=ce(v0),c=ce(PT),u=ce(dq),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=uy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Vc.emit(py,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function QO(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 ZO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){Eq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eq(e,t,n){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=kq(e,"string");return typeof t=="symbol"?t:t+""}function kq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cq(e){return e.dataKey}function Dq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(eV,t)}var JO=[],Aq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!bo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function on(e){var t=qt(e,Aq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:v,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=xt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(JU({shared:v,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,v,b,x,n,E]);var C=dh(),D=xA(),T=qU(v),{activeIndex:j,isActive:A}=ce(ee=>QK(ee,T,b,E)),P=ce(ee=>XK(ee,T,b,E)),N=ce(ee=>MM(ee,T,b,E)),M=ce(ee=>GK(ee,T,b,E)),I=P,F=iq(),$=n??A,[V,z]=ND([I,$]),B=T==="axis"?N:void 0;Oq(T,b,M,B,j,$);var X=w??F;if(X==null)return null;var q=I??JO;$||(q=JO),s&&q.length&&(q=kD(I.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,Cq));var re=q.length>0,J=O.createElement(sV,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},Dq(a,ZO(ZO({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ui.createPortal(J,X),$&&O.createElement(rq,{cursor:h,tooltipEventType:T,coordinate:M,payload:I,index:j}))}var Tg={},Mg={},Ng={},eE;function Tq(){return eE||(eE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},v=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=v,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(Ng)),Ng}var tE;function Mq(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Mg)),Mg}var nE;function Nq(){return nE||(nE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(Tg)),Tg}var jg,rE;function jq(){return rE||(rE=1,jg=Nq().throttle),jg}var Rq=jq();const Iq=ho(Rq);var Fq=process.env.NODE_ENV!=="production",hc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(Fq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function iE(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 Rg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(n),!0).forEach(function(r){Lq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lq(e,t,n){return(t=$q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $q(e){var t=Bq(e,"string");return typeof t=="symbol"?t:t+""}function Bq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lt=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),v=k.useRef();v.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=v.current)===null||j===void 0||j.call(v,A,P)};u>0&&(_=Iq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;hc(Aa(i)||Aa(o),`The width(%s) and height(%s) are both fixed numbers,
|
|
203
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},tH={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},CA=e=>{var t=qt(e,tH),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=oe("recharts-sector",d),p=o-i,m=Pn(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=eH({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=kA({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",Jv({},ct(t,!0),{className:f,d:h}))};function nH(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return PA(t);return[{x:r,y:i},{x:o,y:a}]}var yg={},bg={},xg={},US;function rH(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(xg)),xg}var KS;function iH(){return KS||(KS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rH();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(bg)),bg}var qS;function oH(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TD(),n=iH();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(yg)),yg}var wg,GS;function aH(){return GS||(GS=1,wg=oH().range),wg}var sH=aH();const DA=ho(sH);function Bo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function lH(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Hb(e){let t,n,r;e.length!==2?(t=Bo,n=(s,l)=>Bo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bo||e===lH?e:cH,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function cH(){return 0}function AA(e){return e===null?NaN:+e}function*uH(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const dH=Hb(Bo),xu=dH.right;Hb(AA).center;class XS extends Map{constructor(t,n=hH){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(QS(this,t))}has(t){return super.has(QS(this,t))}set(t,n){return super.set(fH(this,t),n)}delete(t){return super.delete(pH(this,t))}}function QS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fH({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function pH({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function hH(e){return e!==null&&typeof e=="object"?e.valueOf():e}function mH(e=Bo){if(e===Bo)return TA;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 TA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const gH=Math.sqrt(50),vH=Math.sqrt(10),yH=Math.sqrt(2);function Bf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=gH?10:o>=vH?5:o>=yH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Bf(e,t,n*2):[s,l,c]}function ey(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Bf(t,e,n):Bf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function ty(e,t,n){return t=+t,e=+e,n=+n,Bf(e,t,n)[2]}function ny(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ty(t,e,n):ty(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ZS(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function JS(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function MA(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?TA:mH(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));MA(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Ll(e,n,t),i(e[r],o)>0&&Ll(e,n,r);a<s;){for(Ll(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Ll(e,n,s):(++s,Ll(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ll(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function bH(e,t,n){if(e=Float64Array.from(uH(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return JS(e);if(t>=1)return ZS(e);var r,i=(r-1)*t,o=Math.floor(i),a=ZS(MA(e,o).subarray(0,o+1)),s=JS(e.subarray(o+1));return a+(s-a)*(i-o)}}function xH(e,t,n=AA){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,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function wH(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xo(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 ry=Symbol("implicit");function Yb(){var e=new XS,t=[],n=[],r=ry;function i(o){let a=e.get(o);if(a===void 0){if(r!==ry)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new XS;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Yb(t,n).unknown(r)},Vr.apply(i,arguments),i}function Ub(){var e=Yb().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var v=wH(f).map(function(b){return m+o*b});return n(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Ub(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function NA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return NA(t())},e}function _H(){return NA(Ub.apply(null,arguments).paddingInner(1))}function Kb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jA(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wu(){}var Fc=.7,Wf=1/Fc,js="\\s*([+-]?\\d+)\\s*",Lc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SH=/^#([0-9a-f]{3,8})$/,OH=new RegExp(`^rgb\\(${js},${js},${js}\\)$`),EH=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),PH=new RegExp(`^rgba\\(${js},${js},${js},${Lc}\\)$`),kH=new RegExp(`^rgba\\(${bi},${bi},${bi},${Lc}\\)$`),CH=new RegExp(`^hsl\\(${Lc},${bi},${bi}\\)$`),DH=new RegExp(`^hsla\\(${Lc},${bi},${bi},${Lc}\\)$`),eO={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};Kb(wu,$c,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tO,formatHex:tO,formatHex8:AH,formatHsl:TH,formatRgb:nO,toString:nO});function tO(){return this.rgb().formatHex()}function AH(){return this.rgb().formatHex8()}function TH(){return RA(this).formatHsl()}function nO(){return this.rgb().formatRgb()}function $c(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rO(t):n===3?new Xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fd(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=OH.exec(e))?new Xn(t[1],t[2],t[3],1):(t=EH.exec(e))?new Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=PH.exec(e))?fd(t[1],t[2],t[3],t[4]):(t=kH.exec(e))?fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CH.exec(e))?aO(t[1],t[2]/100,t[3]/100,1):(t=DH.exec(e))?aO(t[1],t[2]/100,t[3]/100,t[4]):eO.hasOwnProperty(e)?rO(eO[e]):e==="transparent"?new Xn(NaN,NaN,NaN,0):null}function rO(e){return new Xn(e>>16&255,e>>8&255,e&255,1)}function fd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xn(e,t,n,r)}function MH(e){return e instanceof wu||(e=$c(e)),e?(e=e.rgb(),new Xn(e.r,e.g,e.b,e.opacity)):new Xn}function iy(e,t,n,r){return arguments.length===1?MH(e):new Xn(e,t,n,r??1)}function Xn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Kb(Xn,iy,jA(wu,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fc:Math.pow(Fc,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xn(Ba(this.r),Ba(this.g),Ba(this.b),zf(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:iO,formatHex:iO,formatHex8:NH,formatRgb:oO,toString:oO}));function iO(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function NH(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function oO(){const e=zf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ba(this.r)}, ${Ba(this.g)}, ${Ba(this.b)}${e===1?")":`, ${e})`}`}function zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ba(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ta(e){return e=Ba(e),(e<16?"0":"")+e.toString(16)}function aO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kr(e,t,n,r)}function RA(e){if(e instanceof Kr)return new Kr(e.h,e.s,e.l,e.opacity);if(e instanceof wu||(e=$c(e)),!e)return new Kr;if(e instanceof Kr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Kr(a,s,l,e.opacity)}function jH(e,t,n,r){return arguments.length===1?RA(e):new Kr(e,t,n,r??1)}function Kr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Kb(Kr,jH,jA(wu,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fc:Math.pow(Fc,e),new Kr(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 Xn(_g(e>=240?e-240:e+120,i,r),_g(e,i,r),_g(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kr(sO(this.h),pd(this.s),pd(this.l),zf(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=zf(this.opacity);return`${e===1?"hsl(":"hsla("}${sO(this.h)}, ${pd(this.s)*100}%, ${pd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sO(e){return e=(e||0)%360,e<0?e+360:e}function pd(e){return Math.max(0,Math.min(1,e||0))}function _g(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 qb=e=>()=>e;function RH(e,t){return function(n){return e+n*t}}function IH(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 FH(e){return(e=+e)==1?IA:function(t,n){return n-t?IH(t,n,e):qb(isNaN(t)?n:t)}}function IA(e,t){var n=t-e;return n?RH(e,n):qb(isNaN(e)?t:e)}const lO=(function e(t){var n=FH(t);function r(i,o){var a=n((i=iy(i)).r,(o=iy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=IA(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function LH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function $H(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function BH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=fl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function WH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Vf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zH(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]=fl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var oy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sg=new RegExp(oy.source,"g");function VH(e){return function(){return e}}function HH(e){return function(t){return e(t)+""}}function YH(e,t){var n=oy.lastIndex=Sg.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=oy.exec(e))&&(i=Sg.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Vf(r,i)})),n=Sg.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?HH(l[0].x):VH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function fl(e,t){var n=typeof t,r;return t==null||n==="boolean"?qb(t):(n==="number"?Vf:n==="string"?(r=$c(t))?(t=r,lO):YH:t instanceof $c?lO:t instanceof Date?WH:$H(t)?LH:Array.isArray(t)?BH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zH:Vf)(e,t)}function Gb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function UH(e,t){t===void 0&&(t=e,e=fl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function KH(e){return function(){return e}}function Hf(e){return+e}var cO=[0,1];function jn(e){return e}function ay(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KH(isNaN(t)?NaN:.5)}function qH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function GH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=ay(i,r),o=n(a,o)):(r=ay(r,i),o=n(o,a)),function(s){return o(r(s))}}function XH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=ay(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=xu(e,s,1,r)-1;return o[l](i[l](s))}}function _u(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ph(){var e=cO,t=cO,n=fl,r,i,o,a=jn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==jn&&(a=qH(e[0],e[f-1])),s=f>2?XH:GH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),Vf)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Hf),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Gb,u()},d.clamp=function(f){return arguments.length?(a=f?!0:jn,u()):a!==jn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function Xb(){return ph()(jn,jn)}function QH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Xs(e){return e=Yf(Math.abs(e)),e?e[1]:NaN}function ZH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function JH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var eY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(e){if(!(t=eY.exec(e)))throw new Error("invalid format: "+e);var t;return new Qb({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]})}Bc.prototype=Qb.prototype;function Qb(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+""}Qb.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 tY(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 FA;function nY(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(FA=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yf(e,Math.max(0,t+o-1))[0]}function uO(e,t){var n=Yf(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 dO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QH,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)=>uO(e*100,t),r:uO,s:nY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fO(e){return e}var pO=Array.prototype.map,hO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rY(e){var t=e.grouping===void 0||e.thousands===void 0?fO:ZH(pO.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+"",o=e.numerals===void 0?fO:JH(pO.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Bc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,v=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):dO[_]||(w===void 0&&(w=12),x=!0,_="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=dO[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function j(A){var P=E,N=C,M,I,F;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=tY(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?hO[8+FA/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,I=A.length;++M<I;)if(F=A.charCodeAt(M),48>F||F>57){N=(F===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!v&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&v&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Bc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Xs(f)/3)))*3,h=Math.pow(10,-m),v=hO[8+m/3];return function(b){return p(h*b)+v}}return{format:c,formatPrefix:u}}var hd,Zb,LA;iY({thousands:",",grouping:[3],currency:["$",""]});function iY(e){return hd=rY(e),Zb=hd.format,LA=hd.formatPrefix,hd}function oY(e){return Math.max(0,-Xs(Math.abs(e)))}function aY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xs(t)/3)))*3-Xs(Math.abs(e)))}function sY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xs(t)-Xs(e))+1}function $A(e,t,n,r){var i=ny(e,t,n),o;switch(r=Bc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=aY(i,a))&&(r.precision=o),LA(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=sY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=oY(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zb(r)}function ea(e){var t=e.domain;return e.ticks=function(n){var r=t();return ey(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return $A(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=ty(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function BA(){var e=Xb();return e.copy=function(){return _u(e,BA())},Vr.apply(e,arguments),ea(e)}function WA(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,Hf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return WA(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],ea(n)}function zA(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function mO(e){return Math.log(e)}function gO(e){return Math.exp(e)}function lY(e){return-Math.log(-e)}function cY(e){return-Math.exp(-e)}function uY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dY(e){return e===10?uY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fY(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 vO(e){return(t,n)=>-e(-t,n)}function Jb(e){const t=e(mO,gO),n=t.domain;let r=10,i,o;function a(){return i=fY(r),o=dY(r),n()[0]<0?(i=vO(i),o=vO(o),e(lY,cY)):e(mO,gO),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const v=s==null?10:+s;let b=[];if(!(r%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<v&&(b=ey(c,u,v))}else b=ey(f,p,Math.min(p-f,v)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Bc(l)).precision==null&&(l.trim=!0),l=Zb(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(zA(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function VA(){const e=Jb(ph()).domain([1,10]);return e.copy=()=>_u(e,VA()).base(e.base()),Vr.apply(e,arguments),e}function yO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function e0(e){var t=1,n=e(yO(t),bO(t));return n.constant=function(r){return arguments.length?e(yO(t=+r),bO(t)):t},ea(n)}function HA(){var e=e0(ph());return e.copy=function(){return _u(e,HA()).constant(e.constant())},Vr.apply(e,arguments)}function xO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hY(e){return e<0?-e*e:e*e}function t0(e){var t=e(jn,jn),n=1;function r(){return n===1?e(jn,jn):n===.5?e(pY,hY):e(xO(n),xO(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ea(t)}function n0(){var e=t0(ph());return e.copy=function(){return _u(e,n0()).exponent(e.exponent())},Vr.apply(e,arguments),e}function mY(){return n0.apply(null,arguments).exponent(.5)}function wO(e){return Math.sign(e)*e*e}function gY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function YA(){var e=Xb(),t=[0,1],n=!1,r;function i(o){var a=gY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(wO(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hf)).map(wO)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return YA(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vr.apply(i,arguments),ea(i)}function UA(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=xH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[xu(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Bo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return UA().domain(e).range(t).unknown(r)},Vr.apply(o,arguments)}function KA(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[xu(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return KA().domain([e,t]).range(i).unknown(o)},Vr.apply(ea(a),arguments)}function qA(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[xu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return qA().domain(e).range(t).unknown(n)},Vr.apply(i,arguments)}const Og=new Date,Eg=new Date;function Gt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Gt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Og.setTime(+o),Eg.setTime(+a),e(Og),e(Eg),Math.floor(n(Og,Eg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Uf=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uf);Uf.range;const qi=1e3,Mr=qi*60,Gi=Mr*60,lo=Gi*24,r0=lo*7,_O=lo*30,Pg=lo*365,Ma=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qi)},(e,t)=>(t-e)/qi,e=>e.getUTCSeconds());Ma.range;const i0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getMinutes());i0.range;const o0=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getUTCMinutes());o0.range;const a0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi-e.getMinutes()*Mr)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getHours());a0.range;const s0=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCHours());s0.range;const Su=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mr)/lo,e=>e.getDate()-1);Su.range;const hh=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);hh.range;const GA=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));GA.range;function os(e){return Gt(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())*Mr)/r0)}const mh=os(0),Kf=os(1),vY=os(2),yY=os(3),Qs=os(4),bY=os(5),xY=os(6);mh.range;Kf.range;vY.range;yY.range;Qs.range;bY.range;xY.range;function as(e){return Gt(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)/r0)}const gh=as(0),qf=as(1),wY=as(2),_Y=as(3),Zs=as(4),SY=as(5),OY=as(6);gh.range;qf.range;wY.range;_Y.range;Zs.range;SY.range;OY.range;const l0=Gt(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());l0.range;const c0=Gt(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());c0.range;const co=Gt(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());co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(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)});co.range;const uo=Gt(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());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(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)});uo.range;function XA(e,t,n,r,i,o){const a=[[Ma,1,qi],[Ma,5,5*qi],[Ma,15,15*qi],[Ma,30,30*qi],[o,1,Mr],[o,5,5*Mr],[o,15,15*Mr],[o,30,30*Mr],[i,1,Gi],[i,3,3*Gi],[i,6,6*Gi],[i,12,12*Gi],[r,1,lo],[r,2,2*lo],[n,1,r0],[t,1,_O],[t,3,3*_O],[e,1,Pg]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=Hb(([,,v])=>v).right(a,f);if(p===a.length)return e.every(ny(c/Pg,u/Pg,d));if(p===0)return Uf.every(Math.max(ny(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[EY,PY]=XA(uo,c0,gh,GA,s0,o0),[kY,CY]=XA(co,l0,mh,Su,a0,i0);function kg(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 Cg(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 $l(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function DY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Bl(i),u=Wl(i),d=Bl(o),f=Wl(o),p=Bl(a),m=Wl(a),h=Bl(s),v=Wl(s),b=Bl(l),S=Wl(l),w={a:$,A:V,b:z,B,c:null,d:CO,e:CO,f:ZY,g:l9,G:u9,H:GY,I:XY,j:QY,L:QA,m:JY,M:e9,p:X,q,Q:TO,s:MO,S:t9,u:n9,U:r9,V:i9,w:o9,W:a9,x:null,X:null,y:s9,Y:c9,Z:d9,"%":AO},x={a:re,A:J,b:ee,B:ie,c:null,d:DO,e:DO,f:m9,g:E9,G:k9,H:f9,I:p9,j:h9,L:JA,m:g9,M:v9,p:ae,q:ue,Q:TO,s:MO,S:y9,u:b9,U:x9,V:w9,w:_9,W:S9,x:null,X:null,y:O9,Y:P9,Z:C9,"%":AO},_={a:j,A,b:P,B:N,c:M,d:PO,e:PO,f:YY,g:EO,G:OO,H:kO,I:kO,j:WY,L:HY,m:BY,M:zY,p:T,q:$Y,Q:KY,s:qY,S:VY,u:jY,U:RY,V:IY,w:NY,W:FY,x:I,X:F,y:EO,Y:OO,Z:LY,"%":UY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var R=[],ge=-1,te=0,ve=U.length,we,Le,st;for(Z instanceof Date||(Z=new Date(+Z));++ge<ve;)U.charCodeAt(ge)===37&&(R.push(U.slice(te,ge)),(Le=SO[we=U.charAt(++ge)])!=null?we=U.charAt(++ge):Le=we==="e"?" ":"0",(st=K[we])&&(we=st(Z,Le)),R.push(we),te=ge+1);return R.push(U.slice(te,ge)),R.join("")}}function C(U,K){return function(Z){var R=$l(1900,void 0,1),ge=D(R,U,Z+="",0),te,ve;if(ge!=Z.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(K&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(te=Cg($l(R.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?qf.ceil(te):qf(te),te=hh.offset(te,(R.V-1)*7),R.y=te.getUTCFullYear(),R.m=te.getUTCMonth(),R.d=te.getUTCDate()+(R.w+6)%7):(te=kg($l(R.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Kf.ceil(te):Kf(te),te=Su.offset(te,(R.V-1)*7),R.y=te.getFullYear(),R.m=te.getMonth(),R.d=te.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ve="Z"in R?Cg($l(R.y,0,1)).getUTCDay():kg($l(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ve+5)%7:R.w+R.U*7-(ve+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Cg(R)):kg(R)}}function D(U,K,Z,R){for(var ge=0,te=K.length,ve=Z.length,we,Le;ge<te;){if(R>=ve)return-1;if(we=K.charCodeAt(ge++),we===37){if(we=K.charAt(ge++),Le=_[we in SO?K.charAt(ge++):we],!Le||(R=Le(U,Z,R))<0)return-1}else if(we!=Z.charCodeAt(R++))return-1}return R}function T(U,K,Z){var R=c.exec(K.slice(Z));return R?(U.p=u.get(R[0].toLowerCase()),Z+R[0].length):-1}function j(U,K,Z){var R=p.exec(K.slice(Z));return R?(U.w=m.get(R[0].toLowerCase()),Z+R[0].length):-1}function A(U,K,Z){var R=d.exec(K.slice(Z));return R?(U.w=f.get(R[0].toLowerCase()),Z+R[0].length):-1}function P(U,K,Z){var R=b.exec(K.slice(Z));return R?(U.m=S.get(R[0].toLowerCase()),Z+R[0].length):-1}function N(U,K,Z){var R=h.exec(K.slice(Z));return R?(U.m=v.get(R[0].toLowerCase()),Z+R[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function I(U,K,Z){return D(U,n,K,Z)}function F(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function ie(U){return s[U.getUTCMonth()]}function ae(U){return i[+(U.getUTCHours()>=12)]}function ue(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var SO={"-":"",_:" ",0:"0"},nn=/^\s*\d+/,AY=/^%/,TY=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function MY(e){return e.replace(TY,"\\$&")}function Bl(e){return new RegExp("^(?:"+e.map(MY).join("|")+")","i")}function Wl(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function NY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function RY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function IY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function FY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function OO(e,t,n){var r=nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function EO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LY(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 $Y(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function BY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function PO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function WY(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HY(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function YY(e,t,n){var r=nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function UY(e,t,n){var r=AY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function KY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function CO(e,t){return Ne(e.getDate(),t,2)}function GY(e,t){return Ne(e.getHours(),t,2)}function XY(e,t){return Ne(e.getHours()%12||12,t,2)}function QY(e,t){return Ne(1+Su.count(co(e),e),t,3)}function QA(e,t){return Ne(e.getMilliseconds(),t,3)}function ZY(e,t){return QA(e,t)+"000"}function JY(e,t){return Ne(e.getMonth()+1,t,2)}function e9(e,t){return Ne(e.getMinutes(),t,2)}function t9(e,t){return Ne(e.getSeconds(),t,2)}function n9(e){var t=e.getDay();return t===0?7:t}function r9(e,t){return Ne(mh.count(co(e)-1,e),t,2)}function ZA(e){var t=e.getDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function i9(e,t){return e=ZA(e),Ne(Qs.count(co(e),e)+(co(e).getDay()===4),t,2)}function o9(e){return e.getDay()}function a9(e,t){return Ne(Kf.count(co(e)-1,e),t,2)}function s9(e,t){return Ne(e.getFullYear()%100,t,2)}function l9(e,t){return e=ZA(e),Ne(e.getFullYear()%100,t,2)}function c9(e,t){return Ne(e.getFullYear()%1e4,t,4)}function u9(e,t){var n=e.getDay();return e=n>=4||n===0?Qs(e):Qs.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function d9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function DO(e,t){return Ne(e.getUTCDate(),t,2)}function f9(e,t){return Ne(e.getUTCHours(),t,2)}function p9(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function h9(e,t){return Ne(1+hh.count(uo(e),e),t,3)}function JA(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function m9(e,t){return JA(e,t)+"000"}function g9(e,t){return Ne(e.getUTCMonth()+1,t,2)}function v9(e,t){return Ne(e.getUTCMinutes(),t,2)}function y9(e,t){return Ne(e.getUTCSeconds(),t,2)}function b9(e){var t=e.getUTCDay();return t===0?7:t}function x9(e,t){return Ne(gh.count(uo(e)-1,e),t,2)}function eT(e){var t=e.getUTCDay();return t>=4||t===0?Zs(e):Zs.ceil(e)}function w9(e,t){return e=eT(e),Ne(Zs.count(uo(e),e)+(uo(e).getUTCDay()===4),t,2)}function _9(e){return e.getUTCDay()}function S9(e,t){return Ne(qf.count(uo(e)-1,e),t,2)}function O9(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function E9(e,t){return e=eT(e),Ne(e.getUTCFullYear()%100,t,2)}function P9(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function k9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zs(e):Zs.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function C9(){return"+0000"}function AO(){return"%"}function TO(e){return+e}function MO(e){return Math.floor(+e/1e3)}var ys,tT,nT;D9({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 D9(e){return ys=DY(e),tT=ys.format,ys.parse,nT=ys.utcFormat,ys.utcParse,ys}function A9(e){return new Date(e)}function T9(e){return e instanceof Date?+e:+new Date(+e)}function u0(e,t,n,r,i,o,a,s,l,c){var u=Xb(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),v=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?v:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,T9)):f().map(A9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(zA(C,E)):u},u.copy=function(){return _u(u,u0(e,t,n,r,i,o,a,s,l,c))},u}function M9(){return Vr.apply(u0(kY,CY,co,l0,mh,Su,a0,i0,Ma,tT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function N9(){return Vr.apply(u0(EY,PY,uo,c0,gh,hh,s0,o0,Ma,nT).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function vh(){var e=0,t=1,n,r,i,o,a=jn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(fl),c.rangeRound=u(Gb),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function ta(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function rT(){var e=ea(vh()(jn));return e.copy=function(){return ta(e,rT())},xo.apply(e,arguments)}function iT(){var e=Jb(vh()).domain([1,10]);return e.copy=function(){return ta(e,iT()).base(e.base())},xo.apply(e,arguments)}function oT(){var e=e0(vh());return e.copy=function(){return ta(e,oT()).constant(e.constant())},xo.apply(e,arguments)}function d0(){var e=t0(vh());return e.copy=function(){return ta(e,d0()).exponent(e.exponent())},xo.apply(e,arguments)}function j9(){return d0.apply(null,arguments).exponent(.5)}function aT(){var e=[],t=jn;function n(r){if(r!=null&&!isNaN(r=+r))return t((xu(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(Bo),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,o)=>bH(e,o/r))},n.copy=function(){return aT(t).domain(e)},xo.apply(n,arguments)}function yh(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=jn,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(v){var b,S,w;return arguments.length?([b,S,w]=v,c=UH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(fl),p.rangeRound=m(Gb),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function sT(){var e=ea(yh()(jn));return e.copy=function(){return ta(e,sT())},xo.apply(e,arguments)}function lT(){var e=Jb(yh()).domain([.1,1,10]);return e.copy=function(){return ta(e,lT()).base(e.base())},xo.apply(e,arguments)}function cT(){var e=e0(yh());return e.copy=function(){return ta(e,cT()).constant(e.constant())},xo.apply(e,arguments)}function f0(){var e=t0(yh());return e.copy=function(){return ta(e,f0()).exponent(e.exponent())},xo.apply(e,arguments)}function R9(){return f0.apply(null,arguments).exponent(.5)}const ac=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ub,scaleDiverging:sT,scaleDivergingLog:lT,scaleDivergingPow:f0,scaleDivergingSqrt:R9,scaleDivergingSymlog:cT,scaleIdentity:WA,scaleImplicit:ry,scaleLinear:BA,scaleLog:VA,scaleOrdinal:Yb,scalePoint:_H,scalePow:n0,scaleQuantile:UA,scaleQuantize:KA,scaleRadial:YA,scaleSequential:rT,scaleSequentialLog:iT,scaleSequentialPow:d0,scaleSequentialQuantile:aT,scaleSequentialSqrt:j9,scaleSequentialSymlog:oT,scaleSqrt:mY,scaleSymlog:HA,scaleThreshold:qA,scaleTime:M9,scaleUtc:N9,tickFormat:$A},Symbol.toStringTag,{value:"Module"}));var na=e=>e.chartData,p0=W([na],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ou=(e,t,n,r)=>r?p0(e):na(e);function Js(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(dn(t)&&dn(n))return!0}return!1}function NO(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function I9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(dn(n))i=n;else if(typeof n=="function")return;if(dn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(Js(a))return a}}function F9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Js(r))return NO(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(pe(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&SS.test(i)){var l=SS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(pe(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&OS.test(o)){var u=OS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(Js(f))return t==null?f:NO(f,t,n)}}}var pl=1e9,L9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},m0,bt=!0,Fr="[DecimalError] ",Wa=Fr+"Invalid argument: ",h0=Fr+"Exponent out of range: ",hl=Math.floor,xa=Math.pow,$9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fr,Jt=1e7,ft=7,uT=9007199254740991,Gf=hl(uT/ft),fe={};fe.absoluteValue=fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};fe.comparedTo=fe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ft;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return to(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return at(to(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return zt(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fr))throw Error(Fr+"NaN");if(n.s<1)throw Error(Fr+(n.s?"NaN":"-Infinity"));return n.eq(fr)?new r(0):(bt=!1,t=to(Wc(n,o),Wc(e,o),o),bt=!0,at(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pT(t,e):dT(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Fr+"NaN");return n.s?(bt=!1,t=to(n,e,0,1).times(e),bt=!0,n.minus(t)):at(new r(n),i)};fe.naturalExponential=fe.exp=function(){return fT(this)};fe.naturalLogarithm=fe.ln=function(){return Wc(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dT(t,e):pT(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wa+e);if(t=zt(i)+1,r=i.d.length-1,n=r*ft+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};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Fr+"NaN")}for(e=zt(s),bt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=mi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=hl((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 l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(to(s,o,a+2)).times(.5),mi(o.d).slice(0,a)===(t=mi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(at(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return bt=!0,at(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%Jt|0,t=s/Jt|0;o[i]=(o[i]+t)%Jt|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,bt?at(e,d.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Oi(e,0,pl),t===void 0?t=r.rounding:Oi(t,0,8),at(n,e+zt(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xa(r,!0):(Oi(e,0,pl),t===void 0?t=i.rounding:Oi(t,0,8),r=at(new i(r),e+1,t),n=Xa(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xa(i):(Oi(e,0,pl),t===void 0?t=o.rounding:Oi(t,0,8),r=at(new o(i),e+zt(i)+1,t),n=Xa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return at(new t(e),zt(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(fr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Fr+"Infinity");return s}if(s.eq(fr))return s;if(r=l.precision,e.eq(fr))return at(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=uT){for(i=new l(fr),t=Math.ceil(r/ft+4),bt=!1;n%2&&(i=i.times(s),RO(i.d,t)),n=hl(n/2),n!==0;)s=s.times(s),RO(s.d,t);return bt=!0,e.s<0?new l(fr).div(i):at(i,r)}}else if(o<0)throw Error(Fr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,bt=!1,i=e.times(Wc(s,r+c)),bt=!0,i=fT(i),i.s=o,i};fe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Xa(i,n<=o.toExpNeg||n>=o.toExpPos)):(Oi(e,1,pl),t===void 0?t=o.rounding:Oi(t,0,8),i=at(new o(i),e,t),n=zt(i),r=Xa(i,e<=n||n<=o.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Oi(e,1,pl),t===void 0?t=r.rounding:Oi(t,0,8)),at(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Xa(e,t<=n.toExpNeg||t>=n.toExpPos)};function dT(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),bt?at(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/ft),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/Jt|0,l[o]%=Jt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,bt?at(t,d):t}function Oi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Wa+e)}function mi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=ft-r.length,n&&(o+=Do(n)),o+=r;a=e[t],r=a+"",n=ft-r.length,n&&(o+=Do(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var to=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%Jt|0,a=o/Jt|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*Jt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,v,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Fr+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/ft+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*Jt+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=Jt/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),v=h.length;v<C;)h[v++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=Jt/2&&++E;do u=0,s=t(P,h,C,v),s<0?(b=h[0],C!=v&&(b=b*Jt+(h[1]||0)),u=b/E|0,u>1?(u>=Jt&&(u=Jt-1),d=e(P,u),f=d.length,v=h.length,s=t(d,h,f,v),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<v&&d.unshift(0),n(h,d,v),s==-1&&(v=h.length,s=t(P,h,C,v),s<1&&(u++,n(h,C<v?D:P,v))),v=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[v++]=A[x]||0:(h=[A[x]],v=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,at(p,a?o+zt(p)+1:o)}})();function fT(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(h0+zt(e));if(!e.s)return new u(fr);for(bt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(xa(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(fr),u.precision=s;;){if(i=at(i.times(e),s),n=n.times(++l),a=o.plus(to(i,n,s)),mi(a.d).slice(0,s)===mi(o.d).slice(0,s)){for(;c--;)o=at(o.times(o),s);return u.precision=d,t==null?(bt=!0,at(o,d)):o}o=a}}function zt(e){for(var t=e.e*ft,n=e.d[0];n>=10;n/=10)t++;return t}function Dg(e,t,n){if(t>e.LN10.sd())throw bt=!0,n&&(e.precision=n),Error(Fr+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Do(e){for(var t="";e--;)t+="0";return t}function Wc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,v=h.precision;if(p.s<1)throw Error(Fr+(p.s?"NaN":"-Infinity"));if(p.eq(fr))return new h(0);if(t==null?(bt=!1,c=v):c=t,p.eq(10))return t==null&&(bt=!0),Dg(h,c);if(c+=f,h.precision=c,n=mi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=mi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Dg(h,c+2,v).times(o+""),p=Wc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=v,t==null?(bt=!0,at(p,v)):p;for(s=a=p=to(p.minus(fr),p.plus(fr),c),u=at(p.times(p),c),i=3;;){if(a=at(a.times(u),c),l=s.plus(to(a,new h(i),c)),mi(l.d).slice(0,c)===mi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Dg(h,c+2,v).times(o+""))),s=to(s,new h(d),c),h.precision=v,t==null?(bt=!0,at(s,v)):s;s=l,i+=2}}function jO(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=hl(n/ft),e.d=[],r=(n+1)%ft,n<0&&(r+=ft),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=ft;r<i;)e.d.push(+t.slice(r,r+=ft));t=t.slice(r),r=ft-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bt&&(e.e>Gf||e.e<-Gf))throw Error(h0+n)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=ft,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/ft),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=ft,i=r-ft+a}if(n!==void 0&&(o=xa(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/xa(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=xa(10,(ft-t%ft)%ft),e.e=hl(-t/ft)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=xa(10,ft-r),d[u]=i>0?(c/xa(10,a-i)%xa(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==Jt&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=Jt)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(bt&&(e.e>Gf||e.e<-Gf))throw Error(h0+zt(e));return e}function pT(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),bt?at(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/ft),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=Jt-1;--l[o],l[i]+=Jt}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,bt?at(t,p):t):new f(0)}function Xa(e,t,n){var r,i=zt(e),o=mi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Do(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Do(-i-1)+o,n&&(r=n-a)>0&&(o+=Do(r))):i>=a?(o+=Do(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Do(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Do(r))),e.s<0?"-"+o:o}function RO(e,t){if(e.length>t)return e.length=t,!0}function hT(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Wa+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return jO(a,o.toString())}else if(typeof o!="string")throw Error(Wa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,$9.test(o))jO(a,o);else throw Error(Wa+o)}if(i.prototype=fe,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=hT,i.config=i.set=B9,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 B9(e){if(!e||typeof e!="object")throw Error(Fr+"Object expected");var t,n,r,i=["precision",1,pl,"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(hl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Wa+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Wa+n+": "+r);return this}var m0=hT(L9);fr=new m0(1);const Qe=m0;var W9=e=>e,mT={},gT=e=>e===mT,IO=e=>function t(){return arguments.length===0||arguments.length===1&&gT(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},vT=(e,t)=>e===1?t:IO(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==mT).length;return o>=e?t(...r):vT(e-o,IO(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>gT(u)?s.shift():u);return t(...c,...s)}))}),bh=e=>vT(e.length,e),sy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},z9=bh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),V9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return W9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},ly=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),yT=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function bT(e){var t;return e===0?t=1:t=Math.floor(new Qe(e).abs().log(10).toNumber())+1,t}function xT(e,t,n){for(var r=new Qe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}bh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});bh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});bh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var wT=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},_T=(e,t,n)=>{if(e.lte(0))return new Qe(0);var r=bT(e.toNumber()),i=new Qe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Qe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Qe(l.toNumber()):new Qe(Math.ceil(l.toNumber()))},H9=(e,t,n)=>{var r=new Qe(1),i=new Qe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Qe(10).pow(bT(e)-1),i=new Qe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Qe(Math.floor(e)))}else e===0?i=new Qe(Math.floor((t-1)/2)):n||(i=new Qe(Math.floor(e)));var a=Math.floor((t-1)/2),s=V9(z9(l=>i.add(new Qe(l-a).mul(r)).toNumber()),sy);return s(0,t)},ST=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=_T(new Qe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Qe(0):(s=new Qe(t).add(n).div(2),s=s.sub(new Qe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Qe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?ST(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Qe(l).mul(a)),tickMax:s.add(new Qe(c).mul(a))})};function Y9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=wT([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...sy(0,r-1).map(()=>1/0)]:[...sy(0,r-1).map(()=>-1/0),s];return t>n?ly(l):l}if(a===s)return H9(a,r,i);var{step:c,tickMin:u,tickMax:d}=ST(a,s,o,i,0),f=xT(u,d.add(new Qe(.1).mul(c)),c);return t>n?ly(f):f}function U9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=wT([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=_T(new Qe(a).sub(o).div(s-1),i,0),c=[...xT(new Qe(o),new Qe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?ly(c):c}var K9=yT(Y9),q9=yT(U9),OT=e=>e.rootProps.maxBarSize,G9=e=>e.rootProps.barGap,ET=e=>e.rootProps.barCategoryGap,X9=e=>e.rootProps.barSize,Eu=e=>e.rootProps.stackOffset,g0=e=>e.options.chartName,v0=e=>e.rootProps.syncId,PT=e=>e.rootProps.syncMethod,y0=e=>e.options.eventEmitter,Hi={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},cr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},xh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Q9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:Hi.reversed,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:Hi.type,unit:void 0},Z9={allowDataOverflow:cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:cr.scale,tick:cr.tick,tickCount:cr.tickCount,ticks:void 0,type:cr.type,unit:void 0},J9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},eU={allowDataOverflow:cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:cr.scale,tick:cr.tick,tickCount:cr.tickCount,ticks:void 0,type:"category",unit:void 0},b0=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?J9:Q9,x0=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?eU:Z9,wh=e=>e.polarOptions,w0=W([vo,yo,Kt],lA),kT=W([wh,w0],(e,t)=>{if(e!=null)return Pn(e.innerRadius,t,0)}),CT=W([wh,w0],(e,t)=>{if(e!=null)return Pn(e.outerRadius,t,t*.8)}),tU=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},DT=W([wh],tU);W([b0,DT],xh);var AT=W([w0,kT,CT],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([x0,AT],xh);var TT=W([Ee,wh,kT,CT,vo,yo],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:Pn(a,i,i/2),cy:Pn(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),wt=(e,t)=>t,Pu=(e,t,n)=>n;function _h(e){return e?.id}var Xt=e=>{var t=Ee(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},ml=e=>e.tooltip.settings.axisId,rn=e=>{var t=Xt(e),n=ml(e);return ku(e,t,n)},MT=W([rn],e=>e?.dataKey);function NT(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=_h(s);c.forEach((d,f)=>{var p=o==null||i?f:String(nt(d,o,null)),m=nt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function Sh(e){return e.stackId!=null&&e.dataKey!=null}function FO(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 Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FO(Object(n),!0).forEach(function(r){nU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nU(e,t,n){return(t=rU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rU(e){var t=iU(e,"string");return typeof t=="symbol"?t:t+""}function iU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=[0,"auto"],or={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},jT=(e,t)=>e.cartesianAxis.xAxis[t],Ai=(e,t)=>{var n=jT(e,t);return n??or},ar={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:cy,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:yu},RT=(e,t)=>e.cartesianAxis.yAxis[t],Ti=(e,t)=>{var n=RT(e,t);return n??ar},oU={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},_0=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??oU},Ft=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"zAxis":return _0(e,n);case"angleAxis":return b0(e,n);case"radiusAxis":return x0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},aU=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},ku=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"angleAxis":return b0(e,n);case"radiusAxis":return x0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},IT=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function S0(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Cu=e=>e.graphicalItems.cartesianItems,sU=W([wt,Pu],S0),O0=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Du=W([Cu,Ft,sU],O0),FT=W([Du],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Sh)),LT=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),$T=W([Du],LT),E0=e=>e.map(t=>t.data).filter(Boolean).flat(1),lU=W([Du],E0),P0=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},k0=W([lU,Ou],P0),C0=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:nt(i,r)}))):e.map(r=>({value:r})),Oh=W([k0,Ft,Du],C0);function BT(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ss(e){return e.filter(t=>Rr(t)||t instanceof Date).map(Number).filter(t=>kn(t)===!1)}function cU(e,t,n){return!n||typeof t!="number"||kn(t)?[]:n.length?ss(n.flatMap(r=>{var i=nt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!dn(o)||!dn(a)))return[t-o,t+a]})):[]}var uU=W([FT,Ou,rn],NT),WT=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(_h);return[a,{stackedData:m7(e,l,n),graphicalItems:s}]}))},zc=W([uU,FT,Eu],WT),zT=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=b7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},dU=W([zc,na,wt],zT),VT=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>BT(i,d)),u=nt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:cU(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:nt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Eh=e=>e.errorBars,HT=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>BT(n,r));W([$T,Eh,wt],HT);var fU=W([k0,Ft,$T,Eh,wt],VT);function pU(e){var{value:t}=e;if(Rr(t)||t instanceof Date)return t}var LO=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ss(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},hU=(e,t,n)=>{var r=e.map(pU).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&QC(r))?DA(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},D0=e=>{var t;if(e==null||!("domain"in e))return cy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ss(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:cy},Qf=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},YT=e=>e.referenceElements.dots,gl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),mU=W([YT,wt,Pu],gl),UT=e=>e.referenceElements.areas,gU=W([UT,wt,Pu],gl),KT=e=>e.referenceElements.lines,vU=W([KT,wt,Pu],gl),qT=(e,t)=>{var n=ss(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},yU=W(mU,wt,qT),GT=(e,t)=>{var n=ss(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},bU=W([gU,wt],GT),XT=(e,t)=>{var n=ss(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},xU=W(vU,wt,XT),wU=W(yU,xU,bU,(e,t,n)=>Qf(e,n,t)),QT=W([Ft],D0),A0=(e,t,n,r,i,o,a)=>{var s=I9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Qf(n,i,LO(r)):Qf(i,LO(r));return F9(t,c,e.allowDataOverflow)},_U=W([Ft,QT,dU,fU,wU,Ee,wt],A0),SU=[0,1],T0=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Di(t,o);return c&&s==null?DA(0,n.length):l==="category"?hU(r,e,c):i==="expand"?SU:a}},M0=W([Ft,Ee,k0,Oh,Eu,wt,_U],T0),ZT=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(fu(o));return s in ac?s:"point"}}},vl=W([Ft,Ee,IT,g0,wt],ZT);function OU(e){if(e!=null){if(e in ac)return ac[e]();var t="scale".concat(fu(e));if(t in ac)return ac[t]()}}function N0(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=OU(t);if(i!=null){var o=i.domain(n).range(r);return u7(o),o}}}var j0=(e,t,n)=>{var r=D0(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&Js(e))return K9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Js(e))return q9(e,t.tickCount,t.allowDecimals)}},R0=W([M0,ku,vl],j0),I0=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&Js(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},EU=W([Ft,M0,R0,wt],I0),PU=W(Oh,Ft,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ss(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),JT=W(PU,Ee,ET,Kt,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!dn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=Pn(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),kU=(e,t)=>{var n=Ai(e,t);return n==null||typeof n.padding!="string"?0:JT(e,"xAxis",t,n.padding)},CU=(e,t)=>{var n=Ti(e,t);return n==null||typeof n.padding!="string"?0:JT(e,"yAxis",t,n.padding)},DU=W(Ai,kU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),AU=W(Ti,CU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),TU=W([Kt,DU,uh,ch,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),MU=W([Kt,Ee,AU,uh,ch,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Au=(e,t,n,r)=>{var i;switch(t){case"xAxis":return TU(e,n,r);case"yAxis":return MU(e,n,r);case"zAxis":return(i=_0(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return DT(e);case"radiusAxis":return AT(e,n);default:return}},eM=W([Ft,Au],xh),Ko=W([Ft,vl,EU,eM],N0);W([Du,Eh,wt],HT);function tM(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ph=(e,t)=>t,kh=(e,t,n)=>n,NU=W(sh,Ph,kh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(tM)),jU=W(lh,Ph,kh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(tM)),nM=(e,t)=>({width:e.width,height:t.height}),RU=(e,t)=>{var n=typeof t.width=="number"?t.width:yu;return{width:n,height:e.height}},rM=W(Kt,Ai,nM),IU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},FU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},LU=W(yo,Kt,NU,Ph,kh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=nM(t,s);a==null&&(a=IU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),$U=W(vo,Kt,jU,Ph,kh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=RU(t,s);a==null&&(a=FU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),BU=(e,t)=>{var n=Ai(e,t);if(n!=null)return LU(e,n.orientation,n.mirror)},WU=W([Kt,Ai,BU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),zU=(e,t)=>{var n=Ti(e,t);if(n!=null)return $U(e,n.orientation,n.mirror)},VU=W([Kt,Ti,zU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),iM=W(Kt,Ti,(e,t)=>{var n=typeof t.width=="number"?t.width:yu;return{width:n,height:e.height}}),$O=(e,t,n)=>{switch(t){case"xAxis":return rM(e,n).width;case"yAxis":return iM(e,n).height;default:return}},oM=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Di(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&QC(l))return l}},F0=W([Ee,Oh,Ft,wt],oM),aM=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Di(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},L0=W([Ee,Oh,ku,wt],aM),BO=W([Ee,aU,vl,Ko,F0,L0,Au,R0,wt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Di(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),HU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Di(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?tn(o[0]-o[1])*2*m:m;var h=d||i;if(h){var v=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return v.filter(b=>!kn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},sM=W([Ee,ku,vl,Ko,R0,Au,F0,L0,wt],HU),YU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Di(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?tn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Ei=W([Ee,ku,Ko,Au,F0,L0,wt],YU),Pi=W(Ft,Ko,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),UU=W([Ft,vl,M0,eM],N0);W((e,t,n)=>_0(e,n),UU,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var KU=W([Ee,sh,lh],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),lM=e=>e.options.defaultTooltipEventType,cM=e=>e.options.validateTooltipEventTypes;function uM(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function $0(e,t){var n=lM(e),r=cM(e);return uM(t,n,r)}function qU(e){return ce(t=>$0(t,e))}var dM=(e,t)=>{var n,r=Number(t);if(!(kn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},GU=e=>e.tooltip.settings,To={active:!1,index:null,dataKey:void 0,coordinate:void 0},XU={itemInteraction:{click:To,hover:To},axisInteraction:{click:To,hover:To},keyboardInteraction:To,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},fM=br({name:"tooltip",initialState:XU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=eo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:QU,removeTooltipEntrySettings:ZU,setTooltipSettingsState:JU,setActiveMouseOverItemIndex:pM,mouseLeaveItem:eK,mouseLeaveChart:hM,setActiveClickItemIndex:tK,setMouseOverAxisIndex:mM,setMouseClickAxisIndex:nK,setSyncInteraction:uy,setKeyboardInteraction:dy}=fM.actions,rK=fM.reducer;function WO(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 md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){iK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iK(e,t,n){return(t=oK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oK(e){var t=aK(e,"string");return typeof t=="symbol"?t:t+""}function aK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sK(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function lK(e){return e.index!=null}var gM=(e,t,n,r)=>{if(t==null)return To;var i=sK(e,t,n);if(i==null)return To;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(lK(i)){if(o)return md(md({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return md(md({},To),{},{coordinate:i.coordinate})},B0=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!dn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},vM=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},yM=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Tu=e=>e.options.tooltipPayloadSearcher,yl=e=>e.tooltip;function zO(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 VO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){cK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cK(e,t,n){return(t=uK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uK(e){var t=dK(e,"string");return typeof t=="symbol"?t:t+""}function dK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fK(e,t){return e??t}var bM=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:v}=p,b=fK(h,s),S=Array.isArray(b)?cA(b,c,u):b,w=(m=v?.dataKey)!==null&&m!==void 0?m:r,x=v?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=ZC(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=VO(VO({},v),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(ES({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:nt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(ES({tooltipEntrySettings:v,dataKey:w,payload:_,value:nt(_,w),name:(E=nt(_,x))!==null&&E!==void 0?E:v?.name}))}return f},d)}},W0=W([rn,Ee,IT,g0,Xt],ZT),pK=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),hK=W([Xt,ml],S0),Mu=W([pK,rn,hK],O0),mK=W([Mu],e=>e.filter(Sh)),gK=W([Mu],E0),bl=W([gK,na],P0),vK=W([mK,na,rn],NT),z0=W([bl,rn,Mu],C0),yK=W([rn],D0),bK=W([Mu],e=>e.filter(Sh)),xK=W([vK,bK,Eu],WT),wK=W([xK,na,Xt],zT),_K=W([Mu],LT),SK=W([bl,rn,_K,Eh,Xt],VT),OK=W([YT,Xt,ml],gl),EK=W([OK,Xt],qT),PK=W([UT,Xt,ml],gl),kK=W([PK,Xt],GT),CK=W([KT,Xt,ml],gl),DK=W([CK,Xt],XT),AK=W([EK,DK,kK],Qf),TK=W([rn,yK,wK,SK,AK,Ee,Xt],A0),xM=W([rn,Ee,bl,z0,Eu,Xt,TK],T0),MK=W([xM,rn,W0],j0),NK=W([rn,xM,MK,Xt],I0),wM=e=>{var t=Xt(e),n=ml(e),r=!1;return Au(e,t,n,r)},_M=W([rn,wM],xh),SM=W([rn,W0,NK,_M],N0),jK=W([Ee,z0,rn,Xt],oM),RK=W([Ee,z0,rn,Xt],aM),IK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Di(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?tn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},wo=W([Ee,rn,W0,SM,wM,jK,RK,Xt],IK),V0=W([lM,cM,GU],(e,t,n)=>uM(n.shared,e,t)),OM=e=>e.tooltip.settings.trigger,H0=e=>e.tooltip.settings.defaultIndex,Ch=W([yl,V0,OM,H0],gM),qo=W([Ch,bl],B0),EM=W([wo,qo],dM),PM=W([Ch],e=>{if(e)return e.dataKey}),kM=W([yl,V0,OM,H0],yM),FK=W([vo,yo,Ee,Kt,wo,H0,kM,Tu],vM),LK=W([Ch,FK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),$K=W([Ch],e=>e.active),BK=W([kM,qo,na,MT,EM,Tu,V0],bM),WK=W([BK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function HO(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 YO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(n),!0).forEach(function(r){zK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zK(e,t,n){return(t=VK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VK(e){var t=HK(e,"string");return typeof t=="symbol"?t:t+""}function HK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YK=()=>ce(rn),UK=()=>{var e=YK(),t=ce(wo),n=ce(SM);return Ga(YO(YO({},e),{},{scale:n}),t)},CM=()=>ce(g0),Y0=(e,t)=>t,DM=(e,t,n)=>n,U0=(e,t,n,r)=>r,KK=W(wo,e=>nh(e,t=>t.coordinate)),K0=W([yl,Y0,DM,U0],gM),AM=W([K0,bl],B0),qK=(e,t,n)=>{if(t!=null){var r=yl(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},TM=W([yl,Y0,DM,U0],yM),Zf=W([vo,yo,Ee,Kt,wo,U0,TM,Tu],vM),GK=W([K0,Zf],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),MM=W(wo,AM,dM),XK=W([TM,AM,na,MT,MM,Tu,Y0],bM),QK=W([K0],e=>({isActive:e.active,activeIndex:e.index})),ZK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=x7(e.chartX,e.chartY,t,n,s);if(l){var c=_7(l,t),u=l7(c,a,o,r,i),d=w7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(null,arguments)}function UO(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 gd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){JK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JK(e,t,n){return(t=eq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eq(e){var t=tq(e,"string");return typeof t=="symbol"?t:t+""}function tq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nq(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=_V;else if(c==="BarChart")p=SV(a,u,i,o),m=EA;else if(a==="radial"){var{cx:h,cy:v,radius:b,startAngle:S,endAngle:w}=PA(u);p={cx:h,cy:v,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=CA}else p={points:nH(a,u,i)},m=Ns;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=gd(gd(gd(gd({stroke:"#ccc",pointerEvents:"none"},i),p),ct(s,!1)),{},{payload:d,payloadIndex:f,className:oe("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function rq(e){var t=UK(),n=gA(),r=bu(),i=CM();return O.createElement(nq,fy({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var NM=k.createContext(null),iq=()=>k.useContext(NM),Ag={exports:{}},KO;function oq(){return KO||(KO=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var v=this._events[h],b=arguments.length,S,w;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,d),!0;case 4:return v.fn.call(v.context,u,d,f),!0;case 5:return v.fn.call(v.context,u,d,f,p),!0;case 6:return v.fn.call(v.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];v.fn.apply(v.context,S)}else{var x=v.length,_;for(w=0;w<x;w++)switch(v[w].once&&this.removeListener(c,v[w].fn,void 0,!0),b){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,d);break;case 4:v[w].fn.call(v[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];v[w].fn.apply(v[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,v=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&v.push(m[h]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Ag)),Ag.exports}var aq=oq();const sq=ho(aq);var Vc=new sq,py="recharts.syncEvent.tooltip",qO="recharts.syncEvent.brush";function Dh(e,t){if(t){var n=Number.parseInt(t,10);if(!kn(n))return e?.[n]}}var lq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},jM=br({name:"options",initialState:lq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),cq=jM.reducer,{createEventEmitter:uq}=jM.actions;function dq(e){return e.tooltip.syncInteraction}var fq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},RM=br({name:"chartData",initialState:fq,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:GO,setDataStartEndIndexes:pq,setComputedData:ffe}=RM.actions,hq=RM.reducer,mq=["x","y"];function XO(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 da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(r){gq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gq(e,t,n){return(t=vq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vq(e){var t=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bq(e,t){if(e==null)return{};var n,r,i=xq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var IM=()=>{};function wq(){var e=ce(v0),t=ce(y0),n=xt(),r=ce(PT),i=ce(wo),o=bu(),a=dh(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return IM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,v=bq(p,mq),b=da(da(da({},v),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=da(da({},u),{},{payload:da(da({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(uy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=uy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Vc.on(py,l),()=>{Vc.off(py,l)}},[s,n,t,e,r,i,o,a])}function _q(){var e=ce(v0),t=ce(y0),n=xt();k.useEffect(()=>{if(e==null)return IM;var r=(i,o,a)=>{t!==a&&e===i&&n(pq(o))};return Vc.on(qO,r),()=>{Vc.off(qO,r)}},[n,t,e])}function Sq(){var e=xt();k.useEffect(()=>{e(uq())},[e]),wq(),_q()}function Oq(e,t,n,r,i,o){var a=ce(f=>qK(f,e,t)),s=ce(y0),l=ce(v0),c=ce(PT),u=ce(dq),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=uy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Vc.emit(py,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function QO(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 ZO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){Eq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eq(e,t,n){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=kq(e,"string");return typeof t=="symbol"?t:t+""}function kq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cq(e){return e.dataKey}function Dq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(eV,t)}var JO=[],Aq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!bo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function on(e){var t=qt(e,Aq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:v,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=xt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(JU({shared:v,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,v,b,x,n,E]);var C=dh(),D=xA(),T=qU(v),{activeIndex:j,isActive:A}=ce(ee=>QK(ee,T,b,E)),P=ce(ee=>XK(ee,T,b,E)),N=ce(ee=>MM(ee,T,b,E)),M=ce(ee=>GK(ee,T,b,E)),I=P,F=iq(),$=n??A,[V,z]=ND([I,$]),B=T==="axis"?N:void 0;Oq(T,b,M,B,j,$);var X=w??F;if(X==null)return null;var q=I??JO;$||(q=JO),s&&q.length&&(q=kD(I.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,Cq));var re=q.length>0,J=O.createElement(sV,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},Dq(a,ZO(ZO({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ui.createPortal(J,X),$&&O.createElement(rq,{cursor:h,tooltipEventType:T,coordinate:M,payload:I,index:j}))}var Tg={},Mg={},Ng={},eE;function Tq(){return eE||(eE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},v=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=v,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(Ng)),Ng}var tE;function Mq(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Mg)),Mg}var nE;function Nq(){return nE||(nE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(Tg)),Tg}var jg,rE;function jq(){return rE||(rE=1,jg=Nq().throttle),jg}var Rq=jq();const Iq=ho(Rq);var Fq=process.env.NODE_ENV!=="production",hc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(Fq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function iE(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 Rg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(n),!0).forEach(function(r){Lq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lq(e,t,n){return(t=$q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $q(e){var t=Bq(e,"string");return typeof t=="symbol"?t:t+""}function Bq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lt=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),v=k.useRef();v.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=v.current)===null||j===void 0||j.call(v,A,P)};u>0&&(_=Iq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;hc(Aa(i)||Aa(o),`The width(%s) and height(%s) are both fixed numbers,
|
|
204
204
|
maybe you don't need to use a ResponsiveContainer.`,i,o),hc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var C=Aa(i)?_:i,D=Aa(o)?E:o;return n&&n>0&&(C?D=C/n:D&&(C=D*n),l&&D>l&&(D=l)),hc(C>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
205
205
|
please check the style of container, or the props width(%s) and height(%s),
|
|
206
206
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
207
207
|
height and width.`,C,D,i,o,a,s,n),O.Children.map(c,T=>k.cloneElement(T,{width:C,height:D,style:Rg({width:C,height:D},T.props.style)}))},[n,c,o,l,s,a,b,i]);return O.createElement("div",{id:d?"".concat(d):void 0,className:oe("recharts-responsive-container",f),style:Rg(Rg({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:h},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},x))}),Vt=e=>null;Vt.displayName="Cell";function Wq(e,t,n){return(t=zq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zq(e){var t=Vq(e,"string");return typeof t=="symbol"?t:t+""}function Vq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Hq{constructor(t){Wq(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function oE(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 Yq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oE(Object(n),!0).forEach(function(r){Uq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uq(e,t,n){return(t=Kq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kq(e){var t=qq(e,"string");return typeof t=="symbol"?t:t+""}function qq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gq={cacheSize:2e3,enableCache:!0},FM=Yq({},Gq),aE=new Hq(FM.cacheSize),Xq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sE="recharts_measurement_span";function Qq(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var lE=(e,t)=>{try{var n=document.getElementById(sE);n||(n=document.createElement("span"),n.setAttribute("id",sE),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Xq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},mc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||bo.isSsr)return{width:0,height:0};if(!FM.enableCache)return lE(t,n);var r=Qq(t,n),i=aE.get(r);if(i)return i;var o=lE(t,n);return aE.set(r,o),o},cE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Zq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Jq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,LM={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},eG=Object.keys(LM),ks="NaN";function tG(e,t){return e*LM[t]}class Yn{static parse(t){var n,[,r,i]=(n=Jq.exec(t))!==null&&n!==void 0?n:[];return new Yn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,kn(t)&&(this.unit=""),n!==""&&!Zq.test(n)&&(this.num=NaN,this.unit=""),eG.includes(n)&&(this.num=tG(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return kn(this.num)}}function $M(e){if(e.includes(ks))return ks;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=cE.exec(t))!==null&&n!==void 0?n:[],a=Yn.parse(r??""),s=Yn.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return ks;t=t.replace(cE,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=uE.exec(t))!==null&&c!==void 0?c:[],p=Yn.parse(u??""),m=Yn.parse(f??""),h=d==="+"?p.add(m):p.subtract(m);if(h.isNaN())return ks;t=t.replace(uE,h.toString())}return t}var dE=/\(([^()]*)\)/;function nG(e){for(var t=e,n;(n=dE.exec(t))!=null;){var[,r]=n;t=t.replace(dE,$M(r))}return t}function rG(e){var t=e.replace(/\s+/g,"");return t=nG(t),t=$M(t),t}function iG(e){try{return rG(e)}catch{return ks}}function Ig(e){var t=iG(e.slice(5,-1));return t===ks?"":t}var oG=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],aG=["dx","dy","angle","className","breakAll"];function hy(){return hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hy.apply(null,arguments)}function fE(e,t){if(e==null)return{};var n,r,i=sG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var BM=/[ \f\n\r\t\v\u2028\u2029]+/,WM=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];ht(t)||(n?i=t.toString().split(""):i=t.toString().split(BM));var o=i.map(s=>({word:s,width:mc(s,r).width})),a=n?0:mc(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},lG=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=pe(o),u=a,d=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return A.reduce((P,N)=>{var{word:M,width:I}=N,F=P[P.length-1];if(F&&(r==null||i||F.width+I+n<Number(r)))F.words.push(M),F.width+=I+n;else{var $={words:[M],width:I};P.push($)}return P},[])},f=d(t),p=j=>j.reduce((A,P)=>A.width>P.width?A:P);if(!c||i)return f;var m=f.length>o||p(f).width>Number(r);if(!m)return f;for(var h="…",v=j=>{var A=u.slice(0,j),P=WM({breakAll:l,style:s,children:A+h}).wordsWithComputedWidth,N=d(P),M=N.length>o||p(N).width>Number(r);return[M,N]},b=0,S=u.length-1,w=0,x;b<=S&&w<=u.length-1;){var _=Math.floor((b+S)/2),E=_-1,[C,D]=v(E),[T]=v(_);if(!C&&!T&&(b=_+1),C&&T&&(S=_-1),!C&&T){x=D;break}w++}return x||f},pE=e=>{var t=ht(e)?[]:e.toString().split(BM);return[{words:t}]},cG=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!bo.isSsr){var s,l,c=WM({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return pE(r);return lG({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return pE(r)},hE="#808080",Ah=k.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=hE}=e,u=fE(e,oG),d=k.useMemo(()=>cG({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:f,dy:p,angle:m,className:h,breakAll:v}=u,b=fE(u,aG);if(!Rr(n)||!Rr(r)||d.length===0)return null;var S=n+(pe(f)?f:0),w=r+(pe(p)?p:0),x;switch(l){case"start":x=Ig("calc(".concat(o,")"));break;case"middle":x=Ig("calc(".concat((d.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:x=Ig("calc(".concat(d.length-1," * -").concat(i,")"));break}var _=[];if(a){var E=d[0].width,{width:C}=u;_.push("scale(".concat(pe(C)?C/E:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(S,", ").concat(w,")")),_.length&&(b.transform=_.join(" ")),O.createElement("text",hy({},ct(b,!0),{ref:t,x:S,y:w,className:oe("recharts-text",h),textAnchor:s,fill:c.includes("url")?hE:c}),d.map((D,T)=>{var j=D.words.join(v?"":" ");return O.createElement("tspan",{x:S,dy:T===0?x:i,key:"".concat(j,"-").concat(T)},j)}))});Ah.displayName="Text";var uG=["labelRef"];function dG(e,t){if(e==null)return{};var n,r,i=fG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mE(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 Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mE(Object(n),!0).forEach(function(r){pG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pG(e,t,n){return(t=hG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hG(e){var t=mG(e,"string");return typeof t=="symbol"?t:t+""}function mG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yi.apply(null,arguments)}var zM=k.createContext(null),VM=e=>{var{x:t,y:n,width:r,height:i,children:o}=e,a=k.useMemo(()=>({x:t,y:n,width:r,height:i}),[t,n,r,i]);return O.createElement(zM.Provider,{value:a},o)},HM=()=>{var e=k.useContext(zM),t=dh();return e||t},gG=k.createContext(null),vG=()=>{var e=k.useContext(gG),t=ce(TT);return e||t},yG=e=>{var{value:t,formatter:n}=e,r=ht(e.children)?t:e.children;return typeof n=="function"?n(r):r},q0=e=>e!=null&&typeof e=="function",bG=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},xG=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=i,m=(c+u)/2,h=bG(d,f),v=h>=0?1:-1,b,S;switch(t){case"insideStart":b=d+v*o,S=p;break;case"insideEnd":b=f-v*o,S=!p;break;case"end":b=f+v*o,S=p;break;default:throw new Error("Unsupported position ".concat(t))}S=h<=0?S:!S;var w=Wt(s,l,m,b),x=Wt(s,l,m,b+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
|
|
208
208
|
A`).concat(m,",").concat(m,",0,1,").concat(S?0:1,`,
|
|
209
|
-
`).concat(x.x,",").concat(x.y),E=ht(e.id)?Nc("recharts-radial-line-"):e.id;return O.createElement("text",Yi({},r,{dominantBaseline:"central",className:oe("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},wG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},YM=e=>"cx"in e&&pe(e.cx),_G=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!YM(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,v=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Mt(Mt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Mt(Mt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return Mt(Mt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Mt(Mt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Mt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Mt({x:a+l-h,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},E):i==="insideTop"?Mt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Mt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Mt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Mt({x:a+l-h,y:s+d,textAnchor:v,verticalAnchor:p},E):i==="insideBottomLeft"?Mt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Mt({x:a+l-h,y:s+c-d,textAnchor:v,verticalAnchor:f},E):i&&typeof i=="object"&&(pe(i.x)||Aa(i.x))&&(pe(i.y)||Aa(i.y))?Mt({x:a+Pn(i.x,l),y:s+Pn(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Mt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},SG={offset:5};function Ao(e){var t=qt(e,SG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=vG(),d=HM(),f=r==="center"?d:u??d,p=n||f;if(!p||ht(i)&&ht(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Mt(Mt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,v=dG(m,uG);return k.cloneElement(a,v)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=yG(t);var S=YM(p),w=ct(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return xG(t,r,b,w,p);var x=S?wG(p,t.offset,t.position):_G(t,p);return O.createElement(Ah,Yi({ref:c,className:oe("recharts-label",s)},w,x,{breakAll:l}),b)}Ao.displayName="Label";var OG=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(Ao,Yi({key:"label-implicit"},r)):Rr(e)?O.createElement(Ao,Yi({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===Ao?k.cloneElement(e,Mt({key:"label-implicit"},r)):O.createElement(Ao,Yi({key:"label-implicit",content:e},r)):q0(e)?O.createElement(Ao,Yi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(Ao,Yi({},e,{key:"label-implicit"},r)):null};function UM(e){var{label:t}=e,n=HM();return OG(t,n)||null}var Fg={},Lg={},gE;function EG(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(Lg)),Lg}var $g={},vE;function PG(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})($g)),$g}var yE;function kG(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EG(),n=PG(),r=Mb();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Fg)),Fg}var Bg,bE;function CG(){return bE||(bE=1,Bg=kG().last),Bg}var DG=CG();const AG=ho(DG);var TG=["valueAccessor"],MG=["dataKey","clockWise","id","textBreakAll"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(null,arguments)}function xE(e,t){if(e==null)return{};var n,r,i=NG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function NG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jG=e=>Array.isArray(e.value)?AG(e.value):e.value,KM=k.createContext(void 0),G0=KM.Provider,qM=k.createContext(void 0),RG=qM.Provider;function IG(){return k.useContext(KM)}function FG(){return k.useContext(qM)}function ef(e){var{valueAccessor:t=jG}=e,n=xE(e,TG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=xE(n,MG),l=IG(),c=FG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ht(r)?t(d,f):nt(d&&d.payload,r),h=ht(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(Ao,Jf({},ct(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}ef.displayName="LabelList";function Th(e){var{label:t}=e;return t?t===!0?O.createElement(ef,{key:"labelList-implicit"}):O.isValidElement(t)||q0(t)?O.createElement(ef,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(ef,Jf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(null,arguments)}var X0=e=>{var{cx:t,cy:n,r,className:i}=e,o=oe("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",my({},zr(e),Sb(e),{className:o,cx:t,cy:n,r})):null},GM=e=>e.graphicalItems.polarItems,LG=W([wt,Pu],S0),Q0=W([GM,Ft,LG],O0),$G=W([Q0],E0),Z0=W([$G,p0],P0),BG=W([Z0,Ft,Q0],C0),WG=W([Z0,Ft,Q0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=nt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),wE=()=>{},zG=W([Ft,QT,wE,WG,wE,Ee,wt],A0),XM=W([Ft,Ee,Z0,BG,Eu,wt,zG],T0),VG=W([XM,Ft,vl],j0);W([Ft,XM,VG,wt],I0);var HG={radiusAxis:{},angleAxis:{}},QM=br({name:"polarAxis",initialState:HG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:hfe,removeRadiusAxis:mfe,addAngleAxis:gfe,removeAngleAxis:vfe}=QM.actions,YG=QM.reducer;function _E(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 SE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(n),!0).forEach(function(r){UG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UG(e,t,n){return(t=KG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KG(e){var t=qG(e,"string");return typeof t=="symbol"?t:t+""}function qG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GG=(e,t)=>t,J0=W([GM,GG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),XG=[],ex=(e,t,n)=>n?.length===0?XG:n,ZM=W([p0,J0,ex],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>SE(SE({},t.presentationProps),o.props))),i!=null)return i}}),QG=W([ZM,J0,ex],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=nt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:Jo(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),ZG=W([ZM,J0,ex,Kt],(e,t,n,r)=>{if(!(t==null||e==null))return GX({offset:r,pieSettings:t,displayedData:e,cells:n})}),Wg={},OE;function JG(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Wg)),Wg}var zg,EE;function eX(){return EE||(EE=1,zg=JG().isPlainObject),zg}var tX=eX();const nX=ho(tX);function PE(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 kE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){rX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rX(e,t,n){return(t=iX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iX(e){var t=oX(e,"string");return typeof t=="symbol"?t:t+""}function oX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}var CE=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},aX={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sX=e=>{var t=qt(e,aX),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),v=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=dl(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=oe("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(n,r,i,o,a)})));var E=h.current,C=v.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=wA(["strokeDasharray"],c,l);return O.createElement(ul,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var I=tt(E,i,M),F=tt(C,o,M),$=tt(D,a,M),V=tt(T,n,M),z=tt(j,r,M);f.current&&(h.current=I,v.current=F,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(V,z,I,F,$),ref:f,style:kE(kE({},B),t.style)}))})},lX=["option","shapeType","propTransformer","activeClassName","isActive"];function cX(e,t){if(e==null)return{};var n,r,i=uX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function DE(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 tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DE(Object(n),!0).forEach(function(r){dX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dX(e,t,n){return(t=fX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fX(e){var t=pX(e,"string");return typeof t=="symbol"?t:t+""}function pX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hX(e,t){return tp(tp({},t),e)}function mX(e,t){return e==="symbols"}function AE(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(EA,n);case"trapezoid":return O.createElement(sX,n);case"sector":return O.createElement(CA,n);case"symbols":if(mX(t))return O.createElement(Db,n);break;default:return null}}function gX(e){return k.isValidElement(e)?e.props:e}function JM(e){var{option:t,shapeType:n,propTransformer:r=hX,activeClassName:i="recharts-active-shape",isActive:o}=e,a=cX(e,lX),s;if(k.isValidElement(t))s=k.cloneElement(t,tp(tp({},a),gX(t)));else if(typeof t=="function")s=t(a);else if(nX(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(AE,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(AE,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var tx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(pM({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},nx=e=>{var t=xt();return(n,r)=>i=>{e?.(n,r,i),t(eK())}},rx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(tK({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Mh(e){var{fn:t,args:n}=e,r=xt(),i=hn();return k.useEffect(()=>{if(!i){var o=t(n);return r(QU(o)),()=>{r(ZU(o))}}},[t,n,r,i]),null}var eN=()=>{};function ix(e){var{legendPayload:t}=e,n=xt(),r=hn();return k.useEffect(()=>r?eN:(n(yA(t)),()=>{n(bA(t))}),[n,r,t]),null}function vX(e){var{legendPayload:t}=e,n=xt(),r=ce(Ee);return k.useEffect(()=>r!=="centric"&&r!=="radial"?eN:(n(yA(t)),()=>{n(bA(t))}),[n,r,t]),null}var Vg,yX=()=>{var[e]=O.useState(()=>Nc("uid-"));return e},bX=(Vg=O.useId)!==null&&Vg!==void 0?Vg:yX;function xX(e,t){var n=bX();return t||(e?"".concat(e,"-").concat(n):n)}var wX=k.createContext(void 0),Nh=e=>{var{id:t,type:n,children:r}=e,i=xX("recharts-".concat(n),t);return O.createElement(wX.Provider,{value:i},r(i))},_X={cartesianItems:[],polarItems:[]},tN=br({name:"graphicalItems",initialState:_X,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=eo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=eo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=eo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:SX,replaceCartesianGraphicalItem:OX,removeCartesianGraphicalItem:EX,addPolarGraphicalItem:PX,removePolarGraphicalItem:kX}=tN.actions,CX=tN.reducer;function ox(e){var t=xt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(SX(e)):n.current!==e&&t(OX({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(EX(n.current)),n.current=null)},[t]),null}function DX(e){var t=xt();return k.useEffect(()=>(t(PX(e)),()=>{t(kX(e))}),[t,e]),null}var AX=["onMouseEnter","onClick","onMouseLeave"],TX=["id"],MX=["id"];function ax(e,t){if(e==null)return{};var n,r,i=NX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function NX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function TE(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 yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(n),!0).forEach(function(r){jX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jX(e,t,n){return(t=RX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Go.apply(null,arguments)}function FX(e){var t=k.useMemo(()=>Ob(e.children,Vt),[e.children]),n=ce(r=>QG(r,e.id,t));return n==null?null:O.createElement(vX,{legendPayload:n})}function LX(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:Jo(s,t),hide:l,type:c,color:a,unit:""}}}var $X=(e,t)=>e>t?"start":e<t?"end":"middle",BX=(e,t,n)=>Pn(typeof t=="function"?t(e):t,n,n*.8),WX=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=lA(o,a),l=i+Pn(e.cx,o,o/2),c=r+Pn(e.cy,a,a/2),u=Pn(e.innerRadius,s,0),d=BX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},zX=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function VX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var HX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement(Ns,Go({},t,{type:"linear",className:n}))},YX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=oe("recharts-pie-label-text",VX(e));return O.createElement(Ah,Go({},t,{alignmentBaseline:"middle",className:i}),r)};function UX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=zr(n),l=ct(i,!1),c=ct(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),v=yt(yt(yt(yt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:$X(h.x,f.cx)},h),b=yt(yt(yt(yt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&HX(o,b),YX(i,v,nt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function KX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Th,{label:i}):O.createElement(UX,{sectors:t,props:n,showLabels:r})}function qX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(qo),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=ax(i,AX),u=tx(a,i.dataKey),d=nx(l),f=rx(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,v=o?r:null,b=h?n:v,S=yt(yt({},p),{},{stroke:p.stroke,tabIndex:-1,[hA]:m,[mA]:i.dataKey});return O.createElement(Ot,Go({tabIndex:-1,className:"recharts-pie-sector"},pu(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(JM,Go({option:b,isActive:h,shapeType:"sector"},S)))}))}function GX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=zX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,v=r.filter(E=>nt(E,c,0)!==0).length,b=(m>=360?v:v-1)*h,S=m-v*f-b,w=r.reduce((E,C)=>{var D=nt(C,c,0);return E+(pe(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=nt(E,c,0),T=nt(E,u,C),j=WX(n,o,E),A=(pe(D)?D:0)/w,P,N=yt(yt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+tn(p)*h*(D!==0?1:0):P=s;var M=P+tn(p)*((D!==0?f:0)+A*S),I=(P+M)/2,F=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,F,I);return _=yt(yt(yt(yt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:I,middleRadius:F,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:tn(p)*h}),_})}return x}function XX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(RG,{value:t?i:void 0},r)}function QX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=dl(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),v=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(XX,{showLabels:!m,sectors:r},O.createElement(ul,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:v,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Ua(E,"paddingAngle",0):0;if(D){var j=tt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=yt(yt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=tt(0,P-N,S),I=yt(yt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(I),_=I.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(qX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(KX,{showLabels:!m,sectors:r,props:t}),t.children)}var ZX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!bo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function JX(e){var{id:t}=e,n=ax(e,TX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Ob(e.children,Vt),[e.children]),s=ce(u=>ZG(u,t,a)),l=k.useRef(null),c=oe("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Mh,{fn:LX,args:yt(yt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(QX,{props:yt(yt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Mi(e){var t=qt(e,ZX),{id:n}=t,r=ax(t,MX),i=zr(r);return O.createElement(Nh,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(DX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(FX,Go({},r,{id:o})),O.createElement(JX,Go({},r,{id:o}))))}Mi.displayName="Pie";function ME(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 NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(n),!0).forEach(function(r){eQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ME(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eQ(e,t,n){return(t=tQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tQ(e){var t=nQ(e,"string");return typeof t=="symbol"?t:t+""}function nQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rQ={xAxis:{},yAxis:{},zAxis:{}},nN=br({name:"cartesianAxis",initialState:rQ,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=NE(NE({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:iQ,removeXAxis:oQ,addYAxis:aQ,removeYAxis:sQ,addZAxis:yfe,removeZAxis:bfe,updateYAxisWidth:lQ}=nN.actions,cQ=nN.reducer,uQ=W([Kt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),dQ=W([uQ,vo,yo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),jh=()=>ce(dQ),fQ=()=>ce(WK);function jE(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?jE(Object(n),!0).forEach(function(r){pQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pQ(e,t,n){return(t=hQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hQ(e){var t=mQ(e,"string");return typeof t=="symbol"?t:t+""}function mQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=RE(RE({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},ct(i,!1)),Sb(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(X0,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function gy(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(qo),a=fQ();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ht(s)?null:gQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var vQ=process.env.NODE_ENV==="production",Hg="Invariant failed";function IE(e,t){if(vQ)throw new Error(Hg);var n=typeof t=="function"?t():t,r=n?"".concat(Hg,": ").concat(n):Hg;throw new Error(r)}var yQ=["x","y"];function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vy.apply(null,arguments)}function FE(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 zl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(r){bQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bQ(e,t,n){return(t=xQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xQ(e){var t=wQ(e,"string");return typeof t=="symbol"?t:t+""}function wQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _Q(e,t){if(e==null)return{};var n,r,i=SQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function SQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function OQ(e,t){var{x:n,y:r}=e,i=_Q(e,yQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return zl(zl(zl(zl(zl({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function sx(e){return O.createElement(JM,vy({shapeType:"rectangle",propTransformer:OQ,activeClassName:"recharts-active-bar"},e))}var EQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(pe(t))return t;var o=pe(r)||ht(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?IE(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):IE()),n)}},PQ={},rN=br({name:"errorBars",initialState:PQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:xfe,replaceErrorBar:wfe,removeErrorBar:_fe}=rN.actions,kQ=rN.reducer,CQ=["children"];function DQ(e,t){if(e==null)return{};var n,r,i=AQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var TQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},MQ=k.createContext(TQ);function iN(e){var{children:t}=e,n=DQ(e,CQ);return O.createElement(MQ.Provider,{value:n},t)}function Rh(e,t){var n,r,i=ce(c=>Ai(c,e)),o=ce(c=>Ti(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:or.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:ar.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function lx(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=jh(),{needClipX:o,needClipY:a,needClip:s}=Rh(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var NQ=["onMouseEnter","onMouseLeave","onClick"],jQ=["value","background","tooltipPosition"],RQ=["id"],IQ=["onMouseEnter","onClick","onMouseLeave"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function LE(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 Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LE(Object(n),!0).forEach(function(r){FQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FQ(e,t,n){return(t=LQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LQ(e){var t=$Q(e,"string");return typeof t=="symbol"?t:t+""}function $Q(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function np(e,t){if(e==null)return{};var n,r,i=BQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var WQ=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Jo(n,t),payload:e}]};function zQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Jo(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function VQ(e){var t=ce(qo),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=np(o,NQ),u=tx(a,r),d=nx(s),f=rx(l,r);if(!i||n==null)return null;var p=ct(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:v,background:b,tooltipPosition:S}=m,w=np(m,jQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Mn(Mn(Mn(Mn(Mn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),pu(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(sx,Xo({key:"background-bar-".concat(C.index)},C))}))}function HQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Mn(Mn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(G0,{value:t?i:void 0},n)}function YQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(qo),l=ce(PM),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(sx,Xo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function UQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(sx,Xo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function KQ(e){var{data:t,props:n}=e,r=zr(n),{id:i}=r,o=np(r,RQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=np(n,IQ),p=tx(c,s),m=nx(d),h=rx(u,s);return t?O.createElement(O.Fragment,null,t.map((v,b)=>O.createElement(Ot,Xo({className:"recharts-bar-rectangle"},pu(f,v,b),{onMouseEnter:p(v,b),onMouseLeave:m(v,b),onClick:h(v,b),key:"rectangle-".concat(v?.x,"-").concat(v?.y,"-").concat(v?.value,"-").concat(b)}),l?O.createElement(YQ,{shape:a,activeBar:l,baseProps:o,entry:v,index:b,dataKey:s}):O.createElement(UQ,{shape:a,baseProps:o,entry:v,index:b,dataKey:s})))):null}function qQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=dl(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,v=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(HQ,{showLabels:h,rects:r},O.createElement(ul,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:v,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Mn(Mn({},x),{},{x:tt(E.x,x.x,S),y:tt(E.y,x.y,S),width:tt(E.width,x.width,S),height:tt(E.height,x.height,S)});if(i==="horizontal"){var C=tt(0,x.height,S);return Mn(Mn({},x),{},{y:x.y+x.height-C,height:C})}var D=tt(0,x.width,S);return Mn(Mn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(KQ,{props:t,data:w}))}),O.createElement(Th,{label:t.label}),t.children)}function GQ(e){var t=k.useRef(null);return O.createElement(qQ,{previousRectanglesRef:t,props:e})}var oN=0,XQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:nt(e,t)}};class QQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=oe("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(lx,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(VQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(GQ,this.props)))}}var ZQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!bo.isSsr,legendType:"rect",minPointSize:oN,xAxisId:0,yAxisId:0};function JQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Rh(t,n),f=bu(),p=hn(),m=Ob(e.children,Vt),h=ce(S=>kZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var v,b=h?.[0];return b==null||b.height==null||b.width==null?v=0:v=f==="vertical"?b.height/2:b.width/2,O.createElement(iN,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:XQ,errorBarOffset:v},O.createElement(QQ,Xo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function eZ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,v=u?h.scale.domain():null,b=g7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=d7(u[w],v):(x=nt(S,n),Array.isArray(x)||(x=[b,x]));var j=EQ(r,oN)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=_S({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=kn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var I=tn(D||j)*(Math.abs(j)-Math.abs(D));E-=I,D+=I}}else{var[F,$]=[a.scale(x[0]),a.scale(x[1])];if(_=F,E=_S({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-F,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=tn(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Mn(Mn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function tZ(e){var t=qt(e,ZQ),n=hn();return O.createElement(Nh,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:WQ(t)}),O.createElement(Mh,{fn:zQ,args:t}),O.createElement(ox,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:fA(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(JQ,Xo({},t,{id:r}))))}var Nn=O.memo(tZ);Nn.displayName="Bar";function $E(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 vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(n),!0).forEach(function(r){nZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nZ(e,t,n){return(t=rZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rZ(e){var t=iZ(e,"string");return typeof t=="symbol"?t:t+""}function iZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oZ=(e,t)=>t,aZ=(e,t,n)=>n,sZ=(e,t,n,r)=>r,lZ=(e,t,n,r,i)=>i,Nu=W([Cu,lZ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),cZ=W([Nu],e=>e?.maxBarSize),uZ=(e,t,n,r,i,o)=>o,BE=(e,t,n)=>{var r=n??e;if(!ht(r))return Pn(r,t,0)},dZ=W([Ee,Cu,oZ,aZ,sZ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),fZ=(e,t,n,r)=>{var i=Ee(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},pZ=(e,t,n)=>{var r=Ee(e);return r==="horizontal"?$O(e,"xAxis",t):$O(e,"yAxis",n)},hZ=(e,t,n)=>{var r={},i=e.filter(Sh),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=BE(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=BE(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},mZ=W([dZ,X9,pZ],hZ),gZ=(e,t,n,r,i)=>{var o,a,s=Nu(e,t,n,r,i);if(s!=null){var l=Ee(e),c=OT(e),{maxBarSize:u}=s,d=ht(u)?c:u,f,p;return l==="horizontal"?(f=Pi(e,"xAxis",t,r),p=Ei(e,"xAxis",t,r)):(f=Pi(e,"yAxis",n,r),p=Ei(e,"yAxis",n,r)),(o=(a=Ga(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},aN=(e,t,n,r)=>{var i=Ee(e),o,a;return i==="horizontal"?(o=Pi(e,"xAxis",t,r),a=Ei(e,"xAxis",t,r)):(o=Pi(e,"yAxis",n,r),a=Ei(e,"yAxis",n,r)),Ga(o,a)};function vZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=Pn(e,n,0,!0),s,l=[];if(dn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=Pn(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var v=dn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-v)/2,size:v}}],l)}return s}}var yZ=(e,t,n,r,i,o,a)=>{var s=ht(a)?t:a,l=vZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>vd(vd({},c),{},{position:vd(vd({},c.position),{},{offset:c.position.offset-i/2})}))),l},bZ=W([mZ,OT,G9,ET,gZ,aN,cZ],yZ),xZ=(e,t,n,r)=>Pi(e,"xAxis",t,r),wZ=(e,t,n,r)=>Pi(e,"yAxis",n,r),_Z=(e,t,n,r)=>Ei(e,"xAxis",t,r),SZ=(e,t,n,r)=>Ei(e,"yAxis",n,r),OZ=W([bZ,Nu],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),EZ=(e,t)=>{var n=_h(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},PZ=W([fZ,Nu],EZ),kZ=W([Kt,Bb,xZ,wZ,_Z,SZ,OZ,Ee,Ou,aN,PZ,Nu,uZ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:v}=d,b;if(v!=null&&v.length>0?b=v:b=p?.slice(m,h+1),b!=null)return eZ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),sN=e=>{var{chartData:t}=e,n=xt(),r=hn();return k.useEffect(()=>r?()=>{}:(n(GO(t)),()=>{n(GO(void 0))}),[t,n,r]),null},WE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},lN=br({name:"brush",initialState:WE,reducers:{setBrushSettings(e,t){return t.payload==null?WE:t.payload}}}),{setBrushSettings:Sfe}=lN.actions,CZ=lN.reducer;function zE(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 yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){cN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cN(e,t,n){return(t=DZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DZ(e){var t=AZ(e,"string");return typeof t=="symbol"?t:t+""}function AZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},MZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return TZ({x:t,y:n},{x:r,y:i})};class Ih{static create(t){return new Ih(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}cN(Ih,"EPS",1e-4);var NZ=e=>{var t=Object.keys(e).reduce((n,r)=>yd(yd({},n),{},{[r]:Ih.create(e[r])}),{});return yd(yd({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function jZ(e){return(e%180+180)%180}var RZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=jZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},IZ={dots:[],areas:[],lines:[]},uN=br({name:"referenceElements",initialState:IZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=eo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=eo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=eo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Ofe,removeDot:Efe,addArea:Pfe,removeArea:kfe,addLine:FZ,removeLine:LZ}=uN.actions,$Z=uN.reducer,dN=k.createContext(void 0),BZ=e=>{var{children:t}=e,[n]=k.useState("".concat(Nc("recharts"),"-clip")),r=jh();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(dN.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},WZ=()=>k.useContext(dN);function VE(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 HE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){cx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cx(e,t,n){return(t=zZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zZ(e){var t=VZ(e,"string");return typeof t=="symbol"?t:t+""}function VZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yy.apply(null,arguments)}var HZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",yy({},t,{className:"recharts-reference-line-line"})),n},YZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(kn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:v}=l,b=e.x.apply(v,{position:o});if(kn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function UZ(e){var t=xt();return k.useEffect(()=>(t(FZ(e)),()=>{t(LZ(e))})),null}function KZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=hn(),u=WZ(),d=ce(A=>Ai(A,i)),f=ce(A=>Ti(A,o)),p=ce(A=>Ko(A,"xAxis",i,c)),m=ce(A=>Ko(A,"yAxis",o,c)),h=dh(),v=Rr(t),b=Rr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=NZ({x:p,y:m}),w=r&&r.length===2,x=YZ(S,v,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=HE(HE({clipPath:T},ct(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:oe("recharts-reference-line",s)},HZ(a,j),O.createElement(VM,MZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(UM,{label:e.label}),e.children))}function qZ(e){return O.createElement(O.Fragment,null,O.createElement(UZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(KZ,e))}class ux extends k.Component{render(){return O.createElement(qZ,this.props)}}cx(ux,"displayName","ReferenceLine");cx(ux,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function el(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 fN(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 GZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return RZ(r,n)}function XZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function rp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function QZ(e,t){return fN(e,t+1)}function ZZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:fN(r,c)};var h=l,v,b=()=>(v===void 0&&(v=n(m,h)),v),S=m.coordinate,w=l===0||rp(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function YE(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 bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YE(Object(n),!0).forEach(function(r){JZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JZ(e,t,n){return(t=eJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eJ(e){var t=tJ(e,"string");return typeof t=="symbol"?t:t+""}function tJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nJ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var v=e*(p.coordinate+e*h()/2-l);o[f]=p=bn(bn({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else o[f]=p=bn(bn({},p),{},{tickCoord:p.coordinate});var b=rp(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=bn(bn({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function rJ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=bn(bn({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=rp(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=bn(bn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=bn(bn({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=bn(bn({},w),{},{tickCoord:w.coordinate});var C=rp(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=bn(bn({},w),{},{isShow:!0}))},v=0;v<m;v++)h(v);return a}function dx(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(pe(l)||bo.isSsr){var f;return(f=QZ(i,pe(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?mc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?GZ(mc(_,{fontSize:t,letterSpacing:n}),h,d):mc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?tn(i[1].coordinate-i[0].coordinate):1,S=XZ(o,b,m);return l==="equidistantPreserveStart"?ZZ(b,S,v,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=rJ(b,S,v,i,a,l==="preserveStartEnd"):p=nJ(b,S,v,i,a),p.filter(w=>w.isShow))}var iJ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},oJ=["axisLine","width","height","className","hide","ticks"],aJ=["viewBox"],sJ=["viewBox"];function by(e,t){if(e==null)return{};var n,r,i=lJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qa.apply(null,arguments)}function UE(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 Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UE(Object(n),!0).forEach(function(r){cJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cJ(e,t,n){return(t=uJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uJ(e){var t=dJ(e,"string");return typeof t=="symbol"?t:t+""}function dJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fx={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"};function fJ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Yt(Yt(Yt({},l),ct(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Yt(Yt({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Yt(Yt({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Qa({},c,{className:oe("recharts-cartesian-axis-line",Ua(s,"className"))}))}function pJ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,v=e.tickSize||a,b=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*v,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*v,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*v,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*v,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function hJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function mJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function gJ(e){var{option:t,tickProps:n,value:r}=e,i,o=oe(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Yt(Yt({},n),{},{className:o}));else if(typeof t=="function")i=t(Yt(Yt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=oe(a,t?.className)),i=O.createElement(Ah,Qa({},n,{className:a}),r)}return i}function vJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:v,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=dx(Yt(Yt({},w),{},{ticks:t}),b,S),E=hJ(c,u),C=mJ(c,u),D=zr(w),T=ct(n,!1),j=Yt(Yt({},D),{},{fill:"none"},ct(r,!1)),A=_.map((P,N)=>{var{line:M,tick:I}=pJ(P,d,f,p,m,c,h,u,v),F=Yt(Yt(Yt(Yt({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),I),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Qa({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},pu(x,P,N)),r&&O.createElement("line",Qa({},j,M,{className:oe("recharts-cartesian-axis-tick-line",Ua(r,"className"))})),n&&O.createElement(gJ,{option:n,tickProps:F,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var yJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=by(e,oJ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return iJ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var v=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(v);var b=v[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:oe("recharts-cartesian-axis",o),ref:m},O.createElement(fJ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:zr(e)}),O.createElement(vJ,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:d,getTicksConfig:e,events:l}),O.createElement(VM,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(UM,{label:e.label}),e.children))}),bJ=O.memo(yJ,(e,t)=>{var{viewBox:n}=e,r=by(e,aJ),{viewBox:i}=t,o=by(t,sJ);return el(n,i)&&el(r,o)}),px=O.forwardRef((e,t)=>{var n=qt(e,fx);return O.createElement(bJ,Qa({},n,{ref:t}))});px.displayName="CartesianAxis";var xJ=["x1","y1","x2","y2","key"],wJ=["offset"],_J=["xAxisId","yAxisId"],SJ=["xAxisId","yAxisId"];function KE(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 _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KE(Object(n),!0).forEach(function(r){OJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OJ(e,t,n){return(t=EJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EJ(e){var t=PJ(e,"string");return typeof t=="symbol"?t:t+""}function PJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Na.apply(null,arguments)}function ip(e,t){if(e==null)return{};var n,r,i=kJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var CJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function pN(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=ip(t,xJ),c=zr(l),{offset:u}=c,d=ip(c,wJ);n=O.createElement("line",Na({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function DJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,_J),l=i.map((c,u)=>{var d=_n(_n({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return pN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function AJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,SJ),l=i.map((c,u)=>{var d=_n(_n({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return pN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function TJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function MJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var NJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return uA(dx(_n(_n(_n({},fx),n),{},{ticks:dA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},jJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return uA(dx(_n(_n(_n({},fx),n),{},{ticks:dA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},RJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Hr(e){var t=Wb(),n=zb(),r=gA(),i=_n(_n({},qt(e,RJ)),{},{x:pe(e.x)?e.x:r.left,y:pe(e.y)?e.y:r.top,width:pe(e.width)?e.width:r.width,height:pe(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=hn(),h=ce(T=>BO(T,"xAxis",o,m)),v=ce(T=>BO(T,"yAxis",a,m));if(!pe(c)||c<=0||!pe(u)||u<=0||!pe(s)||s!==+s||!pe(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||NJ,S=i.horizontalCoordinatesGenerator||jJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:v?_n(_n({},v),{},{ticks:_?f:v.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);hc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?_n(_n({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);hc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(CJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(TJ,Na({},i,{horizontalPoints:w})),O.createElement(MJ,Na({},i,{verticalPoints:x})),O.createElement(DJ,Na({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:v})),O.createElement(AJ,Na({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:v})))}Hr.displayName="CartesianGrid";var hN=(e,t,n,r)=>Pi(e,"xAxis",t,r),mN=(e,t,n,r)=>Ei(e,"xAxis",t,r),gN=(e,t,n,r)=>Pi(e,"yAxis",n,r),vN=(e,t,n,r)=>Ei(e,"yAxis",n,r),IJ=W([Ee,hN,gN,mN,vN],(e,t,n,r,i)=>Di(e,"xAxis")?Ga(t,r,!1):Ga(n,i,!1)),FJ=(e,t,n,r,i)=>i;function LJ(e){return e.type==="line"}var $J=W([Cu,FJ],(e,t)=>e.filter(LJ).find(n=>n.id===t)),BJ=W([Ee,hN,gN,mN,vN,$J,IJ,Ou],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return lee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),WJ=["id"],zJ=["type","layout","connectNulls","needClip"],VJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function qE(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 ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(n),!0).forEach(function(r){HJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HJ(e,t,n){return(t=YJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YJ(e){var t=UJ(e,"string");return typeof t=="symbol"?t:t+""}function UJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hx(e,t){if(e==null)return{};var n,r,i=KJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function KJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(null,arguments)}var qJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Jo(n,t),payload:e}]};function GJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Jo(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var yN=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function XJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var QJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return yN(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...XJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function ZJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(X0,Za({},t,{className:r}))}return n}function JJ(e,t){return e==null?!1:t?!0:e.length===1}function eee(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!JJ(n,i))return null;var{id:s}=r,l=hx(r,WJ),c=Zp(i),u=zr(l),d=ct(i,!0),f=n.map((m,h)=>{var v=ur(ur(ur({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return ZJ(i,v)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Za({className:"recharts-line-dots",key:"dots"},p),f)}function tee(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return ur(ur({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(G0,{value:t?i:null},n)}function GE(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=hx(o,zJ),d=ur(ur({},ct(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement(Ns,Za({},d,{pathRef:n})),O.createElement(eee,{points:r,clipPathId:t,props:o}))}function nee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function ree(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:v}=n,b=i.current,S=dl(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof v=="function"&&v(),x(!0)},[v]),D=nee(r.current),T=o.current;return O.createElement(tee,{points:a,showLabels:_},n.children,O.createElement(ul,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=tt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=QJ(P,D,M)}else N=yN(D,P);else N=s==null?void 0:String(s);if(b){var I=b.length/a.length,F=j===1?a:a.map(($,V)=>{var z=Math.floor(V*I);if(b[z]){var B=b[z];return ur(ur({},$),{},{x:tt(B.x,$.x,j),y:tt(B.y,$.y,j)})}return f?ur(ur({},$),{},{x:tt(p*2,$.x,j),y:tt(m/2,$.y,j)}):ur(ur({},$),{},{x:$.x,y:$.y})});return i.current=F,O.createElement(GE,{props:n,points:F,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(GE,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Th,{label:n.label}))}function iee(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(ree,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var oee=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:nt(e.payload,t)});class aee extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=oe("recharts-line",o),h=f,{r:v=3,strokeWidth:b=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=Zp(r),w=v*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(lx,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(iN,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:oee,errorBarOffset:0},O.createElement(iee,{props:this.props,clipPathId:h}))),O.createElement(gy,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var bN={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!bo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function see(e){var t=qt(e,bN),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,v=hx(t,VJ),{needClip:b}=Rh(p,m),S=jh(),w=bu(),x=hn(),_=ce(j=>BJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(aee,Za({},v,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function lee(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=nt(c,a);if(t==="horizontal"){var f=If({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ht(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ht(d)?null:n.scale(d),h=If({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function cee(e){var t=qt(e,bN),n=hn();return O.createElement(Nh,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:qJ(t)}),O.createElement(Mh,{fn:GJ,args:t}),O.createElement(ox,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(see,Za({},t,{id:r}))))}var Wo=O.memo(cee);Wo.displayName="Line";var xN=(e,t,n,r)=>Pi(e,"xAxis",t,r),wN=(e,t,n,r)=>Ei(e,"xAxis",t,r),_N=(e,t,n,r)=>Pi(e,"yAxis",n,r),SN=(e,t,n,r)=>Ei(e,"yAxis",n,r),uee=W([Ee,xN,_N,wN,SN],(e,t,n,r,i)=>Di(e,"xAxis")?Ga(t,r,!1):Ga(n,i,!1)),dee=(e,t,n,r,i)=>i,ON=W([Cu,dee],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),fee=(e,t,n,r,i)=>{var o,a=ON(e,t,n,r,i);if(a!=null){var s=Ee(e),l=Di(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=_h(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},pee=W([Ee,xN,_N,wN,SN,fee,Ou,uee,ON],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return jee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),hee=["id"],mee=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function EN(e,t){if(e==null)return{};var n,r,i=gee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function XE(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 Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(n),!0).forEach(function(r){vee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vee(e,t,n){return(t=yee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yee(e){var t=bee(e,"string");return typeof t=="symbol"?t:t+""}function bee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function op(e,t){return e&&e!=="none"?e:t}var xee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:op(r,i),value:Jo(n,t),payload:e}]};function wee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Jo(a,t),hide:s,type:e.tooltipType,color:op(r,o),unit:l}}}var _ee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(X0,no({},t,{className:r}))}return n};function See(e,t){return e==null?!1:t?!0:e.length===1}function Oee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!See(n,o))return null;var s=Zp(o),l=zr(r),c=ct(o,!0),u=n.map((f,p)=>{var m=Xi(Xi(Xi({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return _ee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,no({className:"recharts-area-dots"},d),u)}function Eee(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return Xi(Xi({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(G0,{value:t?i:null},n)}function QE(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=EN(o,hee),p=zr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement(Ns,no({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement(Ns,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement(Ns,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(Oee,{points:t,props:f,clipPathId:i}))}function Pee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),pe(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function kee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),pe(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function Cee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(Pee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(kee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function Dee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=dl(r,"recharts-area-"),[h,v]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),v(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),v(!0)},[f]),x=i.current,_=o.current;return O.createElement(Eee,{showLabels:b,points:a},r.children,O.createElement(ul,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),T;return pe(s)?T=tt(_,s,E):ht(s)||kn(s)?T=tt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(QE,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(Cee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(QE,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Th,{label:r.label}))}function Aee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(Dee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class Tee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=oe("recharts-area",o),v=p,{r:b=3,strokeWidth:S=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=Zp(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(lx,{clipPathId:v,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(v)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(Aee,{needClip:l,clipPathId:v,props:this.props})),O.createElement(gy,{points:i,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(gy,{points:m,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var PN={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!bo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function Mee(e){var t,n=qt(e,PN),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:v}=n,b=EN(n,mee),S=bu(),w=CM(),{needClip:x}=Rh(h,v),_=hn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>pee(M,h,v,_,e.id)))!==null&&t!==void 0?t:{},T=jh();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(Tee,no({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:v}))}var Nee=(e,t,n,r,i)=>{var o=n??t;if(pe(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function jee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=Nee(o,a,n,s,l),v=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=nt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&nt(x,r)==null;return v?{x:If({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:If({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return v?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=v?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function Ree(e){var t=qt(e,PN),n=hn();return O.createElement(Nh,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:xee(t)}),O.createElement(Mh,{fn:wee,args:t}),O.createElement(ox,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:fA(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(Mee,no({},t,{id:r}))))}var kN=O.memo(Ree);kN.displayName="Area";var Iee=["dangerouslySetInnerHTML","ticks"],Fee=["id"],Lee=["domain"],$ee=["domain"];function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xy.apply(null,arguments)}function ap(e,t){if(e==null)return{};var n,r,i=Bee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Wee(e){var t=xt();return k.useEffect(()=>(t(iQ(e)),()=>{t(oQ(e))}),[e,t]),null}var zee=e=>{var{xAxisId:t,className:n}=e,r=ce(Bb),i=hn(),o="xAxis",a=ce(v=>Ko(v,o,t,i)),s=ce(v=>sM(v,o,t,i)),l=ce(v=>rM(v,t)),c=ce(v=>WU(v,t)),u=ce(v=>jT(v,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=ap(e,Iee),{id:m}=u,h=ap(u,Fee);return O.createElement(px,xy({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},Vee={allowDataOverflow:or.allowDataOverflow,allowDecimals:or.allowDecimals,allowDuplicatedCategory:or.allowDuplicatedCategory,height:or.height,hide:!1,mirror:or.mirror,orientation:or.orientation,padding:or.padding,reversed:or.reversed,scale:or.scale,tickCount:or.tickCount,type:or.type,xAxisId:0},Hee=e=>{var t,n,r,i,o,a=qt(e,Vee);return O.createElement(O.Fragment,null,O.createElement(Wee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(zee,a))},Yee=(e,t)=>{var{domain:n}=e,r=ap(e,Lee),{domain:i}=t,o=ap(t,$ee);return el(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:el({domain:n},{domain:i}):!1},xr=O.memo(Hee,Yee);xr.displayName="XAxis";var Uee=["dangerouslySetInnerHTML","ticks"],Kee=["id"],qee=["domain"],Gee=["domain"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(null,arguments)}function sp(e,t){if(e==null)return{};var n,r,i=Xee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qee(e){var t=xt();return k.useEffect(()=>(t(aQ(e)),()=>{t(sQ(e))}),[e,t]),null}var Zee=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Bb),l=hn(),c=xt(),u="yAxis",d=ce(_=>Ko(_,u,t,l)),f=ce(_=>iM(_,t)),p=ce(_=>VU(_,t)),m=ce(_=>sM(_,u,t,l)),h=ce(_=>RT(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||q0(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(lQ({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:v,ticks:b}=e,S=sp(e,Uee),{id:w}=h,x=sp(h,Kee);return O.createElement(px,wy({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:oe("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Jee={allowDataOverflow:ar.allowDataOverflow,allowDecimals:ar.allowDecimals,allowDuplicatedCategory:ar.allowDuplicatedCategory,hide:!1,mirror:ar.mirror,orientation:ar.orientation,padding:ar.padding,reversed:ar.reversed,scale:ar.scale,tickCount:ar.tickCount,type:ar.type,width:ar.width,yAxisId:0},ete=e=>{var t,n,r,i,o,a=qt(e,Jee);return O.createElement(O.Fragment,null,O.createElement(Qee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Zee,a))},tte=(e,t)=>{var{domain:n}=e,r=sp(e,qee),{domain:i}=t,o=sp(t,Gee);return el(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:el({domain:n},{domain:i}):!1},nr=O.memo(ete,tte);nr.displayName="YAxis";var bd={exports:{}},Yg={};/**
|
|
209
|
+
`).concat(x.x,",").concat(x.y),E=ht(e.id)?Nc("recharts-radial-line-"):e.id;return O.createElement("text",Yi({},r,{dominantBaseline:"central",className:oe("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},wG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},YM=e=>"cx"in e&&pe(e.cx),_G=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!YM(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,v=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Mt(Mt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Mt(Mt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return Mt(Mt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Mt(Mt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Mt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Mt({x:a+l-h,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},E):i==="insideTop"?Mt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Mt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Mt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Mt({x:a+l-h,y:s+d,textAnchor:v,verticalAnchor:p},E):i==="insideBottomLeft"?Mt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Mt({x:a+l-h,y:s+c-d,textAnchor:v,verticalAnchor:f},E):i&&typeof i=="object"&&(pe(i.x)||Aa(i.x))&&(pe(i.y)||Aa(i.y))?Mt({x:a+Pn(i.x,l),y:s+Pn(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Mt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},SG={offset:5};function Ao(e){var t=qt(e,SG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=vG(),d=HM(),f=r==="center"?d:u??d,p=n||f;if(!p||ht(i)&&ht(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Mt(Mt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,v=dG(m,uG);return k.cloneElement(a,v)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=yG(t);var S=YM(p),w=ct(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return xG(t,r,b,w,p);var x=S?wG(p,t.offset,t.position):_G(t,p);return O.createElement(Ah,Yi({ref:c,className:oe("recharts-label",s)},w,x,{breakAll:l}),b)}Ao.displayName="Label";var OG=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(Ao,Yi({key:"label-implicit"},r)):Rr(e)?O.createElement(Ao,Yi({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===Ao?k.cloneElement(e,Mt({key:"label-implicit"},r)):O.createElement(Ao,Yi({key:"label-implicit",content:e},r)):q0(e)?O.createElement(Ao,Yi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(Ao,Yi({},e,{key:"label-implicit"},r)):null};function UM(e){var{label:t}=e,n=HM();return OG(t,n)||null}var Fg={},Lg={},gE;function EG(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(Lg)),Lg}var $g={},vE;function PG(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})($g)),$g}var yE;function kG(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EG(),n=PG(),r=Mb();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Fg)),Fg}var Bg,bE;function CG(){return bE||(bE=1,Bg=kG().last),Bg}var DG=CG();const AG=ho(DG);var TG=["valueAccessor"],MG=["dataKey","clockWise","id","textBreakAll"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(null,arguments)}function xE(e,t){if(e==null)return{};var n,r,i=NG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function NG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jG=e=>Array.isArray(e.value)?AG(e.value):e.value,KM=k.createContext(void 0),G0=KM.Provider,qM=k.createContext(void 0),RG=qM.Provider;function IG(){return k.useContext(KM)}function FG(){return k.useContext(qM)}function ef(e){var{valueAccessor:t=jG}=e,n=xE(e,TG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=xE(n,MG),l=IG(),c=FG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ht(r)?t(d,f):nt(d&&d.payload,r),h=ht(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(Ao,Jf({},ct(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}ef.displayName="LabelList";function Th(e){var{label:t}=e;return t?t===!0?O.createElement(ef,{key:"labelList-implicit"}):O.isValidElement(t)||q0(t)?O.createElement(ef,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(ef,Jf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(null,arguments)}var X0=e=>{var{cx:t,cy:n,r,className:i}=e,o=oe("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",my({},zr(e),Sb(e),{className:o,cx:t,cy:n,r})):null},GM=e=>e.graphicalItems.polarItems,LG=W([wt,Pu],S0),Q0=W([GM,Ft,LG],O0),$G=W([Q0],E0),Z0=W([$G,p0],P0),BG=W([Z0,Ft,Q0],C0),WG=W([Z0,Ft,Q0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=nt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),wE=()=>{},zG=W([Ft,QT,wE,WG,wE,Ee,wt],A0),XM=W([Ft,Ee,Z0,BG,Eu,wt,zG],T0),VG=W([XM,Ft,vl],j0);W([Ft,XM,VG,wt],I0);var HG={radiusAxis:{},angleAxis:{}},QM=br({name:"polarAxis",initialState:HG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:pfe,removeRadiusAxis:hfe,addAngleAxis:mfe,removeAngleAxis:gfe}=QM.actions,YG=QM.reducer;function _E(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 SE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(n),!0).forEach(function(r){UG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UG(e,t,n){return(t=KG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KG(e){var t=qG(e,"string");return typeof t=="symbol"?t:t+""}function qG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GG=(e,t)=>t,J0=W([GM,GG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),XG=[],ex=(e,t,n)=>n?.length===0?XG:n,ZM=W([p0,J0,ex],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>SE(SE({},t.presentationProps),o.props))),i!=null)return i}}),QG=W([ZM,J0,ex],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=nt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:Jo(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),ZG=W([ZM,J0,ex,Kt],(e,t,n,r)=>{if(!(t==null||e==null))return GX({offset:r,pieSettings:t,displayedData:e,cells:n})}),Wg={},OE;function JG(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Wg)),Wg}var zg,EE;function eX(){return EE||(EE=1,zg=JG().isPlainObject),zg}var tX=eX();const nX=ho(tX);function PE(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 kE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){rX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rX(e,t,n){return(t=iX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iX(e){var t=oX(e,"string");return typeof t=="symbol"?t:t+""}function oX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}var CE=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},aX={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sX=e=>{var t=qt(e,aX),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),v=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=dl(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=oe("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(n,r,i,o,a)})));var E=h.current,C=v.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=wA(["strokeDasharray"],c,l);return O.createElement(ul,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var I=tt(E,i,M),F=tt(C,o,M),$=tt(D,a,M),V=tt(T,n,M),z=tt(j,r,M);f.current&&(h.current=I,v.current=F,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(V,z,I,F,$),ref:f,style:kE(kE({},B),t.style)}))})},lX=["option","shapeType","propTransformer","activeClassName","isActive"];function cX(e,t){if(e==null)return{};var n,r,i=uX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function DE(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 tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DE(Object(n),!0).forEach(function(r){dX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dX(e,t,n){return(t=fX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fX(e){var t=pX(e,"string");return typeof t=="symbol"?t:t+""}function pX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hX(e,t){return tp(tp({},t),e)}function mX(e,t){return e==="symbols"}function AE(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(EA,n);case"trapezoid":return O.createElement(sX,n);case"sector":return O.createElement(CA,n);case"symbols":if(mX(t))return O.createElement(Db,n);break;default:return null}}function gX(e){return k.isValidElement(e)?e.props:e}function JM(e){var{option:t,shapeType:n,propTransformer:r=hX,activeClassName:i="recharts-active-shape",isActive:o}=e,a=cX(e,lX),s;if(k.isValidElement(t))s=k.cloneElement(t,tp(tp({},a),gX(t)));else if(typeof t=="function")s=t(a);else if(nX(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(AE,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(AE,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var tx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(pM({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},nx=e=>{var t=xt();return(n,r)=>i=>{e?.(n,r,i),t(eK())}},rx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(tK({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Mh(e){var{fn:t,args:n}=e,r=xt(),i=hn();return k.useEffect(()=>{if(!i){var o=t(n);return r(QU(o)),()=>{r(ZU(o))}}},[t,n,r,i]),null}var eN=()=>{};function ix(e){var{legendPayload:t}=e,n=xt(),r=hn();return k.useEffect(()=>r?eN:(n(yA(t)),()=>{n(bA(t))}),[n,r,t]),null}function vX(e){var{legendPayload:t}=e,n=xt(),r=ce(Ee);return k.useEffect(()=>r!=="centric"&&r!=="radial"?eN:(n(yA(t)),()=>{n(bA(t))}),[n,r,t]),null}var Vg,yX=()=>{var[e]=O.useState(()=>Nc("uid-"));return e},bX=(Vg=O.useId)!==null&&Vg!==void 0?Vg:yX;function xX(e,t){var n=bX();return t||(e?"".concat(e,"-").concat(n):n)}var wX=k.createContext(void 0),Nh=e=>{var{id:t,type:n,children:r}=e,i=xX("recharts-".concat(n),t);return O.createElement(wX.Provider,{value:i},r(i))},_X={cartesianItems:[],polarItems:[]},tN=br({name:"graphicalItems",initialState:_X,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=eo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=eo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=eo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:SX,replaceCartesianGraphicalItem:OX,removeCartesianGraphicalItem:EX,addPolarGraphicalItem:PX,removePolarGraphicalItem:kX}=tN.actions,CX=tN.reducer;function ox(e){var t=xt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(SX(e)):n.current!==e&&t(OX({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(EX(n.current)),n.current=null)},[t]),null}function DX(e){var t=xt();return k.useEffect(()=>(t(PX(e)),()=>{t(kX(e))}),[t,e]),null}var AX=["onMouseEnter","onClick","onMouseLeave"],TX=["id"],MX=["id"];function ax(e,t){if(e==null)return{};var n,r,i=NX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function NX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function TE(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 yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(n),!0).forEach(function(r){jX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jX(e,t,n){return(t=RX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Go.apply(null,arguments)}function FX(e){var t=k.useMemo(()=>Ob(e.children,Vt),[e.children]),n=ce(r=>QG(r,e.id,t));return n==null?null:O.createElement(vX,{legendPayload:n})}function LX(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:Jo(s,t),hide:l,type:c,color:a,unit:""}}}var $X=(e,t)=>e>t?"start":e<t?"end":"middle",BX=(e,t,n)=>Pn(typeof t=="function"?t(e):t,n,n*.8),WX=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=lA(o,a),l=i+Pn(e.cx,o,o/2),c=r+Pn(e.cy,a,a/2),u=Pn(e.innerRadius,s,0),d=BX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},zX=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function VX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var HX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement(Ns,Go({},t,{type:"linear",className:n}))},YX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=oe("recharts-pie-label-text",VX(e));return O.createElement(Ah,Go({},t,{alignmentBaseline:"middle",className:i}),r)};function UX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=zr(n),l=ct(i,!1),c=ct(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),v=yt(yt(yt(yt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:$X(h.x,f.cx)},h),b=yt(yt(yt(yt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&HX(o,b),YX(i,v,nt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function KX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Th,{label:i}):O.createElement(UX,{sectors:t,props:n,showLabels:r})}function qX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(qo),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=ax(i,AX),u=tx(a,i.dataKey),d=nx(l),f=rx(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,v=o?r:null,b=h?n:v,S=yt(yt({},p),{},{stroke:p.stroke,tabIndex:-1,[hA]:m,[mA]:i.dataKey});return O.createElement(Ot,Go({tabIndex:-1,className:"recharts-pie-sector"},pu(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(JM,Go({option:b,isActive:h,shapeType:"sector"},S)))}))}function GX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=zX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,v=r.filter(E=>nt(E,c,0)!==0).length,b=(m>=360?v:v-1)*h,S=m-v*f-b,w=r.reduce((E,C)=>{var D=nt(C,c,0);return E+(pe(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=nt(E,c,0),T=nt(E,u,C),j=WX(n,o,E),A=(pe(D)?D:0)/w,P,N=yt(yt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+tn(p)*h*(D!==0?1:0):P=s;var M=P+tn(p)*((D!==0?f:0)+A*S),I=(P+M)/2,F=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,F,I);return _=yt(yt(yt(yt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:I,middleRadius:F,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:tn(p)*h}),_})}return x}function XX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(RG,{value:t?i:void 0},r)}function QX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=dl(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),v=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(XX,{showLabels:!m,sectors:r},O.createElement(ul,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:v,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Ua(E,"paddingAngle",0):0;if(D){var j=tt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=yt(yt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=tt(0,P-N,S),I=yt(yt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(I),_=I.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(qX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(KX,{showLabels:!m,sectors:r,props:t}),t.children)}var ZX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!bo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function JX(e){var{id:t}=e,n=ax(e,TX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Ob(e.children,Vt),[e.children]),s=ce(u=>ZG(u,t,a)),l=k.useRef(null),c=oe("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Mh,{fn:LX,args:yt(yt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(QX,{props:yt(yt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Mi(e){var t=qt(e,ZX),{id:n}=t,r=ax(t,MX),i=zr(r);return O.createElement(Nh,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(DX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(FX,Go({},r,{id:o})),O.createElement(JX,Go({},r,{id:o}))))}Mi.displayName="Pie";function ME(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 NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(n),!0).forEach(function(r){eQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ME(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eQ(e,t,n){return(t=tQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tQ(e){var t=nQ(e,"string");return typeof t=="symbol"?t:t+""}function nQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rQ={xAxis:{},yAxis:{},zAxis:{}},nN=br({name:"cartesianAxis",initialState:rQ,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=NE(NE({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:iQ,removeXAxis:oQ,addYAxis:aQ,removeYAxis:sQ,addZAxis:vfe,removeZAxis:yfe,updateYAxisWidth:lQ}=nN.actions,cQ=nN.reducer,uQ=W([Kt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),dQ=W([uQ,vo,yo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),jh=()=>ce(dQ),fQ=()=>ce(WK);function jE(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?jE(Object(n),!0).forEach(function(r){pQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pQ(e,t,n){return(t=hQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hQ(e){var t=mQ(e,"string");return typeof t=="symbol"?t:t+""}function mQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=RE(RE({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},ct(i,!1)),Sb(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(X0,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function gy(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(qo),a=fQ();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ht(s)?null:gQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var vQ=process.env.NODE_ENV==="production",Hg="Invariant failed";function IE(e,t){if(vQ)throw new Error(Hg);var n=typeof t=="function"?t():t,r=n?"".concat(Hg,": ").concat(n):Hg;throw new Error(r)}var yQ=["x","y"];function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vy.apply(null,arguments)}function FE(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 zl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(r){bQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bQ(e,t,n){return(t=xQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xQ(e){var t=wQ(e,"string");return typeof t=="symbol"?t:t+""}function wQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _Q(e,t){if(e==null)return{};var n,r,i=SQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function SQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function OQ(e,t){var{x:n,y:r}=e,i=_Q(e,yQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return zl(zl(zl(zl(zl({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function sx(e){return O.createElement(JM,vy({shapeType:"rectangle",propTransformer:OQ,activeClassName:"recharts-active-bar"},e))}var EQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(pe(t))return t;var o=pe(r)||ht(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?IE(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):IE()),n)}},PQ={},rN=br({name:"errorBars",initialState:PQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:bfe,replaceErrorBar:xfe,removeErrorBar:wfe}=rN.actions,kQ=rN.reducer,CQ=["children"];function DQ(e,t){if(e==null)return{};var n,r,i=AQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var TQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},MQ=k.createContext(TQ);function iN(e){var{children:t}=e,n=DQ(e,CQ);return O.createElement(MQ.Provider,{value:n},t)}function Rh(e,t){var n,r,i=ce(c=>Ai(c,e)),o=ce(c=>Ti(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:or.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:ar.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function lx(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=jh(),{needClipX:o,needClipY:a,needClip:s}=Rh(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var NQ=["onMouseEnter","onMouseLeave","onClick"],jQ=["value","background","tooltipPosition"],RQ=["id"],IQ=["onMouseEnter","onClick","onMouseLeave"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function LE(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 Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LE(Object(n),!0).forEach(function(r){FQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FQ(e,t,n){return(t=LQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LQ(e){var t=$Q(e,"string");return typeof t=="symbol"?t:t+""}function $Q(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function np(e,t){if(e==null)return{};var n,r,i=BQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var WQ=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Jo(n,t),payload:e}]};function zQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Jo(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function VQ(e){var t=ce(qo),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=np(o,NQ),u=tx(a,r),d=nx(s),f=rx(l,r);if(!i||n==null)return null;var p=ct(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:v,background:b,tooltipPosition:S}=m,w=np(m,jQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Mn(Mn(Mn(Mn(Mn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),pu(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(sx,Xo({key:"background-bar-".concat(C.index)},C))}))}function HQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Mn(Mn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(G0,{value:t?i:void 0},n)}function YQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(qo),l=ce(PM),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(sx,Xo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function UQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(sx,Xo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function KQ(e){var{data:t,props:n}=e,r=zr(n),{id:i}=r,o=np(r,RQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=np(n,IQ),p=tx(c,s),m=nx(d),h=rx(u,s);return t?O.createElement(O.Fragment,null,t.map((v,b)=>O.createElement(Ot,Xo({className:"recharts-bar-rectangle"},pu(f,v,b),{onMouseEnter:p(v,b),onMouseLeave:m(v,b),onClick:h(v,b),key:"rectangle-".concat(v?.x,"-").concat(v?.y,"-").concat(v?.value,"-").concat(b)}),l?O.createElement(YQ,{shape:a,activeBar:l,baseProps:o,entry:v,index:b,dataKey:s}):O.createElement(UQ,{shape:a,baseProps:o,entry:v,index:b,dataKey:s})))):null}function qQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=dl(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,v=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(HQ,{showLabels:h,rects:r},O.createElement(ul,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:v,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Mn(Mn({},x),{},{x:tt(E.x,x.x,S),y:tt(E.y,x.y,S),width:tt(E.width,x.width,S),height:tt(E.height,x.height,S)});if(i==="horizontal"){var C=tt(0,x.height,S);return Mn(Mn({},x),{},{y:x.y+x.height-C,height:C})}var D=tt(0,x.width,S);return Mn(Mn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(KQ,{props:t,data:w}))}),O.createElement(Th,{label:t.label}),t.children)}function GQ(e){var t=k.useRef(null);return O.createElement(qQ,{previousRectanglesRef:t,props:e})}var oN=0,XQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:nt(e,t)}};class QQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=oe("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(lx,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(VQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(GQ,this.props)))}}var ZQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!bo.isSsr,legendType:"rect",minPointSize:oN,xAxisId:0,yAxisId:0};function JQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Rh(t,n),f=bu(),p=hn(),m=Ob(e.children,Vt),h=ce(S=>kZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var v,b=h?.[0];return b==null||b.height==null||b.width==null?v=0:v=f==="vertical"?b.height/2:b.width/2,O.createElement(iN,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:XQ,errorBarOffset:v},O.createElement(QQ,Xo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function eZ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,v=u?h.scale.domain():null,b=g7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=d7(u[w],v):(x=nt(S,n),Array.isArray(x)||(x=[b,x]));var j=EQ(r,oN)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=_S({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=kn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var I=tn(D||j)*(Math.abs(j)-Math.abs(D));E-=I,D+=I}}else{var[F,$]=[a.scale(x[0]),a.scale(x[1])];if(_=F,E=_S({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-F,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=tn(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Mn(Mn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function tZ(e){var t=qt(e,ZQ),n=hn();return O.createElement(Nh,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:WQ(t)}),O.createElement(Mh,{fn:zQ,args:t}),O.createElement(ox,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:fA(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(JQ,Xo({},t,{id:r}))))}var Nn=O.memo(tZ);Nn.displayName="Bar";function $E(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 vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(n),!0).forEach(function(r){nZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nZ(e,t,n){return(t=rZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rZ(e){var t=iZ(e,"string");return typeof t=="symbol"?t:t+""}function iZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oZ=(e,t)=>t,aZ=(e,t,n)=>n,sZ=(e,t,n,r)=>r,lZ=(e,t,n,r,i)=>i,Nu=W([Cu,lZ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),cZ=W([Nu],e=>e?.maxBarSize),uZ=(e,t,n,r,i,o)=>o,BE=(e,t,n)=>{var r=n??e;if(!ht(r))return Pn(r,t,0)},dZ=W([Ee,Cu,oZ,aZ,sZ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),fZ=(e,t,n,r)=>{var i=Ee(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},pZ=(e,t,n)=>{var r=Ee(e);return r==="horizontal"?$O(e,"xAxis",t):$O(e,"yAxis",n)},hZ=(e,t,n)=>{var r={},i=e.filter(Sh),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=BE(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=BE(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},mZ=W([dZ,X9,pZ],hZ),gZ=(e,t,n,r,i)=>{var o,a,s=Nu(e,t,n,r,i);if(s!=null){var l=Ee(e),c=OT(e),{maxBarSize:u}=s,d=ht(u)?c:u,f,p;return l==="horizontal"?(f=Pi(e,"xAxis",t,r),p=Ei(e,"xAxis",t,r)):(f=Pi(e,"yAxis",n,r),p=Ei(e,"yAxis",n,r)),(o=(a=Ga(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},aN=(e,t,n,r)=>{var i=Ee(e),o,a;return i==="horizontal"?(o=Pi(e,"xAxis",t,r),a=Ei(e,"xAxis",t,r)):(o=Pi(e,"yAxis",n,r),a=Ei(e,"yAxis",n,r)),Ga(o,a)};function vZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=Pn(e,n,0,!0),s,l=[];if(dn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=Pn(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var v=dn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-v)/2,size:v}}],l)}return s}}var yZ=(e,t,n,r,i,o,a)=>{var s=ht(a)?t:a,l=vZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>vd(vd({},c),{},{position:vd(vd({},c.position),{},{offset:c.position.offset-i/2})}))),l},bZ=W([mZ,OT,G9,ET,gZ,aN,cZ],yZ),xZ=(e,t,n,r)=>Pi(e,"xAxis",t,r),wZ=(e,t,n,r)=>Pi(e,"yAxis",n,r),_Z=(e,t,n,r)=>Ei(e,"xAxis",t,r),SZ=(e,t,n,r)=>Ei(e,"yAxis",n,r),OZ=W([bZ,Nu],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),EZ=(e,t)=>{var n=_h(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},PZ=W([fZ,Nu],EZ),kZ=W([Kt,Bb,xZ,wZ,_Z,SZ,OZ,Ee,Ou,aN,PZ,Nu,uZ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:v}=d,b;if(v!=null&&v.length>0?b=v:b=p?.slice(m,h+1),b!=null)return eZ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),sN=e=>{var{chartData:t}=e,n=xt(),r=hn();return k.useEffect(()=>r?()=>{}:(n(GO(t)),()=>{n(GO(void 0))}),[t,n,r]),null},WE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},lN=br({name:"brush",initialState:WE,reducers:{setBrushSettings(e,t){return t.payload==null?WE:t.payload}}}),{setBrushSettings:_fe}=lN.actions,CZ=lN.reducer;function zE(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 yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){cN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cN(e,t,n){return(t=DZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DZ(e){var t=AZ(e,"string");return typeof t=="symbol"?t:t+""}function AZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},MZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return TZ({x:t,y:n},{x:r,y:i})};class Ih{static create(t){return new Ih(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}cN(Ih,"EPS",1e-4);var NZ=e=>{var t=Object.keys(e).reduce((n,r)=>yd(yd({},n),{},{[r]:Ih.create(e[r])}),{});return yd(yd({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function jZ(e){return(e%180+180)%180}var RZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=jZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},IZ={dots:[],areas:[],lines:[]},uN=br({name:"referenceElements",initialState:IZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=eo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=eo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=eo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Sfe,removeDot:Ofe,addArea:Efe,removeArea:Pfe,addLine:FZ,removeLine:LZ}=uN.actions,$Z=uN.reducer,dN=k.createContext(void 0),BZ=e=>{var{children:t}=e,[n]=k.useState("".concat(Nc("recharts"),"-clip")),r=jh();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(dN.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},WZ=()=>k.useContext(dN);function VE(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 HE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){cx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cx(e,t,n){return(t=zZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zZ(e){var t=VZ(e,"string");return typeof t=="symbol"?t:t+""}function VZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yy.apply(null,arguments)}var HZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",yy({},t,{className:"recharts-reference-line-line"})),n},YZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(kn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:v}=l,b=e.x.apply(v,{position:o});if(kn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function UZ(e){var t=xt();return k.useEffect(()=>(t(FZ(e)),()=>{t(LZ(e))})),null}function KZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=hn(),u=WZ(),d=ce(A=>Ai(A,i)),f=ce(A=>Ti(A,o)),p=ce(A=>Ko(A,"xAxis",i,c)),m=ce(A=>Ko(A,"yAxis",o,c)),h=dh(),v=Rr(t),b=Rr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=NZ({x:p,y:m}),w=r&&r.length===2,x=YZ(S,v,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=HE(HE({clipPath:T},ct(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:oe("recharts-reference-line",s)},HZ(a,j),O.createElement(VM,MZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(UM,{label:e.label}),e.children))}function qZ(e){return O.createElement(O.Fragment,null,O.createElement(UZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(KZ,e))}class ux extends k.Component{render(){return O.createElement(qZ,this.props)}}cx(ux,"displayName","ReferenceLine");cx(ux,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function el(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 fN(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 GZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return RZ(r,n)}function XZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function rp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function QZ(e,t){return fN(e,t+1)}function ZZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:fN(r,c)};var h=l,v,b=()=>(v===void 0&&(v=n(m,h)),v),S=m.coordinate,w=l===0||rp(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function YE(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 bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YE(Object(n),!0).forEach(function(r){JZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JZ(e,t,n){return(t=eJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eJ(e){var t=tJ(e,"string");return typeof t=="symbol"?t:t+""}function tJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nJ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var v=e*(p.coordinate+e*h()/2-l);o[f]=p=bn(bn({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else o[f]=p=bn(bn({},p),{},{tickCoord:p.coordinate});var b=rp(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=bn(bn({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function rJ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=bn(bn({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=rp(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=bn(bn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=bn(bn({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=bn(bn({},w),{},{tickCoord:w.coordinate});var C=rp(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=bn(bn({},w),{},{isShow:!0}))},v=0;v<m;v++)h(v);return a}function dx(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(pe(l)||bo.isSsr){var f;return(f=QZ(i,pe(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?mc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?GZ(mc(_,{fontSize:t,letterSpacing:n}),h,d):mc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?tn(i[1].coordinate-i[0].coordinate):1,S=XZ(o,b,m);return l==="equidistantPreserveStart"?ZZ(b,S,v,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=rJ(b,S,v,i,a,l==="preserveStartEnd"):p=nJ(b,S,v,i,a),p.filter(w=>w.isShow))}var iJ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},oJ=["axisLine","width","height","className","hide","ticks"],aJ=["viewBox"],sJ=["viewBox"];function by(e,t){if(e==null)return{};var n,r,i=lJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qa.apply(null,arguments)}function UE(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 Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UE(Object(n),!0).forEach(function(r){cJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cJ(e,t,n){return(t=uJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uJ(e){var t=dJ(e,"string");return typeof t=="symbol"?t:t+""}function dJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fx={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"};function fJ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Yt(Yt(Yt({},l),ct(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Yt(Yt({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Yt(Yt({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Qa({},c,{className:oe("recharts-cartesian-axis-line",Ua(s,"className"))}))}function pJ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,v=e.tickSize||a,b=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*v,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*v,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*v,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*v,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function hJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function mJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function gJ(e){var{option:t,tickProps:n,value:r}=e,i,o=oe(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Yt(Yt({},n),{},{className:o}));else if(typeof t=="function")i=t(Yt(Yt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=oe(a,t?.className)),i=O.createElement(Ah,Qa({},n,{className:a}),r)}return i}function vJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:v,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=dx(Yt(Yt({},w),{},{ticks:t}),b,S),E=hJ(c,u),C=mJ(c,u),D=zr(w),T=ct(n,!1),j=Yt(Yt({},D),{},{fill:"none"},ct(r,!1)),A=_.map((P,N)=>{var{line:M,tick:I}=pJ(P,d,f,p,m,c,h,u,v),F=Yt(Yt(Yt(Yt({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),I),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Qa({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},pu(x,P,N)),r&&O.createElement("line",Qa({},j,M,{className:oe("recharts-cartesian-axis-tick-line",Ua(r,"className"))})),n&&O.createElement(gJ,{option:n,tickProps:F,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var yJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=by(e,oJ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return iJ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var v=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(v);var b=v[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:oe("recharts-cartesian-axis",o),ref:m},O.createElement(fJ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:zr(e)}),O.createElement(vJ,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:d,getTicksConfig:e,events:l}),O.createElement(VM,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(UM,{label:e.label}),e.children))}),bJ=O.memo(yJ,(e,t)=>{var{viewBox:n}=e,r=by(e,aJ),{viewBox:i}=t,o=by(t,sJ);return el(n,i)&&el(r,o)}),px=O.forwardRef((e,t)=>{var n=qt(e,fx);return O.createElement(bJ,Qa({},n,{ref:t}))});px.displayName="CartesianAxis";var xJ=["x1","y1","x2","y2","key"],wJ=["offset"],_J=["xAxisId","yAxisId"],SJ=["xAxisId","yAxisId"];function KE(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 _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KE(Object(n),!0).forEach(function(r){OJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OJ(e,t,n){return(t=EJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EJ(e){var t=PJ(e,"string");return typeof t=="symbol"?t:t+""}function PJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Na.apply(null,arguments)}function ip(e,t){if(e==null)return{};var n,r,i=kJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var CJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function pN(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=ip(t,xJ),c=zr(l),{offset:u}=c,d=ip(c,wJ);n=O.createElement("line",Na({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function DJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,_J),l=i.map((c,u)=>{var d=_n(_n({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return pN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function AJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,SJ),l=i.map((c,u)=>{var d=_n(_n({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return pN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function TJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function MJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var NJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return uA(dx(_n(_n(_n({},fx),n),{},{ticks:dA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},jJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return uA(dx(_n(_n(_n({},fx),n),{},{ticks:dA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},RJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Hr(e){var t=Wb(),n=zb(),r=gA(),i=_n(_n({},qt(e,RJ)),{},{x:pe(e.x)?e.x:r.left,y:pe(e.y)?e.y:r.top,width:pe(e.width)?e.width:r.width,height:pe(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=hn(),h=ce(T=>BO(T,"xAxis",o,m)),v=ce(T=>BO(T,"yAxis",a,m));if(!pe(c)||c<=0||!pe(u)||u<=0||!pe(s)||s!==+s||!pe(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||NJ,S=i.horizontalCoordinatesGenerator||jJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:v?_n(_n({},v),{},{ticks:_?f:v.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);hc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?_n(_n({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);hc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(CJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(TJ,Na({},i,{horizontalPoints:w})),O.createElement(MJ,Na({},i,{verticalPoints:x})),O.createElement(DJ,Na({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:v})),O.createElement(AJ,Na({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:v})))}Hr.displayName="CartesianGrid";var hN=(e,t,n,r)=>Pi(e,"xAxis",t,r),mN=(e,t,n,r)=>Ei(e,"xAxis",t,r),gN=(e,t,n,r)=>Pi(e,"yAxis",n,r),vN=(e,t,n,r)=>Ei(e,"yAxis",n,r),IJ=W([Ee,hN,gN,mN,vN],(e,t,n,r,i)=>Di(e,"xAxis")?Ga(t,r,!1):Ga(n,i,!1)),FJ=(e,t,n,r,i)=>i;function LJ(e){return e.type==="line"}var $J=W([Cu,FJ],(e,t)=>e.filter(LJ).find(n=>n.id===t)),BJ=W([Ee,hN,gN,mN,vN,$J,IJ,Ou],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return lee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),WJ=["id"],zJ=["type","layout","connectNulls","needClip"],VJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function qE(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 ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(n),!0).forEach(function(r){HJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HJ(e,t,n){return(t=YJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YJ(e){var t=UJ(e,"string");return typeof t=="symbol"?t:t+""}function UJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hx(e,t){if(e==null)return{};var n,r,i=KJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function KJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(null,arguments)}var qJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Jo(n,t),payload:e}]};function GJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Jo(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var yN=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function XJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var QJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return yN(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...XJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function ZJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(X0,Za({},t,{className:r}))}return n}function JJ(e,t){return e==null?!1:t?!0:e.length===1}function eee(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!JJ(n,i))return null;var{id:s}=r,l=hx(r,WJ),c=Zp(i),u=zr(l),d=ct(i,!0),f=n.map((m,h)=>{var v=ur(ur(ur({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return ZJ(i,v)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Za({className:"recharts-line-dots",key:"dots"},p),f)}function tee(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return ur(ur({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(G0,{value:t?i:null},n)}function GE(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=hx(o,zJ),d=ur(ur({},ct(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement(Ns,Za({},d,{pathRef:n})),O.createElement(eee,{points:r,clipPathId:t,props:o}))}function nee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function ree(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:v}=n,b=i.current,S=dl(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof v=="function"&&v(),x(!0)},[v]),D=nee(r.current),T=o.current;return O.createElement(tee,{points:a,showLabels:_},n.children,O.createElement(ul,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=tt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=QJ(P,D,M)}else N=yN(D,P);else N=s==null?void 0:String(s);if(b){var I=b.length/a.length,F=j===1?a:a.map(($,V)=>{var z=Math.floor(V*I);if(b[z]){var B=b[z];return ur(ur({},$),{},{x:tt(B.x,$.x,j),y:tt(B.y,$.y,j)})}return f?ur(ur({},$),{},{x:tt(p*2,$.x,j),y:tt(m/2,$.y,j)}):ur(ur({},$),{},{x:$.x,y:$.y})});return i.current=F,O.createElement(GE,{props:n,points:F,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(GE,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Th,{label:n.label}))}function iee(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(ree,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var oee=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:nt(e.payload,t)});class aee extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=oe("recharts-line",o),h=f,{r:v=3,strokeWidth:b=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=Zp(r),w=v*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(lx,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(iN,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:oee,errorBarOffset:0},O.createElement(iee,{props:this.props,clipPathId:h}))),O.createElement(gy,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var bN={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!bo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function see(e){var t=qt(e,bN),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,v=hx(t,VJ),{needClip:b}=Rh(p,m),S=jh(),w=bu(),x=hn(),_=ce(j=>BJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(aee,Za({},v,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function lee(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=nt(c,a);if(t==="horizontal"){var f=If({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ht(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ht(d)?null:n.scale(d),h=If({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function cee(e){var t=qt(e,bN),n=hn();return O.createElement(Nh,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:qJ(t)}),O.createElement(Mh,{fn:GJ,args:t}),O.createElement(ox,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(see,Za({},t,{id:r}))))}var Wo=O.memo(cee);Wo.displayName="Line";var xN=(e,t,n,r)=>Pi(e,"xAxis",t,r),wN=(e,t,n,r)=>Ei(e,"xAxis",t,r),_N=(e,t,n,r)=>Pi(e,"yAxis",n,r),SN=(e,t,n,r)=>Ei(e,"yAxis",n,r),uee=W([Ee,xN,_N,wN,SN],(e,t,n,r,i)=>Di(e,"xAxis")?Ga(t,r,!1):Ga(n,i,!1)),dee=(e,t,n,r,i)=>i,ON=W([Cu,dee],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),fee=(e,t,n,r,i)=>{var o,a=ON(e,t,n,r,i);if(a!=null){var s=Ee(e),l=Di(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=_h(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},pee=W([Ee,xN,_N,wN,SN,fee,Ou,uee,ON],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return jee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),hee=["id"],mee=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function EN(e,t){if(e==null)return{};var n,r,i=gee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function XE(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 Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(n),!0).forEach(function(r){vee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vee(e,t,n){return(t=yee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yee(e){var t=bee(e,"string");return typeof t=="symbol"?t:t+""}function bee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function op(e,t){return e&&e!=="none"?e:t}var xee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:op(r,i),value:Jo(n,t),payload:e}]};function wee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Jo(a,t),hide:s,type:e.tooltipType,color:op(r,o),unit:l}}}var _ee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(X0,no({},t,{className:r}))}return n};function See(e,t){return e==null?!1:t?!0:e.length===1}function Oee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!See(n,o))return null;var s=Zp(o),l=zr(r),c=ct(o,!0),u=n.map((f,p)=>{var m=Xi(Xi(Xi({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return _ee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,no({className:"recharts-area-dots"},d),u)}function Eee(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return Xi(Xi({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(G0,{value:t?i:null},n)}function QE(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=EN(o,hee),p=zr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement(Ns,no({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement(Ns,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement(Ns,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(Oee,{points:t,props:f,clipPathId:i}))}function Pee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),pe(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function kee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),pe(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function Cee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(Pee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(kee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function Dee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=dl(r,"recharts-area-"),[h,v]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),v(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),v(!0)},[f]),x=i.current,_=o.current;return O.createElement(Eee,{showLabels:b,points:a},r.children,O.createElement(ul,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),T;return pe(s)?T=tt(_,s,E):ht(s)||kn(s)?T=tt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(QE,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(Cee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(QE,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Th,{label:r.label}))}function Aee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(Dee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class Tee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=oe("recharts-area",o),v=p,{r:b=3,strokeWidth:S=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=Zp(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(lx,{clipPathId:v,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(v)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(Aee,{needClip:l,clipPathId:v,props:this.props})),O.createElement(gy,{points:i,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(gy,{points:m,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var PN={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!bo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function Mee(e){var t,n=qt(e,PN),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:v}=n,b=EN(n,mee),S=bu(),w=CM(),{needClip:x}=Rh(h,v),_=hn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>pee(M,h,v,_,e.id)))!==null&&t!==void 0?t:{},T=jh();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(Tee,no({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:v}))}var Nee=(e,t,n,r,i)=>{var o=n??t;if(pe(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function jee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=Nee(o,a,n,s,l),v=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=nt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&nt(x,r)==null;return v?{x:If({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:If({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return v?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=v?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function Ree(e){var t=qt(e,PN),n=hn();return O.createElement(Nh,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(ix,{legendPayload:xee(t)}),O.createElement(Mh,{fn:wee,args:t}),O.createElement(ox,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:fA(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(Mee,no({},t,{id:r}))))}var kN=O.memo(Ree);kN.displayName="Area";var Iee=["dangerouslySetInnerHTML","ticks"],Fee=["id"],Lee=["domain"],$ee=["domain"];function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xy.apply(null,arguments)}function ap(e,t){if(e==null)return{};var n,r,i=Bee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Wee(e){var t=xt();return k.useEffect(()=>(t(iQ(e)),()=>{t(oQ(e))}),[e,t]),null}var zee=e=>{var{xAxisId:t,className:n}=e,r=ce(Bb),i=hn(),o="xAxis",a=ce(v=>Ko(v,o,t,i)),s=ce(v=>sM(v,o,t,i)),l=ce(v=>rM(v,t)),c=ce(v=>WU(v,t)),u=ce(v=>jT(v,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=ap(e,Iee),{id:m}=u,h=ap(u,Fee);return O.createElement(px,xy({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},Vee={allowDataOverflow:or.allowDataOverflow,allowDecimals:or.allowDecimals,allowDuplicatedCategory:or.allowDuplicatedCategory,height:or.height,hide:!1,mirror:or.mirror,orientation:or.orientation,padding:or.padding,reversed:or.reversed,scale:or.scale,tickCount:or.tickCount,type:or.type,xAxisId:0},Hee=e=>{var t,n,r,i,o,a=qt(e,Vee);return O.createElement(O.Fragment,null,O.createElement(Wee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(zee,a))},Yee=(e,t)=>{var{domain:n}=e,r=ap(e,Lee),{domain:i}=t,o=ap(t,$ee);return el(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:el({domain:n},{domain:i}):!1},xr=O.memo(Hee,Yee);xr.displayName="XAxis";var Uee=["dangerouslySetInnerHTML","ticks"],Kee=["id"],qee=["domain"],Gee=["domain"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(null,arguments)}function sp(e,t){if(e==null)return{};var n,r,i=Xee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qee(e){var t=xt();return k.useEffect(()=>(t(aQ(e)),()=>{t(sQ(e))}),[e,t]),null}var Zee=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Bb),l=hn(),c=xt(),u="yAxis",d=ce(_=>Ko(_,u,t,l)),f=ce(_=>iM(_,t)),p=ce(_=>VU(_,t)),m=ce(_=>sM(_,u,t,l)),h=ce(_=>RT(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||q0(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(lQ({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:v,ticks:b}=e,S=sp(e,Uee),{id:w}=h,x=sp(h,Kee);return O.createElement(px,wy({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:oe("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Jee={allowDataOverflow:ar.allowDataOverflow,allowDecimals:ar.allowDecimals,allowDuplicatedCategory:ar.allowDuplicatedCategory,hide:!1,mirror:ar.mirror,orientation:ar.orientation,padding:ar.padding,reversed:ar.reversed,scale:ar.scale,tickCount:ar.tickCount,type:ar.type,width:ar.width,yAxisId:0},ete=e=>{var t,n,r,i,o,a=qt(e,Jee);return O.createElement(O.Fragment,null,O.createElement(Qee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Zee,a))},tte=(e,t)=>{var{domain:n}=e,r=sp(e,qee),{domain:i}=t,o=sp(t,Gee);return el(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:el({domain:n},{domain:i}):!1},nr=O.memo(ete,tte);nr.displayName="YAxis";var bd={exports:{}},Yg={};/**
|
|
210
210
|
* @license React
|
|
211
211
|
* use-sync-external-store-with-selector.production.js
|
|
212
212
|
*
|
|
@@ -279,7 +279,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
279
279
|
* Released under the MIT License
|
|
280
280
|
*/class Hse{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=rR.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var $i=new Hse;const hP="transparent",Yse={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=rP(e||hP),i=r.valid&&rP(t||hP);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Use{constructor(t,n,r,i){const o=n[r];i=Ad([t.to,i,o,t.from]);const a=Ad([t.from,o,i]);this._active=!0,this._fn=t.fn||Yse[t.type||typeof a],this._easing=_c[t.easing]||_c.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ad([t.to,n,i,t.from]),this._from=Ad([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class vR{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Me(t))return;const n=Object.keys(Rt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Me(o))return;const a={};for(const s of n)a[s]=o[s];(en(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=qse(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&Kse(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new Use(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return $i.add(this._chart,r),!0}}function Kse(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function qse(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function mP(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function Gse(e,t,n){if(n===!1)return!1;const r=mP(e,n),i=mP(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Xse(e){let t,n,r,i;return Me(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function yR(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function gP(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],Br(c)&&(o||t===0||wi(t)===wi(c))&&(t+=c)}return!u&&!r.all?0:t}function Qse(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[o]:e[u]};return s}function iv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Zse(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Jse(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function ele(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function vP(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function yP(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=Zse(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:v}=m,b=m._stacks||(m._stacks={});f=b[c]=ele(i,u,h),f[s]=v,f._top=vP(f,a,!0,r.type),f._bottom=vP(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=v}}function ov(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function tle(e,t){return ls(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function nle(e,t,n){return ls(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ql(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const av=e=>e==="reset"||e==="none",bP=(e,t)=>t?e:Object.assign({},e),rle=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:yR(n,!0),values:null};class Uh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=iv(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ql(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Se(r.xAxisID,ov(t,"x")),a=n.yAxisID=Se(r.yAxisID,ov(t,"y")),s=n.rAxisID=Se(r.rAxisID,ov(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&eP(this._data,this),t._stacked&&ql(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Me(n)){const i=this._cachedMeta;this._data=Qse(n,i)}else if(r!==n){if(r){eP(r,this);const i=this._cachedMeta;ql(i),i._parsed=[]}n&&Object.isExtensible(n)&&Iae(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=iv(n.vScale,n),n.stack!==r.stack&&(i=!0,ql(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(yP(this,n._parsed),n._stacked=iv(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{en(i[t])?f=this.parseArrayData(r,i,t,n):Me(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&yP(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(es(p,s),f),y:a.parse(es(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:yR(i,!0),values:n._stacks[t.axis]._visualValues};return gP(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=gP(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=rle(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Jse(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!Br(p[t.axis])||u>h||d<h}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],Br(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Xse(Se(this.options.clip,Gse(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=nle(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=tle(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&Zc(r);if(s)return bP(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Rt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(bP(h,l))),h}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new vR(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||av(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){av(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!av(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&ql(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ile(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=nR(r.sort((i,o)=>i-o))}return e._cache.$bar}function ole(e){const t=e.iScale,n=ile(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(Zc(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function ale(e,t,n,r){const i=n.barThickness;let o,a;return He(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function sle(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function lle(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function bR(e,t,n,r){return en(e)?lle(e,t,n,r):t[n.axis]=n.parse(e,r),t}function xP(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(bR(f,d,o,c));return l}function sv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function cle(e,t,n){return e!==0?wi(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function ule(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function dle(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=ule(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[wP(u,a,s,l)]=!0,i=c)),o[wP(i,a,s,l)]=!0,e.borderSkipped=o}function wP(e,t,n,r){return r?(e=fle(e,t,n),e=_P(e,n,t)):e=_P(e,t,n),e}function fle(e,t,n){return e===t?n:e===n?t:e}function _P(e,t,n){return e==="start"?t:e==="end"?n:e}function ple(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class hle extends Uh{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return xP(t,n,r,i)}parseArrayData(t,n,r,i){return xP(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(es(h,c),f),d.push(bR(es(h,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=sv(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),h=o||He(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!b||sv(m._custom)||a===b._top||a===b._bottom,x:c?h.head:v.center,y:c?v.center:h.head,height:c?v.size:Math.abs(h.size),width:c?Math.abs(h.size):v.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;dle(S,w,b,a),ple(S,w,u.ratio),this.updateElement(t[p],p,S,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(He(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||ole(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=sv(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&wi(d)!==wi(c.barEnd)&&(f=0),f+=d);const v=!He(o)&&!u?o:f;let b=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=b,h=m-b,Math.abs(h)<a){h=cle(h,n,s)*a,d===s&&(b-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);b=Math.max(Math.min(b,_),x),m=b+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(s)){const S=wi(h)*n.getLineWidthForValue(s)/2;b+=S,h-=S}return{size:h,base:b,head:m,center:m+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?sle(t,n,i,u*c):ale(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Se(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function mle(e,t,n){let r=1,i=1,o=0,a=0;if(t<Ct){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>eu(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>eu(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),v=p(Ut,u,f),b=m(ot,c,d),S=m(ot+Ut,u,f);r=(h-b)/2,i=(v-S)/2,o=-(h+b)/2,a=-(v+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class gle extends Uh{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Me(r[t])){const{key:l="value"}=this._parsing;o=c=>+es(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return Qi(this.options.rotation-90)}_getCircumference(){return Qi(this.options.circumference)}_getRotationExtents(){let t=Ct,n=-Ct;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(bae(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=mle(d,u,l),v=(r.width-a)/f,b=(r.height-a)/p,S=Math.max(Math.min(v,b)/2,0),w=Qj(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Ct)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:h,includeOptions:v}=this._getSharedOptions(n,i);let b=this._getRotation(),S;for(S=0;S<n;++S)b+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};v&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),b+=w,this.updateElement(x,S,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Ct*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Yx(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class vle extends Uh{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=$ae(n,i,a);this._drawStart=s,this._drawCount=l,Bae(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,v=Jc(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=b?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),T=He(D[p]),j=C[f]=a.getPixelForValue(D[f],_),A=C[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(j)||isNaN(A)||T,C.stop=_>0&&Math.abs(D[f]-x[f])>v,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),b||this.updateElement(E,_,C,i),x=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ma(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class e1{static override(t){Object.assign(e1.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ma()}parse(){return ma()}format(){return ma()}add(){return ma()}diff(){return ma()}startOf(){return ma()}endOf(){return ma()}}var yle={_date:e1};function ble(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?jae:ja;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(h=>!He(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!He(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function Kh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=ble(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function xle(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function lv(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||Kh(e,n,t,function(s,l,c){!i&&!tu(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function wle(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=eR(a,{x:t.x,y:t.y});eu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return Kh(e,n,t,o),i}function _le(e,t,n,r,i,o){let a=[];const s=xle(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const v=s(t,m);v<l?(a=[{element:u,datasetIndex:d,index:f}],l=v):v===l&&a.push({element:u,datasetIndex:d,index:f})}return Kh(e,n,t,c),a}function cv(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?wle(e,t,n,i):_le(e,t,n,r,i,o)}function SP(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return Kh(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var Sle={modes:{index(e,t,n,r){const i=Oa(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?lv(e,i,o,r,a):cv(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=Oa(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?lv(e,i,o,r,a):cv(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=Oa(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return lv(e,i,o,r,a)},nearest(e,t,n,r){const i=Oa(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return cv(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=Oa(t,e);return SP(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Oa(t,e);return SP(e,i,"y",n.intersect,r)}}};const xR=["left","top","right","bottom"];function Gl(e,t){return e.filter(n=>n.pos===t)}function OP(e,t){return e.filter(n=>xR.indexOf(n.pos)===-1&&n.box.axis===t)}function Xl(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Ole(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function Ele(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!xR.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Ple(e,t){const n=Ele(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function kle(e){const t=Ole(e),n=Xl(t.filter(c=>c.box.fullSize),!0),r=Xl(Gl(t,"left"),!0),i=Xl(Gl(t,"right")),o=Xl(Gl(t,"top"),!0),a=Xl(Gl(t,"bottom")),s=OP(t,"x"),l=OP(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Gl(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function EP(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function wR(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Cle(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Me(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&wR(a,o.getPadding());const s=Math.max(0,t.outerWidth-EP(a,e,"left","right")),l=Math.max(0,t.outerHeight-EP(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Dle(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Ale(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function dc(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,Ale(s.horizontal,t));const{same:d,other:f}=Cle(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&dc(i,t,n,r)||u}function jd(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function PP(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;Zc(c.start)&&(a=c.start),l.fullSize?jd(l,i.left,a,n.outerWidth-i.right-i.left,f):jd(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;Zc(c.start)&&(o=c.start),l.fullSize?jd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):jd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Ro={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Qr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=kle(e.boxes),l=s.vertical,c=s.horizontal;Xe(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,v)=>v.box.options&&v.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);wR(f,Qr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=Ple(l.concat(c),d);dc(s.fullSize,p,d,m),dc(l,p,d,m),dc(c,p,d,m)&&dc(l,p,d,m),Dle(p),PP(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,PP(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Xe(s.chartArea,h=>{const v=h.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class _R{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Tle extends _R{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const nf="$chartjs",Mle={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kP=e=>e===null||e==="";function Nle(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[nf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",kP(i)){const o=uP(e,"width");o!==void 0&&(e.width=o)}if(kP(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=uP(e,"height");o!==void 0&&(e.height=o)}return e}const SR=Dse?{passive:!0}:!1;function jle(e,t,n){e&&e.addEventListener(t,n,SR)}function Rle(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,SR)}function Ile(e,t){const n=Mle[e.type]||e.type,{x:r,y:i}=Oa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function wp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Fle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.addedNodes,r),a=a&&!wp(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Lle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.removedNodes,r),a=a&&!wp(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const nu=new Map;let CP=0;function OR(){const e=window.devicePixelRatio;e!==CP&&(CP=e,nu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function $le(e,t){nu.size||window.addEventListener("resize",OR),nu.set(e,t)}function Ble(e){nu.delete(e),nu.size||window.removeEventListener("resize",OR)}function Wle(e,t,n){const r=e.canvas,i=r&&Jx(r);if(!i)return;const o=iR((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),$le(e,o),a}function uv(e,t,n){n&&n.disconnect(),t==="resize"&&Ble(e)}function zle(e,t,n){const r=e.canvas,i=iR(o=>{e.ctx!==null&&n(Ile(o,e))},e);return jle(r,t,i),i}class Vle extends _R{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Nle(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[nf])return!1;const r=n[nf].initial;["height","width"].forEach(o=>{const a=r[o];He(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[nf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Fle,detach:Lle,resize:Wle}[n]||zle;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:uv,detach:uv,resize:uv}[n]||Rle)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Cse(t,n,r,i)}isAttached(t){const n=t&&Jx(t);return!!(n&&n.isConnected)}}function Hle(e){return!Zx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Tle:Vle}let oa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Jc(this.x)&&Jc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Yle(e,t){const n=e.options.ticks,r=Ule(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?qle(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return Gle(t,c,o,a/i),c;const u=Kle(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Rd(t,c,u,He(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Rd(t,c,u,o[d],o[d+1]);return Rd(t,c,u,l,He(p)?t.length:l+p),c}return Rd(t,c,u),c}function Ule(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Kle(e,t,n){const r=Xle(e),i=t.length/n;if(!r)return Math.max(i,1);const o=kae(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function qle(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Gle(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Rd(e,t,n,r,i){const o=Se(r,0),a=Math.min(Se(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function Xle(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Qle=e=>e==="left"?"right":e==="right"?"left":e,DP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,AP=(e,t)=>Math.min(t||e,e);function TP(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Zle(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function Jle(e,t){Xe(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Ql(e){return e.drawTicks?e.tickLength:0}function MP(e,t){if(!e.display)return 0;const n=Zn(e.font,t),r=Qr(e.padding);return(en(e.text)?e.text.length:1)*n.lineHeight+r.height}function ece(e,t){return ls(e,{scale:t,type:"scale"})}function tce(e,t,n){return ls(e,{tick:n,index:t,type:"tick"})}function nce(e,t,n){let r=oR(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Qle(r)),r}function rce(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const h=a-i,v=s-o;if(e.isHorizontal()){if(p=sr(r,o,s),Me(n)){const b=Object.keys(n)[0],S=n[b];m=u[b].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=DP(e,n,t);f=s-o}else{if(Me(n)){const b=Object.keys(n)[0],S=n[b];p=u[b].getPixelForValue(S)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=DP(e,n,t);m=sr(r,a,i),d=n==="left"?-Ut:Ut}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Ol extends oa{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ri(t,Number.POSITIVE_INFINITY),n=ri(n,Number.NEGATIVE_INFINITY),r=ri(r,Number.POSITIVE_INFINITY),i=ri(i,Number.NEGATIVE_INFINITY),{min:ri(t,r),max:ri(n,i),minDefined:Br(t),maxDefined:Br(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:ri(n,ri(r,n)),max:ri(r,ri(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){dt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ase(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?TP(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Yle(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){dt(this.options.afterUpdate,[this])}beforeSetDimensions(){dt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){dt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),dt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){dt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=dt(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){dt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){dt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=AP(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=On(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-Ql(t.grid)-n.padding-MP(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=Tae(Math.min(Math.asin(On((u.highest.height+6)/s,-1,1)),Math.asin(On(l/c,-1,1))-Math.asin(On(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){dt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=MP(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Ql(o)+l):(t.height=this.maxHeight,t.width=Ql(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=Qi(this.labelRotation),h=Math.cos(m),v=Math.sin(m);if(s){const b=r.mirror?0:v*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:h*d.width+v*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(c,u,v,h)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){dt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)He(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=TP(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/AP(n,r));let c=0,u=0,d,f,p,m,h,v,b,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=v=h.string,b=o[v]=o[v]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!He(m)&&!en(m))w=oP(i,b.data,b.gc,w,m),x=S;else if(en(m))for(f=0,p=m.length;f<p;++f)_=m[f],!He(_)&&!en(_)&&(w=oP(i,b.data,b.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}Jle(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Nae(this._alignToPixels?ha(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=tce(this.getContext(),t,r))}return this.$context||(this.$context=ece(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Qi(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Ql(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,v=h/2,b=function(F){return ha(r,F,h)};let S,w,x,_,E,C,D,T,j,A,P,N;if(a==="top")S=b(this.bottom),C=this.bottom-f,T=S-v,A=b(t.top)+v,N=t.bottom;else if(a==="bottom")S=b(this.top),A=t.top,N=b(t.bottom)-v,C=S+v,T=this.top+f;else if(a==="left")S=b(this.right),E=this.right-f,D=S-v,j=b(t.left)+v,P=t.right;else if(a==="right")S=b(this.left),j=t.left,P=b(t.right)-v,E=S+v,D=this.left+f;else if(n==="x"){if(a==="center")S=b((t.top+t.bottom)/2+.5);else if(Me(a)){const F=Object.keys(a)[0],$=a[F];S=b(this.chart.scales[F].getPixelForValue($))}A=t.top,N=t.bottom,C=S+v,T=C+f}else if(n==="y"){if(a==="center")S=b((t.left+t.right)/2);else if(Me(a)){const F=Object.keys(a)[0],$=a[F];S=b(this.chart.scales[F].getPixelForValue($))}E=S-v,D=E-f,j=t.left,P=t.right}const M=Se(i.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=I){const F=this.getContext(w),$=o.setContext(F),V=s.setContext(F),z=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],ie=$.tickBorderDashOffset;x=Zle(this,w,l),x!==void 0&&(_=ha(r,x,z),c?E=D=j=P=_:C=T=A=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:T,x1:j,y1:A,x2:P,y2:N,width:z,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=S,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Ql(r.grid),p=f+u,m=d?-u:p,h=-Qi(this.labelRotation),v=[];let b,S,w,x,_,E,C,D,T,j,A,P,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Me(i)){const I=Object.keys(i)[0],F=i[I];E=this.chart.scales[I].getPixelForValue(F)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Me(i)){const I=Object.keys(i)[0],F=i[I];_=this.chart.scales[I].getPixelForValue(F)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(b=0,S=s.length;b<S;++b){w=s[b],x=w.label;const I=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,T=this._resolveTickFontOptions(b),j=T.lineHeight,A=en(x)?x.length:1;const F=A/2,$=I.color,V=I.textStrokeColor,z=I.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(b===S-1?B=this.options.reverse?"left":"right":b===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?P=-A*j+j/2:c==="center"?P=-M.highest.height/2-F*j+j:P=-M.highest.height+j/2:c==="near"||h!==0?P=j/2:c==="center"?P=M.highest.height/2-F*j:P=M.highest.height-A*j,d&&(P*=-1),h!==0&&!I.showLabelBackdrop&&(_+=j/2*Math.sin(h))):(E=D,P=(1-A)*j/2);let X;if(I.showLabelBackdrop){const q=Qr(I.backdropPadding),re=M.heights[b],J=M.widths[b];let ee=P-q.top,ie=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":ie-=J/2;break;case"right":ie-=J;break;case"inner":b===S-1?ie-=J:b>0&&(ie-=J/2);break}X={left:ie,top:ee,width:J+q.width,height:re+q.height,color:I.backdropColor}}v.push({label:x,font:T,textOffset:P,options:{rotation:h,color:$,strokeColor:V,strokeWidth:z,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Qi(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=ha(t,this.left,a)-a/2,u=ha(t,this.right,s)+s/2,d=f=l):(d=ha(t,this.top,a)-a/2,f=ha(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Ux(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;yp(r,c,0,u,l,s)}i&&Kx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Zn(r.font),a=Qr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=a.bottom,en(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=rce(this,l,n,s);yp(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:nce(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Se(t.grid&&t.grid.z,-1),i=Se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ol.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Zn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Id{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;ace(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,ice(t,a,r),this.override&&Rt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Rt[i]&&(delete Rt[i][r],this.override&&delete ts[r])}}function ice(e,t,n){const r=Qc(Object.create(null),[n?Rt.get(n):{},Rt.get(t),e.defaults]);Rt.set(t,r),e.defaultRoutes&&oce(t,e.defaultRoutes),e.descriptors&&Rt.describe(t,e.descriptors)}function oce(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Rt.route(o,i,l,s)})}function ace(e){return"id"in e&&"defaults"in e}class sce{constructor(){this.controllers=new Id(Uh,"datasets",!0),this.elements=new Id(oa,"elements"),this.plugins=new Id(Object,"plugins"),this.scales=new Id(Ol,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Xe(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=zx(t);dt(r["before"+i],[],r),n[t](r),dt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var oi=new sce;class lce{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(dt(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){He(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Se(r.options&&r.options.plugins,{}),o=cce(r);return i===!1&&!n?[]:dce(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function cce(e){const t={},n=[],r=Object.keys(oi.plugins.items);for(let o=0;o<r.length;o++)n.push(oi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function uce(e,t){return!t&&e===!1?null:e===!0?{}:e}function dce(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=uce(r[l],i);c!==null&&o.push({plugin:s,options:fce(e.config,{plugin:s,local:n[l]},c,a)})}return o}function fce(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $y(e,t){const n=Rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function pce(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function hce(e,t){return e===t?"_index_":"_value_"}function NP(e){if(e==="x"||e==="y"||e==="r")return e}function mce(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function By(e,...t){if(NP(e))return e;for(const n of t){const r=n.axis||mce(n.position)||e.length>1&&NP(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function jP(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function gce(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return jP(e,"x",n[0])||jP(e,"y",n[0])}return{}}function vce(e,t){const n=ts[e.type]||{scales:{}},r=t.scales||{},i=$y(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Me(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=By(a,s,gce(a,e),Rt.scales[s.type]),c=hce(l,i),u=n.scales||{};o[a]=xc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||$y(s,t),u=(ts[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=pce(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),xc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];xc(s,[Rt.scales[s.type],Rt.scale])}),o}function ER(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=vce(e,t)}function PR(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function yce(e){return e=e||{},e.data=PR(e.data),ER(e),e}const RP=new Map,kR=new Set;function Fd(e,t){let n=RP.get(e);return n||(n=t(),RP.set(e,n),kR.add(n)),n}const Zl=(e,t,n)=>{const r=es(t,n);r!==void 0&&e.add(r)};class bce{constructor(t){this._config=yce(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=PR(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ER(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Fd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Fd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Fd(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Zl(l,t,d))),u.forEach(d=>Zl(l,i,d)),u.forEach(d=>Zl(l,ts[o]||{},d)),u.forEach(d=>Zl(l,Rt,d)),u.forEach(d=>Zl(l,Fy,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),kR.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ts[n]||{},Rt.datasets[n]||{},{type:n},Rt,Fy]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=IP(this._resolverCache,t,i);let l=a;if(wce(a,n)){o.$shared=!1,r=Qo(r)?r():r;const c=this.createResolver(t,r,s);l=al(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=IP(this._resolverCache,t,r);return Me(n)?al(o,n,void 0,i):o}}function IP(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Gx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const xce=e=>Me(e)&&Object.getOwnPropertyNames(e).some(t=>Qo(e[t]));function wce(e,t){const{isScriptable:n,isIndexable:r}=cR(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Qo(s)||xce(s))||a&&en(s))return!0}return!1}var _ce="4.5.0";const Sce=["top","bottom","left","right","chartArea"];function FP(e,t){return e==="top"||e==="bottom"||Sce.indexOf(e)===-1&&t==="x"}function LP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function $P(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),dt(n&&n.onComplete,[e],t)}function Oce(e){const t=e.chart,n=t.options.animation;dt(n&&n.onProgress,[e],t)}function CR(e){return Zx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const rf={},BP=e=>{const t=CR(e);return Object.values(rf).filter(n=>n.canvas===t).pop()};function Ece(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Pce(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let $n=class{static defaults=Rt;static instances=rf;static overrides=ts;static registry=oi;static version=_ce;static getChart=BP;static register(...t){oi.add(...t),WP()}static unregister(...t){oi.remove(...t),WP()}constructor(t,n){const r=this.config=new bce(n),i=CR(t),o=BP(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Hle(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=yae(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new lce,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Fae(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],rf[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$i.listen(this,"complete",$P),$i.listen(this,"progress",Oce),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return He(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return oi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aP(this.canvas,this.ctx),this}stop(){return $i.stop(this),this}resize(t,n){$i.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,cP(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),dt(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Xe(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=By(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Xe(o,a=>{const s=a.options,l=s.id,c=By(l,s),u=Se(s.type,a.dtype);(s.position===void 0||FP(s.position,c)!==FP(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=oi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Xe(i,(a,s)=>{a||delete r[s]}),Xe(r,a=>{Ro.configure(this,a,a.options),Ro.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(LP("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||$y(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=oi.getController(s),{datasetElementType:c,dataElementType:u}=Rt.datasets[s];Object.assign(l,{dataElementType:oi.getElement(u),datasetElementType:c&&oi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Xe(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Xe(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(LP("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Xe(this.scales,t=>{Ro.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!X2(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;Ece(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!X2(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ro.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Xe(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Qo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&($i.has(this)?this.attached&&!$i.running(this)&&$i.start(this):(this.draw(),$P({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Vse(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Ux(n,i),t.controller.draw(),i&&Kx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return tu(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=Sle.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=ls(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Zc(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$i.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),aP(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete rf[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Xe(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Xe(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Xe(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!mp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=Oae(t),c=Pce(t,this._lastEvent,r,l);r&&(this._lastEvent=null,dt(o.onHover,[t,s,this],this),l&&dt(o.onClick,[t,s,this],this));const u=!mp(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function WP(){return Xe($n.instances,e=>e._plugins.invalidate())}function kce(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,Ur(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,Ur(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Ur(r-n));if(u==="round")e.arc(i,o,f,n-ot/2,r+ot/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+ot/2)+i,h=-p*Math.sin(n+ot/2)+o,v=p*Math.cos(r+ot/2)+i,b=p*Math.sin(r+ot/2)+o;e.lineTo(m,h),e.lineTo(v,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Cce(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Ut,r-Ut),e.closePath(),e.clip()}function Dce(e){return qx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Ace(e,t,n,r){const i=Dce(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return On(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:On(i.innerStart,0,a),innerEnd:On(i.innerEnd,0,a)}}function Ss(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function _p(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const I=u>0?u-r:0,F=d>0?d-r:0,$=(I+F)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/ot)/d,v=(m-h)/2,b=l+v+p,S=i-v-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=Ace(t,f,d,S-b),C=d-w,D=d-x,T=b+w/C,j=S-x/D,A=f+_,P=f+E,N=b+_/A,M=S-E/P;if(e.beginPath(),o){const I=(T+j)/2;if(e.arc(a,s,d,T,I),e.arc(a,s,d,I,j),x>0){const z=Ss(D,j,a,s);e.arc(z.x,z.y,x,j,S+Ut)}const F=Ss(P,S,a,s);if(e.lineTo(F.x,F.y),E>0){const z=Ss(P,M,a,s);e.arc(z.x,z.y,E,S+Ut,M+Math.PI)}const $=(S-E/f+(b+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,b+_/f,!0),_>0){const z=Ss(A,N,a,s);e.arc(z.x,z.y,_,N+Math.PI,b-Ut)}const V=Ss(C,b,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Ss(C,T,a,s);e.arc(z.x,z.y,w,b-Ut,T)}}else{e.moveTo(a,s);const I=Math.cos(T)*d+a,F=Math.sin(T)*d+s;e.lineTo(I,F);const $=Math.cos(j)*d+a,V=Math.sin(j)*d+s;e.lineTo($,V)}e.closePath()}function Tce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){_p(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Ct||Ct))}return _p(e,t,n,r,l,i),e.fill(),l}function Mce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let h=t.endAngle;if(o){_p(e,t,n,r,h,i);for(let v=0;v<o;++v)e.stroke();isNaN(s)||(h=a+(s%Ct||Ct))}m&&Cce(e,t,h),l.selfJoin&&h-a>=ot&&p===0&&u!=="miter"&&kce(e,t,h),o||(_p(e,t,n,r,h,i),e.stroke())}class t1 extends oa{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=eR(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Se(d,l-s),m=eu(o,s,l)&&s!==l,h=p>=Ct||m,v=jo(a,c+f,u+f);return h&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Ct?Math.floor(r/Ct):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(ot,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,Tce(t,this,c,o,a),Mce(t,this,c,o,a),t.restore()}}function DR(e,t,n=t){e.lineCap=Se(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Se(n.borderDash,t.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Se(n.borderWidth,t.borderWidth),e.strokeStyle=Se(n.borderColor,t.borderColor)}function Nce(e,t,n){e.lineTo(n.x,n.y)}function jce(e){return e.stepped?Qae:e.tension||e.cubicInterpolationMode==="monotone"?Zae:Nce}function AR(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Rce(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=AR(i,n,r),u=jce(o);let{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function Ice(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=AR(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,v,b;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==v&&(e.lineTo(u,v),e.lineTo(u,h),e.lineTo(u,b))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>v&&(v=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=v=_),b=_}w()}function Wy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Ice:Rce}function Fce(e){return e.stepped?Ase:e.tension||e.cubicInterpolationMode==="monotone"?Tse:Ea}function Lce(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),DR(e,t.options),e.stroke(i)}function $ce(e,t,n,r){const{segments:i,options:o}=t,a=Wy(t);for(const s of i)DR(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Bce=typeof Path2D=="function";function Wce(e,t,n,r){Bce&&!t.options.segment?Lce(e,t,n,r):$ce(e,t,n,r)}class n1 extends oa{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;_se(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$se(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=Ise(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Fce(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const h=Math.abs((i-p[n])/(m[n]-p[n])),v=l(p,m,h,r.stepped);v[n]=t[n],s.push(v)}return s.length===1?s[0]:s}pathSegment(t,n,r){return Wy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=Wy(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Wce(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function zP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class r1 extends oa{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return zP(this,t,"x",n)}inYRange(t,n){return zP(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!tu(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Ly(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function TR(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function Io(e,t,n,r){return e?0:On(t,n,r)}function zce(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=lR(r);return{t:Io(i.top,o.top,0,n),r:Io(i.right,o.right,0,t),b:Io(i.bottom,o.bottom,0,n),l:Io(i.left,o.left,0,t)}}function Vce(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Rs(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Me(i);return{topLeft:Io(!l||s.top||s.left,o.topLeft,0,a),topRight:Io(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Io(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Io(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Hce(e){const t=TR(e),n=t.right-t.left,r=t.bottom-t.top,i=zce(e,n/2,r/2),o=Vce(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function dv(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&TR(e,r);return s&&(i||jo(t,s.left,s.right))&&(o||jo(n,s.top,s.bottom))}function Yce(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Uce(e,t){e.rect(t.x,t.y,t.w,t.h)}function fv(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class El extends oa{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=Hce(this),s=Yce(a.radius)?bp:Uce;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,fv(a,n,o)),t.clip(),s(t,fv(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,fv(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return dv(this,t,n,r)}inXRange(t,n){return dv(this,t,null,n)}inYRange(t,n){return dv(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const VP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Kce=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class HP extends oa{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=dt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Zn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=VP(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,h)=>{const v=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+v+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:v,height:i},c[c.length-1]+=v+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,h=0;return this.legendItems.forEach((v,b)=>{const{itemWidth:S,itemHeight:w}=qce(r,n,o,v,i);b>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[b]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Is(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=sr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=sr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=sr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=sr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ux(t,this),this._draw(),Kx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Rt.color,l=Is(t.rtl,this.left,this.width),c=Zn(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:h,itemHeight:v}=VP(a,d),b=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const T=Se(D.lineWidth,1);if(i.fillStyle=Se(D.fillStyle,s),i.lineCap=Se(D.lineCap,"butt"),i.lineDashOffset=Se(D.lineDashOffset,0),i.lineJoin=Se(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const j={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(E,m/2),P=C+f;sR(i,j,A,P,a.pointStyleWidth&&m)}else{const j=C+Math.max((d-h)/2,0),A=l.leftForLtr(E,m),P=Rs(D.borderRadius);i.beginPath(),Object.values(P).some(N=>N!==0)?bp(i,{x:A,y:j,w:m,h,radius:P}):i.rect(A,j,m,h),i.fill(),T!==0&&i.stroke()}i.restore()},S=function(E,C,D){yp(i,D.text,E,C+v/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:sr(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:sr(o,this.top+x+u,this.bottom-n[0].height),line:0},hR(this.ctx,t.textDirection);const _=v+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),j=m+f+D;let A=p.x,P=p.y;l.setWidth(this.width),w?C>0&&A+j+u>this.right&&(P=p.y+=_,p.line++,A=p.x=sr(o,this.left+u,this.right-r[p.line])):C>0&&P+_>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,P=p.y=sr(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(A);if(b(N,P,E),A=Lae(T,A+m+f,w?A+j:this.right,t.rtl),S(l.x(A),P,E),w)p.x+=j+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=MR(E,M)+u}else p.y+=_}),mR(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Zn(n.font),i=Qr(n.padding);if(!n.display)return;const o=Is(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=sr(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,v)=>Math.max(h,v.height),0);u=c+sr(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=sr(s,d,d+f);a.textAlign=o.textAlign(oR(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,yp(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Zn(t.font),r=Qr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(jo(t,this.left,this.right)&&jo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],jo(t,i.left,i.left+i.width)&&jo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Qce(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Kce(i,r);i&&!o&&dt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&dt(n.onHover,[t,r,this],this)}else r&&dt(n.onClick,[t,r,this],this)}}function qce(e,t,n,r,i){const o=Gce(r,e,t,n),a=Xce(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Gce(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function Xce(e,t,n){let r=e;return typeof t.text!="string"&&(r=MR(t,n)),r}function MR(e,t){const n=e.text?e.text.length:0;return t*n}function Qce(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jr={id:"legend",_element:HP,start(e,t,n){const r=e.legend=new HP({ctx:e.ctx,options:n,chart:e});Ro.configure(e,r,n),Ro.addBox(e,r)},stop(e){Ro.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Ro.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Qr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const fc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Iy(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ii(e,t){return t&&(en(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Bi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
281
281
|
`)>-1?e.split(`
|
|
282
|
-
`):e}function Zce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function YP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Zn(t.bodyFont),c=Zn(t.titleFont),u=Zn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Qr(t.padding);let h=m.height,v=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){v=Math.max(v,n.measureText(x).width+S)};return n.save(),n.font=c.string,Xe(e.title,w),n.font=l.string,Xe(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Xe(r,x=>{Xe(x.before,w),Xe(x.lines,w),Xe(x.after,w)}),S=0,n.font=u.string,Xe(e.footer,w),n.restore(),v+=m.width,{width:v,height:h}}function Jce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function eue(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function tue(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),eue(c,e,t,n)&&(c="center"),c}function UP(e,t,n){const r=n.yAlign||t.yAlign||Jce(e,n);return{xAlign:n.xAlign||t.xAlign||tue(e,t,n,r),yAlign:r}}function nue(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function rue(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function KP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Rs(a);let m=nue(t,s);const h=rue(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:On(m,0,r.width-t.width),y:On(h,0,r.height-t.height)}}function Ld(e,t,n){const r=Qr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qP(e){return ii([],Bi(e))}function iue(e,t,n){return ls(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function GP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const NR={beforeTitle:Li,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Li,beforeBody:Li,beforeLabel:Li,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return He(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Li,afterBody:Li,beforeFooter:Li,footer:Li,afterFooter:Li};function Vn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?NR[t].call(n,r):i}class XP extends oa{static positioners=fc;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new vR(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=iue(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Vn(r,"beforeTitle",this,t),o=Vn(r,"title",this,t),a=Vn(r,"afterTitle",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}getBeforeBody(t,n){return qP(Vn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Xe(t,o=>{const a={before:[],lines:[],after:[]},s=GP(r,o);ii(a.before,Bi(Vn(s,"beforeLabel",this,o))),ii(a.lines,Vn(s,"label",this,o)),ii(a.after,Bi(Vn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qP(Vn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Vn(r,"beforeFooter",this,t),o=Vn(r,"footer",this,t),a=Vn(r,"afterFooter",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Zce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Xe(s,u=>{const d=GP(t.callbacks,u);i.push(Vn(d,"labelColor",this,u)),o.push(Vn(d,"labelPointStyle",this,u)),a.push(Vn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=fc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=YP(this,r),c=Object.assign({},s,l),u=UP(this.chart,r,c),d=KP(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Rs(s),{x:f,y:p}=t,{width:m,height:h}=n;let v,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(v=f,b=v-a,w=x+a,_=x-a):(v=f+m,b=v+a,w=x-a,_=x+a),S=v):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,v=b-a,S=b+a):(w=p+h,x=w+a,v=b+a,S=b-a),_=w),{x1:v,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Is(r.rtl,this.x,this.width);for(t.x=Ld(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Zn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Zn(o.bodyFont),d=Ld(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},v=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ly(t,h,v,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ly(t,h,v,b)}else{t.lineWidth=Me(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),v=i.leftForLtr(i.xPlus(f,1),c-2),b=Rs(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,bp(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),bp(t,{x:v,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Zn(r.bodyFont);let f=d.lineHeight,p=0;const m=Is(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},v=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Ld(this,v,r),n.fillStyle=r.bodyColor,Xe(this.beforeBody,h),p=s&&v!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Xe(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Xe(b.after,h)}p=0,f=d.lineHeight,Xe(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Is(r.rtl,this.x,this.width);for(t.x=Ld(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Zn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Rs(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=fc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=YP(this,t),l=Object.assign({},a,this._size),c=UP(n,t,l),u=KP(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Qr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),hR(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),mR(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!mp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!mp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=fc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Yr={id:"tooltip",_element:XP,positioners:fc,afterInit(e,t,n){n&&(e.tooltip=new XP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:NR},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const oue=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function aue(e,t,n,r){const i=e.indexOf(t);if(i===-1)return oue(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const sue=(e,t)=>e===null?null:On(Math.round(e),0,t);function QP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends Ol{static id="category";static defaults={ticks:{callback:QP}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(He(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:aue(r,t,Se(n,t),this._addedLabels),sue(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return QP.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function lue(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:v}=t,b=!He(a),S=!He(s),w=!He(c),x=(v-h)/(d+1);let _=Z2((v-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:v}];T=Math.ceil(v/_)-Math.floor(h/_),T>m&&(_=Z2(T*_/m/p)*p),He(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(v/_)*_):(C=h,D=v),b&&S&&o&&Dae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,wc(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(J2(_),J2(C));E=Math.pow(10,He(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,wc(Math.round((C+A*_)*E)/E,a,ZP(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&wc(n[n.length-1].value,s,ZP(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function ZP(e,t,{horizontal:n,minRotation:r}){const i=Qi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class cue extends Ol{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return He(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=wi(i),c=wi(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=lue(i,o);return t.bounds==="ticks"&&Aae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Yx(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends cue{static id="linear";static defaults={ticks:{callback:aR.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Br(t)?t:0,this.max=Br(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Qi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const qh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gn=Object.keys(qh);function JP(e,t){return e-t}function ek(e,t){if(He(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Br(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Jc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function tk(e,t,n,r){const i=Gn.length;for(let o=Gn.indexOf(e);o<i-1;++o){const a=qh[Gn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return Gn[o]}return Gn[i-1]}function uue(e,t,n,r,i){for(let o=Gn.length-1;o>=Gn.indexOf(n);o--){const a=Gn[o];if(qh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Gn[n?Gn.indexOf(n):0]}function due(e){for(let t=Gn.indexOf(e)+1,n=Gn.length;t<n;++t)if(qh[Gn[t]].common)return Gn[t]}function nk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Vx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function fue(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function rk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:fue(e,r,i,n)}class ik extends Ol{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new yle._date(t.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ek(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Br(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Br(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=Rae(i,o,a);return this._unit=n.unit||(r.autoSkip?tk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):uue(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:due(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),rk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=On(n,0,a),r=On(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||tk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Jc(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)nk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&nk(u,f,m),Object.keys(u).sort(JP).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return dt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Qi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,rk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(ek(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return nR(t.sort(JP))}}function $d(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ja(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ja(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class Afe extends ik{static id="timeseries";static defaults=ik.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=$d(n,this.min),this._tableRange=$d(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return($d(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return $d(this._table,r*this._tableRange+this._minPos,!0)}}const jR="label";function ok(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function pue(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function RR(e,t){e.labels=t}function IR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jR;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function hue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jR;const n={labels:[],datasets:[]};return RR(n,e.labels),IR(n,e.datasets,t),n}function mue(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new $n(p.current,{type:a,data:hue(s,o),options:l&&{...l},plugins:c}),ok(t,m.current))},v=()=>{ok(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&pue(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&RR(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&IR(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(v(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(v(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>v()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const gue=k.forwardRef(mue);function i1(e,t){return $n.register(t),k.forwardRef((n,r)=>k.createElement(gue,{...n,ref:r,type:e}))}const o1=i1("line",vle),Pl=i1("bar",hle),a1=i1("doughnut",gle);$n.register(t1,Yr,Jr);const vue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},FR=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,v={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:w=>`${w.label}: ${w.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}];return g.jsx(Ae,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:g.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[g.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((w,x)=>g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] text-[#64748B]",children:w.label}),g.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:w.color},children:w.value})]},x)),g.jsxs("div",{className:"text-[10px] flex gap-[8px] items-center",style:{color:c},children:[l,g.jsx("div",{className:"text-[#64748B] text-[10px]",children:u})]})]}),g.jsx("div",{className:"col-span-7",children:g.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:g.jsx(a1,{data:v,options:b,plugins:[vue]})})})]})})},ak=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return g.jsxs("div",{className:"flex flex-col items-start",children:[g.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:g.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),g.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),g.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},sk=({title:e,value:t,suffix:n,valueClass:r=""})=>g.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),g.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&g.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),yue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return g.jsxs("div",{children:[g.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[g.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[g.jsx(yb,{className:"h-6 w-6 text-[#329DFF]"}),g.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),g.jsxs("div",{className:"flex items-center justify-between gap-",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),g.jsxs("div",{className:"flex items-end",children:[g.jsx(ak,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),g.jsx(ak,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),g.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[g.jsx(sk,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),g.jsx(sk,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};$n.register(t1,Yr,Jr);const bue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},xue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return g.jsx(Ae,{title:"Resident Overview",icon:g.jsx(KC,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:g.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[g.jsxs("div",{className:"col-span-5",children:[g.jsxs("div",{children:[g.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),g.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),g.jsxs("div",{children:[g.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),g.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),g.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",g.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),g.jsx("div",{className:"col-span-7",children:g.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:g.jsx(a1,{data:a,options:s,plugins:[bue]})})})]})})};$n.register(Oo,Eo,El,Yr,Jr);const wue=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return g.jsx(Ae,{title:"Block-wise Occupancy",period:g.jsx(Ln,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:g.jsx(Pl,{data:o,options:a})})};$n.register(Oo,Eo,r1,n1,Yr,Jr);const _ue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},Sue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>_ue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(Ae,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:g.jsx(Ln,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:g.jsx(o1,{data:r,options:i})})};$n.register(Oo,Eo,r1,n1,Yr,Jr);const Oue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},LR=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Oue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(o1,{data:r,options:i})};function lk({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return g.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[g.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),g.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[g.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),g.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function Eue(){return g.jsxs(Ae,{title:"Accounting",className:"w-full h-[523px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[g.jsx(lk,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),g.jsx(lk,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),g.jsx("div",{className:"h-[254px] mt-[35.5px]",children:g.jsx(LR,{})})]})}$n.register(Oo,Eo,El,Yr,Jr);const Pue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsx(Ae,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:g.jsx(Pl,{data:r,options:i})})},kue=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return g.jsxs(Ae,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[g.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),g.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),g.jsx("div",{className:"flex flex-col items-end",children:g.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),g.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[g.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),g.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};$n.register(Oo,Eo,El,Yr,Jr);const Cue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsxs(Ae,{title:"Dues Ageing",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>g.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:g.jsxs("div",{className:"flex justify-between items-start",children:[g.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),g.jsxs("div",{className:"text-right",children:[g.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),g.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),g.jsx("div",{className:"h-[192px]",children:g.jsx(Pl,{data:r,options:i})})]})};$n.register(t1,Yr,Jr);const Due=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return g.jsxs(Ae,{title:"Expense Categories",className:"w-full h-[523px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[g.jsx(a1,{data:n,options:i}),g.jsxs("div",{className:"absolute text-center",children:[g.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),g.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),g.jsx("div",{className:"space-y-2",children:e.map((o,a)=>g.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[g.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[g.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),g.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Jl=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function Aue(){const e=Jl.reduce((t,n)=>t+n.value,0);return g.jsx(Ae,{title:"Asset Value Breakdown",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:Jl,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Jl.map((t,n)=>g.jsx(Vt,{fill:t.color},`cell-${n}`))}),g.jsx(on,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),g.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),g.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[g.jsx("div",{className:"flex flex-col gap-[8px]",children:Jl.slice(0,3).map(t=>g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),g.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),g.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Jl.slice(3).map(t=>g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),g.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}$n.register(Oo,Eo,El,Yr,Jr);const Tue=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsx(Ae,{title:"Revenue by Category",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:g.jsx(Pl,{data:r,options:i})})};function Mue(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function Nue(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function jue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsxs(Ae,{title:e,icon:g.jsx("div",{className:"h-6 w-6 grid place-items-center",children:g.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[g.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[g.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-slate-500",children:r})]})]})}function Rue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:UC,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Nue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Mue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:qC,iconColor:"text-[#DBB467]"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(jue,{...t},n))})}const Bd=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function Iue(){const t=Bd.find(n=>n.name==="Completed")?.value||0;return g.jsx(Ae,{title:"Guard Patrols",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:Bd,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Bd.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Bd.map(n=>g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}$n.register(Oo,Eo,r1,n1,Yr,Jr);const Fue=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(Ae,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"text-[20px] text-[#884EA7]"}),children:g.jsx(o1,{data:t,options:n})})};function Lue(){return g.jsx(Ae,{title:"Incident Reports",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:g.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[g.jsx("div",{children:"4 - Danger"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:g.jsx(Xw,{className:"text-white text-[10px]"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[g.jsx("div",{children:"3 - High"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:g.jsx(Xw,{className:"text-white text-[10px]"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[g.jsx("div",{children:"1 - Low"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function $ue(){return g.jsx(Ae,{title:"Staff Attendance",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[g.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[g.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),g.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[g.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),g.jsxs("div",{className:"mt-[24px] ",children:[g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function Bue(e){return Ye({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function Wue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsxs(Ae,{title:e,icon:g.jsx("div",{className:"h-6 w-6 grid place-items-center",children:g.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[g.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[g.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-slate-500",children:r})]})]})}function zue(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:yb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:ooe,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Bue,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:S3,iconColor:"text-[#36AB6C]"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(Wue,{...t},n))})}const Vue=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],Hue=(e="")=>e.replace(/</g,"<").replace(/>/g,">").replace(/<[^>]*>/g,"").trim();function Yue({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:Hue(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Vue;return g.jsx(Ae,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:g.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),g.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),g.jsxs("div",{className:"flex flex-col items-end",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const Uue=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},Kue=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],que=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return g.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[g.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=Uue(a);return g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[g.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),g.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),g.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},Gue=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return g.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[g.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),g.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},Xue=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:Kue).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return g.jsxs(Ae,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[g.jsx(Lt,{width:"100%",height:"85%",children:g.jsxs(ra,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[g.jsx(Hr,{strokeDasharray:"0",vertical:!1}),g.jsx(xr,{dataKey:"level"}),g.jsx(nr,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),g.jsx(on,{content:g.jsx(que,{}),cursor:!1}),g.jsx(Nn,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),g.jsx(Nn,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),g.jsx(Nn,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),g.jsx(Gue,{})]})},Que=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Zue({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Que;return g.jsx(Ae,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:g.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),g.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),g.jsxs("div",{className:"flex flex-col items-end",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function Jue(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const ede=["open_complaints","pending_requests","avg_response_time","resolution_rate"],tde={open_complaints:{title:"Open Complaints",Icon:UC,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:Jue,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:M3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:C3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},nde=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>g.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),rde={primary:{size:28,lineHeight:32,weight:500}},ide={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function ode({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?g.jsx(ck,{id:e,data:t}):g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:ede.map(n=>g.jsx(ck,{id:n},n))})}function ck({id:e,data:t}){const n=tde[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=au,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:ide[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,g.jsx("div",{className:"h-[132px]",children:g.jsxs(Ae,{title:i,titleColor:a,icon:g.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:g.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[g.jsx(nde,{...rde.primary,children:c}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[g.jsx(bb,{value:u}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function uk({title:e,date:t,rsvp:n,utilisation:r,status:i}){return g.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),g.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),g.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),g.jsxs("div",{className:"flex justify-between items-center mt-2",children:[g.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),g.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),g.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:g.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function ade(){return g.jsx(Ae,{title:"Events Utilisation",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:g.jsxs("div",{children:[g.jsx(uk,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),g.jsx(uk,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Wd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return g.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[g.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),g.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function sde(){return g.jsx(Ae,{title:"Notice Board Status",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:g.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[g.jsx(Wd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),g.jsx(Wd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),g.jsx(Wd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),g.jsx(Wd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function $R(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function lde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsx(Ae,{title:e,icon:g.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:g.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[g.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function cde({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:$R,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return g.jsx("div",{className:"h-full",children:t.map((n,r)=>g.jsx(lde,{...n},r))})}function ude(e){return Ye({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function dde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsx(Ae,{title:e,icon:g.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:g.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[g.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function fde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:$R,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:O3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:roe,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ude,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(dde,{...t},n))})}const dk=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return g.jsxs("div",{className:"flex flex-col items-start",children:[g.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:g.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),g.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},pde=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return g.jsx("div",{children:g.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[g.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[g.jsx(yb,{className:"!text-[20px] text-[#329DFF]"}),g.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),g.jsx("div",{className:"flex items-center gap-1",children:g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),g.jsxs("div",{className:"flex items-end gap-1",children:[g.jsx(dk,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),g.jsx(dk,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};/**
|
|
282
|
+
`):e}function Zce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function YP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Zn(t.bodyFont),c=Zn(t.titleFont),u=Zn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Qr(t.padding);let h=m.height,v=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){v=Math.max(v,n.measureText(x).width+S)};return n.save(),n.font=c.string,Xe(e.title,w),n.font=l.string,Xe(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Xe(r,x=>{Xe(x.before,w),Xe(x.lines,w),Xe(x.after,w)}),S=0,n.font=u.string,Xe(e.footer,w),n.restore(),v+=m.width,{width:v,height:h}}function Jce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function eue(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function tue(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),eue(c,e,t,n)&&(c="center"),c}function UP(e,t,n){const r=n.yAlign||t.yAlign||Jce(e,n);return{xAlign:n.xAlign||t.xAlign||tue(e,t,n,r),yAlign:r}}function nue(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function rue(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function KP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Rs(a);let m=nue(t,s);const h=rue(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:On(m,0,r.width-t.width),y:On(h,0,r.height-t.height)}}function Ld(e,t,n){const r=Qr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qP(e){return ii([],Bi(e))}function iue(e,t,n){return ls(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function GP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const NR={beforeTitle:Li,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Li,beforeBody:Li,beforeLabel:Li,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return He(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Li,afterBody:Li,beforeFooter:Li,footer:Li,afterFooter:Li};function Vn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?NR[t].call(n,r):i}class XP extends oa{static positioners=fc;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new vR(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=iue(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Vn(r,"beforeTitle",this,t),o=Vn(r,"title",this,t),a=Vn(r,"afterTitle",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}getBeforeBody(t,n){return qP(Vn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Xe(t,o=>{const a={before:[],lines:[],after:[]},s=GP(r,o);ii(a.before,Bi(Vn(s,"beforeLabel",this,o))),ii(a.lines,Vn(s,"label",this,o)),ii(a.after,Bi(Vn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qP(Vn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Vn(r,"beforeFooter",this,t),o=Vn(r,"footer",this,t),a=Vn(r,"afterFooter",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Zce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Xe(s,u=>{const d=GP(t.callbacks,u);i.push(Vn(d,"labelColor",this,u)),o.push(Vn(d,"labelPointStyle",this,u)),a.push(Vn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=fc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=YP(this,r),c=Object.assign({},s,l),u=UP(this.chart,r,c),d=KP(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Rs(s),{x:f,y:p}=t,{width:m,height:h}=n;let v,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(v=f,b=v-a,w=x+a,_=x-a):(v=f+m,b=v+a,w=x-a,_=x+a),S=v):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,v=b-a,S=b+a):(w=p+h,x=w+a,v=b+a,S=b-a),_=w),{x1:v,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Is(r.rtl,this.x,this.width);for(t.x=Ld(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Zn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Zn(o.bodyFont),d=Ld(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},v=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ly(t,h,v,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ly(t,h,v,b)}else{t.lineWidth=Me(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),v=i.leftForLtr(i.xPlus(f,1),c-2),b=Rs(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,bp(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),bp(t,{x:v,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Zn(r.bodyFont);let f=d.lineHeight,p=0;const m=Is(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},v=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Ld(this,v,r),n.fillStyle=r.bodyColor,Xe(this.beforeBody,h),p=s&&v!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Xe(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Xe(b.after,h)}p=0,f=d.lineHeight,Xe(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Is(r.rtl,this.x,this.width);for(t.x=Ld(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Zn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Rs(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=fc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=YP(this,t),l=Object.assign({},a,this._size),c=UP(n,t,l),u=KP(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Qr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),hR(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),mR(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!mp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!mp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=fc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Yr={id:"tooltip",_element:XP,positioners:fc,afterInit(e,t,n){n&&(e.tooltip=new XP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:NR},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const oue=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function aue(e,t,n,r){const i=e.indexOf(t);if(i===-1)return oue(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const sue=(e,t)=>e===null?null:On(Math.round(e),0,t);function QP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends Ol{static id="category";static defaults={ticks:{callback:QP}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(He(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:aue(r,t,Se(n,t),this._addedLabels),sue(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return QP.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function lue(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:v}=t,b=!He(a),S=!He(s),w=!He(c),x=(v-h)/(d+1);let _=Z2((v-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:v}];T=Math.ceil(v/_)-Math.floor(h/_),T>m&&(_=Z2(T*_/m/p)*p),He(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(v/_)*_):(C=h,D=v),b&&S&&o&&Dae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,wc(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(J2(_),J2(C));E=Math.pow(10,He(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,wc(Math.round((C+A*_)*E)/E,a,ZP(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&wc(n[n.length-1].value,s,ZP(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function ZP(e,t,{horizontal:n,minRotation:r}){const i=Qi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class cue extends Ol{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return He(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=wi(i),c=wi(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=lue(i,o);return t.bounds==="ticks"&&Aae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Yx(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends cue{static id="linear";static defaults={ticks:{callback:aR.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Br(t)?t:0,this.max=Br(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Qi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const qh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gn=Object.keys(qh);function JP(e,t){return e-t}function ek(e,t){if(He(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Br(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Jc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function tk(e,t,n,r){const i=Gn.length;for(let o=Gn.indexOf(e);o<i-1;++o){const a=qh[Gn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return Gn[o]}return Gn[i-1]}function uue(e,t,n,r,i){for(let o=Gn.length-1;o>=Gn.indexOf(n);o--){const a=Gn[o];if(qh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Gn[n?Gn.indexOf(n):0]}function due(e){for(let t=Gn.indexOf(e)+1,n=Gn.length;t<n;++t)if(qh[Gn[t]].common)return Gn[t]}function nk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Vx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function fue(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function rk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:fue(e,r,i,n)}class ik extends Ol{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new yle._date(t.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ek(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Br(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Br(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=Rae(i,o,a);return this._unit=n.unit||(r.autoSkip?tk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):uue(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:due(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),rk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=On(n,0,a),r=On(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||tk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Jc(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)nk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&nk(u,f,m),Object.keys(u).sort(JP).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return dt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Qi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,rk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(ek(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return nR(t.sort(JP))}}function $d(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ja(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ja(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class Dfe extends ik{static id="timeseries";static defaults=ik.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=$d(n,this.min),this._tableRange=$d(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return($d(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return $d(this._table,r*this._tableRange+this._minPos,!0)}}const jR="label";function ok(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function pue(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function RR(e,t){e.labels=t}function IR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jR;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function hue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jR;const n={labels:[],datasets:[]};return RR(n,e.labels),IR(n,e.datasets,t),n}function mue(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new $n(p.current,{type:a,data:hue(s,o),options:l&&{...l},plugins:c}),ok(t,m.current))},v=()=>{ok(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&pue(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&RR(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&IR(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(v(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(v(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>v()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const gue=k.forwardRef(mue);function i1(e,t){return $n.register(t),k.forwardRef((n,r)=>k.createElement(gue,{...n,ref:r,type:e}))}const o1=i1("line",vle),Pl=i1("bar",hle),a1=i1("doughnut",gle);$n.register(t1,Yr,Jr);const vue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},FR=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,v={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:w=>`${w.label}: ${w.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}];return g.jsx(Ae,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:g.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[g.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((w,x)=>g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] text-[#64748B]",children:w.label}),g.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:w.color},children:w.value})]},x)),g.jsxs("div",{className:"text-[10px] flex gap-[8px] items-center",style:{color:c},children:[l,g.jsx("div",{className:"text-[#64748B] text-[10px]",children:u})]})]}),g.jsx("div",{className:"col-span-7",children:g.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:g.jsx(a1,{data:v,options:b,plugins:[vue]})})})]})})},ak=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return g.jsxs("div",{className:"flex flex-col items-start",children:[g.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:g.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),g.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),g.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},sk=({title:e,value:t,suffix:n,valueClass:r=""})=>g.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),g.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&g.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),yue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return g.jsxs("div",{children:[g.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[g.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[g.jsx(yb,{className:"h-6 w-6 text-[#329DFF]"}),g.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),g.jsxs("div",{className:"flex items-center justify-between gap-",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),g.jsxs("div",{className:"flex items-end",children:[g.jsx(ak,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),g.jsx(ak,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),g.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[g.jsx(sk,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),g.jsx(sk,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};$n.register(t1,Yr,Jr);const bue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},xue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return g.jsx(Ae,{title:"Resident Overview",icon:g.jsx(KC,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:g.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[g.jsxs("div",{className:"col-span-5",children:[g.jsxs("div",{children:[g.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),g.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),g.jsxs("div",{children:[g.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),g.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),g.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",g.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),g.jsx("div",{className:"col-span-7",children:g.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:g.jsx(a1,{data:a,options:s,plugins:[bue]})})})]})})};$n.register(Oo,Eo,El,Yr,Jr);const wue=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return g.jsx(Ae,{title:"Block-wise Occupancy",period:g.jsx(Ln,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:g.jsx(Pl,{data:o,options:a})})};$n.register(Oo,Eo,r1,n1,Yr,Jr);const _ue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},Sue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>_ue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(Ae,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:g.jsx(Ln,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:g.jsx(o1,{data:r,options:i})})};$n.register(Oo,Eo,r1,n1,Yr,Jr);const Oue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},LR=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Oue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(o1,{data:r,options:i})};function lk({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return g.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[g.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),g.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[g.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),g.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function Eue(){return g.jsxs(Ae,{title:"Accounting",className:"w-full h-[523px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[g.jsx(lk,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),g.jsx(lk,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),g.jsx("div",{className:"h-[254px] mt-[35.5px]",children:g.jsx(LR,{})})]})}$n.register(Oo,Eo,El,Yr,Jr);const Pue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsx(Ae,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:g.jsx(Pl,{data:r,options:i})})},kue=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return g.jsxs(Ae,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[g.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),g.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),g.jsx("div",{className:"flex flex-col items-end",children:g.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),g.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[g.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),g.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};$n.register(Oo,Eo,El,Yr,Jr);const Cue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsxs(Ae,{title:"Dues Ageing",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>g.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:g.jsxs("div",{className:"flex justify-between items-start",children:[g.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),g.jsxs("div",{className:"text-right",children:[g.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),g.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),g.jsx("div",{className:"h-[192px]",children:g.jsx(Pl,{data:r,options:i})})]})};$n.register(t1,Yr,Jr);const Due=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return g.jsxs(Ae,{title:"Expense Categories",className:"w-full h-[523px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[g.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[g.jsx(a1,{data:n,options:i}),g.jsxs("div",{className:"absolute text-center",children:[g.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),g.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),g.jsx("div",{className:"space-y-2",children:e.map((o,a)=>g.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[g.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[g.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),g.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Jl=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function Aue(){const e=Jl.reduce((t,n)=>t+n.value,0);return g.jsx(Ae,{title:"Asset Value Breakdown",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:Jl,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Jl.map((t,n)=>g.jsx(Vt,{fill:t.color},`cell-${n}`))}),g.jsx(on,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),g.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),g.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[g.jsx("div",{className:"flex flex-col gap-[8px]",children:Jl.slice(0,3).map(t=>g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),g.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),g.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Jl.slice(3).map(t=>g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),g.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}$n.register(Oo,Eo,El,Yr,Jr);const Tue=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return g.jsx(Ae,{title:"Revenue by Category",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:g.jsx(Pl,{data:r,options:i})})};function Mue(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function Nue(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function jue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsxs(Ae,{title:e,icon:g.jsx("div",{className:"h-6 w-6 grid place-items-center",children:g.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[g.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[g.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-slate-500",children:r})]})]})}function Rue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:UC,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Nue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Mue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:qC,iconColor:"text-[#DBB467]"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(jue,{...t},n))})}const Bd=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function Iue(){const t=Bd.find(n=>n.name==="Completed")?.value||0;return g.jsx(Ae,{title:"Guard Patrols",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:Bd,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Bd.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Bd.map(n=>g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}$n.register(Oo,Eo,r1,n1,Yr,Jr);const Fue=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return g.jsx(Ae,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:g.jsx(Ln,{className:"text-[20px] text-[#884EA7]"}),children:g.jsx(o1,{data:t,options:n})})};function Lue(){return g.jsx(Ae,{title:"Incident Reports",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:g.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[g.jsx("div",{children:"4 - Danger"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:g.jsx(Xw,{className:"text-white text-[10px]"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[g.jsx("div",{children:"3 - High"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[g.jsxs("div",{className:"flex items-center gap-[8px]",children:[g.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:g.jsx(Xw,{className:"text-white text-[10px]"})}),g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),g.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[g.jsx("div",{children:"1 - Low"}),g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function $ue(){return g.jsx(Ae,{title:"Staff Attendance",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[g.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[g.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),g.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[g.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),g.jsxs("div",{className:"mt-[24px] ",children:[g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),g.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),g.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function Bue(e){return Ye({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function Wue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsxs(Ae,{title:e,icon:g.jsx("div",{className:"h-6 w-6 grid place-items-center",children:g.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[g.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[g.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-slate-500",children:r})]})]})}function zue(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:yb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:ooe,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Bue,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:S3,iconColor:"text-[#36AB6C]"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(Wue,{...t},n))})}const Vue=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],Hue=(e="")=>e.replace(/</g,"<").replace(/>/g,">").replace(/<[^>]*>/g,"").trim();function Yue({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:Hue(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Vue;return g.jsx(Ae,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:g.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),g.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),g.jsxs("div",{className:"flex flex-col items-end",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const Uue=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},Kue=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],que=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return g.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[g.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=Uue(a);return g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[g.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),g.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),g.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},Gue=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return g.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[g.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),g.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},Xue=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:Kue).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return g.jsxs(Ae,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[g.jsx(Lt,{width:"100%",height:"85%",children:g.jsxs(ra,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[g.jsx(Hr,{strokeDasharray:"0",vertical:!1}),g.jsx(xr,{dataKey:"level"}),g.jsx(nr,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),g.jsx(on,{content:g.jsx(que,{}),cursor:!1}),g.jsx(Nn,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),g.jsx(Nn,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),g.jsx(Nn,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),g.jsx(Gue,{})]})},Que=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Zue({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Que;return g.jsx(Ae,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:g.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>g.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),g.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),g.jsxs("div",{className:"flex flex-col items-end",children:[g.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function Jue(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const ede=["open_complaints","pending_requests","avg_response_time","resolution_rate"],tde={open_complaints:{title:"Open Complaints",Icon:UC,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:Jue,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:M3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:C3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},nde=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>g.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),rde={primary:{size:28,lineHeight:32,weight:500}},ide={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function ode({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?g.jsx(ck,{id:e,data:t}):g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:ede.map(n=>g.jsx(ck,{id:n},n))})}function ck({id:e,data:t}){const n=tde[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=au,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:ide[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,g.jsx("div",{className:"h-[132px]",children:g.jsxs(Ae,{title:i,titleColor:a,icon:g.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:g.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[g.jsx(nde,{...rde.primary,children:c}),g.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[g.jsx(bb,{value:u}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function uk({title:e,date:t,rsvp:n,utilisation:r,status:i}){return g.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),g.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),g.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),g.jsxs("div",{className:"flex justify-between items-center mt-2",children:[g.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),g.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),g.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:g.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function ade(){return g.jsx(Ae,{title:"Events Utilisation",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:g.jsxs("div",{children:[g.jsx(uk,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),g.jsx(uk,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Wd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return g.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[g.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),g.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function sde(){return g.jsx(Ae,{title:"Notice Board Status",period:g.jsx(Ln,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:g.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[g.jsx(Wd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),g.jsx(Wd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),g.jsx(Wd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),g.jsx(Wd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function $R(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function lde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsx(Ae,{title:e,icon:g.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:g.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[g.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function cde({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:$R,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return g.jsx("div",{className:"h-full",children:t.map((n,r)=>g.jsx(lde,{...n},r))})}function ude(e){return Ye({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function dde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return g.jsx(Ae,{title:e,icon:g.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:g.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),g.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[g.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),g.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function fde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:$R,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:O3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:roe,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ude,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return g.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>g.jsx(dde,{...t},n))})}const dk=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return g.jsxs("div",{className:"flex flex-col items-start",children:[g.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:g.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),g.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},pde=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return g.jsx("div",{children:g.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[g.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[g.jsx(yb,{className:"!text-[20px] text-[#329DFF]"}),g.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),g.jsx("div",{className:"flex items-center gap-1",children:g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),g.jsxs("div",{className:"flex items-end gap-1",children:[g.jsx(dk,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),g.jsx(dk,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};/**
|
|
283
283
|
* @license lucide-react v0.564.0 - ISC
|
|
284
284
|
*
|
|
285
285
|
* This source code is licensed under the ISC license.
|
|
@@ -359,4 +359,4 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
359
359
|
*
|
|
360
360
|
* This source code is licensed under the ISC license.
|
|
361
361
|
* See the LICENSE file in the root directory of this source tree.
|
|
362
|
-
*/const Tde=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Mde=aa("waves-ladder",Tde);$n.register(Oo,Eo,El,Yr);const Nde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return g.jsxs(Ae,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:g.jsx(xde,{className:"!text-[24px] text-[#8B5CF6]"}),children:[g.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),g.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),g.jsx("div",{className:"h-[110px]",children:g.jsx(Pl,{data:t,options:n})})]})};function jde(){return g.jsx(Ae,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:g.jsx(C5,{className:"!text-[24px] text-[#FA7E28]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),g.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[g.jsx(VC,{}),8,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsxs("div",{className:"mt-[16px]",children:[g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Rde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return g.jsx(Ae,{className:"h-[324px]",title:"Amenities",period:"Today",icon:g.jsx(Mde,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&g.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?g.jsx(VC,{}):g.jsx(w3,{}),u,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[g.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&g.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):g.jsx("div",{className:"flex items-center justify-center h-[120px]",children:g.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,El,Yr,Jr);function Ide({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[],l=[];for(let d=0;d<n.length;d++)r.push(n[d].level),i.push(Number(n[d].open)),o.push(Number(n[d].in_progress)),a.push(Number(n[d].on_hold)),s.push(Number(n[d].closed)),l.push(Number(n[d].cancelled));const c={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:l,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:d=>Math.round(d)}}}};return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:g.jsx(D3,{className:"!text-[24px] text-[#3C81F6]"}),children:g.jsx("div",{className:"h-full",children:g.jsx(Pl,{data:c,options:u})})})}const Fde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return g.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:g.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[g.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),g.jsx("div",{children:n.name}),g.jsx("div",{className:"ml-2",children:n.value})]})})};function Lde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:g.jsx(Dv,{className:"!text-[24px] text-[#EF4444]"}),children:g.jsxs("div",{className:"flex h-full items-center gap-4",children:[g.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Fde,{}),wrapperStyle:{zIndex:1e3}})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[g.jsx("div",{children:r(n.completed)}),g.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),g.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>g.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=g.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[g.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[g.jsx(Qp,{className:`text-[20px] ${t}`}),g.jsx("div",{children:e??""})]}),g.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>g.jsxs("div",{className:"flex justify-between text-[14px]",children:[g.jsx("div",{children:o??""}),g.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return g.jsx(Kj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function $de({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return g.jsx(Ae,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:g.jsx(Qp,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col mt-2",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),g.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),g.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),g.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),g.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),g.jsx("div",{className:"w-full h-[179px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(bx,{data:i??[],children:[g.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),g.jsx(xr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),g.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(on,{}),g.jsx(Wo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),g.jsx(Wo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const rr=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return g.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[t&&g.jsx("div",{className:c,children:t}),g.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&g.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[g.jsx(_de,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),g.jsx(WR,{size:16,className:"cursor-pointer",onClick:p}),g.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),g.jsx(zR,{size:16,className:"cursor-pointer",onClick:m})]})]}),g.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&g.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})},Bde=({color:e})=>g.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),Wde=({active:e,payload:t})=>!e||!t||!t.length?null:g.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>g.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[g.jsx(Bde,{color:n.color}),n.name,": ",g.jsx("div",{className:"font-semibold",children:n.value})]},r))});function zde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return g.jsx(rr,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[g.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),g.jsx("div",{className:"h-[184px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Wde,{}),wrapperStyle:{zIndex:9999}})]})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),g.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),g.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function VR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return g.jsx(rr,{className:n,title:e,titleWeight:"semi-bold",children:g.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[g.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[g.jsx("div",{children:"Point"}),g.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>g.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),g.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Vde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return g.jsx(rr,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),g.jsx(ux,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"value",barSize:60,children:n.map((o,a)=>g.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}const Hde=({active:e,payload:t})=>e&&t&&t.length?g.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{children:t[0].payload.name}),g.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Yde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return g.jsx("g",{transform:`translate(${e},${t})`,children:g.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>g.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Ude({data:e=[]}){const t=e&&e.length>0,n=t?e.map(i=>({name:i.category_name,value:i.total_complaints})):[{name:"No Data Found",value:0}],r=Math.max(...n.map(i=>i.value),0);return g.jsx(rr,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:g.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,layout:"vertical",children:[g.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),g.jsx(xr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:g.jsx(Yde,{})}),g.jsx(on,{content:g.jsx(Hde,{}),cursor:{fill:"transparent"}}),g.jsx(Nn,{dataKey:"value",barSize:36,children:n.map((i,o)=>g.jsx(Vt,{fill:t&&i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}function Kde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const s=i?.trim().startsWith("-")?"#DC2626":"#16A34A";return g.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[e&&g.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(e,{className:"h-[20px] w-[20px]"})}),g.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),g.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&g.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&g.jsx("div",{className:"text-[12px] leading-[16px] font-medium",style:{color:s},children:i}),o&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const qde=[{day:"01 Feb",visitors:1250},{day:"02 Feb",visitors:1e3},{day:"03 Feb",visitors:1250},{day:"04 Feb",visitors:1050},{day:"05 Feb",visitors:900},{day:"06 Feb",visitors:1020},{day:"07 Feb",visitors:800}],Gde=()=>{const[e,t]=k.useState(new Date),[n,r]=k.useState(!1),o=(u=>{const d=new Date(u||new Date);return d?.setDate?.((d?.getDate?.()||0)-6),d})(e),a=u=>{try{return u?.toLocaleDateString?.("en-GB",{day:"2-digit",month:"short"})||""}catch{return""}},s=()=>{const u=new Date(e);if(u.setDate(u.getDate()-7),t(u),onDateChange){const d=new Date(u);d.setDate(d.getDate()-6),onDateChange(d.toISOString(),u.toISOString())}},l=()=>{const u=new Date(e);if(u.setDate(u.getDate()+7),t(u),onDateChange){const d=new Date(u);d.setDate(d.getDate()-6),onDateChange(d.toISOString(),u.toISOString())}},c=()=>{r(u=>!u)};return g.jsxs(rr,{title:"Weekly Visitor Pattern",period:`${a(o)} - ${a(e)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:s,onNextClick:l,onCalendarClick:c,children:[n&&g.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:g.jsx(BC,{selected:e||new Date,onChange:u=>{if(t(u),onDateChange){const d=u,f=new Date(u);f.setDate(f.getDate()-6),onDateChange(f.toISOString(),d.toISOString())}r(!1)},inline:!0})}),g.jsx("div",{className:"w-full h-[260px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(sne,{data:qde||[],margin:{top:10,right:10,left:0,bottom:0},children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),g.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,domain:[0,1800],ticks:[0,200,400,600,800,1e3,1200,1400,1600,1800]}),g.jsx(on,{}),g.jsx(kN,{type:"monotone",dataKey:"visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Xde=[{name:"Google",visitors:1e3},{name:"Uber",visitors:3500},{name:"ANAROCK",visitors:2e3},{name:"Flipkart",visitors:8e3},{name:"HP",visitors:1650}],Qde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Xde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.visitors)||0;o>r&&(r=o)}return g.jsx(rr,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,tickFormatter:i=>i===0?"0":`${(i||0)/1e3}K`}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"visitors",maxBarSize:55,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Zde({data:e}){return g.jsx("div",{className:"h-full",children:e.map((t,n)=>{const i=parseFloat(t.delta)>0;return g.jsx(Ae,{iconClassName:"!gap-[8px]",title:g.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:g.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),g.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[g.jsx("div",{style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:t.delta}),g.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Jde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],efe=({x:e,y:t,payload:n})=>g.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:g.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function tfe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Jde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return g.jsx(Ae,{title:"Bookings",icon:g.jsx(Ade,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[g.jsx(xr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:g.jsx(efe,{})}),g.jsx(Nn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const nfe=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function rfe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?nfe:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return g.jsx(rr,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),g.jsx(xr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),g.jsx(Nn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const ife=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function ofe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??ife,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return g.jsx(rr,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?g.jsx("div",{className:"col-span-12 flex items-center justify-center h-full",children:g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-span-5 h-[240px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>g.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),g.jsx(on,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),g.jsx("div",{className:"col-span-7",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[g.jsx("div",{children:"Amenity"}),g.jsx("div",{className:"text-right",children:"Revenue"})]}),g.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>g.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),g.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),g.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],afe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],sfe=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):afe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[240px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsxs("div",{className:"flex items-center justify-between gap-8",children:[g.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsx(_o,{children:g.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>g.jsx(Vt,{fill:i.color},o))})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[g.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),g.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),g.jsx("div",{className:"flex-1 max-w-[280px]",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),g.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),g.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},lfe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[260px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?g.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),g.jsx(xr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),g.jsx(fh,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>g.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px"},children:a}),wrapperStyle:{paddingTop:"18px"}}),g.jsx(Nn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),g.jsx(Nn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),g.jsx(Nn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),g.jsx(Nn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),g.jsx(Nn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})},ec=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function cfe(){const t=ec.find(n=>n.name==="Completed")?.value||0;return g.jsx(rr,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col w-full text-[14px]",children:ec.map((n,r)=>g.jsxs("div",{className:`flex items-center justify-between py-[10px] ${r!==ec.length-1?"border-b border-[#F1F5F9]":""}`,children:[g.jsxs("div",{className:"flex items-center gap-[10px]",children:[g.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}function ufe(){return g.jsx(rr,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000]",children:g.jsx("div",{children:"4 - Danger"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] ",children:g.jsx("div",{children:"3 - High"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] ",children:g.jsx("div",{children:"1 - Low"})})]})]})]})})}function dfe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%",color:"bg-green-100 text-green-600"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"25%",color:"bg-blue-100 text-blue-600"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return g.jsxs("div",{className:"w-full bg-white rounded-xl shadow-md overflow-hidden",children:[g.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>g.jsx("div",{className:"px-6 py-4",children:p.label},m))}),f.length>0?f.map((p,m)=>g.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,v)=>g.jsx("div",{className:"px-6 py-4 bg-gray-50",children:h.key==="f"?g.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold ${p.color||""}`,children:p[h.key]||"-"}):p[h.key]||"-"},v))},m)):g.jsx("div",{className:"p-6 text-center text-gray-500",children:"No Data Available"}),g.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[g.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[g.jsx("span",{children:"Rows per page:"}),g.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>g.jsx("option",{value:p,children:p},m))}),g.jsxs("span",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),g.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[g.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Pde,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(WR,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(zR,{size:18})}),g.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Cde,{size:18})})]})]})]})}exports.AccessPointsUsage=Vde;exports.Accounting=Eue;exports.Amenities=Rde;exports.AmenitiesStatsCard=Zde;exports.AmenityWiseRevenue=ofe;exports.AssetValueBreakdown=Aue;exports.AssetsByType=sfe;exports.BlockWiseOccupancy=wue;exports.BookingTrendChart=rfe;exports.Bookings=tfe;exports.Budgets=Pue;exports.Card=Ae;exports.CardAccess=VR;exports.CashBankBalance=kue;exports.CommercialAccessOverview=zde;exports.CommercialGuardPatrols=cfe;exports.CommercialIncidentReports=ufe;exports.CommercialOccupancy=pde;exports.CommercialReportTable=dfe;exports.Community=aoe;exports.Complaints=Yue;exports.ComplaintsByLevel=Xue;exports.DuesAgeing=Cue;exports.EmployeeFootfall=Nde;exports.Engagement=soe;exports.EngagementStatsGrid=fde;exports.EventsUtilisation=ade;exports.ExpenseCategories=Due;exports.Facilities=loe;exports.FinanceSummary=coe;exports.FoodBeverages=jde;exports.GateAndSecurityStatsGrid=zue;exports.GateUpdates=qoe;exports.GuardPatrols=Iue;exports.Header=p3;exports.Helpdesk=Goe;exports.HelpdeskStatsGrid=ode;exports.HourlyTrafficFlow=Fue;exports.IncidentReports=Lue;exports.IncomeExpenditure=LR;exports.MainHeader=k3;exports.MaintenanceStatus=lfe;exports.MetricCard=Kde;exports.MobileAccess=VR;exports.MoveInOutTrends=Sue;exports.NoticeBoardStatus=sde;exports.OccupancyOverview=yue;exports.OrganisationWiseVisitors=Qde;exports.RequestBox=Zue;exports.ResidentOverview=xue;exports.RevenuebyCategory=Tue;exports.SingleStats=cde;exports.StaffAttendance=$ue;exports.StatsGrid=Rue;exports.TicketEscalation=Ide;exports.TicketStatus=Lde;exports.Tickets=FR;exports.TicketsperCategory=Ude;exports.UnitStatus=FR;exports.VisitorUpdates=$de;exports.WeeklyVisitorPattern=Gde;
|
|
362
|
+
*/const Tde=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Mde=aa("waves-ladder",Tde);$n.register(Oo,Eo,El,Yr);const Nde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return g.jsxs(Ae,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:g.jsx(xde,{className:"!text-[24px] text-[#8B5CF6]"}),children:[g.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),g.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),g.jsx("div",{className:"h-[110px]",children:g.jsx(Pl,{data:t,options:n})})]})};function jde(){return g.jsx(Ae,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:g.jsx(C5,{className:"!text-[24px] text-[#FA7E28]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),g.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[g.jsx(VC,{}),8,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsxs("div",{className:"mt-[16px]",children:[g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Rde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return g.jsx(Ae,{className:"h-[324px]",title:"Amenities",period:"Today",icon:g.jsx(Mde,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&g.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?g.jsx(VC,{}):g.jsx(w3,{}),u,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[g.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&g.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):g.jsx("div",{className:"flex items-center justify-center h-[120px]",children:g.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,El,Yr,Jr);function Ide({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[],l=[];for(let d=0;d<n.length;d++)r.push(n[d].level),i.push(Number(n[d].open)),o.push(Number(n[d].in_progress)),a.push(Number(n[d].on_hold)),s.push(Number(n[d].closed)),l.push(Number(n[d].cancelled));const c={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:l,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:d=>Math.round(d)}}}};return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:g.jsx(D3,{className:"!text-[24px] text-[#3C81F6]"}),children:g.jsx("div",{className:"h-full",children:g.jsx(Pl,{data:c,options:u})})})}const Fde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return g.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:g.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[g.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),g.jsx("div",{children:n.name}),g.jsx("div",{className:"ml-2",children:n.value})]})})};function Lde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:g.jsx(Dv,{className:"!text-[24px] text-[#EF4444]"}),children:g.jsxs("div",{className:"flex h-full items-center gap-4",children:[g.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Fde,{}),wrapperStyle:{zIndex:1e3}})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[g.jsx("div",{children:r(n.completed)}),g.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),g.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>g.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=g.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[g.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[g.jsx(Qp,{className:`text-[20px] ${t}`}),g.jsx("div",{children:e??""})]}),g.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>g.jsxs("div",{className:"flex justify-between text-[14px]",children:[g.jsx("div",{children:o??""}),g.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return g.jsx(Kj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function $de({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return g.jsx(Ae,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:g.jsx(Qp,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col mt-2",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),g.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),g.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),g.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),g.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),g.jsx("div",{className:"w-full h-[179px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(bx,{data:i??[],children:[g.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),g.jsx(xr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),g.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(on,{}),g.jsx(Wo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),g.jsx(Wo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const rr=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return g.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[t&&g.jsx("div",{className:c,children:t}),g.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&g.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[g.jsx(_de,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),g.jsx(WR,{size:16,className:"cursor-pointer",onClick:p}),g.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),g.jsx(zR,{size:16,className:"cursor-pointer",onClick:m})]})]}),g.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&g.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})},Bde=({color:e})=>g.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),Wde=({active:e,payload:t})=>!e||!t||!t.length?null:g.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>g.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[g.jsx(Bde,{color:n.color}),n.name,": ",g.jsx("div",{className:"font-semibold",children:n.value})]},r))});function zde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return g.jsx(rr,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[g.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),g.jsx("div",{className:"h-[184px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Wde,{}),wrapperStyle:{zIndex:9999}})]})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),g.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),g.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function VR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return g.jsx(rr,{className:n,title:e,titleWeight:"semi-bold",children:g.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[g.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[g.jsx("div",{children:"Point"}),g.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>g.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),g.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Vde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return g.jsx(rr,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),g.jsx(ux,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"value",barSize:60,children:n.map((o,a)=>g.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}const Hde=({active:e,payload:t})=>e&&t&&t.length?g.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{children:t[0].payload.name}),g.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Yde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return g.jsx("g",{transform:`translate(${e},${t})`,children:g.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>g.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Ude({data:e=[]}){const t=e&&e.length>0,n=t?e.map(i=>({name:i.category_name,value:i.total_complaints})):[{name:"No Data Found",value:0}],r=Math.max(...n.map(i=>i.value),0);return g.jsx(rr,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:g.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,layout:"vertical",children:[g.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),g.jsx(xr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:g.jsx(Yde,{})}),g.jsx(on,{content:g.jsx(Hde,{}),cursor:{fill:"transparent"}}),g.jsx(Nn,{dataKey:"value",barSize:36,children:n.map((i,o)=>g.jsx(Vt,{fill:t&&i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}function Kde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const s=i?.trim().startsWith("-")?"#DC2626":"#16A34A";return g.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[e&&g.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(e,{className:"h-[20px] w-[20px]"})}),g.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),g.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&g.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&g.jsx("div",{className:"text-[12px] leading-[16px] font-medium",style:{color:s},children:i}),o&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const qde=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1);console.log("WeeklyVisitorCard data:",e);const s=(f=>{const p=new Date(f||new Date);return p?.setDate?.((p?.getDate?.()||0)-6),p})(n),l=f=>{try{return f?.toLocaleDateString?.("en-GB",{day:"2-digit",month:"short"})||""}catch{return""}},c=()=>{const f=new Date(n);if(f.setDate(f.getDate()-7),r(f),t){const p=new Date(f);p.setDate(p.getDate()-6),t(p.toISOString(),f.toISOString())}},u=()=>{const f=new Date(n);if(f.setDate(f.getDate()+7),r(f),t){const p=new Date(f);p.setDate(p.getDate()-6),t(p.toISOString(),f.toISOString())}},d=()=>{o(f=>!f)};return g.jsxs(rr,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:c,onNextClick:u,onCalendarClick:d,children:[i&&g.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:g.jsx(BC,{selected:n||new Date,onChange:f=>{if(r(f),t){const p=f,m=new Date(f);m.setDate(m.getDate()-6),t(m.toISOString(),p.toISOString())}o(!1)},inline:!0})}),g.jsx("div",{className:"w-full h-[260px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(sne,{data:e||[],margin:{top:10,right:10,left:0,bottom:0},children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),g.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,domain:[0,1800],ticks:[0,200,400,600,800,1e3,1200,1400,1600,1800]}),g.jsx(on,{}),g.jsx(kN,{type:"monotone",dataKey:"visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Gde=[{name:"Google",visitors:1e3},{name:"Uber",visitors:3500},{name:"ANAROCK",visitors:2e3},{name:"Flipkart",visitors:8e3},{name:"HP",visitors:1650}],Xde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Gde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.visitors)||0;o>r&&(r=o)}return g.jsx(rr,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,tickFormatter:i=>i===0?"0":`${(i||0)/1e3}K`}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"visitors",maxBarSize:55,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Qde({data:e}){return g.jsx("div",{className:"h-full",children:e.map((t,n)=>{const i=parseFloat(t.delta)>0;return g.jsx(Ae,{iconClassName:"!gap-[8px]",title:g.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:g.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),g.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[g.jsx("div",{style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:t.delta}),g.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Zde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],Jde=({x:e,y:t,payload:n})=>g.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:g.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function efe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Zde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return g.jsx(Ae,{title:"Bookings",icon:g.jsx(Ade,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[g.jsx(xr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:g.jsx(Jde,{})}),g.jsx(Nn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const tfe=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function nfe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?tfe:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return g.jsx(rr,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),g.jsx(xr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),g.jsx(Nn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const rfe=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function ife({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??rfe,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return g.jsx(rr,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?g.jsx("div",{className:"col-span-12 flex items-center justify-center h-full",children:g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-span-5 h-[240px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>g.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),g.jsx(on,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),g.jsx("div",{className:"col-span-7",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[g.jsx("div",{children:"Amenity"}),g.jsx("div",{className:"text-right",children:"Revenue"})]}),g.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>g.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),g.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),g.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],ofe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],afe=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):ofe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[240px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsxs("div",{className:"flex items-center justify-between gap-8",children:[g.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsx(_o,{children:g.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>g.jsx(Vt,{fill:i.color},o))})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[g.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),g.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),g.jsx("div",{className:"flex-1 max-w-[280px]",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),g.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),g.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},sfe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[260px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?g.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),g.jsx(xr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),g.jsx(fh,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>g.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px"},children:a}),wrapperStyle:{paddingTop:"18px"}}),g.jsx(Nn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),g.jsx(Nn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),g.jsx(Nn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),g.jsx(Nn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),g.jsx(Nn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})},ec=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function lfe(){const t=ec.find(n=>n.name==="Completed")?.value||0;return g.jsx(rr,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col w-full text-[14px]",children:ec.map((n,r)=>g.jsxs("div",{className:`flex items-center justify-between py-[10px] ${r!==ec.length-1?"border-b border-[#F1F5F9]":""}`,children:[g.jsxs("div",{className:"flex items-center gap-[10px]",children:[g.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}function cfe(){return g.jsx(rr,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000]",children:g.jsx("div",{children:"4 - Danger"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] ",children:g.jsx("div",{children:"3 - High"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] ",children:g.jsx("div",{children:"1 - Low"})})]})]})]})})}function ufe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%",color:"bg-green-100 text-green-600"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"25%",color:"bg-blue-100 text-blue-600"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return g.jsxs("div",{className:"w-full bg-white rounded-xl shadow-md overflow-hidden",children:[g.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>g.jsx("div",{className:"px-6 py-4",children:p.label},m))}),f.length>0?f.map((p,m)=>g.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,v)=>g.jsx("div",{className:"px-6 py-4 bg-gray-50",children:h.key==="f"?g.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold ${p.color||""}`,children:p[h.key]||"-"}):p[h.key]||"-"},v))},m)):g.jsx("div",{className:"p-6 text-center text-gray-500",children:"No Data Available"}),g.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[g.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[g.jsx("span",{children:"Rows per page:"}),g.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>g.jsx("option",{value:p,children:p},m))}),g.jsxs("span",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),g.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[g.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Pde,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(WR,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(zR,{size:18})}),g.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Cde,{size:18})})]})]})]})}exports.AccessPointsUsage=Vde;exports.Accounting=Eue;exports.Amenities=Rde;exports.AmenitiesStatsCard=Qde;exports.AmenityWiseRevenue=ife;exports.AssetValueBreakdown=Aue;exports.AssetsByType=afe;exports.BlockWiseOccupancy=wue;exports.BookingTrendChart=nfe;exports.Bookings=efe;exports.Budgets=Pue;exports.Card=Ae;exports.CardAccess=VR;exports.CashBankBalance=kue;exports.CommercialAccessOverview=zde;exports.CommercialGuardPatrols=lfe;exports.CommercialIncidentReports=cfe;exports.CommercialOccupancy=pde;exports.CommercialReportTable=ufe;exports.Community=aoe;exports.Complaints=Yue;exports.ComplaintsByLevel=Xue;exports.DuesAgeing=Cue;exports.EmployeeFootfall=Nde;exports.Engagement=soe;exports.EngagementStatsGrid=fde;exports.EventsUtilisation=ade;exports.ExpenseCategories=Due;exports.Facilities=loe;exports.FinanceSummary=coe;exports.FoodBeverages=jde;exports.GateAndSecurityStatsGrid=zue;exports.GateUpdates=qoe;exports.GuardPatrols=Iue;exports.Header=p3;exports.Helpdesk=Goe;exports.HelpdeskStatsGrid=ode;exports.HourlyTrafficFlow=Fue;exports.IncidentReports=Lue;exports.IncomeExpenditure=LR;exports.MainHeader=k3;exports.MaintenanceStatus=sfe;exports.MetricCard=Kde;exports.MobileAccess=VR;exports.MoveInOutTrends=Sue;exports.NoticeBoardStatus=sde;exports.OccupancyOverview=yue;exports.OrganisationWiseVisitors=Xde;exports.RequestBox=Zue;exports.ResidentOverview=xue;exports.RevenuebyCategory=Tue;exports.SingleStats=cde;exports.StaffAttendance=$ue;exports.StatsGrid=Rue;exports.TicketEscalation=Ide;exports.TicketStatus=Lde;exports.Tickets=FR;exports.TicketsperCategory=Ude;exports.UnitStatus=FR;exports.VisitorUpdates=$de;exports.WeeklyVisitorPattern=qde;
|