1/*! For license information please see 7877.411d5619.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[7877],{59042:(t,e,i)=>{i.d(e,{A:()=>N});var s=i(16925),n=i(76361),o=function(){if("undefined"!==typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),a=function(t){var e,i=[];for(t=[].concat(t);t.length;)"string"===typeof(e=t.pop())?i.unshift.apply(i,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):(0,s.k)(t)||i.unshift(""+e);return i},r=function(t,e,i){var s,n=[].concat(e),o=n.length,a=t.font,r=0;for(t.font=i.string,s=0;s<o;++s)r=Math.max(t.measureText(n[s]).width,r);return t.font=a,{height:o*i.lineHeight,width:r}},h=function(t,e,i){return Math.max(t,Math.min(e,i))},l=function(t,e){var i,s,n,o,a=t.slice(),r=[];for(i=0,n=e.length;i<n;++i)o=e[i],-1===(s=a.indexOf(o))?r.push([o,1]):a.splice(s,1);for(i=0,n=a.length;i<n;++i)r.push([a[i],-1]);return r};function c(t,e){var i=e.x,s=e.y;if(null===i)return{x:0,y:-1};if(null===s)return{x:1,y:0};var n=t.x-i,o=t.y-s,a=Math.sqrt(n*n+o*o);return{x:a?n/a:0,y:a?o/a:-1}}var d=0,u=1,f=2,g=4,p=8;function m(t,e,i){var s=d;return t<i.left?s|=u:t>i.right&&(s|=f),e<i.top?s|=p:e>i.bottom&&(s|=g),s}function b(t,e){var i,s,n=e.anchor,o=t;return e.clamp&&(o=function(t,e){for(var i,s,n,o=t.x0,a=t.y0,r=t.x1,h=t.y1,l=m(o,a,e),c=m(r,h,e);l|c&&!(l&c);)(i=l||c)&p?(s=o+(r-o)*(e.top-a)/(h-a),n=e.top):i&g?(s=o+(r-o)*(e.bottom-a)/(h-a),n=e.bottom):i&f?(n=a+(h-a)*(e.right-o)/(r-o),s=e.right):i&u&&(n=a+(h-a)*(e.left-o)/(r-o),s=e.left),i===l?l=m(o=s,a=n,e):c=m(r=s,h=n,e);return{x0:o,x1:r,y0:a,y1:h}}(o,e.area)),"start"===n?(i=o.x0,s=o.y0):"end"===n?(i=o.x1,s=o.y1):(i=(o.x0+o.x1)/2,s=(o.y0+o.y1)/2),function(t,e,i,s,n){switch(n){case"center":i=s=0;break;case"bottom":i=0,s=1;break;case"right":i=1,s=0;break;case"left":i=-1,s=0;break;case"top":i=0,s=-1;break;case"start":i=-i,s=-s;break;case"end":break;default:n*=Math.PI/180,i=Math.cos(n),s=Math.sin(n)}return{x:t,y:e,vx:i,vy:s}}(i,s,t.vx,t.vy,e.align)}var x=function(t,e){var i=(t.startAngle+t.endAngle)/2,s=Math.cos(i),n=Math.sin(i),o=t.innerRadius,a=t.outerRadius;return b({x0:t.x+s*o,y0:t.y+n*o,x1:t.x+s*a,y1:t.y+n*a,vx:s,vy:n},e)},_=function(t,e){var i=c(t,e.origin),s=i.x*t.options.radius,n=i.y*t.options.radius;return b({x0:t.x-s,y0:t.y-n,x1:t.x+s,y1:t.y+n,vx:i.x,vy:i.y},e)},y=function(t,e){var i=c(t,e.origin),s=t.x,n=t.y,o=0,a=0;return t.horizontal?(s=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(n=Math.min(t.y,t.base),a=Math.abs(t.base-t.y)),b({x0:s,y0:n+a,x1:s+o,y1:n,vx:i.x,vy:i.y},e)},v=function(t,e){var i=c(t,e.origin);return b({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:i.x,vy:i.y},e)},M=function(t){return Math.round(t*o)/o};function w(t,e){var i=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!i)return null;if(void 0!==i.xCenter&&void 0!==i.yCenter)return{x:i.xCenter,y:i.yCenter};var s=i.getBasePixel();return t.horizontal?{x:s,y:null}:{x:null,y:s}}function k(t,e,i){var s=i.backgroundColor,n=i.borderColor,o=i.borderWidth;(s||n&&o)&&(t.beginPath(),function(t,e,i,s,n,o){var a=Math.PI/2;if(o){var r=Math.min(o,n/2,s/2),h=e+r,l=i+r,c=e+s-r,d=i+n-r;t.moveTo(e,l),h<c&&l<d?(t.arc(h,l,r,-Math.PI,-a),t.arc(c,l,r,-a,0),t.arc(c,d,r,0,a),t.arc(h,d,r,a,Math.PI)):h<c?(t.moveTo(h,i),t.arc(c,l,r,-a,a),t.arc(h,l,r,a,Math.PI+a)):l<d?(t.arc(h,l,r,-Math.PI,0),t.arc(h,d,r,0,Math.PI)):t.arc(h,l,r,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,s,n)}(t,M(e.x)+o/2,M(e.y)+o/2,M(e.w)-o,M(e.h)-o,i.borderRadius),t.closePath(),s&&(t.fillStyle=s,t.fill()),n&&o&&(t.strokeStyle=n,t.lineWidth=o,t.lineJoin="miter",t.stroke()))}function S(t,e,i){var s=t.shadowBlur,n=i.stroked,o=M(i.x),a=M(i.y),r=M(i.w);n&&t.strokeText(e,o,a,r),i.filled&&(s&&n&&(t.shadowBlur=0),t.fillText(e,o,a,r),s&&n&&(t.shadowBlur=s))}var A=function(t,e,i,s){var n=this;n._config=t,n._index=s,n._model=null,n._rects=null,n._ctx=e,n._el=i};(0,s.a4)(A.prototype,{_modelize:function(t,e,i,o){var a,h=this,l=h._index,c=(0,s.a0)((0,s.a)([i.font,{}],o,l)),d=(0,s.a)([i.color,s.d.color],o,l);return{align:(0,s.a)([i.align,"center"],o,l),anchor:(0,s.a)([i.anchor,"center"],o,l),area:o.chart.chartArea,backgroundColor:(0,s.a)([i.backgroundColor,null],o,l),borderColor:(0,s.a)([i.borderColor,null],o,l),borderRadius:(0,s.a)([i.borderRadius,0],o,l),borderWidth:(0,s.a)([i.borderWidth,0],o,l),
vendor: 5,356 bytes, line 2
2clamp:(0,s.a)([i.clamp,!1],o,l),clip:(0,s.a)([i.clip,!1],o,l),color:d,display:t,font:c,lines:e,offset:(0,s.a)([i.offset,4],o,l),opacity:(0,s.a)([i.opacity,1],o,l),origin:w(h._el,o),padding:(0,s.E)((0,s.a)([i.padding,4],o,l)),positioner:(a=h._el,a instanceof n.Bs?x:a instanceof n.FN?_:a instanceof n.E8?y:v),rotation:(0,s.a)([i.rotation,0],o,l)*(Math.PI/180),size:r(h._ctx,e,c),textAlign:(0,s.a)([i.textAlign,"start"],o,l),textShadowBlur:(0,s.a)([i.textShadowBlur,0],o,l),textShadowColor:(0,s.a)([i.textShadowColor,d],o,l),textStrokeColor:(0,s.a)([i.textStrokeColor,d],o,l),textStrokeWidth:(0,s.a)([i.textStrokeWidth,0],o,l)}},update:function(t){var e,i,n,o=this,r=null,h=null,l=o._index,c=o._config,d=(0,s.a)([c.display,!0],t,l);d&&(e=t.dataset.data[l],i=(0,s.v)((0,s.Q)(c.formatter,[e,t]),e),(n=(0,s.k)(i)?[]:a(i)).length&&(h=function(t){var e=t.borderWidth||0,i=t.padding,s=t.size.height,n=t.size.width,o=-n/2,a=-s/2;return{frame:{x:o-i.left-e,y:a-i.top-e,w:n+i.width+2*e,h:s+i.height+2*e},text:{x:o,y:a,w:n,h:s}}}(r=o._modelize(d,n,c,t)))),o._model=r,o._rects=h},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var i,s=t.ctx,n=this._model,o=this._rects;this.visible()&&(s.save(),n.clip&&(i=n.area,s.beginPath(),s.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),s.clip()),s.globalAlpha=h(0,n.opacity,1),s.translate(M(e.x),M(e.y)),s.rotate(n.rotation),k(s,o.frame,n),function(t,e,i,s){var n,o=s.textAlign,a=s.color,r=!!a,h=s.font,l=e.length,c=s.textStrokeColor,d=s.textStrokeWidth,u=c&&d;if(l&&(r||u))for(i=function(t,e,i){var s=i.lineHeight,n=t.w,o=t.x;return"center"===e?o+=n/2:"end"!==e&&"right"!==e||(o+=n),{h:s,w:n,x:o,y:t.y+s/2}}(i,o,h),t.font=h.string,t.textAlign=o,t.textBaseline="middle",t.shadowBlur=s.textShadowBlur,t.shadowColor=s.textShadowColor,r&&(t.fillStyle=a),u&&(t.lineJoin="round",t.lineWidth=d,t.strokeStyle=c),n=0,l=e.length;n<l;++n)S(t,e[n],{stroked:u,filled:r,w:i.w,x:i.x,y:i.y+i.h*n})}(s,n.lines,o.text,n),s.restore())}});var P=Number.MIN_SAFE_INTEGER||-9007199254740991,D=Number.MAX_SAFE_INTEGER||9007199254740991;function O(t,e,i){var s=Math.cos(i),n=Math.sin(i),o=e.x,a=e.y;return{x:o+s*(t.x-o)-n*(t.y-a),y:a+n*(t.x-o)+s*(t.y-a)}}function C(t,e){var i,s,n,o,a,r=D,h=P,l=e.origin;for(i=0;i<t.length;++i)n=(s=t[i]).x-l.x,o=s.y-l.y,a=e.vx*n+e.vy*o,r=Math.min(r,a),h=Math.max(h,a);return{min:r,max:h}}function T(t,e){var i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);return{vx:(e.x-t.x)/n,vy:(e.y-t.y)/n,origin:t,ln:n}}var E=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function L(t,e,i){var s=e.positioner(t,e),n=s.vx,o=s.vy;if(!n&&!o)return{x:s.x,y:s.y};var a=i.w,r=i.h,h=e.rotation,l=Math.abs(a/2*Math.cos(h))+Math.abs(r/2*Math.sin(h)),c=Math.abs(a/2*Math.sin(h))+Math.abs(r/2*Math.cos(h)),d=1/Math.max(Math.abs(n),Math.abs(o));return l*=n*d,c*=o*d,l+=e.offset*n,c+=e.offset*o,{x:s.x+l,y:s.y+c}}(0,s.a4)(E.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,i){this._rotation=i,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,i=e._rect;return!((t=O(t,e.center(),-e._rotation)).x<i.x-1||t.y<i.y-1||t.x>i.x+i.w+2||t.y>i.y+i.h+2)},intersects:function(t){var e,i,s,n=this._points(),o=t._points(),a=[T(n[0],n[1]),T(n[0],n[3])];for(this._rotation!==t._rotation&&a.push(T(o[0],o[1]),T(o[0],o[3])),e=0;e<a.length;++e)if(i=C(n,a[e]),s=C(o,a[e]),i.max<s.min||s.max<i.min)return!1;return!0},_points:function(){var t=this,e=t._rect,i=t._rotation,s=t.center();return[O({x:e.x,y:e.y},s,i),O({x:e.x+e.w,y:e.y},s,i),O({x:e.x+e.w,y:e.y+e.h},s,i),O({x:e.x,y:e.y+e.h},s,i)]}});var R={prepare:function(t){var e,i,s,n,o,a=[];for(e=0,s=t.length;e<s;++e)for(i=0,n=t[e].length;i<n;++i)o=t[e][i],a.push(o),o.$layout={_box:new E,_hidable:!1,_visible:!0,_set:e,_idx:o._index};return a.sort((function(t,e){var i=t.$layout,s=e.$layout;return i._idx===s._idx?s._set-i._set:s._idx-i._idx})),this.update(a),a},update:function(t){var e,i,s,n,o,a=!1;for(e=0,i=t.length;e<i;++e)n=(s=t[e]).model(),(o=s.$layout)._hidable=n&&"auto"===n.display,o._visible=s.visible(),a|=o._hidable;a&&function(t){var e,i,s,n,o,a,r;for(e=0,i=t.length;e<i;++e)(n=(s=t[e]).$layout)._visible&&(r=new Proxy(s._el,{get:(t,e)=>t.getProps([e],!0)[e]}),o=s.geometry(),a=L(r,s.model(),o),n._box.update(a,o,s.rotation()));(function(t,e){var i,s,n,o;for(i=t.length-1;i>=0;--i)for(n=t[i].$layout,s=i-1;s>=0&&n._visible;--s)(o=t[s].$layout)._visible&&n._box.intersects(o._box)&&e(n,o)})(t,(function(t,e){var i=t._hidable,s=e._hidable;i&&s||s?e._visible=!1:i&&(t._visible=!1)}))}(t)},lookup:function(t,e){var i,s;for(i=t.length-1;i>=0;--i)if((s=t[i].$layout)&&s._visible&&s._box.contains(e))return t[i];return null},draw:function(t,e){var i,s,n,o,a,r;for(i=0,s=e.length;i<s;++i)(o=(n=e[i]).$layout)._visible&&(a=n.geometry(),r=L(n._el,n.model(),a),o._box.update(r,a,n.rotation()),n.draw(t,r))}},I="$datalabels",F="$default";function z(t,e,i,n){if(e){var o,a=i.$context,r=i.$groups;e[r._set]&&(o=e[r._set][r._key])&&!0===(0,s.Q)(o,[a,n])&&(t[I]._dirty=!0,i.update(a))}}function V(t,e){var i,s,n=t[I],o=n._listeners;if(o.enter||o.leave){if("mousemove"===e.type)s=R.lookup(n._labels,e);else if("mouseout"!==e.type)return;
2i=n._hovered,n._hovered=s,function(t,e,i,s,n){var o,a;(i||s)&&(i?s?i!==s&&(a=o=!0):a=!0:o=!0,a&&z(t,e.leave,i,n),o&&z(t,e.enter,s,n))}(t,o,i,s,e)}}var N={id:"datalabels",defaults:{align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(t){if((0,s.k)(t))return null;var e,i,n,o=t;if((0,s.i)(t))if((0,s.k)(t.label))if((0,s.k)(t.r))for(o="",n=0,i=(e=Object.keys(t)).length;n<i;++n)o+=(0!==n?", ":"")+e[n]+": "+t[e[n]];else o=t.r;else o=t.label;return""+o},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},beforeInit:function(t){t[I]={_actives:[]}},beforeUpdate:function(t){var e=t[I];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,i){var n,o,a,r,h,l,c,d,u=e.index,f=t[I],g=f._datasets[u]=[],p=t.isDatasetVisible(u),m=t.data.datasets[u],b=function(t,e){var i,n,o,a=t.datalabels,r=[];return!1===a?null:(!0===a&&(a={}),e=(0,s.a4)({},[e,a]),n=e.labels||{},o=Object.keys(n),delete e.labels,o.length?o.forEach((function(t){n[t]&&r.push((0,s.a4)({},[e,n[t],{_key:t}]))})):r.push(e),i=r.reduce((function(t,e){return(0,s.F)(e.listeners||{},(function(i,s){t[s]=t[s]||{},t[s][e._key||F]=i})),delete e.listeners,t}),{}),{labels:r,listeners:i})}(m,i),x=e.meta.data||[],_=t.ctx;for(_.save(),n=0,a=x.length;n<a;++n)if((c=x[n])[I]=[],p&&c&&t.getDataVisibility(n)&&!c.skip)for(o=0,r=b.labels.length;o<r;++o)l=(h=b.labels[o])._key,(d=new A(h,_,c,n)).$groups={_set:u,_key:l||F},d.$context={active:!1,chart:t,dataIndex:n,dataset:m,datasetIndex:u},d.update(d.$context),c[I].push(d),g.push(d);_.restore(),(0,s.a4)(f._listeners,b.listeners,{merger:function(t,i,s){i[t]=i[t]||{},i[t][e.index]=s[t],f._listened=!0}})},afterUpdate:function(t){t[I]._labels=R.prepare(t[I]._datasets)},afterDatasetsDraw:function(t){R.draw(t,t[I]._labels)},beforeEvent:function(t,e){if(t[I]._listened){var i=e.event;switch(i.type){case"mousemove":case"mouseout":V(t,i);break;case"click":!function(t,e){var i=t[I],s=i._listeners.click,n=s&&R.lookup(i._labels,e);n&&z(t,s,n,e)}(t,i)}}},afterEvent:function(t){var e,i,s,n,o,a,r,h=t[I],c=h._actives,d=h._actives=t.getActiveElements(),u=l(c,d);for(e=0,i=u.length;e<i;++e)if((o=u[e])[1])for(s=0,n=(r=o[0].element[I]||[]).length;s<n;++s)(a=r[s]).$context.active=1===o[1],a.update(a.$context);(h._dirty||u.length)&&(R.update(h._labels),t.render()),delete h._dirty}}},76361:(t,e,i)=>{i.d(e,{A6:()=>T,Bs:()=>xe,E8:()=>Fe,FN:()=>Oe,PP:()=>ti,ju:()=>L,kc:()=>si,m_:()=>Ge,t1:()=>ue});var s=i(64467),n=i(16925);class o{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=n.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var a=new o;const r="transparent",h={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=(0,n.c)(t||r),o=s.valid&&(0,n.c)(e||r);return o&&o.valid?o.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class l{constructor(t,e,i,s){const o=e[i];s=(0,n.a)([t.to,s,o,t.from]);const a=(0,n.a)([t.from,o,s]);this._active=!0,this._fn=t.fn||h[t.type||typeof a],this._easing=n.e[t.easing]||n.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,n.a)([t.to,e,s,t.from]),this._from=(0,n.a)([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e<i),!this._active)return this._target[s]=a,void this._notify(!0);e<0?this._target[s]=n:(r=e/i%2,r=o&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class c{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,n.i)(t))return;const e=Object.keys(n.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const o=t[s];if(!(0,n.i)(o))return;const a={};for(const t of e)a[t]=o[t];
2((0,n.b)(o.properties)&&o.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,a)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let n=0;n<s.length;n++){const e=t[s[n]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const h=o[r];if("$"===h.charAt(0))continue;if("options"===h){s.push(...this._animateOptions(t,e));continue}const c=e[h];let d=n[h];const u=i.get(h);if(d){if(u&&d.active()){d.update(u,c,a);continue}d.cancel()}u&&u.duration?(n[h]=d=new l(u,t,h,c),s.push(d)):t[h]=c}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function d(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function u(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n<o;++n)i.push(s[n].index);return i}function f(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.keys,a="single"===s.mode;let r,h,l,c;if(null!==e){for(r=0,h=o.length;r<h;++r){if(l=+o[r],l===i){if(s.all)continue;break}c=t.values[l],(0,n.g)(c)&&(a||0===e||(0,n.s)(e)===(0,n.s)(c))&&(e+=c)}return e}}function g(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function p(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function m(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function b(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,h=o.axis,l=a.axis,c=function(t,e,i){return"".concat(t.id,".").concat(e.id,".").concat(i.stack||i.type)}(o,a,s),d=e.length;let u;for(let f=0;f<d;++f){const t=e[f],{[h]:i,[l]:o}=t;u=(t._stacks||(t._stacks={}))[l]=p(n,c,i),u[r]=o,u._top=m(u,a,!0,s.type),u._bottom=m(u,a,!1,s.type);(u._visualValues||(u._visualValues={}))[r]=o}}function x(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function _(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const y=t=>"reset"===t||"none"===t,v=(t,e)=>e?t:Object.assign({},t);class M{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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=g(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&&_(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,o=e.xAxisID=(0,n.v)(i.xAxisID,x(t,"x")),a=e.yAxisID=(0,n.v)(i.yAxisID,x(t,"y")),r=e.rAxisID=(0,n.v)(i.rAxisID,x(t,"r")),h=e.indexAxis,l=e.iAxisID=s(h,o,a,r),c=e.vAxisID=s(h,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,n.u)(this._data,this),t._stacked&&_(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,n.i)(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",o="x"===s.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let h,l,c;for(h=0,l=a.length;h<l;++h)c=a[h],r[h]={[n]:c,[o]:t[c]};return r}(e,t)}else if(i!==e){if(i){(0,n.u)(i,this);const t=this._cachedMeta;_(t),t._parsed=[]}
vendor: 4,199 bytes, line 2
2e&&Object.isExtensible(e)&&(0,n.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=g(e.vScale,e),e.stack!==i.stack&&(s=!0,_(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&b(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:a}=i,r=o.axis;let h,l,c,d=0===t&&e===s.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,c=s;else{c=(0,n.b)(s[t])?this.parseArrayData(i,s,t,e):(0,n.i)(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const o=()=>null===l[r]||u&&l[r]<u[r];for(h=0;h<e;++h)i._parsed[h+t]=l=c[h],d&&(o()&&(d=!1),u=l);i._sorted=d}a&&b(this,c)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:o}=t,a=n.axis,r=o.axis,h=n.getLabels(),l=n===o,c=new Array(s);let d,u,f;for(d=0,u=s;d<u;++d)f=d+i,c[d]={[a]:l||n.parse(h[f],f),[r]:o.parse(e[f],f)};return c}parseArrayData(t,e,i,s){const{xScale:n,yScale:o}=t,a=new Array(s);let r,h,l,c;for(r=0,h=s;r<h;++r)l=r+i,c=e[l],a[r]={x:n.parse(c[0],l),y:o.parse(c[1],l)};return a}parseObjectData(t,e,i,s){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:h="y"}=this._parsing,l=new Array(s);let c,d,u,f;for(c=0,d=s;c<d;++c)u=c+i,f=e[u],l[c]={x:o.parse((0,n.f)(f,r),u),y:a.parse((0,n.f)(f,h),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,n=this._cachedMeta,o=e[t.axis];return f({keys:u(s,!0),values:e._stacks[t.axis]._visualValues},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let o=null===n?NaN:n;const a=s&&i._stacks[e.axis];s&&a&&(s.values=a,o=f(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,a=s.length,r=this._getOtherScale(t),h=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:u(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let f,g;function p(){g=s[f];const e=g[r.axis];return!(0,n.g)(g[t.axis])||c>e||d<e}for(f=0;f<a&&(p()||(this.updateRangeFromParsed(l,t,g,h),!o));++f);if(o)for(f=a-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(l,t,g,h);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,o,a;for(s=0,o=e.length;s<o;++s)a=e[s][t.axis],(0,n.g)(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,o;return(0,n.i)(t)?(e=t.top,i=t.right,s=t.bottom,o=t.left):e=i=s=o=t,{top:e,right:i,bottom:s,left:o,disabled:!1===t}}((0,n.v)(this.options.clip,function(t,e,i){if(!1===i)return!1;const s=d(t,i),n=d(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],n=e.chartArea,o=[],a=this._drawStart||0,r=this._drawCount||s.length-a,h=this.options.drawActiveElementsOnTop;let l;for(i.dataset&&i.dataset.draw(t,n,a,r),l=a;l<a+r;++l){const e=s[l];e.hidden||(e.active&&h?o.push(e):e.draw(t,n))}for(l=0;l<o.length;++l)o[l].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];
2o=e.$context||(e.$context=function(t,e,i){return(0,n.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return(0,n.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2?arguments[2]:void 0;const s="active"===e,o=this._cachedDataOpts,a=t+"-"+e,r=o[a],h=this.enableOptionSharing&&(0,n.h)(i);if(r)return v(r,h);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=s?["".concat(t,"Hover"),"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),c),f=Object.keys(n.d.elements[t]),g=l.resolveNamedOptions(u,f,(()=>this.getContext(i,s,e)),d);return g.$shared&&(g.$shared=h,o[a]=Object.freeze(v(g,h))),g}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o="animation-".concat(e),a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const h=new c(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||y(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){y(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!y(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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 e=this._data,i=this._cachedMeta.data;for(const[a,r,h]of this._syncList)this[a](r,h);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this._cachedMeta,n=s.data,o=t+e;let a;const r=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;a<o;++a)n[a]=new this.dataElementType;this._parsing&&r(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&_(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}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,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function w(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=(0,n._)(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,o,a,r,h=e._length;const l=()=>{32767!==a&&-32768!==a&&((0,n.h)(r)&&(h=Math.min(h,Math.abs(a-r)||h)),r=a)};for(s=0,o=i.length;s<o;++s)a=e.getPixelForValue(i[s]),l();for(r=void 0,s=0,o=e.ticks.length;s<o;++s)a=e.getPixelForTick(s),l();return h}
vendor: 4,556 bytes, line 2
2function k(t,e,i,s){return(0,n.b)(t)?function(t,e,i,s){const n=i.parse(t[0],s),o=i.parse(t[1],s),a=Math.min(n,o),r=Math.max(n,o);let h=a,l=r;Math.abs(a)>Math.abs(r)&&(h=r,l=a),e[i.axis]=l,e._custom={barStart:h,barEnd:l,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function S(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,h=[];let l,c,d,u;for(l=i,c=i+s;l<c;++l)u=e[l],d={},d[n.axis]=r||n.parse(a[l],l),h.push(k(u,d,o,l));return h}function A(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function P(t,e,i,s){let n=e.borderSkipped;const o={};if(!n)return void(t.borderSkipped=o);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:r,reverse:h,top:l,bottom:c}=function(t){let e,i,s,n,o;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",o="start"):(n="start",o="end"),{start:i,end:s,reverse:e,top:n,bottom:o}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=l:(i._bottom||0)===s?n=c:(o[D(c,a,r,h)]=!0,n=l)),o[D(n,a,r,h)]=!0,t.borderSkipped=o}function D(t,e,i,s){var n,o,a;return s?(a=i,t=O(t=(n=t)===(o=e)?a:n===a?o:n,i,e)):t=O(t,e,i),t}function O(t,e,i){return"start"===t?e:"end"===t?i:t}function C(t,e,i){let{inflateAmount:s}=e;t.inflateAmount="auto"===s?1===i?.33:0:s}(0,s.A)(M,"defaults",{}),(0,s.A)(M,"datasetElementType",null),(0,s.A)(M,"dataElementType",null);class T extends M{parsePrimitiveData(t,e,i,s){return S(t,e,i,s)}parseArrayData(t,e,i,s){return S(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:h="y"}=this._parsing,l="x"===o.axis?r:h,c="x"===a.axis?r:h,d=[];let u,f,g,p;for(u=i,f=i+s;u<f;++u)p=e[u],g={},g[o.axis]=o.parse((0,n.f)(p,l),u),d.push(k((0,n.f)(p,c),g,a,u));return d}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),o=n._custom,a=A(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const o="reset"===s,{index:a,_cachedMeta:{vScale:r}}=this,h=r.getBasePixel(),l=r.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s);for(let f=e;f<e+i;f++){const e=this.getParsed(f),i=o||(0,n.k)(e[r.axis])?{base:h,head:h}:this._calculateBarValuePixels(f),g=this._calculateBarIndexPixels(f,c),p=(e._stacks||{})[r.axis],m={horizontal:l,base:i.base,enableBorderRadius:!p||A(e._custom)||a===p._top||a===p._bottom,x:l?i.head:g.center,y:l?g.center:i.head,height:l?g.size:Math.abs(i.size),width:l?Math.abs(i.size):g.size};u&&(m.options=d||this.resolveDataElementOptions(f,t[f].active?"active":s));const b=m.options||t[f].options;P(m,b,p,a),C(m,b,c.ratio),this.updateElement(t[f],f,m,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,a=[],r=t=>{const i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if((0,n.k)(s)||isNaN(s))return!0};for(const n of s)if((void 0===e||!r(n))&&((!1===o||-1===a.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&a.push(n.stack),n.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n<o;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const a=t.barThickness;return{min:a||w(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:o,minBarLength:a}}=this,r=o||0,h=this.getParsed(t),l=h._custom,c=A(l);let d,u,f=h[e.axis],g=0,p=i?this.applyStack(e,h,i):f;p!==f&&(g=p-f,p=f),c&&(f=l.barStart,p=l.barEnd-l.barStart,0!==f&&(0,n.s)(f)!==(0,n.s)(l.barEnd)&&(g=0),g+=f);const m=(0,n.k)(o)||c?g:o;let b=e.getPixelForValue(m);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(g+p):b,u=d-b,Math.abs(u)<a){u=function(t,e,
2i){return 0!==t?(0,n.s)(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,r)*a,f===r&&(b-=u/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),l=Math.min(t,o),g=Math.max(t,o);b=Math.max(Math.min(b,g),l),d=b+u,i&&!c&&(h._stacks[e.axis]._visualValues[s]=e.getValueForPixel(d)-e.getValueForPixel(b))}if(b===e.getPixelForValue(r)){const t=(0,n.s)(u)*e.getLineWidthForValue(r)/2;b+=t,u-=t}return{size:u,base:b,head:d,center:d+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,o=s.skipNull,a=(0,n.v)(s.maxBarThickness,1/0);let r,h;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t<n.length-1?n[t+1]:null;const h=i.categoryPercentage;null===a&&(a=o-(null===r?e.end-e.start:r-o)),null===r&&(r=o+o-a);const l=o-(o-Math.min(a,r))/2*h;return{chunk:Math.abs(r-a)/2*h/s,ratio:i.barPercentage,start:l}}(t,e,s,i):function(t,e,i,s){const o=i.barThickness;let a,r;return(0,n.k)(o)?(a=e.min*i.categoryPercentage,r=i.barPercentage):(a=o*s,r=1),{chunk:a/s,ratio:r,start:e.pixels[t]-a/2}}(t,e,s,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=l.start+l.chunk*c+l.chunk/2,h=Math.min(a,l.chunk*l.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),h=Math.min(a,e.min*e.ratio);return{base:r-h/2,head:r+h/2,center:r,size:h}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null===this.getParsed(n)[e.axis]||i[n].hidden||i[n].draw(this._ctx)}}(0,s.A)(T,"id","bar"),(0,s.A)(T,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,s.A)(T,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class E extends M{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const n=super.parsePrimitiveData(t,e,i,s);for(let o=0;o<n.length;o++)n[o]._custom=this.resolveDataElementOptions(o+i).radius;return n}parseArrayData(t,e,i,s){const o=super.parseArrayData(t,e,i,s);for(let a=0;a<o.length;a++){const t=e[i+a];o[a]._custom=(0,n.v)(t[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,s){const o=super.parseObjectData(t,e,i,s);for(let a=0;a<o.length;a++){const t=e[i+a];o[a]._custom=(0,n.v)(t&&t.r&&+t.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),h=o._custom;return{label:i[t]||"",value:"("+a+", "+r+(h?", "+h:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:h}=this._getSharedOptions(e,s),l=o.axis,c=a.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!n&&this.getParsed(d),u={},f=u[l]=n?o.getPixelForDecimal(.5):o.getPixelForValue(i[l]),g=u[c]=n?a.getBasePixel():a.getPixelForValue(i[c]);u.skip=isNaN(f)||isNaN(g),h&&(u.options=r||this.resolveDataElementOptions(d,e.active?"active":s),n&&(u.options.radius=0)),this.updateElement(e,d,u,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return"active"!==e&&(s.radius=0),s.radius+=(0,n.v)(i&&i._custom,o),s}}(0,s.A)(E,"id","bubble"),(0,s.A)(E,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,s.A)(E,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class L extends M{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let o,a,r=t=>+i[t];if((0,n.i)(i[t])){const{key:t="value"}=this._parsing;r=e=>+(0,n.f)(i[e],t)}for(o=t,a=t+e;o<a;++o)s._parsed[o]=r(o)}}_getRotation(){return(0,n.t)(this.options.rotation-90)}_getCircumference(){return(0,n.t)(this.options.circumference)}_getRotationExtents(){let t=n.T,e=-n.T;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),o=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-a)/2,0),h=Math.min((0,n.m)(this.options.cutout,r),1),l=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}
2=function(t,e,i){let s=1,o=1,a=0,r=0;if(e<n.T){const h=t,l=h+e,c=Math.cos(h),d=Math.sin(h),u=Math.cos(l),f=Math.sin(l),g=(t,e,s)=>(0,n.p)(t,h,l,!0)?1:Math.max(e,e*i,s,s*i),p=(t,e,s)=>(0,n.p)(t,h,l,!0)?-1:Math.min(e,e*i,s,s*i),m=g(0,c,u),b=g(n.H,d,f),x=p(n.P,c,u),_=p(n.P+n.H,d,f);s=(m-x)/2,o=(b-_)/2,a=-(m+x)/2,r=-(b+_)/2}return{ratioX:s,ratioY:o,offsetX:a,offsetY:r}}(d,c,h),m=(i.width-a)/u,b=(i.height-a)/f,x=Math.max(Math.min(m,b)/2,0),_=(0,n.n)(this.options.radius,x),y=(_-Math.max(_*h,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=p*_,s.total=this.calculateTotal(),this.outerRadius=_-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*l,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/n.T)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,h=(a.left+a.right)/2,l=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p<e;++p)m+=this._circumference(p,n);for(p=e;p<e+i;++p){const e=this._circumference(p,n),i=t[p],o={x:h+this.offsetX,y:l+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};g&&(o.options=f||this.resolveDataElementOptions(p,i.active?"active":s)),m+=e,this.updateElement(i,p,o,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?n.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=(0,n.o)(e._parsed[t],i.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),t=o.data,a=o.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)r=a.resolveDataElementOptions(s),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max((0,n.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}(0,s.A)(L,"id","doughnut"),(0,s.A)(L,"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"}),(0,s.A)(L,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),(0,s.A)(L,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class R extends M{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:h}=(0,n.q)(e,s,a);this._drawStart=r,this._drawCount=h,(0,n.w)(e)&&(r=0,h=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:l},t),this.updateElements(s,r,h,t)}updateElements(t,e,i,s){const o="reset"===s,{iScale:a,vScale:r,_stacked:h,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,s),u=a.axis,f=r.axis,{spanGaps:g,segment:p}
2=this.options,m=(0,n.x)(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===s,x=e+i,_=t.length;let y=e>0&&this.getParsed(e-1);for(let v=0;v<_;++v){const i=t[v],g=b?i:{};if(v<e||v>=x){g.skip=!0;continue}const _=this.getParsed(v),M=(0,n.k)(_[f]),w=g[u]=a.getPixelForValue(_[u],v),k=g[f]=o||M?r.getBasePixel():r.getPixelForValue(h?this.applyStack(r,_,h):_[f],v);g.skip=isNaN(w)||isNaN(k)||M,g.stop=v>0&&Math.abs(_[u]-y[u])>m,p&&(g.parsed=_,g.raw=l.data[v]),d&&(g.options=c||this.resolveDataElementOptions(v,i.active?"active":s)),b||this.updateElement(i,v,g,s),y=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}(0,s.A)(R,"id","line"),(0,s.A)(R,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,s.A)(R,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class I extends M{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=(0,n.o)(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,i,s){return n.y.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const o="reset"===s,a=this.chart,r=a.options.animation,h=this._cachedMeta.rScale,l=h.xCenter,c=h.yCenter,d=h.getIndexAngle(0)-.5*n.P;let u,f=d;const g=360/this.countVisibleElements();for(u=0;u<e;++u)f+=this._computeAngle(u,s,g);for(u=e;u<e+i;u++){const e=t[u];let i=f,n=f+this._computeAngle(u,s,g),p=a.getDataVisibility(u)?h.getDistanceFromCenterForValue(this.getParsed(u).r):0;f=n,o&&(r.animateScale&&(p=0),r.animateRotate&&(i=n=d));const m={x:l,y:c,innerRadius:0,outerRadius:p,startAngle:i,endAngle:n,options:this.resolveDataElementOptions(u,e.active?"active":s)};this.updateElement(e,u,m,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,n.t)(this.resolveDataElementOptions(t,e).angle||i):0}}(0,s.A)(I,"id","polarArea"),(0,s.A)(I,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,s.A)(I,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class F extends L{}(0,s.A)(F,"id","pie"),(0,s.A)(F,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class z extends M{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}
2parseObjectData(t,e,i,s){return n.y.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a<e+i;a++){const e=t[a],i=this.resolveDataElementOptions(a,e.active?"active":s),r=n.getPointPositionForValue(a,this.getParsed(a).r),h=o?n.xCenter:r.x,l=o?n.yCenter:r.y,c={x:h,y:l,angle:r.angle,skip:isNaN(h)||isNaN(l),options:i};this.updateElement(e,a,c,s)}}}(0,s.A)(z,"id","radar"),(0,s.A)(z,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,s.A)(z,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class V extends M{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y);return{label:i[t]||"",value:"("+a+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=(0,n.q)(e,i,s);if(this._drawStart=o,this._drawCount=a,(0,n.w)(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:o}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const o="reset"===s,{iScale:a,vScale:r,_stacked:h,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(c),u=this.includeOptions(s,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}=this.options,b=(0,n.x)(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||"none"===s;let _=e>0&&this.getParsed(e-1);for(let y=e;y<e+i;++y){const e=t[y],i=this.getParsed(y),c=x?e:{},p=(0,n.k)(i[g]),v=c[f]=a.getPixelForValue(i[f],y),M=c[g]=o||p?r.getBasePixel():r.getPixelForValue(h?this.applyStack(r,i,h):i[g],y);c.skip=isNaN(v)||isNaN(M)||p,c.stop=y>0&&Math.abs(i[f]-_[f])>b,m&&(c.parsed=i,c.raw=l.data[y]),u&&(c.options=d||this.resolveDataElementOptions(y,e.active?"active":s)),x||this.updateElement(e,y,c,s),_=i}this.updateSharedOptions(d,s,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}(0,s.A)(V,"id","scatter"),(0,s.A)(V,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,s.A)(V,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function N(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class B{static override(t){Object.assign(B.prototype,t)}constructor(t){(0,s.A)(this,"options",void 0),this.options=t||{}}init(){}formats(){return N()}parse(){return N()}format(){return N()}add(){return N()}diff(){return N()}startOf(){return N()}endOf(){return N()}}var W=B;function j(t,e,i,s){const{controller:o,data:a,_sorted:r}=t,h=o._cachedMeta.iScale;if(h&&e===h.axis&&"r"!==e&&r&&a.length){const t=h._reversePixels?n.A:n.B;if(!s)return t(a,e,i);if(o._sharedOptions){const s=a[0],n="function"===typeof s.getRange&&s.getRange(e);if(n){const s=t(a,e,i-n),o=t(a,e,i+n);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}
vendor: 4,155 bytes, line 2
2function H(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let r=0,h=o.length;r<h;++r){const{index:t,data:i}=o[r],{lo:h,hi:l}=j(o[r],e,a,n);for(let e=h;e<=l;++e){const n=i[e];n.skip||s(n,t,e)}}}function Y(t,e,i,s,o){const a=[];if(!o&&!t.isPointInArea(e))return a;return H(t,i,e,(function(i,r,h){(o||(0,n.C)(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&a.push({element:i,datasetIndex:r,index:h})}),!0),a}function $(t,e,i,s,n,o){let a=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,o=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}(i);let h=Number.POSITIVE_INFINITY;return H(t,i,e,(function(i,l,c){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const u=i.getCenterPoint(n);if(!(!!o||t.isPointInArea(u))&&!d)return;const f=r(e,u);f<h?(a=[{element:i,datasetIndex:l,index:c}],h=f):f===h&&a.push({element:i,datasetIndex:l,index:c})})),a}function U(t,e,i,s,o,a){return a||t.isPointInArea(e)?"r"!==i||s?$(t,e,i,s,o,a):function(t,e,i,s){let o=[];return H(t,i,e,(function(t,i,a){const{startAngle:r,endAngle:h}=t.getProps(["startAngle","endAngle"],s),{angle:l}=(0,n.D)(t,{x:e.x,y:e.y});(0,n.p)(l,r,h)&&o.push({element:t,datasetIndex:i,index:a})})),o}(t,e,i,o):[]}function X(t,e,i,s,n){const o=[],a="x"===i?"inXRange":"inYRange";let r=!1;return H(t,i,e,((t,s,h)=>{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:h}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var Q={evaluateInteractionItems:H,modes:{index(t,e,i,s){const o=(0,n.z)(e,t),a=i.axis||"x",r=i.includeInvisible||!1,h=i.intersect?Y(t,o,a,s,r):U(t,o,a,!1,s,r),l=[];return h.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=h[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const o=(0,n.z)(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;let h=i.intersect?Y(t,o,a,s,r):U(t,o,a,!1,s,r);if(h.length>0){const e=h[0].datasetIndex,i=t.getDatasetMeta(e).data;h=[];for(let t=0;t<i.length;++t)h.push({element:i[t],datasetIndex:e,index:t})}return h},point:(t,e,i,s)=>Y(t,(0,n.z)(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const o=(0,n.z)(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;return U(t,o,a,i.intersect,s,r)},x:(t,e,i,s)=>X(t,(0,n.z)(e,t),"x",i.intersect,s),y:(t,e,i,s)=>X(t,(0,n.z)(e,t),"y",i.intersect,s)}};const q=["left","top","right","bottom"];function K(t,e){return t.filter((t=>t.pos===e))}function G(t,e){return t.filter((t=>-1===q.indexOf(t.pos)&&t.box.axis===e))}function Z(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function J(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!q.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o<a;++o){r=t[o];const{fullSize:a}=r.box,h=i[r.stack],l=h&&r.stackWeight/h.weight;r.horizontal?(r.width=l?l*s:a&&e.availableWidth,r.height=n):(r.width=s,r.height=l?l*n:a&&e.availableHeight)}return i}function tt(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function et(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function it(t,e,i,s){const{pos:o,box:a}=i,r=t.maxPadding;if(!(0,n.i)(o)){i.size&&(t[o]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[o]+=i.size}a.getPadding&&et(r,a.getPadding());const h=Math.max(0,e.outerWidth-tt(r,t,"left","right")),l=Math.max(0,e.outerHeight-tt(r,t,"top","bottom")),c=h!==t.w,d=l!==t.h;return t.w=h,t.h=l,i.horizontal?{same:c,other:d}:{same:d,other:c}}function st(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function nt(t,e,i,s){const n=[];let o,a,r,h,l,c;for(o=0,a=t.length,l=0;o<a;++o){r=t[o],h=r.box,h.update(r.width||e.w,r.height||e.h,st(r.horizontal,e));const{same:a,other:d}
vendor: 4,821 bytes, line 2
2=it(e,i,r,s);l|=a&&n.length,c=c||d,h.fullSize||n.push(r)}return l&&nt(n,e,i,s)||c}function ot(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function at(t,e,i,s){const o=i.padding;let{x:a,y:r}=e;for(const h of t){const t=h.box,l=s[h.stack]||{count:1,placed:0,weight:1},c=h.stackWeight/l.weight||1;if(h.horizontal){const s=e.w*c,a=l.size||t.height;(0,n.h)(l.start)&&(r=l.start),t.fullSize?ot(t,o.left,r,i.outerWidth-o.right-o.left,a):ot(t,e.left+l.placed,r,s,a),l.start=r,l.placed+=s,r=t.bottom}else{const s=e.h*c,r=l.size||t.width;(0,n.h)(l.start)&&(a=l.start),t.fullSize?ot(t,a,o.top,r,i.outerHeight-o.bottom-o.top):ot(t,a,e.top+l.placed,r,s),l.start=a,l.placed+=s,a=t.right}}e.x=a,e.y=r}var rt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const o=(0,n.E)(t.options.layout.padding),a=Math.max(e-o.width,0),r=Math.max(i-o.height,0),h=function(t){const e=function(t){const e=[];let i,s,n,o,a,r;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:o,options:{stack:a,stackWeight:r=1}}=n),e.push({index:i,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return e}(t),i=Z(e.filter((t=>t.box.fullSize)),!0),s=Z(K(e,"left"),!0),n=Z(K(e,"right")),o=Z(K(e,"top"),!0),a=Z(K(e,"bottom")),r=G(e,"x"),h=G(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(h).concat(a).concat(r),chartArea:K(e,"chartArea"),vertical:s.concat(n).concat(h),horizontal:o.concat(a).concat(r)}}(t.boxes),l=h.vertical,c=h.horizontal;(0,n.F)(t.boxes,(t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const d=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),f=Object.assign({},o);et(f,(0,n.E)(s));const g=Object.assign({maxPadding:f,w:a,h:r,x:o.left,y:o.top},o),p=J(l.concat(c),u);nt(h.fullSize,g,u,p),nt(l,g,u,p),nt(c,g,u,p)&&nt(l,g,u,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),at(h.leftAndTop,g,u,p),g.x+=g.w,g.y+=g.h,at(h.rightAndBottom,g,u,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},(0,n.F)(h.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class ht{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class lt extends ht{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ct="$chartjs",dt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ut=t=>null===t||""===t;const ft=!!n.K&&{passive:!0};function gt(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ft)}function pt(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function mt(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||pt(i.addedNodes,s),e=e&&!pt(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function bt(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||pt(i.removedNodes,s),e=e&&!pt(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const xt=new Map;let _t=0;function yt(){const t=window.devicePixelRatio;t!==_t&&(_t=t,xt.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function vt(t,e,i){const s=t.canvas,o=s&&(0,n.I)(s);if(!o)return;const a=(0,n.L)(((t,e)=>{const s=o.clientWidth;i(t,e),s<o.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||a(i,s)}));return r.observe(o),function(t,e){xt.size||window.addEventListener("resize",yt),xt.set(t,e)}(t,a),r}function Mt(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){xt.delete(t),xt.size||window.removeEventListener("resize",yt)}(t)}function wt(t,e,i){const s=t.canvas,o=(0,n.L)((e=>{null!==t.ctx&&i(function(t,e){const i=dt[t.type]||t.type,{x:s,y:o}=(0,n.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==o?o:null}}(e,t))}),t);
2return function(t,e,i){t&&t.addEventListener(e,i,ft)}(s,e,o),o}class kt extends ht{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),o=t.getAttribute("width");if(t[ct]={initial:{height:s,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ut(o)){const e=(0,n.J)(t,"width");void 0!==e&&(t.width=e)}if(ut(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,n.J)(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ct])return!1;const i=e[ct].initial;["height","width"].forEach((t=>{const s=i[t];(0,n.k)(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[ct],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:mt,detach:bt,resize:vt}[e]||wt;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Mt,detach:Mt,resize:Mt}[e]||gt)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return(0,n.G)(t,e,i,s)}isAttached(t){const e=t&&(0,n.I)(t);return!(!e||!e.isConnected)}}class St{constructor(){(0,s.A)(this,"x",void 0),(0,s.A)(this,"y",void 0),(0,s.A)(this,"active",!1),(0,s.A)(this,"options",void 0),(0,s.A)(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,n.x)(this.x)&&(0,n.x)(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function At(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),o=Math.min(i.maxTicksLimit||s,s),a=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],r=a.length,h=a[0],l=a[r-1],c=[];if(r>o)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===a&&(e.push(t[n]),o++,a=i[o*s])}(e,c,a,r/o),c;const d=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),o=e.length/i;if(!s)return Math.max(o,1);const a=(0,n.N)(s);for(let n=0,r=a.length-1;n<r;n++){const t=a[n];if(t>o)return t}return Math.max(o,1)}(a,e,o);if(r>0){let t,i;const s=r>1?Math.round((l-h)/(r-1)):null;for(Pt(e,c,d,(0,n.k)(s)?0:h-s,h),t=0,i=r-1;t<i;t++)Pt(e,c,d,a[t],a[t+1]);return Pt(e,c,d,l,(0,n.k)(s)?e.length:l+s),c}return Pt(e,c,d),c}function Pt(t,e,i,s,o){const a=(0,n.v)(s,0),r=Math.min((0,n.v)(o,t.length),t.length);let h,l,c,d=0;for(i=Math.ceil(i),o&&(h=o-s,i=h/Math.floor(h/i)),c=a;c<0;)d++,c=Math.round(a+d*i);for(l=Math.max(a,0);l<r;l++)l===c&&(e.push(t[l]),d++,c=Math.round(a+d*i))}(0,s.A)(St,"defaults",{}),(0,s.A)(St,"defaultRoutes",void 0);const Dt=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Ot=(t,e)=>Math.min(e||t,t);function Ct(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;o<n;o+=s)i.push(t[Math.floor(o)]);return i}function Tt(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),o=t._startPixel,a=t._endPixel,r=1e-6;let h,l=t.getPixelForTick(n);if(!(i&&(h=1===s?Math.max(l-o,a-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,l+=n<e?h:-h,l<o-r||l>a+r)))return l}function Et(t){return t.drawTicks?t.tickLength:0}function Lt(t,e){if(!t.display)return 0;const i=(0,n.a0)(t.font,e),s=(0,n.E)(t.padding);return((0,n.b)(t.text)?t.text.length:1)*i.lineHeight+s.height}function Rt(t,e,i){let s=(0,n.a1)(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>
2"left"===t?"right":"right"===t?"left":t)(s)),s}class It extends St{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,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=(0,n.O)(t,Number.POSITIVE_INFINITY),e=(0,n.O)(e,Number.NEGATIVE_INFINITY),i=(0,n.O)(i,Number.POSITIVE_INFINITY),s=(0,n.O)(s,Number.NEGATIVE_INFINITY),{min:(0,n.O)(t,i),max:(0,n.O)(e,s),minDefined:(0,n.g)(t),maxDefined:(0,n.g)(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();if(o&&a)return{min:i,max:s};const r=this.getMatchingVisibleMetas();for(let n=0,h=r.length;n<h;++n)e=r[n].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),a||(s=Math.max(s,e.max));return i=a&&i>s?s:i,s=o&&i>s?i:s,{min:(0,n.O)(i,(0,n.O)(s,i)),max:(0,n.O)(s,(0,n.O)(i,s))}}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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,n.Q)(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,n.R)(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const h=r<this.ticks.length;this._convertTicksToLabels(h?Ct(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=At(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,n.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,n.Q)(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(){(0,n.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,n.Q)(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,n.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=(0,n.Q)(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){(0,n.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,n.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Ot(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxR
2otation;let a,r,h,l=s;if(!this._isVisible()||!e.display||s>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const c=this._getLabelSizes(),d=c.widest.width,u=c.highest.height,f=(0,n.S)(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),r=this.maxHeight-Et(t.grid)-e.padding-Lt(t.title,this.chart.options.font),h=Math.sqrt(d*d+u*u),l=(0,n.U)(Math.min(Math.asin((0,n.S)((c.highest.height+6)/a,-1,1)),Math.asin((0,n.S)(r/h,-1,1))-Math.asin((0,n.S)(u/h,-1,1)))),l=Math.max(s,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){(0,n.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,n.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const a=Lt(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=Et(o)+a):(t.height=this.maxHeight,t.width=Et(o)+a),i.display&&this.ticks.length){const{first:e,last:s,widest:o,highest:a}=this._getLabelSizes(),h=2*i.padding,l=(0,n.t)(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(r){const e=i.mirror?0:d*o.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+h)}else{const e=i.mirror?0:c*o.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+h)}this._calculatePadding(e,s,d,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,h="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?h?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-l+o)*this.width/(this.width-l),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_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(){(0,n.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)(0,n.k)(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ct(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:o}=this,a=[],r=[],h=Math.floor(e/Ot(e,i));let l,c,d,u,f,g,p,m,b,x,_,y=0,v=0;for(l=0;l<e;l+=h){if(u=t[l].label,f=this._resolveTickFontOptions(l),s.font=g=f.string,p=o[g]=o[g]||{data:{},gc:[]},m=f.lineHeight,b=x=0,(0,n.k)(u)||(0,n.b)(u)){if((0,n.b)(u))for(c=0,d=u.length;c<d;++c)_=u[c],(0,n.k)(_)||(0,n.b)(_)||(b=(0,n.V)(s,p.data,p.gc,b,_),x+=m)}else b=(0,n.V)(s,p.data,p.gc,b,u),x=m;a.push(b),r.push(x),y=Math.max(b,y),v=Math.max(x,v)}!function(t,e){(0,n.F)(t,(t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}}))}(o,e);const M=a.indexOf(y),w=r.indexOf(v),k=t=>({width:a[t]||0,height:r[t]||0});return{first:k(0),last:k(e-1),widest:k(M),highest:k(w),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,n.W)(this._alignToPixels?(0,n.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];
2return i.$context||(i.$context=function(t,e,i){return(0,n.j)(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=(i=this.chart.getContext(),s=this,(0,n.j)(i,{scale:s,type:"scale"})));var i,s}_tickSize(){const t=this.options.ticks,e=(0,n.t)(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,h=o?o.highest.height+a:0;return this.isHorizontal()?h*i>r*s?r/i:h/s:h*s<r*i?h/i:r/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:o,position:a,border:r}=s,h=o.offset,l=this.isHorizontal(),c=this.ticks.length+(h?1:0),d=Et(o),u=[],f=r.setContext(this.getContext()),g=f.display?f.width:0,p=g/2,m=function(t){return(0,n.X)(i,t,g)};let b,x,_,y,v,M,w,k,S,A,P,D;if("top"===a)b=m(this.bottom),M=this.bottom-d,k=b-p,A=m(t.top)+p,D=t.bottom;else if("bottom"===a)b=m(this.top),A=t.top,D=m(t.bottom)-p,M=b+p,k=this.top+d;else if("left"===a)b=m(this.right),v=this.right-d,w=b-p,S=m(t.left)+p,P=t.right;else if("right"===a)b=m(this.left),S=t.left,P=m(t.right)-p,v=b+p,w=this.left+d;else if("x"===e){if("center"===a)b=m((t.top+t.bottom)/2+.5);else if((0,n.i)(a)){const t=Object.keys(a)[0],e=a[t];b=m(this.chart.scales[t].getPixelForValue(e))}A=t.top,D=t.bottom,M=b+p,k=M+d}else if("y"===e){if("center"===a)b=m((t.left+t.right)/2);else if((0,n.i)(a)){const t=Object.keys(a)[0],e=a[t];b=m(this.chart.scales[t].getPixelForValue(e))}v=b-p,w=v-d,S=t.left,P=t.right}const O=(0,n.v)(s.ticks.maxTicksLimit,c),C=Math.max(1,Math.ceil(c/O));for(x=0;x<c;x+=C){const t=this.getContext(x),e=o.setContext(t),s=r.setContext(t),a=e.lineWidth,c=e.color,d=s.dash||[],f=s.dashOffset,g=e.tickWidth,p=e.tickColor,m=e.tickBorderDash||[],b=e.tickBorderDashOffset;_=Tt(this,x,h),void 0!==_&&(y=(0,n.X)(i,_,a),l?v=w=S=P=y:M=k=A=D=y,u.push({tx1:v,ty1:M,tx2:w,ty2:k,x1:S,y1:A,x2:P,y2:D,width:a,color:c,borderDash:d,borderDashOffset:f,tickWidth:g,tickColor:p,tickBorderDash:m,tickBorderDashOffset:b}))}return this._ticksLength=c,this._borderValue=b,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:h,crossAlign:l,padding:c,mirror:d}=o,u=Et(i.grid),f=u+c,g=d?-c:f,p=-(0,n.t)(this.labelRotation),m=[];let b,x,_,y,v,M,w,k,S,A,P,D,O="middle";if("top"===s)M=this.bottom-g,w=this._getXAxisLabelAlignment();else if("bottom"===s)M=this.top+g,w=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,v=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,v=t.x}else if("x"===e){if("center"===s)M=(t.top+t.bottom)/2+f;else if((0,n.i)(s)){const t=Object.keys(s)[0],e=s[t];M=this.chart.scales[t].getPixelForValue(e)+f}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)v=(t.left+t.right)/2-f;else if((0,n.i)(s)){const t=Object.keys(s)[0],e=s[t];v=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===h?O="top":"end"===h&&(O="bottom"));const C=this._getLabelSizes();for(b=0,x=r.length;b<x;++b){_=r[b],y=_.label;const t=o.setContext(this.getContext(b));k=this.getPixelForTick(b)+o.labelOffset,S=this._resolveTickFontOptions(b),A=S.lineHeight,P=(0,n.b)(y)?y.length:1;const e=P/2,i=t.color,h=t.textStrokeColor,c=t.textStrokeWidth;let u,f=w;if(a?(v=k,"inner"===w&&(f=b===x-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),D="top"===s?"near"===l||0!==p?-P*A+A/2:"center"===l?-C.highest.height/2-e*A+A:-C.highest.height+A/2:"near"===l||0!==p?A/2:"center"===l?C.highest.height/2-e*A:C.highest.height-P*A,d&&(D*=-1),0===p||t.showLabelBackdrop||(v+=A/2*Math.sin(p))):(M=k,D=(1-P)*A/2),t.showLabelBackdrop){const e=(0,n.E)(t.backdropPadding),i=C.heights[b],s=C.widths[b];let o=D-e.top,a=0-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(w){case"center":a-=s/2;break;case"right":a-=s;break;case"inner":b===x-1?a-=s:b>0&&(a-=s/2)}u={left:a,top:o,width:s+e.width,height:i+e.height,color:t.backdropColor}}
vendor: 1,150 bytes, line 2
2m.push({label:y,font:S,textOffset:D,options:{rotation:p,color:i,strokeColor:h,strokeWidth:c,textAlign:f,textBaseline:O,translation:[v,M],backdrop:u}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-(0,n.t)(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,h;return"left"===e?s?(h=this.right+n,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h+=a)):(h=this.right-o,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h=this.left)):"right"===e?s?(h=this.left+n,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h-=a)):(h=this.left+o,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h=this.right)):r="right",{textAlign:r,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
2:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n<o;++n){const t=s[n];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const r=s.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let l,c,d,u;this.isHorizontal()?(l=(0,n.X)(t,this.left,a)-a/2,c=(0,n.X)(t,this.right,r)+r/2,d=u=h):(d=(0,n.X)(t,this.top,a)-a/2,u=(0,n.X)(t,this.bottom,r)+r/2,l=c=h),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&(0,n.Y)(e,i);const s=this.getLabelItems(t);for(const o of s){const t=o.options,i=o.font,s=o.label,a=o.textOffset;(0,n.Z)(e,s,0,a,i,t)}i&&(0,n.$)(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const o=(0,n.a0)(i.font),a=(0,n.E)(i.padding),r=i.align;let h=o.lineHeight/2;"bottom"===e||"center"===e||(0,n.i)(e)?(h+=a.bottom,(0,n.b)(i.text)&&(h+=o.lineHeight*(i.text.length-1))):h+=a.top;const{titleX:l,titleY:c,maxWidth:d,rotation:u}=function(t,e,i,s){const{top:o,left:a,bottom:r,right:h,chart:l}=t,{chartArea:c,scales:d}=l;let u,f,g,p=0;const m=r-o,b=h-a;if(t.isHorizontal()){if(f=(0,n.a2)(s,a,h),(0,n.i)(i)){const t=Object.keys(i)[0],s=i[t];g=d[t].getPixelForValue(s)+m-e}else g="center"===i?(c.bottom+c.top)/2+m-e:Dt(t,i,e);u=h-a}else{if((0,n.i)(i)){const t=Object.keys(i)[0],s=i[t];f=d[t].getPixelForValue(s)-b+e}else f="center"===i?(c.left+c.right)/2-b+e:Dt(t,i,e);g=(0,n.a2)(s,r,o),p="left"===i?-n.H:n.H}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}(this,h,e,r);(0,n.Z)(t,i.text,0,0,o,{color:i.color,maxWidth:d,rotation:u,textAlign:Rt(r,e,s),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=(0,n.v)(t.grid&&t.grid.z,-1),s=(0,n.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===It.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[i]!==this.id||t&&o.type!==t||s.push(o)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,n.a0)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ft{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);
2return o in s||(s[o]=t,function(t,e,i){const s=(0,n.a4)(Object.create(null),[i?n.d.get(i):{},n.d.get(e),t.defaults]);n.d.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),o=s.pop(),a=[t].concat(s).join("."),r=e[i].split("."),h=r.pop(),l=r.join(".");n.d.route(a,o,l,h)}))}(e,t.defaultRoutes);t.descriptors&&n.d.describe(e,t.descriptors)}(t,a,i),this.override&&n.d.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in n.d[s]&&(delete n.d[s][i],this.override&&delete n.a3[i])}}class zt{constructor(){this.controllers=new Ft(M,"datasets",!0),this.elements=new Ft(St,"elements"),this.plugins=new Ft(Object,"plugins"),this.scales=new Ft(It,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)}remove(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,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(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):(0,n.F)(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=(0,n.a5)(t);(0,n.Q)(i["before"+s],[],i),e[t](i),(0,n.Q)(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var Vt=new zt;class Nt{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const o of t){const t=o.plugin,a=t[i],r=[e,s,o.options];if(!1===(0,n.Q)(a,r,t)&&s.cancelable)return!1}return!0}invalidate(){(0,n.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=(0,n.v)(i.options&&i.options.plugins,{}),o=function(t){const e={},i=[],s=Object.keys(Vt.plugins.items);for(let o=0;o<s.length;o++)i.push(Vt.getPlugin(s[o]));const n=t.plugins||[];for(let o=0;o<n.length;o++){const t=n[o];-1===i.indexOf(t)&&(i.push(t),e[t.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,e,i,s){let{plugins:n,localIds:o}=e;const a=[],r=t.getContext();for(const h of n){const e=h.id,n=Bt(i[e],s);null!==n&&a.push({plugin:h,options:Wt(t.config,{plugin:h,local:o[e]},n,r)})}return a}(t,o,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Bt(t,e){return e||!1!==t?!0===t?{}:t:null}function Wt(t,e,i,s){let{plugin:n,local:o}=e;const a=t.pluginScopeKeys(n),r=t.getOptionScopes(i,a);return o&&n.defaults&&r.push(n.defaults),t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function jt(t,e){const i=n.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ht(t){if("x"===t||"y"===t||"r"===t)return t}function Yt(t){if(Ht(t))return t;for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];for(const o of i){const e=o.axis||("top"===(n=o.position)||"bottom"===n?"x":"left"
2===n||"right"===n?"y":void 0)||t.length>1&&Ht(t[0].toLowerCase());if(e)return e}var n;throw new Error("Cannot determine type of '".concat(t,"' axis. Please provide 'axis' or 'position' option."))}function $t(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ut(t,e){const i=n.a3[t.type]||{scales:{}},s=e.scales||{},o=jt(t.type,e),a=Object.create(null);return Object.keys(s).forEach((e=>{const r=s[e];if(!(0,n.i)(r))return console.error("Invalid scale configuration for scale: ".concat(e));if(r._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(e));const h=Yt(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return $t(t,"x",i[0])||$t(t,"y",i[0])}return{}}(e,t),n.d.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(h,o),c=i.scales||{};a[e]=(0,n.ab)(Object.create(null),[{axis:h},r,c[h],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||jt(o,e),h=(n.a3[o]||{}).scales||{};Object.keys(h).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||e;a[o]=a[o]||Object.create(null),(0,n.ab)(a[o],[{axis:e},s[o],h[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];(0,n.ab)(e,[n.d.scales[e.type],n.d.scale])})),a}function Xt(t){const e=t.options||(t.options={});e.plugins=(0,n.v)(e.plugins,{}),e.scales=Ut(t,e)}function Qt(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qt=new Map,Kt=new Set;function Gt(t,e){let i=qt.get(t);return i||(i=e(),qt.set(t,i),Kt.add(i)),i}const Zt=(t,e,i)=>{const s=(0,n.f)(e,i);void 0!==s&&t.add(s)};class Jt{constructor(t){this._config=function(t){return(t=t||{}).data=Qt(t.data),Xt(t),t}(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=Qt(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(),Xt(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Gt(t,(()=>[["datasets.".concat(t),""]]))}datasetAnimationScopeKeys(t,e){return Gt("".concat(t,".transition.").concat(e),(()=>[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]]))}datasetElementScopeKeys(t,e){return Gt("".concat(t,"-").concat(e),(()=>[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]]))}pluginScopeKeys(t){const e=t.id,i=this.type;return Gt("".concat(i,"-plugin-").concat(e),(()=>[["plugins.".concat(e),...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const h=new Set;e.forEach((e=>{t&&(h.add(t),e.forEach((e=>Zt(h,t,e)))),e.forEach((t=>Zt(h,s,t))),e.forEach((t=>Zt(h,n.a3[o]||{},t))),e.forEach((t=>Zt(h,n.d,t))),e.forEach((t=>Zt(h,n.a6,t)))}));const l=Array.from(h);return 0===l.length&&l.push(Object.create(null)),Kt.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,n.a3[e]||{},n.d.datasets[e]||{},{type:e},n.d,n.a6]}resolveNamedOptions(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const o={$shared:!0},{resolver:a,subPrefixes:r}=te(this._resolverCache,t,s);let h=a;if(function(t,e){const{isScriptable:i,isIndexable:s}=(0,n.aa)(t);for(const o of e){const e=i(o),a=s(o),r=(a||e)&&t[o];if(e&&((0,n.a7)(r)||ee(r))||a&&(0,n.b)(r))return!0}return!1}(a,e)){o.$shared=!1,i=(0,n.a7)(i)?i():i;const e=this.createResolver(t,i,r);h=(0,n.a8)(a,i,e)}for(const n of e)o[n]=h[n];return o}createResolver(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],s=arguments.length>3?arguments[3]:void 0;const{resolver:o}=te(this._resolverCache,t,i);return(0,n.i)(e)?(0,n.a8)(o,e,void 0,s):o}}function te(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const o=i.join();let a=s.get(o);if(!a){a={resolver:(0,n.a9)(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(o,a)}return a}const ee=t=>(0,n.i)(t)&&Object.getOwnPropertyNames(t).some((e=>(0,n.a7)(t[e])));const ie=["top","bottom","left","right","chartArea"];function se(t,e){return"top"===t||"bottom"===t||-1===ie.indexOf(t)&&"x"===e}function ne(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function oe(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,n.Q)(i&&i.onComplete,[t],e)}function ae(t){const e=t.chart,i=e.options.animation;(0,n.Q)(i&&i.onProgress,[t],e)}function re(t){return(0,n.M)()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const he={},le=t=>{const e=re(t);return Object.values(he).filter((t=>t.canvas===e)).pop()};function ce(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;
2if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}function de(t,e,i){return t.options.clip?t[i]:e[i]}class ue{static register(){Vt.add(...arguments),fe()}static unregister(){Vt.remove(...arguments),fe()}constructor(t,e){const i=this.config=new Jt(e),s=re(t),o=le(s);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 r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!(0,n.M)()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?lt:kt}(s)),this.platform.updateConfig(i);const h=this.platform.acquireContext(s,r.aspectRatio),l=h&&h.canvas,c=l&&l.height,d=l&&l.width;this.id=(0,n.ac)(),this.ctx=h,this.canvas=l,this.width=d,this.height=c,this._options=r,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 Nt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,n.ad)((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],he[this.id]=this,h&&l?(a.listen(this,"complete",oe),a.listen(this,"progress",ae),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:o}=this;return(0,n.k)(t)?e&&o?o:s?i/s: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 Vt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,n.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,n.af)(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,(0,n.ae)(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),(0,n.Q)(i.onResize,[this,a],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};(0,n.F)(t,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],s=Yt(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),(0,n.F)(o,(e=>{const o=e.options,a=o.id,r=Yt(a,o),h=(0,n.v)(o.type,e.dtype);void 0!==o.position&&se(o.position,r)===se(e.dposition)||(o.position=e.dposition),s[a]=!0;let l=null;if(a in i&&i[a].type===h)l=i[a];else{l=new(Vt.getScale(h))({id:a,type:h,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(o,t)})),(0,n.F)(s,((t,e)=>{t||delete i[e]})),(0,n.F)(i,(t=>{rt.configure(this,t,t.options),rt.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ne("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let o=this.getDatasetMeta(i);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=s.indexAxis||jt(a,this.options),o.order=s.order||0,o.index=i,o.label=""+s.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=Vt.getController(a),{datasetElementType:s,dataElementType:r}=n.d.datasets[a];Object.assign(e,{dataElementType:Vt.getElement(r),datasetElementType:s&&Vt.getElement(s)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){(0,n.F)(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;
2e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let n=0,l=this.data.datasets.length;n<l;n++){const{controller:t}=this.getDatasetMeta(n),e=!s&&-1===o.indexOf(t);t.buildOrUpdateElements(e),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||(0,n.F)(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ne("z","_idx"));const{_active:r,_lastEvent:h}=this;h?this._eventHandler(h,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){(0,n.F)(this.scales,(t=>{rt.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,n.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){ce(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let o=1;o<e;o++)if(!(0,n.ag)(s,i(o)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;rt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,n.F)(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,(0,n.a7)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(this)?this.attached&&!a.running(this)&&a.start(this):(this.draw(),oe({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,o=function(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:de(i,e,"left"),right:de(i,e,"right"),top:de(s,e,"top"),bottom:de(s,e,"bottom")}:e}(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(s&&(0,n.Y)(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.r
2ight,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),s&&(0,n.$)(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return(0,n.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Q.modes[e];return"function"===typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=(0,n.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"===typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);(0,n.h)(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),a.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,n.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete he[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,n.F)(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){(0,n.F)(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},(0,n.F)(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((t=>{let{datasetIndex:e,index:i}=t;const s=this.getDatasetMeta(e);if(!s)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:s.data[i],index:i}}));!(0,n.ah)(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,i,a),h=(0,n.ai)(t),l=function(t,e,
2i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,h);i&&(this._lastEvent=null,(0,n.Q)(o.onHover,[t,r,this],this),h&&(0,n.Q)(o.onClick,[t,r,this],this));const c=!(0,n.ah)(r,s);return(c||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function fe(){return(0,n.F)(ue.instances,(t=>t._plugins.invalidate()))}function ge(t,e,i,s){const o=(a=t.options.borderRadius,(0,n.ak)(a,["outerStart","outerEnd","innerStart","innerEnd"]));var a;const r=(i-e)/2,h=Math.min(r,s*e/2),l=t=>{const e=(i-Math.min(r,t))*s/2;return(0,n.S)(t,0,Math.min(r,e))};return{outerStart:l(o.outerStart),outerEnd:l(o.outerEnd),innerStart:(0,n.S)(o.innerStart,0,h),innerEnd:(0,n.S)(o.innerEnd,0,h)}}function pe(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function me(t,e,i,s,o,a){const{x:r,y:h,startAngle:l,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+s+i-c,0),f=d>0?d+s+i+c:0;let g=0;const p=o-l;if(s){const t=((d>0?d-s:0)+(u>0?u-s:0))/2;g=(p-(0!==t?p*t/(t+s):p))/2}const m=(p-Math.max(.001,p*u-i/n.P)/u)/2,b=l+m+g,x=o-m-g,{outerStart:_,outerEnd:y,innerStart:v,innerEnd:M}=ge(e,f,u,x-b),w=u-_,k=u-y,S=b+_/w,A=x-y/k,P=f+v,D=f+M,O=b+v/P,C=x-M/D;if(t.beginPath(),a){const e=(S+A)/2;if(t.arc(r,h,u,S,e),t.arc(r,h,u,e,A),y>0){const e=pe(k,A,r,h);t.arc(e.x,e.y,y,A,x+n.H)}const i=pe(D,x,r,h);if(t.lineTo(i.x,i.y),M>0){const e=pe(D,C,r,h);t.arc(e.x,e.y,M,x+n.H,C+Math.PI)}const s=(x-M/f+(b+v/f))/2;if(t.arc(r,h,f,x-M/f,s,!0),t.arc(r,h,f,s,b+v/f,!0),v>0){const e=pe(P,O,r,h);t.arc(e.x,e.y,v,O+Math.PI,b-n.H)}const o=pe(w,b,r,h);if(t.lineTo(o.x,o.y),_>0){const e=pe(w,S,r,h);t.arc(e.x,e.y,_,b-n.H,S)}}else{t.moveTo(r,h);const e=Math.cos(S)*u+r,i=Math.sin(S)*u+h;t.lineTo(e,i);const s=Math.cos(A)*u+r,n=Math.sin(A)*u+h;t.lineTo(s,n)}t.closePath()}function be(t,e,i,s,o){const{fullCircles:a,startAngle:r,circumference:h,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:f}=l,g="inner"===l.borderAlign;if(!c)return;t.setLineDash(u||[]),t.lineDashOffset=f,g?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let p=e.endAngle;if(a){me(t,e,i,s,p,o);for(let e=0;e<a;++e)t.stroke();isNaN(h)||(p=r+(h%n.T||n.T))}g&&function(t,e,i){const{startAngle:s,pixelMargin:o,x:a,y:r,outerRadius:h,innerRadius:l}=e;let c=o/h;t.beginPath(),t.arc(a,r,h,s-c,i+c),l>o?(c=o/l,t.arc(a,r,l,i+c,s-c,!0)):t.arc(a,r,o,i+n.H,s-n.H),t.closePath(),t.clip()}(t,e,p),a||(me(t,e,i,s,p,o),t.stroke())}(0,s.A)(ue,"defaults",n.d),(0,s.A)(ue,"instances",he),(0,s.A)(ue,"overrides",n.a3),(0,s.A)(ue,"registry",Vt),(0,s.A)(ue,"version","4.4.3"),(0,s.A)(ue,"getChart",le);class xe extends St{constructor(t){super(),(0,s.A)(this,"circumference",void 0),(0,s.A)(this,"endAngle",void 0),(0,s.A)(this,"fullCircles",void 0),(0,s.A)(this,"innerRadius",void 0),(0,s.A)(this,"outerRadius",void 0),(0,s.A)(this,"pixelMargin",void 0),(0,s.A)(this,"startAngle",void 0),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,e,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=(0,n.D)(s,{x:t,y:e}),{startAngle:r,endAngle:h,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,f=(0,n.v)(d,h-r)>=n.T||(0,n.p)(o,r,h),g=(0,n.aj)(a,l+u,c+u);return f&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:h}=this.options,l=(s+n)/2,c=(o+a+h+r)/2;return{x:e+Math.cos(l)*c,y:i+Math.sin(l)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>n.T?Math.floor(i/n.T):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*s,Math.sin(r)*s);const h=s*(1-Math.sin(Math.min(n.P,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,
2i,s,o){const{fullCircles:a,startAngle:r,circumference:h}=e;let l=e.endAngle;if(a){me(t,e,i,s,l,o);for(let e=0;e<a;++e)t.fill();isNaN(h)||(l=r+(h%n.T||n.T))}me(t,e,i,s,l,o),t.fill()}(t,this,h,o,a),be(t,this,h,o,a),t.restore()}}function _e(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=(0,n.v)(i.borderCapStyle,e.borderCapStyle),t.setLineDash((0,n.v)(i.borderDash,e.borderDash)),t.lineDashOffset=(0,n.v)(i.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,n.v)(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,n.v)(i.borderWidth,e.borderWidth),t.strokeStyle=(0,n.v)(i.borderColor,e.borderColor)}function ye(t,e,i){t.lineTo(i.x,i.y)}function ve(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=t.length,{start:n=0,end:o=s-1}=i,{start:a,end:r}=e,h=Math.max(n,a),l=Math.min(o,r),c=n<a&&o<a||n>r&&o>r;return{count:s,start:h,loop:e.loop,ilen:l<h&&!c?s+l-h:l-h}}function Me(t,e,i,s){const{points:o,options:a}=e,{count:r,start:h,loop:l,ilen:c}=ve(o,i,s),d=function(t){return t.stepped?n.ar:t.tension||"monotone"===t.cubicInterpolationMode?n.as:ye}(a);let u,f,g,{move:p=!0,reverse:m}=s||{};for(u=0;u<=c;++u)f=o[(h+(m?c-u:u))%r],f.skip||(p?(t.moveTo(f.x,f.y),p=!1):d(t,g,f,m,a.stepped),g=f);return l&&(f=o[(h+(m?c:0))%r],d(t,g,f,m,a.stepped)),!!l}function we(t,e,i,s){const n=e.points,{count:o,start:a,ilen:r}=ve(n,i,s),{move:h=!0,reverse:l}=s||{};let c,d,u,f,g,p,m=0,b=0;const x=t=>(a+(l?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(h&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i<f?f=i:i>g&&(g=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=g=i),p=i}_()}function ke(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i?we:Me}(0,s.A)(xe,"id","arc"),(0,s.A)(xe,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),(0,s.A)(xe,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,s.A)(xe,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});const Se="function"===typeof Path2D;function Ae(t,e,i,s){Se&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),_e(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=ke(e);for(const r of n)_e(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Pe extends St{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,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;(0,n.al)(this._points,i,t,s,e),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=(0,n.am)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],o=this.points,a=(0,n.an)(this,{property:e,start:s,end:s});if(!a.length)return;const r=[],h=function(t){return t.stepped?n.ao:t.tension||"monotone"===t.cubicInterpolationMode?n.ap:n.aq}(i);let l,c;for(l=0,c=a.length;l<c;++l){const{start:n,end:c}=a[l],d=o[n],u=o[c];if(d===u){r.push(d);continue}const f=h(d,u,Math.abs((s-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return ke(this)(t,this,e,i)}path(t,e,i){const s=this.segments,n=ke(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const a of s)o&=n(t,this,a,{start:e,end:e+i-1});return!!o}draw(t,e,i,s){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),Ae(t,this,i,s),t.restore(
2)),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function De(t,e,i,s){const n=t.options,{[i]:o}=t.getProps([i],s);return Math.abs(e-o)<n.radius+n.hitRadius}(0,s.A)(Pe,"id","line"),(0,s.A)(Pe,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,s.A)(Pe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,s.A)(Pe,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class Oe extends St{constructor(t){super(),(0,s.A)(this,"parsed",void 0),(0,s.A)(this,"skip",void 0),(0,s.A)(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return De(this,t,"x",e)}inYRange(t,e){return De(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!(0,n.C)(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,(0,n.at)(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ce(t,e){const{x:i,y:s,base:n,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let r,h,l,c,d;return t.horizontal?(d=a/2,r=Math.min(i,n),h=Math.max(i,n),l=s-d,c=s+d):(d=o/2,r=i-d,h=i+d,l=Math.min(s,n),c=Math.max(s,n)),{left:r,top:l,right:h,bottom:c}}function Te(t,e,i,s){return t?0:(0,n.S)(e,i,s)}function Ee(t){const e=Ce(t),i=e.right-e.left,s=e.bottom-e.top,o=function(t,e,i){const s=t.options.borderWidth,o=t.borderSkipped,a=(0,n.av)(s);return{t:Te(o.top,a.top,0,i),r:Te(o.right,a.right,0,e),b:Te(o.bottom,a.bottom,0,i),l:Te(o.left,a.left,0,e)}}(t,i/2,s/2),a=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,a=(0,n.aw)(o),r=Math.min(e,i),h=t.borderSkipped,l=s||(0,n.i)(o);return{topLeft:Te(!l||h.top||h.left,a.topLeft,0,r),topRight:Te(!l||h.top||h.right,a.topRight,0,r),bottomLeft:Te(!l||h.bottom||h.left,a.bottomLeft,0,r),bottomRight:Te(!l||h.bottom||h.right,a.bottomRight,0,r)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:a},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:s-o.t-o.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,a.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(o.b,o.r))}}}}function Le(t,e,i,s){const o=null===e,a=null===i,r=t&&!(o&&a)&&Ce(t,s);return r&&(o||(0,n.aj)(e,r.left,r.right))&&(a||(0,n.aj)(i,r.top,r.bottom))}function Re(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ie(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-s,a=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+o,h:t.h+a,radius:t.radius}}(0,s.A)(Oe,"id","point"),(0,s.A)(Oe,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,s.A)(Oe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class Fe extends St{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:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:a}=Ee(this),r=(h=a.radius).topLeft||h.topRight||h.bottomLeft||h.bottomRight?n.au:Re;var h;t.save(),a.w===o.w&&a.h===o.h||(t.beginPath(),r(t,Ie(a,e,o)),t.clip(),r(t,Ie(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Ie(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Le(this,t,e,i)}inXRange(t,e){return Le(this,t,null,e)}inYRange(t,e){return Le(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}
2=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}(0,s.A)(Fe,"id","bar"),(0,s.A)(Fe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,s.A)(Fe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});new WeakMap;const ze={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s.add(t.x),n+=t.y,++o}}return{x:[...s].reduce(((t,e)=>t+e))/s.size,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,o,a=e.x,r=e.y,h=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=s.getCenterPoint(),i=(0,n.aE)(e,t);i<h&&(h=i,o=s)}}if(o){const t=o.tooltipPosition();a=t.x,r=t.y}return{x:a,y:r}}};function Ve(t,e){return e&&((0,n.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ne(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Be(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function We(t,e){const i=t.chart.ctx,{body:s,footer:o,title:a}=t,{boxWidth:r,boxHeight:h}=e,l=(0,n.a0)(e.bodyFont),c=(0,n.a0)(e.titleFont),d=(0,n.a0)(e.footerFont),u=a.length,f=o.length,g=s.length,p=(0,n.E)(e.padding);let m=p.height,b=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x){m+=g*(e.displayColors?Math.max(h,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){b=Math.max(b,i.measureText(t).width+_)};return i.save(),i.font=c.string,(0,n.F)(t.title,y),i.font=l.string,(0,n.F)(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?r+2+e.boxPadding:0,(0,n.F)(s,(t=>{(0,n.F)(t.before,y),(0,n.F)(t.lines,y),(0,n.F)(t.after,y)})),_=0,i.font=d.string,(0,n.F)(t.footer,y),i.restore(),b+=p.width,{width:b,height:m}}
2function je(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:h}}=t;let l="center";return"center"===s?l=n<=(r+h)/2?"left":"right":n<=o/2?l="left":n>=a-o/2&&(l="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(l,t,e,i)&&(l="center"),l}function He(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||je(t,e,i,s),yAlign:s}}function Ye(t,e,i,s){const{caretSize:o,caretPadding:a,cornerRadius:r}=t,{xAlign:h,yAlign:l}=i,c=o+a,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=(0,n.aw)(r);let p=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,h);const m=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,c);return"center"===l?"left"===h?p+=c:"right"===h&&(p-=c):"left"===h?p-=Math.max(d,f)+o:"right"===h&&(p+=Math.max(u,g)+o),{x:(0,n.S)(p,0,s.width-e.width),y:(0,n.S)(m,0,s.height-e.height)}}function $e(t,e,i){const s=(0,n.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function Ue(t){return Ve([],Ne(t))}function Xe(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Qe={beforeTitle:n.aF,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:n.aF,beforeBody:n.aF,beforeLabel:n.aF,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return(0,n.k)(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:n.aF,afterBody:n.aF,beforeFooter:n.aF,footer:n.aF,afterFooter:n.aF};function qe(t,e,i,s){const n=t[e].call(i,s);return"undefined"===typeof n?Qe[e].call(i,s):n}class Ke extends St{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 e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new c(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,(0,n.j)(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=qe(i,"beforeTitle",this,t),n=qe(i,"title",this,t),o=qe(i,"afterTitle",this,t);let a=[];return a=Ve(a,Ne(s)),a=Ve(a,Ne(n)),a=Ve(a,Ne(o)),a}getBeforeBody(t,e){return Ue(qe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return(0,n.F)(t,(t=>{const e={before:[],lines:[],after:[]},n=Xe(i,t);Ve(e.before,Ne(qe(n,"beforeLabel",this,t))),Ve(e.lines,qe(n,"label",this,t)),Ve(e.after,Ne(qe(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return Ue(qe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=qe(i,"beforeFooter",this,t),n=qe(i,"footer",this,t),o=qe(i,"afterFooter",this,t);let a=[];return a=Ve(a,Ne(s)),a=Ve(a,Ne(n)),a=Ve(a,Ne(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],o=[],a=[];let r,h,l=[];for(r=0,h=e.length;r<h;++r)l.push(Be(this.chart,e[r]));return t.filter&&(l=l.filter(((e,s,n)=>t.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>
2t.itemSort(e,s,i)))),(0,n.F)(l,(e=>{const i=Xe(t.callbacks,e);s.push(qe(i,"labelColor",this,e)),o.push(qe(i,"labelPointStyle",this,e)),a.push(qe(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=ze[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=We(this,i),a=Object.assign({},t,e),r=He(this.chart,i,a),h=Ye(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:h.x,y:h.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:h,topRight:l,bottomLeft:c,bottomRight:d}=(0,n.aw)(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,b,x,_,y,v;return"center"===o?(y=f+p/2,"left"===s?(m=u,b=m-a,_=y+a,v=y-a):(m=u+g,b=m+a,_=y-a,v=y+a),x=m):(b="left"===s?u+Math.max(h,c)+a:"right"===s?u+g-Math.max(l,d)-a:this.caretX,"top"===o?(_=f,y=_-a,m=b-a,x=b+a):(_=f+p,y=_+a,m=b+a,x=b-a),v=_),{x1:m,x2:b,x3:x,y1:_,y2:y,y3:v}}drawTitle(t,e,i){const s=this.title,o=s.length;let a,r,h;if(o){const l=(0,n.az)(i.rtl,this.x,this.width);for(t.x=$e(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,n.a0)(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,h=0;h<o;++h)e.fillText(s[h],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,h+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,s,o){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:h,boxWidth:l}=o,c=(0,n.a0)(o.bodyFont),d=$e(this,"left",o),u=s.x(d),f=h<c.lineHeight?(c.lineHeight-h)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(l,h)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=s.leftForLtr(u,l)+l/2,c=g+h/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,n.at)(t,e,i,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,(0,n.at)(t,e,i,c)}else{t.lineWidth=(0,n.i)(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 e=s.leftForLtr(u,l),i=s.leftForLtr(s.xPlus(u,1),l-2),r=(0,n.aw)(a.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,n.au)(t,{x:e,y:g,w:l,h:h,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),(0,n.au)(t,{x:i,y:g+1,w:l-2,h:h-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,l,h),t.strokeRect(e,g,l,h),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,l-2,h-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:h,boxWidth:l,boxPadding:c}=i,d=(0,n.a0)(i.bodyFont);let u=d.lineHeight,f=0;const g=(0,n.az)(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let b,x,_,y,v,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=$e(this,m,i),e.fillStyle=i.bodyColor,(0,n.F)(this.beforeBody,p),f=r&&"right"!==m?"center"===a?l/2+c:l+2+c:0,y=0,M=s.length;y<M;++y){for(b=s[y],x=this.labelTextColors[y],e.fillStyle=x,(0,n.F)(b.before,p),_=b.lines,r&&_.length&&(this._drawColorBox(e,t,y,g,i),u=Math.max(d.lineHeight,h)),v=0,w=_.length;v<w;++v)p(_[v]),u=d.lineHeight;(0,n.F)(b.after,p)}f=0,u=d.lineHeight,(0,n.F)(this.afterBody,p),t.y-=o}drawFooter(t,e,i){const s=this.footer,o=s.length;let a,r;if(o){const h=(0,n.az)(i.rtl,this.x,this.width);for(t.x=$e(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=h.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,n.a0)(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;
2++r)e.fillText(s[r],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:o,yAlign:a}=this,{x:r,y:h}=t,{width:l,height:c}=i,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=(0,n.aw)(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+d,h),"top"===a&&this.drawCaret(t,e,i,s),e.lineTo(r+l-u,h),e.quadraticCurveTo(r+l,h,r+l,h+u),"center"===a&&"right"===o&&this.drawCaret(t,e,i,s),e.lineTo(r+l,h+c-g),e.quadraticCurveTo(r+l,h+c,r+l-g,h+c),"bottom"===a&&this.drawCaret(t,e,i,s),e.lineTo(r+f,h+c),e.quadraticCurveTo(r,h+c,r,h+c-f),"center"===a&&"left"===o&&this.drawCaret(t,e,i,s),e.lineTo(r,h+d),e.quadraticCurveTo(r,h,r+d,h),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=ze[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=We(this,t),a=Object.assign({},i,this._size),r=He(e,t,a),h=Ye(t,a,r,e);s._to===h.x&&n._to===h.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=(0,n.E)(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,e),(0,n.aA)(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,n.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((t=>{let{datasetIndex:e,index:i}=t;const s=this.chart.getDatasetMeta(e);if(!s)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:s.data[i],index:i}})),o=!(0,n.ah)(i,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),h=e||!(0,n.ah)(a,o)||r;return h&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),h}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=ze[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}(0,s.A)(Ke,"positioners",ze);var Ge={id:"tooltip",_element:Ke,positioners:ze,afterInit(t,e,i){i&&(t.tooltip=new Ke({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>
2e.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:Qe},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Ze(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"===typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function Je(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ti extends It{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,n.k)(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:(0,n.S)(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ze(i,t,(0,n.v)(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)s.push({value:o});return s}getLabelForValue(t){return Je.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ei(t,e,i){let{horizontal:s,minRotation:o}=i;const a=(0,n.t)(o),r=(s?Math.sin(a):Math.cos(a))||.001,h=.75*e*(""+t).length;return Math.min(e/r,h)}(0,s.A)(ti,"id","category"),(0,s.A)(ti,"defaults",{ticks:{callback:Je}});class ii extends It{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,e){return(0,n.k)(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const a=t=>s=e?s:t,r=t=>o=i?o:t;if(t){const t=(0,n.s)(s),e=(0,n.s)(o);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(s===o){let e=0===o?1:Math.abs(.05*o);r(o+e),t||a(s-e)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(s," would result generating up to ").concat(e," ticks. Limiting to 1000.")),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=function(t,e){const i=[],{bounds:s,step:o,min:a,max:r,precision:h,count:l,maxTicks:c,maxDigits:d,includeBounds:u}=t,f=o||1,g=c-1,{min:p,max:m}=e,b=!(0,n.k)(a),x=!(0,n.k)(r),_=!(0,n.k)(l),y=(m-p)/(d+1);let v,M,w,k,S=(0,n.aH)((m-p)/g/f)*f;if(S<1e-14&&!b&&!x)return[{value:p},{value:m}];k=Math.ceil(m/S)-Math.floor(p/S),k>g&&(S=(0,n.aH)(k*S/g/f)*f),(0,n.k)(h)||(v=Math.pow(10,h),S=Math.ceil(S*v)/v),"ticks"===s?(M=Math.floor(p/S)*S,w=Math.ceil(m/S)*S):(M=p,w=m),b&&x&&o&&(0,n.aI)((r-a)/o,S/1e3)?(k=Math.round(Math.min((r-a)
2/S,c)),S=(r-a)/k,M=a,w=r):_?(M=b?a:M,w=x?r:w,k=l-1,S=(w-M)/k):(k=(w-M)/S,k=(0,n.aJ)(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const A=Math.max((0,n.aK)(S),(0,n.aK)(M));v=Math.pow(10,(0,n.k)(h)?A:h),M=Math.round(M*v)/v,w=Math.round(w*v)/v;let P=0;for(b&&(u&&M!==a?(i.push({value:a}),M<a&&P++,(0,n.aJ)(Math.round((M+P*S)*v)/v,a,ei(a,y,t))&&P++):M<a&&P++);P<k;++P){const t=Math.round((M+P*S)*v)/v;if(x&&t>r)break;i.push({value:t})}return x&&u&&w!==r?i.length&&(0,n.aJ)(i[i.length-1].value,r,ei(r,y,t))?i[i.length-1].value=r:i.push({value:r}):x&&w!==r||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&(0,n.aG)(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return(0,n.o)(t,this.chart.options.locale,this.options.ticks.format)}}class si extends ii{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,n.g)(t)?t:0,this.max=(0,n.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=(0,n.t)(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}(0,s.A)(si,"id","linear"),(0,s.A)(si,"defaults",{ticks:{callback:n.aL.formatters.numeric}});const ni=t=>Math.floor((0,n.aM)(t)),oi=(t,e)=>Math.pow(10,ni(t)+e);function ai(t){return 1===t/Math.pow(10,ni(t))}function ri(t,e,i){const s=Math.pow(10,i),n=Math.floor(t/s);return Math.ceil(e/s)-n}function hi(t,e){let{min:i,max:s}=e;i=(0,n.O)(t.min,i);const o=[],a=ni(i);let r=function(t,e){let i=ni(e-t);for(;ri(t,e,i)>10;)i++;for(;ri(t,e,i)<10;)i--;return Math.min(i,ni(t))}(i,s),h=r<0?Math.pow(10,Math.abs(r)):1;const l=Math.pow(10,r),c=a>r?Math.pow(10,a):0,d=Math.round((i-c)*h)/h,u=Math.floor((i-c)/l/10)*l*10;let f=Math.floor((d-u)/Math.pow(10,r)),g=(0,n.O)(t.min,Math.round((c+u+f*Math.pow(10,r))*h)/h);for(;g<s;)o.push({value:g,major:ai(g),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(r++,f=2,h=r>=0?1:h),g=Math.round((c+u+f*Math.pow(10,r))*h)/h;const p=(0,n.O)(t.max,g);return o.push({value:p,major:ai(p),significand:f}),o}class li extends It{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ii.prototype.parse.apply(this,[t,e]);if(0!==i)return(0,n.g)(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,n.g)(t)?Math.max(0,t):null,this.max=(0,n.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,n.g)(this._userMin)&&(this.min=t===oi(this.min,0)?oi(this.min,-1):oi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t;i===s&&(i<=0?(n(1),o(10)):(n(oi(i,-1)),o(oi(s,1)))),i<=0&&n(oi(s,-1)),s<=0&&o(oi(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=hi({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,n.aG)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":(0,n.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=(0,n.aM)(t),this._valueRange=(0,n.aM)(this.max)-(0,n.aM)(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:((0,n.aM)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function ci(t){const e=t.ticks;if(e.display&&t.display){const t=(0,n.E)(e.backdropPadding);return(0,n.v)(e.font&&e.font.size,n.d.font.size)+t.height}return 0}function di(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function ui(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,h=r.centerPointLabels?n.P/a:0;for(let u=0;u<a;u++){const a=r.setContext(t.getPointLabelContext(u));o[u]=a.padding;const f=t.getPointPosition(u,t.drawingArea+o[u],h),g=(0,n.a0)(a.font),p=(l=t.ctx,c=g,d=t._pointLabels[u],d=(0,n.b)(d)?d:[d],{w:(0,n.aN)(l,c.string,d),h:d.length*c.lineHeight});s[u]=p;const m=(0,n.ay)(t.getIndexAngle(u)+h),b=Math.round((0,n.U)(m));fi(i,e,m,di(b,f.x,p.w,0,180),di(b,f.y,p.h,90,270))}var l,c,d;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,
2i){const s=[],o=t._pointLabels.length,a=t.options,{centerPointLabels:r,display:h}=a.pointLabels,l={extra:ci(a)/2,additionalAngle:r?n.P/o:0};let c;for(let n=0;n<o;n++){l.padding=i[n],l.size=e[n];const o=gi(t,n,l);s.push(o),"auto"===h&&(o.visible=pi(o,c),o.visible&&(c=o))}return s}(t,s,o)}function fi(t,e,i,s,n){const o=Math.abs(Math.sin(i)),a=Math.abs(Math.cos(i));let r=0,h=0;s.start<e.l?(r=(e.l-s.start)/o,t.l=Math.min(t.l,e.l-r)):s.end>e.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.start<e.t?(h=(e.t-n.start)/a,t.t=Math.min(t.t,e.t-h)):n.end>e.b&&(h=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+h))}function gi(t,e,i){const s=t.drawingArea,{extra:o,additionalAngle:a,padding:r,size:h}=i,l=t.getPointPosition(e,s+o+r,a),c=Math.round((0,n.U)((0,n.ay)(l.angle+n.H))),d=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,h.h,c),u=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),f=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,h.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:f,top:d,right:f+h.w,bottom:d+h.h}}function pi(t,e){if(!e)return!0;const{left:i,top:s,right:o,bottom:a}=t;return!((0,n.C)({x:i,y:s},e)||(0,n.C)({x:i,y:a},e)||(0,n.C)({x:o,y:s},e)||(0,n.C)({x:o,y:a},e))}function mi(t,e,i){const{left:s,top:o,right:a,bottom:r}=i,{backdropColor:h}=e;if(!(0,n.k)(h)){const i=(0,n.aw)(e.borderRadius),l=(0,n.E)(e.backdropPadding);t.fillStyle=h;const c=s-l.left,d=o-l.top,u=a-s+l.width,f=r-o+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),(0,n.au)(t,{x:c,y:d,w:u,h:f,radius:i}),t.fill()):t.fillRect(c,d,u,f)}}function bi(t,e,i,s){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,n.T);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let n=1;n<s;n++)i=t.getPointPosition(n,e),o.lineTo(i.x,i.y)}}(0,s.A)(li,"id","logarithmic"),(0,s.A)(li,"defaults",{ticks:{callback:n.aL.formatters.logarithmic,major:{enabled:!0}}});class xi extends ii{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=(0,n.E)(ci(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=(0,n.g)(t)&&!isNaN(t)?t:0,this.max=(0,n.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ci(this.options))}generateTickLabels(t){ii.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=(0,n.Q)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?ui(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=n.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,n.ay)(t*e+(0,n.t)(i))}getDistanceFromCenterForValue(t){if((0,n.k)(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,n.k)(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return(0,n.j)(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.getIndexAngle(t)-n.H+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:n}}
2drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),bi(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:o}=e,a=this._pointLabels.length;let r,h,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const a=s.setContext(t.getPointLabelContext(o));mi(i,a,e);const r=(0,n.a0)(a.font),{x:h,y:l,textAlign:c}=e;(0,n.Z)(i,t._pointLabels[o],h,l+r.lineHeight/2,r,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){h=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),n=s.setContext(i),r=o.setContext(i);!function(t,e,i,s,n){const o=t.ctx,a=e.circular,{color:r,lineWidth:h}=e;!a&&!s||!r||!h||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=h,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),bi(t,i,a,s),o.closePath(),o.stroke(),o.restore())}(this,n,h,a,r)}})),i.display){for(t.save(),r=a-1;r>=0;r--){const s=i.setContext(this.getPointLabelContext(r)),{color:n,lineWidth:o}=s;o&&n&&(t.lineWidth=o,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,h=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(r,h),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,r)=>{if(0===r&&this.min>=0&&!e.reverse)return;const h=i.setContext(this.getContext(r)),l=(0,n.a0)(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),h.showLabelBackdrop){t.font=l.string,a=t.measureText(s.label).width,t.fillStyle=h.backdropColor;const e=(0,n.E)(h.backdropPadding);t.fillRect(-a/2-e.left,-o-l.size/2-e.top,a+e.width,l.size+e.height)}(0,n.Z)(t,s.label,0,-o,l,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})})),t.restore()}drawTitle(){}}(0,s.A)(xi,"id","radialLinear"),(0,s.A)(xi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:n.aL.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),(0,s.A)(xi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,s.A)(xi,"descriptors",{angleLines:{_fallback:"grid"}});const _i={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}},yi=Object.keys(_i);function vi(t,e){return t-e}function Mi(t,e){if((0,n.k)(e))return null;const i=t._adapter,{parser:s,round:o,isoWeekday:a}=t._parseOpts;let r=e;return"function"===typeof s&&(r=s(r)),(0,n.g)(r)||(r="string"===typeof s?i.parse(r,s):i.parse(r)),null===r?null:(o&&(r="week"!==o||!(0,n.x)(a)&&!0!==a?i.startOf(r,o):i.startOf(r,"isoWeek",a)),+r)}function wi(t,e,i,s){const n=yi.length;for(let o=yi.indexOf(t);o<n-1;++o){const t=_i[yi[o]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=s)return yi[o]}return yi[n-1]}function ki(t,e,i){if(i){if(i.length){const{lo:s,hi:o}=(0,n.aP)(i,e);t[i[s]>=e?i[s]:i[o]]=!0}}else t[e]=!0}function Si(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a<o;++a)r=e[a],n[r]=a,s.push({value:r,major:!1});return 0!==o&&i?function(t,e,i,s){const n=t._adapter,o=+n.startOf(e[0].value,s),a=e[e.length-1].value;let r,h;for(r=o;r<=a;r=+n.add(r,1,s))h=i[r],h>=0&&(e[h].major=!0);return e}(t,s,n,i):s}class Ai extends It{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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.time||(t.time={}),s=this._adapter=new W(t.adapters.date);s.init(e),(0,n.ab)(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Mi(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function h(t){a||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}a&&r||(h(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||h(this.getMinMax(!1))),s=(0,n.g)(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),o=(0,n.g)(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,r=(0,n.aO)(s,o,a);return this._unit=e.unit||(i.autoSkip?wi(e.minUnit,this.min,this.max,this._getLabelCapacity(o)
2):function(t,e,i,s,n){for(let o=yi.length-1;o>=yi.indexOf(i);o--){const i=yi[o];if(_i[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return yi[i?yi.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=yi.indexOf(t)+1,i=yi.length;e<i;++e)if(_i[yi[e]].common)return yi[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&r.reverse(),Si(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(){let t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=0,o=0;this.options.offset&&i.length&&(t=this.getDecimalForValue(i[0]),s=1===i.length?1-t:(this.getDecimalForValue(i[1])-t)/2,e=this.getDecimalForValue(i[i.length-1]),o=1===i.length?e:(e-this.getDecimalForValue(i[i.length-2]))/2);const a=i.length<3?.5:.25;s=(0,n.S)(s,0,a),o=(0,n.S)(o,0,a),this._offsets={start:s,end:o,factor:1/(s+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,o=s.time,a=o.unit||wi(o.minUnit,e,i,this._getLabelCapacity(e)),r=(0,n.v)(s.ticks.stepSize,1),h="week"===a&&o.isoWeekday,l=(0,n.x)(h)||!0===h,c={};let d,u,f=e;if(l&&(f=+t.startOf(f,"isoWeek",h)),f=+t.startOf(f,l?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const g="data"===s.ticks.source&&this.getDataTimestamps();for(d=f,u=0;d<i;d=+t.add(d,r,a),u++)ki(c,d,g);return d!==i&&"ticks"!==s.bounds&&1!==u||ki(c,d,g),Object.keys(c).sort(vi).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,n=e||i[s];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,s){const o=this.options,a=o.ticks.callback;if(a)return(0,n.Q)(a,[t,e,i],this);const r=o.time.displayFormats,h=this._unit,l=this._majorUnit,c=h&&r[h],d=l&&r[l],u=i[e],f=l&&d&&u&&u.major;return this._adapter.format(t,s||(f?d:c))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=(0,n.t)(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),a=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*a,h:i*a+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,Si(this,[t],this._majorUnit),s),o=this._getLabelSize(n),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Mi(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,n._)(t.sort(vi))}}function Pi(t,e,i){let s,o,a,r,h=0,l=t.length-1;i?(e>=t[h].pos&&e<=t[l].pos&&({lo:h,hi:l}=(0,n.B)(t,"pos",e)),({pos:s,time:a}=t[h]),({pos:o,time:r}=t[l])):(e>=t[h].time&&e<=t[l].time&&({lo:h,hi:l}=(0,n.B)(t,"time",e)),({time:s,pos:a}=t[h]),({time:o,pos:r}=t[l]));const c=o-s;return c?a+(r-a)*(e-s)/c:a}(0,s.A)(Ai,"id","time"),(0,s.A)(Ai,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class Di extends Ai{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Pi(e,this.min),this._tableRange=Pi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,h,l;for(o=0,a=t.length;o<a;++o)h=t[o],h>=e&&h<=i&&s.push(h);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o<a;
2++o)l=s[o+1],r=s[o-1],h=s[o],Math.round((l+r)/2)!==h&&n.push({time:h,pos:o/(a-1)});return n}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Pi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Pi(this._table,i*this._tableRange+this._minPos,!0)}}(0,s.A)(Di,"id","timeseries"),(0,s.A)(Di,"defaults",Ai.defaults)},16925:(t,e,i)=>{function s(t){return t+.5|0}i.d(e,{$:()=>ke,A:()=>zt,B:()=>Ft,C:()=>Me,D:()=>Pt,E:()=>Ve,F:()=>X,G:()=>_i,H:()=>ft,I:()=>di,J:()=>Mi,K:()=>vi,L:()=>Yt,M:()=>ci,N:()=>yt,O:()=>j,P:()=>ht,Q:()=>U,R:()=>We,S:()=>Et,T:()=>lt,U:()=>St,V:()=>me,W:()=>Lt,X:()=>xe,Y:()=>we,Z:()=>Oe,_:()=>jt,a:()=>Be,a0:()=>Ne,a1:()=>Ut,a2:()=>Xt,a3:()=>ce,a4:()=>Z,a5:()=>st,a6:()=>de,a7:()=>ot,a8:()=>Ye,a9:()=>He,aA:()=>Oi,aB:()=>Qt,aC:()=>Ci,aD:()=>ve,aE:()=>Dt,aF:()=>F,aG:()=>wt,aH:()=>_t,aI:()=>Mt,aJ:()=>xt,aK:()=>At,aL:()=>le,aM:()=>mt,aN:()=>be,aO:()=>Vt,aP:()=>It,aa:()=>$e,ab:()=>J,ac:()=>z,ad:()=>$t,ae:()=>yi,af:()=>_e,ag:()=>at,ah:()=>Q,ai:()=>rt,aj:()=>Rt,ak:()=>Ie,al:()=>li,am:()=>Ii,an:()=>Ri,ao:()=>ki,ap:()=>Si,aq:()=>wi,ar:()=>Se,as:()=>Ae,at:()=>ye,au:()=>Ce,av:()=>Fe,aw:()=>ze,ax:()=>Li,ay:()=>Ct,az:()=>Di,b:()=>N,c:()=>ie,d:()=>pe,e:()=>te,f:()=>it,g:()=>W,h:()=>nt,i:()=>B,j:()=>je,k:()=>V,l:()=>Bt,m:()=>Y,n:()=>$,o:()=>re,p:()=>Tt,q:()=>qt,r:()=>Ht,s:()=>bt,t:()=>kt,u:()=>Wt,v:()=>H,w:()=>Kt,x:()=>vt,y:()=>ii,z:()=>bi});const n=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return n(s(2.55*t),0,255)}function a(t){return n(s(255*t),0,255)}function r(t){return n(s(t/2.55)/100,0,1)}function h(t){return n(s(100*t),0,100)}const l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],d=t=>c[15&t],u=t=>c[(240&t)>>4]+c[15&t],f=t=>(240&t)>>4===(15&t);function g(t){var e=(t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a))(t)?d:u;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function m(t,e,i){const s=e*Math.min(i,1-i),n=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-s*Math.max(Math.min(n-3,9-n,1),-1)};return[n(0),n(8),n(4)]}function b(t,e,i){const s=function(s){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(s+t/60)%6;return i-i*e*Math.max(Math.min(n,4-n,1),0)};return[s(5),s(3),s(1)]}function x(t,e,i){const s=m(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function _(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,h,l;return n!==o&&(l=n-o,h=a>.5?l/(2-n-o):l/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,l,n),r=60*r+.5),[0|r,h||0,a]}function y(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(a)}function v(t,e,i){return y(m,t,e,i)}function M(t){return(t%360+360)%360}function w(t){const e=p.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?o(+e[5]):a(+e[5]));const n=M(+e[2]),r=+e[3]/100,h=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return y(x,t,e,i)}(n,r,h):"hsv"===e[1]?function(t,e,i){return y(b,t,e,i)}(n,r,h):v(n,r,h),{r:i[0],g:i[1],b:i[2],a:s}}const k={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},S={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",K
vendor: 2,532 bytes, line 2
2ocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let A;function P(t){A||(A=function(){const t={},e=Object.keys(S),i=Object.keys(k);let s,n,o,a,r;for(s=0;s<e.length;s++){for(a=r=e[s],n=0;n<i.length;n++)o=i[n],r=r.replace(o,k[o]);o=parseInt(S[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const D=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const O=t=>
2t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,C=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function T(t,e,i){if(t){let s=_(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=v(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=a(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=a(e.a),e}function R(t){return"r"===t.charAt(0)?function(t){const e=D.exec(t);let i,s,a,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?o(t):n(255*t,0,255)}return i=+e[1],s=+e[3],a=+e[5],i=255&(e[2]?o(i):n(i,0,255)),s=255&(e[4]?o(s):n(s,0,255)),a=255&(e[6]?o(a):n(a,0,255)),{r:i,g:s,b:a,a:r}}}(t):w(t)}class I{constructor(t){if(t instanceof I)return t;const e=typeof t;let i;"object"===e?i=L(t):"string"===e&&(i=function(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*l[t[1]],g:255&17*l[t[2]],b:255&17*l[t[3]],a:5===i?17*l[t[4]]:255}:7!==i&&9!==i||(e={r:l[t[1]]<<4|l[t[2]],g:l[t[3]]<<4|l[t[4]],b:l[t[5]]<<4|l[t[6]],a:9===i?l[t[7]]<<4|l[t[8]]:255})),e}(t)||P(t)||R(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=r(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(r(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0;var t}hexString(){return this._valid?g(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=_(t),i=e[0],s=h(e[1]),n=h(e[2]);return t.a<255?"hsla(".concat(i,", ").concat(s,"%, ").concat(n,"%, ").concat(r(t.a),")"):"hsl(".concat(i,", ").concat(s,"%, ").concat(n,"%)")}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,h=((a*r===-1?a:(a+r)/(1+a*r))+1)/2;n=1-h,i.r=255&h*i.r+n*s.r+.5,i.g=255&h*i.g+n*s.g+.5,i.b=255&h*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=C(r(t.r)),n=C(r(t.g)),o=C(r(t.b));return{r:a(O(s+i*(C(r(e.r))-s))),g:a(O(n+i*(C(r(e.g))-n))),b:a(O(o+i*(C(r(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new I(this.rgb)}alpha(t){return this._rgb.a=a(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=_(t);i[0]=M(i[0]+e),i=v(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function F(){}const z=(()=>{let t=0;return()=>t++})();function V(t){return null===t||"undefined"===typeof t}function N(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function B(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function W(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return W(t)?t:e}function H(t,e){return"undefined"===typeof t?e:t}const Y=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,$=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function U(t,e,i){if(t&&"function"===typeof t.call)return t.apply(i,e)}function X(t,e,i,s){let n,o,a;if(N(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<o;n++)e.call(i,t[n],n);else if(B(t))for(a=Object.keys(t),o=a.length,n=0;n<o;n++)e.call(i,t[a[n]],a[n])}function Q(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function q(t){if(N(t))return t.map(q);if(B(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=q(t[i[n]]);return e}return t}function K(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function G(t,e,i,s){if(!K(t))return;const n=e[t],o=i[t];B(n)&&B(o)?Z(n,o,s):e[t]=q(o)}
vendor: 5,587 bytes, line 2
2function Z(t,e,i){const s=N(e)?e:[e],n=s.length;if(!B(t))return t;const o=(i=i||{}).merger||G;let a;for(let r=0;r<n;++r){if(a=s[r],!B(a))continue;const e=Object.keys(a);for(let s=0,n=e.length;s<n;++s)o(e[s],t,a,i)}return t}function J(t,e){return Z(t,e,{merger:tt})}function tt(t,e,i){if(!K(t))return;const s=e[t],n=i[t];B(s)&&B(n)?J(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=q(n))}const et={"":t=>t,x:t=>t.x,y:t=>t.y};function it(t,e){const i=et[e]||(et[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const n of e)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function st(t){return t.charAt(0).toUpperCase()+t.slice(1)}const nt=t=>"undefined"!==typeof t,ot=t=>"function"===typeof t,at=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function rt(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const ht=Math.PI,lt=2*ht,ct=lt+ht,dt=Number.POSITIVE_INFINITY,ut=ht/180,ft=ht/2,gt=ht/4,pt=2*ht/3,mt=Math.log10,bt=Math.sign;function xt(t,e,i){return Math.abs(t-e)<i}function _t(t){const e=Math.round(t);t=xt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(mt(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function yt(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s===0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function vt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Mt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function wt(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function kt(t){return t*(ht/180)}function St(t){return t*(180/ht)}function At(t){if(!W(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Pt(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*ht&&(o+=lt),{angle:o,distance:n}}function Dt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ot(t,e){return(t-e+ct)%lt-ht}function Ct(t){return(t%lt+lt)%lt}function Tt(t,e,i,s){const n=Ct(t),o=Ct(e),a=Ct(i),r=Ct(o-n),h=Ct(a-n),l=Ct(n-o),c=Ct(n-a);return n===o||n===a||s&&o===a||r>h&&l<c}function Et(t,e,i){return Math.max(e,Math.min(i,t))}function Lt(t){return Et(t,-32768,32767)}function Rt(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function It(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const Ft=(t,e,i,s)=>It(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),zt=(t,e,i)=>It(t,i,(s=>t[s][e]>=i));function Vt(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const Nt=["push","pop","shift","splice","unshift"];function Bt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Nt.forEach((e=>{const i="_onData"+st(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];const a=s.apply(this,n);return t._chartjs.listeners.forEach((t=>{"function"===typeof t[i]&&t[i](...n)})),a}})})))}function Wt(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Nt.forEach((e=>{delete t[e]})),delete t._chartjs)}function jt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ht="undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame;function Yt(t,e){let i=[],s=!1;return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];i=o,s||(s=!0,Ht.call(window,(()=>{s=!1,t.apply(e,i)})))}}function $t(t,e){let i;return function(){for(var s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}const Ut=t=>"start"===t?"left":"end"===t?"right":"center",Xt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,Qt=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function qt(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,h=a.axis,{min:l,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Et(Math.min(Ft(r,h,l).lo,i?s:Ft(e,h,a.getPixelForValue(l)).lo),0,s-1)),o=u?Et(Math.max(Ft(r,a.axis,c,!0).hi+1,i?0:Ft(e,h,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function Kt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const Gt=t=>0===t||1===t,Zt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*lt/i),Jt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*lt/i)+1,te={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ft),easeOutSine:t=>Math.sin(t*ft),easeInOutSine:t=>-.5*(Math.cos(ht*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>
vendor: 3,280 bytes, line 2
2Gt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Gt(t)?t:Zt(t,.075,.3),easeOutElastic:t=>Gt(t)?t:Jt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Gt(t)?t:t<.5?.5*Zt(2*t,e,.45):.5+.5*Jt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-te.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*te.easeInBounce(2*t):.5*te.easeOutBounce(2*t-1)+.5};function ee(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ie(t){return ee(t)?t:new I(t)}function se(t){return ee(t)?t:new I(t).saturate(.5).darken(.1).hexString()}const ne=["x","y","borderWidth","radius","tension"],oe=["color","borderColor","backgroundColor"];const ae=new Map;function re(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=ae.get(i);return s||(s=new Intl.NumberFormat(t,e),ae.set(i,s)),s}(e,i).format(t)}const he={values:t=>N(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=mt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),re(t,s,h)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(mt(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?he.numeric.call(this,t,e,i):""}};var le={formatters:he};const ce=Object.create(null),de=Object.create(null);function ue(t,e){if(!e)return t;const i=e.split(".");for(let s=0,n=i.length;s<n;++s){const e=i[s];t=t[e]||(t[e]=Object.create(null))}return t}function fe(t,e,i){return"string"===typeof e?Z(ue(t,e),i):Z(ue(t,""),e)}class ge{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>se(e.backgroundColor),this.hoverBorderColor=(t,e)=>se(e.borderColor),this.hoverColor=(t,e)=>se(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
vendor: 4,283 bytes, line 2
2,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return fe(this,t,e)}get(t){return ue(this,t)}describe(t,e){return fe(de,t,e)}override(t,e){return fe(ce,t,e)}route(t,e,i,s){const n=ue(this,t),o=ue(this,i),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[s];return B(t)?Object.assign({},e,t):H(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var pe=new ge({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:oe},numbers:{type:"number",properties:ne}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:le.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function me(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function be(t,e,i,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(n=s.data={},o=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let a=0;const r=i.length;let h,l,c,d,u;for(h=0;h<r;h++)if(d=i[h],void 0===d||null===d||N(d)){if(N(d))for(l=0,c=d.length;l<c;l++)u=d[l],void 0===u||null===u||N(u)||(a=me(t,n,o,a,u))}else a=me(t,n,o,a,d);t.restore();const f=o.length/2;if(f>i.length){for(h=0;h<f;h++)delete n[o[h]];o.splice(0,f)}return a}function xe(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function _e(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ye(t,e,i,s){ve(t,e,i,s,null)}function ve(t,e,i,s,n){let o,a,r,h,l,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*ut;if(f&&"object"===typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,lt):t.arc(i,s,p,0,lt),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=pt,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=pt,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":l=.516*p,h=p-l,a=Math.cos(m+gt)*h,d=Math.cos(m+gt)*(n?n/2-l:h),r=Math.sin(m+gt)*h,u=Math.sin(m+gt)*(n?n/2-l:h),t.arc(i-d,s-r,l,m-ht,m-ft),t.arc(i+u,s-a,l,m-ft,m),t.arc(i+d,s+r,l,m,m+ft),t.arc(i-u,s+a,l,m+ft,m+ht),t.closePath();break;
vendor: 5,058 bytes, line 2
2case"rect":if(!g){h=Math.SQRT1_2*p,c=n?n/2:h,t.rect(i-c,s-h,2*c,2*h);break}m+=gt;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-a),t.lineTo(i+d,s+r),t.lineTo(i-u,s+a),t.closePath();break;case"crossRot":m+=gt;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a),m+=gt,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-a,s-r),t.lineTo(i+a,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Me(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function we(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ke(t){t.restore()}function Se(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!==!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Ae(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function Pe(t,e,i,s,n){if(n.strikethrough||n.underline){const o=t.measureText(s),a=e-o.actualBoundingBoxLeft,r=e+o.actualBoundingBoxRight,h=i-o.actualBoundingBoxAscent,l=i+o.actualBoundingBoxDescent,c=n.strikethrough?(h+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(a,c),t.lineTo(r,c),t.stroke()}}function De(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Oe(t,e,i,s,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=N(e)?e:[e],r=o.strokeWidth>0&&""!==o.strokeColor;let h,l;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),V(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;h<a.length;++h)l=a[h],o.backdrop&&De(t,o.backdrop),r&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),V(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(l,i,s,o.maxWidth)),t.fillText(l,i,s,o.maxWidth),Pe(t,i,s,l,o),s+=Number(n.lineHeight);t.restore()}function Ce(t,e){const{x:i,y:s,w:n,h:o,radius:a}=e;t.arc(i+a.topLeft,s+a.topLeft,a.topLeft,1.5*ht,ht,!0),t.lineTo(i,s+o-a.bottomLeft),t.arc(i+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,ht,ft,!0),t.lineTo(i+n-a.bottomRight,s+o),t.arc(i+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,ft,0,!0),t.lineTo(i+n,s+a.topRight),t.arc(i+n-a.topRight,s+a.topRight,a.topRight,0,-ft,!0),t.lineTo(i+a.topLeft,s)}const Te=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ee=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Le(t,e){const i=(""+t).match(Te);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Re=t=>+t||0;function Ie(t,e){const i={},s=B(e),n=s?Object.keys(e):e,o=B(t)?s?i=>H(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of n)i[a]=Re(o(a));return i}function Fe(t){return Ie(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ze(t){return Ie(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ve(t){const e=Fe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ne(t,e){t=t||{},e=e||pe.font;let i=H(t.size,e.size);"string"===typeof i&&(i=parseInt(i,10));let s=H(t.style,e.style);s&&!(""+s).match(Ee)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:H(t.family,e.family),lineHeight:Le(H(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:H(t.weight,e.weight),string:""};return n.string=function(t){return!t||V(t.size)||V(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Be(t,e,i,s){let n,o,a,r=!0;for(n=0,o=t.length;n<o;++n)if(a=t[n],void 0!==a&&(void 0!==e&&"function"===typeof a&&(a=a(e),r=!1),void 0!==i&&N(a)&&(a=a[i%a.length],r=!1),void 0!==a))return s&&!r&&(s.cacheable=!1),a}function We(t,e,i){const{min:s,max:n}=t,o=$(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function je(t,e){return Object.assign(Object.create(t),e)}function He(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0];const n=(arguments.length>2?arguments[2]:void 0)||t;"undefined"===typeof i&&(i=ti("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:s,override:s=>
vendor: 4,094 bytes, line 2
2He([s,...t],e,n,i)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Qe(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=ti(Ue(o,t),i),"undefined"!==typeof n)return Xe(t,n)?Ze(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ei(t).includes(e),ownKeys:t=>ei(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Ye(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:$e(t,s),setContext:e=>Ye(t,e,i,s),override:n=>Ye(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Qe(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=t;let r=s[e];ot(r)&&a.isScriptable(e)&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||s);r.delete(t),Xe(t,h)&&(h=Ze(n._scopes,n,t,h));return h}(e,r,t,i));N(r)&&r.length&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=i;if("undefined"!==typeof o.index&&s(t))return e[o.index%e.length];if(B(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=Ze(s,n,t,h);e.push(Ye(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Xe(e,r)&&(r=Ye(r,n,o&&o[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function $e(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:ot(i)?i:()=>i,isIndexable:ot(s)?s:()=>s}}const Ue=(t,e)=>t?t+st(e):e,Xe=(t,e)=>B(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Qe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function qe(t,e,i){return ot(t)?t(e,i):t}const Ke=(t,e)=>!0===t?e:"string"===typeof t?it(e,t):void 0;function Ge(t,e,i,s,n){for(const o of e){const e=Ke(i,o);if(e){t.add(e);const o=qe(e._fallback,i,n);if("undefined"!==typeof o&&o!==i&&o!==s)return o}else if(!1===e&&"undefined"!==typeof s&&i!==s)return null}return!1}function Ze(t,e,i,s){const n=e._rootScopes,o=qe(e._fallback,i,s),a=[...t,...n],r=new Set;r.add(s);let h=Je(r,a,i,o||i,s);return null!==h&&(("undefined"===typeof o||o===i||(h=Je(r,a,o,h,s),null!==h))&&He(Array.from(r),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(N(n)&&B(i))return i;return n||{}}(e,i,s))))}function Je(t,e,i,s,n){for(;i;)i=Ge(t,e,i,s,n);return i}function ti(t,e){for(const i of e){if(!i)continue;const e=i[t];if("undefined"!==typeof e)return e}}function ei(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function ii(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,h,l,c;for(r=0,h=s;r<h;++r)l=r+i,c=e[l],a[r]={r:n.parse(it(c,o),l)};return a}const si=Number.EPSILON||1e-14,ni=(t,e)=>e<t.length&&!t[e].skip&&t[e],oi=t=>"x"===t?"y":"x";function ai(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=Dt(o,n),h=Dt(a,o);let l=r/(r+h),c=h/(r+h);l=isNaN(l)?0:l,c=isNaN(c)?0:c;const d=s*l,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function ri(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const i=oi(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,h,l=ni(t,0);for(a=0;a<s;++a)if(r=h,h=l,l=ni(t,a+1),h){if(l){const t=l[e]-h[e];n[a]=0!==t?(l[i]-h[i])/t:0}
2o[a]=r?l?bt(n[a-1])!==bt(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}!function(t,e,i){const s=t.length;let n,o,a,r,h,l=ni(t,0);for(let c=0;c<s-1;++c)h=l,l=ni(t,c+1),h&&l&&(xt(e[c],0,si)?i[c]=i[c+1]=0:(n=i[c]/e[c],o=i[c+1]/e[c],r=Math.pow(n,2)+Math.pow(o,2),r<=9||(a=3/Math.sqrt(r),i[c]=n*a*e[c],i[c+1]=o*a*e[c])))}(t,n,o),function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const s=oi(i),n=t.length;let o,a,r,h=ni(t,0);for(let l=0;l<n;++l){if(a=r,r=h,h=ni(t,l+1),!r)continue;const n=r[i],c=r[s];a&&(o=(n-a[i])/3,r["cp1".concat(i)]=n-o,r["cp1".concat(s)]=c-o*e[l]),h&&(o=(h[i]-n)/3,r["cp2".concat(i)]=n+o,r["cp2".concat(s)]=c+o*e[l])}}(t,o,e)}function hi(t,e,i){return Math.max(Math.min(t,i),e)}function li(t,e,i,s,n){let o,a,r,h;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)ri(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)r=t[o],h=ai(i,r,t[Math.min(o+1,a-(s?0:1))%a],e.tension),r.cp1x=h.previous.x,r.cp1y=h.previous.y,r.cp2x=h.next.x,r.cp2y=h.next.y,i=r}e.capBezierPoints&&function(t,e){let i,s,n,o,a,r=Me(t[0],e);for(i=0,s=t.length;i<s;++i)a=o,o=r,r=i<s-1&&Me(t[i+1],e),o&&(n=t[i],a&&(n.cp1x=hi(n.cp1x,e.left,e.right),n.cp1y=hi(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=hi(n.cp2x,e.left,e.right),n.cp2y=hi(n.cp2y,e.top,e.bottom)))}(t,i)}function ci(){return"undefined"!==typeof window&&"undefined"!==typeof document}function di(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ui(t,e,i){let s;return"string"===typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const fi=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const gi=["top","right","bottom","left"];function pi(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=gi[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const mi=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function bi(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=fi(i),o="border-box"===n.boxSizing,a=pi(n,"padding"),r=pi(n,"border","width"),{x:h,y:l,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,h=!1;if(mi(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,h=!0}return{x:a,y:r,box:h}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((h-d)/f*i.width/s),y:Math.round((l-u)/g*i.height/s)}}const xi=t=>Math.round(10*t)/10;function _i(t,e,i,s){const n=fi(t),o=pi(n,"margin"),a=ui(n.maxWidth,t,"clientWidth")||dt,r=ui(n.maxHeight,t,"clientHeight")||dt,h=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=t&&di(t);if(o){const t=o.getBoundingClientRect(),a=fi(o),r=pi(a,"border","width"),h=pi(a,"padding");e=t.width-h.width-r.width,i=t.height-h.height-r.height,s=ui(a.maxWidth,o,"clientWidth"),n=ui(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||dt,maxHeight:n||dt}}(t,e,i);let{width:l,height:c}=h;if("content-box"===n.boxSizing){const t=pi(n,"border","width"),e=pi(n,"padding");l-=e.width+t.width,c-=e.height+t.height}l=Math.max(0,l-o.width),c=Math.max(0,s?l/s:c-o.height),l=xi(Math.min(l,a,h.maxWidth)),c=xi(Math.min(c,r,h.maxHeight)),l&&!c&&(c=xi(l/2));return(void 0!==e||void 0!==i)&&s&&h.height&&c>h.height&&(c=h.height,l=xi(Math.floor(c*s))),{width:l,height:c}}function yi(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height="".concat(t.height,"px"),a.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const vi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ci()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Mi(t,e){const i=function(t,e){return fi(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}
2function wi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ki(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function Si(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=wi(t,n,i),r=wi(n,o,i),h=wi(o,e,i),l=wi(a,r,i),c=wi(r,h,i);return wi(l,c,i)}const Ai=function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}},Pi=function(){return{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}};function Di(t,e,i){return t?Ai(e,i):Pi()}function Oi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Ci(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ti(t){return"angle"===t?{between:Tt,compare:Ot,normalize:Ct}:{between:Rt,compare:(t,e)=>t-e,normalize:t=>t}}function Ei(t){let{start:e,end:i,count:s,loop:n,style:o}=t;return{start:e%s,end:i%s,loop:n&&(i-e+1)%s===0,style:o}}function Li(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:h,normalize:l}=Ti(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=Ti(s),h=e.length;let l,c,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,l=0,c=h;l<c&&a(r(e[d%h][s]),n,o);++l)d--,u--;d%=h,u%=h}return u<d&&(u+=h),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,b,x=!1,_=null;const y=()=>x||h(n,b,p)&&0!==r(n,b),v=()=>!x||0===r(o,p)||h(o,b,p);for(let M=c,w=c;M<=d;++M)m=e[M%a],m.skip||(p=l(m[s]),p!==b&&(x=h(p,n,o),null===_&&y()&&(_=0===r(p,n)?M:w),null!==_&&v()&&(g.push(Ei({start:_,end:M,loop:u,count:a,style:f})),_=null),w=M,b=p));return null!==_&&g.push(Ei({start:_,end:d,loop:u,count:a,style:f})),g}function Ri(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const o=Li(s[n],t.points,e);o.length&&i.push(...o)}return i}function Ii(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(o+=n);o>n&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);if(!0===s)return Fi(t,[{start:a,end:r,loop:o}],i,e);return Fi(t,function(t,e,i,s){const n=t.length,o=[];let a,r=e,h=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?h.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,h.skip&&(e=a)),h=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r<a?r+n:r,!!t._fullLoop&&0===a&&r===n-1),i,e)}function Fi(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){const n=t._chart.getContext(),o=zi(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,h=i.length,l=[];let c=o,d=e[0].start,u=d;function f(t,e,s,n){const o=r?-1:1;if(t!==e){for(t+=h;i[t%h].skip;)t-=o;for(;i[e%h].skip;)e+=o;t%h!==e%h&&(l.push({start:t%h,end:e%h,loop:s,style:n}),c=n,d=e%h)}}for(const g of e){d=r?d:g.start;let t,e=i[d%h];for(u=d+1;u<=g.end;u++){const o=i[u%h];t=zi(s.setContext(je(n,{type:"segment",p0:e,p1:o,p0DataIndex:(u-1)%h,p1DataIndex:u%h,datasetIndex:a}))),Vi(t,c)&&f(d,u-1,g.loop,c),e=o,c=t}d<u-1&&f(d,u-1,g.loop,c)}return l}(t,e,i,s):e}function zi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Vi(t,e){if(!e)return!1;const i=[],s=function(t,e){return ee(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,s)!==JSON.stringify(e,s)}},91668:(t,e,i)=>{i.d(e,{P:()=>o});var s=i(39119),n=i(51019);function o(t,e){const i=(0,s.a)(t);if(isNaN(e))return(0,n.w)(t,NaN);if(!e)return i;const o=i.getDate(),a=(0,n.w)(t,i.getTime());a.setMonth(i.getMonth()+e+1,0);return o>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),o),i)}},28007:(t,e,i)=>{i.d(e,{e:()=>n});var s=i(56036);function n(t,e){return(0,s.f)(t,-e)}},2907:(t,e,i)=>{i.d(e,{a:()=>n});var s=i(91668);function n(t,e){return(0,s.P)(t,-e)}},6058:(t,e,i)=>{i.d(e,{nu:()=>g,yP:()=>f});var s=i(65043),n=i(76361);const o="label";function a(t,e){"function"===typeof t?t(e):t&&(t.current=e)}function r(t,e){t.labels=e}function h(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;const s=[];t.datasets=e.map((e=>{const n=t.datasets.find((t=>t[i]===e[i]));return n&&e.data&&!s.includes(n)?(s.push(n),Object.assign(n,e),n):{...e}}))}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const i={labels:[],datasets:[]};return r(i,t.labels),h(i,t.datasets,e),i}function c(t,e){const{height:i=150,width:o=300,redraw:c=!1,datasetIdKey:d,type:u,data:f,options:g,plugins:p=[],fallbackContent:m,updateMode:b,...x}=t,_=(0,s.useRef)(null),y=(0,s.useRef)(),v=()=>
2{_.current&&(y.current=new n.t1(_.current,{type:u,data:l(f,d),options:g&&{...g},plugins:p}),a(e,y.current))},M=()=>{a(e,null),y.current&&(y.current.destroy(),y.current=null)};return(0,s.useEffect)((()=>{!c&&y.current&&g&&function(t,e){const i=t.options;i&&e&&Object.assign(i,e)}(y.current,g)}),[c,g]),(0,s.useEffect)((()=>{!c&&y.current&&r(y.current.config.data,f.labels)}),[c,f.labels]),(0,s.useEffect)((()=>{!c&&y.current&&f.datasets&&h(y.current.config.data,f.datasets,d)}),[c,f.datasets]),(0,s.useEffect)((()=>{y.current&&(c?(M(),setTimeout(v)):y.current.update(b))}),[c,g,f.labels,f.datasets,b]),(0,s.useEffect)((()=>{y.current&&(M(),setTimeout(v))}),[u]),(0,s.useEffect)((()=>(v(),()=>M())),[]),s.createElement("canvas",Object.assign({ref:_,role:"img",height:i,width:o},x),m)}const d=(0,s.forwardRef)(c);function u(t,e){return n.t1.register(e),(0,s.forwardRef)(((e,i)=>s.createElement(d,Object.assign({},e,{ref:i,type:t}))))}const f=u("bar",n.A6),g=u("doughnut",n.ju)}}]); 3//# sourceMappingURL=7877.411d5619.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.