1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1257],{55818:function(t,e,i){i.d(e,{$o:function(){return ti},Bg:function(){return ts},CV:function(){return F},Ci:function(){return tC},DK:function(){return eH},De:function(){return eI},Dx:function(){return eB},FB:function(){return iv},FK:function(){return u},Gr:function(){return e0},Gu:function(){return eA},IQ:function(){return H},N0:function(){return E},Q7:function(){return k},QL:function(){return ix},RM:function(){return ib},Rm:function(){return eu},ST:function(){return T},TJ:function(){return ta},U4:function(){return $},WV:function(){return ii},WY:function(){return ey},W_:function(){return t_},Xi:function(){return R},ZL:function(){return ec},cZ:function(){return tx},f$:function(){return e7},f4:function(){return tb},fw:function(){return c},g9:function(){return V},ho:function(){return I},i_:function(){return tE},jI:function(){return A},jn:function(){return ea},kL:function(){return t1},l7:function(){return io},od:function(){return er},qi:function(){return t6},tt:function(){return z},u:function(){return eJ},uw:function(){return e5},vn:function(){return L},w1:function(){return h},wL:function(){return eb},zX:function(){return i_}});var a=i(21883),s=i(8706);function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function n(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach(function(e){(0,a.Z)(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}class o{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,a){var s=e.listeners[a],r=e.duration;s.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=s.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach((i,a)=>{if(i.running&&i.items.length){for(var s,r=i.items,n=r.length-1,o=!1;n>=0;--n)(s=r[n])._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),o=!0):(r[n]=r[r.length-1],r.pop());o&&(a.draw(),this._notify(a,i,t,"progress")),r.length||(i.running=!1,this._notify(a,i,t,"complete"),i.initial=!1),e+=r.length}}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){var e=this._charts,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){var 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;var e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){var e=this._charts.get(t);if(e&&e.items.length){for(var i=e.items,a=i.length-1;a>=0;--a)i[a].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}remove(t){return this._charts.delete(t)}}var h=new o,l="transparent",d={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){var a=(0,s.c)(t||l),r=a.valid&&(0,s.c)(e||l);return r&&r.valid?r.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class c{constructor(t,e,i,a){var r=e[i];a=(0,s.a)([t.to,a,r,t.from]);var n=(0,s.a)([t.from,r,a]);this._active=!0,this._fn=t.fn||d[t.type||typeof n],this._easing=s.e[t.easing]||s.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=n,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);var a=this._target[this._prop],r=i-this._start,n=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=(0,s.a)([t.to,e,a,t.from]),this._from=(0,s.a)([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){var e,i=t-this._start,a=this._duration,s=this._prop,r=this._from,n=this._loop,o=this._to;
1if(this._active=r!==o&&(n||i<a),!this._active){this._target[s]=o,this._notify(!0);return}if(i<0){this._target[s]=r;return}e=i/a%2,e=n&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[s]=this._fn(r,o,e)}wait(){var t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){for(var e=t?"res":"rej",i=this._promises||[],a=0;a<i.length;a++)i[a][e]()}}class u{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if((0,s.i)(t)){var e=Object.keys(s.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(a=>{var r=t[a];if((0,s.i)(r)){var n={};for(var o of e)n[o]=r[o];((0,s.b)(r.properties)&&r.properties||[a]).forEach(t=>{t!==a&&i.has(t)||i.set(t,n)})}})}}_animateOptions(t,e){var i=e.options,a=function(t,e){if(e){var i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}}(t,i);if(!a)return[];var s=this._createAnimations(a,i);return i.$shared&&(function(t,e){for(var i=[],a=Object.keys(e),s=0;s<a.length;s++){var r=t[a[s]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)})(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,e){var i,a=this._properties,s=[],r=t.$animations||(t.$animations={}),n=Object.keys(e),o=Date.now();for(i=n.length-1;i>=0;--i){var h=n[i];if("$"!==h.charAt(0)){if("options"===h){s.push(...this._animateOptions(t,e));continue}var l=e[h],d=r[h],u=a.get(h);if(d){if(u&&d.active()){d.update(u,l,o);continue}d.cancel()}if(!u||!u.duration){t[h]=l;continue}r[h]=d=new c(u,t,h,l),s.push(d)}}return s}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}var i=this._createAnimations(t,e);if(i.length)return h.add(this._chart,i),!0}}function g(t,e){var i=t&&t.options||{},a=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:a?r:s,end:a?s:r}}function p(t,e){var i,a,s=[],r=t._getSortedDatasetMetas(e);for(i=0,a=r.length;i<a;++i)s.push(r[i].index);return s}function f(t,e,i){var a,r,n,o,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,d="single"===h.mode;if(null!==e){for(a=0,r=l.length;a<r;++a){if((n=+l[a])===i){if(h.all)continue;break}o=t.values[n],(0,s.g)(o)&&(d||0===e||(0,s.s)(e)===(0,s.s)(o))&&(e+=o)}return e}}function v(t,e){var i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function m(t,e,i,a){for(var s of e.getMatchingVisibleMetas(a).reverse()){var r=t[s.index];if(i&&r>0||!i&&r<0)return s.index}return null}function b(t,e){for(var i,{chart:a,_cachedMeta:s}=t,r=a._stacks||(a._stacks={}),{iScale:n,vScale:o,index:h}=s,l=n.axis,d=o.axis,c="".concat(n.id,".").concat(o.id,".").concat(s.stack||s.type),u=e.length,g=0;g<u;++g){var p=e[g],{[l]:f,[d]:v}=p;(i=(p._stacks||(p._stacks={}))[d]=function(t,e,i){var a=t[e]||(t[e]={});return a[i]||(a[i]={})}(r,c,f))[h]=v,i._top=m(i,o,!0,s.type),i._bottom=m(i,o,!1,s.type),(i._visualValues||(i._visualValues={}))[h]=v}}function x(t,e){var i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function _(t,e){var i=t.controller.index,a=t.vScale&&t.vScale.axis;if(a)for(var s of e=e||t._parsed){var r=s._stacks;if(!r||void 0===r[a]||void 0===r[a][i])return;delete r[a][i],void 0!==r[a]._visualValues&&void 0!==r[a]._visualValues[i]&&delete r[a]._visualValues[i]}}var y=t=>"reset"===t||"none"===t,M=(t,e)=>e?t:Object.assign({},t),w=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:p(i,!0),values:null};class k{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(){var t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=v(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(){var t=this.chart,e=this._cachedMeta,i=this.getDataset(),a=(t,e,i,a)=>"x"===t?e:"r"===t?a:i,r=e.xAxisID=(0,s.v)(i.xAxisID,x(t,"x")),n=e.yAxisID=(0,s.v)(i.yAxisID,x(t,"y")),o=e.rAxisID=(0,s.v)(i.rAxisID,x(t,"r")),h=e.indexAxis,l=e.iAxisID=a(h,r,n,o),d=e.vAxisID=a(h,n,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(o),e.
1iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){var t=this._cachedMeta;this._data&&(0,s.u)(this._data,this),t._stacked&&_(t)}_dataCheck(){var t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,s.i)(e)){var a=this._cachedMeta;this._data=function(t,e){var i,a,s,{iScale:r,vScale:n}=e,o="x"===r.axis?"x":"y",h="x"===n.axis?"x":"y",l=Object.keys(t),d=Array(l.length);for(i=0,a=l.length;i<a;++i)s=l[i],d[i]={[o]:s,[h]:t[s]};return d}(e,a)}else if(i!==e){if(i){(0,s.u)(i,this);var r=this._cachedMeta;_(r),r._parsed=[]}e&&Object.isExtensible(e)&&(0,s.l)(e,this),this._syncList=[],this._data=e}}addElements(){var t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){var e=this._cachedMeta,i=this.getDataset(),a=!1;this._dataCheck();var s=e._stacked;e._stacked=v(e.vScale,e),e.stack!==i.stack&&(a=!0,_(e),e.stack=i.stack),this._resyncElements(t),(a||s!==e._stacked)&&b(this,e._parsed)}configure(){var 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){var i,a,r,{_cachedMeta:n,_data:o}=this,{iScale:h,_stacked:l}=n,d=h.axis,c=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=o,n._sorted=!0,r=o;else{r=(0,s.b)(o[t])?this.parseArrayData(n,o,t,e):(0,s.i)(o[t])?this.parseObjectData(n,o,t,e):this.parsePrimitiveData(n,o,t,e);var g=()=>null===a[d]||u&&a[d]<u[d];for(i=0;i<e;++i)n._parsed[i+t]=a=r[i],c&&(g()&&(c=!1),u=a);n._sorted=c}l&&b(this,r)}parsePrimitiveData(t,e,i,a){var s,r,{iScale:n,vScale:o}=t,h=n.axis,l=o.axis,d=n.getLabels(),c=n===o,u=Array(a);for(s=0;s<a;++s)r=s+i,u[s]={[h]:c||n.parse(d[r],r),[l]:o.parse(e[r],r)};return u}parseArrayData(t,e,i,a){var s,r,n,{xScale:o,yScale:h}=t,l=Array(a);for(s=0;s<a;++s)n=e[r=s+i],l[s]={x:o.parse(n[0],r),y:h.parse(n[1],r)};return l}parseObjectData(t,e,i,a){var r,n,o,{xScale:h,yScale:l}=t,{xAxisKey:d="x",yAxisKey:c="y"}=this._parsing,u=Array(a);for(r=0;r<a;++r)o=e[n=r+i],u[r]={x:h.parse((0,s.f)(o,d),n),y:l.parse((0,s.f)(o,c),n)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){var a=this.chart,s=this._cachedMeta,r=e[t.axis];return f({keys:p(a,!0),values:e._stacks[t.axis]._visualValues},r,s.index,{mode:i})}updateRangeFromParsed(t,e,i,a){var s=i[e.axis],r=null===s?NaN:s,n=a&&i._stacks[e.axis];a&&n&&(a.values=n,r=f(a,s,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){var i,a,r=this._cachedMeta,n=r._parsed,o=r._sorted&&t===r.iScale,h=n.length,l=this._getOtherScale(t),d=w(e,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:g}=function(t){var{min:e,max:i,minDefined:a,maxDefined:s}=t.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(l);function p(){var e=(a=n[i])[l.axis];return!(0,s.g)(a[t.axis])||u>e||g<e}for(i=0;i<h&&(p()||(this.updateRangeFromParsed(c,t,a,d),!o));++i);if(o){for(i=h-1;i>=0;--i)if(!p()){this.updateRangeFromParsed(c,t,a,d);break}}return c}getAllParsedValues(t){var e,i,a,r=this._cachedMeta._parsed,n=[];for(e=0,i=r.length;e<i;++e)a=r[e][t.axis],(0,s.g)(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){var e=this._cachedMeta,i=e.iScale,a=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(t){var e,i,a,r,n,o=this._cachedMeta;this.update(t||"default"),o._clip=(e=(0,s.v)(this.options.clip,function(t,e,i){if(!1===i)return!1;var a=g(t,i),s=g(e,i);return{top:s.end,right:a.end,bottom:s.start,left:a.start}}(o.xScale,o.yScale,this.getMaxOverflow())),(0,s.i)(e)?(i=e.top,a=e.right,r=e.bottom,n=e.left):i=a=r=n=e,{top:i,right:a,bottom:r,left:n,disabled:!1===e})}update(t){}draw(){var t,e=this._ctx,i=this.chart,a=this._cachedMeta,s=a.data||[],r=i.chartArea,n=[],o=this._drawStart||0,h=this._drawCount||s.length-o,l=this.options.drawActiveElementsOnTop;for(a.dataset&&a.dataset.draw(e,r,o,h),t=o;t<o+h;++t){var d=s[t];d.hidden||(d.active&&l?n.push(d):d.draw(e,r))}for(t=0;t<n.length;++t)n[t].draw(e,r)}getStyle(t,e){var i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){var a,r,n,o=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){var h,l=this._cachedMeta.data[t];(n=l.$context||(l.$context=(h=this.getContext(),(0,s.j)(h,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:l,index:t,mode:"default",type:"data"})))).parsed=this.getParsed(t),n.raw=o.data[t],n.index=n.dataIndex=t}else(n=this.$context||(this.$context=(a=this.chart.getContext(),r=this.index,(0,s.j)(a,{active:!1,dataset:void 0,datasetIndex:r,index:r,mode:"default",type:"dataset"})))).dataset=o,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2?arguments[2]:void 0,a="active"===e,r=this._cachedDataOpts,n=t+"-"+e,o=r[n],h=this.enableOptionSharing&&(0,s.h)(i);if(o)return M(o,h);var l=this.chart.config,d=l.datasetElementScopeKeys(this._type,t),c=l.getOptionScopes(this.getDataset(),d),u=Object.keys(s.d.elements[t]),g=l.resolveNamedOptions(c,u,()=>this.getContext(i,a,e),a?["".concat(t,"Hover"),"hover",t,""]:[t,""]);return g.$shared&&(g.$shared=h,r[n]=Object.freeze(M(g,h))),g}_resolveAnimations(t,e,i){var a,s=this.chart,r=this._cachedDataOpts,n="animation-".concat(e),o=r[n];if(o)return o;if(!1!==s.options.animation){var h=this.chart.config,l=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),l);a=h.createResolver(d,this.getContext(t,i,e))}var c=new u(s,a&&a.animations);return a&&a._cacheable&&(r[n]=Object.freeze(c)),c}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){var i=this.resolveDataElementOptions(t,e),a=this._sharedOptions,s=this.getSharedOptions(i),r=this.includeOptions(e,s)||s!==a;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:r}}updateElement(t,e,i,a){y(a)?Object.assign(t,i):this._resolveAnimations(e,a).update(t,i)}updateSharedOptions(t,e,i){t&&!y(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,a){t.active=a;var s=this.getStyle(e,a);
1this._resolveAnimations(e,i,a).update(t,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){var e=this._data,i=this._cachedMeta.data;for(var[a,s,r]of this._syncList)this[a](s,r);this._syncList=[];var n=i.length,o=e.length,h=Math.min(o,n);h&&this.parse(0,h),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e){var i,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=this._cachedMeta,r=s.data,n=t+e,o=t=>{for(t.length+=e,i=t.length-1;i>=n;i--)t[i]=t[i-e]};for(o(r),i=t;i<n;++i)r[i]=new this.dataElementType;this._parsing&&o(s._parsed),this.parse(t,e),a&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,a){}_removeElements(t,e){var i=this._cachedMeta;if(this._parsing){var a=i._parsed.splice(t,e);i._stacked&&_(i,a)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{var[e,i,a]=t;this[e](i,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){var 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]);var i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function D(t,e,i,a){if((0,s.b)(t)){var r,n,o,h,l,d;o=Math.min(r=i.parse(t[0],a),n=i.parse(t[1],a)),h=Math.max(r,n),l=o,d=h,Math.abs(o)>Math.abs(h)&&(l=h,d=o),e[i.axis]=d,e._custom={barStart:l,barEnd:d,start:r,end:n,min:o,max:h}}else e[i.axis]=i.parse(t,a);return e}function S(t,e,i,a){var s,r,n,o,h=t.iScale,l=t.vScale,d=h.getLabels(),c=h===l,u=[];for(s=i,r=i+a;s<r;++s)o=e[s],(n={})[h.axis]=c||h.parse(d[s],s),u.push(D(o,n,l,s));return u}function P(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function C(t,e,i,a){var s;return t=a?O(t=(s=t)===e?i:s===i?e:s,i,e):O(t,e,i)}function O(t,e,i){return"start"===t?e:"end"===t?i:t}(0,a.Z)(k,"defaults",{}),(0,a.Z)(k,"datasetElementType",null),(0,a.Z)(k,"dataElementType",null);class L extends k{parsePrimitiveData(t,e,i,a){return S(t,e,i,a)}parseArrayData(t,e,i,a){return S(t,e,i,a)}parseObjectData(t,e,i,a){var r,n,o,h,{iScale:l,vScale:d}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,g="x"===l.axis?c:u,p="x"===d.axis?c:u,f=[];for(r=i,n=i+a;r<n;++r)h=e[r],(o={})[l.axis]=l.parse((0,s.f)(h,g),r),f.push(D((0,s.f)(h,p),o,d,r));return f}updateRangeFromParsed(t,e,i,a){super.updateRangeFromParsed(t,e,i,a);var s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){var{iScale:e,vScale:i}=this._cachedMeta,a=this.getParsed(t),s=a._custom,r=P(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+e.getLabelForValue(a[e.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,a){for(var r="reset"===a,{index:n,_cachedMeta:{vScale:o}}=this,h=o.getBasePixel(),l=o.isHorizontal(),d=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,a),g=e;g<e+i;g++){var p=this.getParsed(g),f=r||(0,s.k)(p[o.axis])?{base:h,head:h}:this._calculateBarValuePixels(g),v=this._calculateBarIndexPixels(g,d),m=(p._stacks||{})[o.axis],b={horizontal:l,base:f.base,enableBorderRadius:!m||P(p._custom)||n===m._top||n===m._bottom,x:l?f.head:v.center,y:l?v.center:f.head,height:l?v.size:Math.abs(f.size),width:l?Math.abs(f.size):v.size};u&&(b.options=c||this.resolveDataElementOptions(g,t[g].active?"active":a));var x=b.options||t[g].options;!function(t,e,i,a){var s,r,n,o,h,l=e.borderSkipped,d={};if(!l){t.borderSkipped=d;return}if(!0===l){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}var{start:c,end:u,reverse:g,top:p,bottom:f}=(t.horizontal?(s=t.base>t.x,r="left",n="right"):(s=t.base<t.y,r="bottom",n="top"),s?(o="end",h="start"):(o="start",h="end"),{start:r,end:n,reverse:s,top:o,bottom:h});"middle"===l&&i&&(t.enableBorderRadius=!0,(i._top||0)===a?l=p:(i._bottom||0)===a?l=f:(d[C(f,c,u,g)]=!0,l=p)
1),d[C(l,c,u,g)]=!0,t.borderSkipped=d}(b,x,m,n),function(t,e,i){var{inflateAmount:a}=e;t.inflateAmount="auto"===a?1===i?.33:0:a}(b,x,d.ratio),this.updateElement(t[g],g,b,a)}}_getStacks(t,e){var{iScale:i}=this._cachedMeta,a=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),r=i.options.stacked,n=[],o=t=>{var i=t.controller.getParsed(e),a=i&&i[t.vScale.axis];if((0,s.k)(a)||isNaN(a))return!0};for(var h of a)if(!(void 0!==e&&o(h))&&((!1===r||-1===n.indexOf(h.stack)||void 0===r&&void 0===h.stack)&&n.push(h.stack),h.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){var a=this._getStacks(t,i),s=void 0!==e?a.indexOf(e):-1;return -1===s?a.length-1:s}_getRuler(){var t,e,i=this.options,a=this._cachedMeta,r=a.iScale,n=[];for(t=0,e=a.data.length;t<e;++t)n.push(r.getPixelForValue(this.getParsed(t)[r.axis],t));var o=i.barThickness;return{min:o||function(t){var e,i,a,r,n=t.iScale,o=function(t,e){if(!t._cache.$bar){for(var i=t.getMatchingVisibleMetas(e),a=[],r=0,n=i.length;r<n;r++)a=a.concat(i[r].controller.getAllParsedValues(t));t._cache.$bar=(0,s._)(a.sort((t,e)=>t-e))}return t._cache.$bar}(n,t.type),h=n._length,l=()=>{32767!==a&&-32768!==a&&((0,s.h)(r)&&(h=Math.min(h,Math.abs(a-r)||h)),r=a)};for(e=0,i=o.length;e<i;++e)a=n.getPixelForValue(o[e]),l();for(e=0,r=void 0,i=n.ticks.length;e<i;++e)a=n.getPixelForTick(e),l();return h}(a),pixels:n,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:i.grouped,ratio:o?1:i.categoryPercentage*i.barPercentage}}_calculateBarValuePixels(t){var e,i,{_cachedMeta:{vScale:a,_stacked:r,index:n},options:{base:o,minBarLength:h}}=this,l=o||0,d=this.getParsed(t),c=d._custom,u=P(c),g=d[a.axis],p=0,f=r?this.applyStack(a,d,r):g;f!==g&&(p=f-g,f=g),u&&(g=c.barStart,f=c.barEnd-c.barStart,0!==g&&(0,s.s)(g)!==(0,s.s)(c.barEnd)&&(p=0),p+=g);var v=(0,s.k)(o)||u?p:o,m=a.getPixelForValue(v);if(Math.abs(i=(e=this.chart.getDataVisibility(t)?a.getPixelForValue(p+f):m)-m)<h){i=(0!==(b=i)?(0,s.s)(b):(a.isHorizontal()?1:-1)*(a.min>=l?1:-1))*h,g===l&&(m-=i/2);var b,x=a.getPixelForDecimal(0),_=a.getPixelForDecimal(1);e=(m=Math.max(Math.min(m,Math.max(x,_)),Math.min(x,_)))+i,r&&!u&&(d._stacks[a.axis]._visualValues[n]=a.getValueForPixel(e)-a.getValueForPixel(m))}if(m===a.getPixelForValue(l)){var y=(0,s.s)(i)*a.getLineWidthForValue(l)/2;m+=y,i-=y}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){var i,a,r=e.scale,n=this.options,o=n.skipNull,h=(0,s.v)(n.maxBarThickness,1/0);if(e.grouped){var l,d,c,u,g,p,f,v,m,b=o?this._getStackCount(t):e.stackCount,x="flex"===n.barThickness?(d=(l=e.pixels)[t],c=t>0?l[t-1]:null,u=t<l.length-1?l[t+1]:null,g=n.categoryPercentage,null===c&&(c=d-(null===u?e.end-e.start:u-d)),null===u&&(u=d+d-c),p=d-(d-Math.min(c,u))/2*g,{chunk:Math.abs(u-c)/2*g/b,ratio:n.barPercentage,start:p}):(m=n.barThickness,(0,s.k)(m)?(f=e.min*n.categoryPercentage,v=n.barPercentage):(f=m*b,v=1),{chunk:f/b,ratio:v,start:e.pixels[t]-f/2}),_=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);i=x.start+x.chunk*_+x.chunk/2,a=Math.min(h,x.chunk*x.ratio)}else i=r.getPixelForValue(this.getParsed(t)[r.axis],t),a=Math.min(h,e.min*e.ratio);return{base:i-a/2,head:i+a/2,center:i,size:a}}draw(){for(var t=this._cachedMeta,e=t.vScale,i=t.data,a=i.length,s=0;s<a;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}}(0,a.Z)(L,"id","bar"),(0,a.Z)(L,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,a.Z)(L,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class E extends k{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,a){for(var s=super.parsePrimitiveData(t,e,i,a),r=0;r<s.length;r++)s[r]._custom=this.resolveDataElementOptions(r+i).radius;return s}parseArrayData(t,e,i,a){for(var r=super.parseArrayData(t,e,i,a),n=0;n<r.length;n++){var o=e[i+n];r[n]._custom=(0,s.v)(o[2],this.resolveDataElementOptions(n+i).radius)}return r}
1parseObjectData(t,e,i,a){for(var r=super.parseObjectData(t,e,i,a),n=0;n<r.length;n++){var o=e[i+n];r[n]._custom=(0,s.v)(o&&o.r&&+o.r,this.resolveDataElementOptions(n+i).radius)}return r}getMaxOverflow(){for(var t=this._cachedMeta.data,e=0,i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:s}=e,r=this.getParsed(t),n=a.getLabelForValue(r.x),o=s.getLabelForValue(r.y),h=r._custom;return{label:i[t]||"",value:"("+n+", "+o+(h?", "+h:"")+")"}}update(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,a){for(var s="reset"===a,{iScale:r,vScale:n}=this._cachedMeta,{sharedOptions:o,includeOptions:h}=this._getSharedOptions(e,a),l=r.axis,d=n.axis,c=e;c<e+i;c++){var u=t[c],g=!s&&this.getParsed(c),p={},f=p[l]=s?r.getPixelForDecimal(.5):r.getPixelForValue(g[l]),v=p[d]=s?n.getBasePixel():n.getPixelForValue(g[d]);p.skip=isNaN(f)||isNaN(v),h&&(p.options=o||this.resolveDataElementOptions(c,u.active?"active":a),s&&(p.options.radius=0)),this.updateElement(u,c,p,a)}}resolveDataElementOptions(t,e){var i=this.getParsed(t),a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));var r=a.radius;return"active"!==e&&(a.radius=0),a.radius+=(0,s.v)(i&&i._custom,r),a}}(0,a.Z)(E,"id","bubble"),(0,a.Z)(E,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,a.Z)(E,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class A extends k{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){var i=this.getDataset().data,a=this._cachedMeta;if(!1===this._parsing)a._parsed=i;else{var r,n,o=t=>+i[t];if((0,s.i)(i[t])){var{key:h="value"}=this._parsing;o=t=>+(0,s.f)(i[t],h)}for(r=t,n=t+e;r<n;++r)a._parsed[r]=o(r)}}_getRotation(){return(0,s.t)(this.options.rotation-90)}_getCircumference(){return(0,s.t)(this.options.circumference)}_getRotationExtents(){for(var t=s.T,e=-s.T,i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){var a=this.chart.getDatasetMeta(i).controller,r=a._getRotation(),n=a._getCircumference();t=Math.min(t,r),e=Math.max(e,r+n)}return{rotation:t,circumference:e-t}}update(t){var{chartArea:e}=this.chart,i=this._cachedMeta,a=i.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a
1)+this.options.spacing,n=Math.max((Math.min(e.width,e.height)-r)/2,0),o=Math.min((0,s.m)(this.options.cutout,n),1),h=this._getRingWeight(this.index),{circumference:l,rotation:d}=this._getRotationExtents(),{ratioX:c,ratioY:u,offsetX:g,offsetY:p}=function(t,e,i){var a=1,r=1,n=0,o=0;if(e<s.T){var h=t+e,l=Math.cos(t),d=Math.sin(t),c=Math.cos(h),u=Math.sin(h),g=(e,a,r)=>(0,s.p)(e,t,h,!0)?1:Math.max(a,a*i,r,r*i),p=(e,a,r)=>(0,s.p)(e,t,h,!0)?-1:Math.min(a,a*i,r,r*i),f=g(0,l,c),v=g(s.H,d,u),m=p(s.P,l,c),b=p(s.P+s.H,d,u);a=(f-m)/2,r=(v-b)/2,n=-(f+m)/2,o=-(v+b)/2}return{ratioX:a,ratioY:r,offsetX:n,offsetY:o}}(d,l,o),f=(e.width-r)/c,v=(e.height-r)/u,m=(0,s.n)(this.options.radius,Math.max(Math.min(f,v)/2,0)),b=Math.max(m*o,0),x=(m-b)/this._getVisibleDatasetWeightTotal();this.offsetX=g*m,this.offsetY=p*m,i.total=this.calculateTotal(),this.outerRadius=m-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){var i=this.options,a=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*r/s.T)}updateElements(t,e,i,a){var s,r="reset"===a,n=this.chart,o=n.chartArea,h=n.options.animation,l=(o.left+o.right)/2,d=(o.top+o.bottom)/2,c=r&&h.animateScale,u=c?0:this.innerRadius,g=c?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(e,a),v=this._getRotation();for(s=0;s<e;++s)v+=this._circumference(s,r);for(s=e;s<e+i;++s){var m=this._circumference(s,r),b=t[s],x={x:l+this.offsetX,y:d+this.offsetY,startAngle:v,endAngle:v+m,circumference:m,outerRadius:g,innerRadius:u};f&&(x.options=p||this.resolveDataElementOptions(s,b.active?"active":a)),v+=m,this.updateElement(b,s,x,a)}}calculateTotal(){var t,e=this._cachedMeta,i=e.data,a=0;for(t=0;t<i.length;t++){var s=e._parsed[t];null!==s&&!isNaN(s)&&this.chart.getDataVisibility(t)&&!i[t].hidden&&(a+=Math.abs(s))}return a}calculateCircumference(t){var e=this._cachedMeta.total;return e>0&&!isNaN(t)?s.T*(Math.abs(t)/e):0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t],i.options.locale);return{label:a[t]||"",value:r}}getMaxBorderWidth(t){var e,i,a,s,r,n=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){t=(a=o.getDatasetMeta(e)).data,s=a.controller;break}}if(!t)return 0;for(e=0,i=t.length;e<i;++e)"inner"!==(r=s.resolveDataElementOptions(e)).borderAlign&&(n=Math.max(n,r.borderWidth||0,r.hoverBorderWidth||0));return n}getMaxOffset(t){for(var e=0,i=0,a=t.length;i<a;++i){var s=this.resolveDataElementOptions(i);e=Math.max(e,s.offset||0,s.hoverOffset||0)}return e}_getRingWeightOffset(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max((0,s.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}(0,a.Z)(A,"id","doughnut"),(0,a.Z)(A,"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,a.Z)(A,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),(0,a.Z)(A,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){var e=t.data;if(e.labels.length&&e.datasets.length){var{labels:{pointStyle:i,color:a}}=t.legend.options;return e.labels.map((e,s)=>{var r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:a,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class T extends k{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){var e=this._cachedMeta,{dataset:i,data:a=[],_dataset:r}=e,n=this.chart._animationsDisabled,{start:o,count:h}=(0,s.q)(e,a,n);this._drawStart=o,this._drawCount=h,(0,s.w)(e)&&(o=0,h=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=a;var l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:l},t),this.updateElements(a,o,h,t)}updateElements(t,e,i,a){for(var r="reset"===a,{iScale:n,vScale:o,_stacked:h,_dataset:l}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(e,a),u=n.axis,g=o.axis,{spanGaps:p,segment:f}=this.options,v=(0,s.x)(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===a,b=e+i,x=t.length,_=e>0&&this.getParsed(e-1),y=0;y<x;++y){var M=t[y],w=m?M:{};if(y<e||y>=b){w.skip=!0;continue}var k=this.getParsed(y),D=(0,s.k)(k[g]),S=w[u]=n.getPixelForValue(k[u],y),P=w[g]=r||D?o.getBasePixel():o.getPixelForValue(h?this.applyStack(o,k,h):k[g],y);w.skip=isNaN(S)||isNaN(P)||D,w.stop=y>0&&Math.abs(k[u]-_[u])>v,f&&(w.parsed=k,w.raw=l.data[y]),c&&(w.options=d||this.resolveDataElementOptions(y,M.active?"active":a)),m||this.updateElement(M,y,w,a),_=k}}getMaxOverflow(){var t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,a=t.data||[];return a.length?Math.max(i,a[0].size(this.resolveDataElementOptions(0)),a[a.length-1].size(this.resolveDataElementOptions(a.length-1)))/2:i}draw(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}(0,a.Z)(T,"id","line"),(0,a.Z)(T,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,a.Z)(T,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class F extends k{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t].r,i.options.locale);return{label:a[t]||"",value:r}}
1parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){var t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{var a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){var t=this.chart,e=t.chartArea,i=t.options,a=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),r=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,a){var r,n="reset"===a,o=this.chart,h=o.options.animation,l=this._cachedMeta.rScale,d=l.xCenter,c=l.yCenter,u=l.getIndexAngle(0)-.5*s.P,g=u,p=360/this.countVisibleElements();for(r=0;r<e;++r)g+=this._computeAngle(r,a,p);for(r=e;r<e+i;r++){var f=t[r],v=g,m=g+this._computeAngle(r,a,p),b=o.getDataVisibility(r)?l.getDistanceFromCenterForValue(this.getParsed(r).r):0;g=m,n&&(h.animateScale&&(b=0),h.animateRotate&&(v=m=u));var x={x:d,y:c,innerRadius:0,outerRadius:b,startAngle:v,endAngle:m,options:this.resolveDataElementOptions(r,f.active?"active":a)};this.updateElement(f,r,x,a)}}countVisibleElements(){var t=this._cachedMeta,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,s.t)(this.resolveDataElementOptions(t,e).angle||i):0}}(0,a.Z)(F,"id","polarArea"),(0,a.Z)(F,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,a.Z)(F,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){var e=t.data;if(e.labels.length&&e.datasets.length){var{labels:{pointStyle:i,color:a}}=t.legend.options;return e.labels.map((e,s)=>{var r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:a,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}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 z extends A{}
1(0,a.Z)(z,"id","pie"),(0,a.Z)(z,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class R extends k{getLabelAndValue(t){var e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){var e=this._cachedMeta,i=e.dataset,a=e.data||[],s=e.iScale.getLabels();if(i.points=a,"resize"!==t){var r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);var n={_loop:!0,_fullLoop:s.length===a.length,options:r};this.updateElement(i,void 0,n,t)}this.updateElements(a,0,a.length,t)}updateElements(t,e,i,a){for(var s=this._cachedMeta.rScale,r="reset"===a,n=e;n<e+i;n++){var o=t[n],h=this.resolveDataElementOptions(n,o.active?"active":a),l=s.getPointPositionForValue(n,this.getParsed(n).r),d=r?s.xCenter:l.x,c=r?s.yCenter:l.y,u={x:d,y:c,angle:l.angle,skip:isNaN(d)||isNaN(c),options:h};this.updateElement(o,n,u,a)}}}(0,a.Z)(R,"id","radar"),(0,a.Z)(R,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,a.Z)(R,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class I extends k{getLabelAndValue(t){var e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:s}=e,r=this.getParsed(t),n=a.getLabelForValue(r.x),o=s.getLabelForValue(r.y);return{label:i[t]||"",value:"("+n+", "+o+")"}}update(t){var e=this._cachedMeta,{data:i=[]}=e,a=this.chart._animationsDisabled,{start:r,count:n}=(0,s.q)(e,i,a);if(this._drawStart=r,this._drawCount=n,(0,s.w)(e)&&(r=0,n=i.length),this.options.showLine){this.datasetElementType||this.addElements();var{dataset:o,_dataset:h}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!h._decimated,o.points=i;var l=this.resolveDatasetElementOptions(t);l.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:l},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,r,n,t)}addElements(){var{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,a){for(var r="reset"===a,{iScale:n,vScale:o,_stacked:h,_dataset:l}=this._cachedMeta,d=this.resolveDataElementOptions(e,a),c=this.getSharedOptions(d),u=this.includeOptions(a,c),g=n.axis,p=o.axis,{spanGaps:f,segment:v}=this.options,m=(0,s.x)(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===a,x=e>0&&this.getParsed(e-1),_=e;_<e+i;++_){var y=t[_],M=this.getParsed(_),w=b?y:{},k=(0,s.k)(M[p]),D=w[g]=n.getPixelForValue(M[g],_),S=w[p]=r||k?o.getBasePixel():o.getPixelForValue(h?this.applyStack(o,M,h):M[p],_);w.skip=isNaN(D)||isNaN(S)||k,w.stop=_>0&&Math.abs(M[g]-x[g])>m,v&&(w.parsed=M,w.raw=l.data[_]),u&&(w.options=c||this.resolveDataElementOptions(_,y.active?"active":a)),b||this.updateElement(y,_,w,a),x=M}this.updateSharedOptions(c,a,d)}getMaxOverflow(){var t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){for(var i=0,a=e.length-1;a>=0;--a)i=Math.max(i,e[a].size(this.resolveDataElementOptions(a))/2);return i>0&&i}var s=t.dataset,r=s.options&&s.options.borderWidth||0;return e.length?Math.max(r,e[0].size(this.resolveDataElementOptions(0)),e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2:r}}(0,a.Z)(I,"id","scatter"),(0,a.Z)(I,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,a.Z)(I,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var V=Object.freeze({__proto__:null,BarController:L,BubbleController:E,DoughnutController:A,LineController:T,PieController:z,PolarAreaController:F,RadarController:R,ScatterController:I});function B(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class N{static override(t){Object.assign(N.prototype,t)}constructor(t){(0,a.Z)(this,"options",void 0),this.options=t||{}}init(){}formats(){return B()}parse(){return B()}format(){return B()}add(){return B()}diff(){return B()}startOf(){return B()}endOf(){return B()}}var H={_date:N};function j(t,e,i,a,r){for(var n=t.getSortedVisibleDatasetMetas(),o=i[e],h=0,l=n.length;h<l;++h)for(var{index:d,data:c}=n[h],{lo:u,hi:g}
1=function(t,e,i,a){var{controller:r,data:n,_sorted:o}=t,h=r._cachedMeta.iScale;if(h&&e===h.axis&&"r"!==e&&o&&n.length){var l=h._reversePixels?s.A:s.B;if(!a)return l(n,e,i);if(r._sharedOptions){var d=n[0],c="function"==typeof d.getRange&&d.getRange(e);if(c){var u=l(n,e,i-c),g=l(n,e,i+c);return{lo:u.lo,hi:g.hi}}}}return{lo:0,hi:n.length-1}}(n[h],e,o,r),p=u;p<=g;++p){var f=c[p];f.skip||a(f,d,p)}}function W(t,e,i,a,r){var n=[];return(r||t.isPointInArea(e))&&j(t,i,e,function(i,o,h){(r||(0,s.C)(i,t.chartArea,0))&&i.inRange(e.x,e.y,a)&&n.push({element:i,datasetIndex:o,index:h})},!0),n}function Z(t,e,i,a,r,n){var o,h,l,d,c,u;return n||t.isPointInArea(e)?"r"!==i||a?(o=[],h=-1!==i.indexOf("x"),l=-1!==i.indexOf("y"),d=function(t,e){return Math.sqrt(Math.pow(h?Math.abs(t.x-e.x):0,2)+Math.pow(l?Math.abs(t.y-e.y):0,2))},c=Number.POSITIVE_INFINITY,j(t,i,e,function(i,s,h){var l=i.inRange(e.x,e.y,r);if(!a||l){var u=i.getCenterPoint(r);if(n||t.isPointInArea(u)||l){var g=d(e,u);g<c?(o=[{element:i,datasetIndex:s,index:h}],c=g):g===c&&o.push({element:i,datasetIndex:s,index:h})}}}),o):(u=[],j(t,i,e,function(t,i,a){var{startAngle:n,endAngle:o}=t.getProps(["startAngle","endAngle"],r),{angle:h}=(0,s.D)(t,{x:e.x,y:e.y});(0,s.p)(h,n,o)&&u.push({element:t,datasetIndex:i,index:a})}),u):[]}function U(t,e,i,a,s){var r=[],n="x"===i?"inXRange":"inYRange",o=!1;return(j(t,i,e,(t,a,h)=>{t[n](e[i],s)&&(r.push({element:t,datasetIndex:a,index:h}),o=o||t.inRange(e.x,e.y,s))}),a&&!o)?[]:r}var $={evaluateInteractionItems:j,modes:{index(t,e,i,a){var r=(0,s.z)(e,t),n=i.axis||"x",o=i.includeInvisible||!1,h=i.intersect?W(t,r,n,a,o):Z(t,r,n,!1,a,o),l=[];return h.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{var 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,a){var r=(0,s.z)(e,t),n=i.axis||"xy",o=i.includeInvisible||!1,h=i.intersect?W(t,r,n,a,o):Z(t,r,n,!1,a,o);if(h.length>0){var l=h[0].datasetIndex,d=t.getDatasetMeta(l).data;h=[];for(var c=0;c<d.length;++c)h.push({element:d[c],datasetIndex:l,index:c})}return h},point(t,e,i,a){var r=(0,s.z)(e,t);return W(t,r,i.axis||"xy",a,i.includeInvisible||!1)},nearest(t,e,i,a){var r=(0,s.z)(e,t),n=i.axis||"xy",o=i.includeInvisible||!1;return Z(t,r,n,i.intersect,a,o)},x(t,e,i,a){var r=(0,s.z)(e,t);return U(t,r,"x",i.intersect,a)},y(t,e,i,a){var r=(0,s.z)(e,t);return U(t,r,"y",i.intersect,a)}}},Y=["left","top","right","bottom"];function Q(t,e){return t.filter(t=>t.pos===e)}function X(t,e){return t.filter(t=>-1===Y.indexOf(t.pos)&&t.box.axis===e)}function G(t,e){return t.sort((t,i)=>{var a=e?i:t,s=e?t:i;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function q(t,e,i,a){return Math.max(t[i],e[i])+Math.max(t[a],e[a])}function K(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 J(t,e,i,a){var r,n,o,h,l,d,c=[];for(r=0,n=t.length,l=0;r<n;++r){(h=(o=t[r]).box).update(o.width||e.w,o.height||e.h,function(t,e){var i=e.maxPadding;return function(t){var a={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{a[t]=Math.max(e[t],i[t])}),a}(t?["left","right"]:["top","bottom"])}(o.horizontal,e));var{same:u,other:g}=function(t,e,i,a){var{pos:r,box:n}=i,o=t.maxPadding;if(!(0,s.i)(r)){i.size&&(t[r]-=i.size);var h=a[i.stack]||{size:0,count:1};h.size=Math.max(h.size,i.horizontal?n.height:n.width),i.size=h.size/h.count,t[r]+=i.size}n.getPadding&&K(o,n.getPadding());var l=Math.max(0,e.outerWidth-q(o,t,"left","right")),d=Math.max(0,e.outerHeight-q(o,t,"top","bottom")),c=l!==t.w,u=d!==t.h;return t.w=l,t.h=d,i.horizontal?{same:c,other:u}:{same:u,other:c}}(e,i,o,a);l|=u&&c.length,d=d||g,h.fullSize||c.push(o)}return l&&J(c,e,i,a)||d}function tt(t,e,i,a,s){t.top=i,t.left=e,t.right=e+a,t.bottom=i+s,t.width=a,t.height=s}function te(t,e,i,a){var r=i.padding,{x:n,y:o}=e;for(var h of t){var l=h.box,d=a[h.stack]||{count:1,placed:0,weight:1},c=h.stackWeight/d.weight||1;if(h.horizontal){var u=e.w*c,g=d.size||l.height;(0,s.h)(d.start)&&(o=d.start),l.fullSize?tt(l,r.left,o,i.outerWidth-r.right-r.left,g):tt(l,e.left+d.placed,o,u,g),d.start=o,d.placed+=u,o=l.bottom}else{var p=e.h*c,f=d.size||l.width;(0,s.h)(d.start)&&(n=d.start),l.fullSize?tt(l,n,r.top,f,i.outerHeight-r.bottom-r.top):tt(l,n,e.top+d.placed,f,p),d.start=n,d.placed+=p,n=l.right}}e.x=n,e.y=o}
1var ti={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){var 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,a){if(t){var r,n,o,h,l,d,c,u,g=(0,s.E)(t.options.layout.padding),p=Math.max(e-g.width,0),f=Math.max(i-g.height,0),v=(n=G((r=function(t){var e,i,a,s,r,n,o=[];for(e=0,i=(t||[]).length;e<i;++e)a=t[e],({position:s,options:{stack:r,stackWeight:n=1}}=a),o.push({index:e,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:r&&s+r,stackWeight:n});return o}(t.boxes)).filter(t=>t.box.fullSize),!0),o=G(Q(r,"left"),!0),h=G(Q(r,"right")),l=G(Q(r,"top"),!0),d=G(Q(r,"bottom")),c=X(r,"x"),u=X(r,"y"),{fullSize:n,leftAndTop:o.concat(l),rightAndBottom:h.concat(u).concat(d).concat(c),chartArea:Q(r,"chartArea"),vertical:o.concat(h).concat(u),horizontal:l.concat(d).concat(c)}),m=v.vertical,b=v.horizontal;(0,s.F)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});var x=Object.freeze({outerWidth:e,outerHeight:i,padding:g,availableWidth:p,availableHeight:f,vBoxMaxWidth:p/2/(m.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),hBoxMaxHeight:f/2}),_=Object.assign({},g);K(_,(0,s.E)(a));var y=Object.assign({maxPadding:_,w:p,h:f,x:g.left,y:g.top},g),M=function(t,e){var i,a,s,r=function(t){var e={};for(var i of t){var{stack:a,pos:s,stackWeight:r}=i;if(a&&Y.includes(s)){var n=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=r}}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;for(i=0,a=t.length;i<a;++i){var{fullSize:h}=(s=t[i]).box,l=r[s.stack],d=l&&s.stackWeight/l.weight;
1s.horizontal?(s.width=d?d*n:h&&e.availableWidth,s.height=o):(s.width=n,s.height=d?d*o:h&&e.availableHeight)}return r}(m.concat(b),x);J(v.fullSize,y,x,M),J(m,y,x,M),J(b,y,x,M)&&J(m,y,x,M),function(t){var e=t.maxPadding;function i(i){var a=Math.max(e[i]-t[i],0);return t[i]+=a,a}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(y),te(v.leftAndTop,y,x,M),y.x+=y.w,y.y+=y.h,te(v.rightAndBottom,y,x,M),t.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},(0,s.F)(v.chartArea,e=>{var i=e.box;Object.assign(i,t.chartArea),i.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}}};class ta{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,a){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,a?Math.floor(e/a):i)}}isAttached(t){return!0}updateConfig(t){}}class ts extends ta{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}var tr="$chartjs",tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},to=t=>null===t||""===t,th=!!s.K&&{passive:!0};function tl(t,e){for(var i of t)if(i===e||i.contains(e))return!0}function td(t,e,i){var a=t.canvas,s=new MutationObserver(t=>{var e=!1;for(var s of t)e=(e=e||tl(s.addedNodes,a))&&!tl(s.removedNodes,a);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function tc(t,e,i){var a=t.canvas,s=new MutationObserver(t=>{var e=!1;for(var s of t)e=(e=e||tl(s.removedNodes,a))&&!tl(s.addedNodes,a);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}var tu=new Map,tg=0;function tp(){var t=window.devicePixelRatio;t!==tg&&(tg=t,tu.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function tf(t,e,i){var a=t.canvas,r=a&&(0,s.I)(a);if(r){var n=(0,s.L)((t,e)=>{var a=r.clientWidth;i(t,e),a<r.clientWidth&&i()},window),o=new ResizeObserver(t=>{var e=t[0],i=e.contentRect.width,a=e.contentRect.height;(0!==i||0!==a)&&n(i,a)});return o.observe(r),tu.size||window.addEventListener("resize",tp),tu.set(t,n),o}}function tv(t,e,i){i&&i.disconnect(),"resize"===e&&(tu.delete(t),tu.size||window.removeEventListener("resize",tp))}function tm(t,e,i){var a=t.canvas,r=(0,s.L)(e=>{null!==t.ctx&&i(function(t,e){var i=tn[t.type]||t.type,{x:a,y:r}=(0,s.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==r?r:null}}(e,t))},t);return a&&a.addEventListener(e,r,th),r}class tb extends ta{acquireContext(t,e){var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){var i=t.style,a=t.getAttribute("height"),r=t.getAttribute("width");if(t[tr]={initial:{height:a,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",to(r)){var n=(0,s.J)(t,"width");void 0!==n&&(t.width=n)}if(to(a)){if(""===t.style.height)t.height=t.width/(e||2);else{var o=(0,s.J)(t,"height");void 0!==o&&(t.height=o)}}}(t,e),i):null}releaseContext(t){var e=t.canvas;if(!e[tr])return!1;var i=e[tr].initial;["height","width"].forEach(t=>{var a=i[t];(0,s.k)(a)?e.removeAttribute(t):e.setAttribute(t,a)});var a=i.style||{};return Object.keys(a).forEach(t=>{e.style[t]=a[t]}),e.width=e.width,delete e[tr],!0}addEventListener(t,e,i){this.removeEventListener(t,e);var a=t.$proxies||(t.$proxies={}),s={attach:td,detach:tc,resize:tf}[e]||tm;a[e]=s(t,e,i)}removeEventListener(t,e){var i=t.$proxies||(t.$proxies={}),a=i[e];a&&((({attach:tv,detach:tv,resize:tv})[e]||function(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,th)})(t,e,a),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return(0,s.G)(t,e,i,a)}isAttached(t){var e=t&&(0,s.I)(t);return!!(e&&e.isConnected)}}function tx(t){return!(0,s.M)()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ts:tb}class t_{constructor(){(0,a.Z)(this,"x",void 0),(0,a.Z)(this,"y",void 0),(0,a.Z)(this,"active",!1),(0,a.Z)(this,"options",void 0),(0,a.Z)(this,"$animations",void 0)}tooltipPosition(t){var{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,s.x)(this.x)&&(0,s.x)(this.y)}getProps(t,e){var i=this.$animations;if(!e||!i)return this;var a={};return t.forEach(t=>{a[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),a}}function ty(t,e,i,a,r){var n,o,h,l=(0,s.v)(a,0),d=Math.min((0,s.v)(r,t.length),t.length),c=0;for(i=Math.ceil(i),r&&(i=(n=r-a)/Math.floor(n/i)),h=l;h<0;)h=Math.round(l+ ++c*i);for(o=Math.max(l,0);o<d;o++)o===h&&(e.push(t[o]),h=Math.round(l+ ++c*i))}(0,a.Z)(t_,"defaults",{}),(0,a.Z)(t_,"defaultRoutes",void 0);var tM=t=>
1"left"===t?"right":"right"===t?"left":t,tw=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,tk=(t,e)=>Math.min(e||t,t);function tD(t,e){for(var i=[],a=t.length/e,s=t.length,r=0;r<s;r+=a)i.push(t[Math.floor(r)]);return i}function tS(t){return t.drawTicks?t.tickLength:0}function tP(t,e){if(!t.display)return 0;var i=(0,s.a0)(t.font,e),a=(0,s.E)(t.padding);return((0,s.b)(t.text)?t.text.length:1)*i.lineHeight+a.height}class tC extends t_{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(){var{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:a}=this;return t=(0,s.O)(t,Number.POSITIVE_INFINITY),e=(0,s.O)(e,Number.NEGATIVE_INFINITY),i=(0,s.O)(i,Number.POSITIVE_INFINITY),a=(0,s.O)(a,Number.NEGATIVE_INFINITY),{min:(0,s.O)(t,i),max:(0,s.O)(e,a),minDefined:(0,s.g)(t),maxDefined:(0,s.g)(e)}}getMinMax(t){var e,{min:i,max:a,minDefined:r,maxDefined:n}=this.getUserBounds();if(r&&n)return{min:i,max:a};for(var o=this.getMatchingVisibleMetas(),h=0,l=o.length;h<l;++h)e=o[h].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),n||(a=Math.max(a,e.max));return i=n&&i>a?a:i,a=r&&i>a?i:a,{min:(0,s.O)(i,(0,s.O)(a,i)),max:(0,s.O)(a,(0,s.O)(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){var 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,s.Q)(this.options.beforeUpdate,[this])}update(t,e,i){var{beginAtZero:a,grace:r,ticks:n}=this.options,o=n.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,s.R)(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var h=o<this.ticks.length;this._convertTicksToLabels(h?tD(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=function(t,e){var i=t.options.ticks,a=(u=t.options.offset,g=t._tickSize(),Math.floor(Math.min(t._length/g+(u?0:1),t._maxLength/g))),r=Math.min(i.maxTicksLimit||a,a),n=i.major.enabled?function(t){var e,i,a=[];for(e=0,i=t.length;e<i;e++)t[e].major&&a.push(e);return a}(e):[],o=n.length,h=n[0],l=n[o-1],d=[];if(o>r)return function(t,e,i,a){var s,r=0,n=i[0];for(s=0,a=Math.ceil(a);s<t.length;s++)s===n&&(e.push(t[s]),n=i[++r*a])}(e,d,n,o/r),d;
1var c=function(t,e,i){var a=function(t){var e,i,a=t.length;if(a<2)return!1;for(i=t[0],e=1;e<a;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),r=e.length/i;if(!a)return Math.max(r,1);for(var n=(0,s.N)(a),o=0,h=n.length-1;o<h;o++){var l=n[o];if(l>r)return l}return Math.max(r,1)}(n,e,r);if(o>0){var u,g,p,f,v=o>1?Math.round((l-h)/(o-1)):null;for(ty(e,d,c,(0,s.k)(v)?0:h-v,h),p=0,f=o-1;p<f;p++)ty(e,d,c,n[p],n[p+1]);return ty(e,d,c,l,(0,s.k)(v)?e.length:l+v),d}return ty(e,d,c),d}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){var 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,s.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,s.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,s.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,s.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,s.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){var e,i,a,r=this.options.ticks;for(e=0,i=t.length;e<i;e++)(a=t[e]).label=(0,s.Q)(r.callback,[a.value,e,t],this)}afterTickToLabelConversion(){(0,s.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,s.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){var t,e,i,a=this.options,r=a.ticks,n=tk(this.ticks.length,a.ticks.maxTicksLimit),o=r.minRotation||0,h=r.maxRotation,l=o;if(!this._isVisible()||!r.display||o>=h||n<=1||!this.isHorizontal()){this.labelRotation=o;return}var d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,g=(0,s.S)(this.chart.width-c,0,this.maxWidth);c+6>(t=a.offset?this.maxWidth/n:g/(n-1))&&(t=g/(n-(a.offset?.5:1)),e=this.maxHeight-tS(a.grid)-r.padding-tP(a.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),l=Math.max(o,Math.min(h,l=(0,s.U)(Math.min(Math.asin((0,s.S)((d.highest.height+6)/t,-1,1)),Math.asin((0,s.S)(e/i,-1,1))-Math.asin((0,s.S)(u/i,-1,1))))))),this.labelRotation=l}afterCalculateLabelRotation(){(0,s.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.Q)(this.options.beforeFit,[this])}fit(){var t={width:0,height:0},{chart:e,options:{ticks:i,title:a,grid:r}}=this,n=this._isVisible(),o=this.isHorizontal();if(n){var h=tP(a,e.options.font);if(o?(t.width=this.maxWidth,t.height=tS(r)+h):(t.height=this.maxHeight,t.width=tS(r)+h),i.display&&this.ticks.length){var{first:l,last:d,widest:c,highest:u}=this._getLabelSizes(),g=2*i.padding,p=(0,s.t)(this.labelRotation),f=Math.cos(p),v=Math.sin(p);if(o){var m=i.mirror?0:v*c.width+f*u.height;t.height=Math.min(this.maxHeight,t.height+m+g)}else{var b=i.mirror?0:f*c.width+v*u.height;t.width=Math.min(this.maxWidth,t.width+b+g)}this._calculatePadding(l,d,v,f)}}this._handleMargins(),o?(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,a){var{ticks:{align:s,padding:r},position:n}=this.options,o=0!==this.labelRotation,h="top"!==n&&"x"===this.axis;if(this.isHorizontal()){var l=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),c=0,u=0;o?h?(c=a*t.width,u=i*e.height):(c=i*t.height,u=a*e.width):"start"===s?u=e.width:"end"===s?c=t.
1width:"inner"!==s&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-l+r)*this.width/(this.width-l),0),this.paddingRight=Math.max((u-d+r)*this.width/(this.width-d),0)}else{var g=e.height/2,p=t.height/2;"start"===s?(g=0,p=t.height):"end"===s&&(g=e.height,p=0),this.paddingTop=g+r,this.paddingBottom=p+r}}_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,s.Q)(this.options.afterFit,[this])}isHorizontal(){var{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){var e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)(0,s.k)(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){var t=this._labelSizes;if(!t){var e=this.options.ticks.sampleSize,i=this.ticks;e<i.length&&(i=tD(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){var a,r,n,o,h,l,d,c,u,g,p,{ctx:f,_longestTextCache:v}=this,m=[],b=[],x=Math.floor(e/tk(e,i)),_=0,y=0;for(a=0;a<e;a+=x){if(o=t[a].label,h=this._resolveTickFontOptions(a),f.font=l=h.string,d=v[l]=v[l]||{data:{},gc:[]},c=h.lineHeight,u=g=0,(0,s.k)(o)||(0,s.b)(o)){if((0,s.b)(o))for(r=0,n=o.length;r<n;++r)p=o[r],(0,s.k)(p)||(0,s.b)(p)||(u=(0,s.V)(f,d.data,d.gc,u,p),g+=c)}else u=(0,s.V)(f,d.data,d.gc,u,o),g=c;m.push(u),b.push(g),_=Math.max(u,_),y=Math.max(g,y)}(0,s.F)(v,t=>{var i,a=t.gc,s=a.length/2;if(s>e){for(i=0;i<s;++i)delete t.data[a[i]];a.splice(0,s)}});var M=m.indexOf(_),w=b.indexOf(y),k=t=>({width:m[t]||0,height:b[t]||0});return{first:k(0),last:k(e-1),widest:k(M),highest:k(w),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);var e=this._startPixel+t*this._length;return(0,s.W)(this._alignToPixels?(0,s.X)(this.chart,e,0):e)}getDecimalForPixel(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){var{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,i=this.ticks||[];if(t>=0&&t<i.length){var a,r=i[t];return r.$context||(r.$context=(a=this.getContext(),(0,s.j)(a,{tick:r,index:t,type:"tick"})))}return this.$context||(this.$context=(e=this.chart.getContext(),(0,s.j)(e,{scale:this,type:"scale"})))}_tickSize(){var t=this.options.ticks,e=(0,s.t)(this.labelRotation),i=Math.abs(Math.cos(e)),a=Math.abs(Math.sin(e)),r=this._getLabelSizes(),n=t.autoSkipPadding||0,o=r?r.widest.width+n:0,h=r?r.highest.height+n:0;return this.isHorizontal()?h*i>o*a?o/i:h/a:h*a<o*i?h/i:o/a}_isVisible(){var t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){var e,i,a,r,n,o,h,l,d,c,u,g,p=this.axis,f=this.chart,v=this.options,{grid:m,position:b,border:x}=v,_=m.offset,y=this.isHorizontal(),M=this.ticks.length+(_?1:0),w=tS(m),k=[],D=x.setContext(this.getContext()),S=D.display?D.width:0,P=S/2,C=function(t){return(0,s.X)(f,t,S)};if("top"===b)e=C(this.bottom),o=this.bottom-w,l=e-P,c=C(t.top)+P,g=t.bottom;else if("bottom"===b)e=C(this.top),c=t.top,g=C(t.bottom)-P,o=e+P,l=this.top+w;else if("left"===b)e=C(this.right),n=this.right-w,h=e-P,d=C(t.left)+P,u=t.right;else if("right"===b)e=C(this.left),d=t.left,u=C(t.right)-P,n=e+P,h=this.left+w;else if("x"===p){if("center"===b)e=C((t.top+t.bottom)/2+.5);else if((0,s.i)(b)){var O=Object.keys(b)[0],L=b[O];e=C(this.chart.scales[O].getPixelForValue(L))}c=t.top,g=t.bottom,l=(o=e+P)+w}else if("y"===p){if("center"===b)e=C((t.left+t.right)/2);else if((0,s.i)(b)){var E=Object.keys(b)[0],A=b[E];e=C(this.chart.scales[E].getPixelForValue(A))}h=(n=e-P)-w,d=t.left,u=t.right}var T=(0,s.v)(v.ticks.maxTicksLimit,M),F=Math.max(1,Math.ceil(M/T));for(i=0;i<M;i+=F){var z=this.getContext(i),R=m.setContext(z),I=x.setContext(z),V=R.lineWidth,B=R.color,N=I.dash||[],H=I.dashOffset,j=R.tickWidth,W=R.tickColor,Z=R.tickBorderDash||[],U=R.tickBorderDashOffset;
1void 0!==(a=function(t,e,i){var a,s=t.ticks.length,r=Math.min(e,s-1),n=t._startPixel,o=t._endPixel,h=t.getPixelForTick(r);if(!i||(a=1===s?Math.max(h-n,o-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(r-1))/2,!((h+=r<e?a:-a)<n-1e-6)&&!(h>o+1e-6)))return h}(this,i,_))&&(r=(0,s.X)(f,a,V),y?n=h=d=u=r:o=l=c=g=r,k.push({tx1:n,ty1:o,tx2:h,ty2:l,x1:d,y1:c,x2:u,y2:g,width:V,color:B,borderDash:N,borderDashOffset:H,tickWidth:j,tickColor:W,tickBorderDash:Z,tickBorderDashOffset:U}))}return this._ticksLength=M,this._borderValue=e,k}_computeLabelItems(t){var e,i,a,r,n,o,h,l,d,c,u,g=this.axis,p=this.options,{position:f,ticks:v}=p,m=this.isHorizontal(),b=this.ticks,{align:x,crossAlign:_,padding:y,mirror:M}=v,w=tS(p.grid),k=w+y,D=M?-y:k,S=-(0,s.t)(this.labelRotation),P=[],C="middle";if("top"===f)n=this.bottom-D,o=this._getXAxisLabelAlignment();else if("bottom"===f)n=this.top+D,o=this._getXAxisLabelAlignment();else if("left"===f){var O=this._getYAxisLabelAlignment(w);o=O.textAlign,r=O.x}else if("right"===f){var L=this._getYAxisLabelAlignment(w);o=L.textAlign,r=L.x}else if("x"===g){if("center"===f)n=(t.top+t.bottom)/2+k;else if((0,s.i)(f)){var E=Object.keys(f)[0],A=f[E];n=this.chart.scales[E].getPixelForValue(A)+k}o=this._getXAxisLabelAlignment()}else if("y"===g){if("center"===f)r=(t.left+t.right)/2-k;else if((0,s.i)(f)){var T=Object.keys(f)[0],F=f[T];r=this.chart.scales[T].getPixelForValue(F)}o=this._getYAxisLabelAlignment(w).textAlign}"y"===g&&("start"===x?C="top":"end"===x&&(C="bottom"));var z=this._getLabelSizes();for(e=0,i=b.length;e<i;++e){a=b[e].label;var R=v.setContext(this.getContext(e));h=this.getPixelForTick(e)+v.labelOffset,d=(l=this._resolveTickFontOptions(e)).lineHeight;var I=(c=(0,s.b)(a)?a.length:1)/2,V=R.color,B=R.textStrokeColor,N=R.textStrokeWidth,H=o;m?(r=h,"inner"===o&&(H=e===i-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),u="top"===f?"near"===_||0!==S?-c*d+d/2:"center"===_?-z.highest.height/2-I*d+d:-z.highest.height+d/2:"near"===_||0!==S?d/2:"center"===_?z.highest.height/2-I*d:z.highest.height-c*d,M&&(u*=-1),0===S||R.showLabelBackdrop||(r+=d/2*Math.sin(S))):(n=h,u=(1-c)*d/2);var j=void 0;if(R.showLabelBackdrop){var W=(0,s.E)(R.backdropPadding),Z=z.heights[e],U=z.widths[e],$=u-W.top,Y=0-W.left;switch(C){case"middle":$-=Z/2;break;case"bottom":$-=Z}switch(o){case"center":Y-=U/2;break;case"right":Y-=U;break;case"inner":e===i-1?Y-=U:e>0&&(Y-=U/2)}j={left:Y,top:$,width:U+W.width,height:Z+W.height,color:R.backdropColor}}P.push({label:a,font:l,textOffset:u,options:{rotation:S,color:V,strokeColor:B,strokeWidth:N,textAlign:H,textBaseline:C,translation:[r,n],backdrop:j}})}return P}_getXAxisLabelAlignment(){var{position:t,ticks:e}=this.options;if(-(0,s.t)(this.labelRotation))return"top"===t?"left":"right";var i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){var e,i,{position:a,ticks:{crossAlign:s,mirror:r,padding:n}}=this.options,o=this._getLabelSizes(),h=t+n,l=o.widest.width;return"left"===a?r?(i=this.right+n,"near"===s?e="left":"center"===s?(e="center",i+=l/2):(e="right",i+=l)):(i=this.right-h,"near"===s?e="right":"center"===s?(e="center",i-=l/2):(e="left",i=this.left)):"right"===a?r?(i=this.left+n,"near"===s?e="right":"center"===s?(e="center",i-=l/2):(e="left",i-=l)):(i=this.left+h,"near"===s?e="left":"center"===s?(e="center",i+=l/2):(e="right",i=this.right)):e="right",{textAlign:e,x:i}}_computeLabelArea(){if(!this.options.ticks.mirror){var t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
1:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}}drawBackground(){var{ctx:t,options:{backgroundColor:e},left:i,top:a,width:s,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,a,s,r),t.restore())}getLineWidthForValue(t){var e=this.options.grid;if(!this._isVisible()||!e.display)return 0;var i=this.ticks.findIndex(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){var e,i,a=this.options.grid,s=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),n=(t,e,i)=>{i.width&&i.color&&(s.save(),s.lineWidth=i.width,s.strokeStyle=i.color,s.setLineDash(i.borderDash||[]),s.lineDashOffset=i.borderDashOffset,s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(e.x,e.y),s.stroke(),s.restore())};if(a.display)for(e=0,i=r.length;e<i;++e){var o=r[e];a.drawOnChartArea&&n({x:o.x1,y:o.y1},{x:o.x2,y:o.y2},o),a.drawTicks&&n({x:o.tx1,y:o.ty1},{x:o.tx2,y:o.ty2},{color:o.tickColor,width:o.tickWidth,borderDash:o.tickBorderDash,borderDashOffset:o.tickBorderDashOffset})}}drawBorder(){var t,e,i,a,{chart:r,ctx:n,options:{border:o,grid:h}}=this,l=o.setContext(this.getContext()),d=o.display?l.width:0;if(d){var c=h.setContext(this.getContext(0)).lineWidth,u=this._borderValue;this.isHorizontal()?(t=(0,s.X)(r,this.left,d)-d/2,e=(0,s.X)(r,this.right,c)+c/2,i=a=u):(i=(0,s.X)(r,this.top,d)-d/2,a=(0,s.X)(r,this.bottom,c)+c/2,t=e=u),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(t,i),n.lineTo(e,a),n.stroke(),n.restore()}}drawLabels(t){if(this.options.ticks.display){var e=this.ctx,i=this._computeLabelArea();for(var a of(i&&(0,s.Y)(e,i),this.getLabelItems(t))){var r=a.options,n=a.font,o=a.label,h=a.textOffset;(0,s.Z)(e,o,0,h,n,r)}i&&(0,s.$)(e)}}drawTitle(){var t,{ctx:e,options:{position:i,title:a,reverse:r}}=this;if(a.display){var n=(0,s.a0)(a.font),o=(0,s.E)(a.padding),h=a.align,l=n.lineHeight/2;"bottom"===i||"center"===i||(0,s.i)(i)?(l+=o.bottom,(0,s.b)(a.text)&&(l+=n.lineHeight*(a.text.length-1))):l+=o.top;var{titleX:d,titleY:c,maxWidth:u,rotation:g}=function(t,e,i,a){var r,n,o,{top:h,left:l,bottom:d,right:c,chart:u}=t,{chartArea:g,scales:p}=u,f=0,v=d-h,m=c-l;if(t.isHorizontal()){if(n=(0,s.a2)(a,l,c),(0,s.i)(i)){var b=Object.keys(i)[0],x=i[b];o=p[b].getPixelForValue(x)+v-e}else o="center"===i?(g.bottom+g.top)/2+v-e:tw(t,i,e);r=c-l}else{if((0,s.i)(i)){var _=Object.keys(i)[0],y=i[_];n=p[_].getPixelForValue(y)-m+e}else n="center"===i?(g.left+g.right)/2-m+e:tw(t,i,e);o=(0,s.a2)(a,d,h),f="left"===i?-s.H:s.H}return{titleX:n,titleY:o,maxWidth:r,rotation:f}}(this,l,i,h);(0,s.Z)(e,a.text,0,0,n,{color:a.color,maxWidth:u,rotation:g,textAlign:(t=(0,s.a1)(h),(r&&"right"!==i||!r&&"right"===i)&&(t=tM(t)),t),textBaseline:"middle",translation:[d,c]})}}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){var t=this.options,e=t.ticks&&t.ticks.z||0,i=(0,s.v)(t.grid&&t.grid.z,-1),a=(0,s.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===tC.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){var e,i,a=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",r=[];for(e=0,i=a.length;e<i;++e){var n=a[e];n[s]!==this.id||t&&n.type!==t||r.push(n)}return r}_resolveTickFontOptions(t){var e=this.options.ticks.setContext(this.getContext(t));return(0,s.a0)(e.font)}_maxDigits(){var t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class tO{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){var e,i,a,r=Object.getPrototypeOf(t);"id"in r&&"defaults"in r&&(a=this.register(r));var n=this.items,o=t.id,h=this.scope+"."+o;if(!o)throw Error("class does not have id: "+t);return o in n||(n[o]=t,e=a,i=(0,s.a4)(Object.create(null),[e?s.d.get(e):{},s.d.get(h),t.defaults]),s.d.set(h,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>
1{var a=i.split("."),r=a.pop(),n=[t].concat(a).join("."),o=e[i].split("."),h=o.pop(),l=o.join(".");s.d.route(n,r,l,h)})}(h,t.defaultRoutes),t.descriptors&&s.d.describe(h,t.descriptors),this.override&&s.d.override(t.id,t.overrides)),h}get(t){return this.items[t]}unregister(t){var e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in s.d[a]&&(delete s.d[a][i],this.override&&delete s.a3[i])}}class tL{constructor(){this.controllers=new tO(k,"datasets",!0),this.elements=new tO(t_,"elements"),this.plugins=new tO(Object,"plugins"),this.scales=new tO(tC,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)}remove(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=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=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.scales)}_each(t,e,i){[...e].forEach(e=>{var a=i||this._getRegistryForType(e);i||a.isForType(e)||a===this.plugins&&e.id?this._exec(t,a,e):(0,s.F)(e,e=>{var a=i||this._getRegistryForType(e);this._exec(t,a,e)})})}_exec(t,e,i){var a=(0,s.a5)(t);(0,s.Q)(i["before"+a],[],i),e[t](i),(0,s.Q)(i["after"+a],[],i)}_getRegistryForType(t){for(var e=0;e<this._typedRegistries.length;e++){var i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){var a=e.get(t);if(void 0===a)throw Error('"'+t+'" is not a registered '+i+".");return a}}var tE=new tL;class tA{constructor(){this._init=[]}notify(t,e,i,a){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));var s=a?this._descriptors(t).filter(a):this._descriptors(t),r=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,a){for(var r of(a=a||{},t)){var n=r.plugin,o=n[i],h=[e,a,r.options];if(!1===(0,s.Q)(o,h,n)&&a.cancelable)return!1}return!0}invalidate(){(0,s.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){var i=t&&t.config,a=(0,s.v)(i.options&&i.options.plugins,{}),r=function(t){for(var e={},i=[],a=Object.keys(tE.plugins.items),s=0;s<a.length;s++)i.push(tE.getPlugin(a[s]));for(var r=t.plugins||[],n=0;n<r.length;n++){var o=r[n];-1===i.indexOf(o)&&(i.push(o),e[o.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==a||e?function(t,e,i,a){var{plugins:s,localIds:r}=e,n=[],o=t.getContext();for(var h of s){var l,d=h.id,c=(l=i[d],a||!1!==l?!0===l?{}:l:null);null!==c&&n.push({plugin:h,options:function(t,e,i,a){var{plugin:s,local:r}=e,n=t.pluginScopeKeys(s),o=t.getOptionScopes(i,n);return r&&s.defaults&&o.push(s.defaults),t.createResolver(o,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:h,local:r[d]},c,o)})}return n}(t,r,a,e):[]}_notifyStateChanges(t){var e=this._oldCache||[],i=this._cache,a=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(a(e,i),t,"stop"),this._notify(a(i,e),t,"start")}}function tT(t,e){var i=s.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function tF(t){if("x"===t||"y"===t||"r"===t)return t}function tz(t){if(tF(t))return t;for(var e=arguments.length,i=Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];for(var s of i){var r,n=s.axis||("top"===(r=s.position)||"bottom"===r?"x":"left"
1===r||"right"===r?"y":void 0)||t.length>1&&tF(t[0].toLowerCase());if(n)return n}throw Error("Cannot determine type of '".concat(t,"' axis. Please provide 'axis' or 'position' option."))}function tR(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function tI(t){var e,i,a,r,n=t.options||(t.options={});n.plugins=(0,s.v)(n.plugins,{}),n.scales=(e=s.a3[t.type]||{scales:{}},i=n.scales||{},a=tT(t.type,n),r=Object.create(null),Object.keys(i).forEach(n=>{var o=i[n];if(!(0,s.i)(o))return console.error("Invalid scale configuration for scale: ".concat(n));if(o._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(n));var h=tz(n,o,function(t,e){if(e.data&&e.data.datasets){var i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return tR(t,"x",i[0])||tR(t,"y",i[0])}return{}}(n,t),s.d.scales[o.type]),l=h===a?"_index_":"_value_",d=e.scales||{};r[n]=(0,s.ab)(Object.create(null),[{axis:h},o,d[h],d[l]])}),t.data.datasets.forEach(e=>{var a=e.type||t.type,o=e.indexAxis||tT(a,n),h=(s.a3[a]||{}).scales||{};Object.keys(h).forEach(t=>{var a,n=(a=t,"_index_"===t?a=o:"_value_"===t&&(a="x"===o?"y":"x"),a),l=e[n+"AxisID"]||n;r[l]=r[l]||Object.create(null),(0,s.ab)(r[l],[{axis:n},i[l],h[t]])})}),Object.keys(r).forEach(t=>{var e=r[t];(0,s.ab)(e,[s.d.scales[e.type],s.d.scale])}),r)}function tV(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}var tB=new Map,tN=new Set;function tH(t,e){var i=tB.get(t);return i||(i=e(),tB.set(t,i),tN.add(i)),i}var tj=(t,e,i)=>{var a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tW{constructor(t){var e;this._config=((e=(e=t)||{}).data=tV(e.data),tI(e),e),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=tV(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){var t=this._config;this.clearCache(),tI(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tH(t,()=>[["datasets.".concat(t),""]])}datasetAnimationScopeKeys(t,e){return tH("".concat(t,".transition.").concat(e),()=>[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]])}datasetElementScopeKeys(t,e){return tH("".concat(t,"-").concat(e),()=>[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]])}pluginScopeKeys(t){var e=t.id,i=this.type;return tH("".concat(i,"-plugin-").concat(e),()=>[["plugins.".concat(e),...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){var i=this._scopeCache,a=i.get(t);return(!a||e)&&(a=new Map,i.set(t,a)),a}getOptionScopes(t,e,i){var{options:a,type:r}=this,n=this._cachedScopes(t,i),o=n.get(e);if(o)return o;var h=new Set;e.forEach(e=>{t&&(h.add(t),e.forEach(e=>tj(h,t,e))),e.forEach(t=>tj(h,a,t)),e.forEach(t=>tj(h,s.a3[r]||{},t)),e.forEach(t=>tj(h,s.d,t)),e.forEach(t=>tj(h,s.a6,t))});var l=Array.from(h);return 0===l.length&&l.push(Object.create(null)),tN.has(e)&&n.set(e,l),l}chartOptionScopes(){var{options:t,type:e}=this;return[t,s.a3[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a6]}resolveNamedOptions(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],r={$shared:!0},{resolver:n,subPrefixes:o}=tZ(this._resolverCache,t,a),h=n;if(function(t,e){var{isScriptable:i,isIndexable:a}=(0,s.aa)(t);for(var r of e){var n=i(r),o=a(r),h=(o||n)&&t[r];if(n&&((0,s.a7)(h)||tU(h))||o&&(0,s.b)(h))return!0}return!1}(n,e)){r.$shared=!1,i=(0,s.a7)(i)?i():i;var l=this.createResolver(t,i,o);h=(0,s.a8)(n,i,l)}for(var d of e)r[d]=h[d];return r}createResolver(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],a=arguments.length>3?arguments[3]:void 0,{resolver:r}=tZ(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a8)(r,e,void 0,a):r}}function tZ(t,e,i){var a=t.get(e);a||(a=new Map,t.set(e,a));var r=i.join(),n=a.get(r);return n||(n={resolver:(0,s.a9)(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(r,n)),n}var tU=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).some(e=>(0,s.a7)(t[e])),t$=["top","bottom","left","right","chartArea"];function tY(t,e){return"top"===t||"bottom"===t||-1===t$.indexOf(t)&&"x"===e}function tQ(t,e){return function(i,a){return i[t]===a[t]?i[e]-a[e]:i[t]-a[t]}}function tX(t){var e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.Q)(i&&i.onComplete,[t],e)}function tG(t){var e=t.chart,i=e.options.animation;(0,s.Q)(i&&i.onProgress,[t],e)}function tq(t){return(0,s.M)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var tK={},tJ=t=>{var e=tq(t);return Object.values(tK).filter(t=>t.canvas===e).pop()};function t0(t,e,i){return t.options.clip?t[i]:e[i]}class t1{static register(){tE.add(...arguments),t2()}static unregister(){tE.remove(...arguments),t2()}constructor(t,e){var i=this.config=new tW(e),a=tq(t),r=tJ(a);if(r)throw Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");var n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tx(a)),this.platform.updateConfig(i);var o=this.platform.acquireContext(a,n.aspectRatio),l=o&&o.canvas,d=l&&l.height,c=l&&l.width;if(this.id=(0,s.ac)(),this.ctx=o,this.canvas=l,this.width=c,this.height=d,this._options=n,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 tA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ad)(t=>this.update(t),n.resizeDelay||0),this._dataChanges=[],tK[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}h.listen(this,"complete",tX),h.listen(this,"progress",tG),this._initialize(),this.attached&&this.update()}get aspectRatio(){var{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:r}=this;return(0,s.k)(t)?e&&r?r:a?i/a: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 tE}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,s.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,s.af)(this.canvas,this.ctx),this}stop(){return h.stop(this),this}resize(t,e){h.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){var i=this.options,a=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(a,t,e,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,(0,s.ae)(this,o,!0)&&(this.notifyPlugins("resize",{size:n}),(0,s.Q)(i.onResize,[this,n],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){var t=this.options.scales||{};(0,s.F)(t,(t,e)=>{t.id=e})}buildOrUpdateScales(){var t=this.options,e=t.scales,i=this.scales,a=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),r=[];e&&(r=r.concat(Object.keys(e).map(t=>{var i=e[t],a=tz(t,i),s="r"===a,r="x"===a;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}}))),(0,s.F)(r,e=>{var r=e.options,n=r.id,o=tz(n,r),h=(0,s.v)(r.type,e.dtype);
1(void 0===r.position||tY(r.position,o)!==tY(e.dposition))&&(r.position=e.dposition),a[n]=!0;var l=null;n in i&&i[n].type===h?l=i[n]:i[(l=new(tE.getScale(h))({id:n,type:h,ctx:this.ctx,chart:this})).id]=l,l.init(r,t)}),(0,s.F)(a,(t,e)=>{t||delete i[e]}),(0,s.F)(i,t=>{ti.configure(this,t,t.options),ti.addBox(this,t)})}_updateMetasets(){var t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(var a=e;a<i;++a)this._destroyDatasetMeta(a);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(tQ("order","index"))}_removeUnreferencedMetasets(){var{_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(){var t,e,i=[],a=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=a.length;t<e;t++){var r=a[t],n=this.getDatasetMeta(t),o=r.type||this.config.type;if(n.type&&n.type!==o&&(this._destroyDatasetMeta(t),n=this.getDatasetMeta(t)),n.type=o,n.indexAxis=r.indexAxis||tT(o,this.options),n.order=r.order||0,n.index=t,n.label=""+r.label,n.visible=this.isDatasetVisible(t),n.controller)n.controller.updateIndex(t),n.controller.linkScales();else{var h=tE.getController(o),{datasetElementType:l,dataElementType:d}=s.d.datasets[o];Object.assign(h,{dataElementType:tE.getElement(d),datasetElementType:l&&tE.getElement(l)}),n.controller=new h(this,t),i.push(n.controller)}}return this._updateMetasets(),i}_resetElements(){(0,s.F)(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){var e=this.config;e.update();var i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1!==this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){var r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");for(var n=0,o=0,h=this.data.datasets.length;o<h;o++){var{controller:l}=this.getDatasetMeta(o),d=!a&&-1===r.indexOf(l);l.buildOrUpdateElements(d),n=Math.max(+l.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),a||(0,s.F)(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tQ("z","_idx"));var{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}}_updateScales(){(0,s.F)(this.scales,t=>{ti.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){var t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,s.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){var{_hiddenIndices:t}=this;for(var{method:e,start:i,count:a}of this._getUniformDataChanges()||[])!function(t,e,i){for(var a of Object.keys(t)){var s=+a;if(s>=e){var r=t[a];delete t[a],(i>0||s>e)&&(t[s+i]=r)}}}(t,i,"_removeElements"===e?-a:a)}_getUniformDataChanges(){var t=this._dataChanges;if(t&&t.length){this._dataChanges=[];for(var e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0),r=1;r<e;r++)if(!(0,s.ag)(a,i(r)))return;return Array.from(a).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}}_updateLayout(t){if(!1!==this.notifyPlugins("beforeLayout",{cancelable:!0})){ti.update(this,this.width,this.height,t);var e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,s.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(var e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(var a=0,r=this.data.datasets.length;a<r;++a)this._updateDataset(a,(0,s.a7)(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){var i=this.getDatasetMeta(t),a={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",a)&&(i.controller._update(e),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(h.has(this)?this.attached&&!h.running(this)&&h.start(this):(this.draw(),tX({chart:this})))}draw(){if(this._resizeBeforeDraw){var t,{width:e,height:i}=this._resizeBeforeDraw;this._resize(e,i),this._resizeBeforeDraw=null}if(this.clear(),!(this.width<=0)&&!(this.height<=0)&&!1!==this.notifyPlugins("beforeDraw",{cancelable:!0})){var a=this._layers;for(t=0;t<a.length&&a[t].z<=0;++t)a[t].draw(this.chartArea);for(this._drawDatasets();t<a.length;++t)a[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}}_getSortedDatasetMetas(t){var e,i,a=this._sortedMetasets,s=[];for(e=0,i=a.length;e<i;++e){var r=a[e];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){for(var t=this.getSortedVisibleDatasetMetas(),e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}}_drawDataset(t){var e=this.ctx,i=t._clip,a=!i.disabled,r=function(t,e){var{xScale:i,yScale:a}=t;return i&&a?{left:t0(i,e,"left"),right:t0(i,e,"right"),top:t0(a,e,"top"),bottom:t0(a,e,"bottom")}:e}(t,this.chartArea),n={meta:t,index:t.index,cancelable:!0};
1!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(a&&(0,s.Y)(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),a&&(0,s.$)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,s.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,a){var s=$.modes[e];return"function"==typeof s?s(this,t,i,a):[]}getDatasetMeta(t){var e=this.data.datasets[t],i=this._metasets,a=i.filter(t=>t&&t._dataset===e).pop();return a||(a={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(a)),a}getContext(){return this.$context||(this.$context=(0,s.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){var e=this.data.datasets[t];if(!e)return!1;var 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){var a=i?"show":"hide",r=this.getDatasetMeta(t),n=r.controller._resolveAnimations(void 0,a);(0,s.h)(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(r,{visible:i}),this.update(e=>e.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){var t,e;for(this.stop(),h.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");var{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,s.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete tK[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){var t=this._listeners,e=this.platform,i=(i,a)=>{e.addEventListener(this,i,a),t[i]=a},a=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,s.F)(this.options.events,t=>i(t,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});var t,e=this._responsiveListeners,i=this.platform,a=(t,a)=>{i.addEventListener(this,t,a),e[t]=a},s=(t,a)=>{e[t]&&(i.removeEventListener(this,t,a),delete e[t])},r=(t,e)=>{this.canvas&&this.resize(t,e)},n=()=>{s("attach",n),this.attached=!0,this.resize(),a("resize",r),a("detach",t)};t=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),a("attach",n)},i.isAttached(this.canvas)?n():t()}unbindEvents(){(0,s.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,s.F)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){var a,s,r,n=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+n+"DatasetHoverStyle"](),s=0,r=t.length;s<r;++s){var o=(a=t[s])&&this.getDatasetMeta(a.datasetIndex).controller;o&&o[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){var e=this._active||[],i=t.map(t=>{var{datasetIndex:e,index:i}=t,a=this.getDatasetMeta(e);if(!a)throw Error("No dataset found at index "+e);return{datasetIndex:e,element:a.data[i],index:i}});(0,s.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){var a=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=s(e,t),n=i?t:s(t,e);r.length&&this.updateHoverStyle(r,a.mode,!1),n.length&&a.mode&&this.updateHoverStyle(n,a.mode,!0)}_eventHandler(t,e){var i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},a=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1!==this.notifyPlugins("beforeEvent",i,a)){var s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(s||i.changed)&&this.render(),this}}_handleEvent(t,e,i){var a,{_active:r=[],options:n}=this,o=this._getActiveElements(t,r,i,e),h=(0,s.ai)(t),l=(a=this._lastEvent,i&&"mouseout"!==t.type?h?a:t:null);i&&(this._lastEvent=null,(0,s.Q)(n.onHover,[t,o,this],this),h&&(0,s.Q)(n.onClick,[t,o,this],this));var d=!(0,s.ah)(o,r);return(d||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=l,d}_getActiveElements(t,e,i,a){if("mouseout"===t.type)return[];if(!i)return e;var s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,a)}}function t2(){return(0,s.F)(t1.instances,t=>t._plugins.invalidate())}function t3(t,e,i,a){return{x:i+t*Math.cos(e),y:a+t*Math.sin(e)}}function t5(t,e,i,a,r,n){var o,h,l,d,c,u,{x:g,y:p,startAngle:f,pixelMargin:v,innerRadius:m}=e,b=Math.max(e.outerRadius+a+i-v,0),x=m>0?m+a+i+v:0,_=0,y=r-f;if(a){var M=b>0?b-a:0,w=((m>0?m-a:0)+M)/2;_=(y-(0!==w?y*w/(w+a):y))/2}var k=Math.max(.001,y*b-i/s.P)/b,D=(y-k)/2,S=f+D+_,P=r-D-_,{outerStart:C,outerEnd:O,innerStart:L,innerEnd:E}=(o=P-S,h=e.options.borderRadius,l=(0,s.ak)(h,["outerStart","outerEnd","innerStart","innerEnd"]),c=Math.min(d=(b-x)/2,o*x/2),{outerStart:(u=t=>{var e=(b-Math.min(d,t))*o/2;return(0,s.S)(t,0,Math.min(d,e))})(l.outerStart),outerEnd:u(l.outerEnd),innerStart:(0,s.S)(l.innerStart,0,c),innerEnd:(0,s.S)(l.innerEnd,0,c)}),A=b-C,T=b-O,F=S+C/A,z=P-O/T,R=x+L,I=x+E,V=S+L/R,B=P-E/I;if(t.beginPath(),n){var N=(F+z)/2;if(t.arc(g,p,b,F,N),t.arc(g,p,b,N,z),O>0){var H=t3(T,z,g,p);t.arc(H.x,H.y,O,z,P+s.H)}var j=t3(I,P,g,p);if(t.lineTo(j.x,j.y),E>0){var W=t3(I,B,g,p);t.arc(W.x,W.y,E,P+s.H,B+Math.PI)}var Z=(P-E/x+(S+L/x))/2;
1if(t.arc(g,p,x,P-E/x,Z,!0),t.arc(g,p,x,Z,S+L/x,!0),L>0){var U=t3(R,V,g,p);t.arc(U.x,U.y,L,V+Math.PI,S-s.H)}var $=t3(A,S,g,p);if(t.lineTo($.x,$.y),C>0){var Y=t3(A,F,g,p);t.arc(Y.x,Y.y,C,S-s.H,F)}}else{t.moveTo(g,p);var Q=Math.cos(F)*b+g,X=Math.sin(F)*b+p;t.lineTo(Q,X);var G=Math.cos(z)*b+g,q=Math.sin(z)*b+p;t.lineTo(G,q)}t.closePath()}(0,a.Z)(t1,"defaults",s.d),(0,a.Z)(t1,"instances",tK),(0,a.Z)(t1,"overrides",s.a3),(0,a.Z)(t1,"registry",tE),(0,a.Z)(t1,"version","4.4.3"),(0,a.Z)(t1,"getChart",tJ);class t6 extends t_{constructor(t){super(),(0,a.Z)(this,"circumference",void 0),(0,a.Z)(this,"endAngle",void 0),(0,a.Z)(this,"fullCircles",void 0),(0,a.Z)(this,"innerRadius",void 0),(0,a.Z)(this,"outerRadius",void 0),(0,a.Z)(this,"pixelMargin",void 0),(0,a.Z)(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){var a=this.getProps(["x","y"],i),{angle:r,distance:n}=(0,s.D)(a,{x:t,y:e}),{startAngle:o,endAngle:h,innerRadius:l,outerRadius:d,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,g=(0,s.v)(c,h-o)>=s.T||(0,s.p)(r,o,h),p=(0,s.aj)(n,l+u,d+u);return g&&p}getCenterPoint(t){var{x:e,y:i,startAngle:a,endAngle:s,innerRadius:r,outerRadius:n}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:o,spacing:h}=this.options,l=(a+s)/2,d=(r+n+h+o)/2;return{x:e+Math.cos(l)*d,y:i+Math.sin(l)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){var{options:e,circumference:i}=this,a=(e.offset||0)/4,r=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>s.T?Math.floor(i/s.T):0,0!==i&&!(this.innerRadius<0)&&!(this.outerRadius<0)){t.save();var o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*a,Math.sin(o)*a);var h=a*(1-Math.sin(Math.min(s.P,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,a,r){var{fullCircles:n,startAngle:o,circumference:h}=e,l=e.endAngle;if(n){t5(t,e,i,a,l,r);for(var d=0;d<n;++d)t.fill();isNaN(h)||(l=o+(h%s.T||s.T))}t5(t,e,i,a,l,r),t.fill()}(t,this,h,r,n),function(t,e,i,a,r){var{fullCircles:n,startAngle:o,circumference:h,options:l}=e,{borderWidth:d,borderJoinStyle:c,borderDash:u,borderDashOffset:g}=l,p="inner"===l.borderAlign;if(d){t.setLineDash(u||[]),t.lineDashOffset=g,p?(t.lineWidth=2*d,t.lineJoin=c||"round"):(t.lineWidth=d,t.lineJoin=c||"bevel");var f=e.endAngle;if(n){t5(t,e,i,a,f,r);for(var v=0;v<n;++v)t.stroke();isNaN(h)||(f=o+(h%s.T||s.T))}p&&function(t,e,i){var{startAngle:a,pixelMargin:r,x:n,y:o,outerRadius:h,innerRadius:l}=e,d=r/h;t.beginPath(),t.arc(n,o,h,a-d,i+d),l>r?(d=r/l,t.arc(n,o,l,i+d,a-d,!0)):t.arc(n,o,r,i+s.H,a-s.H),t.closePath(),t.clip()}(t,e,f),n||(t5(t,e,i,a,f,r),t.stroke())}}(t,this,h,r,n),t.restore()}}}function t4(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=(0,s.v)(i.borderCapStyle,e.borderCapStyle),t.setLineDash((0,s.v)(i.borderDash,e.borderDash)),t.lineDashOffset=(0,s.v)(i.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,s.v)(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,s.v)(i.borderWidth,e.borderWidth),t.strokeStyle=(0,s.v)(i.borderColor,e.borderColor)}function t7(t,e,i){t.lineTo(i.x,i.y)}function t8(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t.length,{start:s=0,end:r=a-1}=i,{start:n,end:o}=e,h=Math.max(s,n),l=Math.min(r,o);return{count:a,start:h,loop:e.loop,ilen:l<h&&!(s<n&&r<n||s>o&&r>o)?a+l-h:l-h}}function t9(t,e,i,a){var r,n,o,{points:h,options:l}=e,{count:d,start:c,loop:u,ilen:g}=t8(h,i,a),p=l.stepped?s.ar:l.tension||"monotone"===l.cubicInterpolationMode?s.as:t7,{move:f=!0,reverse:v}=a||{};for(r=0;r<=g;++r)(n=h[(c+(v?g-r:r))%d]).skip||(f?(t.moveTo(n.x,n.y),f=!1):p(t,o,n,v,l.stepped),o=n);return u&&p(t,o,n=h[(c+(v?g:0))%d],v,l.stepped),!!u}function et(t,e,i,a){var s,r,n,o,h,l,d=e.points,{count:c,start:u,ilen:g}=t8(d,i,a),{move:p=!0,reverse:f}=a||{},v=0,m=0,b=t=>(u+(f?g-t:t))%c,x=()=>{o!==h&&(t.lineTo(v,h),t.lineTo(v,o),t.lineTo(v,l))};for(p&&(r=d[b(0)],t.moveTo(r.x,r.y)),s=0;s<=g;++s)if(!(r=d[b(s)]).skip){var _=r.x,y=r.y,M=0|_;M===n?(y<o?o=y:y>h&&(h=y),v=(m*v+_)/++m):(x(),t.lineTo(_,y),n=M,m=0,o=h=y),l=y}x()}function ee(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?t9:et}(0,a.Z)(t6,"id","arc"),(0,a.Z)(t6,"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,a.Z)(t6,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,a.Z)(t6,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});var ei="function"==typeof Path2D;class ea extends t_{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){var i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){var a=i.spanGaps?this._loop:this._fullLoop;(0,s.al)(this._points,i,t,a,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,s.am)(this,this.options.segment))}first(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){var i,a,r=this.options,n=t[e],o=this.points,h=(0,s.an)(this,{property:e,start:n,end:n});if(h.length){var l=[],d=r.stepped?s.ao:r.tension||"monotone"===r.cubicInterpolationMode?s.ap:s.aq;for(i=0,a=h.length;i<a;++i){var{start:c,end:u}=h[i],g=o[c],p=o[u];if(g===p){l.push(g);continue}var f=Math.abs((n-g[e])/(p[e]-g[e])),v=d(g,p,f,r.stepped);v[e]=t[e],l.push(v)}return 1===l.length?l[0]:l}}pathSegment(t,e,i){return ee(this)(t,this,e,i)}path(t,e,i){var a=this.segments,s=ee(this),r=this._loop;for(var n of(e=e||0,i=i||this.points.length-e,a))r&=s(t,this,n,{start:e,end:e+i-1});return!!r}draw(t,e,i,a){var s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,
1i,a){if(ei&&!e.options.segment){var s;(s=e._path)||(s=e._path=new Path2D,e.path(s,i,a)&&s.closePath()),t4(t,e.options),t.stroke(s)}else!function(t,e,i,a){var{segments:s,options:r}=e,n=ee(e);for(var o of s)t4(t,r,o.style),t.beginPath(),n(t,e,o,{start:i,end:i+a-1})&&t.closePath(),t.stroke()}(t,e,i,a)}(t,this,i,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function es(t,e,i,a){var s=t.options,{[i]:r}=t.getProps([i],a);return Math.abs(e-r)<s.radius+s.hitRadius}(0,a.Z)(ea,"id","line"),(0,a.Z)(ea,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,a.Z)(ea,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,a.Z)(ea,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class er extends t_{constructor(t){super(),(0,a.Z)(this,"parsed",void 0),(0,a.Z)(this,"skip",void 0),(0,a.Z)(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){var a=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return es(this,t,"x",e)}inYRange(t,e){return es(this,t,"y",e)}getCenterPoint(t){var{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){var e=(t=t||this.options||{}).radius||0,i=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+i)*2}draw(t,e){var i=this.options;!this.skip&&!(i.radius<.1)&&(0,s.C)(this,e,this.size(i)/2)&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,(0,s.at)(t,i,this.x,this.y))}getRange(){var t=this.options||{};return t.radius+t.hitRadius}}function en(t,e){var i,a,s,r,n,{x:o,y:h,base:l,width:d,height:c}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(n=c/2,i=Math.min(o,l),a=Math.max(o,l),s=h-n,r=h+n):(i=o-(n=d/2),a=o+n,s=Math.min(h,l),r=Math.max(h,l)),{left:i,top:s,right:a,bottom:r}}function eo(t,e,i,a){return t?0:(0,s.S)(e,i,a)}function eh(t,e,i,a){var r=null===e,n=null===i,o=t&&!(r&&n)&&en(t,a);return o&&(r||(0,s.aj)(e,o.left,o.right))&&(n||(0,s.aj)(i,o.top,o.bottom))}function el(t,e){t.rect(e.x,e.y,e.w,e.h)}function ed(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-a,n=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+a,y:t.y+s,w:t.w+r,h:t.h+n,radius:t.radius}}(0,a.Z)(er,"id","point"),(0,a.Z)(er,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,a.Z)(er,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class ec extends t_{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){var e,i,a,r,n,o,h,l,d,c,u,{inflateAmount:g,options:{borderColor:p,backgroundColor:f}}=this,{inner:v,outer:m}=(i=(e=en(this)).right-e.left,a=e.bottom-e.top,r=i/2,n=a/2,o=this.options.borderWidth,h=this.borderSkipped,l=(0,s.av)(o),d={t:eo(h.top,l.top,0,n),r:eo(h.right,l.right,0,r),b:eo(h.bottom,l.bottom,0,n),l:eo(h.left,l.left,0,r)},c=function(t,e,i){var{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,n=(0,s.aw)(r),o=Math.min(e,i),h=t.borderSkipped,l=a||(0,s.i)(r);return{topLeft:eo(!l||h.top||h.left,n.topLeft,0,o),topRight:eo(!l||h.top||h.right,n.topRight,0,o),bottomLeft:eo(!l||h.bottom||h.left,n.bottomLeft,0,o),bottomRight:eo(!l||h.bottom||h.right,n.bottomRight,0,o)}}(this,i/2,a/2),{outer:{x:e.left,y:e.top,w:i,h:a,radius:c},inner:{x:e.left+d.l,y:e.top+d.t,w:i-d.l-d.r,h:a-d.t-d.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(d.t,d.l)),topRight:Math.max(0,c.topRight-Math.max(d.t,d.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(d.b,d.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(d.b,d.r))}}}),b=(u=m.radius).topLeft||u.topRight||u.bottomLeft||u.bottomRight?s.au:el;t.save(),(m.w!==v.w||m.h!==v.h)&&(t.beginPath(),b(t,ed(m,g,v)),t.clip(),b(t,ed(v,-g,m)),t.fillStyle=p,t.fill("evenodd")),t.beginPath(),b(t,ed(v,g)),t.fillStyle=f,t.fill(),t.restore(
1)}inRange(t,e,i){return eh(this,t,e,i)}inXRange(t,e){return eh(this,t,null,e)}inYRange(t,e){return eh(this,null,t,e)}getCenterPoint(t){var{x:e,y:i,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+a)/2:e,y:s?i:(i+a)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}(0,a.Z)(ec,"id","bar"),(0,a.Z)(ec,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,a.Z)(ec,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var eu=Object.freeze({__proto__:null,ArcElement:t6,BarElement:ec,LineElement:ea,PointElement:er}),eg=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],ep=eg.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ef(t){return eg[t%eg.length]}function ev(t){return ep[t%ep.length]}function em(t){var e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var eb={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(i.enabled){var a,{data:{datasets:s},options:r}=t.config,{elements:n}=r;if(!(!i.forceOverride&&(em(s)||r&&(r.borderColor||r.backgroundColor)||n&&em(n)))){var o=(a=0,(e,i)=>{var s,r,n,o=t.getDatasetMeta(i).controller;o instanceof A?(s=a,e.backgroundColor=e.data.map(()=>ef(s++)),a=s):o instanceof F?(r=a,e.backgroundColor=e.data.map(()=>ev(r++)),a=r):o&&(n=a,e.borderColor=ef(n),e.backgroundColor=ev(n),a=++n)});s.forEach(o)}}}};function ex(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function e_(t){t.data.datasets.forEach(t=>{ex(t)})}var ey={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled){e_(t);return}var a=t.width;t.data.datasets.forEach((e,r)=>{var o,{_data:h,indexAxis:l}=e,d=t.getDatasetMeta(r),c=h||e.data;if("y"!==(0,s.a)([l,t.options.indexAxis])&&d.controller.supportsDecimation){var u=t.scales[d.xAxisID];if(("linear"===u.type||"time"===u.type)&&!t.options.parsing){var{start:g,count:p}=function(t,e){var i,a=e.length,r=0,{iScale:n}=t,{min:o,max:h,minDefined:l,maxDefined:d}=n.getUserBounds();return l&&(r=(0,s.S)((0,s.B)(e,n.axis,o).lo,0,a-1)),i=d?(0,s.S)((0,s.B)(e,n.axis,h).hi+1,r,a)-r:a-r,{start:r,count:i}}(d,c);if(p<=(i.threshold||4*a)){ex(e);return}switch((0,s.k)(h)&&(e._data=c,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":o=function(t,e,i,a,s){var r,n,o,h,l,d=s.samples||a;if(d>=i)return t.slice(e,e+i);var c=[],u=(i-2)/(d-2),g=0,p=e+i-1,f=e;for(r=0,c[g++]=t[f];r<d-2;r++){var v=0,m=0,b=void 0,x=Math.floor((r+1)*u)+1+e,_=Math.min(Math.floor((r+2)*u)+1,i)+e,y=_-x;for(b=x;b<_;b++)v+=t[b].x,m+=t[b].y;v/=y,m/=y;var M=Math.floor(r*u)+1+e,w=Math.min(Math.floor((r+1)*u)+1,i)+e,{x:k,y:D}=t[f];for(o=h=-1,b=M;b<w;b++)(h=.5*Math.abs((k-v)*(t[b].y-D)-(k-t[b].x)*(m-D)))>o&&(o=h,n=t[b],l=b);c[g++]=n,f=l}return c[g++]=t[p],c}(c,g,p,a,i);break;case"min-max":o=function(t,e,i,a){var r,o,h,l,d,c,u,g,p,f,v=0,m=0,b=[],x=t[e].x,_=t[e+i-1].x-x;for(r=e;r<e+i;++r){h=((o=t[r]).x-x)/_*a,l=o.y;var y=0|h;if(y===d)l<p?(p=l,c=r):l>f&&(f=l,u=r),v=(m*v+o.x)/++m;else{var M=r-1;if(!(0,s.k)(c)&&!(0,s.k)(u)){var w=Math.min(c,u),k=Math.max(c,u);w!==g&&w!==M&&b.push(n(n({},t[w]),{},{x:v})),k!==g&&k!==M&&b.push(n(n({},t[k]),{},{x:v}))}r>0&&M!==g&&b.push(t[M]),b.push(o),d=y,m=0,p=f=l,c=u=g=r}}return b}(c,g,p,a);break;default:throw Error("Unsupported decimation algorithm '".concat(i.algorithm,"'"))}e._decimated=o}}})},destroy(t){e_(t)}};function eM(t,e,i,a){if(!a){var r=e[t],n=i[t];return"angle"===t&&(r=(0,s.ay)(r),n=(0,s.ay)(n)),{property:t,start:r,end:n}}}function ew(t,e,i){for(;e>t;e--){var a=i[e];if(!isNaN(a.x)&&!isNaN(a.y))break}return e}function ek(t,e,i,a){return t&&e?a(t[i],e[i]):t?t[i]:e?e[i]:0}function eD(t,e){var i=[],a=!1;return(0,s.b)(t)?(a=!0,i=t):i=function(t,e){var{x:i=null,y:a=null}=t||{},s=e.points,r=[];
1return e.segments.forEach(t=>{var{start:e,end:n}=t;n=ew(e,n,s);var o=s[e],h=s[n];null!==a?(r.push({x:o.x,y:a}),r.push({x:h.x,y:a})):null!==i&&(r.push({x:i,y:o.y}),r.push({x:i,y:h.y}))}),r}(t,e),i.length?new ea({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function eS(t){return t&&!1!==t.fill}class eP{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){var{x:a,y:r,radius:n}=this;return e=e||{start:0,end:s.T},t.arc(a,r,n,e.end,e.start,!0),!i.bounds}interpolate(t){var{x:e,y:i,radius:a}=this,s=t.angle;return{x:e+Math.cos(s)*a,y:i+Math.sin(s)*a,angle:s}}}function eC(t,e,i){var a=function(t){var e,{chart:i,fill:a,line:r}=t;if((0,s.g)(a))return(e=i.getDatasetMeta(a))&&i.isDatasetVisible(a)?e.dataset:null;if("stack"===a)return function(t){var{scale:e,index:i,line:a}=t,r=[],n=a.segments,o=a.points,h=function(t,e){for(var i=[],a=t.getMatchingVisibleMetas("line"),s=0;s<a.length;s++){var r=a[s];if(r.index===e)break;r.hidden||i.unshift(r.dataset)}return i}(e,i);h.push(eD({x:null,y:e.bottom},a));for(var l=0;l<n.length;l++)for(var d=n[l],c=d.start;c<=d.end;c++)!function(t,e,i){for(var a=[],r=0;r<i.length;r++){var{first:n,last:o,point:h}=function(t,e,i){var a=t.interpolate(e,"x");if(!a)return{};for(var r=a.x,n=t.segments,o=t.points,h=!1,l=!1,d=0;d<n.length;d++){var c=n[d],u=o[c.start][i],g=o[c.end][i];if((0,s.aj)(r,u,g)){h=r===u,l=r===g;break}}return{first:h,last:l,point:a}}(i[r],e,"x");if(h&&(!n||!o)){if(n)a.unshift(h);else if(t.push(h),!o)break}}t.push(...a)}(r,o[c],h);return new ea({points:r,options:{}})}(t);if("shape"===a)return!0;var n=(t.scale||{}).getPointPositionForValue?function(t){var{scale:e,fill:i}=t,a=e.options,r=e.getLabels().length,n=a.reverse?e.max:e.min,o="start"===i?n:"end"===i?e.options.reverse?e.min:e.max:(0,s.i)(i)?i.value:e.getBaseValue(),h=[];if(a.grid.circular){var l=e.getPointPositionForValue(0,n);return new eP({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(var d=0;d<r;++d)h.push(e.getPointPositionForValue(d,o));return h}(t):function(t){var e,{scale:i={},fill:a}=t,r=(e=null,"start"===a?e=i.bottom:"end"===a?e=i.top:(0,s.i)(a)?e=i.getPixelForValue(a.value):i.getBasePixel&&(e=i.getBasePixel()),e);if((0,s.g)(r)){var n=i.isHorizontal();return{x:n?r:null,y:n?null:r}}return null}(t);return n instanceof eP?n:eD(n,r)}(e),{line:r,scale:n,axis:o}=e,h=r.options,l=h.fill,d=h.backgroundColor,{above:c=d,below:u=d}=l||{};a&&r.points.length&&((0,s.Y)(t,i),function(t,e){var{line:i,target:a,above:s,below:r,area:n,scale:o}=e,h=i._loop?"angle":e.axis;t.save(),"x"===h&&r!==s&&(eO(t,a,n.top),eL(t,{line:i,target:a,color:s,scale:o,property:h}),t.restore(),t.save(),eO(t,a,n.bottom)),eL(t,{line:i,target:a,color:r,scale:o,property:h}),t.restore()}(t,{line:r,target:a,above:c,below:u,area:i,scale:n,axis:o}),(0,s.$)(t))}function eO(t,e,i){var{segments:a,points:s}=e,r=!0,n=!1;for(var o of(t.beginPath(),a)){var{start:h,end:l}=o,d=s[h],c=s[ew(h,l,s)];r?(t.moveTo(d.x,d.y),r=!1):(t.lineTo(d.x,i),t.lineTo(d.x,d.y)),(n=!!e.pathSegment(t,o,{move:n}))?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function eL(t,e){var{line:i,target:a,property:r,color:n,scale:o}=e;for(var{source:h,target:l,start:d,end:c}of function(t,e,i){var a=t.segments,r=t.points,n=e.points,o=[];for(var h of a){var{start:l,end:d}=h;d=ew(l,d,r);var c=eM(i,r[l],r[d],h.loop);if(!e.segments){o.push({source:h,target:c,start:r[l],end:r[d]});continue}for(var u of(0,s.an)(e,c)){var g=eM(i,n[u.start],n[u.end],u.loop);for(var p of(0,s.ax)(h,r,g))o.push({source:p,target:u,start:{[i]:ek(c,g,"start",Math.max)},end:{[i]:ek(c,g,"end",Math.min)}})}}return o}(i,a,r)){var{style:{backgroundColor:u=n}={}}=h,g=!0!==a;t.save(),t.fillStyle=u,function(t,e,i){var{top:a,bottom:s}=e.chart.chartArea,{property:r,start:n,end:o}=i||{};"x"===r&&(t.beginPath(),t.rect(n,a,o-n,s-a),t.clip())}(t,o,g&&eM(r,d,c)),t.beginPath();var p=!!i.pathSegment(t,h),f=void 0;if(g){p?t.closePath():eE(t,a,c,r);var v=!!a.pathSegment(t,l,{move:p,reverse:!0});(f=p&&v)||eE(t,a,d,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function eE(t,e,i,a){var s=e.interpolate(i,a);s&&t.lineTo(s.x,s.y)}var eA={id:"filler",afterDatasetsUpdate(t,e,i){var a,r,n,o,h=(t.data.datasets||[]).length,l=[];for(r=0;r<h;++r)n=(a=t.getDatasetMeta(r)).dataset,o=null,n&&n.options&&n instanceof ea&&(o={visible:t.isDatasetVisible(r),index:r,fill:function(t,e,
1i){var a,r,n=function(t){var e=t.options,i=e.fill,a=(0,s.v)(i&&i.target,i);return void 0===a&&(a=!!e.backgroundColor),!1!==a&&null!==a&&(!0===a?"origin":a)}(t);if((0,s.i)(n))return!isNaN(n.value)&&n;var o=parseFloat(n);return(0,s.g)(o)&&Math.floor(o)===o?(a=n[0],r=o,("-"===a||"+"===a)&&(r=e+r),r!==e&&!(r<0)&&!(r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}(n,r,h),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:n}),a.$filler=o,l.push(o);for(r=0;r<h;++r)(o=l[r])&&!1!==o.fill&&(o.fill=function(t,e,i){var a,r=t[e].fill,n=[e];if(!i)return r;for(;!1!==r&&-1===n.indexOf(r);){if(!(0,s.g)(r))return r;if(!(a=t[r]))break;if(a.visible)return r;n.push(r),r=a.fill}return!1}(l,r,i.propagate))},beforeDraw(t,e,i){for(var a="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),r=t.chartArea,n=s.length-1;n>=0;--n){var o=s[n].$filler;o&&(o.line.updateControlPoints(r,o.axis),a&&o.fill&&eC(t.ctx,o,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"===i.drawTime)for(var a=t.getSortedVisibleDatasetMetas(),s=a.length-1;s>=0;--s){var r=a[s].$filler;eS(r)&&eC(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,i){var a=e.meta.$filler;eS(a)&&"beforeDatasetDraw"===i.drawTime&&eC(t.ctx,a,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},eT=(t,e)=>{var{boxHeight:i=e,boxWidth:a=e}=t;return t.usePointStyle&&(i=Math.min(i,e),a=t.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}},eF=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ez extends t_{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){var t=this.options.labels||{},e=(0,s.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){var t,e,{options:i,ctx:a}=this;if(!i.display){this.width=this.height=0;return}var r=i.labels,n=(0,s.a0)(r.font),o=n.size,h=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=eT(r,o);a.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(h,o,l,d)+10):(e=this.maxHeight,t=this._fitCols(h,n,l,d)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}_fitRows(t,e,i,a){var{ctx:s,maxWidth:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],h=this.lineWidths=[0],l=a+n,d=t;s.textAlign="left",s.textBaseline="middle";var c=-1,u=-l;return this.legendItems.forEach((t,g)=>{var p=i+e/2+s.measureText(t.text).width;(0===g||h[h.length-1]+p+2*n>r)&&(d+=l,h[h.length-(g>0?0:1)]=0,u+=l,c++),o[g]={left:0,top:u,row:c,width:p,height:a},h[h.length-1]+=p+n}),d}_fitCols(t,e,i,a){var{ctx:s,maxHeight:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],h=this.columnSizes=[],l=r-t,d=n,c=0,u=0,g=0,p=0;return this.legendItems.forEach((t,r)=>{var f,v,m,{itemWidth:b,itemHeight:x}={itemWidth:((f=t.text)&&"string"!=typeof f&&(f=f.reduce((t,e)=>t.length>e.length?t:e)),i+e.size/2+s.measureText(f).width),itemHeight:(v=e.lineHeight,m=a,"string"!=typeof t.text&&(m=eR(t,v)),m)};r>0&&u+x+2*n>l&&(d+=c+n,h.push({width:c,height:u}),g+=c+n,p++,c=u=0),o[r]={left:g,top:u,col:p,width:b,height:x},c=Math.max(c,b),u+=x+n}),d+=c,h.push({width:c,height:u}),d}adjustHitBoxes(){if(this.options.display){var t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:a},rtl:r}}=this,n=(0,s.az)(r,this.left,this.width);if(this.isHorizontal()){var o=0,h=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[o]);for(var l of e)o!==l.row&&(o=l.row,h=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[o])),l.top+=this.top+t+a,l.left=n.leftForLtr(n.x(h
1),l.width),h+=l.width+a}else{var d=0,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height);for(var u of e)u.col!==d&&(d=u.col,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height)),u.top=c,u.left+=this.left+a,u.left=n.leftForLtr(n.x(u.left),u.width),c+=u.height+a}}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){var t=this.ctx;(0,s.Y)(t,this),this._draw(),(0,s.$)(t)}}_draw(){var t,{options:e,columnSizes:i,lineWidths:a,ctx:r}=this,{align:n,labels:o}=e,h=s.d.color,l=(0,s.az)(e.rtl,this.left,this.width),d=(0,s.a0)(o.font),{padding:c}=o,u=d.size,g=u/2;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=d.string;var{boxWidth:p,boxHeight:f,itemHeight:v}=eT(o,u),m=function(t,e,i){if(!(isNaN(p)||p<=0||isNaN(f))&&!(f<0)){r.save();var a=(0,s.v)(i.lineWidth,1);if(r.fillStyle=(0,s.v)(i.fillStyle,h),r.lineCap=(0,s.v)(i.lineCap,"butt"),r.lineDashOffset=(0,s.v)(i.lineDashOffset,0),r.lineJoin=(0,s.v)(i.lineJoin,"miter"),r.lineWidth=a,r.strokeStyle=(0,s.v)(i.strokeStyle,h),r.setLineDash((0,s.v)(i.lineDash,[])),o.usePointStyle){var n={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},d=l.xPlus(t,p/2);(0,s.aD)(r,n,d,e+g,o.pointStyleWidth&&p)}else{var c=e+Math.max((u-f)/2,0),v=l.leftForLtr(t,p),m=(0,s.aw)(i.borderRadius);r.beginPath(),Object.values(m).some(t=>0!==t)?(0,s.au)(r,{x:v,y:c,w:p,h:f,radius:m}):r.rect(v,c,p,f),r.fill(),0!==a&&r.stroke()}r.restore()}},b=function(t,e,i){(0,s.Z)(r,i.text,t,e+v/2,d,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();t=x?{x:(0,s.a2)(n,this.left+c,this.right-a[0]),y:this.top+c+_,line:0}:{x:this.left+c,y:(0,s.a2)(n,this.top+_+c,this.bottom-i[0].height),line:0},(0,s.aA)(this.ctx,e.textDirection);var y=v+c;this.legendItems.forEach((h,u)=>{r.strokeStyle=h.fontColor,r.fillStyle=h.fontColor;var f=r.measureText(h.text).width,v=l.textAlign(h.textAlign||(h.textAlign=o.textAlign)),M=p+g+f,w=t.x,k=t.y;if(l.setWidth(this.width),x?u>0&&w+M+c>this.right&&(k=t.y+=y,t.line++,w=t.x=(0,s.a2)(n,this.left+c,this.right-a[t.line])):u>0&&k+y>this.bottom&&(w=t.x=w+i[t.line].width+c,t.line++,k=t.y=(0,s.a2)(n,this.top+_+c,this.bottom-i[t.line].height)),m(l.x(w),k,h),w=(0,s.aB)(v,w+p+g,x?w+M:this.right,e.rtl),b(l.x(w),k,h),x)t.x+=M+c;else if("string"!=typeof h.text){var D=d.lineHeight;t.y+=eR(h,D)+c}else t.y+=y}),(0,s.aC)(this.ctx,e.textDirection)}drawTitle(){var t,e=this.options,i=e.title,a=(0,s.a0)(i.font),r=(0,s.E)(i.padding);if(i.display){var n=(0,s.az)(e.rtl,this.left,this.width),o=this.ctx,h=i.position,l=a.size/2,d=r.top+l,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+d,c=(0,s.a2)(e.align,c,this.right-u);else{var g=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=d+(0,s.a2)(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}var p=(0,s.a2)(h,c,c+u);o.textAlign=n.textAlign((0,s.a1)(h)),o.textBaseline="middle",o.strokeStyle=i.color,o.fillStyle=i.color,o.font=a.string,(0,s.Z)(o,i.text,p,t,a)}}_computeTitleHeight(){var t=this.options.title,e=(0,s.a0)(t.font),i=(0,s.E)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){var i,a,r;if((0,s.aj)(t,this.left,this.right)&&(0,s.aj)(e,this.top,this.bottom)){for(i=0,r=this.legendHitBoxes;i<r.length;++i)if(a=r[i],(0,s.aj)(t,a.left,a.left+a.width)&&(0,s.aj)(e,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(t){var e,i=this.options;if(("mousemove"===(e=t.type)||"mouseout"===e)&&(i.onHover||i.onLeave)||i.onClick&&("click"===e||"mouseup"===e)){var a=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){var r=this._hoveredItem,n=eF(r,a);r&&!n&&(0,s.Q)(i.onLeave,[t,r,this],this),this._hoveredItem=a,a&&!n&&(0,s.Q)(i.onHover,[t,a,this],this)}else a&&(0,s.Q)(i.onClick,[t,a,this],this)}}}function eR(t,e){return e*(t.text?t.text.length:0)}var eI={id:"legend",_element:ez,start(t,e,i){var a=t.legend=new ez({ctx:t.ctx,options:i,chart:t});ti.configure(t,a,i),ti.addBox(t,a)},stop(t){ti.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){var a=t.legend;ti.configure(t,a,i),a.options=i},afterUpdate(t){var e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)}
1,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){var a=e.datasetIndex,s=i.chart;s.isDatasetVisible(a)?(s.hide(a),e.hidden=!0):(s.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){var e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:r,color:n,useBorderRadius:o,borderRadius:h}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{var l=t.controller.getStyle(i?0:void 0),d=(0,s.E)(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:l.borderColor,pointStyle:a||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(h||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class eV extends t_{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){var i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;var a=(0,s.b)(i.text)?i.text.length:1;this._padding=(0,s.E)(i.padding);var r=a*(0,s.a0)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){var t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){var e,i,a,{top:r,left:n,bottom:o,right:h,options:l}=this,d=l.align,c=0;return this.isHorizontal()?(i=(0,s.a2)(d,n,h),a=r+t,e=h-n):("left"===l.position?(i=n+t,a=(0,s.a2)(d,o,r),c=-.5*s.P):(i=h-t,a=(0,s.a2)(d,r,o),c=.5*s.P),e=o-r),{titleX:i,titleY:a,maxWidth:e,rotation:c}}draw(){var t=this.ctx,e=this.options;if(e.display){var i=(0,s.a0)(e.font),a=i.lineHeight/2+this._padding.top,{titleX:r,titleY:n,maxWidth:o,rotation:h}=this._drawArgs(a);(0,s.Z)(t,e.text,0,0,i,{color:e.color,maxWidth:o,rotation:h,textAlign:(0,s.a1)(e.align),textBaseline:"middle",translation:[r,n]})}}}var eB={id:"title",_element:eV,start(t,e,i){var a;a=new eV({ctx:t.ctx,options:i,chart:t}),ti.configure(t,a,i),ti.addBox(t,a),t.titleBlock=a},stop(t){var e=t.titleBlock;ti.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){var a=t.titleBlock;ti.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},eN=new WeakMap,eH={id:"subtitle",start(t,e,i){var a=new eV({ctx:t.ctx,options:i,chart:t});ti.configure(t,a,i),ti.addBox(t,a),eN.set(t,a)},stop(t){ti.removeBox(t,eN.get(t)),eN.delete(t)},beforeUpdate(t,e,i){var a=eN.get(t);ti.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ej={average(t){if(!t.length)return!1;var e,i,a=new Set,s=0,r=0;for(e=0,i=t.length;e<i;++e){var n=t[e].element;if(n&&n.hasValue()){var o=n.tooltipPosition();a.add(o.x),s+=o.y,++r}}return{x:[...a].reduce((t,e)=>t+e)/a.size,y:s/r}},nearest(t,e){if(!t.length)return!1;var i,a,r,n=e.x,o=e.y,h=Number.POSITIVE_INFINITY;for(i=0,a=t.length;i<a;++i){var l=t[i].element;if(l&&l.hasValue()){var d=l.getCenterPoint(),c=(0,s.aE)(e,d);c<h&&(h=c,r=l)}}if(r){var u=r.tooltipPosition();n=u.x,o=u.y}return{x:n,y:o}}};function eW(t,e){return e&&((0,s.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function eZ(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function eU(t,e){var i=t.chart.ctx,{body:a,footer:r,title:n}=t,{boxWidth:o,boxHeight:h}=e,l=(0,s.a0)(e.bodyFont),d=(0,s.a0)(e.titleFont),c=(0,s.a0)(e.footerFont),u=n.length,g=r.length,p=a.length,f=(0,s.E)(e.padding),v=f.height,m=0,b=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,u&&(v+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b&&(v+=p*(e.displayColors?Math.max(h,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing),g&&(v+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing);var x=0,_=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=d.string,(0,s.F)(t.title,_),i.font=l.string,(0,s.F)(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?o+2+e.boxPadding:0,(0,s.F)(a,t=>{(0,s.F)(t.before,_),(0,s.F)(t.lines,_),(0,s.F)(t.after,_)}
1),x=0,i.font=c.string,(0,s.F)(t.footer,_),i.restore(),{width:m+=f.width,height:v}}function e$(t,e,i){var a=i.yAlign||e.yAlign||function(t,e){var{y:i,height:a}=e;return i<a/2?"top":i>t.height-a/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,a){var{x:s,width:r}=i,{width:n,chartArea:{left:o,right:h}}=t,l="center";return"center"===a?l=s<=(o+h)/2?"left":"right":s<=r/2?l="left":s>=n-r/2&&(l="right"),function(t,e,i,a){var{x:s,width:r}=a,n=i.caretSize+i.caretPadding;if("left"===t&&s+r+n>e.width||"right"===t&&s-r-n<0)return!0}(l,t,e,i)&&(l="center"),l}(t,e,i,a),yAlign:a}}function eY(t,e,i,a){var{caretSize:r,caretPadding:n,cornerRadius:o}=t,{xAlign:h,yAlign:l}=i,d=r+n,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.aw)(o),f=function(t,e){var{x:i,width:a}=t;return"right"===e?i-=a:"center"===e&&(i-=a/2),i}(e,h),v=function(t,e,i){var{y:a,height:s}=t;return"top"===e?a+=i:"bottom"===e?a-=s+i:a-=s/2,a}(e,l,d);return"center"===l?"left"===h?f+=d:"right"===h&&(f-=d):"left"===h?f-=Math.max(c,g)+r:"right"===h&&(f+=Math.max(u,p)+r),{x:(0,s.S)(f,0,a.width-e.width),y:(0,s.S)(v,0,a.height-e.height)}}function eQ(t,e,i){var a=(0,s.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-a.right:t.x+a.left}function eX(t,e){var i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}var eG={beforeTitle:s.aF,title(t){if(t.length>0){var e=t[0],i=e.chart.data.labels,a=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return i[e.dataIndex]}return""},afterTitle:s.aF,beforeBody:s.aF,beforeLabel:s.aF,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;var e=t.dataset.label||"";e&&(e+=": ");var i=t.formattedValue;return(0,s.k)(i)||(e+=i),e},labelColor(t){var 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){var e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:s.aF,afterBody:s.aF,beforeFooter:s.aF,footer:s.aF,afterFooter:s.aF};function eq(t,e,i,a){var s=t[e].call(i,a);return void 0===s?eG[e].call(i,a):s}class eK extends t_{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(){var t=this._cachedAnimations;if(t)return t;var e=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&e.options.animation&&i.animations,s=new u(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){var t,e;return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,(0,s.j)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){var{callbacks:i}=e,a=eq(i,"beforeTitle",this,t),s=eq(i,"title",this,t),r=eq(i,"afterTitle",this,t),n=[];return n=eW(n,eZ(a)),n=eW(n,eZ(s)),n=eW(n,eZ(r))}getBeforeBody(t,e){return eW([],eZ(eq(e.callbacks,"beforeBody",this,t)))}getBody(t,e){var{callbacks:i}=e,a=[];return(0,s.F)(t,t=>{var e={before:[],lines:[],after:[]},s=eX(i,t);eW(e.before,eZ(eq(s,"beforeLabel",this,t))),eW(e.lines,eq(s,"label",this,t)),eW(e.after,eZ(eq(s,"afterLabel",this,t))),a.push(e)}),a}getAfterBody(t,e){return eW([],eZ(eq(e.callbacks,"afterBody",this,t)))}getFooter(t,e){var{callbacks:i}=e,a=eq(i,"beforeFooter",this,t),s=eq(i,"footer",this,t),r=eq(i,"afterFooter",this,t),n=[];return n=eW(n,eZ(a)),n=eW(n,eZ(s)),n=eW(n,eZ(r))}_createItems(t){var e,i,a=this._active,r=this.chart.data,n=[],o=[],h=[],l=[];for(e=0,i=a.length;e<i;++e)l.push(function(t,e){var{element:i,datasetIndex:a,index:s}=e,r=t.getDatasetMeta(a).controller,{label:n,value:o}=r.getLabelAndValue(s);return{chart:t,label:n,parsed:r.getParsed(s),raw:t.data.datasets[a].data[s],formattedValue:o,dataset:r.getDataset(),dataIndex:s,datasetIndex:a,element:i}}(this.chart,a[e]));return t.filter&&(l=l.filter((e,i,a)=>t.filter(e,i,a,r))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,r))),(0,s.F)(l,e=>{var i=eX(t.callbacks,e);n.push(eq(i,"labelColor",this,e)),o.push(eq(i,"labelPointStyle",this,e)),h.push(eq(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=h,this.dataPoints=l,l}update(t,e){var i,a=this.options.setContext(this.getContext()),s=this._active,r=[];if(s.length){var n=ej[a.position].call(this,s,this._eventPosition);r=this._createItems(a),this.title=this.getTitle(r,a),this.beforeBody=this.getBeforeBody(r,a),this.body=this.getBody(r,a),this.afterBody=this.getAfterBody(r,a),this.footer=this.getFooter(r,a);var o=this._size=eU(this,a),h=Object.assign({},n,o),l=e$(this.chart,a,h),d=eY(a,h,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,i={opacity:1,x:d.x,y:d.y,width:o.width,height:o.height,caretX:n.x,
1caretY:n.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=r,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,a){var s=this.getCaretPosition(t,i,a);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){var a,r,n,o,h,l,{xAlign:d,yAlign:c}=this,{caretSize:u,cornerRadius:g}=i,{topLeft:p,topRight:f,bottomLeft:v,bottomRight:m}=(0,s.aw)(g),{x:b,y:x}=t,{width:_,height:y}=e;return"center"===c?(h=x+y/2,"left"===d?(r=(a=b)-u,o=h+u,l=h-u):(r=(a=b+_)+u,o=h-u,l=h+u),n=a):(r="left"===d?b+Math.max(p,v)+u:"right"===d?b+_-Math.max(f,m)-u:this.caretX,"top"===c?(h=(o=x)-u,a=r-u,n=r+u):(h=(o=x+y)+u,a=r+u,n=r-u),l=o),{x1:a,x2:r,x3:n,y1:o,y2:h,y3:l}}drawTitle(t,e,i){var a,r,n,o=this.title,h=o.length;if(h){var l=(0,s.az)(i.rtl,this.x,this.width);for(n=0,t.x=eQ(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.a0)(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string;n<h;++n)e.fillText(o[n],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,n+1===h&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,a,r){var n=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:h,boxWidth:l}=r,d=(0,s.a0)(r.bodyFont),c=eQ(this,"left",r),u=a.x(c),g=h<d.lineHeight?(d.lineHeight-h)/2:0,p=e.y+g;if(r.usePointStyle){var f={radius:Math.min(l,h)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},v=a.leftForLtr(u,l)+l/2,m=p+h/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,(0,s.at)(t,f,v,m),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,(0,s.at)(t,f,v,m)}else{t.lineWidth=(0,s.i)(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;var b=a.leftForLtr(u,l),x=a.leftForLtr(a.xPlus(u,1),l-2),_=(0,s.aw)(n.borderRadius);Object.values(_).some(t=>0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,(0,s.au)(t,{x:b,y:p,w:l,h:h,radius:_}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),(0,s.au)(t,{x:x,y:p+1,w:l-2,h:h-2,radius:_}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,p,l,h),t.strokeRect(b,p,l,h),t.fillStyle=n.backgroundColor,t.fillRect(x,p+1,l-2,h-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){var a,r,n,o,h,l,d,{body:c}=this,{bodySpacing:u,bodyAlign:g,displayColors:p,boxHeight:f,boxWidth:v,boxPadding:m}=i,b=(0,s.a0)(i.bodyFont),x=b.lineHeight,_=0,y=(0,s.az)(i.rtl,this.x,this.width),M=function(i){e.fillText(i,y.x(t.x+_),t.y+x/2),t.y+=x+u},w=y.textAlign(g);for(e.textAlign=g,e.textBaseline="middle",e.font=b.string,t.x=eQ(this,w,i),e.fillStyle=i.bodyColor,(0,s.F)(this.beforeBody,M),_=p&&"right"!==w?"center"===g?v/2+m:v+2+m:0,o=0,l=c.length;o<l;++o){for(a=c[o],r=this.labelTextColors[o],e.fillStyle=r,(0,s.F)(a.before,M),n=a.lines,p&&n.length&&(this._drawColorBox(e,t,o,y,i),x=Math.max(b.lineHeight,f)),h=0,d=n.length;h<d;++h)M(n[h]),x=b.lineHeight;(0,s.F)(a.after,M)}_=0,x=b.lineHeight,(0,s.F)(this.afterBody,M),t.y-=u}drawFooter(t,e,i){var a,r,n=this.footer,o=n.length;if(o){var h=(0,s.az)(i.rtl,this.x,this.width);for(t.x=eQ(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=h.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,s.a0)(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){var{xAlign:r,yAlign:n}=this,{x:o,y:h}=t,{width:l,height:d}=i,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.aw)(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(o+c,h),"top"===n&&this.drawCaret(t,e,i,a),e.lineTo(o+l-u,h),e.quadraticCurveTo(o+l,h,o+l,h+u),"center"===n&&"right"===r&&this.drawCaret(t,e,i,a),e.lineTo(o+l,h+d-p),e.quadraticCurveTo(o+l,h+d,o+l-p,h+d),"bottom"===n&&this.drawCaret(t,e,i,a),e.lineTo(o+g,h+d),e.quadraticCurveTo(o,h+d,o,h+d-g),"center"===n&&"left"===r&&this.drawCaret(t,e,i,a),e.lineTo(o,h+c),e.quadraticCurveTo(o,h,o+c,h),e.closePath(),e.fill(),a.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){var e=this.chart,i=this.$animations,a=i&&i.x,s=i&&i.y;if(a||s){var r=ej[t.position].call(this,this._active,this._eventPosition);if(!r)return;var n=this._size=eU(this,t),o=Object.assign({},r,this._size),h=e$(e,t,o),l=eY(t,o,h,e);
1(a._to!==l.x||s._to!==l.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=n.width,this.height=n.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){var e=this.options.setContext(this.getContext()),i=this.opacity;if(i){this._updateAnimationTarget(e);var a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;var n=(0,s.E)(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,a,e),(0,s.aA)(t,e.textDirection),r.y+=n.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),(0,s.aC)(t,e.textDirection),t.restore())}}getActiveElements(){return this._active||[]}setActiveElements(t,e){var i=this._active,a=t.map(t=>{var{datasetIndex:e,index:i}=t,a=this.chart.getDatasetMeta(e);if(!a)throw Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:a.data[i],index:i}}),r=!(0,s.ah)(i,a),n=this._positionChanged(a,e);(r||n)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){var i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var a=this.options,r=this._active||[],n=this._getActiveElements(t,r,e,i),o=this._positionChanged(n,t),h=e||!(0,s.ah)(n,r)||o;return h&&(this._active=n,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),h}_getActiveElements(t,e,i,a){var s=this.options;if("mouseout"===t.type)return[];if(!a)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));var r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){var{caretX:i,caretY:a,options:s}=this,r=ej[s.position].call(this,t,e);return!1!==r&&(i!==r.x||a!==r.y)}}(0,a.Z)(eK,"positioners",ej);var eJ={id:"tooltip",_element:eK,positioners:ej,afterInit(t,e,i){i&&(t.tooltip=new eK({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){var e=t.tooltip;if(e&&e._willRender()){var i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",n(n({},i),{},{cancelable:!0})))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){var 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)=>e.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:eG},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"]},e0=Object.freeze({__proto__:null,Colors:eb,Decimation:ey,Filler:eA,Legend:eI,SubTitle:eH,Title:eB,Tooltip:eJ}),e1=(t,e,i,a)=>("string"==typeof e?(i=t.push(e)-1,a.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),e2=(t,e)=>null===t?null:(0,s.S)(Math.round(t),0,e);function e3(t){var e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class e5 extends tC{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){var e=this._addedLabels;if(e.length){var i=this.getLabels();for(var{index:a,label:s}of e)i[a]===s&&i.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,s.k)(t))return null;var i,a,r,n=this.getLabels();return e2(e=isFinite(e)&&n[e]===t?e:(i=(0,s.v)(e,t),a=this._addedLabels,-1===(r=n.indexOf(t))?e1(n,t,i,a):r!==n.lastIndexOf(t)?i:r),n.length-1)}determineDataLimits(){var{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:a}=this.getMinMax(!0);"ticks"!==this.options.bounds||(t||(i=0),e||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){var t=this.min,e=this.max,i=this.options.offset,a=[],s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(var r=t;r<=e;r++)a.push({value:r});return a}getLabelForValue(t){return e3.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){var 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 e6(t,e,i){var{horizontal:a,minRotation:r}=i,n=(0,s.t)(r),o=.75*e*(""+t).length;return Math.min(e/((a?Math.sin(n):Math.cos(n))||.001),o)}(0,a.Z)(e5,"id","category"),(0,a.Z)(e5,"defaults",{ticks:{callback:e3}});class e4 extends tC{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,s.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){var{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:a,max:r}=this,n=t=>a=e?a:t,o=t=>r=i?r:t;if(t){var h=(0,s.s)(a),l=(0,s.s)(r);h<0&&l<0?o(0):h>0&&l>0&&n(0)}if(a===r){var d=0===r?1:Math.abs(.05*r);o(r+d),t||n(a-d)}this.min=a,this.max=r}getTickLimit(){var t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(i," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){var t=this.options,e=t.ticks,i=this.getTickLimit(),a=function(t,e){var i,a,r,n,o=[],{bounds:h,step:l,min:d,max:c,precision:u,count:g,maxTicks:p,maxDigits:f,includeBounds:v}=t,m=l||1,b=p-1,{min:x,max:_}
1=e,y=!(0,s.k)(d),M=!(0,s.k)(c),w=!(0,s.k)(g),k=(_-x)/(f+1),D=(0,s.aH)((_-x)/b/m)*m;if(D<1e-14&&!y&&!M)return[{value:x},{value:_}];(n=Math.ceil(_/D)-Math.floor(x/D))>b&&(D=(0,s.aH)(n*D/b/m)*m),(0,s.k)(u)||(D=Math.ceil(D*(i=Math.pow(10,u)))/i),"ticks"===h?(a=Math.floor(x/D)*D,r=Math.ceil(_/D)*D):(a=x,r=_),y&&M&&l&&(0,s.aI)((c-d)/l,D/1e3)?(n=Math.round(Math.min((c-d)/D,p)),D=(c-d)/n,a=d,r=c):w?(a=y?d:a,D=((r=M?c:r)-a)/(n=g-1)):(n=(r-a)/D,n=(0,s.aJ)(n,Math.round(n),D/1e3)?Math.round(n):Math.ceil(n));var S=Math.max((0,s.aK)(D),(0,s.aK)(a));a=Math.round(a*(i=Math.pow(10,(0,s.k)(u)?S:u)))/i,r=Math.round(r*i)/i;var P=0;for(y&&(v&&a!==d?(o.push({value:d}),a<d&&P++,(0,s.aJ)(Math.round((a+P*D)*i)/i,d,e6(d,k,t))&&P++):a<d&&P++);P<n;++P){var C=Math.round((a+P*D)*i)/i;if(M&&C>c)break;o.push({value:C})}return M&&v&&r!==c?o.length&&(0,s.aJ)(o[o.length-1].value,c,e6(c,k,t))?o[o.length-1].value=c:o.push({value:c}):M&&r!==c||o.push({value:r}),o}({maxTicks:i=Math.max(2,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,s.aG)(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){var t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){var a=(i-e)/Math.max(t.length-1,1)/2;e-=a,i+=a}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return(0,s.o)(t,this.chart.options.locale,this.options.ticks.format)}}class e7 extends e4{determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?t:0,this.max=(0,s.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){var t=this.isHorizontal(),e=t?this.width:this.height,i=(0,s.t)(this.options.ticks.minRotation);return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/((t?Math.sin(i):Math.cos(i))||.001)))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}(0,a.Z)(e7,"id","linear"),(0,a.Z)(e7,"defaults",{ticks:{callback:s.aL.formatters.numeric}});var e8=t=>Math.floor((0,s.aM)(t)),e9=(t,e)=>Math.pow(10,e8(t)+e);function it(t){return 1==t/Math.pow(10,e8(t))}function ie(t,e,i){var a=Math.pow(10,i);return Math.ceil(e/a)-Math.floor(t/a)}class ii extends tC{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){var i=e4.prototype.parse.apply(this,[t,e]);if(0===i){this._zero=!0;return}return(0,s.g)(i)&&i>0?i:null}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?Math.max(0,t):null,this.max=(0,s.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,s.g)(this._userMin)&&(this.min=t===e9(this.min,0)?e9(this.min,-1):e9(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){var{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,a=this.max,s=e=>i=t?i:e,r=t=>a=e?a:t;i===a&&(i<=0?(s(1),r(10)):(s(e9(i,-1)),r(e9(a,1)))),i<=0&&s(e9(a,-1)),a<=0&&r(e9(i,1)),this.min=i,this.max=a}buildTicks(){var t=this.options,e=function(t,e){var{min:i,max:a}=e;i=(0,s.O)(t.min,i);for(var r=[],n=e8(i),o=function(t,e){for(var i=e8(e-t);ie(t,e,i)>10;)i++;for(;10>ie(t,e,i);)i--;return Math.min(i,e8(t))}(i,a),h=o<0?Math.pow(10,Math.abs(o)):1,l=Math.pow(10,o),d=n>o?Math.pow(10,n):0,c=Math.round((i-d)*h)/h,u=Math.floor((i-d)/l/10)*l*10,g=Math.floor((c-u)/Math.pow(10,o)),p=(0,s.O)(t.min,Math.round((d+u+g*Math.pow(10,o))*h)/h);p<a;)r.push({value:p,major:it(p),significand:g}),g>=10?g=g<15?15:20:g++,g>=20&&(g=2,h=++o>=0?1:h),p=Math.round((d+u+g*Math.pow(10,o))*h)/h;var f=(0,s.O)(t.max,p);return r.push({value:f,major:it(f),significand:g}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,s.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,s.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){var t=this.min;super.configure(),this._startValue=(0,s.aM)(t),this._valueRange=(0,s.aM)(this.max)-(0,s.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,s.aM)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){var e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function ia(t){var e=t.ticks;if(e.display&&t.display){var i=(0,s.E)(e.backdropPadding);return(0,s.v)(e.font&&e.font.size,s.d.font.size)+i.height}return 0}
1function is(t,e,i,a,s){return t===a||t===s?{start:e-i/2,end:e+i/2}:t<a||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function ir(t,e,i,a){var{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,s.T);else{var n=t.getPointPosition(0,e);r.moveTo(n.x,n.y);for(var o=1;o<a;o++)n=t.getPointPosition(o,e),r.lineTo(n.x,n.y)}}(0,a.Z)(ii,"id","logarithmic"),(0,a.Z)(ii,"defaults",{ticks:{callback:s.aL.formatters.logarithmic,major:{enabled:!0}}});class io extends e4{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){var t=this._padding=(0,s.E)(ia(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(){var{min:t,max:e}=this.getMinMax(!1);this.min=(0,s.g)(t)&&!isNaN(t)?t:0,this.max=(0,s.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ia(this.options))}generateTickLabels(t){e4.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{var i=(0,s.Q)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){var t=this.options;t.display&&t.pointLabels.display?function(t){for(var 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),a=[],r=[],n=t._pointLabels.length,o=t.options.pointLabels,h=o.centerPointLabels?s.P/n:0,l=0;l<n;l++){var d,c,u=o.setContext(t.getPointLabelContext(l));r[l]=u.padding;var g=t.getPointPosition(l,t.drawingArea+r[l],h),p=(0,s.a0)(u.font),f=(d=t.ctx,c=t._pointLabels[l],c=(0,s.b)(c)?c:[c],{w:(0,s.aN)(d,p.string,c),h:c.length*p.lineHeight});a[l]=f;var v=(0,s.ay)(t.getIndexAngle(l)+h),m=Math.round((0,s.U)(v));!function(t,e,i,a,s){var r=Math.abs(Math.sin(i)),n=Math.abs(Math.cos(i)),o=0,h=0;a.start<e.l?(o=(e.l-a.start)/r,t.l=Math.min(t.l,e.l-o)):a.end>e.r&&(o=(a.end-e.r)/r,t.r=Math.max(t.r,e.r+o)),s.start<e.t?(h=(e.t-s.start)/n,t.t=Math.min(t.t,e.t-h)):s.end>e.b&&(h=(s.end-e.b)/n,t.b=Math.max(t.b,e.b+h))}(i,e,v,is(m,g.x,f.w,0,180),is(m,g.y,f.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){for(var a,r=[],n=t._pointLabels.length,o=t.options,{centerPointLabels:h,display:l}=o.pointLabels,d={extra:ia(o)/2,additionalAngle:h?s.P/n:0},c=0;c<n;c++){d.padding=i[c],d.size=e[c];var u=function(t,e,i){var a,r,n,o,h=t.drawingArea,{extra:l,additionalAngle:d,padding:c,size:u}=i,g=t.getPointPosition(e,h+l+c,d),p=Math.round((0,s.U)((0,s.ay)(g.angle+s.H))),f=(a=g.y,r=u.h,90===p||270===p?a-=r/2:(p>270||p<90)&&(a-=r),a),v=0===p||180===p?"center":p<180?"left":"right",m=(n=g.x,o=u.w,"right"===v?n-=o:"center"===v&&(n-=o/2),n);return{visible:!0,x:g.x,y:f,textAlign:v,left:m,top:f,right:m+u.w,bottom:f+u.h}}(t,c,d);r.push(u),"auto"===l&&(u.visible=function(t,e){if(!e)return!0;var{left:i,top:a,right:r,bottom:n}=t;return!((0,s.C)({x:i,y:a},e)||(0,s.C)({x:i,y:n},e)||(0,s.C)({x:r,y:a},e)||(0,s.C)({x:r,y:n},e))}(u,a),u.visible&&(a=u))}return r}(t,a,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,a){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,a))}getIndexAngle(t){var e=s.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,s.ay)(t*e+(0,s.t)(i))}getDistanceFromCenterForValue(t){if((0,s.k)(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,s.k)(t))return NaN;var e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){var e=this._pointLabels||[];if(t>=0&&t<e.length){var i,a=e[t];return i=this.getContext(),(0,s.j)(i,{label:a,index:t,type:"pointLabel"})}}getPointPosition(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.getIndexAngle(t)-s.H+i;return{x:Math.cos(a)*e+this.xCenter,y:Math.sin(a)*e+this.yCenter,angle:a}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){var{left:e,top:i,right:a,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:a,bottom:s}}
1drawBackground(){var{backgroundColor:t,grid:{circular:e}}=this.options;if(t){var i=this.ctx;i.save(),i.beginPath(),ir(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){var t,e,i,a=this.ctx,r=this.options,{angleLines:n,grid:o,border:h}=r,l=this._pointLabels.length;if(r.pointLabels.display&&function(t,e){for(var{ctx:i,options:{pointLabels:a}}=t,r=e-1;r>=0;r--){var n=t._pointLabelItems[r];if(n.visible){var o=a.setContext(t.getPointLabelContext(r));!function(t,e,i){var{left:a,top:r,right:n,bottom:o}=i,{backdropColor:h}=e;if(!(0,s.k)(h)){var l=(0,s.aw)(e.borderRadius),d=(0,s.E)(e.backdropPadding);t.fillStyle=h;var c=a-d.left,u=r-d.top,g=n-a+d.width,p=o-r+d.height;Object.values(l).some(t=>0!==t)?(t.beginPath(),(0,s.au)(t,{x:c,y:u,w:g,h:p,radius:l}),t.fill()):t.fillRect(c,u,g,p)}}(i,o,n);var h=(0,s.a0)(o.font),{x:l,y:d,textAlign:c}=n;(0,s.Z)(i,t._pointLabels[r],l,d+h.lineHeight/2,h,{color:o.color,textAlign:c,textBaseline:"middle"})}}}(this,l),o.display&&this.ticks.forEach((t,i)=>{if(0!==i||0===i&&this.min<0){e=this.getDistanceFromCenterForValue(t.value);var a=this.getContext(i),s=o.setContext(a),r=h.setContext(a);!function(t,e,i,a,s){var r=t.ctx,n=e.circular,{color:o,lineWidth:h}=e;(n||a)&&o&&h&&!(i<0)&&(r.save(),r.strokeStyle=o,r.lineWidth=h,r.setLineDash(s.dash),r.lineDashOffset=s.dashOffset,r.beginPath(),ir(t,i,n,a),r.closePath(),r.stroke(),r.restore())}(this,s,e,l,r)}}),n.display){for(a.save(),t=l-1;t>=0;t--){var d=n.setContext(this.getPointLabelContext(t)),{color:c,lineWidth:u}=d;u&&c&&(a.lineWidth=u,a.strokeStyle=c,a.setLineDash(d.borderDash),a.lineDashOffset=d.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){var t,e,i=this.ctx,a=this.options,r=a.ticks;if(r.display){var n=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((n,o)=>{if(0!==o||!(this.min>=0)||a.reverse){var h=r.setContext(this.getContext(o)),l=(0,s.a0)(h.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),h.showLabelBackdrop){i.font=l.string,e=i.measureText(n.label).width,i.fillStyle=h.backdropColor;var d=(0,s.E)(h.backdropPadding);i.fillRect(-e/2-d.left,-t-l.size/2-d.top,e+d.width,l.size+d.height)}(0,s.Z)(i,n.label,0,-t,l,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}}),i.restore()}}drawTitle(){}}(0,a.Z)(io,"id","radialLinear"),(0,a.Z)(io,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:s.aL.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),(0,a.Z)(io,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,a.Z)(io,"descriptors",{angleLines:{_fallback:"grid"}});var ih={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}},il=Object.keys(ih);function id(t,e){return t-e}function ic(t,e){if((0,s.k)(e))return null;var i=t._adapter,{parser:a,round:r,isoWeekday:n}=t._parseOpts,o=e;return("function"==typeof a&&(o=a(o)),(0,s.g)(o)||(o="string"==typeof a?i.parse(o,a):i.parse(o)),null===o)?null:(r&&(o="week"===r&&((0,s.x)(n)||!0===n)?i.startOf(o,"isoWeek",n):i.startOf(o,r)),+o)}function iu(t,e,i,a){for(var s=il.length,r=il.indexOf(t);r<s-1;++r){var n=ih[il[r]],o=n.steps?n.steps:Number.MAX_SAFE_INTEGER;if(n.common&&Math.ceil((i-e)/(o*n.size))<=a)return il[r]}return il[s-1]}function ig(t,e,i){if(i){if(i.length){var{lo:a,hi:r}=(0,s.aP)(i,e);t[i[a]>=e?i[a]:i[r]]=!0}}else t[e]=!0}function ip(t,e,i){var a,s,r=[],n={},o=e.length;for(a=0;a<o;++a)n[s=e[a]]=a,r.push({value:s,major:!1});
1return 0!==o&&i?function(t,e,i,a){var s,r,n=t._adapter,o=+n.startOf(e[0].value,a),h=e[e.length-1].value;for(s=o;s<=h;s=+n.add(s,1,a))(r=i[s])>=0&&(e[r].major=!0);return e}(t,r,n,i):r}class iv extends tC{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){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.time||(t.time={}),a=this._adapter=new H._date(t.adapters.date);a.init(e),(0,s.ab)(i.displayFormats,a.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:ic(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){var t=this.options,e=this._adapter,i=t.time.unit||"day",{min:a,max:r,minDefined:n,maxDefined:o}=this.getUserBounds();function h(t){n||isNaN(t.min)||(a=Math.min(a,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}n&&o||(h(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&h(this.getMinMax(!1))),a=(0,s.g)(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=(0,s.g)(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){var t=this.options,e=t.time,i=t.ticks,a="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);var r=this.min,n=this.max,o=(0,s.aO)(a,r,n);return this._unit=e.unit||(i.autoSkip?iu(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,a,s){for(var r=il.length-1;r>=il.indexOf(i);r--){var n=il[r];if(ih[n].common&&t._adapter.diff(s,a,n)>=e-1)return n}return il[i?il.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(var e=il.indexOf(t)+1,i=il.length;e<i;++e)if(ih[il[e]].common)return il[e]}(this._unit):void 0,this.initOffsets(a),t.reverse&&o.reverse(),ip(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(){var t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=0,r=0;this.options.offset&&i.length&&(t=this.getDecimalForValue(i[0]),a=1===i.length?1-t:(this.getDecimalForValue(i[1])-t)/2,e=this.getDecimalForValue(i[i.length-1]),r=1===i.length?e:(e-this.getDecimalForValue(i[i.length-2]))/2);var n=i.length<3?.5:.25;a=(0,s.S)(a,0,n),r=(0,s.S)(r,0,n),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){var t,e,i=this._adapter,a=this.min,r=this.max,n=this.options,o=n.time,h=o.unit||iu(o.minUnit,a,r,this._getLabelCapacity(a)),l=(0,s.v)(n.ticks.stepSize,1),d="week"===h&&o.isoWeekday,c=(0,s.x)(d)||!0===d,u={},g=a;if(c&&(g=+i.startOf(g,"isoWeek",d)),g=+i.startOf(g,c?"day":h),i.diff(r,a,h)>1e5*l)throw Error(a+" and "+r+" are too far apart with stepSize of "+l+" "+h);var p="data"===n.ticks.source&&this.getDataTimestamps();for(t=g,e=0;t<r;t=+i.add(t,l,h),e++)ig(u,t,p);return(t===r||"ticks"===n.bounds||1===e)&&ig(u,t,p),Object.keys(u).sort(id).map(t=>+t)}getLabelForValue(t){var e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){var i=this.options.time.displayFormats,a=this._unit,s=e||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,a){var r=this.options,n=r.ticks.callback;if(n)return(0,s.Q)(n,[t,e,i],this);var o=r.time.displayFormats,h=this._unit,l=this._majorUnit,d=h&&o[h],c=l&&o[l],u=i[e],g=l&&c&&u&&u.major;return this._adapter.format(t,a||(g?c:d))}generateTickLabels(t){var e,i,a;for(e=0,i=t.length;e<i;++e)(a=t[e]).label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){var e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){var e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,a=(0,s.t)(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(a),n=Math.sin(a),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*n,h:i*n+o*r}}_getLabelCapacity(t){var e=this.options.time,i=e.displayFormats,a=i[e.unit]||i.millisecond,s=this._tick
1FormatFunction(t,0,ip(this,[t],this._majorUnit),a),r=this._getLabelSize(s),n=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return n>0?n:1}getDataTimestamps(){var t,e,i=this._cache.data||[];if(i.length)return i;var a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(t=0,e=a.length;t<e;++t)i=i.concat(a[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){var t,e,i=this._cache.labels||[];if(i.length)return i;var a=this.getLabels();for(t=0,e=a.length;t<e;++t)i.push(ic(this,a[t]));return this._cache.labels=this._normalized?i:this.normalize(i)}normalize(t){return(0,s._)(t.sort(id))}}function im(t,e,i){var a,r,n,o,h=0,l=t.length-1;i?(e>=t[h].pos&&e<=t[l].pos&&({lo:h,hi:l}=(0,s.B)(t,"pos",e)),{pos:a,time:n}=t[h],{pos:r,time:o}=t[l]):(e>=t[h].time&&e<=t[l].time&&({lo:h,hi:l}=(0,s.B)(t,"time",e)),{time:a,pos:n}=t[h],{time:r,pos:o}=t[l]);var d=r-a;return d?n+(o-n)*(e-a)/d:n}(0,a.Z)(iv,"id","time"),(0,a.Z)(iv,"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 ib extends iv{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=im(e,this.min),this._tableRange=im(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){var e,i,a,{min:s,max:r}=this,n=[],o=[];for(e=0,i=t.length;e<i;++e)(a=t[e])>=s&&a<=r&&n.push(a);if(n.length<2)return[{time:s,pos:0},{time:r,pos:1}];for(e=0,i=n.length;e<i;++e)Math.round((n[e+1]+n[e-1])/2)!==(a=n[e])&&o.push({time:a,pos:e/(i-1)});return o}_generate(){var t=this.min,e=this.max,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(){var t=this._cache.all||[];if(t.length)return t;var 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}getDecimalForValue(t){return(im(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){var e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return im(this._table,i*this._tableRange+this._minPos,!0)}}(0,a.Z)(ib,"id","timeseries"),(0,a.Z)(ib,"defaults",iv.defaults);var ix=Object.freeze({__proto__:null,CategoryScale:e5,LinearScale:e7,LogarithmicScale:ii,RadialLinearScale:io,TimeScale:iv,TimeSeriesScale:ib}),i_=[V,eu,e0,ix]}}]);
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.