1"use strict";(self["webpackChunkwh_fe"]=self["webpackChunkwh_fe"]||[]).push([[5229],{23408:function(t,e,i){i.d(e,{A:function(){return X}});i(44114);var n=i(76863),s=i(80017),o=function(){if("undefined"!==typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),a={toTextLines:function(t){var e,i=[];t=[].concat(t);while(t.length)e=t.pop(),"string"===typeof e?i.unshift.apply(i,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):(0,n.k)(t)||i.unshift(""+e);return i},textSize:function(t,e,i){var n,s=[].concat(e),o=s.length,a=t.font,r=0;for(t.font=i.string,n=0;n<o;++n)r=Math.max(t.measureText(s[n]).width,r);return t.font=a,{height:o*i.lineHeight,width:r}},bound:function(t,e,i){return Math.max(t,Math.min(e,i))},arrayDiff:function(t,e){var i,n,s,o,a=t.slice(),r=[];for(i=0,s=e.length;i<s;++i)o=e[i],n=a.indexOf(o),-1===n?r.push([o,1]):a.splice(n,1);for(i=0,s=a.length;i<s;++i)r.push([a[i],-1]);return r},rasterize:function(t){return Math.round(t*o)/o}};function r(t,e){var i=e.x,n=e.y;if(null===i)return{x:0,y:-1};if(null===n)return{x:1,y:0};var s=t.x-i,o=t.y-n,a=Math.sqrt(s*s+o*o);return{x:a?s/a:0,y:a?o/a:-1}}function l(t,e,i,n,s){switch(s){case"center":i=n=0;break;case"bottom":i=0,n=1;break;case"right":i=1,n=0;break;case"left":i=-1,n=0;break;case"top":i=0,n=-1;break;case"start":i=-i,n=-n;break;case"end":break;default:s*=Math.PI/180,i=Math.cos(s),n=Math.sin(s);break}return{x:t,y:e,vx:i,vy:n}}var h=0,c=1,d=2,u=4,f=8;function g(t,e,i){var n=h;return t<i.left?n|=c:t>i.right&&(n|=d),e<i.top?n|=f:e>i.bottom&&(n|=u),n}function p(t,e){var i,n,s,o=t.x0,a=t.y0,r=t.x1,l=t.y1,h=g(o,a,e),p=g(r,l,e);while(1){if(!(h|p)||h&p)break;i=h||p,i&f?(n=o+(r-o)*(e.top-a)/(l-a),s=e.top):i&u?(n=o+(r-o)*(e.bottom-a)/(l-a),s=e.bottom):i&d?(s=a+(l-a)*(e.right-o)/(r-o),n=e.right):i&c&&(s=a+(l-a)*(e.left-o)/(r-o),n=e.left),i===h?(o=n,a=s,h=g(o,a,e)):(r=n,l=s,p=g(r,l,e))}return{x0:o,x1:r,y0:a,y1:l}}function m(t,e){var i,n,s=e.anchor,o=t;return e.clamp&&(o=p(o,e.area)),"start"===s?(i=o.x0,n=o.y0):"end"===s?(i=o.x1,n=o.y1):(i=(o.x0+o.x1)/2,n=(o.y0+o.y1)/2),l(i,n,t.vx,t.vy,e.align)}var x={arc:function(t,e){var i=(t.startAngle+t.endAngle)/2,n=Math.cos(i),s=Math.sin(i),o=t.innerRadius,a=t.outerRadius;return m({x0:t.x+n*o,y0:t.y+s*o,x1:t.x+n*a,y1:t.y+s*a,vx:n,vy:s},e)},point:function(t,e){var i=r(t,e.origin),n=i.x*t.options.radius,s=i.y*t.options.radius;return m({x0:t.x-n,y0:t.y-s,x1:t.x+n,y1:t.y+s,vx:i.x,vy:i.y},e)},bar:function(t,e){var i=r(t,e.origin),n=t.x,s=t.y,o=0,a=0;return t.horizontal?(n=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(s=Math.min(t.y,t.base),a=Math.abs(t.base-t.y)),m({x0:n,y0:s+a,x1:n+o,y1:s,vx:i.x,vy:i.y},e)},fallback:function(t,e){var i=r(t,e.origin);return m({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:i.x,vy:i.y},e)}},b=a.rasterize;function _(t){var e=t.borderWidth||0,i=t.padding,n=t.size.height,s=t.size.width,o=-s/2,a=-n/2;return{frame:{x:o-i.left-e,y:a-i.top-e,w:s+i.width+2*e,h:n+i.height+2*e},text:{x:o,y:a,w:s,h:n}}}function y(t,e){var i=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!i)return null;if(void 0!==i.xCenter&&void 0!==i.yCenter)return{x:i.xCenter,y:i.yCenter};var n=i.getBasePixel();return t.horizontal?{x:n,y:null}:{x:null,y:n}}function v(t){return t instanceof s.Bs?x.arc:t instanceof s.FN?x.point:t instanceof s.E8?x.bar:x.fallback}function w(t,e,i,n,s,o){var a=Math.PI/2;if(o){var r=Math.min(o,s/2,n/2),l=e+r,h=i+r,c=e+n-r,d=i+s-r;t.moveTo(e,h),l<c&&h<d?(t.arc(l,h,r,-Math.PI,-a),t.arc(c,h,r,-a,0),t.arc(c,d,r,0,a),t.arc(l,d,r,a,Math.PI)):l<c?(t.moveTo(l,i),t.arc(c,h,r,-a,a),t.arc(l,h,r,a,Math.PI+a)):h<d?(t.arc(l,h,r,-Math.PI,0),t.arc(l,d,r,0,Math.PI)):t.arc(l,h,r,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,s)}function M(t,e,i){var n=i.backgroundColor,s=i.borderColor,o=i.borderWidth;(n||s&&o)&&(t.beginPath(),w(t,b(e.x)+o/2,b(e.y)+o/2,b(e.w)-o,b(e.h)-o,i.borderRadius),t.closePath(),n&&(t.fillStyle=n,t.fill()),s&&o&&(t.strokeStyle=s,t.lineWidth=o,t.lineJoin="miter",t.stroke()))}function k(t,e,i){var n=i.lineHeight,s=t.w,o=t.x,a=t.y+n/2;return"center"===e?o+=s/2:"end"!==e&&"right"!==e||(o+=s),{h:n,w:s,x:o,y:a}}function S(t,e,i){var n=t.shadowBlur,s=i.stroked,o=b(i.x),a=b(i.y),r=b(i.w);s&&t.strokeText(e,o,a,r),i.filled&&(n&&s&&(t.shadowBlur=0),t.fillText(e,o,a,r),n&&s&&(t.shadowBlur=n))}function P(t,e,i,n){var s,o=n.textAlign,a=n.color,r=!!a,l=n.font,h=e.length,c=n.textStrokeColor,d=n.textStrokeWidth,u=c&&d;if(h&&(r||u))for(i=k(i,o,l),t.font=l.string,t.textAlign=o,t.textBaseline="middle",t.shadowBlur=n.textShadowBlur,t.shadowColor=n.textShadowColor,r&&(t.fillStyle=a),u&&(t.lineJoin="round",t.lineWidth=d,t.strokeStyle=c),s=0,h=e.length;s<h;++s)S(t,e[s],{stroked:u,filled:r,w:i.w,x:i.x,y:i.y+i.h*s})}
1var A=function(t,e,i,n){var s=this;s._config=t,s._index=n,s._model=null,s._rects=null,s._ctx=e,s._el=i};(0,n.a4)(A.prototype,{_modelize:function(t,e,i,s){var o=this,r=o._index,l=(0,n.a0)((0,n.a)([i.font,{}],s,r)),h=(0,n.a)([i.color,n.d.color],s,r);return{align:(0,n.a)([i.align,"center"],s,r),anchor:(0,n.a)([i.anchor,"center"],s,r),area:s.chart.chartArea,backgroundColor:(0,n.a)([i.backgroundColor,null],s,r),borderColor:(0,n.a)([i.borderColor,null],s,r),borderRadius:(0,n.a)([i.borderRadius,0],s,r),borderWidth:(0,n.a)([i.borderWidth,0],s,r),clamp:(0,n.a)([i.clamp,!1],s,r),clip:(0,n.a)([i.clip,!1],s,r),color:h,display:t,font:l,lines:e,offset:(0,n.a)([i.offset,4],s,r),opacity:(0,n.a)([i.opacity,1],s,r),origin:y(o._el,s),padding:(0,n.E)((0,n.a)([i.padding,4],s,r)),positioner:v(o._el),rotation:(0,n.a)([i.rotation,0],s,r)*(Math.PI/180),size:a.textSize(o._ctx,e,l),textAlign:(0,n.a)([i.textAlign,"start"],s,r),textShadowBlur:(0,n.a)([i.textShadowBlur,0],s,r),textShadowColor:(0,n.a)([i.textShadowColor,h],s,r),textStrokeColor:(0,n.a)([i.textStrokeColor,h],s,r),textStrokeWidth:(0,n.a)([i.textStrokeWidth,0],s,r)}},update:function(t){var e,i,s,o=this,r=null,l=null,h=o._index,c=o._config,d=(0,n.a)([c.display,!0],t,h);d&&(e=t.dataset.data[h],i=(0,n.v)((0,n.Q)(c.formatter,[e,t]),e),s=(0,n.k)(i)?[]:a.toTextLines(i),s.length&&(r=o._modelize(d,s,c,t),l=_(r))),o._model=r,o._rects=l},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var i,n=this,s=t.ctx,o=n._model,r=n._rects;this.visible()&&(s.save(),o.clip&&(i=o.area,s.beginPath(),s.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),s.clip()),s.globalAlpha=a.bound(0,o.opacity,1),s.translate(b(e.x),b(e.y)),s.rotate(o.rotation),M(s,r.frame,o),P(s,o.lines,r.text,o),s.restore())}});var D=Number.MIN_SAFE_INTEGER||-9007199254740991,O=Number.MAX_SAFE_INTEGER||9007199254740991;function C(t,e,i){var n=Math.cos(i),s=Math.sin(i),o=e.x,a=e.y;return{x:o+n*(t.x-o)-s*(t.y-a),y:a+s*(t.x-o)+n*(t.y-a)}}function T(t,e){var i,n,s,o,a,r=O,l=D,h=e.origin;for(i=0;i<t.length;++i)n=t[i],s=n.x-h.x,o=n.y-h.y,a=e.vx*s+e.vy*o,r=Math.min(r,a),l=Math.max(l,a);return{min:r,max:l}}function E(t,e){var i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);return{vx:(e.x-t.x)/s,vy:(e.y-t.y)/s,origin:t,ln:s}}var L=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function R(t,e,i){var n=e.positioner(t,e),s=n.vx,o=n.vy;if(!s&&!o)return{x:n.x,y:n.y};var a=i.w,r=i.h,l=e.rotation,h=Math.abs(a/2*Math.cos(l))+Math.abs(r/2*Math.sin(l)),c=Math.abs(a/2*Math.sin(l))+Math.abs(r/2*Math.cos(l)),d=1/Math.max(Math.abs(s),Math.abs(o));return h*=s*d,c*=o*d,h+=e.offset*s,c+=e.offset*o,{x:n.x+h,y:n.y+c}}function I(t,e){var i,n,s,o;for(i=t.length-1;i>=0;--i)for(s=t[i].$layout,n=i-1;n>=0&&s._visible;--n)o=t[n].$layout,o._visible&&s._box.intersects(o._box)&&e(s,o);return t}function F(t){var e,i,n,s,o,a,r;for(e=0,i=t.length;e<i;++e)n=t[e],s=n.$layout,s._visible&&(r=new Proxy(n._el,{get:(t,e)=>t.getProps([e],!0)[e]}),o=n.geometry(),a=R(r,n.model(),o),s._box.update(a,o,n.rotation()));return I(t,(function(t,e){var i=t._hidable,n=e._hidable;i&&n||n?e._visible=!1:i&&(t._visible=!1)}))}(0,n.a4)(L.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,i){this._rotation=i,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,i=1,n=e._rect;return t=C(t,e.center(),-e._rotation),!(t.x<n.x-i||t.y<n.y-i||t.x>n.x+n.w+2*i||t.y>n.y+n.h+2*i)},intersects:function(t){var e,i,n,s=this._points(),o=t._points(),a=[E(s[0],s[1]),E(s[0],s[3])];for(this._rotation!==t._rotation&&a.push(E(o[0],o[1]),E(o[0],o[3])),e=0;e<a.length;++e)if(i=T(s,a[e]),n=T(o,a[e]),i.max<n.min||n.max<i.min)return!1;return!0},_points:function(){var t=this,e=t._rect,i=t._rotation,n=t.center();return[C({x:e.x,y:e.y},n,i),C({x:e.x+e.w,y:e.y},n,i),C({x:e.x+e.w,y:e.y+e.h},n,i),C({x:e.x,y:e.y+e.h},n,i)]}});var z={prepare:function(t){var e,i,n,s,o,a=[];for(e=0,n=t.length;e<n;++e)for(i=0,s=t[e].length;i<s;++i)o=t[e][i],a.push(o),o.$layout={_box:new L,_hidable:!1,_visible:!0,_set:e,_idx:o._index};return a.sort((function(t,e){var i=t.$layout,n=e.$layout;
1return i._idx===n._idx?n._set-i._set:n._idx-i._idx})),this.update(a),a},update:function(t){var e,i,n,s,o,a=!1;for(e=0,i=t.length;e<i;++e)n=t[e],s=n.model(),o=n.$layout,o._hidable=s&&"auto"===s.display,o._visible=n.visible(),a|=o._hidable;a&&F(t)},lookup:function(t,e){var i,n;for(i=t.length-1;i>=0;--i)if(n=t[i].$layout,n&&n._visible&&n._box.contains(e))return t[i];return null},draw:function(t,e){var i,n,s,o,a,r;for(i=0,n=e.length;i<n;++i)s=e[i],o=s.$layout,o._visible&&(a=s.geometry(),r=R(s._el,s.model(),a),o._box.update(r,a,s.rotation()),s.draw(t,r))}},V=function(t){if((0,n.k)(t))return null;var e,i,s,o=t;if((0,n.i)(t))if((0,n.k)(t.label))if((0,n.k)(t.r))for(o="",e=Object.keys(t),s=0,i=e.length;s<i;++s)o+=(0!==s?", ":"")+e[s]+": "+t[e[s]];else o=t.r;else o=t.label;return""+o},B={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:V,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},W="$datalabels",N="$default";function H(t,e){var i,s,o=t.datalabels,a={},r=[];return!1===o?null:(!0===o&&(o={}),e=(0,n.a4)({},[e,o]),i=e.labels||{},s=Object.keys(i),delete e.labels,s.length?s.forEach((function(t){i[t]&&r.push((0,n.a4)({},[e,i[t],{_key:t}]))})):r.push(e),a=r.reduce((function(t,e){return(0,n.F)(e.listeners||{},(function(i,n){t[n]=t[n]||{},t[n][e._key||N]=i})),delete e.listeners,t}),{}),{labels:r,listeners:a})}function j(t,e,i,s){if(e){var o,a=i.$context,r=i.$groups;e[r._set]&&(o=e[r._set][r._key],o&&!0===(0,n.Q)(o,[a,s])&&(t[W]._dirty=!0,i.update(a)))}}function $(t,e,i,n,s){var o,a;(i||n)&&(i?n?i!==n&&(a=o=!0):a=!0:o=!0,a&&j(t,e.leave,i,s),o&&j(t,e.enter,n,s))}function Y(t,e){var i,n,s=t[W],o=s._listeners;if(o.enter||o.leave){if("mousemove"===e.type)n=z.lookup(s._labels,e);else if("mouseout"!==e.type)return;i=s._hovered,s._hovered=n,$(t,o,i,n,e)}}function U(t,e){var i=t[W],n=i._listeners.click,s=n&&z.lookup(i._labels,e);s&&j(t,n,s,e)}var X={id:"datalabels",defaults:B,beforeInit:function(t){t[W]={_actives:[]}},beforeUpdate:function(t){var e=t[W];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,i){var s,o,a,r,l,h,c,d,u=e.index,f=t[W],g=f._datasets[u]=[],p=t.isDatasetVisible(u),m=t.data.datasets[u],x=H(m,i),b=e.meta.data||[],_=t.ctx;for(_.save(),s=0,a=b.length;s<a;++s)if(c=b[s],c[W]=[],p&&c&&t.getDataVisibility(s)&&!c.skip)for(o=0,r=x.labels.length;o<r;++o)l=x.labels[o],h=l._key,d=new A(l,_,c,s),d.$groups={_set:u,_key:h||N},d.$context={active:!1,chart:t,dataIndex:s,dataset:m,datasetIndex:u},d.update(d.$context),c[W].push(d),g.push(d);_.restore(),(0,n.a4)(f._listeners,x.listeners,{merger:function(t,i,n){i[t]=i[t]||{},i[t][e.index]=n[t],f._listened=!0}})},afterUpdate:function(t){t[W]._labels=z.prepare(t[W]._datasets)},afterDatasetsDraw:function(t){z.draw(t,t[W]._labels)},beforeEvent:function(t,e){if(t[W]._listened){var i=e.event;switch(i.type){case"mousemove":case"mouseout":Y(t,i);break;case"click":U(t,i);break}}},afterEvent:function(t){var e,i,n,s,o,r,l,h=t[W],c=h._actives,d=h._actives=t.getActiveElements(),u=a.arrayDiff(c,d);for(e=0,i=u.length;e<i;++e)if(o=u[e],o[1])for(l=o[0].element[W]||[],n=0,s=l.length;n<s;++n)r=l[n],r.$context.active=1===o[1],r.update(r.$context);(h._dirty||u.length)&&(z.update(h._labels),t.render()),delete h._dirty}}},80017:function(t,e,i){i.d(e,{A6:function(){return Q},Bs:function(){return vi},E8:function(){return Ui},FN:function(){return Fi},G5:function(){return Z},Jb:function(){return q},No:function(){return Ri},PP:function(){return as},ZT:function(){return J},dN:function(){return Mn},h9:function(){return et},hE:function(){return In},kc:function(){return cs},m_:function(){return es},pr:function(){return Rs},s$:function(){return En},t1:function(){return ui}});var n=i(23772),s=(i(44114),i(76863)); 2/*! 3 * Chart.js v4.4.1 4 * https://www.chartjs.org 5 * (c) 2023 Chart.js Contributors 6 * Released under the MIT License 7 */ 8class o{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],o=e.duration;
8s.forEach((n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=s.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,a=s.length-1,r=!1;for(;a>=0;--a)o=s[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(s[a]=s[s.length-1],s.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var a=new o;const r="transparent",l={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const n=(0,s.c)(t||r),o=n.valid&&(0,s.c)(e||r);return o&&o.valid?o.mix(n,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class h{constructor(t,e,i,n){const o=e[i];n=(0,s.a)([t.to,n,o,t.from]);const a=(0,s.a)([t.from,o,n]);this._active=!0,this._fn=t.fn||l[t.type||typeof a],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=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,s.a)([t.to,e,n,t.from]),this._from=(0,s.a)([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,a=this._to;let r;if(this._active=s!==a&&(o||e<i),!this._active)return this._target[n]=a,void this._notify(!0);e<0?this._target[n]=s:(r=e/i%2,r=o&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[n]=this._fn(s,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}}class c{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,s.i)(t))return;const e=Object.keys(s.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const o=t[n];if(!(0,s.i)(o))return;const a={};for(const t of e)a[t]=o[t];((0,s.b)(o.properties)&&o.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,a)}))}))}_animateOptions(t,e){const i=e.options,n=u(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&d(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let d=s[l];const u=i.get(l);if(d){if(u&&d.active()){d.update(u,c,a);continue}d.cancel()}u&&u.duration?(s[l]=d=new h(u,t,l,c),n.push(d)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function d(t,e){const i=[],n=Object.keys(e);for(let s=0;s<n.length;s++){const e=t[n[s]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}function u(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}function f(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function g(t,e,i){if(!1===i)return!1;const n=f(t,i),s=f(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function p(t){let e,i,n,o;return(0,s.i)(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}function m(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)i.push(n[s].index);return i}function x(t,e,i,n={}){const o=t.keys,a="single"===n.mode;let r,l,h,c;if(null!==e){for(r=0,l=o.length;r<l;++r){if(h=+o[r],h===i){if(n.all)continue;break}c=t.values[h],(0,s.g)(c)&&(a||0===e||(0,s.s)(e)===(0,s.s)(c))&&(e+=c)}return e}}function b(t){const e=Object.keys(t),i=new Array(e.length);let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n],i[n]={x:o,y:t[o]};return i}function _(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function y(t,e,i){return`${t.id}
8.${e.id}.${i.stack||i.type}`}function v(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}function w(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function M(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function k(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,h=a.axis,c=y(o,a,n),d=e.length;let u;for(let f=0;f<d;++f){const t=e[f],{[l]:i,[h]:o}=t,d=t._stacks||(t._stacks={});u=d[h]=w(s,c,i),u[r]=o,u._top=M(u,a,!0,n.type),u._bottom=M(u,a,!1,n.type);const g=u._visualValues||(u._visualValues={});g[r]=o}}function S(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function P(t,e){return(0,s.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function A(t,e,i){return(0,s.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function D(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const O=t=>"reset"===t||"none"===t,C=(t,e)=>e?t:Object.assign({},t),T=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:m(i,!0),values:null};class E{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=_(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&&D(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=(0,s.v)(i.xAxisID,S(t,"x")),a=e.yAxisID=(0,s.v)(i.yAxisID,S(t,"y")),r=e.rAxisID=(0,s.v)(i.rAxisID,S(t,"r")),l=e.indexAxis,h=e.iAxisID=n(l,o,a,r),c=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,s.u)(this._data,this),t._stacked&&D(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,s.i)(e))this._data=b(e);else if(i!==e){if(i){(0,s.u)(i,this);const t=this._cachedMeta;D(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,s.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=_(e.vScale,e),e.stack!==i.stack&&(n=!0,D(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&k(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:a}=i,r=o.axis;let l,h,c,d=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=(0,s.b)(n[t])?this.parseArrayData(i,n,t,e):(0,s.i)(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const o=()=>null===h[r]||u&&h[r]<u[r];for(l=0;l<e;++l)i._parsed[l+t]=h=c[l],d&&(o()&&(d=!1),u=h);i._sorted=d}a&&k(this,c)}
8parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:o}=t,a=s.axis,r=o.axis,l=s.getLabels(),h=s===o,c=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,c[d]={[a]:h||s.parse(l[f],f),[r]:o.parse(e[f],f)};return c}parseArrayData(t,e,i,n){const{xScale:s,yScale:o}=t,a=new Array(n);let r,l,h,c;for(r=0,l=n;r<l;++r)h=r+i,c=e[h],a[r]={x:s.parse(c[0],h),y:o.parse(c[1],h)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h=new Array(n);let c,d,u,f;for(c=0,d=n;c<d;++c)u=c+i,f=e[u],h[c]={x:o.parse((0,s.f)(f,r),u),y:a.parse((0,s.f)(f,l),u)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,o=e[t.axis],a={keys:m(n,!0),values:e._stacks[t.axis]._visualValues};return x(a,o,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let o=null===s?NaN:s;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,o=x(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,a=n.length,r=this._getOtherScale(t),l=T(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=v(r);let u,f;function g(){f=n[u];const e=f[r.axis];return!(0,s.g)(f[t.axis])||c>e||d<e}for(u=0;u<a;++u)if(!g()&&(this.updateRangeFromParsed(h,t,f,l),o))break;if(o)for(u=a-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],(0,s.g)(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=p((0,s.v)(this.options.clip,g(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,o=[],a=this._drawStart||0,r=this._drawCount||n.length-a,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,s,a,r),h=a;h<a+r;++h){const e=n[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,s))}for(h=0;h<o.length;++h)o[h].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=A(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=P(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&(0,s.h)(i);if(r)return C(r,l);const h=this.chart.config,c=h.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),c),f=Object.keys(s.d.elements[t]),g=()=>this.getContext(i,n,e),p=h.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(C(p,l))),p}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,a=s[o];if(a)return a;let r;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);r=n.createResolver(o,this.getContext(t,i,e))}const l=new c(n,r&&r.animations);return r&&r._cacheable&&(s[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||O(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){O(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!O(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);
vendor: 4,106 bytes, line 8
8this._resolveAnimations(e,i,n).update(t,{options:!n&&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(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,r,l]of this._syncList)this[a](r,l);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,o=t+e;let a;const r=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&r(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&D(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function L(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=(0,s._)(n.sort(((t,e)=>t-e)))}return t._cache.$bar}function R(t){const e=t.iScale,i=L(e,t.type);let n,o,a,r,l=e._length;const h=()=>{32767!==a&&-32768!==a&&((0,s.h)(r)&&(l=Math.min(l,Math.abs(a-r)||l)),r=a)};for(n=0,o=i.length;n<o;++n)a=e.getPixelForValue(i[n]),h();for(r=void 0,n=0,o=e.ticks.length;n<o;++n)a=e.getPixelForTick(n),h();return l}function I(t,e,i,n){const o=i.barThickness;let a,r;return(0,s.k)(o)?(a=e.min*i.categoryPercentage,r=i.barPercentage):(a=o*n,r=1),{chunk:a/n,ratio:r,start:e.pixels[t]-a/2}}function F(t,e,i,n){const s=e.pixels,o=s[t];let a=t>0?s[t-1]:null,r=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===a&&(a=o-(null===r?e.end-e.start:r-o)),null===r&&(r=o+o-a);const h=o-(o-Math.min(a,r))/2*l,c=Math.abs(r-a)/2*l;return{chunk:c/n,ratio:i.barPercentage,start:h}}function z(t,e,i,n){const s=i.parse(t[0],n),o=i.parse(t[1],n),a=Math.min(s,o),r=Math.max(s,o);let l=a,h=r;Math.abs(a)>Math.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:s,end:o,min:a,max:r}}function V(t,e,i,n){return(0,s.b)(t)?z(t,e,i,n):e[i.axis]=i.parse(t,n),e}function B(t,e,i,n){const s=t.iScale,o=t.vScale,a=s.getLabels(),r=s===o,l=[];let h,c,d,u;for(h=i,c=i+n;h<c;++h)u=e[h],d={},d[s.axis]=r||s.parse(a[h],h),l.push(V(u,d,o,h));return l}function W(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function N(t,e,i){return 0!==t?(0,s.s)(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}function H(t){let e,i,n,s,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:i,end:n,reverse:e,top:s,bottom:o}}function j(t,e,i,n){let s=e.borderSkipped;const o={};if(!s)return void(t.borderSkipped=o);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:r,reverse:l,top:h,bottom:c}=H(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=h:(i._bottom||0)===n?s=c:(o[$(c,a,r,l)]=!0,s=h)),o[$(s,a,r,l)]=!0,t.borderSkipped=o}function $(t,e,i,n){return n?(t=Y(t,e,i),t=U(t,i,e)):t=U(t,e,i),t}function Y(t,e,i){return t===e?i:t===i?e:t}function U(t,e,i){return"start"===t?e:"end"===t?i:t}function X(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}(0,n.A)(E,"defaults",{}),(0,n.A)(E,"datasetElementType",null),(0,n.A)(E,"dataElementType",null);
8class Q extends E{parsePrimitiveData(t,e,i,n){return B(t,e,i,n)}parseArrayData(t,e,i,n){return B(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h="x"===o.axis?r:l,c="x"===a.axis?r:l,d=[];let u,f,g,p;for(u=i,f=i+n;u<f;++u)p=e[u],g={},g[o.axis]=o.parse((0,s.f)(p,h),u),d.push(V((0,s.f)(p,c),g,a,u));return d}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const 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){const e=this._cachedMeta,{iScale:i,vScale:n}=e,s=this.getParsed(t),o=s._custom,a=W(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o="reset"===n,{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),h=r.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+i;f++){const e=this.getParsed(f),i=o||(0,s.k)(e[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),g=this._calculateBarIndexPixels(f,c),p=(e._stacks||{})[r.axis],m={horizontal:h,base:i.base,enableBorderRadius:!p||W(e._custom)||a===p._top||a===p._bottom,x:h?i.head:g.center,y:h?g.center:i.head,height:h?g.size:Math.abs(i.size),width:h?Math.abs(i.size):g.size};u&&(m.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const x=m.options||t[f].options;j(m,x,p,a),X(m,x,c.ratio),this.updateElement(t[f],f,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,a=[],r=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if((0,s.k)(n)||isNaN(n))return!0};for(const s of n)if((void 0===e||!r(s))&&((!1===o||-1===a.indexOf(s.stack)||void 0===o&&void 0===s.stack)&&a.push(s.stack),s.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s<o;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const a=t.barThickness,r=a||R(e);return{min:r,pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),h=l._custom,c=W(h);let d,u,f=l[e.axis],g=0,p=i?this.applyStack(e,l,i):f;p!==f&&(g=p-f,p=f),c&&(f=h.barStart,p=h.barEnd-h.barStart,0!==f&&(0,s.s)(f)!==(0,s.s)(h.barEnd)&&(g=0),g+=f);const m=(0,s.k)(o)||c?g:o;let x=e.getPixelForValue(m);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(g+p):x,u=d-x,Math.abs(u)<a){u=N(u,e,r)*a,f===r&&(x-=u/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),o=Math.min(t,s),h=Math.max(t,s);x=Math.max(Math.min(x,h),o),d=x+u,i&&!c&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(d)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const t=(0,s.s)(u)*e.getLineWidthForValue(r)/2;x+=t,u-=t}return{size:u,base:x,head:d,center:d+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,a=(0,s.v)(n.maxBarThickness,1/0);let r,l;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,s="flex"===n.barThickness?F(t,e,n,i):I(t,e,n,i),h=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=s.start+s.chunk*h+s.chunk/2,l=Math.min(a,s.chunk*s.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null!==this.getParsed(s)[e.axis]&&i[s].draw(this._ctx)}}(0,n.A)(Q,"id","bar"),(0,n.A)(Q,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,n.A)(Q,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});
8class q extends E{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+i).radius;return s}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let a=0;a<o.length;a++){const t=e[i+a];o[a]._custom=(0,s.v)(t[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,n){const o=super.parseObjectData(t,e,i,n);for(let a=0;a<o.length;a++){const t=e[i+a];o[a]._custom=(0,s.v)(t&&t.r&&+t.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),a=n.getLabelForValue(o.x),r=s.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,n),h=o.axis,c=a.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!s&&this.getParsed(d),u={},f=u[h]=s?o.getPixelForDecimal(.5):o.getPixelForValue(i[h]),g=u[c]=s?a.getBasePixel():a.getPixelForValue(i[c]);u.skip=isNaN(f)||isNaN(g),l&&(u.options=r||this.resolveDataElementOptions(d,e.active?"active":n),s&&(u.options.radius=0)),this.updateElement(e,d,u,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=(0,s.v)(i&&i._custom,o),n}}function K(t,e,i){let n=1,o=1,a=0,r=0;if(e<s.T){const l=t,h=l+e,c=Math.cos(l),d=Math.sin(l),u=Math.cos(h),f=Math.sin(h),g=(t,e,n)=>(0,s.p)(t,l,h,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>(0,s.p)(t,l,h,!0)?-1:Math.min(e,e*i,n,n*i),m=g(0,c,u),x=g(s.H,d,f),b=p(s.P,c,u),_=p(s.P+s.H,d,f);n=(m-b)/2,o=(x-_)/2,a=-(m+b)/2,r=-(x+_)/2}return{ratioX:n,ratioY:o,offsetX:a,offsetY:r}}(0,n.A)(q,"id","bubble"),(0,n.A)(q,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,n.A)(q,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class G extends E{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,a,r=t=>+i[t];if((0,s.i)(i[t])){const{key:t="value"}=this._parsing;r=e=>+(0,s.f)(i[e],t)}for(o=t,a=t+e;o<a;++o)n._parsed[o]=r(o)}}_getRotation(){return(0,s.t)(this.options.rotation-90)}_getCircumference(){return(0,s.t)(this.options.circumference)}_getRotationExtents(){let t=s.T,e=-s.T;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),o=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-a)/2,0),l=Math.min((0,s.m)(this.options.cutout,r),1),h=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=K(d,c,l),m=(i.width-a)/u,x=(i.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=(0,s.n)(this.options.radius,b),y=Math.max(_*l,0),v=(_-y)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=p*_,n.total=this.calculateTotal(),this.outerRadius=_-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/s.T)}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,a=o.chartArea,r=o.options,l=r.animation,h=(a.left+a.right)/2,c=(a.top+a.bottom)/2,d=s&&l.animateScale,u=d?0:this.innerRadius,f=d?0:this.outerRadius,{sharedOptions:g,includeOptions:p}=this._getSharedOptions(e,n);let m,x=this._getRotation();for(m=0;m<e;++m)x+=this._circumference(m,s);for(m=e;m<e+i;++m){const e=this._circumference(m,s),i=t[m],o={x:h+this.offsetX,y:c+this.offsetY,startAngle:x,endAngle:x+e,circumference:e,outerRadius:f,innerRadius:u};p&&(o.options=g||this.resolveDataElementOptions(m,i.active?"active":n)),x+=e,this.updateElement(i,m,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?s.T*(Math.abs(t)/e):0}
8getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=(0,s.o)(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,o,a,r;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,a=o.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)r=a.resolveDataElementOptions(n),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max((0,s.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}(0,n.A)(G,"id","doughnut"),(0,n.A)(G,"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,n.A)(G,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),(0,n.A)(G,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const o=t.getDatasetMeta(0),a=o.controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:n,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class J extends E{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=(0,s.q)(e,n,a);this._drawStart=r,this._drawCount=l,(0,s.w)(e)&&(r=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:h},t),this.updateElements(n,r,l,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=(0,s.x)(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||"none"===n,b=e+i,_=t.length;let y=e>0&&this.getParsed(e-1);for(let v=0;v<_;++v){const i=t[v],g=x?i:{};if(v<e||v>=b){g.skip=!0;continue}const _=this.getParsed(v),w=(0,s.k)(_[f]),M=g[u]=a.getPixelForValue(_[u],v),k=g[f]=o||w?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,_,l):_[f],v);g.skip=isNaN(M)||isNaN(k)||w,g.stop=v>0&&Math.abs(_[u]-y[u])>m,p&&(g.parsed=_,g.raw=h.data[v]),d&&(g.options=c||this.resolveDataElementOptions(v,i.active?"active":n)),x||this.updateElement(i,v,g,n),y=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}(0,n.A)(J,"id","line"),(0,n.A)(J,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,n.A)(J,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});
8class Z extends E{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=(0,s.o)(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return s.y.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),o=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),a=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,n){const o="reset"===n,a=this.chart,r=a.options,l=r.animation,h=this._cachedMeta.rScale,c=h.xCenter,d=h.yCenter,u=h.getIndexAngle(0)-.5*s.P;let f,g=u;const p=360/this.countVisibleElements();for(f=0;f<e;++f)g+=this._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,s=g+this._computeAngle(f,n,p),r=a.getDataVisibility(f)?h.getDistanceFromCenterForValue(this.getParsed(f).r):0;g=s,o&&(l.animateScale&&(r=0),l.animateRotate&&(i=s=u));const m={x:c,y:d,innerRadius:0,outerRadius:r,startAngle:i,endAngle:s,options:this.resolveDataElementOptions(f,e.active?"active":n)};this.updateElement(e,f,m,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,s.t)(this.resolveDataElementOptions(t,e).angle||i):0}}(0,n.A)(Z,"id","polarArea"),(0,n.A)(Z,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,n.A)(Z,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const o=t.getDatasetMeta(0),a=o.controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:n,lineWidth:a.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 tt extends G{}(0,n.A)(tt,"id","pie"),(0,n.A)(tt,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class et extends E{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return s.y.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,o="reset"===n;for(let a=e;a<e+i;a++){const e=t[a],i=this.resolveDataElementOptions(a,e.active?"active":n),r=s.getPointPositionForValue(a,this.getParsed(a).r),l=o?s.xCenter:r.x,h=o?s.yCenter:r.y,c={x:l,y:h,angle:r.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,a,c,n)}}}(0,n.A)(et,"id","radar"),(0,n.A)(et,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,n.A)(et,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class it extends E{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),a=n.getLabelForValue(o.x),r=s.getLabelForValue(o.y);return{label:i[t]||"",value:"("+a+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=(0,s.q)(e,i,n);if(this._drawStart=o,this._drawCount=a,(0,s.w)(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:o}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(c),u=this.includeOptions(n,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}
8=this.options,x=(0,s.x)(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let _=e>0&&this.getParsed(e-1);for(let y=e;y<e+i;++y){const e=t[y],i=this.getParsed(y),c=b?e:{},p=(0,s.k)(i[g]),v=c[f]=a.getPixelForValue(i[f],y),w=c[g]=o||p?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,i,l):i[g],y);c.skip=isNaN(v)||isNaN(w)||p,c.stop=y>0&&Math.abs(i[f]-_[f])>x,m&&(c.parsed=i,c.raw=h.data[y]),u&&(c.options=d||this.resolveDataElementOptions(y,e.active?"active":n)),b||this.updateElement(e,y,c,n),_=i}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,o)/2}}(0,n.A)(it,"id","scatter"),(0,n.A)(it,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,n.A)(it,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function nt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class st{static override(t){Object.assign(st.prototype,t)}constructor(t){(0,n.A)(this,"options",void 0),this.options=t||{}}init(){}formats(){return nt()}parse(){return nt()}format(){return nt()}add(){return nt()}diff(){return nt()}startOf(){return nt()}endOf(){return nt()}}var ot={_date:st};function at(t,e,i,n){const{controller:o,data:a,_sorted:r}=t,l=o._cachedMeta.iScale;if(l&&e===l.axis&&"r"!==e&&r&&a.length){const t=l._reversePixels?s.A:s.B;if(!n)return t(a,e,i);if(o._sharedOptions){const n=a[0],s="function"===typeof n.getRange&&n.getRange(e);if(s){const n=t(a,e,i-s),o=t(a,e,i+s);return{lo:n.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}function rt(t,e,i,n,s){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let r=0,l=o.length;r<l;++r){const{index:t,data:i}=o[r],{lo:l,hi:h}=at(o[r],e,a,s);for(let e=l;e<=h;++e){const s=i[e];s.skip||n(s,t,e)}}}function lt(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function ht(t,e,i,n,o){const a=[];if(!o&&!t.isPointInArea(e))return a;const r=function(i,r,l){(o||(0,s.C)(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&a.push({element:i,datasetIndex:r,index:l})};return rt(t,i,e,r,!0),a}function ct(t,e,i,n){let o=[];function a(t,i,a){const{startAngle:r,endAngle:l}=t.getProps(["startAngle","endAngle"],n),{angle:h}=(0,s.D)(t,{x:e.x,y:e.y});(0,s.p)(h,r,l)&&o.push({element:t,datasetIndex:i,index:a})}return rt(t,i,e,a),o}function dt(t,e,i,n,s,o){let a=[];const r=lt(i);let l=Number.POSITIVE_INFINITY;function h(i,h,c){const d=i.inRange(e.x,e.y,s);if(n&&!d)return;const u=i.getCenterPoint(s),f=!!o||t.isPointInArea(u);if(!f&&!d)return;const g=r(e,u);g<l?(a=[{element:i,datasetIndex:h,index:c}],l=g):g===l&&a.push({element:i,datasetIndex:h,index:c})}return rt(t,i,e,h),a}function ut(t,e,i,n,s,o){return o||t.isPointInArea(e)?"r"!==i||n?dt(t,e,i,n,s,o):ct(t,e,i,s):[]}function ft(t,e,i,n,s){const o=[],a="x"===i?"inXRange":"inYRange";let r=!1;return rt(t,i,e,((t,n,l)=>{t[a](e[i],s)&&(o.push({element:t,datasetIndex:n,index:l}),r=r||t.inRange(e.x,e.y,s))})),n&&!r?[]:o}var gt={evaluateInteractionItems:rt,modes:{index(t,e,i,n){const o=(0,s.z)(e,t),a=i.axis||"x",r=i.includeInvisible||!1,l=i.intersect?ht(t,o,a,n,r):ut(t,o,a,!1,n,r),h=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=l[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})})),h):[]},dataset(t,e,i,n){const o=(0,s.z)(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;let l=i.intersect?ht(t,o,a,n,r):ut(t,o,a,!1,n,r);if(l.length>0){const e=l[0].datasetIndex,i=t.getDatasetMeta(e).data;l=[];for(let t=0;t<i.length;++t)l.push({element:i[t],datasetIndex:e,index:t})}return l},point(t,e,i,n){const o=(0,s.z)(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;return ht(t,o,a,n,r)},nearest(t,e,i,n){const o=(0,s.z)(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;return ut(t,o,a,i.intersect,n,r)}
8,x(t,e,i,n){const o=(0,s.z)(e,t);return ft(t,o,"x",i.intersect,n)},y(t,e,i,n){const o=(0,s.z)(e,t);return ft(t,o,"y",i.intersect,n)}}};const pt=["left","top","right","bottom"];function mt(t,e){return t.filter((t=>t.pos===e))}function xt(t,e){return t.filter((t=>-1===pt.indexOf(t.pos)&&t.box.axis===e))}function bt(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function _t(t){const e=[];let i,n,s,o,a,r;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:o,options:{stack:a,stackWeight:r=1}}=s),e.push({index:i,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return e}function yt(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!pt.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function vt(t,e){const i=yt(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,a,r;for(o=0,a=t.length;o<a;++o){r=t[o];const{fullSize:a}=r.box,l=i[r.stack],h=l&&r.stackWeight/l.weight;r.horizontal?(r.width=h?h*n:a&&e.availableWidth,r.height=s):(r.width=n,r.height=h?h*s:a&&e.availableHeight)}return i}function wt(t){const e=_t(t),i=bt(e.filter((t=>t.box.fullSize)),!0),n=bt(mt(e,"left"),!0),s=bt(mt(e,"right")),o=bt(mt(e,"top"),!0),a=bt(mt(e,"bottom")),r=xt(e,"x"),l=xt(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:mt(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function Mt(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function kt(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 St(t,e,i,n){const{pos:o,box:a}=i,r=t.maxPadding;if(!(0,s.i)(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[o]+=i.size}a.getPadding&&kt(r,a.getPadding());const l=Math.max(0,e.outerWidth-Mt(r,t,"left","right")),h=Math.max(0,e.outerHeight-Mt(r,t,"top","bottom")),c=l!==t.w,d=h!==t.h;return t.w=l,t.h=h,i.horizontal?{same:c,other:d}:{same:d,other:c}}function Pt(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}function At(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Dt(t,e,i,n){const s=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;o<a;++o){r=t[o],l=r.box,l.update(r.width||e.w,r.height||e.h,At(r.horizontal,e));const{same:a,other:d}=St(e,i,r,n);h|=a&&s.length,c=c||d,l.fullSize||s.push(r)}return h&&Dt(s,e,i,n)||c}function Ot(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function Ct(t,e,i,n){const o=i.padding;let{x:a,y:r}=e;for(const l of t){const t=l.box,h=n[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/h.weight||1;if(l.horizontal){const n=e.w*c,a=h.size||t.height;(0,s.h)(h.start)&&(r=h.start),t.fullSize?Ot(t,o.left,r,i.outerWidth-o.right-o.left,a):Ot(t,e.left+h.placed,r,n,a),h.start=r,h.placed+=n,r=t.bottom}else{const n=e.h*c,r=h.size||t.width;(0,s.h)(h.start)&&(a=h.start),t.fullSize?Ot(t,a,o.top,r,i.outerHeight-o.bottom-o.top):Ot(t,a,e.top+h.placed,r,n),h.start=a,h.placed+=n,a=t.right}}e.x=a,e.y=r}var Tt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=(0,s.E)(t.options.layout.padding),a=Math.max(e-o.width,0),r=Math.max(i-o.height,0),l=wt(t.boxes),h=l.vertical,c=l.horizontal;(0,s.F)(t.boxes,(t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const d=h.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),f=Object.assign({},o);kt(f,(0,s.E)(n));const g=Object.assign({maxPadding:f,w:a,h:r,x:o.left,y:o.top},o),p=vt(h.concat(c),u);Dt(l.fullSize,g,u,p),Dt(h,g,u,p),Dt(c,g,u,p)&&Dt(h,g,u,p),Pt(g),Ct(l.leftAndTop,g,u,p),g.x+=g.w,g.y+=g.h,Ct(l.rightAndBottom,g,u,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},(0,s.F)(l.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class Et{acquireContext(t,e){}releaseContext(t){return!1}
8addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Lt extends Et{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Rt="$chartjs",It={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ft=t=>null===t||""===t;function zt(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[Rt]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ft(o)){const e=(0,s.J)(t,"width");void 0!==e&&(t.width=e)}if(Ft(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,s.J)(t,"height");void 0!==e&&(t.height=e)}return t}const Vt=!!s.K&&{passive:!0};function Bt(t,e,i){t.addEventListener(e,i,Vt)}function Wt(t,e,i){t.canvas.removeEventListener(e,i,Vt)}function Nt(t,e){const i=It[t.type]||t.type,{x:n,y:o}=(0,s.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}function Ht(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function jt(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ht(i.addedNodes,n),e=e&&!Ht(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function $t(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ht(i.removedNodes,n),e=e&&!Ht(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const Yt=new Map;let Ut=0;function Xt(){const t=window.devicePixelRatio;t!==Ut&&(Ut=t,Yt.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Qt(t,e){Yt.size||window.addEventListener("resize",Xt),Yt.set(t,e)}function qt(t){Yt.delete(t),Yt.size||window.removeEventListener("resize",Xt)}function Kt(t,e,i){const n=t.canvas,o=n&&(0,s.I)(n);if(!o)return;const a=(0,s.L)(((t,e)=>{const n=o.clientWidth;i(t,e),n<o.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(o),Qt(t,a),r}function Gt(t,e,i){i&&i.disconnect(),"resize"===e&&qt(t)}function Jt(t,e,i){const n=t.canvas,o=(0,s.L)((e=>{null!==t.ctx&&i(Nt(e,t))}),t);return Bt(n,e,o),o}class Zt extends Et{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(zt(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Rt])return!1;const i=e[Rt].initial;["height","width"].forEach((t=>{const n=i[t];(0,s.k)(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[Rt],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:jt,detach:$t,resize:Kt},o=s[e]||Jt;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;const s={attach:Gt,detach:Gt,resize:Gt},o=s[e]||Wt;o(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return(0,s.G)(t,e,i,n)}isAttached(t){const e=(0,s.I)(t);return!(!e||!e.isConnected)}}function te(t){return!(0,s.M)()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Lt:Zt}class ee{constructor(){(0,n.A)(this,"x",void 0),(0,n.A)(this,"y",void 0),(0,n.A)(this,"active",!1),(0,n.A)(this,"options",void 0),(0,n.A)(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,s.x)(this.x)&&(0,s.x)(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function ie(t,e){const i=t.options.ticks,n=ne(t),o=Math.min(i.maxTicksLimit||n,n),a=i.major.enabled?oe(e):[],r=a.length,l=a[0],h=a[r-1],c=[];if(r>o)return ae(e,c,a,r/o),c;const d=se(a,e,o);if(r>0){let t,i;const n=r>1?Math.round((h-l)/(r-1)):null;for(re(e,c,d,(0,s.k)(n)?0:l-n,l),t=0,i=r-1;t<i;t++)re(e,c,d,a[t],a[t+1]);return re(e,c,d,h,(0,s.k)(n)?e.length:h+n),c}return re(e,c,d),c}function ne(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}function se(t,e,i){const n=le(t),o=e.length/i;if(!n)return Math.max(o,1);const a=(0,s.N)(n);for(let s=0,r=a.length-1;s<r;s++){const t=a[s];if(t>o)return t}return Math.max(o,1)}function oe(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}function ae(t,e,i,n){let s,o=0,a=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===a&&(e.push(t[s]),o++,a=i[o*n])}function re(t,e,i,n,o){const a=(0,s.v)(n,0),r=Math.min((0,s.v)(o,t.length),t.length);let l,h,c,d=0;i=Math.ceil(i),o&&(l=o-n,i=l/Math.floor(l/i)),c=a;while(c<0)d++,c=Math.round(a+d*i);for(h=Math.max(a,0);h<r;h++)h===c&&(e.push(t[h]),d++,c=Math.round(a+d*i))}function le(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(0,n.A)(ee,"defaults",{}),(0,n.A)(ee,"defaultRoutes",void 0);const he=t=>
8"left"===t?"right":"right"===t?"left":t,ce=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,de=(t,e)=>Math.min(e||t,t);function ue(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;o<s;o+=n)i.push(t[Math.floor(o)]);return i}function fe(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),o=t._startPixel,a=t._endPixel,r=1e-6;let l,h=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(h-o,a-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(s-1))/2,h+=s<e?l:-l,h<o-r||h>a+r)))return h}function ge(t,e){(0,s.F)(t,(t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}}))}function pe(t){return t.drawTicks?t.tickLength:0}function me(t,e){if(!t.display)return 0;const i=(0,s.a0)(t.font,e),n=(0,s.E)(t.padding),o=(0,s.b)(t.text)?t.text.length:1;return o*i.lineHeight+n.height}function xe(t,e){return(0,s.j)(t,{scale:e,type:"scale"})}function be(t,e,i){return(0,s.j)(t,{tick:i,index:e,type:"tick"})}function _e(t,e,i){let n=(0,s.a1)(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=he(n)),n}function ye(t,e,i,n){const{top:o,left:a,bottom:r,right:l,chart:h}=t,{chartArea:c,scales:d}=h;let u,f,g,p=0;const m=r-o,x=l-a;if(t.isHorizontal()){if(f=(0,s.a2)(n,a,l),(0,s.i)(i)){const t=Object.keys(i)[0],n=i[t];g=d[t].getPixelForValue(n)+m-e}else g="center"===i?(c.bottom+c.top)/2+m-e:ce(t,i,e);u=l-a}else{if((0,s.i)(i)){const t=Object.keys(i)[0],n=i[t];f=d[t].getPixelForValue(n)-x+e}else f="center"===i?(c.left+c.right)/2-x+e:ce(t,i,e);g=(0,s.a2)(n,r,o),p="left"===i?-s.H:s.H}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}class ve extends ee{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=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),n=(0,s.O)(n,Number.NEGATIVE_INFINITY),{min:(0,s.O)(t,i),max:(0,s.O)(e,n),minDefined:(0,s.g)(t),maxDefined:(0,s.g)(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();if(o&&a)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let s=0,l=r.length;s<l;++s)e=r[s].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),a||(n=Math.max(n,e.max));return i=a&&i>n?n:i,n=o&&i>n?i:n,{min:(0,s.O)(i,(0,s.O)(n,i)),max:(0,s.O)(n,(0,s.O)(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){const e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,s.Q)(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,s.R)(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?ue(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=ie(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,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){const e=this.options.ticks;let i,n,o;for(i=0,n=t.length;i<n;i++)o=t[i],o.label=(0,s.Q)(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){(0,s.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,s.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=de(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxR
8otation;let a,r,l,h=n;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),d=c.widest.width,u=c.highest.height,f=(0,s.S)(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),r=this.maxHeight-pe(t.grid)-e.padding-me(t.title,this.chart.options.font),l=Math.sqrt(d*d+u*u),h=(0,s.U)(Math.min(Math.asin((0,s.S)((c.highest.height+6)/a,-1,1)),Math.asin((0,s.S)(r/l,-1,1))-Math.asin((0,s.S)(u/l,-1,1)))),h=Math.max(n,Math.min(o,h))),this.labelRotation=h}afterCalculateLabelRotation(){(0,s.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const a=me(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=pe(o)+a):(t.height=this.maxHeight,t.width=pe(o)+a),i.display&&this.ticks.length){const{first:e,last:n,widest:o,highest:a}=this._getLabelSizes(),l=2*i.padding,h=(0,s.t)(this.labelRotation),c=Math.cos(h),d=Math.sin(h);if(r){const e=i.mirror?0:d*o.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=i.mirror?0:c*o.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,n,d,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=n*t.width,d=i*e.height):(c=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?c=t.width:"inner"!==s&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,s.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)(0,s.k)(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=ue(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/de(e,i));let h,c,d,u,f,g,p,m,x,b,_,y=0,v=0;for(h=0;h<e;h+=l){if(u=t[h].label,f=this._resolveTickFontOptions(h),n.font=g=f.string,p=o[g]=o[g]||{data:{},gc:[]},m=f.lineHeight,x=b=0,(0,s.k)(u)||(0,s.b)(u)){if((0,s.b)(u))for(c=0,d=u.length;c<d;++c)_=u[c],(0,s.k)(_)||(0,s.b)(_)||(x=(0,s.V)(n,p.data,p.gc,x,_),b+=m)}else x=(0,s.V)(n,p.data,p.gc,x,u),b=m;a.push(x),r.push(b),y=Math.max(x,y),v=Math.max(b,v)}ge(o,e);const w=a.indexOf(y),M=r.indexOf(v),k=t=>({width:a[t]||0,height:r[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(M),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,s.W)(this._alignToPixels?(0,s.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=be(this.getContext(),t,i))}return this.$context||(this.$context=xe(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=(0,s.t)(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*i>r*n?r/i:l/n:l*n<r*i?l/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,h=this.isHorizontal(),c=this.ticks,d=c.length+(l?1:0),u=pe(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(t){return(0,s.X)(i,t,p)};let b,_,y,v,w,M,k,S,P,A,D,O;if("top"===a)b=x(this.bottom),M=this.bottom-u,S=b-m,A=x(t.top)+m,O=t.bottom;
8else if("bottom"===a)b=x(this.top),A=t.top,O=x(t.bottom)-m,M=b+m,S=this.top+u;else if("left"===a)b=x(this.right),w=this.right-u,k=b-m,P=x(t.left)+m,D=t.right;else if("right"===a)b=x(this.left),P=t.left,D=x(t.right)-m,w=b+m,k=this.left+u;else if("x"===e){if("center"===a)b=x((t.top+t.bottom)/2+.5);else if((0,s.i)(a)){const t=Object.keys(a)[0],e=a[t];b=x(this.chart.scales[t].getPixelForValue(e))}A=t.top,O=t.bottom,M=b+m,S=M+u}else if("y"===e){if("center"===a)b=x((t.left+t.right)/2);else if((0,s.i)(a)){const t=Object.keys(a)[0],e=a[t];b=x(this.chart.scales[t].getPixelForValue(e))}w=b-m,k=w-u,P=t.left,D=t.right}const C=(0,s.v)(n.ticks.maxTicksLimit,d),T=Math.max(1,Math.ceil(d/C));for(_=0;_<d;_+=T){const t=this.getContext(_),e=o.setContext(t),n=r.setContext(t),a=e.lineWidth,c=e.color,d=n.dash||[],u=n.dashOffset,g=e.tickWidth,p=e.tickColor,m=e.tickBorderDash||[],x=e.tickBorderDashOffset;y=fe(this,_,l),void 0!==y&&(v=(0,s.X)(i,y,a),h?w=k=P=D=v:M=S=A=O=v,f.push({tx1:w,ty1:M,tx2:k,ty2:S,x1:P,y1:A,x2:D,y2:O,width:a,color:c,borderDash:d,borderDashOffset:u,tickWidth:g,tickColor:p,tickBorderDash:m,tickBorderDashOffset:x}))}return this._ticksLength=d,this._borderValue=b,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:h,padding:c,mirror:d}=o,u=pe(i.grid),f=u+c,g=d?-c:f,p=-(0,s.t)(this.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,A,D,O="middle";if("top"===n)w=this.bottom-g,M=this._getXAxisLabelAlignment();else if("bottom"===n)w=this.top+g,M=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===e){if("center"===n)w=(t.top+t.bottom)/2+f;else if((0,s.i)(n)){const t=Object.keys(n)[0],e=n[t];w=this.chart.scales[t].getPixelForValue(e)+f}M=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)v=(t.left+t.right)/2-f;else if((0,s.i)(n)){const t=Object.keys(n)[0],e=n[t];v=this.chart.scales[t].getPixelForValue(e)}M=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===l?O="top":"end"===l&&(O="bottom"));const C=this._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=o.setContext(this.getContext(x));k=this.getPixelForTick(x)+o.labelOffset,S=this._resolveTickFontOptions(x),P=S.lineHeight,A=(0,s.b)(y)?y.length:1;const e=A/2,i=t.color,l=t.textStrokeColor,c=t.textStrokeWidth;let u,f=M;if(a?(v=k,"inner"===M&&(f=x===b-1?this.options.reverse?"left":"right":0===x?this.options.reverse?"right":"left":"center"),D="top"===n?"near"===h||0!==p?-A*P+P/2:"center"===h?-C.highest.height/2-e*P+P:-C.highest.height+P/2:"near"===h||0!==p?P/2:"center"===h?C.highest.height/2-e*P:C.highest.height-A*P,d&&(D*=-1),0===p||t.showLabelBackdrop||(v+=P/2*Math.sin(p))):(w=k,D=(1-A)*P/2),t.showLabelBackdrop){const e=(0,s.E)(t.backdropPadding),i=C.heights[x],n=C.widths[x];let o=D-e.top,a=0-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i;break}switch(M){case"center":a-=n/2;break;case"right":a-=n;break;case"inner":x===b-1?a-=n:x>0&&(a-=n/2);break}u={left:a,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({label:y,font:S,textOffset:D,options:{rotation:p,color:i,strokeColor:l,strokeWidth:c,textAlign:f,textBaseline:O,translation:[v,w],backdrop:u}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options,i=-(0,s.t)(this.labelRotation);if(i)return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,r=o.widest.width;let l,h;return"left"===e?n?(h=this.right+s,"near"===i?l="left":"center"===i?(l="center",h+=r/2):(l="right",h+=r)):(h=this.right-a,"near"===i?l="right":"center"===i?(l="center",h-=r/2):(l="left",h=this.left)):"right"===e?n?(h=this.left+s,"near"===i?l="right":"center"===i?(l="center",h-=r/2):(l="left",h-=r)):(h=this.left+a,"near"===i?l="left":"center"===i?(l="center",h+=r/2):(l="right",h=this.right)):l="right",{textAlign:l,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
8:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks,n=i.findIndex((e=>e.value===t));if(n>=0){const t=e.setContext(this.getContext(n));return t.lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s<o;++s){const t=n[s];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let h,c,d,u;this.isHorizontal()?(h=(0,s.X)(t,this.left,a)-a/2,c=(0,s.X)(t,this.right,r)+r/2,d=u=l):(d=(0,s.X)(t,this.top,a)-a/2,u=(0,s.X)(t,this.bottom,r)+r/2,h=c=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(h,d),e.lineTo(c,u),e.stroke(),e.restore()}drawLabels(t){const e=this.options.ticks;if(!e.display)return;const i=this.ctx,n=this._computeLabelArea();n&&(0,s.Y)(i,n);const o=this.getLabelItems(t);for(const a of o){const t=a.options,e=a.font,n=a.label,o=a.textOffset;(0,s.Z)(i,n,0,o,e,t)}n&&(0,s.$)(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=(0,s.a0)(i.font),a=(0,s.E)(i.padding),r=i.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||(0,s.i)(e)?(l+=a.bottom,(0,s.b)(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:h,titleY:c,maxWidth:d,rotation:u}=ye(this,l,e,r);(0,s.Z)(t,i.text,0,0,o,{color:i.color,maxWidth:d,rotation:u,textAlign:_e(r,e,n),textBaseline:"middle",translation:[h,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=(0,s.v)(t.grid&&t.grid.z,-1),n=(0,s.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===ve.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s<o;++s){const o=e[s];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,s.a0)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class we{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;Se(e)&&(i=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Me(t,a,i),this.override&&s.d.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in s.d[n]&&(delete s.d[n][i],this.override&&delete s.a3[i])}}function Me(t,e,i){const n=(0,s.a4)(Object.create(null),[i?s.d.get(i):{},s.d.get(e),t.defaults]);s.d.set(e,n),t.defaultRoutes&&ke(e,t.defaultRoutes),t.descriptors&&s.d.describe(e,t.descriptors)}function ke(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),a=[t].concat(n).join("."),r=e[i].split("."),l=r.pop(),h=r.join(".");s.d.route(a,o,h,l)}))}function Se(t){return"id"in t&&"defaults"in t}class Pe{constructor(){this.controllers=new we(E,"datasets",!0),this.elements=new we(ee,"elements"),this.plugins=new we(Object,"plugins"),this.scales=new we(ve,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}
8removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):(0,s.F)(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=(0,s.a5)(t);(0,s.Q)(i["before"+n],[],i),e[t](i),(0,s.Q)(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var Ae=new Pe;class De{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin,a=t[i],r=[e,n,o.options];if(!1===(0,s.Q)(a,r,t)&&n.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;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=(0,s.v)(i.options&&i.options.plugins,{}),o=Oe(i);return!1!==n||e?Te(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Oe(t){const e={},i=[],n=Object.keys(Ae.plugins.items);for(let o=0;o<n.length;o++)i.push(Ae.getPlugin(n[o]));const s=t.plugins||[];for(let o=0;o<s.length;o++){const t=s[o];-1===i.indexOf(t)&&(i.push(t),e[t.id]=!0)}return{plugins:i,localIds:e}}function Ce(t,e){return e||!1!==t?!0===t?{}:t:null}function Te(t,{plugins:e,localIds:i},n,s){const o=[],a=t.getContext();for(const r of e){const e=r.id,l=Ce(n[e],s);null!==l&&o.push({plugin:r,options:Ee(t.config,{plugin:r,local:i[e]},l,a)})}return o}function Ee(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(n,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Le(t,e){const i=s.d.datasets[t]||{},n=(e.datasets||{})[t]||{};return n.indexAxis||e.indexAxis||i.indexAxis||"x"}function Re(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}function Ie(t,e){return t===e?"_index_":"_value_"}function Fe(t){if("x"===t||"y"===t||"r"===t)return t}function ze(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function Ve(t,...e){if(Fe(t))return t;for(const i of e){const e=i.axis||ze(i.position)||t.length>1&&Fe(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Be(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function We(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Be(t,"x",i[0])||Be(t,"y",i[0])}return{}}function Ne(t,e){const i=s.a3[t.type]||{scales:{}},n=e.scales||{},o=Le(t.type,e),a=Object.create(null);return Object.keys(n).forEach((e=>{const r=n[e];if(!(0,s.i)(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=Ve(e,r,We(e,t),s.d.scales[r.type]),h=Ie(l,o),c=i.scales||{};a[e]=(0,s.ab)(Object.create(null),[{axis:l},r,c[l],c[h]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Le(o,e),l=s.a3[o]||{},h=l.scales||{};Object.keys(h).forEach((t=>{const e=Re(t,r),o=i[e+"AxisID"]||e;a[o]=a[o]||Object.create(null),(0,s.ab)(a[o],[{axis:e},n[o],h[t]])}))}
8)),Object.keys(a).forEach((t=>{const e=a[t];(0,s.ab)(e,[s.d.scales[e.type],s.d.scale])})),a}function He(t){const e=t.options||(t.options={});e.plugins=(0,s.v)(e.plugins,{}),e.scales=Ne(t,e)}function je(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function $e(t){return t=t||{},t.data=je(t.data),He(t),t}const Ye=new Map,Ue=new Set;function Xe(t,e){let i=Ye.get(t);return i||(i=e(),Ye.set(t,i),Ue.add(i)),i}const Qe=(t,e,i)=>{const n=(0,s.f)(e,i);void 0!==n&&t.add(n)};class qe{constructor(t){this._config=$e(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=je(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),He(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Xe(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Xe(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Xe(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id,i=this.type;return Xe(`${i}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const l=new Set;e.forEach((e=>{t&&(l.add(t),e.forEach((e=>Qe(l,t,e)))),e.forEach((t=>Qe(l,n,t))),e.forEach((t=>Qe(l,s.a3[o]||{},t))),e.forEach((t=>Qe(l,s.d,t))),e.forEach((t=>Qe(l,s.a6,t)))}));const h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),Ue.has(e)&&a.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,s.a3[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a6]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Ke(this._resolverCache,t,n);let l=a;if(Je(a,e)){o.$shared=!1,i=(0,s.a7)(i)?i():i;const e=this.createResolver(t,i,r);l=(0,s.a8)(a,i,e)}for(const s of e)o[s]=l[s];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Ke(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a8)(o,e,void 0,n):o}}function Ke(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let a=n.get(o);if(!a){const t=(0,s.a9)(e,i);a={resolver:t,subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,a)}return a}const Ge=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).some((e=>(0,s.a7)(t[e])));function Je(t,e){const{isScriptable:i,isIndexable:n}=(0,s.aa)(t);for(const o of e){const e=i(o),a=n(o),r=(a||e)&&t[o];if(e&&((0,s.a7)(r)||Ge(r))||a&&(0,s.b)(r))return!0}return!1}var Ze="4.4.1";const ti=["top","bottom","left","right","chartArea"];function ei(t,e){return"top"===t||"bottom"===t||-1===ti.indexOf(t)&&"x"===e}function ii(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ni(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.Q)(i&&i.onComplete,[t],e)}function si(t){const e=t.chart,i=e.options.animation;(0,s.Q)(i&&i.onProgress,[t],e)}function oi(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}const ai={},ri=t=>{const e=oi(t);return Object.values(ai).filter((t=>t.canvas===e)).pop()};function li(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}function hi(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}function ci(t,e,i){return t.options.clip?t[i]:e[i]}function di(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:ci(i,e,"left"),right:ci(i,e,"right"),top:ci(n,e,"top"),bottom:ci(n,e,"bottom")}:e}class ui{static register(...t){Ae.add(...t),fi()}static unregister(...t){Ae.remove(...t),fi()}constructor(t,e){const i=this.config=new qe(e),n=oi(t),o=ri(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||te(n)),this.platform.updateConfig(i);const l=this.platform.acquireContext(n,r.aspectRatio),h=l&&l.canvas,c=h&&h.height,d=h&&h.width;this.id=(0,s.ac)(),this.ctx=l,this.canvas=h,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new De,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ad)((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],ai[this.id]=this,l&&h?(a.listen(this,"complete",ni),a.listen(this,"progress",si),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return(0,s.k)(t)?e&&o?o:n?i/n: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 Ae}_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 a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,(0,s.ae)(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),(0,s.Q)(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options,e=t.scales||{};(0,s.F)(e,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=Ve(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))),(0,s.F)(o,(e=>
8{const o=e.options,a=o.id,r=Ve(a,o),l=(0,s.v)(o.type,e.dtype);void 0!==o.position&&ei(o.position,r)===ei(e.dposition)||(o.position=e.dposition),n[a]=!0;let h=null;if(a in i&&i[a].type===l)h=i[a];else{const t=Ae.getScale(l);h=new t({id:a,type:l,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(o,t)})),(0,s.F)(n,((t,e)=>{t||delete i[e]})),(0,s.F)(i,(t=>{Tt.configure(this,t,t.options),Tt.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ii("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let o=this.getDatasetMeta(i);const a=n.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=n.indexAxis||Le(a,this.options),o.order=n.order||0,o.index=i,o.label=""+n.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=Ae.getController(a),{datasetElementType:n,dataElementType:r}=s.d.datasets[a];Object.assign(e,{dataElementType:Ae.getElement(r),datasetElementType:n&&Ae.getElement(n)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){(0,s.F)(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let s=0,h=this.data.datasets.length;s<h;s++){const{controller:t}=this.getDatasetMeta(s),e=!n&&-1===o.indexOf(t);t.buildOrUpdateElements(e),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||(0,s.F)(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ii("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){(0,s.F)(this.scales,(t=>{Tt.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,s.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e){const e="_removeElements"===i?-s:s;li(t,n,e)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let o=1;o<e;o++)if(!(0,s.ag)(n,i(o)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Tt.update(this,this.width,this.height,t);const 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(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,(0,s.a7)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(this)?this.attached&&!a.running(this)&&a.start(this):(this.draw(),ni({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=di(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(n&&(0,s.Y)(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.r
8ight,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&(0,s.$)(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return(0,s.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=gt.modes[e];return"function"===typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={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(n)),n}getContext(){return this.$context||(this.$context=(0,s.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"===typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);(0,s.h)(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),a.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,s.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ai[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,s.F)(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}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){const n=i?"set":"remove";let s,o,a,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!(0,s.ah)(i,e);n&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=s(e,t),a=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,i,a),l=(0,s.ai)(t),h=hi(t,this._lastEvent,i,l);i&&(this._lastEvent=null,(0,s.Q)(o.onHover,[t,r,this],this),l&&(0,s.Q)(o.onClick,[t,r,this],this));const c=!(0,s.ah)(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=h,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function fi(){return(0,s.F)(ui.instances,(t=>t._plugins.invalidate()))}function gi(t,e,i){const{startAngle:n,pixelMargin:o,x:a,y:r,outerRadius:l,innerRadius:h}=e;let c=o/l;t.beginPath(),t.arc(a,r,l,n-c,i+c),h>o?(c=o/h,t.arc(a,r,h,i+c,n-c,!0)):t.arc(a,r,o,i+s.H,n-s.H),t.closePath(),t.clip()}function pi(t){return(0,s.ak)(t,["outerStart","outerEnd","innerStart","innerEnd"])}function mi(t,e,i,n){const o=pi(t.options.borderRadius),a=(i-e)/2,r=Math.min(a,n*e/2),l=t=>{const e=(i-Math.min(a,t))*n/2;return(0,s.S)(t,0,Math.min(a,e))};return{outerStart:l(o.outerStart),outerEnd:l(o.outerEnd),innerStart:(0,s.S)(o.innerStart,0,r),innerEnd:(0,s.S)(o.innerEnd,0,r)}}function xi(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function bi(t,e,i,n,o,a){const{x:r,y:l,startAngle:h,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+n+i-c,0),f=d>0?d+n+i+c:0;let g=0;const p=o-h;if(n){const t=d>0?d-n:0,e=u>0?u-n:0,i=(t+e)/2,s=0!==i?p*i/(i+n):p;g=(p-s)/2}const m=Math.max(.001,p*u-i/s.P)/u,x=(p-m)/2,b=h+x+g,_=o-x-g,{outerStart:y,outerEnd:v,innerStart:w,innerEnd:M}=mi(e,f,u,_-b),k=u-y,S=u-v,P=b+y/k,A=_-v/S,D=f+w,O=f+M,C=b+w/D,T=_-M/O;if(t.beginPath(),a){const e=(P+A)/2;if(t.arc(r,l,u,P,e),t.arc(r,l,u,e,A),v>0){const e=xi(S,A,r,l);t.arc(e.x,e.y,v,A,_+s.H)}const i=xi(O,_,r,l);if(t.lineTo(i.x,i.y),M>0){const e=xi(O,T,r,l);t.arc(e.x,e.y,M,_+s.H,T+Math.PI)}const n=(_-M/f+(b+w/f))/2;
8if(t.arc(r,l,f,_-M/f,n,!0),t.arc(r,l,f,n,b+w/f,!0),w>0){const e=xi(D,C,r,l);t.arc(e.x,e.y,w,C+Math.PI,b-s.H)}const o=xi(k,b,r,l);if(t.lineTo(o.x,o.y),y>0){const e=xi(k,P,r,l);t.arc(e.x,e.y,y,b-s.H,P)}}else{t.moveTo(r,l);const e=Math.cos(P)*u+r,i=Math.sin(P)*u+l;t.lineTo(e,i);const n=Math.cos(A)*u+r,s=Math.sin(A)*u+l;t.lineTo(n,s)}t.closePath()}function _i(t,e,i,n,o){const{fullCircles:a,startAngle:r,circumference:l}=e;let h=e.endAngle;if(a){bi(t,e,i,n,h,o);for(let e=0;e<a;++e)t.fill();isNaN(l)||(h=r+(l%s.T||s.T))}return bi(t,e,i,n,h,o),t.fill(),h}function yi(t,e,i,n,o){const{fullCircles:a,startAngle:r,circumference:l,options:h}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:f}=h,g="inner"===h.borderAlign;if(!c)return;t.setLineDash(u||[]),t.lineDashOffset=f,g?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let p=e.endAngle;if(a){bi(t,e,i,n,p,o);for(let e=0;e<a;++e)t.stroke();isNaN(l)||(p=r+(l%s.T||s.T))}g&&gi(t,e,p),a||(bi(t,e,i,n,p,o),t.stroke())}(0,n.A)(ui,"defaults",s.d),(0,n.A)(ui,"instances",ai),(0,n.A)(ui,"overrides",s.a3),(0,n.A)(ui,"registry",Ae),(0,n.A)(ui,"version",Ze),(0,n.A)(ui,"getChart",ri);class vi extends ee{constructor(t){super(),(0,n.A)(this,"circumference",void 0),(0,n.A)(this,"endAngle",void 0),(0,n.A)(this,"fullCircles",void 0),(0,n.A)(this,"innerRadius",void 0),(0,n.A)(this,"outerRadius",void 0),(0,n.A)(this,"pixelMargin",void 0),(0,n.A)(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:a}=(0,s.D)(n,{x:t,y:e}),{startAngle:r,endAngle:l,innerRadius:h,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,f=(0,s.v)(d,l-r),g=f>=s.T||(0,s.p)(o,r,l),p=(0,s.aj)(a,h+u,c+u);return g&&p}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,h=(n+s)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,a=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)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*n,Math.sin(r)*n);const l=1-Math.sin(Math.min(s.P,i||0)),h=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,_i(t,this,h,o,a),yi(t,this,h,o,a),t.restore()}}function wi(t,e,i=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 Mi(t,e,i){t.lineTo(i.x,i.y)}function ki(t){return t.stepped?s.ar:t.tension||"monotone"===t.cubicInterpolationMode?s.as:Mi}function Si(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:a,end:r}=e,l=Math.max(s,a),h=Math.min(o,r),c=s<a&&o<a||s>r&&o>r;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function Pi(t,e,i,n){const{points:s,options:o}=e,{count:a,start:r,loop:l,ilen:h}=Si(s,i,n),c=ki(o);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=h;++d)u=s[(r+(p?h-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):c(t,f,u,p,o.stepped),f=u);return l&&(u=s[(r+(p?h:0))%a],c(t,f,u,p,o.stepped)),!!l}function Ai(t,e,i,n){const s=e.points,{count:o,start:a,ilen:r}=Si(s,i,n),{move:l=!0,reverse:h}=n||{};let c,d,u,f,g,p,m=0,x=0;const b=t=>(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=s[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=s[b(c)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Di(t){const e=t.options,i=e.borderDash&&e.borderDash.length,n=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return n?Ai:Pi}function Oi(t){return t.stepped?s.ao:t.tension||"monotone"===t.cubicInterpolationMode?s.ap:s.aq}function Ci(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),wi(t,e.options),t.stroke(s)}function Ti(t,e,i,n){const{segments:s,options:o}=e,a=Di(e);for(const r of s)wi(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(0,n.A)(vi,"id","arc"),(0,n.A)(vi,"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,n.A)(vi,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,n.A)(vi,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});const Ei="function"===typeof Path2D;
8function Li(t,e,i,n){Ei&&!e.options.segment?Ci(t,e,i,n):Ti(t,e,i,n)}class Ri extends ee{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;(0,s.al)(this._points,i,t,n,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(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,a=(0,s.an)(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=Oi(i);let h,c;for(h=0,c=a.length;h<c;++h){const{start:s,end:c}=a[h],d=o[s],u=o[c];if(d===u){r.push(d);continue}const f=Math.abs((n-d[e])/(u[e]-d[e])),g=l(d,u,f,i.stepped);g[e]=t[e],r.push(g)}return 1===r.length?r[0]:r}pathSegment(t,e,i){const n=Di(this);return n(t,this,e,i)}path(t,e,i){const n=this.segments,s=Di(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const a of n)o&=s(t,this,a,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const s=this.options||{},o=this.points||[];o.length&&s.borderWidth&&(t.save(),Li(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ii(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<s.radius+s.hitRadius}(0,n.A)(Ri,"id","line"),(0,n.A)(Ri,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,n.A)(Ri,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,n.A)(Ri,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class Fi extends ee{constructor(t){super(),(0,n.A)(this,"parsed",void 0),(0,n.A)(this,"skip",void 0),(0,n.A)(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ii(this,t,"x",e)}inYRange(t,e){return Ii(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return 2*(e+i)}draw(t,e){const 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(){const t=this.options||{};return t.radius+t.hitRadius}}function zi(t,e){const{x:i,y:n,base:s,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,h,c,d;return t.horizontal?(d=a/2,r=Math.min(i,s),l=Math.max(i,s),h=n-d,c=n+d):(d=o/2,r=i-d,l=i+d,h=Math.min(n,s),c=Math.max(n,s)),{left:r,top:h,right:l,bottom:c}}function Vi(t,e,i,n){return t?0:(0,s.S)(e,i,n)}function Bi(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,a=(0,s.av)(n);return{t:Vi(o.top,a.top,0,i),r:Vi(o.right,a.right,0,e),b:Vi(o.bottom,a.bottom,0,i),l:Vi(o.left,a.left,0,e)}}function Wi(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,a=(0,s.aw)(o),r=Math.min(e,i),l=t.borderSkipped,h=n||(0,s.i)(o);return{topLeft:Vi(!h||l.top||l.left,a.topLeft,0,r),topRight:Vi(!h||l.top||l.right,a.topRight,0,r),bottomLeft:Vi(!h||l.bottom||l.left,a.bottomLeft,0,r),bottomRight:Vi(!h||l.bottom||l.right,a.bottomRight,0,r)}}function Ni(t){const e=zi(t),i=e.right-e.left,n=e.bottom-e.top,s=Bi(t,i/2,n/2),o=Wi(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Hi(t,e,i,n){const o=null===e,a=null===i,r=o&&a,l=t&&!r&&zi(t,n);return l&&(o||(0,s.aj)(e,l.left,l.right))&&(a||(0,s.aj)(i,l.top,l.bottom))}function ji(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function $i(t,e){t.rect(e.x,e.y,e.w,e.h)}function Yi(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+o,h:t.h+a,radius:t.radius}}(0,n.A)(Fi,"id","point"),(0,n.A)(Fi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,n.A)(Fi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class Ui extends ee{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmou
8nt=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:o,outer:a}=Ni(this),r=ji(a.radius)?s.au:$i;t.save(),a.w===o.w&&a.h===o.h||(t.beginPath(),r(t,Yi(a,e,o)),t.clip(),r(t,Yi(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Yi(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Hi(this,t,e,i)}inXRange(t,e){return Hi(this,t,null,e)}inYRange(t,e){return Hi(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}(0,n.A)(Ui,"id","bar"),(0,n.A)(Ui,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,n.A)(Ui,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Xi(t,e,i){const n=t.segments,o=t.points,a=e.points,r=[];for(const l of n){let{start:t,end:n}=l;n=Ki(t,n,o);const h=Qi(i,o[t],o[n],l.loop);if(!e.segments){r.push({source:l,target:h,start:o[t],end:o[n]});continue}const c=(0,s.an)(e,h);for(const e of c){const t=Qi(i,a[e.start],a[e.end],e.loop),n=(0,s.ax)(l,o,t);for(const s of n)r.push({source:s,target:e,start:{[i]:Gi(h,t,"start",Math.max)},end:{[i]:Gi(h,t,"end",Math.min)}})}}return r}function Qi(t,e,i,n){if(n)return;let o=e[t],a=i[t];return"angle"===t&&(o=(0,s.ay)(o),a=(0,s.ay)(a)),{property:t,start:o,end:a}}function qi(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=Ki(t,e,s);const a=s[t],r=s[e];null!==n?(o.push({x:a.x,y:n}),o.push({x:r.x,y:n})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}function Ki(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Gi(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ji(t,e){let i=[],n=!1;return(0,s.b)(t)?(n=!0,i=t):i=qi(t,e),i.length?new Ri({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Zi(t){return t&&!1!==t.fill}function tn(t,e,i){const n=t[e];let o=n.fill;const a=[e];let r;if(!i)return o;while(!1!==o&&-1===a.indexOf(o)){if(!(0,s.g)(o))return o;if(r=t[o],!r)return!1;if(r.visible)return o;a.push(o),o=r.fill}return!1}function en(t,e,i){const n=an(t);if((0,s.i)(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return(0,s.g)(o)&&Math.floor(o)===o?nn(n[0],e,o,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function nn(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}function sn(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:(0,s.i)(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}function on(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:(0,s.i)(t)?t.value:e.getBaseValue(),n}function an(t){const e=t.options,i=e.fill;let n=(0,s.v)(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}function rn(t){const{scale:e,index:i,line:n}=t,s=[],o=n.segments,a=n.points,r=ln(e,i);r.push(Ji({x:null,y:e.bottom},n));for(let l=0;l<o.length;l++){const t=o[l];for(let e=t.start;e<=t.end;e++)hn(s,a[e],r)}return new Ri({points:s,options:{}})}function ln(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const t=n[s];if(t.index===e)break;t.hidden||i.unshift(t.dataset)}return i}function hn(t,e,i){const n=[];for(let s=0;s<i.length;s++){const o=i[s],{first:a,last:r,point:l}=cn(o,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function cn(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],a=t.segments,r=t.points;let l=!1,h=!1;for(let c=0;c<a.length;c++){const t=a[c],e=r[t.start][i],n=r[t.end][i];if((0,s.aj)(o,e,n)){l=o===e,h=o===n;break}}return{first:l,last:h,point:n}}class dn{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:a}=this;return e=e||{start:0,end:s.T},t.arc(n,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function un(t){const{chart:e,fill:i,line:n}=t;if((0,s.g)(i))return fn(e,i);if("stack"===i)return rn(t);if("shape"===i)return!0;const o=gn(t);return o instanceof dn?o:Ji(o,n)}function fn(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}function gn(t){const e=t.scale||{};return e.getPointPositionForValue?mn(t):pn(t)}function pn(t){const{scale:e={},fill:i}=t,n=sn(i,e);if((0,s.g)(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}function mn(t){const{scale:e,fill:i}=t,n=e.options,s=e.getLabels().length,o=n.reverse?e.max:e.min,a=on(i,e,o),r=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new dn({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(e.getPointPositionForValue(l,a));return r}function xn(t,e,i){const n=un(e),{line:o,scale:a,axis:r}=e,l=o.options,h=l.fill,c=l.backgroundColor,{above:d=c,below:u=c}=h||{};n&&o.points.length&&((0,s.Y)(t,i),bn(t,{line:o,target:n,above:d,below:u,area:i,scale:a,axis:r}),(0,s.$)(t))}function bn(t,e){const{line:i,target:n,above:s,below:o,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==s&&(_n(t,n,a.top),yn(t,{line:i,target:n,color:s,scale:r,property:l}
vendor: 4,378 bytes, line 8
8),t.restore(),t.save(),_n(t,n,a.bottom)),yn(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore()}function _n(t,e,i){const{segments:n,points:s}=e;let o=!0,a=!1;t.beginPath();for(const r of n){const{start:n,end:l}=r,h=s[n],c=s[Ki(n,l,s)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),a=!!e.pathSegment(t,r,{move:a}),a?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function yn(t,e){const{line:i,target:n,property:s,color:o,scale:a}=e,r=Xi(i,n,s);for(const{source:l,target:h,start:c,end:d}of r){const{style:{backgroundColor:e=o}={}}=l,r=!0!==n;t.save(),t.fillStyle=e,vn(t,a,r&&Qi(s,c,d)),t.beginPath();const u=!!i.pathSegment(t,l);let f;if(r){u?t.closePath():wn(t,n,d,s);const e=!!n.pathSegment(t,h,{move:u,reverse:!0});f=u&&e,f||wn(t,n,c,s)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function vn(t,e,i){const{top:n,bottom:s}=e.chart.chartArea,{property:o,start:a,end:r}=i||{};"x"===o&&(t.beginPath(),t.rect(a,n,r-a,s-n),t.clip())}function wn(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var Mn={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let o,a,r,l;for(a=0;a<n;++a)o=t.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ri&&(l={visible:t.isDatasetVisible(a),index:a,fill:en(r,a,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<n;++a)l=s[a],l&&!1!==l.fill&&(l.fill=tn(s,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let a=s.length-1;a>=0;--a){const e=s[a].$filler;e&&(e.line.updateControlPoints(o,e.axis),n&&e.fill&&xn(t.ctx,e,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const e=n[s].$filler;Zi(e)&&xn(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Zi(n)&&"beforeDatasetDraw"===i.drawTime&&xn(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const kn=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}},Sn=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Pn extends ee{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(){const t=this.options.labels||{};let 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(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=(0,s.a0)(i.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=kn(i,o);let h,c;e.font=n.string,this.isHorizontal()?(h=this.maxWidth,c=this._fitRows(a,o,r,l)+10):(c=this.maxHeight,h=this._fitCols(a,n,r,l)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+a;let c=t;s.textAlign="left",s.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+s.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:n},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,n){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;
8return this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:m}=An(i,e,s,t,n);o>0&&u+m+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:m},d=Math.max(d,p),u+=m+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,a=(0,s.az)(o,this.left,this.width);if(this.isHorizontal()){let o=0,r=(0,s.a2)(i,this.left+n,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,r=(0,s.a2)(i,this.left+n,this.right-this.lineWidths[o])),l.top+=this.top+t+n,l.left=a.leftForLtr(a.x(r),l.width),r+=l.width+n}else{let o=0,r=(0,s.a2)(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,r=(0,s.a2)(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),l.top=r,l.left+=this.left+n,l.left=a.leftForLtr(a.x(l.left),l.width),r+=l.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,s.Y)(t,this),this._draw(),(0,s.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:a}=t,r=s.d.color,l=(0,s.az)(t.rtl,this.left,this.width),h=(0,s.a0)(a.font),{padding:c}=a,d=h.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=kn(a,d),x=function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();const o=(0,s.v)(i.lineWidth,1);if(n.fillStyle=(0,s.v)(i.fillStyle,r),n.lineCap=(0,s.v)(i.lineCap,"butt"),n.lineDashOffset=(0,s.v)(i.lineDashOffset,0),n.lineJoin=(0,s.v)(i.lineJoin,"miter"),n.lineWidth=o,n.strokeStyle=(0,s.v)(i.strokeStyle,r),n.setLineDash((0,s.v)(i.lineDash,[])),a.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},h=l.xPlus(t,g/2),c=e+u;(0,s.aD)(n,r,h,c,a.pointStyleWidth&&g)}else{const a=e+Math.max((d-p)/2,0),r=l.leftForLtr(t,g),h=(0,s.aw)(i.borderRadius);n.beginPath(),Object.values(h).some((t=>0!==t))?(0,s.au)(n,{x:r,y:a,w:g,h:p,radius:h}):n.rect(r,a,g,p),n.fill(),0!==o&&n.stroke()}n.restore()},b=function(t,e,i){(0,s.Z)(n,i.text,t,e+m/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})},_=this.isHorizontal(),y=this._computeTitleHeight();f=_?{x:(0,s.a2)(o,this.left+c,this.right-i[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:(0,s.a2)(o,this.top+y+c,this.bottom-e[0].height),line:0},(0,s.aA)(this.ctx,t.textDirection);const v=m+c;this.legendItems.forEach(((r,d)=>{n.strokeStyle=r.fontColor,n.fillStyle=r.fontColor;const p=n.measureText(r.text).width,m=l.textAlign(r.textAlign||(r.textAlign=a.textAlign)),w=g+u+p;let M=f.x,k=f.y;l.setWidth(this.width),_?d>0&&M+w+c>this.right&&(k=f.y+=v,f.line++,M=f.x=(0,s.a2)(o,this.left+c,this.right-i[f.line])):d>0&&k+v>this.bottom&&(M=f.x=M+e[f.line].width+c,f.line++,k=f.y=(0,s.a2)(o,this.top+y+c,this.bottom-e[f.line].height));const S=l.x(M);if(x(S,k,r),M=(0,s.aB)(m,M+g+u,_?M+w:this.right,t.rtl),b(l.x(M),k,r),_)f.x+=w+c;else if("string"!==typeof r.text){const t=h.lineHeight;f.y+=Cn(r,t)+c}else f.y+=v})),(0,s.aC)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=(0,s.a0)(e.font),n=(0,s.E)(e.padding);if(!e.display)return;const o=(0,s.az)(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=i.size/2,h=n.top+l;let c,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+h,d=(0,s.a2)(t.align,d,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=h+(0,s.a2)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=(0,s.a2)(r,d,d+u);a.textAlign=o.textAlign((0,s.a1)(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,(0,s.Z)(a,e.text,f,c,i)}_computeTitleHeight(){const 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){let i,n,o;if((0,s.aj)(t,this.left,this.right)&&(0,s.aj)(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],(0,s.aj)(t,n.left,n.left+n.width)&&(0,s.aj)(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!Tn(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const n=this._hoveredItem,o=Sn(n,i);n&&!o&&(0,s.Q)(e.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!o&&(0,s.Q)(e.onHover,[t,i,this],this)}else i&&(0,s.Q)(e.onClick,[t,i,this],this)}}function An(t,e,i,n,s){const o=Dn(n,t,e,i),a=On(s,n,e.lineHeight);return{itemWidth:o,itemHeight:a}}function Dn(t,e,i,n){let s=t.text;return s&&"string"!==typeof s&&(s=s.reduce(((t,e)=>t.length>e.length?t:e))),e+i.size/2+n.measureText(s).width}function On(t,e,i){let n=t;return"string"!==typeof e.text&&(n=Cn(e,i)),n}function Cn(t,e){const i=t.text?t.text.length:0;return e*i}function Tn(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}var En={id:"legend",_element:Pn,start(t,e,i){const n=t.legend=new Pn({ctx:t.ctx,options:i,chart:t});Tt.configure(t,n,i),Tt.addBox(t,n)},stop(t){Tt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Tt.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)}
8,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:a,useBorderRadius:r,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const h=t.controller.getStyle(i?0:void 0),c=(0,s.E)(h.borderWidth);return{text:e[t.index].label,fillStyle:h.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:h.borderColor,pointStyle:n||h.pointStyle,rotation:h.rotation,textAlign:o||h.textAlign,borderRadius:r&&(l||h.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 Ln extends ee{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){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=(0,s.b)(i.text)?i.text.length:1;this._padding=(0,s.E)(i.padding);const o=n*(0,s.a0)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:a}=this,r=a.align;let l,h,c,d=0;return this.isHorizontal()?(h=(0,s.a2)(r,i,o),c=e+t,l=o-i):("left"===a.position?(h=i+t,c=(0,s.a2)(r,n,e),d=-.5*s.P):(h=o-t,c=(0,s.a2)(r,e,n),d=.5*s.P),l=n-e),{titleX:h,titleY:c,maxWidth:l,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=(0,s.a0)(e.font),n=i.lineHeight,o=n/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:h}=this._drawArgs(o);(0,s.Z)(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:h,textAlign:(0,s.a1)(e.align),textBaseline:"middle",translation:[a,r]})}}function Rn(t,e){const i=new Ln({ctx:t.ctx,options:e,chart:t});Tt.configure(t,i,e),Tt.addBox(t,i),t.titleBlock=i}var In={id:"title",_element:Ln,start(t,e,i){Rn(t,i)},stop(t){const e=t.titleBlock;Tt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Tt.configure(t,n,i),n.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}};new WeakMap;const Fn={average(t){if(!t.length)return!1;let e,i,n=0,s=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,s+=t.y,++o}}return{x:n/o,y:s/o}},nearest(t,e){if(!t.length)return!1;let i,n,o,a=e.x,r=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=n.getCenterPoint(),i=(0,s.aE)(e,t);i<l&&(l=i,o=n)}}if(o){const t=o.tooltipPosition();a=t.x,r=t.y}return{x:a,y:r}}};function zn(t,e){return e&&((0,s.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vn(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Bn(t,e){const{element:i,datasetIndex:n,index:s}=e,o=t.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:t,label:a,parsed:o.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function Wn(t,e){const i=t.chart.ctx,{body:n,footer:o,title:a}=t,{boxWidth:r,boxHeight:l}=e,h=(0,s.a0)(e.bodyFont),c=(0,s.a0)(e.titleFont),d=(0,s.a0)(e.footerFont),u=a.length,f=o.length,g=n.length,p=(0,s.E)(e.padding);let m=p.height,x=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const t=e.dis
8playColors?Math.max(l,h.lineHeight):h.lineHeight;m+=g*t+(b-g)*h.lineHeight+(b-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){x=Math.max(x,i.measureText(t).width+_)};return i.save(),i.font=c.string,(0,s.F)(t.title,y),i.font=h.string,(0,s.F)(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?r+2+e.boxPadding:0,(0,s.F)(n,(t=>{(0,s.F)(t.before,y),(0,s.F)(t.lines,y),(0,s.F)(t.after,y)})),_=0,i.font=d.string,(0,s.F)(t.footer,y),i.restore(),x+=p.width,{width:x,height:m}}function Nn(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}function Hn(t,e,i,n){const{x:s,width:o}=n,a=i.caretSize+i.caretPadding;return"left"===t&&s+o+a>e.width||("right"===t&&s-o-a<0||void 0)}function jn(t,e,i,n){const{x:s,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===n?h=s<=(r+l)/2?"left":"right":s<=o/2?h="left":s>=a-o/2&&(h="right"),Hn(h,t,e,i)&&(h="center"),h}function $n(t,e,i){const n=i.yAlign||e.yAlign||Nn(t,i);return{xAlign:i.xAlign||e.xAlign||jn(t,e,i,n),yAlign:n}}function Yn(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}function Un(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}function Xn(t,e,i,n){const{caretSize:o,caretPadding:a,cornerRadius:r}=t,{xAlign:l,yAlign:h}=i,c=o+a,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=(0,s.aw)(r);let p=Yn(e,l);const m=Un(e,h,c);return"center"===h?"left"===l?p+=c:"right"===l&&(p-=c):"left"===l?p-=Math.max(d,f)+o:"right"===l&&(p+=Math.max(u,g)+o),{x:(0,s.S)(p,0,n.width-e.width),y:(0,s.S)(m,0,n.height-e.height)}}function Qn(t,e,i){const n=(0,s.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function qn(t){return zn([],Vn(t))}function Kn(t,e,i){return(0,s.j)(t,{tooltip:e,tooltipItems:i,type:"tooltip"})}function Gn(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Jn={beforeTitle:s.aF,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)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;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return(0,s.k)(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:s.aF,afterBody:s.aF,beforeFooter:s.aF,footer:s.aF,afterFooter:s.aF};function Zn(t,e,i,n){const s=t[e].call(i,n);return"undefined"===typeof s?Jn[e].call(i,n):s}class ts extends ee{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new c(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Kn(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=Zn(i,"beforeTitle",this,t),s=Zn(i,"title",this,t),o=Zn(i,"afterTitle",this,t);let a=[];return a=zn(a,Vn(n)),a=zn(a,Vn(s)),a=zn(a,Vn(o)),a}getBeforeBody(t,e){return qn(Zn(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return(0,s.F)(t,(t=>{const e={before:[],lines:[],after:[]},s=Gn(i,t);zn(e.before,Vn(Zn(s,"beforeLabel",this,t))),zn(e.lines,Zn(s,"label",this,t)),zn(e.after,Vn(Zn(s,"afterLabel",this,t))),n.push(e)})),n}getAfterBody(t,e){return qn(Zn(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Zn(i,"beforeFooter",this,t),s=Zn(i,"footer",this,t),o=Zn(i,"afterFooter",this,t);let a=[];return a=zn(a,Vn(n)),a=zn(a,Vn(s)),a=zn(a,Vn(o)),a}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],a=[];let r,l,h=[];for(r=0,l=e.length;r<l;++r)h.push(Bn(this.chart,e[r]));return t.filter&&(h=h.filter(((e,n,s)=>t.filter(e,n,s,i)))),t.itemSort&&(h=h.sort(((e,n)=>
8t.itemSort(e,n,i)))),(0,s.F)(h,(e=>{const i=Gn(t.callbacks,e);n.push(Zn(i,"labelColor",this,e)),o.push(Zn(i,"labelPointStyle",this,e)),a.push(Zn(i,"labelTextColor",this,e))})),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=h,h}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,o=[];if(n.length){const t=Fn[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Wn(this,i),a=Object.assign({},t,e),r=$n(this.chart,i,a),l=Xn(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:l,topRight:h,bottomLeft:c,bottomRight:d}=(0,s.aw)(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,x,b,_,y,v;return"center"===o?(y=f+p/2,"left"===n?(m=u,x=m-a,_=y+a,v=y-a):(m=u+g,x=m+a,_=y-a,v=y+a),b=m):(x="left"===n?u+Math.max(l,c)+a:"right"===n?u+g-Math.max(h,d)-a:this.caretX,"top"===o?(_=f,y=_-a,m=x-a,b=x+a):(_=f+p,y=_+a,m=x+a,b=x-a),v=_),{x1:m,x2:x,x3:b,y1:_,y2:y,y3:v}}drawTitle(t,e,i){const n=this.title,o=n.length;let a,r,l;if(o){const h=(0,s.az)(i.rtl,this.x,this.width);for(t.x=Qn(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.a0)(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:h}=o,c=(0,s.a0)(o.bodyFont),d=Qn(this,"left",o),u=n.x(d),f=l<c.lineHeight?(c.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(h,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,h)+h/2,c=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,s.at)(t,e,i,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,(0,s.at)(t,e,i,c)}else{t.lineWidth=(0,s.i)(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,h),i=n.leftForLtr(n.xPlus(u,1),h-2),r=(0,s.aw)(a.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,s.au)(t,{x:e,y:g,w:h,h:l,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),(0,s.au)(t,{x:i,y:g+1,w:h-2,h:l-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,h,l),t.strokeRect(e,g,h,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:h,boxPadding:c}=i,d=(0,s.a0)(i.bodyFont);let u=d.lineHeight,f=0;const g=(0,s.az)(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let x,b,_,y,v,w,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Qn(this,m,i),e.fillStyle=i.bodyColor,(0,s.F)(this.beforeBody,p),f=r&&"right"!==m?"center"===a?h/2+c:h+2+c:0,y=0,w=n.length;y<w;++y){for(x=n[y],b=this.labelTextColors[y],e.fillStyle=b,(0,s.F)(x.before,p),_=x.lines,r&&_.length&&(this._drawColorBox(e,t,y,g,i),u=Math.max(d.lineHeight,l)),v=0,M=_.length;v<M;++v)p(_[v]),u=d.lineHeight;(0,s.F)(x.after,p)}f=0,u=d.lineHeight,(0,s.F)(this.afterBody,p),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let a,r;if(o){const l=(0,s.az)(i.rtl,this.x,this.width);for(t.x=Qn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,s.a0)(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;
vendor: 4,643 bytes, line 8
8++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:h,height:c}=i,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=(0,s.aw)(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),"top"===a&&this.drawCaret(t,e,i,n),e.lineTo(r+h-u,l),e.quadraticCurveTo(r+h,l,r+h,l+u),"center"===a&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+h,l+c-g),e.quadraticCurveTo(r+h,l+c,r+h-g,l+c),"bottom"===a&&this.drawCaret(t,e,i,n),e.lineTo(r+f,l+c),e.quadraticCurveTo(r,l+c,r,l+c-f),"center"===a&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=Fn[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Wn(this,t),a=Object.assign({},i,this._size),r=$n(e,t,a),l=Xn(t,a,r,e);n._to===l.x&&s._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=(0,s.E)(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),(0,s.aA)(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,s.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),o=!(0,s.ah)(i,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),l=e||!(0,s.ah)(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,o=Fn[s.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}(0,n.A)(ts,"positioners",Fn);var es={id:"tooltip",_element:ts,positioners:Fn,afterInit(t,e,i){i&&(t.tooltip=new ts({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>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:Jn},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"]};const is=(t,e,i,n)=>
8("string"===typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function ns(t,e,i,n){const s=t.indexOf(e);if(-1===s)return is(t,e,i,n);const o=t.lastIndexOf(e);return s!==o?i:s}const ss=(t,e)=>null===t?null:(0,s.S)(Math.round(t),0,e);function os(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class as extends ve{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,s.k)(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:ns(i,t,(0,s.v)(e,t),this._addedLabels),ss(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let 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(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){return os.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function rs(t,e){const i=[],n=1e-14,{bounds:o,step:a,min:r,max:l,precision:h,count:c,maxTicks:d,maxDigits:u,includeBounds:f}=t,g=a||1,p=d-1,{min:m,max:x}=e,b=!(0,s.k)(r),_=!(0,s.k)(l),y=!(0,s.k)(c),v=(x-m)/(u+1);let w,M,k,S,P=(0,s.aH)((x-m)/p/g)*g;if(P<n&&!b&&!_)return[{value:m},{value:x}];S=Math.ceil(x/P)-Math.floor(m/P),S>p&&(P=(0,s.aH)(S*P/p/g)*g),(0,s.k)(h)||(w=Math.pow(10,h),P=Math.ceil(P*w)/w),"ticks"===o?(M=Math.floor(m/P)*P,k=Math.ceil(x/P)*P):(M=m,k=x),b&&_&&a&&(0,s.aI)((l-r)/a,P/1e3)?(S=Math.round(Math.min((l-r)/P,d)),P=(l-r)/S,M=r,k=l):y?(M=b?r:M,k=_?l:k,S=c-1,P=(k-M)/S):(S=(k-M)/P,S=(0,s.aJ)(S,Math.round(S),P/1e3)?Math.round(S):Math.ceil(S));const A=Math.max((0,s.aK)(P),(0,s.aK)(M));w=Math.pow(10,(0,s.k)(h)?A:h),M=Math.round(M*w)/w,k=Math.round(k*w)/w;let D=0;for(b&&(f&&M!==r?(i.push({value:r}),M<r&&D++,(0,s.aJ)(Math.round((M+D*P)*w)/w,r,ls(r,v,t))&&D++):M<r&&D++);D<S;++D){const t=Math.round((M+D*P)*w)/w;if(_&&t>l)break;i.push({value:t})}return _&&f&&k!==l?i.length&&(0,s.aJ)(i[i.length-1].value,l,ls(l,v,t))?i[i.length-1].value=l:i.push({value:l}):_&&k!==l||i.push({value:k}),i}function ls(t,e,{horizontal:i,minRotation:n}){const o=(0,s.t)(n),a=(i?Math.sin(o):Math.cos(o))||.001,r=.75*e*(""+t).length;return Math.min(e/a,r)}(0,n.A)(as,"id","category"),(0,n.A)(as,"defaults",{ticks:{callback:os}});class hs extends ve{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(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const a=t=>n=e?n:t,r=t=>o=i?o:t;if(t){const t=(0,s.s)(n),e=(0,s.s)(o);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(n===o){let e=0===o?1:Math.abs(.05*o);r(o+e),t||a(n-e)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},o=this._range||this,a=rs(n,o);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(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}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 cs extends hs{determineDataLimits(){const{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(){const t=this.isHorizontal(),e=t?this.width:this.height,i=(0,s.t)(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}(0,n.A)(cs,"id","linear"),(0,n.A)(cs,"defaults",{ticks:{callback:s.aL.formatters.numeric}});const ds=t=>Math.floor((0,s.aM)(t)),us=(t,e)=>Math.pow(10,ds(t)+e);function fs(t){const e=t/Math.pow(10,ds(t));return 1===e}function gs(t,e,i){const n=Math.pow(10,i),s=Math.floor(t/n),o=Math.ceil(e/n);return o-s}function ps(t,e){const i=e-t;let n=ds(i);while(gs(t,e,n)>10)n++;
8while(gs(t,e,n)<10)n--;return Math.min(n,ds(t))}function ms(t,{min:e,max:i}){e=(0,s.O)(t.min,e);const n=[],o=ds(e);let a=ps(e,i),r=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),h=o>a?Math.pow(10,o):0,c=Math.round((e-h)*r)/r,d=Math.floor((e-h)/l/10)*l*10;let u=Math.floor((c-d)/Math.pow(10,a)),f=(0,s.O)(t.min,Math.round((h+d+u*Math.pow(10,a))*r)/r);while(f<i)n.push({value:f,major:fs(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,r=a>=0?1:r),f=Math.round((h+d+u*Math.pow(10,a))*r)/r;const g=(0,s.O)(t.max,f);return n.push({value:g,major:fs(g),significand:u}),n}class xs extends ve{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=hs.prototype.parse.apply(this,[t,e]);if(0!==i)return(0,s.g)(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{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===us(this.min,0)?us(this.min,-1):us(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,o=t=>n=e?n:t;i===n&&(i<=0?(s(1),o(10)):(s(us(i,-1)),o(us(n,1)))),i<=0&&s(us(n,-1)),n<=0&&o(us(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=ms(e,this);return"ticks"===t.bounds&&(0,s.aG)(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return void 0===t?"0":(0,s.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const 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){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function bs(t){const e=t.ticks;if(e.display&&t.display){const t=(0,s.E)(e.backdropPadding);return(0,s.v)(e.font&&e.font.size,s.d.font.size)+t.height}return 0}function _s(t,e,i){return i=(0,s.b)(i)?i:[i],{w:(0,s.aN)(t,e.string,i),h:i.length*e.lineHeight}}function ys(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function vs(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?s.P/a:0;for(let h=0;h<a;h++){const a=r.setContext(t.getPointLabelContext(h));o[h]=a.padding;const c=t.getPointPosition(h,t.drawingArea+o[h],l),d=(0,s.a0)(a.font),u=_s(t.ctx,d,t._pointLabels[h]);n[h]=u;const f=(0,s.ay)(t.getIndexAngle(h)+l),g=Math.round((0,s.U)(f)),p=ys(g,c.x,u.w,0,180),m=ys(g,c.y,u.h,90,270);ws(i,e,f,p,m)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=Ss(t,n,o)}function ws(t,e,i,n,s){const o=Math.abs(Math.sin(i)),a=Math.abs(Math.cos(i));let r=0,l=0;n.start<e.l?(r=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-r)):n.end>e.r&&(r=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),s.start<e.t?(l=(e.t-s.start)/a,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Ms(t,e,i){const n=t.drawingArea,{extra:o,additionalAngle:a,padding:r,size:l}=i,h=t.getPointPosition(e,n+o+r,a),c=Math.round((0,s.U)((0,s.ay)(h.angle+s.H))),d=Ds(h.y,l.h,c),u=Ps(c),f=As(h.x,l.w,u);return{visible:!0,x:h.x,y:d,textAlign:u,left:f,top:d,right:f+l.w,bottom:d+l.h}}function ks(t,e){if(!e)return!0;const{left:i,top:n,right:o,bottom:a}=t,r=(0,s.C)({x:i,y:n},e)||(0,s.C)({x:i,y:a},e)||(0,s.C)({x:o,y:n},e)||(0,s.C)({x:o,y:a},e);return!r}function Ss(t,e,i){const n=[],o=t._pointLabels.length,a=t.options,{centerPointLabels:r,display:l}=a.pointLabels,h={extra:bs(a)/2,additionalAngle:r?s.P/o:0};let c;for(let s=0;s<o;s++){h.padding=i[s],h.size=e[s];const o=Ms(t,s,h);n.push(o),"auto"===l&&(o.visible=ks(o,c),o.visible&&(c=o))}return n}function Ps(t){return 0===t||180===t?"center":t<180?"left":"right"}function As(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ds(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Os(t,e,i){const{left:n,top:o,right:a,bottom:r}=i,{backdropColor:l}=e;if(!(0,s.k)(l)){const i=(0,s.aw)(e.borderRadius),h=(0,s.E)(e.backdropPadding);t.fillStyle=l;const c=n-h.left,d=o-h.top,u=a-n+h.width,f=r-o+h.height;
8Object.values(i).some((t=>0!==t))?(t.beginPath(),(0,s.au)(t,{x:c,y:d,w:u,h:f,radius:i}),t.fill()):t.fillRect(c,d,u,f)}}function Cs(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const a=n.setContext(t.getPointLabelContext(o));Os(i,a,e);const r=(0,s.a0)(a.font),{x:l,y:h,textAlign:c}=e;(0,s.Z)(i,t._pointLabels[o],l,h+r.lineHeight/2,r,{color:a.color,textAlign:c,textBaseline:"middle"})}}function Ts(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,s.T);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function Es(t,e,i,n,s){const o=t.ctx,a=e.circular,{color:r,lineWidth:l}=e;!a&&!n||!r||!l||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),Ts(t,i,a,n),o.closePath(),o.stroke(),o.restore())}function Ls(t,e,i){return(0,s.j)(t,{label:i,index:e,type:"pointLabel"})}(0,n.A)(xs,"id","logarithmic"),(0,n.A)(xs,"defaults",{ticks:{callback:s.aL.formatters.logarithmic,major:{enabled:!0}}});class Rs extends hs{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=(0,s.E)(bs(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=(0,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/bs(this.options))}generateTickLabels(t){hs.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=(0,s.Q)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?vs(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const 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;const 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;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return Ls(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-s.H+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Ts(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:s}=e,o=this._pointLabels.length;let a,r,l;if(e.pointLabels.display&&Cs(this,o),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),a=n.setContext(i),l=s.setContext(i);Es(this,a,r,o,l)}})),i.display){for(t.save(),a=o-1;a>=0;a--){const n=i.setContext(this.getPointLabelContext(a)),{color:s,lineWidth:o}=n;o&&s&&(t.lineWidth=o,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}
8t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,r)=>{if(0===r&&!e.reverse)return;const l=i.setContext(this.getContext(r)),h=(0,s.a0)(l.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),l.showLabelBackdrop){t.font=h.string,a=t.measureText(n.label).width,t.fillStyle=l.backdropColor;const e=(0,s.E)(l.backdropPadding);t.fillRect(-a/2-e.left,-o-h.size/2-e.top,a+e.width,h.size+e.height)}(0,s.Z)(t,n.label,0,-o,h,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})})),t.restore()}drawTitle(){}}(0,n.A)(Rs,"id","radialLinear"),(0,n.A)(Rs,"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){return t},padding:5,centerPointLabels:!1}}),(0,n.A)(Rs,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,n.A)(Rs,"descriptors",{angleLines:{_fallback:"grid"}});const Is={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}},Fs=Object.keys(Is);function zs(t,e){return t-e}function Vs(t,e){if((0,s.k)(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:a}=t._parseOpts;let r=e;return"function"===typeof n&&(r=n(r)),(0,s.g)(r)||(r="string"===typeof n?i.parse(r,n):i.parse(r)),null===r?null:(o&&(r="week"!==o||!(0,s.x)(a)&&!0!==a?i.startOf(r,o):i.startOf(r,"isoWeek",a)),+r)}function Bs(t,e,i,n){const s=Fs.length;for(let o=Fs.indexOf(t);o<s-1;++o){const t=Is[Fs[o]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return Fs[o]}return Fs[s-1]}function Ws(t,e,i,n,s){for(let o=Fs.length-1;o>=Fs.indexOf(i);o--){const i=Fs[o];if(Is[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return Fs[i?Fs.indexOf(i):0]}function Ns(t){for(let e=Fs.indexOf(t)+1,i=Fs.length;e<i;++e)if(Is[Fs[e]].common)return Fs[e]}function Hs(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=(0,s.aP)(i,e),a=i[n]>=e?i[n]:i[o];t[a]=!0}}else t[e]=!0}function js(t,e,i,n){const s=t._adapter,o=+s.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}function $s(t,e,i){const n=[],s={},o=e.length;let a,r;for(a=0;a<o;++a)r=e[a],s[r]=a,n.push({value:r,major:!1});return 0!==o&&i?js(t,n,s,i):n}class Ys extends ve{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,e={}){const i=t.time||(t.time={}),n=this._adapter=new ot._date(t.adapters.date);n.init(e),(0,s.ab)(i.displayFormats,n.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:Vs(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(t){a||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}a&&r||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),n=(0,s.g)(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=(0,s.g)(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=(0,s.aO)(n,o,a);return this._unit=e.unit||(i.autoSkip?Bs(e.minUnit,this.min,this.max,this._getLabelCapacity(o)
8):Ws(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?Ns(this._unit):void 0,this.initOffsets(n),t.reverse&&r.reverse(),$s(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,n=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),o=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=(0,s.S)(n,0,a),o=(0,s.S)(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,a=o.unit||Bs(o.minUnit,e,i,this._getLabelCapacity(e)),r=(0,s.v)(n.ticks.stepSize,1),l="week"===a&&o.isoWeekday,h=(0,s.x)(l)||!0===l,c={};let d,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,h?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const g="data"===n.ticks.source&&this.getDataTimestamps();for(d=f,u=0;d<i;d=+t.add(d,r,a),u++)Hs(c,d,g);return d!==i&&"ticks"!==n.bounds&&1!==u||Hs(c,d,g),Object.keys(c).sort(zs).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options,n=i.time.displayFormats,s=this._unit,o=e||n[s];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,n){const o=this.options,a=o.ticks.callback;if(a)return(0,s.Q)(a,[t,e,i],this);const r=o.time.displayFormats,l=this._unit,h=this._majorUnit,c=l&&r[l],d=h&&r[h],u=i[e],f=h&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:c))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=(0,s.t)(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*a,h:i*a+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,$s(this,[t],this._majorUnit),n),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Vs(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,s._)(t.sort(zs))}}function Us(t,e,i){let n,o,a,r,l=0,h=t.length-1;i?(e>=t[l].pos&&e<=t[h].pos&&({lo:l,hi:h}=(0,s.B)(t,"pos",e)),({pos:n,time:a}=t[l]),({pos:o,time:r}=t[h])):(e>=t[l].time&&e<=t[h].time&&({lo:l,hi:h}=(0,s.B)(t,"time",e)),({time:n,pos:a}=t[l]),({time:o,pos:r}=t[h]));const c=o-n;return c?a+(r-a)*(e-n)/c:a}(0,n.A)(Ys,"id","time"),(0,n.A)(Ys,"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 Xs extends Ys{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Us(e,this.min),this._tableRange=Us(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let o,a,r,l,h;for(o=0,a=t.length;o<a;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=n.length;o<a;
vendor: 14,160 bytes, lines 8-22
8++o)h=n[o+1],r=n[o-1],l=n[o],Math.round((h+r)/2)!==l&&s.push({time:l,pos:o/(a-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Us(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Us(this._table,i*this._tableRange+this._minPos,!0)}}(0,n.A)(Xs,"id","timeseries"),(0,n.A)(Xs,"defaults",Ys.defaults)},76863:function(t,e,i){i.d(e,{$:function(){return $e},A:function(){return Gt},B:function(){return Kt},C:function(){return He},D:function(){return Nt},E:function(){return oi},F:function(){return ot},G:function(){return Ji},H:function(){return At},I:function(){return Ni},J:function(){return en},K:function(){return tn},L:function(){return se},M:function(){return Wi},N:function(){return Rt},O:function(){return tt},P:function(){return wt},Q:function(){return st},R:function(){return li},S:function(){return Ut},T:function(){return Mt},U:function(){return Bt},V:function(){return Fe},W:function(){return Xt},X:function(){return Ve},Y:function(){return je},Z:function(){return Ke},_:function(){return ie},a:function(){return ri},a0:function(){return ai},a1:function(){return ae},a2:function(){return re},a3:function(){return Oe},a4:function(){return ct},a5:function(){return xt},a6:function(){return Ce},a7:function(){return _t},a8:function(){return di},a9:function(){return ci},aA:function(){return hn},aB:function(){return le},aC:function(){return cn},aD:function(){return Ne},aE:function(){return Ht},aF:function(){return Q},aG:function(){return zt},aH:function(){return Lt},aI:function(){return Ft},aJ:function(){return Et},aK:function(){return Wt},aL:function(){return Ae},aM:function(){return Ct},aN:function(){return ze},aO:function(){return Jt},aP:function(){return qt},aa:function(){return ui},ab:function(){return dt},ac:function(){return q},ad:function(){return oe},ae:function(){return Zi},af:function(){return Be},ag:function(){return yt},ah:function(){return at},ai:function(){return vt},aj:function(){return Qt},ak:function(){return ii},al:function(){return Bi},am:function(){return bn},an:function(){return pn},ao:function(){return sn},ap:function(){return on},aq:function(){return nn},ar:function(){return Ye},as:function(){return Ue},at:function(){return We},au:function(){return Ge},av:function(){return ni},aw:function(){return si},ax:function(){return gn},ay:function(){return $t},az:function(){return ln},b:function(){return G},c:function(){return me},d:function(){return Re},e:function(){return ge},f:function(){return mt},g:function(){return Z},h:function(){return bt},i:function(){return J},j:function(){return hi},k:function(){return K},l:function(){return te},m:function(){return it},n:function(){return nt},o:function(){return ke},p:function(){return Yt},q:function(){return he},r:function(){return ne},s:function(){return Tt},t:function(){return Vt},u:function(){return ee},v:function(){return et},w:function(){return ce},x:function(){return It},y:function(){return Oi},z:function(){return qi}});i(44114); 9/*! 10 * @kurkle/color v0.3.2 11 * https://github.com/kurkle/color#readme 12 * (c) 2023 Jukka Kurkela 13 * Released under the MIT License 14 */ 15function n(t){return t+.5|0}const s=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return s(n(2.55*t),0,255)}function a(t){return s(n(255*t),0,255)}function r(t){return s(n(t/2.55)/100,0,1)}function l(t){return s(n(100*t),0,100)}const h={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],d=t=>c[15&t],u=t=>c[(240&t)>>4]+c[15&t],f=t=>(240&t)>>4===(15&t),g=t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a);function p(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*h[t[1]],g:255&17*h[t[2]],b:255&17*h[t[3]],a:5===i?17*h[t[4]]:255}:7!==i&&9!==i||(e={r:h[t[1]]<<4|h[t[2]],g:h[t[3]]<<4|h[t[4]],b:h[t[5]]<<4|h[t[6]],a:9===i?h[t[7]]<<4|h[t[8]]:255})),e}const m=(t,e)=>t<255?e(t):"";function x(t){var e=g(t)?d:u;return t?"#"+e(t.r)+e(t.g)+e(t.b)+m(t.a,e):void 0}const b=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function y(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function v(t,e,i){const n=_(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function w(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}function M(t){const e=255,i=t.r/e,n=t.g/e,s=t.b/e,o=Math.max(i,n,s),a=Math.min(i,n,s),r=(o+a)/2;let l,h,c;return o!==a&&(c=o-a,h=r>.5?c/(2-o-a):c/(o+a),l=w(i,n,s,c,o),l=60*l+.5),[0|l,h||0,r]}function k(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(a)}function S(t,e,i){return k(_,t,e,i)}function P(t,e,i){return k(v,t,e,i)}function A(t,e,i){return k(y,t,e,i)}function D(t){return(t%360+360)%360}function O(t){const e=b.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?o(+e[5]):a(+e[5]));const s=D(+e[2]),r=+e[3]/100,l=+e[4]/100;return i="hwb"===e[1]?P(s,r,l):"hsv"===e[1]?A(s,r,l):S(s,r,l),{r:i[0],g:i[1],b:i[2],a:n}}function C(t,e){var i=M(t);i[0]=D(i[0]+e),i=S(i),t.r=i[0],t.g=i[1],t.b=i[2]}function T(t){if(!t)return;const e=M(t),i=e[0],n=l(e[1]),s=l(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${r(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}const E={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},L={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function R(){const t={},e=Object.keys(L),i=Object.keys(E);let n,s,o,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],s=0;s<i.length;s++)o=i[s],r=r.replace(o,E[o]);o=parseInt(L[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}let I;function F(t){I||(I=R(),I.transparent=[0,0,0,0]);const e=I[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const z=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function V(t){const e=z.exec(t);let i,n,a,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?o(t):s(255*t,0,255)}return i=+e[1],n=+e[3],a=+e[5],i=255&(e[2]?o(i):s(i,0,255)),n=255&(e[4]?o(n):s(n,0,255)),a=255&(e[6]?o(a):s(a,0,255)),{r:i,g:n,b:a,a:r}}}function B(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${r(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const W=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,N=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function H(t,e,i){const n=N(r(t.r)),s=N(r(t.g)),o=N(r(t.b));return{r:a(W(n+i*(N(r(e.r))-n))),g:a(W(s+i*(N(r(e.g))-s))),b:a(W(o+i*(N(r(e.b))-o))),a:t.a+i*(e.a-t.a)}}function j(t,e,i){if(t){let n=M(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=S(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function $(t,e){return t?Object.assign(e||{},t):t}function Y(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=a(t[3]))):(e=$(t,{r:0,g:0,b:0,a:1}),e.a=a(e.a)),e}function U(t){return"r"===t.charAt(0)?V(t):O(t)}class X{constructor(t){if(t instanceof X)return t;const e=typeof t;let i;"object"===e?i=Y(t):"string"===e&&(i=p(t)||F(t)||U(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=$(this._rgb);return t&&(t.a=r(t.a)),t}set rgb(t){this._rgb=Y(t)}rgbString(){return this._valid?B(this._rgb):void 0}hexString(){return this._valid?x(this._rgb):void 0}hslString(){return this._valid?T(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,a=2*o-1,r=i.a-n.a,l=((a*r===-1?a:(a+r)/(1+a*r))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=H(this._rgb,t._rgb,e)),this}clone(){return new X(this.rgb)}alpha(t){return this._rgb.a=a(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=n(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return j(this._rgb,2,t),this}darken(t){return j(this._rgb,2,-t),this}saturate(t){return j(this._rgb,1,t),this}desaturate(t){return j(this._rgb,1,-t),this}rotate(t){return C(this._rgb,t),this}} 16/*! 17 * Chart.js v4.4.1 18 * https://www.chartjs.org 19 * (c) 2023 Chart.js Contributors 20 * Released under the MIT License 21 */ 22function Q(){}const q=(()=>{let t=0;return()=>t++})();function K(t){return null===t||"undefined"===typeof t}function G(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function J(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Z(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function tt(t,e){return Z(t)?t:e}function et(t,e){return"undefined"===typeof t?e:t}const it=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,nt=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function st(t,e,i){if(t&&"function"===typeof t.call)return t.apply(i,e)}function ot(t,e,i,n){let s,o,a;if(G(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<o;s++)e.call(i,t[s],s);else if(J(t))for(a=Object.keys(t),o=a.length,s=0;s<o;s++)e.call(i,t[a[s]],a[s])}function at(t,e){let i,n,s,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],o=e[i],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function rt(t){if(G(t))return t.map(rt);if(J(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=rt(t[i[s]]);return e}return t}function lt(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function ht(t,e,i,n){if(!lt(t))return;const s=e[t],o=i[t];J(s)&&J(o)?ct(s,o,n):e[t]=rt(o)}function ct(t,e,i){const n=G(e)?e:[e],s=n.length;if(!J(t))return t;i=i||{};const o=i.merger||ht;let a;for(let r=0;r<s;++r){if(a=n[r],!J(a))continue;const e=Object.keys(a);for(let n=0,s=e.length;n<s;++n)o(e[n],t,a,i)}return t}function dt(t,e){return ct(t,e,{merger:ut})}function ut(t,e,i){if(!lt(t))return;const n=e[t],s=i[t];J(n)&&J(s)?dt(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=rt(s))}const ft={"":t=>t,x:t=>t.x,y:t=>t.y};function gt(t){const e=t.split("."),i=[];let n="";for(const s of e)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}function pt(t){const e=gt(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}function mt(t,e){const i=ft[e]||(ft[e]=pt(e));return i(t)}function xt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const bt=t=>"undefined"!==typeof t,_t=t=>"function"===typeof t,yt=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function vt(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const wt=Math.PI,Mt=2*wt,kt=Mt+wt,St=Number.POSITIVE_INFINITY,Pt=wt/180,At=wt/2,Dt=wt/4,Ot=2*wt/3,Ct=Math.log10,Tt=Math.sign;function Et(t,e,i){return Math.abs(t-e)<i}function Lt(t){const e=Math.round(t);t=Et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Ct(t))),n=t/i,s=n<=1?1:n<=2?2:n<=5?5:10;return s*i}function Rt(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function It(t){return!isNaN(parseFloat(t))&&isFinite(t)}
vendor: 4,200 bytes, line 22
22function Ft(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function zt(t,e,i){let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Vt(t){return t*(wt/180)}function Bt(t){return t*(180/wt)}function Wt(t){if(!Z(t))return;let e=1,i=0;while(Math.round(t*e)/e!==t)e*=10,i++;return i}function Nt(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*wt&&(o+=Mt),{angle:o,distance:s}}function Ht(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jt(t,e){return(t-e+kt)%Mt-wt}function $t(t){return(t%Mt+Mt)%Mt}function Yt(t,e,i,n){const s=$t(t),o=$t(e),a=$t(i),r=$t(o-s),l=$t(a-s),h=$t(s-o),c=$t(s-a);return s===o||s===a||n&&o===a||r>l&&h<c}function Ut(t,e,i){return Math.max(e,Math.min(i,t))}function Xt(t){return Ut(t,-32768,32767)}function Qt(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function qt(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,o=0;while(s-o>1)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const Kt=(t,e,i,n)=>qt(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),Gt=(t,e,i)=>qt(t,i,(n=>t[n][e]>=i));function Jt(t,e,i){let n=0,s=t.length;while(n<s&&t[n]<e)n++;while(s>n&&t[s-1]>i)s--;return n>0||s<t.length?t.slice(n,s):t}const Zt=["push","pop","shift","splice","unshift"];function te(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Zt.forEach((e=>{const i="_onData"+xt(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const s=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"===typeof t[i]&&t[i](...e)})),s}})})))}function ee(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(Zt.forEach((e=>{delete t[e]})),delete t._chartjs)}function ie(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ne=function(){return"undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame}();function se(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,ne.call(window,(()=>{n=!1,t.apply(e,i)})))}}function oe(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}const ae=t=>"start"===t?"left":"end"===t?"right":"center",re=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,le=(t,e,i,n)=>{const s=n?"left":"right";return t===s?i:"center"===t?(e+i)/2:e};function he(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=Ut(Math.min(Kt(r,l,h).lo,i?n:Kt(e,l,a.getPixelForValue(h)).lo),0,n-1)),o=u?Ut(Math.max(Kt(r,a.axis,c,!0).hi+1,i?0:Kt(e,l,a.getPixelForValue(c),!0).hi+1),s,n)-s:n-s}return{start:s,count:o}}function ce(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}const de=t=>0===t||1===t,ue=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Mt/i),fe=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Mt/i)+1,ge={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*At),easeOutSine:t=>Math.sin(t*At),easeInOutSine:t=>-.5*(Math.cos(wt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>de(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>de(t)?t:ue(t,.075,.3),easeOutElastic:t=>de(t)?t:fe(t,.075,.3),easeInOutElastic(t){const e=.1125,i=.45;
22return de(t)?t:t<.5?.5*ue(2*t,e,i):.5+.5*fe(2*t-1,e,i)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ge.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ge.easeInBounce(2*t):.5*ge.easeOutBounce(2*t-1)+.5};function pe(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function me(t){return pe(t)?t:new X(t)}function xe(t){return pe(t)?t:new X(t).saturate(.5).darken(.1).hexString()}const be=["x","y","borderWidth","radius","tension"],_e=["color","borderColor","backgroundColor"];function ye(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:_e},numbers:{type:"number",properties:be}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})}function ve(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const we=new Map;function Me(t,e){e=e||{};const i=t+JSON.stringify(e);let n=we.get(i);return n||(n=new Intl.NumberFormat(t,e),we.set(i,n)),n}function ke(t,e,i){return Me(e,i).format(t)}const Se={values(t){return G(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=Pe(t,i)}const a=Ct(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ke(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(Ct(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Se.numeric.call(this,t,e,i):""}};function Pe(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}var Ae={formatters:Se};function De(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ae.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}const Oe=Object.create(null),Ce=Object.create(null);function Te(t,e){if(!e)return t;const i=e.split(".");for(let n=0,s=i.length;n<s;++n){const e=i[n];t=t[e]||(t[e]=Object.create(null))}return t}function Ee(t,e,i){return"string"===typeof e?ct(Te(t,e),i):ct(Te(t,""),e)}class Le{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={}
vendor: 4,744 bytes, line 22
22,this.hoverBackgroundColor=(t,e)=>xe(e.backgroundColor),this.hoverBorderColor=(t,e)=>xe(e.borderColor),this.hoverColor=(t,e)=>xe(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ee(this,t,e)}get(t){return Te(this,t)}describe(t,e){return Ee(Ce,t,e)}override(t,e){return Ee(Oe,t,e)}route(t,e,i,n){const s=Te(this,t),o=Te(this,i),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[n];return J(t)?Object.assign({},e,t):et(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Re=new Le({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ye,ve,De]);function Ie(t){return!t||K(t.size)||K(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Fe(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function ze(t,e,i,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,h,c,d,u;for(l=0;l<r;l++)if(d=i[l],void 0===d||null===d||G(d)){if(G(d))for(h=0,c=d.length;h<c;h++)u=d[h],void 0===u||null===u||G(u)||(a=Fe(t,s,o,a,u))}else a=Fe(t,s,o,a,d);t.restore();const f=o.length/2;if(f>i.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return a}function Ve(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function Be(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function We(t,e,i,n){Ne(t,e,i,n,null)}function Ne(t,e,i,n,s){let o,a,r,l,h,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*Pt;if(f&&"object"===typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,p,0,0,Mt):t.arc(i,n,p,0,Mt),t.closePath();break;case"triangle":c=s?s/2:p,t.moveTo(i+Math.sin(m)*c,n-Math.cos(m)*p),m+=Ot,t.lineTo(i+Math.sin(m)*c,n-Math.cos(m)*p),m+=Ot,t.lineTo(i+Math.sin(m)*c,n-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,a=Math.cos(m+Dt)*l,d=Math.cos(m+Dt)*(s?s/2-h:l),r=Math.sin(m+Dt)*l,u=Math.sin(m+Dt)*(s?s/2-h:l),t.arc(i-d,n-r,h,m-wt,m-At),t.arc(i+u,n-a,h,m-At,m),t.arc(i+d,n+r,h,m,m+At),t.arc(i-u,n+a,h,m+At,m+wt),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,c=s?s/2:l,t.rect(i-c,n-l,2*c,2*l);break}m+=Dt;case"rectRot":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-d,n-r),t.lineTo(i+u,n-a),t.lineTo(i+d,n+r),t.lineTo(i-u,n+a),t.closePath();break;case"crossRot":m+=Dt;case"cross":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"star":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a),m+=Dt,d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"line":a=s?s/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-a,n-r),t.lineTo(i+a,n+r);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:p),n+Math.sin(m)*p);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function He(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function je(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function $e(t){t.restore()}function Ye(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!==!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Ue(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Xe(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),K(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Qe(t,e,i,n,s){if(s.strikethrough||s.underline){const o=t.measureText(n),a=e-
22o.actualBoundingBoxLeft,r=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,h=i+o.actualBoundingBoxDescent,c=s.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(a,c),t.lineTo(r,c),t.stroke()}}function qe(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Ke(t,e,i,n,s,o={}){const a=G(e)?e:[e],r=o.strokeWidth>0&&""!==o.strokeColor;let l,h;for(t.save(),t.font=s.string,Xe(t,o),l=0;l<a.length;++l)h=a[l],o.backdrop&&qe(t,o.backdrop),r&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),K(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,i,n,o.maxWidth)),t.fillText(h,i,n,o.maxWidth),Qe(t,i,n,h,o),n+=Number(s.lineHeight);t.restore()}function Ge(t,e){const{x:i,y:n,w:s,h:o,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,1.5*wt,wt,!0),t.lineTo(i,n+o-a.bottomLeft),t.arc(i+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,wt,At,!0),t.lineTo(i+s-a.bottomRight,n+o),t.arc(i+s-a.bottomRight,n+o-a.bottomRight,a.bottomRight,At,0,!0),t.lineTo(i+s,n+a.topRight),t.arc(i+s-a.topRight,n+a.topRight,a.topRight,0,-At,!0),t.lineTo(i+a.topLeft,n)}const Je=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ze=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ti(t,e){const i=(""+t).match(Je);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100;break}return e*t}const ei=t=>+t||0;function ii(t,e){const i={},n=J(e),s=n?Object.keys(e):e,o=J(t)?n?i=>et(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of s)i[a]=ei(o(a));return i}function ni(t){return ii(t,{top:"y",right:"x",bottom:"y",left:"x"})}function si(t){return ii(t,["topLeft","topRight","bottomLeft","bottomRight"])}function oi(t){const e=ni(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ai(t,e){t=t||{},e=e||Re.font;let i=et(t.size,e.size);"string"===typeof i&&(i=parseInt(i,10));let n=et(t.style,e.style);n&&!(""+n).match(Ze)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:et(t.family,e.family),lineHeight:ti(et(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:et(t.weight,e.weight),string:""};return s.string=Ie(s),s}function ri(t,e,i,n){let s,o,a,r=!0;for(s=0,o=t.length;s<o;++s)if(a=t[s],void 0!==a&&(void 0!==e&&"function"===typeof a&&(a=a(e),r=!1),void 0!==i&&G(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function li(t,e,i){const{min:n,max:s}=t,o=nt(e,(s-n)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function hi(t,e){return Object.assign(Object.create(t),e)}function ci(t,e=[""],i,n,s=(()=>t[0])){const o=i||t;"undefined"===typeof n&&(n=Pi("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:s,override:i=>ci([i,...t],e,o,n)};return new Proxy(a,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,n){return pi(i,n,(()=>Si(n,e,t,i)))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return Ai(t).includes(e)},ownKeys(t){return Ai(t)},set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function di(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ui(t,n),setContext:e=>
22di(t,e,i,n),override:s=>di(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return pi(t,e,(()=>mi(t,e,i)))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,n){return t[i]=n,delete e[i],!0}})}function ui(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:_t(i)?i:()=>i,isIndexable:_t(n)?n:()=>n}}const fi=(t,e)=>t?t+xt(e):e,gi=(t,e)=>J(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function pi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function mi(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=t;let r=n[e];return _t(r)&&a.isScriptable(e)&&(r=xi(e,r,t,i)),G(r)&&r.length&&(r=bi(e,r,t,a.isIndexable)),gi(e,r)&&(r=di(r,s,o&&o[e],a)),r}function xi(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(o,a||n);return r.delete(t),gi(t,l)&&(l=wi(s._scopes,s,t,l)),l}function bi(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=i;if("undefined"!==typeof o.index&&n(t))return e[o.index%e.length];if(J(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=wi(n,s,t,l);e.push(di(i,o,a&&a[t],r))}}return e}function _i(t,e,i){return _t(t)?t(e,i):t}const yi=(t,e)=>!0===t?e:"string"===typeof t?mt(e,t):void 0;function vi(t,e,i,n,s){for(const o of e){const e=yi(i,o);if(e){t.add(e);const o=_i(e._fallback,i,s);if("undefined"!==typeof o&&o!==i&&o!==n)return o}else if(!1===e&&"undefined"!==typeof n&&i!==n)return null}return!1}function wi(t,e,i,n){const s=e._rootScopes,o=_i(e._fallback,i,n),a=[...t,...s],r=new Set;r.add(n);let l=Mi(r,a,i,o||i,n);return null!==l&&(("undefined"===typeof o||o===i||(l=Mi(r,a,o,l,n),null!==l))&&ci(Array.from(r),[""],s,o,(()=>ki(e,i,n))))}function Mi(t,e,i,n,s){while(i)i=vi(t,e,i,n,s);return i}function ki(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return G(s)&&J(i)?i:s||{}}function Si(t,e,i,n){let s;for(const o of e)if(s=Pi(fi(o,t),i),"undefined"!==typeof s)return gi(t,s)?wi(i,n,t,s):s}function Pi(t,e){for(const i of e){if(!i)continue;const e=i[t];if("undefined"!==typeof e)return e}}function Ai(t){let e=t._keys;return e||(e=t._keys=Di(t._scopes)),e}function Di(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}function Oi(t,e,i,n){const{iScale:s}=t,{key:o="r"}=this._parsing,a=new Array(n);let r,l,h,c;for(r=0,l=n;r<l;++r)h=r+i,c=e[h],a[r]={r:s.parse(mt(c,o),h)};return a}const Ci=Number.EPSILON||1e-14,Ti=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ei=t=>"x"===t?"y":"x";function Li(t,e,i,n){const s=t.skip?e:t,o=e,a=i.skip?e:i,r=Ht(o,s),l=Ht(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=n*h,u=n*c;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Ri(t,e,i){const n=t.length;let s,o,a,r,l,h=Ti(t,0);for(let c=0;c<n-1;++c)l=h,h=Ti(t,c+1),l&&h&&(Et(e[c],0,Ci)?i[c]=i[c+1]=0:(s=i[c]/e[c],o=i[c+1]/e[c],r=Math.pow(s,2)+Math.pow(o,2),r<=9||(a=3/Math.sqrt(r),i[c]=s*a*e[c],i[c+1]=o*a*e[c])))}function Ii(t,e,i="x"){const n=Ei(i),s=t.length;let o,a,r,l=Ti(t,0);for(let h=0;h<s;++h){if(a=r,r=l,l=Ti(t,h+1),!r)continue;const s=r[i],c=r[n];a&&(o=(s-a[i])/3,r[`cp1${i}`]=s-o,r[`cp1${n}`]=c-o*e[h]),l&&(o=(l[i]-s)/3,r[`cp2${i}`]=s+o,r[`cp2${n}`]=c+o*e[h])}}function Fi(t,e="x"){const i=Ei(e),n=t.length,s=Array(n).fill(0),o=Array(n);let a,r,l,h=Ti(t,0);for(a=0;a<n;++a)if(r=l,l=h,h=Ti(t,a+1),l){if(h){const t=h[e]-l[e];s[a]=0!==t?(h[i]-l[i])/t:0}o[a]=r?h?Tt(s[a-1])!==Tt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}Ri(t,s,o),Ii(t,o,e)}function zi(t,e,i){return Math.max(Math.min(t,i),e)}function Vi(t,e){let i,n,s,o,a,r=He(t[0],e);for(i=0,n=t.length;i<n;++i)a=o,o=r,r=i<n-1&&He(t[i+1],e),o&&(s=t[i],a&&(s.cp1x=zi(s.cp1x,e.left,e.right),s.cp1y=zi(s.cp1y,e.top,e.bottom)),r&&(s.cp2x=zi(s.cp2x,e.left,e.right),s.cp2y=zi(s.cp2y,e.top,e.bottom)))}function Bi(t,e,i,n,s){let o,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Fi(t,s);else{let i=n?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)r=t[o],l=Li(i,r,t[Math.min(o+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&Vi(t,i)}function Wi(){return"undefined"!==typeof window&&"undefined"!==typeof document}function Ni(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Hi(t,e,i){let n;return"string"===typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ji=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function $i(t,e){return ji(t).getPropertyValue(e)}const Yi=["top","right","bottom","left"];
vendor: 5,018 bytes, line 22
22function Ui(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=Yi[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Xi=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Qi(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let a,r,l=!1;if(Xi(s,o,t.target))a=s,r=o;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,r=n.clientY-t.top,l=!0}return{x:a,y:r,box:l}}function qi(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=ji(i),o="border-box"===s.boxSizing,a=Ui(s,"padding"),r=Ui(s,"border","width"),{x:l,y:h,box:c}=Qi(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((h-u)/g*i.height/n)}}function Ki(t,e,i){let n,s;if(void 0===e||void 0===i){const o=Ni(t);if(o){const t=o.getBoundingClientRect(),a=ji(o),r=Ui(a,"border","width"),l=Ui(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=Hi(a.maxWidth,o,"clientWidth"),s=Hi(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||St,maxHeight:s||St}}const Gi=t=>Math.round(10*t)/10;function Ji(t,e,i,n){const s=ji(t),o=Ui(s,"margin"),a=Hi(s.maxWidth,t,"clientWidth")||St,r=Hi(s.maxHeight,t,"clientHeight")||St,l=Ki(t,e,i);let{width:h,height:c}=l;if("content-box"===s.boxSizing){const t=Ui(s,"border","width"),e=Ui(s,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-o.width),c=Math.max(0,n?h/n:c-o.height),h=Gi(Math.min(h,a,l.maxWidth)),c=Gi(Math.min(c,r,l.maxHeight)),h&&!c&&(c=Gi(h/2));const d=void 0!==e||void 0!==i;return d&&n&&l.height&&c>l.height&&(c=l.height,h=Gi(Math.floor(c*n))),{width:h,height:c}}function Zi(t,e,i){const n=e||1,s=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==s||a.width!==o)&&(t.currentDevicePixelRatio=n,a.height=s,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const tn=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Wi()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function en(t,e){const i=$i(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function nn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function sn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function on(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=nn(t,s,i),r=nn(s,o,i),l=nn(o,e,i),h=nn(a,r,i),c=nn(r,l,i);return nn(h,c,i)}const an=function(t,e){return{x(i){return t+t+e-i},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},rn=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ln(t,e,i){return t?an(e,i):rn()}function hn(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function cn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function dn(t){return"angle"===t?{between:Yt,compare:jt,normalize:$t}:{between:Qt,compare:(t,e)=>t-e,normalize:t=>t}}function un({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i===0,style:s}}function fn(t,e,i){const{property:n,start:s,end:o}=i,{between:a,normalize:r}=dn(n),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;h<c;++h){if(!a(r(e[d%l][n]),s,o))break;d--,u--}d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}function gn(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,a=e.length,{compare:r,between:l,normalize:h}=dn(n),{start:c,end:d,loop:u,style:f}=fn(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>l(s,x,p)&&0!==r(s,x),v=()=>0===r(o,p)||l(o,x,p),w=()=>b||y(),M=()=>!b||v();for(let k=c,S=c;k<=d;++k)m=e[k%a],m.skip||(p=h(m[n]),p!==x&&(b=l(p,s,o),null===_&&w()&&(_=0===r(p,s)?k:S),null!==_&&M()&&(g.push(un({start:_,end:k,loop:u,count:a,style:f})),_=null),S=k,x=p));return null!==_&&g.push(un({start:_,end:d,loop:u,count:a,style:f})),g}function pn(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const o=gn(n[s],t.points,e);o.length&&i.push(...o)}return i}function mn(t,e,i,n){let s=0,o=e-1;if(i&&!n)while(s<e&&!t[s].skip)s++;while(s<e&&t[s].skip)s++;s%=e,i&&(o+=s);while(o>s&&t[o%e].skip)o--;return o%=e,{start:s,end:o}}function xn(t,e,i,n){const s=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%s];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%s,end:(a-1)%s,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%s,end:r%s,loop:n}),o}
22function bn(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:a,end:r}=mn(i,s,o,n);if(!0===n)return _n(t,[{start:a,end:r,loop:o}],i,e);const l=r<a?r+s:r,h=!!t._fullLoop&&0===a&&r===s-1;return _n(t,xn(i,a,l,h),i,e)}function _n(t,e,i,n){return n&&n.setContext&&i?yn(t,e,i,n):e}function yn(t,e,i,n){const s=t._chart.getContext(),o=vn(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,l=i.length,h=[];let c=o,d=e[0].start,u=d;function f(t,e,n,s){const o=r?-1:1;if(t!==e){t+=l;while(i[t%l].skip)t-=o;while(i[e%l].skip)e+=o;t%l!==e%l&&(h.push({start:t%l,end:e%l,loop:n,style:s}),c=s,d=e%l)}}for(const g of e){d=r?d:g.start;let t,e=i[d%l];for(u=d+1;u<=g.end;u++){const o=i[u%l];t=vn(n.setContext(hi(s,{type:"segment",p0:e,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),wn(t,c)&&f(d,u-1,g.loop,c),e=o,c=t}d<u-1&&f(d,u-1,g.loop,c)}return h}function vn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function wn(t,e){if(!e)return!1;const i=[],n=function(t,e){return pe(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}},91010:function(t,e,i){i.d(e,{O5:function(){return _},Vd:function(){return y},Zh:function(){return v},t1:function(){return m},yP:function(){return b}});i(44114);var n=i(80017),s=i(56768),o=i(90144);const a={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},r={ariaLabel:{type:String},ariaDescribedby:{type:String}},l={type:{type:String,required:!0},...a,...r},h="2"===s.rE[0]?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function c(t){return(0,o.ju)(t)?(0,o.ux)(t):t}function d(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return(0,o.ju)(e)?new Proxy(t,{}):t}function u(t,e){const i=t.options;i&&e&&Object.assign(i,e)}function f(t,e){t.labels=e}function g(t,e,i){const n=[];t.datasets=e.map((e=>{const s=t.datasets.find((t=>t[i]===e[i]));return s&&e.data&&!n.includes(s)?(n.push(s),Object.assign(s,e),s):{...e}}))}function p(t,e){const i={labels:[],datasets:[]};return f(i,t.labels),g(i,t.datasets,e),i}const m=(0,s.pM)({props:l,setup(t,e){let{expose:i,slots:a}=e;const r=(0,o.KR)(null),l=(0,o.IJ)(null);i({chart:l});const h=()=>{if(!r.value)return;const{type:e,data:i,options:s,plugins:o,datasetIdKey:a}=t,h=p(i,a),c=d(h,i);l.value=new n.t1(r.value,{type:e,data:c,options:{...s},plugins:o})},m=()=>{const t=(0,o.ux)(l.value);t&&(t.destroy(),l.value=null)},x=e=>{e.update(t.updateMode)};return(0,s.sV)(h),(0,s.xo)(m),(0,s.wB)([()=>t.options,()=>t.data],((e,i)=>{let[n,a]=e,[r,h]=i;const d=(0,o.ux)(l.value);if(!d)return;let p=!1;if(n){const t=c(n),e=c(r);t&&t!==e&&(u(d,t),p=!0)}if(a){const e=c(a.labels),i=c(h.labels),n=c(a.datasets),s=c(h.datasets);e!==i&&(f(d.config.data,e),p=!0),n&&n!==s&&(g(d.config.data,n,t.datasetIdKey),p=!0)}p&&(0,s.dY)((()=>{x(d)}))}),{deep:!0}),()=>(0,s.h)("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:r},[(0,s.h)("p",{},[a.default?a.default():""])])}});function x(t,e){return n.t1.register(e),(0,s.pM)({props:a,setup(e,i){let{expose:n}=i;const a=(0,o.IJ)(null),r=t=>{a.value=t?.chart};return n({chart:a}),()=>(0,s.h)(m,h({ref:r},{type:t,...e}))}})}const b=x("bar",n.A6),_=x("polarArea",n.G5),y=x("radar",n.h9),v=x("bubble",n.Jb)}}]); 23//# sourceMappingURL=5229.ac27f629.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.