var ar=Object.defineProperty;var lr=(vt,nt,G)=>nt in vt?ar(vt,nt,{enumerable:!0,configurable:!0,writable:!0,value:G}):vt[nt]=G;var R=(vt,nt,G)=>(lr(vt,typeof nt!="symbol"?nt+"":nt,G),G);(self.webpackChunk=self.webpackChunk||[]).push([["contributors-graph-code-frequency-graph-recent-commits-graph"],{"./node_modules/dayjs/plugin/advancedFormat.js":function(vt){(function(nt,G){vt.exports=G()})(this,function(){"use strict";return function(nt,G){var d=G.prototype,W=d.format;d.format=function(X){var Q=this,ut=this.$locale();if(!this.isValid())return W.bind(this)(X);var j=this.$utils(),at=(X||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(K){switch(K){case"Q":return Math.ceil((Q.$M+1)/3);case"Do":return ut.ordinal(Q.$D);case"gggg":return Q.weekYear();case"GGGG":return Q.isoWeekYear();case"wo":return ut.ordinal(Q.week(),"W");case"w":case"ww":return j.s(Q.week(),K==="w"?1:2,"0");case"W":case"WW":return j.s(Q.isoWeek(),K==="W"?1:2,"0");case"k":case"kk":return j.s(String(Q.$H===0?24:Q.$H),K==="k"?1:2,"0");case"X":return Math.floor(Q.$d.getTime()/1e3);case"x":return Q.$d.getTime();case"z":return"["+Q.offsetName()+"]";case"zzz":return"["+Q.offsetName("long")+"]";default:return K}});return W.bind(this)(at)}}})},"./node_modules/dayjs/plugin/customParseFormat.js":function(vt){(function(nt,G){vt.exports=G()})(this,function(){"use strict";var nt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},G=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,d=/\d\d/,W=/\d\d?/,X=/\d*[^-_:/,()\s\d]+/,Q={},ut=function(z){return(z=+z)+(z>68?1900:2e3)},j=function(z){return function(q){this[z]=+q}},at=[/[+-]\d\d:?(\d\d)?|Z/,function(z){(this.zone||(this.zone={})).offset=function(q){if(!q||q==="Z")return 0;var ct=q.match(/([+-]|\d\d)/g),ht=60*ct[1]+(+ct[2]||0);return ht===0?0:ct[0]==="+"?-ht:ht}(z)}],K=function(z){var q=Q[z];return q&&(q.indexOf?q:q.s.concat(q.f))},lt=function(z,q){var ct,ht=Q.meridiem;if(ht){for(var Pt=1;Pt<=24;Pt+=1)if(z.indexOf(ht(Pt,0,q))>-1){ct=Pt>12;break}}else ct=z===(q?"pm":"PM");return ct},et={A:[X,function(z){this.afternoon=lt(z,!1)}],a:[X,function(z){this.afternoon=lt(z,!0)}],S:[/\d/,function(z){this.milliseconds=100*+z}],SS:[d,function(z){this.milliseconds=10*+z}],SSS:[/\d{3}/,function(z){this.milliseconds=+z}],s:[W,j("seconds")],ss:[W,j("seconds")],m:[W,j("minutes")],mm:[W,j("minutes")],H:[W,j("hours")],h:[W,j("hours")],HH:[W,j("hours")],hh:[W,j("hours")],D:[W,j("day")],DD:[d,j("day")],Do:[X,function(z){var q=Q.ordinal,ct=z.match(/\d+/);if(this.day=ct[0],q)for(var ht=1;ht<=31;ht+=1)q(ht).replace(/\[|\]/g,"")===z&&(this.day=ht)}],M:[W,j("month")],MM:[d,j("month")],MMM:[X,function(z){var q=K("months"),ct=(K("monthsShort")||q.map(function(ht){return ht.slice(0,3)})).indexOf(z)+1;if(ct<1)throw new Error;this.month=ct%12||ct}],MMMM:[X,function(z){var q=K("months").indexOf(z)+1;if(q<1)throw new Error;this.month=q%12||q}],Y:[/[+-]?\d+/,j("year")],YY:[d,function(z){this.year=ut(z)}],YYYY:[/\d{4}/,j("year")],Z:at,ZZ:at};function ft(z){var q,ct;q=z,ct=Q&&Q.formats;for(var ht=(z=q.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Tt,jt,Dt){var xt=Dt&&Dt.toUpperCase();return jt||ct[Dt]||nt[Dt]||ct[xt].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Vt,N,tt){return N||tt.slice(1)})})).match(G),Pt=ht.length,Bt=0;Bt<Pt;Bt+=1){var Kt=ht[Bt],Gt=et[Kt],Wt=Gt&&Gt[0],At=Gt&&Gt[1];ht[Bt]=At?{regex:Wt,parser:At}:Kt.replace(/^\[|\]$/g,"")}return function(Tt){for(var jt={},Dt=0,xt=0;Dt<Pt;Dt+=1){var Vt=ht[Dt];if(typeof Vt=="string")xt+=Vt.length;else{var N=Vt.regex,tt=Vt.parser,st=Tt.slice(xt),wt=N.exec(st)[0];tt.call(jt,wt),Tt=Tt.replace(wt,"")}}return function(bt){var ot=bt.afternoon;if(ot!==void 0){var Lt=bt.hours;ot?Lt<12&&(bt.hours+=12):Lt===12&&(bt.hours=0),delete bt.afternoon}}(jt),jt}}return function(z,q,ct){ct.p.customParseFormat=!0,z&&z.parseTwoDigitYear&&(ut=z.parseTwoDigitYear);var ht=q.prototype,Pt=ht.parse;ht.parse=function(Bt){var Kt=Bt.date,Gt=Bt.utc,Wt=Bt.args;this.$u=Gt;var At=Wt[1];if(typeof At=="string"){var Tt=Wt[2]===!0,jt=Wt[3]===!0,Dt=Tt||jt,xt=Wt[2];jt&&(xt=Wt[2]),Q=this.$locale(),!Tt&&xt&&(Q=ct.Ls[xt]),this.$d=function(st,wt,bt){try{if(["x","X"].indexOf(wt)>-1)return new Date((wt==="X"?1e3:1)*st);var ot=ft(wt)(st),Lt=ot.year,Ht=ot.month,we=ot.day,Et=ot.hours,ne=ot.minutes,he=ot.seconds,Qt=ot.milliseconds,Nt=ot.zone,qt=new Date,St=we||(Lt||Ht?1:qt.getDate()),$t=Lt||qt.getFullYear(),Rt=0;Lt&&!Ht||(Rt=Ht>0?Ht-1:qt.getMonth());var Yt=Et||0,Mt=ne||0,Se=he||0,Zt=Qt||0;return Nt?new Date(Date.UTC($t,Rt,St,Yt,Mt,Se,Zt+60*Nt.offset*1e3)):bt?new Date(Date.UTC($t,Rt,St,Yt,Mt,Se,Zt)):new Date($t,Rt,St,Yt,Mt,Se,Zt)}catch{return new Date("")}}(Kt,At,Gt),this.init(),xt&&xt!==!0&&(this.$L=this.locale(xt).$L),Dt&&Kt!=this.format(At)&&(this.$d=new Date("")),Q={}}else if(At instanceof Array)for(var Vt=At.length,N=1;N<=Vt;N+=1){Wt[1]=At[N-1];var tt=ct.apply(this,Wt);if(tt.isValid()){this.$d=tt.$d,this.$L=tt.$L,this.init();break}N===Vt&&(this.$d=new Date(""))}else Pt.call(this,Bt)}}})},"./node_modules/dayjs/plugin/isoWeek.js":function(vt){(function(nt,G){vt.exports=G()})(this,function(){"use strict";var nt="day";return function(G,d,W){var X=function(j){return j.add(4-j.isoWeekday(),nt)},Q=d.prototype;Q.isoWeekYear=function(){return X(this).year()},Q.isoWeek=function(j){if(!this.$utils().u(j))return this.add(7*(j-this.isoWeek()),nt);var at,K,lt,et,ft=X(this),z=(at=this.isoWeekYear(),K=this.$u,lt=(K?W.utc:W)().year(at).startOf("year"),et=4-lt.isoWeekday(),lt.isoWeekday()>4&&(et+=7),lt.add(et,nt));return ft.diff(z,"week")+1},Q.isoWeekday=function(j){return this.$utils().u(j)?this.day()||7:this.day(this.day()%7?j:j-7)};var ut=Q.startOf;Q.startOf=function(j,at){var K=this.$utils(),lt=!!K.u(at)||at;return K.p(j)==="isoweek"?lt?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):ut.bind(this)(j,at)}}})},"./node_modules/dayjs/plugin/localizedFormat.js":function(vt){(function(nt,G){vt.exports=G()})(this,function(){"use strict";var nt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(G,d,W){var X=d.prototype,Q=X.format;W.en.formats=nt,X.format=function(ut){ut===void 0&&(ut="YYYY-MM-DDTHH:mm:ssZ");var j=this.$locale().formats,at=function(K,lt){return K.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(et,ft,z){var q=z&&z.toUpperCase();return ft||lt[z]||nt[z]||lt[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ct,ht,Pt){return ht||Pt.slice(1)})})}(ut,j===void 0?{}:j);return Q.call(this,at)}}})},"./node_modules/dayjs/plugin/quarterOfYear.js":function(vt){(function(nt,G){vt.exports=G()})(this,function(){"use strict";var nt="month",G="quarter";return function(d,W){var X=W.prototype;X.quarter=function(j){return this.$utils().u(j)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(j-1))};var Q=X.add;X.add=function(j,at){return j=Number(j),this.$utils().p(at)===G?this.add(3*j,nt):Q.bind(this)(j,at)};var ut=X.startOf;X.startOf=function(j,at){var K=this.$utils(),lt=!!K.u(at)||at;if(K.p(j)===G){var et=this.quarter()-1;return lt?this.month(3*et).startOf(nt).startOf("day"):this.month(3*et+2).endOf(nt).endOf("day")}return ut.bind(this)(j,at)}}})},"./node_modules/chart.js/dist/chart.js":function(vt,nt,G){"use strict";G.d(nt,{A6:function(){return Yt},E8:function(){return pe},FN:function(){return Re},No:function(){return le},UA:function(){return fi},ZT:function(){return Pe},dN:function(){return pt},hE:function(){return co},ij:function(){return bi},kc:function(){return jn},m_:function(){return bo},s$:function(){return Fn},t1:function(){return fe}});var d=G("./node_modules/chart.js/dist/chunks/helpers.segment.js");class W{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],a=e.duration;o.forEach(l=>l({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=d.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 o=i.items;let a=o.length-1,l=!1,h;for(;a>=0;--a)h=o[a],h._active?(h._total>i.duration&&(i.duration=h._total),h.tick(t),l=!0):(o[a]=o[o.length-1],o.pop());l&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(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((i,n)=>Math.max(i,n._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 X=new W;const Q="transparent",ut={boolean(s,t,e){return e>.5?t:s},color(s,t,e){const i=(0,d.c)(s||Q),n=i.valid&&(0,d.c)(t||Q);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}};class j{constructor(t,e,i,n){const o=e[i];n=(0,d.a)([t.to,n,o,t.from]);const a=(0,d.a)([t.from,o,n]);this._active=!0,this._fn=t.fn||ut[t.type||typeof a],this._easing=d.e[t.easing]||d.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,d.a)([t.to,e,n,t.from]),this._from=(0,d.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,o=this._from,a=this._loop,l=this._to;let h;if(this._active=o!==l&&(a||e<i),!this._active){this._target[n]=l,this._notify(!0);return}if(e<0){this._target[n]=o;return}h=e/i%2,h=a&&h>1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[n]=this._fn(o,l,h)}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 at{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,d.i)(t))return;const e=Object.keys(d.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!(0,d.i)(o))return;const a={};for(const l of e)a[l]=o[l];((0,d.b)(o.properties)&&o.properties||[n]).forEach(l=>{(l===n||!i.has(l))&&i.set(l,a)})})}_animateOptions(t,e){const i=e.options,n=lt(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&K(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),l=Date.now();let h;for(h=a.length-1;h>=0;--h){const u=a[h];if(u.charAt(0)==="$")continue;if(u==="options"){n.push(...this._animateOptions(t,e));continue}const p=e[u];let b=o[u];const _=i.get(u);if(b)if(_&&b.active()){b.update(_,p,l);continue}else b.cancel();if(!_||!_.duration){t[u]=p;continue}o[u]=b=new j(_,t,u,p),n.push(b)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return X.add(this._chart,i),!0}}function K(s,t){const e=[],i=Object.keys(t);for(let n=0;n<i.length;n++){const o=s[i[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function lt(s,t){if(!t)return;let e=s.options;if(!e){s.options=t;return}return e.$shared&&(s.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function et(s,t){const e=s&&s.options||{},i=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:n,end:i?n:o}}function ft(s,t,e){if(e===!1)return!1;const i=et(s,e),n=et(t,e);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function z(s){let t,e,i,n;return(0,d.i)(s)?(t=s.top,e=s.right,i=s.bottom,n=s.left):t=e=i=n=s,{top:t,right:e,bottom:i,left:n,disabled:s===!1}}function q(s,t){const e=[],i=s._getSortedDatasetMetas(t);let n,o;for(n=0,o=i.length;n<o;++n)e.push(i[n].index);return e}function ct(s,t,e,i={}){const n=s.keys,o=i.mode==="single";let a,l,h,u;if(t!==null){for(a=0,l=n.length;a<l;++a){if(h=+n[a],h===e){if(i.all)continue;break}u=s.values[h],(0,d.g)(u)&&(o||t===0||(0,d.s)(t)===(0,d.s)(u))&&(t+=u)}return t}}function ht(s){const t=Object.keys(s),e=new Array(t.length);let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],e[i]={x:o,y:s[o]};return e}function Pt(s,t){const e=s&&s.options.stacked;return e||e===void 0&&t.stack!==void 0}function Bt(s,t,e){return`${s.id}.${t.id}.${e.stack||e.type}`}function Kt(s){const{min:t,max:e,minDefined:i,maxDefined:n}=s.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Gt(s,t,e){const i=s[t]||(s[t]={});return i[e]||(i[e]={})}function Wt(s,t,e,i){for(const n of t.getMatchingVisibleMetas(i).reverse()){const o=s[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function At(s,t){const{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:l}=i,h=o.axis,u=a.axis,p=Bt(o,a,i),b=t.length;let _;for(let y=0;y<b;++y){const M=t[y],{[h]:S,[u]:D}=M,P=M._stacks||(M._stacks={});_=P[u]=Gt(n,p,S),_[l]=D,_._top=Wt(_,a,!0,i.type),_._bottom=Wt(_,a,!1,i.type);const O=_._visualValues||(_._visualValues={});O[l]=D}}function Tt(s,t){const e=s.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function jt(s,t){return(0,d.j)(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Dt(s,t,e){return(0,d.j)(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function xt(s,t){const e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(const n of t){const o=n._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const Vt=s=>s==="reset"||s==="none",N=(s,t)=>t?s:Object.assign({},s),tt=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:q(e,!0),values:null};class st{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=Pt(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&&xt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(b,_,y,M)=>b==="x"?_:b==="r"?M:y,o=e.xAxisID=(0,d.v)(i.xAxisID,Tt(t,"x")),a=e.yAxisID=(0,d.v)(i.yAxisID,Tt(t,"y")),l=e.rAxisID=(0,d.v)(i.rAxisID,Tt(t,"r")),h=e.indexAxis,u=e.iAxisID=n(h,o,a,l),p=e.vAxisID=n(h,a,o,l);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(l),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(p)}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,d.u)(this._data,this),t._stacked&&xt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,d.i)(e))this._data=ht(e);else if(i!==e){if(i){(0,d.u)(i,this);const n=this._cachedMeta;xt(n),n._parsed=[]}e&&Object.isExtensible(e)&&(0,d.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 o=e._stacked;e._stacked=Pt(e.vScale,e),e.stack!==i.stack&&(n=!0,xt(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&At(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,l=o.axis;let h=t===0&&e===n.length?!0:i._sorted,u=t>0&&i._parsed[t-1],p,b,_;if(this._parsing===!1)i._parsed=n,i._sorted=!0,_=n;else{(0,d.b)(n[t])?_=this.parseArrayData(i,n,t,e):(0,d.i)(n[t])?_=this.parseObjectData(i,n,t,e):_=this.parsePrimitiveData(i,n,t,e);const y=()=>b[l]===null||u&&b[l]<u[l];for(p=0;p<e;++p)i._parsed[p+t]=b=_[p],h&&(y()&&(h=!1),u=b);i._sorted=h}a&&At(this,_)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:a}=t,l=o.axis,h=a.axis,u=o.getLabels(),p=o===a,b=new Array(n);let _,y,M;for(_=0,y=n;_<y;++_)M=_+i,b[_]={[l]:p||o.parse(u[M],M),[h]:a.parse(e[M],M)};return b}parseArrayData(t,e,i,n){const{xScale:o,yScale:a}=t,l=new Array(n);let h,u,p,b;for(h=0,u=n;h<u;++h)p=h+i,b=e[p],l[h]={x:o.parse(b[0],p),y:a.parse(b[1],p)};return l}parseObjectData(t,e,i,n){const{xScale:o,yScale:a}=t,{xAxisKey:l="x",yAxisKey:h="y"}=this._parsing,u=new Array(n);let p,b,_,y;for(p=0,b=n;p<b;++p)_=p+i,y=e[_],u[p]={x:o.parse((0,d.f)(y,l),_),y:a.parse((0,d.f)(y,h),_)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,a=e[t.axis],l={keys:q(n,!0),values:e._stacks[t.axis]._visualValues};return ct(l,a,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let a=o===null?NaN:o;const l=n&&i._stacks[e.axis];n&&l&&(n.values=l,a=ct(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,a=n.length,l=this._getOtherScale(t),h=tt(e,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:b}=Kt(l);let _,y;function M(){y=n[_];const S=y[l.axis];return!(0,d.g)(y[t.axis])||p>S||b<S}for(_=0;_<a&&!(!M()&&(this.updateRangeFromParsed(u,t,y,h),o));++_);if(o){for(_=a-1;_>=0;--_)if(!M()){this.updateRangeFromParsed(u,t,y,h);break}}return u}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,d.g)(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=z((0,d.v)(this.options.clip,ft(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],o=e.chartArea,a=[],l=this._drawStart||0,h=this._drawCount||n.length-l,u=this.options.drawActiveElementsOnTop;let p;for(i.dataset&&i.dataset.draw(t,o,l,h),p=l;p<l+h;++p){const b=n[p];b.hidden||(b.active&&u?a.push(b):b.draw(t,o))}for(p=0;p<a.length;++p)a[p].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Dt(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=jt(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,l=o[a],h=this.enableOptionSharing&&(0,d.h)(i);if(l)return N(l,h);const u=this.chart.config,p=u.datasetElementScopeKeys(this._type,t),b=n?[`${t}Hover`,"hover",t,""]:[t,""],_=u.getOptionScopes(this.getDataset(),p),y=Object.keys(d.d.elements[t]),M=()=>this.getContext(i,n,e),S=u.resolveNamedOptions(_,y,M,b);return S.$shared&&(S.$shared=h,o[a]=Object.freeze(N(S,h))),S}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,l=o[a];if(l)return l;let h;if(n.options.animation!==!1){const p=this.chart.config,b=p.datasetAnimationScopeKeys(this._type,e),_=p.getOptionScopes(this.getDataset(),b);h=p.createResolver(_,this.getContext(t,i,e))}const u=new at(n,h&&h.animations);return h&&h._cacheable&&(o[a]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Vt(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,n){Vt(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Vt(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}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[l,h,u]of this._syncList)this[l](h,u);this._syncList=[];const n=i.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,i=!0){const n=this._cachedMeta,o=n.data,a=t+e;let l;const h=u=>{for(u.length+=e,l=u.length-1;l>=a;l--)u[l]=u[l-e]};for(h(o),l=t;l<a;++l)o[l]=new this.dataElementType;this._parsing&&h(n._parsed),this.parse(t,e),i&&this.updateElements(o,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&&xt(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])}}R(st,"defaults",{}),R(st,"datasetElementType",null),R(st,"dataElementType",null);function wt(s,t){if(!s._cache.$bar){const e=s.getMatchingVisibleMetas(t);let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(s));s._cache.$bar=(0,d._)(i.sort((n,o)=>n-o))}return s._cache.$bar}function bt(s){const t=s.iScale,e=wt(t,s.type);let i=t._length,n,o,a,l;const h=()=>{a===32767||a===-32768||((0,d.h)(l)&&(i=Math.min(i,Math.abs(a-l)||i)),l=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),h();for(l=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),h();return i}function ot(s,t,e,i){const n=e.barThickness;let o,a;return(0,d.k)(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*i,a=1),{chunk:o/i,ratio:a,start:t.pixels[s]-o/2}}function Lt(s,t,e,i){const n=t.pixels,o=n[s];let a=s>0?n[s-1]:null,l=s<n.length-1?n[s+1]:null;const h=e.categoryPercentage;a===null&&(a=o-(l===null?t.end-t.start:l-o)),l===null&&(l=o+o-a);const u=o-(o-Math.min(a,l))/2*h;return{chunk:Math.abs(l-a)/2*h/i,ratio:e.barPercentage,start:u}}function Ht(s,t,e,i){const n=e.parse(s[0],i),o=e.parse(s[1],i),a=Math.min(n,o),l=Math.max(n,o);let h=a,u=l;Math.abs(a)>Math.abs(l)&&(h=l,u=a),t[e.axis]=u,t._custom={barStart:h,barEnd:u,start:n,end:o,min:a,max:l}}function we(s,t,e,i){return(0,d.b)(s)?Ht(s,t,e,i):t[e.axis]=e.parse(s,i),t}function Et(s,t,e,i){const n=s.iScale,o=s.vScale,a=n.getLabels(),l=n===o,h=[];let u,p,b,_;for(u=e,p=e+i;u<p;++u)_=t[u],b={},b[n.axis]=l||n.parse(a[u],u),h.push(we(_,b,o,u));return h}function ne(s){return s&&s.barStart!==void 0&&s.barEnd!==void 0}function he(s,t,e){return s!==0?(0,d.s)(s):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Qt(s){let t,e,i,n,o;return s.horizontal?(t=s.base>s.x,e="left",i="right"):(t=s.base<s.y,e="bottom",i="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:i,reverse:t,top:n,bottom:o}}function Nt(s,t,e,i){let n=t.borderSkipped;const o={};if(!n){s.borderSkipped=o;return}if(n===!0){s.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:h,top:u,bottom:p}=Qt(s);n==="middle"&&e&&(s.enableBorderRadius=!0,(e._top||0)===i?n=u:(e._bottom||0)===i?n=p:(o[qt(p,a,l,h)]=!0,n=u)),o[qt(n,a,l,h)]=!0,s.borderSkipped=o}function qt(s,t,e,i){return i?(s=St(s,t,e),s=$t(s,e,t)):s=$t(s,t,e),s}function St(s,t,e){return s===t?e:s===e?t:s}function $t(s,t,e){return s==="start"?t:s==="end"?e:s}function Rt(s,{inflateAmount:t},e){s.inflateAmount=t==="auto"?e===1?.33:0:t}class Yt extends st{parsePrimitiveData(t,e,i,n){return Et(t,e,i,n)}parseArrayData(t,e,i,n){return Et(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:a}=t,{xAxisKey:l="x",yAxisKey:h="y"}=this._parsing,u=o.axis==="x"?l:h,p=a.axis==="x"?l:h,b=[];let _,y,M,S;for(_=i,y=i+n;_<y;++_)S=e[_],M={},M[o.axis]=o.parse((0,d.f)(S,u),_),b.push(we((0,d.f)(S,p),M,a,_));return b}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),a=o._custom,l=ne(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:l}}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=n==="reset",{index:a,_cachedMeta:{vScale:l}}=this,h=l.getBasePixel(),u=l.isHorizontal(),p=this._getRuler(),{sharedOptions:b,includeOptions:_}=this._getSharedOptions(e,n);for(let y=e;y<e+i;y++){const M=this.getParsed(y),S=o||(0,d.k)(M[l.axis])?{base:h,head:h}:this._calculateBarValuePixels(y),D=this._calculateBarIndexPixels(y,p),P=(M._stacks||{})[l.axis],O={horizontal:u,base:S.base,enableBorderRadius:!P||ne(M._custom)||a===P._top||a===P._bottom,x:u?S.head:D.center,y:u?D.center:S.head,height:u?D.size:Math.abs(S.size),width:u?Math.abs(S.size):D.size};_&&(O.options=b||this.resolveDataElementOptions(y,t[y].active?"active":n));const E=O.options||t[y].options;Nt(O,E,P,a),Rt(O,E,p.ratio),this.updateElement(t[y],y,O,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=i.options.stacked,a=[],l=h=>{const u=h.controller.getParsed(e),p=u&&u[h.vScale.axis];if((0,d.k)(p)||isNaN(p))return!0};for(const h of n)if(!(e!==void 0&&l(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.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),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const l=t.barThickness;return{min:l||bt(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:o,minBarLength:a}}=this,l=o||0,h=this.getParsed(t),u=h._custom,p=ne(u);let b=h[e.axis],_=0,y=i?this.applyStack(e,h,i):b,M,S;y!==b&&(_=y-b,y=b),p&&(b=u.barStart,y=u.barEnd-u.barStart,b!==0&&(0,d.s)(b)!==(0,d.s)(u.barEnd)&&(_=0),_+=b);const D=!(0,d.k)(o)&&!p?o:_;let P=e.getPixelForValue(D);if(this.chart.getDataVisibility(t)?M=e.getPixelForValue(_+y):M=P,S=M-P,Math.abs(S)<a){S=he(S,e,l)*a,b===l&&(P-=S/2);const O=e.getPixelForDecimal(0),E=e.getPixelForDecimal(1),L=Math.min(O,E),A=Math.max(O,E);P=Math.max(Math.min(P,A),L),M=P+S,i&&!p&&(h._stacks[e.axis]._visualValues[n]=e.getValueForPixel(M)-e.getValueForPixel(P))}if(P===e.getPixelForValue(l)){const O=(0,d.s)(S)*e.getLineWidthForValue(l)/2;P+=O,S-=O}return{size:S,base:P,head:M,center:M+S/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,a=(0,d.v)(n.maxBarThickness,1/0);let l,h;if(e.grouped){const u=o?this._getStackCount(t):e.stackCount,p=n.barThickness==="flex"?Lt(t,e,n,u):ot(t,e,n,u),b=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);l=p.start+p.chunk*b+p.chunk/2,h=Math.min(a,p.chunk*p.ratio)}else l=i.getPixelForValue(this.getParsed(t)[i.axis],t),h=Math.min(a,e.min*e.ratio);return{base:l-h/2,head:l+h/2,center:l,size:h}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}R(Yt,"id","bar"),R(Yt,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),R(Yt,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Mt extends st{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const o=super.parsePrimitiveData(t,e,i,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+i).radius;return o}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let a=0;a<o.length;a++){const l=e[i+a];o[a]._custom=(0,d.v)(l[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 l=e[i+a];o[a]._custom=(0,d.v)(l&&l.r&&+l.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:o}=e,a=this.getParsed(t),l=n.getLabelForValue(a.x),h=o.getLabelForValue(a.y),u=a._custom;return{label:i[t]||"",value:"("+l+", "+h+(u?", "+u:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n),p=a.axis,b=l.axis;for(let _=e;_<e+i;_++){const y=t[_],M=!o&&this.getParsed(_),S={},D=S[p]=o?a.getPixelForDecimal(.5):a.getPixelForValue(M[p]),P=S[b]=o?l.getBasePixel():l.getPixelForValue(M[b]);S.skip=isNaN(D)||isNaN(P),u&&(S.options=h||this.resolveDataElementOptions(_,y.active?"active":n),o&&(S.options.radius=0)),this.updateElement(y,_,S,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 e!=="active"&&(n.radius=0),n.radius+=(0,d.v)(i&&i._custom,o),n}}R(Mt,"id","bubble"),R(Mt,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),R(Mt,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Se(s,t,e){let i=1,n=1,o=0,a=0;if(t<d.T){const l=s,h=l+t,u=Math.cos(l),p=Math.sin(l),b=Math.cos(h),_=Math.sin(h),y=(E,L,A)=>(0,d.p)(E,l,h,!0)?1:Math.max(L,L*e,A,A*e),M=(E,L,A)=>(0,d.p)(E,l,h,!0)?-1:Math.min(L,L*e,A,A*e),S=y(0,u,b),D=y(d.H,p,_),P=M(d.P,u,b),O=M(d.P+d.H,p,_);i=(S-P)/2,n=(D-O)/2,o=-(S+P)/2,a=-(D+O)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:a}}class Zt extends st{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(this._parsing===!1)n._parsed=i;else{let o=h=>+i[h];if((0,d.i)(i[t])){const{key:h="value"}=this._parsing;o=u=>+(0,d.f)(i[u],h)}let a,l;for(a=t,l=t+e;a<l;++a)n._parsed[a]=o(a)}}_getRotation(){return(0,d.t)(this.options.rotation-90)}_getCircumference(){return(0,d.t)(this.options.circumference)}_getRotationExtents(){let t=d.T,e=-d.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,o=n._getRotation(),a=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}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,l=Math.max((Math.min(i.width,i.height)-a)/2,0),h=Math.min((0,d.m)(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:p,rotation:b}=this._getRotationExtents(),{ratioX:_,ratioY:y,offsetX:M,offsetY:S}=Se(b,p,h),D=(i.width-a)/_,P=(i.height-a)/y,O=Math.max(Math.min(D,P)/2,0),E=(0,d.n)(this.options.radius,O),L=Math.max(E*h,0),A=(E-L)/this._getVisibleDatasetWeightTotal();this.offsetX=M*E,this.offsetY=S*E,n.total=this.calculateTotal(),this.outerRadius=E-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*u,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)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/d.T)}updateElements(t,e,i,n){const o=n==="reset",a=this.chart,l=a.chartArea,u=a.options.animation,p=(l.left+l.right)/2,b=(l.top+l.bottom)/2,_=o&&u.animateScale,y=_?0:this.innerRadius,M=_?0:this.outerRadius,{sharedOptions:S,includeOptions:D}=this._getSharedOptions(e,n);let P=this._getRotation(),O;for(O=0;O<e;++O)P+=this._circumference(O,o);for(O=e;O<e+i;++O){const E=this._circumference(O,o),L=t[O],A={x:p+this.offsetX,y:b+this.offsetY,startAngle:P,endAngle:P+E,circumference:E,outerRadius:M,innerRadius:y};D&&(A.options=S||this.resolveDataElementOptions(O,L.active?"active":n)),P+=E,this.updateElement(L,O,A,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?d.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=(0,d.o)(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,a,l,h;if(!t){for(n=0,o=i.data.datasets.length;n<o;++n)if(i.isDatasetVisible(n)){a=i.getDatasetMeta(n),t=a.data,l=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)h=l.resolveDataElementOptions(n),h.borderAlign!=="inner"&&(e=Math.max(e,h.borderWidth||0,h.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.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,d.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}R(Zt,"id","doughnut"),R(Zt,"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"}),R(Zt,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),R(Zt,"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((o,a)=>{const h=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:h.backgroundColor,strokeStyle:h.borderColor,fontColor:n,lineWidth:h.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class Pe extends st{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:l,count:h}=(0,d.q)(e,n,a);this._drawStart=l,this._drawCount=h,(0,d.w)(e)&&(l=0,h=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:u},t),this.updateElements(n,l,h,t)}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:l,_stacked:h,_dataset:u}=this._cachedMeta,{sharedOptions:p,includeOptions:b}=this._getSharedOptions(e,n),_=a.axis,y=l.axis,{spanGaps:M,segment:S}=this.options,D=(0,d.x)(M)?M:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||o||n==="none",O=e+i,E=t.length;let L=e>0&&this.getParsed(e-1);for(let A=0;A<E;++A){const F=t[A],I=P?F:{};if(A<e||A>=O){I.skip=!0;continue}const B=this.getParsed(A),$=(0,d.k)(B[y]),Z=I[_]=a.getPixelForValue(B[_],A),J=I[y]=o||$?l.getBasePixel():l.getPixelForValue(h?this.applyStack(l,B,h):B[y],A);I.skip=isNaN(Z)||isNaN(J)||$,I.stop=A>0&&Math.abs(B[_]-L[_])>D,S&&(I.parsed=B,I.raw=u.data[A]),b&&(I.options=p||this.resolveDataElementOptions(A,F.active?"active":n)),P||this.updateElement(F,A,I,n),L=B}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}R(Pe,"id","line"),R(Pe,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),R(Pe,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class re extends st{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,d.o)(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return d.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((i,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),l=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,e,i,n){const o=n==="reset",a=this.chart,h=a.options.animation,u=this._cachedMeta.rScale,p=u.xCenter,b=u.yCenter,_=u.getIndexAngle(0)-.5*d.P;let y=_,M;const S=360/this.countVisibleElements();for(M=0;M<e;++M)y+=this._computeAngle(M,n,S);for(M=e;M<e+i;M++){const D=t[M];let P=y,O=y+this._computeAngle(M,n,S),E=a.getDataVisibility(M)?u.getDistanceFromCenterForValue(this.getParsed(M).r):0;y=O,o&&(h.animateScale&&(E=0),h.animateRotate&&(P=O=_));const L={x:p,y:b,innerRadius:0,outerRadius:E,startAngle:P,endAngle:O,options:this.resolveDataElementOptions(M,D.active?"active":n)};this.updateElement(D,M,L,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,d.t)(this.resolveDataElementOptions(t,e).angle||i):0}}R(re,"id","polarArea"),R(re,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),R(re,"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((o,a)=>{const h=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:h.backgroundColor,strokeStyle:h.borderColor,fontColor:n,lineWidth:h.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}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 Ft extends Zt{}R(Ft,"id","pie"),R(Ft,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class yt extends st{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 d.y.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(i,void 0,l,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let l=e;l<e+i;l++){const h=t[l],u=this.resolveDataElementOptions(l,h.active?"active":n),p=o.getPointPositionForValue(l,this.getParsed(l).r),b=a?o.xCenter:p.x,_=a?o.yCenter:p.y,y={x:b,y:_,angle:p.angle,skip:isNaN(b)||isNaN(_),options:u};this.updateElement(h,l,y,n)}}}R(yt,"id","radar"),R(yt,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),R(yt,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class De extends st{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),l=n.getLabelForValue(a.x),h=o.getLabelForValue(a.y);return{label:i[t]||"",value:"("+l+", "+h+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=(0,d.q)(e,i,n);if(this._drawStart=o,this._drawCount=a,(0,d.w)(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:h}=e;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!h._decimated,l.points=i;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!n,options:u},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=n==="reset",{iScale:a,vScale:l,_stacked:h,_dataset:u}=this._cachedMeta,p=this.resolveDataElementOptions(e,n),b=this.getSharedOptions(p),_=this.includeOptions(n,b),y=a.axis,M=l.axis,{spanGaps:S,segment:D}=this.options,P=(0,d.x)(S)?S:Number.POSITIVE_INFINITY,O=this.chart._animationsDisabled||o||n==="none";let E=e>0&&this.getParsed(e-1);for(let L=e;L<e+i;++L){const A=t[L],F=this.getParsed(L),I=O?A:{},B=(0,d.k)(F[M]),$=I[y]=a.getPixelForValue(F[y],L),Z=I[M]=o||B?l.getBasePixel():l.getPixelForValue(h?this.applyStack(l,F,h):F[M],L);I.skip=isNaN($)||isNaN(Z)||B,I.stop=L>0&&Math.abs(F[y]-E[y])>P,D&&(I.parsed=F,I.raw=u.data[L]),_&&(I.options=b||this.resolveDataElementOptions(L,A.active?"active":n)),O||this.updateElement(A,L,I,n),E=F}this.updateSharedOptions(b,n,p)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let l=0;for(let h=e.length-1;h>=0;--h)l=Math.max(l,e[h].size(this.resolveDataElementOptions(h))/2);return l>0&&l}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}R(De,"id","scatter"),R(De,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),R(De,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Yn=Object.freeze({__proto__:null,BarController:Yt,BubbleController:Mt,DoughnutController:Zt,LineController:Pe,PieController:Ft,PolarAreaController:re,RadarController:yt,ScatterController:De});function It(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mi{constructor(t){R(this,"options");this.options=t||{}}static override(t){Object.assign(mi.prototype,t)}init(){}formats(){return It()}parse(){return It()}format(){return It()}add(){return It()}diff(){return It()}startOf(){return It()}endOf(){return It()}}var bi={_date:mi};function $n(s,t,e,i){const{controller:n,data:o,_sorted:a}=s,l=n._cachedMeta.iScale;if(l&&t===l.axis&&t!=="r"&&a&&o.length){const h=l._reversePixels?d.A:d.B;if(i){if(n._sharedOptions){const u=o[0],p=typeof u.getRange=="function"&&u.getRange(t);if(p){const b=h(o,t,e-p),_=h(o,t,e+p);return{lo:b.lo,hi:_.hi}}}}else return h(o,t,e)}return{lo:0,hi:o.length-1}}function Ie(s,t,e,i,n){const o=s.getSortedVisibleDatasetMetas(),a=e[t];for(let l=0,h=o.length;l<h;++l){const{index:u,data:p}=o[l],{lo:b,hi:_}=$n(o[l],t,a,n);for(let y=b;y<=_;++y){const M=p[y];M.skip||i(M,u,y)}}}function Un(s){const t=s.indexOf("x")!==-1,e=s.indexOf("y")!==-1;return function(i,n){const o=t?Math.abs(i.x-n.x):0,a=e?Math.abs(i.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Oe(s,t,e,i,n){const o=[];return!n&&!s.isPointInArea(t)||Ie(s,e,t,function(l,h,u){!n&&!(0,d.C)(l,s.chartArea,0)||l.inRange(t.x,t.y,i)&&o.push({element:l,datasetIndex:h,index:u})},!0),o}function Ni(s,t,e,i){let n=[];function o(a,l,h){const{startAngle:u,endAngle:p}=a.getProps(["startAngle","endAngle"],i),{angle:b}=(0,d.D)(a,{x:t.x,y:t.y});(0,d.p)(b,u,p)&&n.push({element:a,datasetIndex:l,index:h})}return Ie(s,e,t,o),n}function Xn(s,t,e,i,n,o){let a=[];const l=Un(e);let h=Number.POSITIVE_INFINITY;function u(p,b,_){const y=p.inRange(t.x,t.y,n);if(i&&!y)return;const M=p.getCenterPoint(n);if(!(!!o||s.isPointInArea(M))&&!y)return;const D=l(t,M);D<h?(a=[{element:p,datasetIndex:b,index:_}],h=D):D===h&&a.push({element:p,datasetIndex:b,index:_})}return Ie(s,e,t,u),a}function xe(s,t,e,i,n,o){return!o&&!s.isPointInArea(t)?[]:e==="r"&&!i?Ni(s,t,e,n):Xn(s,t,e,i,n,o)}function _i(s,t,e,i,n){const o=[],a=e==="x"?"inXRange":"inYRange";let l=!1;return Ie(s,e,t,(h,u,p)=>{h[a](t[e],n)&&(o.push({element:h,datasetIndex:u,index:p}),l=l||h.inRange(t.x,t.y,n))}),i&&!l?[]:o}var Kn={evaluateInteractionItems:Ie,modes:{index(s,t,e,i){const n=(0,d.z)(t,s),o=e.axis||"x",a=e.includeInvisible||!1,l=e.intersect?Oe(s,n,o,i,a):xe(s,n,o,!1,i,a),h=[];return l.length?(s.getSortedVisibleDatasetMetas().forEach(u=>{const p=l[0].index,b=u.data[p];b&&!b.skip&&h.push({element:b,datasetIndex:u.index,index:p})}),h):[]},dataset(s,t,e,i){const n=(0,d.z)(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;let l=e.intersect?Oe(s,n,o,i,a):xe(s,n,o,!1,i,a);if(l.length>0){const h=l[0].datasetIndex,u=s.getDatasetMeta(h).data;l=[];for(let p=0;p<u.length;++p)l.push({element:u[p],datasetIndex:h,index:p})}return l},point(s,t,e,i){const n=(0,d.z)(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;return Oe(s,n,o,i,a)},nearest(s,t,e,i){const n=(0,d.z)(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;return xe(s,n,o,e.intersect,i,a)},x(s,t,e,i){const n=(0,d.z)(t,s);return _i(s,n,"x",e.intersect,i)},y(s,t,e,i){const n=(0,d.z)(t,s);return _i(s,n,"y",e.intersect,i)}}};const Gn=["left","top","right","bottom"];function Ce(s,t){return s.filter(e=>e.pos===t)}function Yi(s,t){return s.filter(e=>Gn.indexOf(e.pos)===-1&&e.box.axis===t)}function ze(s,t){return s.sort((e,i)=>{const n=t?i:e,o=t?e:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function xi(s){const t=[];let e,i,n,o,a,l;for(e=0,i=(s||[]).length;e<i;++e)n=s[e],{position:o,options:{stack:a,stackWeight:l=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:l});return t}function yi(s){const t={};for(const e of s){const{stack:i,pos:n,stackWeight:o}=e;if(!i||!Gn.includes(n))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Qn(s,t){const e=yi(s),{vBoxMaxWidth:i,hBoxMaxHeight:n}=t;let o,a,l;for(o=0,a=s.length;o<a;++o){l=s[o];const{fullSize:h}=l.box,u=e[l.stack],p=u&&l.stackWeight/u.weight;l.horizontal?(l.width=p?p*i:h&&t.availableWidth,l.height=n):(l.width=i,l.height=p?p*n:h&&t.availableHeight)}return e}function Be(s){const t=xi(s),e=ze(t.filter(u=>u.box.fullSize),!0),i=ze(Ce(t,"left"),!0),n=ze(Ce(t,"right")),o=ze(Ce(t,"top"),!0),a=ze(Ce(t,"bottom")),l=Yi(t,"x"),h=Yi(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:n.concat(h).concat(a).concat(l),chartArea:Ce(t,"chartArea"),vertical:i.concat(n).concat(h),horizontal:o.concat(a).concat(l)}}function $i(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function Ui(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function kt(s,t,e,i){const{pos:n,box:o}=e,a=s.maxPadding;if(!(0,d.i)(n)){e.size&&(s[n]-=e.size);const b=i[e.stack]||{size:0,count:1};b.size=Math.max(b.size,e.horizontal?o.height:o.width),e.size=b.size/b.count,s[n]+=e.size}o.getPadding&&Ui(a,o.getPadding());const l=Math.max(0,t.outerWidth-$i(a,s,"left","right")),h=Math.max(0,t.outerHeight-$i(a,s,"top","bottom")),u=l!==s.w,p=h!==s.h;return s.w=l,s.h=h,e.horizontal?{same:u,other:p}:{same:p,other:u}}function Jt(s){const t=s.maxPadding;function e(i){const n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function qn(s,t){const e=t.maxPadding;function i(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(s?["left","right"]:["top","bottom"])}function de(s,t,e,i){const n=[];let o,a,l,h,u,p;for(o=0,a=s.length,u=0;o<a;++o){l=s[o],h=l.box,h.update(l.width||t.w,l.height||t.h,qn(l.horizontal,t));const{same:b,other:_}=kt(t,e,l,i);u|=b&&n.length,p=p||_,h.fullSize||n.push(l)}return u&&de(n,t,e,i)||p}function Ge(s,t,e,i,n){s.top=e,s.left=t,s.right=t+i,s.bottom=e+n,s.width=i,s.height=n}function te(s,t,e,i){const n=e.padding;let{x:o,y:a}=t;for(const l of s){const h=l.box,u=i[l.stack]||{count:1,placed:0,weight:1},p=l.stackWeight/u.weight||1;if(l.horizontal){const b=t.w*p,_=u.size||h.height;(0,d.h)(u.start)&&(a=u.start),h.fullSize?Ge(h,n.left,a,e.outerWidth-n.right-n.left,_):Ge(h,t.left+u.placed,a,b,_),u.start=a,u.placed+=b,a=h.bottom}else{const b=t.h*p,_=u.size||h.width;(0,d.h)(u.start)&&(o=u.start),h.fullSize?Ge(h,o,n.top,_,e.outerHeight-n.bottom-n.top):Ge(h,o,t.top+u.placed,_,b),u.start=o,u.placed+=b,o=h.right}}t.x=o,t.y=a}var gt={addBox(s,t){s.boxes||(s.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},s.boxes.push(t)},removeBox(s,t){const e=s.boxes?s.boxes.indexOf(t):-1;e!==-1&&s.boxes.splice(e,1)},configure(s,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(s,t,e,i){if(!s)return;const n=(0,d.E)(s.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),l=Be(s.boxes),h=l.vertical,u=l.horizontal;(0,d.F)(s.boxes,S=>{typeof S.beforeLayout=="function"&&S.beforeLayout()});const p=h.reduce((S,D)=>D.box.options&&D.box.options.display===!1?S:S+1,0)||1,b=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/p,hBoxMaxHeight:a/2}),_=Object.assign({},n);Ui(_,(0,d.E)(i));const y=Object.assign({maxPadding:_,w:o,h:a,x:n.left,y:n.top},n),M=Qn(h.concat(u),b);de(l.fullSize,y,b,M),de(h,y,b,M),de(u,y,b,M)&&de(h,y,b,M),Jt(y),te(l.leftAndTop,y,b,M),y.x+=y.w,y.y+=y.h,te(l.rightAndBottom,y,b,M),s.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},(0,d.F)(l.chartArea,S=>{const D=S.box;Object.assign(D,s.chartArea),D.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}};class vi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(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 Qe extends vi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ae="$chartjs",Mi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Xi=s=>s===null||s==="";function Zn(s,t){const e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[Ae]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Xi(n)){const o=(0,d.J)(s,"width");o!==void 0&&(s.width=o)}if(Xi(i))if(s.style.height==="")s.height=s.width/(t||2);else{const o=(0,d.J)(s,"height");o!==void 0&&(s.height=o)}return s}const Ki=d.K?{passive:!0}:!1;function Jn(s,t,e){s&&s.addEventListener(t,e,Ki)}function ts(s,t,e){s&&s.canvas&&s.canvas.removeEventListener(t,e,Ki)}function es(s,t){const e=Mi[s.type]||s.type,{x:i,y:n}=(0,d.z)(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function qe(s,t){for(const e of s)if(e===t||e.contains(t))return!0}function is(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||qe(l.addedNodes,i),a=a&&!qe(l.removedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function ns(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||qe(l.removedNodes,i),a=a&&!qe(l.addedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ye=new Map;let Gi=0;function se(){const s=window.devicePixelRatio;s!==Gi&&(Gi=s,ye.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function Qi(s,t){ye.size||window.addEventListener("resize",se),ye.set(s,t)}function Ze(s){ye.delete(s),ye.size||window.removeEventListener("resize",se)}function ss(s,t,e){const i=s.canvas,n=i&&(0,d.I)(i);if(!n)return;const o=(0,d.L)((l,h)=>{const u=n.clientWidth;e(l,h),u<n.clientWidth&&e()},window),a=new ResizeObserver(l=>{const h=l[0],u=h.contentRect.width,p=h.contentRect.height;u===0&&p===0||o(u,p)});return a.observe(n),Qi(s,o),a}function Je(s,t,e){e&&e.disconnect(),t==="resize"&&Ze(s)}function ki(s,t,e){const i=s.canvas,n=(0,d.L)(o=>{s.ctx!==null&&e(es(o,s))},s);return Jn(i,t,n),n}class We extends vi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Zn(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Ae])return!1;const i=e[Ae].initial;["height","width"].forEach(o=>{const a=i[o];(0,d.k)(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=i.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[Ae],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:is,detach:ns,resize:ss}[e]||ki;n[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Je,detach:Je,resize:Je}[e]||ts)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return(0,d.G)(t,e,i,n)}isAttached(t){const e=(0,d.I)(t);return!!(e&&e.isConnected)}}function os(s){return!(0,d.M)()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?Qe:We}class ee{constructor(){R(this,"x");R(this,"y");R(this,"active",!1);R(this,"options");R(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,d.x)(this.x)&&(0,d.x)(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(o=>{n[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),n}}R(ee,"defaults",{}),R(ee,"defaultRoutes");function qi(s,t){const e=s.options.ticks,i=rs(s),n=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?ls(t):[],a=o.length,l=o[0],h=o[a-1],u=[];if(a>n)return lo(t,u,o,a/n),u;const p=as(o,t,n);if(a>0){let b,_;const y=a>1?Math.round((h-l)/(a-1)):null;for(je(t,u,p,(0,d.k)(y)?0:l-y,l),b=0,_=a-1;b<_;b++)je(t,u,p,o[b],o[b+1]);return je(t,u,p,h,(0,d.k)(y)?t.length:h+y),u}return je(t,u,p),u}function rs(s){const t=s.options.offset,e=s._tickSize(),i=s._length/e+(t?0:1),n=s._maxLength/e;return Math.floor(Math.min(i,n))}function as(s,t,e){const i=cs(s),n=t.length/e;if(!i)return Math.max(n,1);const o=(0,d.N)(i);for(let a=0,l=o.length-1;a<l;a++){const h=o[a];if(h>n)return h}return Math.max(n,1)}function ls(s){const t=[];let e,i;for(e=0,i=s.length;e<i;e++)s[e].major&&t.push(e);return t}function lo(s,t,e,i){let n=0,o=e[0],a;for(i=Math.ceil(i),a=0;a<s.length;a++)a===o&&(t.push(s[a]),n++,o=e[n*i])}function je(s,t,e,i,n){const o=(0,d.v)(i,0),a=Math.min((0,d.v)(n,s.length),s.length);let l=0,h,u,p;for(e=Math.ceil(e),n&&(h=n-i,e=h/Math.floor(h/e)),p=o;p<0;)l++,p=Math.round(o+l*e);for(u=Math.max(o,0);u<a;u++)u===p&&(t.push(s[u]),l++,p=Math.round(o+l*e))}function cs(s){const t=s.length;let e,i;if(t<2)return!1;for(i=s[0],e=1;e<t;++e)if(s[e]-s[e-1]!==i)return!1;return i}const hs=s=>s==="left"?"right":s==="right"?"left":s,Zi=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e,Ji=(s,t)=>Math.min(t||s,s);function tn(s,t){const e=[],i=s.length/t,n=s.length;let o=0;for(;o<n;o+=i)e.push(s[Math.floor(o)]);return e}function ds(s,t,e){const i=s.ticks.length,n=Math.min(t,i-1),o=s._startPixel,a=s._endPixel,l=1e-6;let h=s.getPixelForTick(n),u;if(!(e&&(i===1?u=Math.max(h-o,a-h):t===0?u=(s.getPixelForTick(1)-h)/2:u=(h-s.getPixelForTick(n-1))/2,h+=n<t?u:-u,h<o-l||h>a+l)))return h}function us(s,t){(0,d.F)(s,e=>{const i=e.gc,n=i.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[i[o]];i.splice(0,n)}})}function ue(s){return s.drawTicks?s.tickLength:0}function wi(s,t){if(!s.display)return 0;const e=(0,d.a0)(s.font,t),i=(0,d.E)(s.padding);return((0,d.b)(s.text)?s.text.length:1)*e.lineHeight+i.height}function en(s,t){return(0,d.j)(s,{scale:t,type:"scale"})}function ti(s,t,e){return(0,d.j)(s,{tick:e,index:t,type:"tick"})}function Si(s,t,e){let i=(0,d.a1)(s);return(e&&t!=="right"||!e&&t==="right")&&(i=hs(i)),i}function fs(s,t,e,i){const{top:n,left:o,bottom:a,right:l,chart:h}=s,{chartArea:u,scales:p}=h;let b=0,_,y,M;const S=a-n,D=l-o;if(s.isHorizontal()){if(y=(0,d.a2)(i,o,l),(0,d.i)(e)){const P=Object.keys(e)[0],O=e[P];M=p[P].getPixelForValue(O)+S-t}else e==="center"?M=(u.bottom+u.top)/2+S-t:M=Zi(s,e,t);_=l-o}else{if((0,d.i)(e)){const P=Object.keys(e)[0],O=e[P];y=p[P].getPixelForValue(O)-D+t}else e==="center"?y=(u.left+u.right)/2-D+t:y=Zi(s,e,t);M=(0,d.a2)(i,a,n),b=e==="left"?-d.H:d.H}return{titleX:y,titleY:M,maxWidth:_,rotation:b}}class ae 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,d.O)(t,Number.POSITIVE_INFINITY),e=(0,d.O)(e,Number.NEGATIVE_INFINITY),i=(0,d.O)(i,Number.POSITIVE_INFINITY),n=(0,d.O)(n,Number.NEGATIVE_INFINITY),{min:(0,d.O)(t,i),max:(0,d.O)(e,n),minDefined:(0,d.g)(t),maxDefined:(0,d.g)(e)}}getMinMax(t){let{min:e,max:i,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:i};const l=this.getMatchingVisibleMetas();for(let h=0,u=l.length;h<u;++h)a=l[h].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(i=Math.max(i,a.max));return e=o&&e>i?i:e,i=n&&e>i?e:i,{min:(0,d.O)(e,(0,d.O)(i,e)),max:(0,d.O)(i,(0,d.O)(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,d.Q)(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:a}=this.options,l=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,d.R)(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const h=l<this.ticks.length;this._convertTicksToLabels(h?tn(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=qi(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,d.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,d.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,d.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,d.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,d.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,d.Q)(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){(0,d.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,d.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Ji(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let a=n,l,h,u;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const p=this._getLabelSizes(),b=p.widest.width,_=p.highest.height,y=(0,d.S)(this.chart.width-b,0,this.maxWidth);l=t.offset?this.maxWidth/i:y/(i-1),b+6>l&&(l=y/(i-(t.offset?.5:1)),h=this.maxHeight-ue(t.grid)-e.padding-wi(t.title,this.chart.options.font),u=Math.sqrt(b*b+_*_),a=(0,d.U)(Math.min(Math.asin((0,d.S)((p.highest.height+6)/l,-1,1)),Math.asin((0,d.S)(h/u,-1,1))-Math.asin((0,d.S)(_/u,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){(0,d.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,d.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(),l=this.isHorizontal();if(a){const h=wi(n,e.options.font);if(l?(t.width=this.maxWidth,t.height=ue(o)+h):(t.height=this.maxHeight,t.width=ue(o)+h),i.display&&this.ticks.length){const{first:u,last:p,widest:b,highest:_}=this._getLabelSizes(),y=i.padding*2,M=(0,d.t)(this.labelRotation),S=Math.cos(M),D=Math.sin(M);if(l){const P=i.mirror?0:D*b.width+S*_.height;t.height=Math.min(this.maxHeight,t.height+P+y)}else{const P=i.mirror?0:S*b.width+D*_.height;t.width=Math.min(this.maxWidth,t.width+P+y)}this._calculatePadding(u,p,D,S)}}this._handleMargins(),l?(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:o,padding:a},position:l}=this.options,h=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,b=this.right-this.getPixelForTick(this.ticks.length-1);let _=0,y=0;h?u?(_=n*t.width,y=i*e.height):(_=i*t.height,y=n*e.width):o==="start"?y=e.width:o==="end"?_=t.width:o!=="inner"&&(_=t.width/2,y=e.width/2),this.paddingLeft=Math.max((_-p+a)*this.width/(this.width-p),0),this.paddingRight=Math.max((y-b+a)*this.width/(this.width-b),0)}else{let p=e.height/2,b=t.height/2;o==="start"?(p=0,b=t.height):o==="end"&&(p=e.height,b=0),this.paddingTop=p+a,this.paddingBottom=b+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,d.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)(0,d.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=tn(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=[],l=[],h=Math.floor(e/Ji(e,i));let u=0,p=0,b,_,y,M,S,D,P,O,E,L,A;for(b=0;b<e;b+=h){if(M=t[b].label,S=this._resolveTickFontOptions(b),n.font=D=S.string,P=o[D]=o[D]||{data:{},gc:[]},O=S.lineHeight,E=L=0,!(0,d.k)(M)&&!(0,d.b)(M))E=(0,d.V)(n,P.data,P.gc,E,M),L=O;else if((0,d.b)(M))for(_=0,y=M.length;_<y;++_)A=M[_],!(0,d.k)(A)&&!(0,d.b)(A)&&(E=(0,d.V)(n,P.data,P.gc,E,A),L+=O);a.push(E),l.push(L),u=Math.max(E,u),p=Math.max(L,p)}us(o,e);const F=a.indexOf(u),I=l.indexOf(p),B=$=>({width:a[$]||0,height:l[$]||0});return{first:B(0),last:B(e-1),widest:B(F),highest:B(I),widths:a,heights:l}}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,d.W)(this._alignToPixels?(0,d.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=ti(this.getContext(),t,i))}return this.$context||(this.$context=en(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=(0,d.t)(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,l=o?o.widest.width+a:0,h=o?o.highest.height+a:0;return this.isHorizontal()?h*i>l*n?l/i:h/n:h*n<l*i?h/i:l/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:a,border:l}=n,h=o.offset,u=this.isHorizontal(),b=this.ticks.length+(h?1:0),_=ue(o),y=[],M=l.setContext(this.getContext()),S=M.display?M.width:0,D=S/2,P=function(mt){return(0,d.X)(i,mt,S)};let O,E,L,A,F,I,B,$,Z,J,it,Ct;if(a==="top")O=P(this.bottom),I=this.bottom-_,$=O-D,J=P(t.top)+D,Ct=t.bottom;else if(a==="bottom")O=P(this.top),J=t.top,Ct=P(t.bottom)-D,I=O+D,$=this.top+_;else if(a==="left")O=P(this.right),F=this.right-_,B=O-D,Z=P(t.left)+D,it=t.right;else if(a==="right")O=P(this.left),Z=t.left,it=P(t.right)-D,F=O+D,B=this.left+_;else if(e==="x"){if(a==="center")O=P((t.top+t.bottom)/2+.5);else if((0,d.i)(a)){const mt=Object.keys(a)[0],_t=a[mt];O=P(this.chart.scales[mt].getPixelForValue(_t))}J=t.top,Ct=t.bottom,I=O+D,$=I+_}else if(e==="y"){if(a==="center")O=P((t.left+t.right)/2);else if((0,d.i)(a)){const mt=Object.keys(a)[0],_t=a[mt];O=P(this.chart.scales[mt].getPixelForValue(_t))}F=O-D,B=F-_,Z=t.left,it=t.right}const ie=(0,d.v)(n.ticks.maxTicksLimit,b),dt=Math.max(1,Math.ceil(b/ie));for(E=0;E<b;E+=dt){const mt=this.getContext(E),_t=o.setContext(mt),ce=l.setContext(mt),zt=_t.lineWidth,gi=_t.color,Nn=ce.dash||[],pi=ce.dashOffset,Vi=_t.tickWidth,Xe=_t.tickColor,Hi=_t.tickBorderDash||[],Ke=_t.tickBorderDashOffset;L=ds(this,E,h),L!==void 0&&(A=(0,d.X)(i,L,zt),u?F=B=Z=it=A:I=$=J=Ct=A,y.push({tx1:F,ty1:I,tx2:B,ty2:$,x1:Z,y1:J,x2:it,y2:Ct,width:zt,color:gi,borderDash:Nn,borderDashOffset:pi,tickWidth:Vi,tickColor:Xe,tickBorderDash:Hi,tickBorderDashOffset:Ke}))}return this._ticksLength=b,this._borderValue=O,y}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,a=this.isHorizontal(),l=this.ticks,{align:h,crossAlign:u,padding:p,mirror:b}=o,_=ue(i.grid),y=_+p,M=b?-p:y,S=-(0,d.t)(this.labelRotation),D=[];let P,O,E,L,A,F,I,B,$,Z,J,it,Ct="middle";if(n==="top")F=this.bottom-M,I=this._getXAxisLabelAlignment();else if(n==="bottom")F=this.top+M,I=this._getXAxisLabelAlignment();else if(n==="left"){const dt=this._getYAxisLabelAlignment(_);I=dt.textAlign,A=dt.x}else if(n==="right"){const dt=this._getYAxisLabelAlignment(_);I=dt.textAlign,A=dt.x}else if(e==="x"){if(n==="center")F=(t.top+t.bottom)/2+y;else if((0,d.i)(n)){const dt=Object.keys(n)[0],mt=n[dt];F=this.chart.scales[dt].getPixelForValue(mt)+y}I=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")A=(t.left+t.right)/2-y;else if((0,d.i)(n)){const dt=Object.keys(n)[0],mt=n[dt];A=this.chart.scales[dt].getPixelForValue(mt)}I=this._getYAxisLabelAlignment(_).textAlign}e==="y"&&(h==="start"?Ct="top":h==="end"&&(Ct="bottom"));const ie=this._getLabelSizes();for(P=0,O=l.length;P<O;++P){E=l[P],L=E.label;const dt=o.setContext(this.getContext(P));B=this.getPixelForTick(P)+o.labelOffset,$=this._resolveTickFontOptions(P),Z=$.lineHeight,J=(0,d.b)(L)?L.length:1;const mt=J/2,_t=dt.color,ce=dt.textStrokeColor,zt=dt.textStrokeWidth;let gi=I;a?(A=B,I==="inner"&&(P===O-1?gi=this.options.reverse?"left":"right":P===0?gi=this.options.reverse?"right":"left":gi="center"),n==="top"?u==="near"||S!==0?it=-J*Z+Z/2:u==="center"?it=-ie.highest.height/2-mt*Z+Z:it=-ie.highest.height+Z/2:u==="near"||S!==0?it=Z/2:u==="center"?it=ie.highest.height/2-mt*Z:it=ie.highest.height-J*Z,b&&(it*=-1),S!==0&&!dt.showLabelBackdrop&&(A+=Z/2*Math.sin(S))):(F=B,it=(1-J)*Z/2);let Nn;if(dt.showLabelBackdrop){const pi=(0,d.E)(dt.backdropPadding),Vi=ie.heights[P],Xe=ie.widths[P];let Hi=it-pi.top,Ke=0-pi.left;switch(Ct){case"middle":Hi-=Vi/2;break;case"bottom":Hi-=Vi;break}switch(I){case"center":Ke-=Xe/2;break;case"right":Ke-=Xe;break;case"inner":P===O-1?Ke-=Xe:P>0&&(Ke-=Xe/2);break}Nn={left:Ke,top:Hi,width:Xe+pi.width,height:Vi+pi.height,color:dt.backdropColor}}D.push({label:L,font:$,textOffset:it,options:{rotation:S,color:_t,strokeColor:ce,strokeWidth:zt,textAlign:gi,textBaseline:Ct,translation:[A,F],backdrop:Nn}})}return D}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-(0,d.t)(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),l=t+o,h=a.widest.width;let u,p;return e==="left"?n?(p=this.right+o,i==="near"?u="left":i==="center"?(u="center",p+=h/2):(u="right",p+=h)):(p=this.right-l,i==="near"?u="right":i==="center"?(u="center",p-=h/2):(u="left",p=this.left)):e==="right"?n?(p=this.left+o,i==="near"?u="right":i==="center"?(u="center",p-=h/2):(u="left",p-=h)):(p=this.left+l,i==="near"?u="left":i==="center"?(u="center",p+=h/2):(u="right",p=this.right)):u="right",{textAlign:u,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const l=(h,u,p)=>{!p.width||!p.color||(i.save(),i.lineWidth=p.width,i.strokeStyle=p.color,i.setLineDash(p.borderDash||[]),i.lineDashOffset=p.borderDashOffset,i.beginPath(),i.moveTo(h.x,h.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const h=n[o];e.drawOnChartArea&&l({x:h.x1,y:h.y1},{x:h.x2,y:h.y2},h),e.drawTicks&&l({x:h.tx1,y:h.ty1},{x:h.tx2,y:h.ty2},{color:h.tickColor,width:h.tickWidth,borderDash:h.tickBorderDash,borderDashOffset:h.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 l=n.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let u,p,b,_;this.isHorizontal()?(u=(0,d.X)(t,this.left,a)-a/2,p=(0,d.X)(t,this.right,l)+l/2,b=_=h):(b=(0,d.X)(t,this.top,a)-a/2,_=(0,d.X)(t,this.bottom,l)+l/2,u=p=h),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(u,b),e.lineTo(p,_),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,n=this._computeLabelArea();n&&(0,d.Y)(i,n);const o=this.getLabelItems(t);for(const a of o){const l=a.options,h=a.font,u=a.label,p=a.textOffset;(0,d.Z)(i,u,0,p,h,l)}n&&(0,d.$)(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=(0,d.a0)(i.font),a=(0,d.E)(i.padding),l=i.align;let h=o.lineHeight/2;e==="bottom"||e==="center"||(0,d.i)(e)?(h+=a.bottom,(0,d.b)(i.text)&&(h+=o.lineHeight*(i.text.length-1))):h+=a.top;const{titleX:u,titleY:p,maxWidth:b,rotation:_}=fs(this,h,e,l);(0,d.Z)(t,i.text,0,0,o,{color:i.color,maxWidth:b,rotation:_,textAlign:Si(l,e,n),textBaseline:"middle",translation:[u,p]})}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,d.v)(t.grid&&t.grid.z,-1),n=(0,d.v)(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ae.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const l=e[o];l[i]===this.id&&(!t||l.type===t)&&n.push(l)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,d.a0)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ei{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;ms(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,gs(t,a,i),this.override&&d.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 d.d[n]&&(delete d.d[n][i],this.override&&delete d.a3[i])}}function gs(s,t,e){const i=(0,d.a4)(Object.create(null),[e?d.d.get(e):{},d.d.get(t),s.defaults]);d.d.set(t,i),s.defaultRoutes&&ps(t,s.defaultRoutes),s.descriptors&&d.d.describe(t,s.descriptors)}function ps(s,t){Object.keys(t).forEach(e=>{const i=e.split("."),n=i.pop(),o=[s].concat(i).join("."),a=t[e].split("."),l=a.pop(),h=a.join(".");d.d.route(o,n,h,l)})}function ms(s){return"id"in s&&"defaults"in s}class nn{constructor(){this.controllers=new ei(st,"datasets",!0),this.elements=new ei(ee,"elements"),this.plugins=new ei(Object,"plugins"),this.scales=new ei(ae,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const o=i||this._getRegistryForType(n);i||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):(0,d.F)(n,a=>{const l=i||this._getRegistryForType(a);this._exec(t,l,a)})})}_exec(t,e,i){const n=(0,d.a5)(t);(0,d.Q)(i["before"+n],[],i),e[t](i),(0,d.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(n===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var oe=new nn;class sn{constructor(){this._init=[]}notify(t,e,i,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const a=o.plugin,l=a[i],h=[e,n,o.options];if((0,d.Q)(l,h,a)===!1&&n.cancelable)return!1}return!0}invalidate(){(0,d.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,d.v)(i.options&&i.options.plugins,{}),o=on(i);return n===!1&&!e?[]:rn(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(o,a)=>o.filter(l=>!a.some(h=>l.plugin.id===h.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function on(s){const t={},e=[],i=Object.keys(oe.plugins.items);for(let o=0;o<i.length;o++)e.push(oe.getPlugin(i[o]));const n=s.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function bs(s,t){return!t&&s===!1?null:s===!0?{}:s}function rn(s,{plugins:t,localIds:e},i,n){const o=[],a=s.getContext();for(const l of t){const h=l.id,u=bs(i[h],n);u!==null&&o.push({plugin:l,options:_s(s.config,{plugin:l,local:e[h]},u,a)})}return o}function _s(s,{plugin:t,local:e},i,n){const o=s.pluginScopeKeys(t),a=s.getOptionScopes(i,o);return e&&t.defaults&&a.push(t.defaults),s.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ii(s,t){const e=d.d.datasets[s]||{};return((t.datasets||{})[s]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function an(s,t){let e=s;return s==="_index_"?e=t:s==="_value_"&&(e=t==="x"?"y":"x"),e}function Ve(s,t){return s===t?"_index_":"_value_"}function ni(s){if(s==="x"||s==="y"||s==="r")return s}function xs(s){if(s==="top"||s==="bottom")return"x";if(s==="left"||s==="right")return"y"}function si(s,...t){if(ni(s))return s;for(const e of t){const i=e.axis||xs(e.position)||s.length>1&&ni(s[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function ln(s,t,e){if(e[t+"AxisID"]===s)return{axis:t}}function Pi(s,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===s||i.yAxisID===s);if(e.length)return ln(s,"x",e[0])||ln(s,"y",e[0])}return{}}function ys(s,t){const e=d.a3[s.type]||{scales:{}},i=t.scales||{},n=ii(s.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const l=i[a];if(!(0,d.i)(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const h=si(a,l,Pi(a,s),d.d.scales[l.type]),u=Ve(h,n),p=e.scales||{};o[a]=(0,d.ab)(Object.create(null),[{axis:h},l,p[h],p[u]])}),s.data.datasets.forEach(a=>{const l=a.type||s.type,h=a.indexAxis||ii(l,t),p=(d.a3[l]||{}).scales||{};Object.keys(p).forEach(b=>{const _=an(b,h),y=a[_+"AxisID"]||_;o[y]=o[y]||Object.create(null),(0,d.ab)(o[y],[{axis:_},i[y],p[b]])})}),Object.keys(o).forEach(a=>{const l=o[a];(0,d.ab)(l,[d.d.scales[l.type],d.d.scale])}),o}function cn(s){const t=s.options||(s.options={});t.plugins=(0,d.v)(t.plugins,{}),t.scales=ys(s,t)}function hn(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function vs(s){return s=s||{},s.data=hn(s.data),cn(s),s}const Di=new Map,oi=new Set;function ri(s,t){let e=Di.get(s);return e||(e=t(),Di.set(s,e),oi.add(e)),e}const He=(s,t,e)=>{const i=(0,d.f)(t,e);i!==void 0&&s.add(i)};class Ms{constructor(t){this._config=vs(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=hn(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(),cn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ri(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ri(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ri(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return ri(`${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),l=a.get(e);if(l)return l;const h=new Set;e.forEach(p=>{t&&(h.add(t),p.forEach(b=>He(h,t,b))),p.forEach(b=>He(h,n,b)),p.forEach(b=>He(h,d.a3[o]||{},b)),p.forEach(b=>He(h,d.d,b)),p.forEach(b=>He(h,d.a6,b))});const u=Array.from(h);return u.length===0&&u.push(Object.create(null)),oi.has(e)&&a.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,d.a3[e]||{},d.d.datasets[e]||{},{type:e},d.d,d.a6]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:l}=dn(this._resolverCache,t,n);let h=a;if(ws(a,e)){o.$shared=!1,i=(0,d.a7)(i)?i():i;const u=this.createResolver(t,i,l);h=(0,d.a8)(a,i,u)}for(const u of e)o[u]=h[u];return o}createResolver(t,e,i=[""],n){const{resolver:o}=dn(this._resolverCache,t,i);return(0,d.i)(e)?(0,d.a8)(o,e,void 0,n):o}}function dn(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));const n=e.join();let o=i.get(n);return o||(o={resolver:(0,d.a9)(t,e),subPrefixes:e.filter(l=>!l.toLowerCase().includes("hover"))},i.set(n,o)),o}const ks=s=>(0,d.i)(s)&&Object.getOwnPropertyNames(s).some(t=>(0,d.a7)(s[t]));function ws(s,t){const{isScriptable:e,isIndexable:i}=(0,d.aa)(s);for(const n of t){const o=e(n),a=i(n),l=(a||o)&&s[n];if(o&&((0,d.a7)(l)||ks(l))||a&&(0,d.b)(l))return!0}return!1}var Ss="4.4.2";const Ps=["top","bottom","left","right","chartArea"];function un(s,t){return s==="top"||s==="bottom"||Ps.indexOf(s)===-1&&t==="x"}function fn(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function gn(s){const t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),(0,d.Q)(e&&e.onComplete,[s],t)}function Ds(s){const t=s.chart,e=t.options.animation;(0,d.Q)(e&&e.onProgress,[s],t)}function pn(s){return(0,d.M)()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const Te={},Oi=s=>{const t=pn(s);return Object.values(Te).filter(e=>e.canvas===t).pop()};function Os(s,t,e){const i=Object.keys(s);for(const n of i){const o=+n;if(o>=t){const a=s[n];delete s[n],(e>0||o>t)&&(s[o+e]=a)}}}function Cs(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}function ai(s,t,e){return s.options.clip?s[e]:t[e]}function As(s,t){const{xScale:e,yScale:i}=s;return e&&i?{left:ai(e,t,"left"),right:ai(e,t,"right"),top:ai(i,t,"top"),bottom:ai(i,t,"bottom")}:t}class fe{static register(...t){oe.add(...t),Ci()}static unregister(...t){oe.remove(...t),Ci()}constructor(t,e){const i=this.config=new Ms(e),n=pn(t),o=Oi(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 a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||os(n)),this.platform.updateConfig(i);const l=this.platform.acquireContext(n,a.aspectRatio),h=l&&l.canvas,u=h&&h.height,p=h&&h.width;if(this.id=(0,d.ac)(),this.ctx=l,this.canvas=h,this.width=p,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new sn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,d.ad)(b=>this.update(b),a.resizeDelay||0),this._dataChanges=[],Te[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}X.listen(this,"complete",gn),X.listen(this,"progress",Ds),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return(0,d.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 oe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,d.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,d.af)(this.canvas,this.ctx),this}stop(){return X.stop(this),this}resize(t,e){X.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),l=i.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,(0,d.ae)(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),(0,d.Q)(i.onResize,[this,a],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};(0,d.F)(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((a,l)=>(a[l]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const l=e[a],h=si(a,l),u=h==="r",p=h==="x";return{options:l,dposition:u?"chartArea":p?"bottom":"left",dtype:u?"radialLinear":p?"category":"linear"}}))),(0,d.F)(o,a=>{const l=a.options,h=l.id,u=si(h,l),p=(0,d.v)(l.type,a.dtype);(l.position===void 0||un(l.position,u)!==un(a.dposition))&&(l.position=a.dposition),n[h]=!0;let b=null;if(h in i&&i[h].type===p)b=i[h];else{const _=oe.getScale(p);b=new _({id:h,type:p,ctx:this.ctx,chart:this}),i[b.id]=b}b.init(l,t)}),(0,d.F)(n,(a,l)=>{a||delete i[l]}),(0,d.F)(i,a=>{gt.configure(this,a,a.options),gt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,o)=>n.index-o.index),i>e){for(let n=e;n<i;++n)this._destroyDatasetMeta(n);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(fn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const o=e[i];let a=this.getDatasetMeta(i);const l=o.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=l,a.indexAxis=o.indexAxis||ii(l,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const h=oe.getController(l),{datasetElementType:u,dataElementType:p}=d.d.datasets[l];Object.assign(h,{dataElementType:oe.getElement(p),datasetElementType:u&&oe.getElement(u)}),a.controller=new h(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){(0,d.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(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,p=this.data.datasets.length;u<p;u++){const{controller:b}=this.getDatasetMeta(u),_=!n&&o.indexOf(b)===-1;b.buildOrUpdateElements(_),a=Math.max(+b.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||(0,d.F)(o,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(fn("z","_idx"));const{_active:l,_lastEvent:h}=this;h?this._eventHandler(h,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){(0,d.F)(this.scales,t=>{gt.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,d.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:o}of e){const a=i==="_removeElements"?-o:o;Os(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,l)=>l+","+a.splice(1).join(","))),n=i(0);for(let o=1;o<e;o++)if(!(0,d.ag)(n,i(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;gt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,d.F)(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,(0,d.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};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(X.has(this)?this.attached&&!X.running(this)&&X.start(this):(this.draw(),gn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:n}=this._resizeBeforeDraw;this._resize(i,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)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,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)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=As(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&(0,d.Y)(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&(0,d.$)(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return(0,d.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Kn.modes[e];return typeof o=="function"?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(o=>o&&o._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,d.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 typeof i.hidden=="boolean"?!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,d.h)(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(l=>l.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(),X.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,d.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Te[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=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,l)=>{o.offsetX=a,o.offsetY=l,this._eventHandler(o)};(0,d.F)(this.options.events,o=>i(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(h,u)=>{e.addEventListener(this,h,u),t[h]=u},n=(h,u)=>{t[h]&&(e.removeEventListener(this,h,u),delete t[h])},o=(h,u)=>{this.canvas&&this.resize(h,u)};let a;const l=()=>{n("attach",l),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",l)},e.isAttached(this.canvas)?l():a()}unbindEvents(){(0,d.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,d.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 o,a,l,h;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),l=0,h=t.length;l<h;++l){a=t[l];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:a})=>{const l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[a],index:a}});!(0,d.ah)(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(h,u)=>h.filter(p=>!u.some(b=>p.datasetIndex===b.datasetIndex&&p.index===b.index)),a=o(e,t),l=i?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),l.length&&n.mode&&this.updateHoverStyle(l,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,a=e,l=this._getActiveElements(t,n,i,a),h=(0,d.ai)(t),u=Cs(t,this._lastEvent,i,h);i&&(this._lastEvent=null,(0,d.Q)(o.onHover,[t,l,this],this),h&&(0,d.Q)(o.onClick,[t,l,this],this));const p=!(0,d.ah)(l,n);return(p||e)&&(this._active=l,this._updateHoverStyles(l,n,e)),this._lastEvent=u,p}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}R(fe,"defaults",d.d),R(fe,"instances",Te),R(fe,"overrides",d.a3),R(fe,"registry",oe),R(fe,"version",Ss),R(fe,"getChart",Oi);function Ci(){return(0,d.F)(fe.instances,s=>s._plugins.invalidate())}function Ai(s,t,e){const{startAngle:i,pixelMargin:n,x:o,y:a,outerRadius:l,innerRadius:h}=t;let u=n/l;s.beginPath(),s.arc(o,a,l,i-u,e+u),h>n?(u=n/h,s.arc(o,a,h,e+u,i-u,!0)):s.arc(o,a,n,e+d.H,i-d.H),s.closePath(),s.clip()}function Ne(s){return(0,d.ak)(s,["outerStart","outerEnd","innerStart","innerEnd"])}function mn(s,t,e,i){const n=Ne(s.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),l=h=>{const u=(e-Math.min(o,h))*i/2;return(0,d.S)(h,0,Math.min(o,u))};return{outerStart:l(n.outerStart),outerEnd:l(n.outerEnd),innerStart:(0,d.S)(n.innerStart,0,a),innerEnd:(0,d.S)(n.innerEnd,0,a)}}function Le(s,t,e,i){return{x:e+s*Math.cos(t),y:i+s*Math.sin(t)}}function Ee(s,t,e,i,n,o){const{x:a,y:l,startAngle:h,pixelMargin:u,innerRadius:p}=t,b=Math.max(t.outerRadius+i+e-u,0),_=p>0?p+i+e+u:0;let y=0;const M=n-h;if(i){const dt=p>0?p-i:0,mt=b>0?b-i:0,_t=(dt+mt)/2,ce=_t!==0?M*_t/(_t+i):M;y=(M-ce)/2}const S=Math.max(.001,M*b-e/d.P)/b,D=(M-S)/2,P=h+D+y,O=n-D-y,{outerStart:E,outerEnd:L,innerStart:A,innerEnd:F}=mn(t,_,b,O-P),I=b-E,B=b-L,$=P+E/I,Z=O-L/B,J=_+A,it=_+F,Ct=P+A/J,ie=O-F/it;if(s.beginPath(),o){const dt=($+Z)/2;if(s.arc(a,l,b,$,dt),s.arc(a,l,b,dt,Z),L>0){const zt=Le(B,Z,a,l);s.arc(zt.x,zt.y,L,Z,O+d.H)}const mt=Le(it,O,a,l);if(s.lineTo(mt.x,mt.y),F>0){const zt=Le(it,ie,a,l);s.arc(zt.x,zt.y,F,O+d.H,ie+Math.PI)}const _t=(O-F/_+(P+A/_))/2;if(s.arc(a,l,_,O-F/_,_t,!0),s.arc(a,l,_,_t,P+A/_,!0),A>0){const zt=Le(J,Ct,a,l);s.arc(zt.x,zt.y,A,Ct+Math.PI,P-d.H)}const ce=Le(I,P,a,l);if(s.lineTo(ce.x,ce.y),E>0){const zt=Le(I,$,a,l);s.arc(zt.x,zt.y,E,P-d.H,$)}}else{s.moveTo(a,l);const dt=Math.cos($)*b+a,mt=Math.sin($)*b+l;s.lineTo(dt,mt);const _t=Math.cos(Z)*b+a,ce=Math.sin(Z)*b+l;s.lineTo(_t,ce)}s.closePath()}function bn(s,t,e,i,n){const{fullCircles:o,startAngle:a,circumference:l}=t;let h=t.endAngle;if(o){Ee(s,t,e,i,h,n);for(let u=0;u<o;++u)s.fill();isNaN(l)||(h=a+(l%d.T||d.T))}return Ee(s,t,e,i,h,n),s.fill(),h}function Ts(s,t,e,i,n){const{fullCircles:o,startAngle:a,circumference:l,options:h}=t,{borderWidth:u,borderJoinStyle:p,borderDash:b,borderDashOffset:_}=h,y=h.borderAlign==="inner";if(!u)return;s.setLineDash(b||[]),s.lineDashOffset=_,y?(s.lineWidth=u*2,s.lineJoin=p||"round"):(s.lineWidth=u,s.lineJoin=p||"bevel");let M=t.endAngle;if(o){Ee(s,t,e,i,M,n);for(let S=0;S<o;++S)s.stroke();isNaN(l)||(M=a+(l%d.T||d.T))}y&&Ai(s,t,M),o||(Ee(s,t,e,i,M,n),s.stroke())}class Ye extends ee{constructor(e){super();R(this,"circumference");R(this,"endAngle");R(this,"fullCircles");R(this,"innerRadius");R(this,"outerRadius");R(this,"pixelMargin");R(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,i,n){const o=this.getProps(["x","y"],n),{angle:a,distance:l}=(0,d.D)(o,{x:e,y:i}),{startAngle:h,endAngle:u,innerRadius:p,outerRadius:b,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),y=(this.options.spacing+this.options.borderWidth)/2,S=(0,d.v)(_,u-h)>=d.T||(0,d.p)(a,h,u),D=(0,d.aj)(l,p+y,b+y);return S&&D}getCenterPoint(e){const{x:i,y:n,startAngle:o,endAngle:a,innerRadius:l,outerRadius:h}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:p}=this.options,b=(o+a)/2,_=(l+h+p+u)/2;return{x:i+Math.cos(b)*_,y:n+Math.sin(b)*_}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:n}=this,o=(i.offset||0)/4,a=(i.spacing||0)/2,l=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=n>d.T?Math.floor(n/d.T):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const h=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(h)*o,Math.sin(h)*o);const u=1-Math.sin(Math.min(d.P,n||0)),p=o*u;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,bn(e,this,p,a,l),Ts(e,this,p,a,l),e.restore()}}R(Ye,"id","arc"),R(Ye,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),R(Ye,"defaultRoutes",{backgroundColor:"backgroundColor"}),R(Ye,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function _n(s,t,e=t){s.lineCap=(0,d.v)(e.borderCapStyle,t.borderCapStyle),s.setLineDash((0,d.v)(e.borderDash,t.borderDash)),s.lineDashOffset=(0,d.v)(e.borderDashOffset,t.borderDashOffset),s.lineJoin=(0,d.v)(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=(0,d.v)(e.borderWidth,t.borderWidth),s.strokeStyle=(0,d.v)(e.borderColor,t.borderColor)}function xn(s,t,e){s.lineTo(e.x,e.y)}function Ls(s){return s.stepped?d.ar:s.tension||s.cubicInterpolationMode==="monotone"?d.as:xn}function yn(s,t,e={}){const i=s.length,{start:n=0,end:o=i-1}=e,{start:a,end:l}=t,h=Math.max(n,a),u=Math.min(o,l),p=n<a&&o<a||n>l&&o>l;return{count:i,start:h,loop:t.loop,ilen:u<h&&!p?i+u-h:u-h}}function Ti(s,t,e,i){const{points:n,options:o}=t,{count:a,start:l,loop:h,ilen:u}=yn(n,e,i),p=Ls(o);let{move:b=!0,reverse:_}=i||{},y,M,S;for(y=0;y<=u;++y)M=n[(l+(_?u-y:y))%a],!M.skip&&(b?(s.moveTo(M.x,M.y),b=!1):p(s,S,M,_,o.stepped),S=M);return h&&(M=n[(l+(_?u:0))%a],p(s,S,M,_,o.stepped)),!!h}function vn(s,t,e,i){const n=t.points,{count:o,start:a,ilen:l}=yn(n,e,i),{move:h=!0,reverse:u}=i||{};let p=0,b=0,_,y,M,S,D,P;const O=L=>(a+(u?l-L:L))%o,E=()=>{S!==D&&(s.lineTo(p,D),s.lineTo(p,S),s.lineTo(p,P))};for(h&&(y=n[O(0)],s.moveTo(y.x,y.y)),_=0;_<=l;++_){if(y=n[O(_)],y.skip)continue;const L=y.x,A=y.y,F=L|0;F===M?(A<S?S=A:A>D&&(D=A),p=(b*p+L)/++b):(E(),s.lineTo(L,A),M=F,b=0,S=D=A),P=A}E()}function Li(s){const t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?vn:Ti}function Es(s){return s.stepped?d.ao:s.tension||s.cubicInterpolationMode==="monotone"?d.ap:d.aq}function Mn(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),_n(s,t.options),s.stroke(n)}function kn(s,t,e,i){const{segments:n,options:o}=t,a=Li(t);for(const l of n)_n(s,o,l.style),s.beginPath(),a(s,t,l,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}const Rs=typeof Path2D=="function";function Fs(s,t,e,i){Rs&&!t.options.segment?Mn(s,t,e,i):kn(s,t,e,i)}class le 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||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;(0,d.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,d.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,d.an)(this,{property:e,start:n,end:n});if(!a.length)return;const l=[],h=Es(i);let u,p;for(u=0,p=a.length;u<p;++u){const{start:b,end:_}=a[u],y=o[b],M=o[_];if(y===M){l.push(y);continue}const S=Math.abs((n-y[e])/(M[e]-y[e])),D=h(y,M,S,i.stepped);D[e]=t[e],l.push(D)}return l.length===1?l[0]:l}pathSegment(t,e,i){return Li(this)(t,this,e,i)}path(t,e,i){const n=this.segments,o=Li(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const l of n)a&=o(t,this,l,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Fs(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}R(le,"id","line"),R(le,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),R(le,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),R(le,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ve(s,t,e,i){const n=s.options,{[e]:o}=s.getProps([e],i);return Math.abs(t-o)<n.radius+n.hitRadius}class Re extends ee{constructor(e){super();R(this,"parsed");R(this,"skip");R(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,n){const o=this.options,{x:a,y:l}=this.getProps(["x","y"],n);return Math.pow(e-a,2)+Math.pow(i-l,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return ve(this,e,"x",i)}inYRange(e,i){return ve(this,e,"y",i)}getCenterPoint(e){const{x:i,y:n}=this.getProps(["x","y"],e);return{x:i,y:n}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const n=i&&e.borderWidth||0;return(i+n)*2}draw(e,i){const n=this.options;this.skip||n.radius<.1||!(0,d.C)(this,i,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,(0,d.at)(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}R(Re,"id","point"),R(Re,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),R(Re,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function wn(s,t){const{x:e,y:i,base:n,width:o,height:a}=s.getProps(["x","y","base","width","height"],t);let l,h,u,p,b;return s.horizontal?(b=a/2,l=Math.min(e,n),h=Math.max(e,n),u=i-b,p=i+b):(b=o/2,l=e-b,h=e+b,u=Math.min(i,n),p=Math.max(i,n)),{left:l,top:u,right:h,bottom:p}}function ge(s,t,e,i){return s?0:(0,d.S)(t,e,i)}function Is(s,t,e){const i=s.options.borderWidth,n=s.borderSkipped,o=(0,d.av)(i);return{t:ge(n.top,o.top,0,e),r:ge(n.right,o.right,0,t),b:ge(n.bottom,o.bottom,0,e),l:ge(n.left,o.left,0,t)}}function zs(s,t,e){const{enableBorderRadius:i}=s.getProps(["enableBorderRadius"]),n=s.options.borderRadius,o=(0,d.aw)(n),a=Math.min(t,e),l=s.borderSkipped,h=i||(0,d.i)(n);return{topLeft:ge(!h||l.top||l.left,o.topLeft,0,a),topRight:ge(!h||l.top||l.right,o.topRight,0,a),bottomLeft:ge(!h||l.bottom||l.left,o.bottomLeft,0,a),bottomRight:ge(!h||l.bottom||l.right,o.bottomRight,0,a)}}function li(s){const t=wn(s),e=t.right-t.left,i=t.bottom-t.top,n=Is(s,e/2,i/2),o=zs(s,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Ei(s,t,e,i){const n=t===null,o=e===null,l=s&&!(n&&o)&&wn(s,i);return l&&(n||(0,d.aj)(t,l.left,l.right))&&(o||(0,d.aj)(e,l.top,l.bottom))}function Bs(s){return s.topLeft||s.topRight||s.bottomLeft||s.bottomRight}function Sn(s,t){s.rect(t.x,t.y,t.w,t.h)}function ci(s,t,e={}){const i=s.x!==e.x?-t:0,n=s.y!==e.y?-t:0,o=(s.x+s.w!==e.x+e.w?t:0)-i,a=(s.y+s.h!==e.y+e.h?t:0)-n;return{x:s.x+i,y:s.y+n,w:s.w+o,h:s.h+a,radius:s.radius}}class pe 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.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:o,outer:a}=li(this),l=Bs(a.radius)?d.au:Sn;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),l(t,ci(a,e,o)),t.clip(),l(t,ci(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),l(t,ci(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Ei(this,t,e,i)}inXRange(t,e){return Ei(this,t,null,e)}inYRange(t,e){return Ei(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}R(pe,"id","bar"),R(pe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),R(pe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var hi=Object.freeze({__proto__:null,ArcElement:Ye,BarElement:pe,LineElement:le,PointElement:Re});const Ri=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Pn=Ri.map(s=>s.replace("rgb(","rgba(").replace(")",", 0.5)"));function me(s){return Ri[s%Ri.length]}function Dn(s){return Pn[s%Pn.length]}function Ws(s,t){return s.borderColor=me(t),s.backgroundColor=Dn(t),++t}function js(s,t){return s.backgroundColor=s.data.map(()=>me(t++)),t}function Vs(s,t){return s.backgroundColor=s.data.map(()=>Dn(t++)),t}function di(s){let t=0;return(e,i)=>{const n=s.getDatasetMeta(i).controller;n instanceof Zt?t=js(e,t):n instanceof re?t=Vs(e,t):n&&(t=Ws(e,t))}}function On(s){let t;for(t in s)if(s[t].borderColor||s[t].backgroundColor)return!0;return!1}function Hs(s){return s&&(s.borderColor||s.backgroundColor)}var Ns={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(s,t,e){if(!e.enabled)return;const{data:{datasets:i},options:n}=s.config,{elements:o}=n;if(!e.forceOverride&&(On(i)||Hs(n)||o&&On(o)))return;const a=di(s);i.forEach(a)}};function Ys(s,t,e,i,n){const o=n.samples||i;if(o>=e)return s.slice(t,t+e);const a=[],l=(e-2)/(o-2);let h=0;const u=t+e-1;let p=t,b,_,y,M,S;for(a[h++]=s[p],b=0;b<o-2;b++){let D=0,P=0,O;const E=Math.floor((b+1)*l)+1+t,L=Math.min(Math.floor((b+2)*l)+1,e)+t,A=L-E;for(O=E;O<L;O++)D+=s[O].x,P+=s[O].y;D/=A,P/=A;const F=Math.floor(b*l)+1+t,I=Math.min(Math.floor((b+1)*l)+1,e)+t,{x:B,y:$}=s[p];for(y=M=-1,O=F;O<I;O++)M=.5*Math.abs((B-D)*(s[O].y-$)-(B-s[O].x)*(P-$)),M>y&&(y=M,_=s[O],S=O);a[h++]=_,p=S}return a[h++]=s[u],a}function Me(s,t,e,i){let n=0,o=0,a,l,h,u,p,b,_,y,M,S;const D=[],P=t+e-1,O=s[t].x,L=s[P].x-O;for(a=t;a<t+e;++a){l=s[a],h=(l.x-O)/L*i,u=l.y;const A=h|0;if(A===p)u<M?(M=u,b=a):u>S&&(S=u,_=a),n=(o*n+l.x)/++o;else{const F=a-1;if(!(0,d.k)(b)&&!(0,d.k)(_)){const I=Math.min(b,_),B=Math.max(b,_);I!==y&&I!==F&&D.push({...s[I],x:n}),B!==y&&B!==F&&D.push({...s[B],x:n})}a>0&&F!==y&&D.push(s[F]),D.push(l),p=A,o=0,M=S=u,b=_=y=a}}return D}function Cn(s){if(s._decimated){const t=s._data;delete s._decimated,delete s._data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function An(s){s.data.datasets.forEach(t=>{Cn(t)})}function $s(s,t){const e=t.length;let i=0,n;const{iScale:o}=s,{min:a,max:l,minDefined:h,maxDefined:u}=o.getUserBounds();return h&&(i=(0,d.S)((0,d.B)(t,o.axis,a).lo,0,e-1)),u?n=(0,d.S)((0,d.B)(t,o.axis,l).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var Us={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(s,t,e)=>{if(!e.enabled){An(s);return}const i=s.width;s.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:l}=n,h=s.getDatasetMeta(o),u=a||n.data;if((0,d.a)([l,s.options.indexAxis])==="y"||!h.controller.supportsDecimation)return;const p=s.scales[h.xAxisID];if(p.type!=="linear"&&p.type!=="time"||s.options.parsing)return;let{start:b,count:_}=$s(h,u);const y=e.threshold||4*i;if(_<=y){Cn(n);return}(0,d.k)(a)&&(n._data=u,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(S){this._data=S}}));let M;switch(e.algorithm){case"lttb":M=Ys(u,b,_,i,e);break;case"min-max":M=Me(u,b,_,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=M})},destroy(s){An(s)}};function Xs(s,t,e){const i=s.segments,n=s.points,o=t.points,a=[];for(const l of i){let{start:h,end:u}=l;u=ui(h,u,n);const p=Fi(e,n[h],n[u],l.loop);if(!t.segments){a.push({source:l,target:p,start:n[h],end:n[u]});continue}const b=(0,d.an)(t,p);for(const _ of b){const y=Fi(e,o[_.start],o[_.end],_.loop),M=(0,d.ax)(l,n,y);for(const S of M)a.push({source:S,target:_,start:{[e]:Ii(p,y,"start",Math.max)},end:{[e]:Ii(p,y,"end",Math.min)}})}}return a}function Fi(s,t,e,i){if(i)return;let n=t[s],o=e[s];return s==="angle"&&(n=(0,d.ay)(n),o=(0,d.ay)(o)),{property:s,start:n,end:o}}function Ks(s,t){const{x:e=null,y:i=null}=s||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:l})=>{l=ui(a,l,n);const h=n[a],u=n[l];i!==null?(o.push({x:h.x,y:i}),o.push({x:u.x,y:i})):e!==null&&(o.push({x:e,y:h.y}),o.push({x:e,y:u.y}))}),o}function ui(s,t,e){for(;t>s;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Ii(s,t,e,i){return s&&t?i(s[e],t[e]):s?s[e]:t?t[e]:0}function Tn(s,t){let e=[],i=!1;return(0,d.b)(s)?(i=!0,e=s):e=Ks(s,t),e.length?new le({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function zi(s){return s&&s.fill!==!1}function Gs(s,t,e){let n=s[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!(0,d.g)(n))return n;if(a=s[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Qs(s,t,e){const i=Js(s);if((0,d.i)(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return(0,d.g)(n)&&Math.floor(n)===n?qs(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function qs(s,t,e,i){return(s==="-"||s==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function Zs(s,t){let e=null;return s==="start"?e=t.bottom:s==="end"?e=t.top:(0,d.i)(s)?e=t.getPixelForValue(s.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ln(s,t,e){let i;return s==="start"?i=e:s==="end"?i=t.options.reverse?t.min:t.max:(0,d.i)(s)?i=s.value:i=t.getBaseValue(),i}function Js(s){const t=s.options,e=t.fill;let i=(0,d.v)(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function En(s){const{scale:t,index:e,line:i}=s,n=[],o=i.segments,a=i.points,l=to(t,e);l.push(Tn({x:null,y:t.bottom},i));for(let h=0;h<o.length;h++){const u=o[h];for(let p=u.start;p<=u.end;p++)r(n,a[p],l)}return new le({points:n,options:{}})}function to(s,t){const e=[],i=s.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const o=i[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function r(s,t,e){const i=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:l,point:h}=c(o,t,"x");if(!(!h||a&&l)){if(a)i.unshift(h);else if(s.push(h),!l)break}}s.push(...i)}function c(s,t,e){const i=s.interpolate(t,e);if(!i)return{};const n=i[e],o=s.segments,a=s.points;let l=!1,h=!1;for(let u=0;u<o.length;u++){const p=o[u],b=a[p.start][e],_=a[p.end][e];if((0,d.aj)(n,b,_)){l=n===b,h=n===_;break}}return{first:l,last:h,point:i}}class f{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:d.T},t.arc(n,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function g(s){const{chart:t,fill:e,line:i}=s;if((0,d.g)(e))return m(t,e);if(e==="stack")return En(s);if(e==="shape")return!0;const n=x(s);return n instanceof f?n:Tn(n,i)}function m(s,t){const e=s.getDatasetMeta(t);return e&&s.isDatasetVisible(t)?e.dataset:null}function x(s){return(s.scale||{}).getPointPositionForValue?k(s):v(s)}function v(s){const{scale:t={},fill:e}=s,i=Zs(e,t);if((0,d.g)(i)){const n=t.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function k(s){const{scale:t,fill:e}=s,i=t.options,n=t.getLabels().length,o=i.reverse?t.max:t.min,a=Ln(e,t,o),l=[];if(i.grid.circular){const h=t.getPointPositionForValue(0,o);return new f({x:h.x,y:h.y,radius:t.getDistanceFromCenterForValue(a)})}for(let h=0;h<n;++h)l.push(t.getPointPositionForValue(h,a));return l}function w(s,t,e){const i=g(t),{line:n,scale:o,axis:a}=t,l=n.options,h=l.fill,u=l.backgroundColor,{above:p=u,below:b=u}=h||{};i&&n.points.length&&((0,d.Y)(s,e),C(s,{line:n,target:i,above:p,below:b,area:e,scale:o,axis:a}),(0,d.$)(s))}function C(s,t){const{line:e,target:i,above:n,below:o,area:a,scale:l}=t,h=e._loop?"angle":t.axis;s.save(),h==="x"&&o!==n&&(T(s,i,a.top),H(s,{line:e,target:i,color:n,scale:l,property:h}),s.restore(),s.save(),T(s,i,a.bottom)),H(s,{line:e,target:i,color:o,scale:l,property:h}),s.restore()}function T(s,t,e){const{segments:i,points:n}=t;let o=!0,a=!1;s.beginPath();for(const l of i){const{start:h,end:u}=l,p=n[h],b=n[ui(h,u,n)];o?(s.moveTo(p.x,p.y),o=!1):(s.lineTo(p.x,e),s.lineTo(p.x,p.y)),a=!!t.pathSegment(s,l,{move:a}),a?s.closePath():s.lineTo(b.x,e)}s.lineTo(t.first().x,e),s.closePath(),s.clip()}function H(s,t){const{line:e,target:i,property:n,color:o,scale:a}=t,l=Xs(e,i,n);for(const{source:h,target:u,start:p,end:b}of l){const{style:{backgroundColor:_=o}={}}=h,y=i!==!0;s.save(),s.fillStyle=_,Y(s,a,y&&Fi(n,p,b)),s.beginPath();const M=!!e.pathSegment(s,h);let S;if(y){M?s.closePath():rt(s,i,b,n);const D=!!i.pathSegment(s,u,{move:M,reverse:!0});S=M&&D,S||rt(s,i,p,n)}s.closePath(),s.fill(S?"evenodd":"nonzero"),s.restore()}}function Y(s,t,e){const{top:i,bottom:n}=t.chart.chartArea,{property:o,start:a,end:l}=e||{};o==="x"&&(s.beginPath(),s.rect(a,i,l-a,n-i),s.clip())}function rt(s,t,e,i){const n=t.interpolate(e,i);n&&s.lineTo(n.x,n.y)}var pt={id:"filler",afterDatasetsUpdate(s,t,e){const i=(s.data.datasets||[]).length,n=[];let o,a,l,h;for(a=0;a<i;++a)o=s.getDatasetMeta(a),l=o.dataset,h=null,l&&l.options&&l instanceof le&&(h={visible:s.isDatasetVisible(a),index:a,fill:Qs(l,a,i),chart:s,axis:o.controller.options.indexAxis,scale:o.vScale,line:l}),o.$filler=h,n.push(h);for(a=0;a<i;++a)h=n[a],!(!h||h.fill===!1)&&(h.fill=Gs(n,a,e.propagate))},beforeDraw(s,t,e){const i=e.drawTime==="beforeDraw",n=s.getSortedVisibleDatasetMetas(),o=s.chartArea;for(let a=n.length-1;a>=0;--a){const l=n[a].$filler;l&&(l.line.updateControlPoints(o,l.axis),i&&l.fill&&w(s.ctx,l,o))}},beforeDatasetsDraw(s,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=s.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const o=i[n].$filler;zi(o)&&w(s.ctx,o,s.chartArea)}},beforeDatasetDraw(s,t,e){const i=t.meta.$filler;!zi(i)||e.drawTime!=="beforeDatasetDraw"||w(s.ctx,i,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const U=(s,t)=>{let{boxHeight:e=t,boxWidth:i=t}=s;return s.usePointStyle&&(e=Math.min(e,t),i=s.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},V=(s,t)=>s!==null&&t!==null&&s.datasetIndex===t.datasetIndex&&s.index===t.index;class Ot 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,d.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=(0,d.a0)(i.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:h}=U(i,o);let u,p;e.font=n.string,this.isHorizontal()?(u=this.maxWidth,p=this._fitRows(a,o,l,h)+10):(p=this.maxHeight,u=this._fitCols(a,n,l,h)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:a,options:{labels:{padding:l}}}=this,h=this.legendHitBoxes=[],u=this.lineWidths=[0],p=n+l;let b=t;o.textAlign="left",o.textBaseline="middle";let _=-1,y=-p;return this.legendItems.forEach((M,S)=>{const D=i+e/2+o.measureText(M.text).width;(S===0||u[u.length-1]+D+2*l>a)&&(b+=p,u[u.length-(S>0?0:1)]=0,y+=p,_++),h[S]={left:0,top:y,row:_,width:D,height:n},u[u.length-1]+=D+l}),b}_fitCols(t,e,i,n){const{ctx:o,maxHeight:a,options:{labels:{padding:l}}}=this,h=this.legendHitBoxes=[],u=this.columnSizes=[],p=a-t;let b=l,_=0,y=0,M=0,S=0;return this.legendItems.forEach((D,P)=>{const{itemWidth:O,itemHeight:E}=Fe(i,e,o,D,n);P>0&&y+E+2*l>p&&(b+=_+l,u.push({width:_,height:y}),M+=_+l,S++,_=y=0),h[P]={left:M,top:y,col:S,width:O,height:E},_=Math.max(_,O),y+=E+l}),b+=_,u.push({width:_,height:y}),b}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,a=(0,d.az)(o,this.left,this.width);if(this.isHorizontal()){let l=0,h=(0,d.a2)(i,this.left+n,this.right-this.lineWidths[l]);for(const u of e)l!==u.row&&(l=u.row,h=(0,d.a2)(i,this.left+n,this.right-this.lineWidths[l])),u.top+=this.top+t+n,u.left=a.leftForLtr(a.x(h),u.width),h+=u.width+n}else{let l=0,h=(0,d.a2)(i,this.top+t+n,this.bottom-this.columnSizes[l].height);for(const u of e)u.col!==l&&(l=u.col,h=(0,d.a2)(i,this.top+t+n,this.bottom-this.columnSizes[l].height)),u.top=h,u.left+=this.left+n,u.left=a.leftForLtr(a.x(u.left),u.width),h+=u.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;(0,d.Y)(t,this),this._draw(),(0,d.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:a}=t,l=d.d.color,h=(0,d.az)(t.rtl,this.left,this.width),u=(0,d.a0)(a.font),{padding:p}=a,b=u.size,_=b/2;let y;this.drawTitle(),n.textAlign=h.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=u.string;const{boxWidth:M,boxHeight:S,itemHeight:D}=U(a,b),P=function(F,I,B){if(isNaN(M)||M<=0||isNaN(S)||S<0)return;n.save();const $=(0,d.v)(B.lineWidth,1);if(n.fillStyle=(0,d.v)(B.fillStyle,l),n.lineCap=(0,d.v)(B.lineCap,"butt"),n.lineDashOffset=(0,d.v)(B.lineDashOffset,0),n.lineJoin=(0,d.v)(B.lineJoin,"miter"),n.lineWidth=$,n.strokeStyle=(0,d.v)(B.strokeStyle,l),n.setLineDash((0,d.v)(B.lineDash,[])),a.usePointStyle){const Z={radius:S*Math.SQRT2/2,pointStyle:B.pointStyle,rotation:B.rotation,borderWidth:$},J=h.xPlus(F,M/2),it=I+_;(0,d.aD)(n,Z,J,it,a.pointStyleWidth&&M)}else{const Z=I+Math.max((b-S)/2,0),J=h.leftForLtr(F,M),it=(0,d.aw)(B.borderRadius);n.beginPath(),Object.values(it).some(Ct=>Ct!==0)?(0,d.au)(n,{x:J,y:Z,w:M,h:S,radius:it}):n.rect(J,Z,M,S),n.fill(),$!==0&&n.stroke()}n.restore()},O=function(F,I,B){(0,d.Z)(n,B.text,F,I+D/2,u,{strikethrough:B.hidden,textAlign:h.textAlign(B.textAlign)})},E=this.isHorizontal(),L=this._computeTitleHeight();E?y={x:(0,d.a2)(o,this.left+p,this.right-i[0]),y:this.top+p+L,line:0}:y={x:this.left+p,y:(0,d.a2)(o,this.top+L+p,this.bottom-e[0].height),line:0},(0,d.aA)(this.ctx,t.textDirection);const A=D+p;this.legendItems.forEach((F,I)=>{n.strokeStyle=F.fontColor,n.fillStyle=F.fontColor;const B=n.measureText(F.text).width,$=h.textAlign(F.textAlign||(F.textAlign=a.textAlign)),Z=M+_+B;let J=y.x,it=y.y;h.setWidth(this.width),E?I>0&&J+Z+p>this.right&&(it=y.y+=A,y.line++,J=y.x=(0,d.a2)(o,this.left+p,this.right-i[y.line])):I>0&&it+A>this.bottom&&(J=y.x=J+e[y.line].width+p,y.line++,it=y.y=(0,d.a2)(o,this.top+L+p,this.bottom-e[y.line].height));const Ct=h.x(J);if(P(Ct,it,F),J=(0,d.aB)($,J+M+_,E?J+Z:this.right,t.rtl),O(h.x(J),it,F),E)y.x+=Z+p;else if(typeof F.text!="string"){const ie=u.lineHeight;y.y+=Rn(F,ie)+p}else y.y+=A}),(0,d.aC)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=(0,d.a0)(e.font),n=(0,d.E)(e.padding);if(!e.display)return;const o=(0,d.az)(t.rtl,this.left,this.width),a=this.ctx,l=e.position,h=i.size/2,u=n.top+h;let p,b=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),p=this.top+u,b=(0,d.a2)(t.align,b,this.right-_);else{const M=this.columnSizes.reduce((S,D)=>Math.max(S,D.height),0);p=u+(0,d.a2)(t.align,this.top,this.bottom-M-t.labels.padding-this._computeTitleHeight())}const y=(0,d.a2)(l,b,b+_);a.textAlign=o.textAlign((0,d.a1)(l)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,(0,d.Z)(a,e.text,y,p,i)}_computeTitleHeight(){const t=this.options.title,e=(0,d.a0)(t.font),i=(0,d.E)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if((0,d.aj)(t,this.left,this.right)&&(0,d.aj)(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],(0,d.aj)(t,n.left,n.left+n.width)&&(0,d.aj)(e,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!io(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=V(n,i);n&&!o&&(0,d.Q)(e.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!o&&(0,d.Q)(e.onHover,[t,i,this],this)}else i&&(0,d.Q)(e.onClick,[t,i,this],this)}}function Fe(s,t,e,i,n){const o=$e(i,s,t,e),a=eo(n,i,t.lineHeight);return{itemWidth:o,itemHeight:a}}function $e(s,t,e,i){let n=s.text;return n&&typeof n!="string"&&(n=n.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+i.measureText(n).width}function eo(s,t,e){let i=s;return typeof t.text!="string"&&(i=Rn(t,e)),i}function Rn(s,t){const e=s.text?s.text.length:0;return t*e}function io(s,t){return!!((s==="mousemove"||s==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(s==="click"||s==="mouseup"))}var Fn={id:"legend",_element:Ot,start(s,t,e){const i=s.legend=new Ot({ctx:s.ctx,options:e,chart:s});gt.configure(s,i,e),gt.addBox(s,i)},stop(s){gt.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,t,e){const i=s.legend;gt.configure(s,i,e),i.options=e},afterUpdate(s){const t=s.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(s,t){t.replay||s.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const t=s.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:o,useBorderRadius:a,borderRadius:l}}=s.legend.options;return s._getSortedDatasetMetas().map(h=>{const u=h.controller.getStyle(e?0:void 0),p=(0,d.E)(u.borderWidth);return{text:t[h.index].label,fillStyle:u.backgroundColor,fontColor:o,hidden:!h.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:u.borderColor,pointStyle:i||u.pointStyle,rotation:u.rotation,textAlign:n||u.textAlign,borderRadius:a&&(l||u.borderRadius),datasetIndex:h.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class be 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){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=(0,d.b)(i.text)?i.text.length:1;this._padding=(0,d.E)(i.padding);const o=n*(0,d.a0)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:a}=this,l=a.align;let h=0,u,p,b;return this.isHorizontal()?(p=(0,d.a2)(l,i,o),b=e+t,u=o-i):(a.position==="left"?(p=i+t,b=(0,d.a2)(l,n,e),h=d.P*-.5):(p=o-t,b=(0,d.a2)(l,e,n),h=d.P*.5),u=n-e),{titleX:p,titleY:b,maxWidth:u,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=(0,d.a0)(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:h,rotation:u}=this._drawArgs(o);(0,d.Z)(t,e.text,0,0,i,{color:e.color,maxWidth:h,rotation:u,textAlign:(0,d.a1)(e.align),textBaseline:"middle",translation:[a,l]})}}function In(s,t){const e=new be({ctx:s.ctx,options:t,chart:s});gt.configure(s,e,t),gt.addBox(s,e),s.titleBlock=e}var co={id:"title",_element:be,start(s,t,e){In(s,e)},stop(s){const t=s.titleBlock;gt.removeBox(s,t),delete s.titleBlock},beforeUpdate(s,t,e){const i=s.titleBlock;gt.configure(s,i,e),i.options=e},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}};const zn=new WeakMap;var Co={id:"subtitle",start(s,t,e){const i=new be({ctx:s.ctx,options:e,chart:s});gt.configure(s,i,e),gt.addBox(s,i),zn.set(s,i)},stop(s){gt.removeBox(s,zn.get(s)),zn.delete(s)},beforeUpdate(s,t,e){const i=zn.get(s);gt.configure(s,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Bi={average(s){if(!s.length)return!1;let t,e,i=new Set,n=0,o=0;for(t=0,e=s.length;t<e;++t){const l=s[t].element;if(l&&l.hasValue()){const h=l.tooltipPosition();i.add(h.x),n+=h.y,++o}}return{x:[...i].reduce((l,h)=>l+h)/i.size,y:n/o}},nearest(s,t){if(!s.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,o,a,l;for(o=0,a=s.length;o<a;++o){const h=s[o].element;if(h&&h.hasValue()){const u=h.getCenterPoint(),p=(0,d.aE)(t,u);p<n&&(n=p,l=h)}}if(l){const h=l.tooltipPosition();e=h.x,i=h.y}return{x:e,y:i}}};function _e(s,t){return t&&((0,d.b)(t)?Array.prototype.push.apply(s,t):s.push(t)),s}function ke(s){return(typeof s=="string"||s instanceof String)&&s.indexOf(`
`)>-1?s.split(`
`):s}function Ao(s,t){const{element:e,datasetIndex:i,index:n}=t,o=s.getDatasetMeta(i).controller,{label:a,value:l}=o.getLabelAndValue(n);return{chart:s,label:a,parsed:o.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:l,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function ho(s,t){const e=s.chart.ctx,{body:i,footer:n,title:o}=s,{boxWidth:a,boxHeight:l}=t,h=(0,d.a0)(t.bodyFont),u=(0,d.a0)(t.titleFont),p=(0,d.a0)(t.footerFont),b=o.length,_=n.length,y=i.length,M=(0,d.E)(t.padding);let S=M.height,D=0,P=i.reduce((L,A)=>L+A.before.length+A.lines.length+A.after.length,0);if(P+=s.beforeBody.length+s.afterBody.length,b&&(S+=b*u.lineHeight+(b-1)*t.titleSpacing+t.titleMarginBottom),P){const L=t.displayColors?Math.max(l,h.lineHeight):h.lineHeight;S+=y*L+(P-y)*h.lineHeight+(P-1)*t.bodySpacing}_&&(S+=t.footerMarginTop+_*p.lineHeight+(_-1)*t.footerSpacing);let O=0;const E=function(L){D=Math.max(D,e.measureText(L).width+O)};return e.save(),e.font=u.string,(0,d.F)(s.title,E),e.font=h.string,(0,d.F)(s.beforeBody.concat(s.afterBody),E),O=t.displayColors?a+2+t.boxPadding:0,(0,d.F)(i,L=>{(0,d.F)(L.before,E),(0,d.F)(L.lines,E),(0,d.F)(L.after,E)}),O=0,e.font=p.string,(0,d.F)(s.footer,E),e.restore(),D+=M.width,{width:D,height:S}}function To(s,t){const{y:e,height:i}=t;return e<i/2?"top":e>s.height-i/2?"bottom":"center"}function Lo(s,t,e,i){const{x:n,width:o}=i,a=e.caretSize+e.caretPadding;if(s==="left"&&n+o+a>t.width||s==="right"&&n-o-a<0)return!0}function Eo(s,t,e,i){const{x:n,width:o}=e,{width:a,chartArea:{left:l,right:h}}=s;let u="center";return i==="center"?u=n<=(l+h)/2?"left":"right":n<=o/2?u="left":n>=a-o/2&&(u="right"),Lo(u,s,t,e)&&(u="center"),u}function uo(s,t,e){const i=e.yAlign||t.yAlign||To(s,e);return{xAlign:e.xAlign||t.xAlign||Eo(s,t,e,i),yAlign:i}}function Ro(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Fo(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function fo(s,t,e,i){const{caretSize:n,caretPadding:o,cornerRadius:a}=s,{xAlign:l,yAlign:h}=e,u=n+o,{topLeft:p,topRight:b,bottomLeft:_,bottomRight:y}=(0,d.aw)(a);let M=Ro(t,l);const S=Fo(t,h,u);return h==="center"?l==="left"?M+=u:l==="right"&&(M-=u):l==="left"?M-=Math.max(p,_)+n:l==="right"&&(M+=Math.max(b,y)+n),{x:(0,d.S)(M,0,i.width-t.width),y:(0,d.S)(S,0,i.height-t.height)}}function Bn(s,t,e){const i=(0,d.E)(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function go(s){return _e([],ke(s))}function Io(s,t,e){return(0,d.j)(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function po(s,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}const mo={beforeTitle:d.aF,title(s){if(s.length>0){const t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:d.aF,beforeBody:d.aF,beforeLabel:d.aF,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let t=s.dataset.label||"";t&&(t+=": ");const e=s.formattedValue;return(0,d.k)(e)||(t+=e),t},labelColor(s){const e=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(s){const e=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:d.aF,afterBody:d.aF,beforeFooter:d.aF,footer:d.aF,afterFooter:d.aF};function Ut(s,t,e,i){const n=s[t].call(e,i);return typeof n>"u"?mo[t].call(e,i):n}class no 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,o=new at(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Io(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=Ut(i,"beforeTitle",this,t),o=Ut(i,"title",this,t),a=Ut(i,"afterTitle",this,t);let l=[];return l=_e(l,ke(n)),l=_e(l,ke(o)),l=_e(l,ke(a)),l}getBeforeBody(t,e){return go(Ut(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return(0,d.F)(t,o=>{const a={before:[],lines:[],after:[]},l=po(i,o);_e(a.before,ke(Ut(l,"beforeLabel",this,o))),_e(a.lines,Ut(l,"label",this,o)),_e(a.after,ke(Ut(l,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return go(Ut(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Ut(i,"beforeFooter",this,t),o=Ut(i,"footer",this,t),a=Ut(i,"afterFooter",this,t);let l=[];return l=_e(l,ke(n)),l=_e(l,ke(o)),l=_e(l,ke(a)),l}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],a=[];let l=[],h,u;for(h=0,u=e.length;h<u;++h)l.push(Ao(this.chart,e[h]));return t.filter&&(l=l.filter((p,b,_)=>t.filter(p,b,_,i))),t.itemSort&&(l=l.sort((p,b)=>t.itemSort(p,b,i))),(0,d.F)(l,p=>{const b=po(t.callbacks,p);n.push(Ut(b,"labelColor",this,p)),o.push(Ut(b,"labelPointStyle",this,p)),a.push(Ut(b,"labelTextColor",this,p))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const l=Bi[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const h=this._size=ho(this,i),u=Object.assign({},l,h),p=uo(this.chart,i,u),b=fo(i,u,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:b.x,y:b.y,width:h.width,height:h.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:l}=i,{topLeft:h,topRight:u,bottomLeft:p,bottomRight:b}=(0,d.aw)(l),{x:_,y}=t,{width:M,height:S}=e;let D,P,O,E,L,A;return o==="center"?(L=y+S/2,n==="left"?(D=_,P=D-a,E=L+a,A=L-a):(D=_+M,P=D+a,E=L-a,A=L+a),O=D):(n==="left"?P=_+Math.max(h,p)+a:n==="right"?P=_+M-Math.max(u,b)-a:P=this.caretX,o==="top"?(E=y,L=E-a,D=P-a,O=P+a):(E=y+S,L=E+a,D=P+a,O=P-a),A=E),{x1:D,x2:P,x3:O,y1:E,y2:L,y3:A}}drawTitle(t,e,i){const n=this.title,o=n.length;let a,l,h;if(o){const u=(0,d.az)(i.rtl,this.x,this.width);for(t.x=Bn(this,i.titleAlign,i),e.textAlign=u.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,d.a0)(i.titleFont),l=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,h=0;h<o;++h)e.fillText(n[h],u.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,h+1===o&&(t.y+=i.titleMarginBottom-l)}}_drawColorBox(t,e,i,n,o){const a=this.labelColors[i],l=this.labelPointStyles[i],{boxHeight:h,boxWidth:u}=o,p=(0,d.a0)(o.bodyFont),b=Bn(this,"left",o),_=n.x(b),y=h<p.lineHeight?(p.lineHeight-h)/2:0,M=e.y+y;if(o.usePointStyle){const S={radius:Math.min(u,h)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},D=n.leftForLtr(_,u)+u/2,P=M+h/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,d.at)(t,S,D,P),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,(0,d.at)(t,S,D,P)}else{t.lineWidth=(0,d.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 S=n.leftForLtr(_,u),D=n.leftForLtr(n.xPlus(_,1),u-2),P=(0,d.aw)(a.borderRadius);Object.values(P).some(O=>O!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,d.au)(t,{x:S,y:M,w:u,h,radius:P}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),(0,d.au)(t,{x:D,y:M+1,w:u-2,h:h-2,radius:P}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(S,M,u,h),t.strokeRect(S,M,u,h),t.fillStyle=a.backgroundColor,t.fillRect(D,M+1,u-2,h-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:l,boxHeight:h,boxWidth:u,boxPadding:p}=i,b=(0,d.a0)(i.bodyFont);let _=b.lineHeight,y=0;const M=(0,d.az)(i.rtl,this.x,this.width),S=function(B){e.fillText(B,M.x(t.x+y),t.y+_/2),t.y+=_+o},D=M.textAlign(a);let P,O,E,L,A,F,I;for(e.textAlign=a,e.textBaseline="middle",e.font=b.string,t.x=Bn(this,D,i),e.fillStyle=i.bodyColor,(0,d.F)(this.beforeBody,S),y=l&&D!=="right"?a==="center"?u/2+p:u+2+p:0,L=0,F=n.length;L<F;++L){for(P=n[L],O=this.labelTextColors[L],e.fillStyle=O,(0,d.F)(P.before,S),E=P.lines,l&&E.length&&(this._drawColorBox(e,t,L,M,i),_=Math.max(b.lineHeight,h)),A=0,I=E.length;A<I;++A)S(E[A]),_=b.lineHeight;(0,d.F)(P.after,S)}y=0,_=b.lineHeight,(0,d.F)(this.afterBody,S),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let a,l;if(o){const h=(0,d.az)(i.rtl,this.x,this.width);for(t.x=Bn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=h.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,d.a0)(i.footerFont),e.fillStyle=i.footerColor,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+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:a}=this,{x:l,y:h}=t,{width:u,height:p}=i,{topLeft:b,topRight:_,bottomLeft:y,bottomRight:M}=(0,d.aw)(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(l+b,h),a==="top"&&this.drawCaret(t,e,i,n),e.lineTo(l+u-_,h),e.quadraticCurveTo(l+u,h,l+u,h+_),a==="center"&&o==="right"&&this.drawCaret(t,e,i,n),e.lineTo(l+u,h+p-M),e.quadraticCurveTo(l+u,h+p,l+u-M,h+p),a==="bottom"&&this.drawCaret(t,e,i,n),e.lineTo(l+y,h+p),e.quadraticCurveTo(l,h+p,l,h+p-y),a==="center"&&o==="left"&&this.drawCaret(t,e,i,n),e.lineTo(l,h+b),e.quadraticCurveTo(l,h,l+b,h),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const a=Bi[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=ho(this,t),h=Object.assign({},a,this._size),u=uo(e,t,h),p=fo(t,h,u,e);(n._to!==p.x||o._to!==p.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,p))}}_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,d.E)(e.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&l&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),(0,d.aA)(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,d.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:l,index:h})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[h],index:h}}),o=!(0,d.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),l=this._positionChanged(a,t),h=e||!(0,d.ah)(a,o)||l;return h&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),h}_getActiveElements(t,e,i,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,a=Bi[o.position].call(this,t,e);return a!==!1&&(i!==a.x||n!==a.y)}}R(no,"positioners",Bi);var bo={id:"tooltip",_element:no,positioners:Bi,afterInit(s,t,e){e&&(s.tooltip=new no({chart:s,options:e}))},beforeUpdate(s,t,e){s.tooltip&&s.tooltip.initialize(e)},reset(s,t,e){s.tooltip&&s.tooltip.initialize(e)},afterDraw(s){const t=s.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(s.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",e)}},afterEvent(s,t){if(s.tooltip){const e=t.replay;s.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(s,t)=>t.bodyFont.size,boxWidth:(s,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:mo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Colors:Ns,Decimation:Us,Filler:pt,Legend:Fn,SubTitle:Co,Title:co,Tooltip:bo});const Bo=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Wo(s,t,e,i){const n=s.indexOf(t);if(n===-1)return Bo(s,t,e,i);const o=s.lastIndexOf(t);return n!==o?e:n}const jo=(s,t)=>s===null?null:(0,d.S)(Math.round(s),0,t);function _o(s){const t=this.getLabels();return s>=0&&s<t.length?t[s]:s}class so extends ae{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:n,label:o}of e)i[n]===o&&i.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,d.k)(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Wo(i,t,(0,d.v)(e,t),this._addedLabels),jo(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(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 o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){return _o.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const 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}}R(so,"id","category"),R(so,"defaults",{ticks:{callback:_o}});function Vo(s,t){const e=[],{bounds:n,step:o,min:a,max:l,precision:h,count:u,maxTicks:p,maxDigits:b,includeBounds:_}=s,y=o||1,M=p-1,{min:S,max:D}=t,P=!(0,d.k)(a),O=!(0,d.k)(l),E=!(0,d.k)(u),L=(D-S)/(b+1);let A=(0,d.aH)((D-S)/M/y)*y,F,I,B,$;if(A<1e-14&&!P&&!O)return[{value:S},{value:D}];$=Math.ceil(D/A)-Math.floor(S/A),$>M&&(A=(0,d.aH)($*A/M/y)*y),(0,d.k)(h)||(F=Math.pow(10,h),A=Math.ceil(A*F)/F),n==="ticks"?(I=Math.floor(S/A)*A,B=Math.ceil(D/A)*A):(I=S,B=D),P&&O&&o&&(0,d.aI)((l-a)/o,A/1e3)?($=Math.round(Math.min((l-a)/A,p)),A=(l-a)/$,I=a,B=l):E?(I=P?a:I,B=O?l:B,$=u-1,A=(B-I)/$):($=(B-I)/A,(0,d.aJ)($,Math.round($),A/1e3)?$=Math.round($):$=Math.ceil($));const Z=Math.max((0,d.aK)(A),(0,d.aK)(I));F=Math.pow(10,(0,d.k)(h)?Z:h),I=Math.round(I*F)/F,B=Math.round(B*F)/F;let J=0;for(P&&(_&&I!==a?(e.push({value:a}),I<a&&J++,(0,d.aJ)(Math.round((I+J*A)*F)/F,a,xo(a,L,s))&&J++):I<a&&J++);J<$;++J){const it=Math.round((I+J*A)*F)/F;if(O&&it>l)break;e.push({value:it})}return O&&_&&B!==l?e.length&&(0,d.aJ)(e[e.length-1].value,l,xo(l,L,s))?e[e.length-1].value=l:e.push({value:l}):(!O||B===l)&&e.push({value:B}),e}function xo(s,t,{horizontal:e,minRotation:i}){const n=(0,d.t)(i),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+s).length;return Math.min(t/o,a)}class Wn extends ae{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,d.k)(t)||(typeof t=="number"||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=h=>n=e?n:h,l=h=>o=i?o:h;if(t){const h=(0,d.s)(n),u=(0,d.s)(o);h<0&&u<0?l(0):h>0&&u>0&&a(0)}if(n===o){let h=o===0?1:Math.abs(o*.05);l(o+h),t||a(n-h)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}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:e.includeBounds!==!1},o=this._range||this,a=Vo(n,o);return t.bounds==="ticks"&&(0,d.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,d.o)(t,this.chart.options.locale,this.options.ticks.format)}}class jn extends Wn{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,d.g)(t)?t:0,this.max=(0,d.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=(0,d.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 t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}R(jn,"id","linear"),R(jn,"defaults",{ticks:{callback:d.aL.formatters.numeric}});const Wi=s=>Math.floor((0,d.aM)(s)),Ue=(s,t)=>Math.pow(10,Wi(s)+t);function yo(s){return s/Math.pow(10,Wi(s))===1}function vo(s,t,e){const i=Math.pow(10,e),n=Math.floor(s/i);return Math.ceil(t/i)-n}function Ho(s,t){const e=t-s;let i=Wi(e);for(;vo(s,t,i)>10;)i++;for(;vo(s,t,i)<10;)i--;return Math.min(i,Wi(s))}function No(s,{min:t,max:e}){t=(0,d.O)(s.min,t);const i=[],n=Wi(t);let o=Ho(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),h=n>o?Math.pow(10,n):0,u=Math.round((t-h)*a)/a,p=Math.floor((t-h)/l/10)*l*10;let b=Math.floor((u-p)/Math.pow(10,o)),_=(0,d.O)(s.min,Math.round((h+p+b*Math.pow(10,o))*a)/a);for(;_<e;)i.push({value:_,major:yo(_),significand:b}),b>=10?b=b<15?15:20:b++,b>=20&&(o++,b=2,a=o>=0?1:a),_=Math.round((h+p+b*Math.pow(10,o))*a)/a;const y=(0,d.O)(s.max,_);return i.push({value:y,major:yo(y),significand:b}),i}class oo extends ae{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Wn.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return(0,d.g)(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,d.g)(t)?Math.max(0,t):null,this.max=(0,d.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,d.g)(this._userMin)&&(this.min=t===Ue(this.min,0)?Ue(this.min,-1):Ue(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=l=>i=t?i:l,a=l=>n=e?n:l;i===n&&(i<=0?(o(1),a(10)):(o(Ue(i,-1)),a(Ue(n,1)))),i<=0&&o(Ue(n,-1)),n<=0&&a(Ue(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=No(e,this);return t.bounds==="ticks"&&(0,d.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 t===void 0?"0":(0,d.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=(0,d.aM)(t),this._valueRange=(0,d.aM)(this.max)-(0,d.aM)(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:((0,d.aM)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}R(oo,"id","logarithmic"),R(oo,"defaults",{ticks:{callback:d.aL.formatters.logarithmic,major:{enabled:!0}}});function ro(s){const t=s.ticks;if(t.display&&s.display){const e=(0,d.E)(t.backdropPadding);return(0,d.v)(t.font&&t.font.size,d.d.font.size)+e.height}return 0}function Yo(s,t,e){return e=(0,d.b)(e)?e:[e],{w:(0,d.aN)(s,t.string,e),h:e.length*t.lineHeight}}function Mo(s,t,e,i,n){return s===i||s===n?{start:t-e/2,end:t+e/2}:s<i||s>n?{start:t-e,end:t}:{start:t,end:t+e}}function $o(s){const t={l:s.left+s._padding.left,r:s.right-s._padding.right,t:s.top+s._padding.top,b:s.bottom-s._padding.bottom},e=Object.assign({},t),i=[],n=[],o=s._pointLabels.length,a=s.options.pointLabels,l=a.centerPointLabels?d.P/o:0;for(let h=0;h<o;h++){const u=a.setContext(s.getPointLabelContext(h));n[h]=u.padding;const p=s.getPointPosition(h,s.drawingArea+n[h],l),b=(0,d.a0)(u.font),_=Yo(s.ctx,b,s._pointLabels[h]);i[h]=_;const y=(0,d.ay)(s.getIndexAngle(h)+l),M=Math.round((0,d.U)(y)),S=Mo(M,p.x,_.w,0,180),D=Mo(M,p.y,_.h,90,270);Uo(e,t,y,S,D)}s.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),s._pointLabelItems=Go(s,i,n)}function Uo(s,t,e,i,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let l=0,h=0;i.start<t.l?(l=(t.l-i.start)/o,s.l=Math.min(s.l,t.l-l)):i.end>t.r&&(l=(i.end-t.r)/o,s.r=Math.max(s.r,t.r+l)),n.start<t.t?(h=(t.t-n.start)/a,s.t=Math.min(s.t,t.t-h)):n.end>t.b&&(h=(n.end-t.b)/a,s.b=Math.max(s.b,t.b+h))}function Xo(s,t,e){const i=s.drawingArea,{extra:n,additionalAngle:o,padding:a,size:l}=e,h=s.getPointPosition(t,i+n+a,o),u=Math.round((0,d.U)((0,d.ay)(h.angle+d.H))),p=Zo(h.y,l.h,u),b=Qo(u),_=qo(h.x,l.w,b);return{visible:!0,x:h.x,y:p,textAlign:b,left:_,top:p,right:_+l.w,bottom:p+l.h}}function Ko(s,t){if(!t)return!0;const{left:e,top:i,right:n,bottom:o}=s;return!((0,d.C)({x:e,y:i},t)||(0,d.C)({x:e,y:o},t)||(0,d.C)({x:n,y:i},t)||(0,d.C)({x:n,y:o},t))}function Go(s,t,e){const i=[],n=s._pointLabels.length,o=s.options,{centerPointLabels:a,display:l}=o.pointLabels,h={extra:ro(o)/2,additionalAngle:a?d.P/n:0};let u;for(let p=0;p<n;p++){h.padding=e[p],h.size=t[p];const b=Xo(s,p,h);i.push(b),l==="auto"&&(b.visible=Ko(b,u),b.visible&&(u=b))}return i}function Qo(s){return s===0||s===180?"center":s<180?"left":"right"}function qo(s,t,e){return e==="right"?s-=t:e==="center"&&(s-=t/2),s}function Zo(s,t,e){return e===90||e===270?s-=t/2:(e>270||e<90)&&(s-=t),s}function Jo(s,t,e){const{left:i,top:n,right:o,bottom:a}=e,{backdropColor:l}=t;if(!(0,d.k)(l)){const h=(0,d.aw)(t.borderRadius),u=(0,d.E)(t.backdropPadding);s.fillStyle=l;const p=i-u.left,b=n-u.top,_=o-i+u.width,y=a-n+u.height;Object.values(h).some(M=>M!==0)?(s.beginPath(),(0,d.au)(s,{x:p,y:b,w:_,h:y,radius:h}),s.fill()):s.fillRect(p,b,_,y)}}function tr(s,t){const{ctx:e,options:{pointLabels:i}}=s;for(let n=t-1;n>=0;n--){const o=s._pointLabelItems[n];if(!o.visible)continue;const a=i.setContext(s.getPointLabelContext(n));Jo(e,a,o);const l=(0,d.a0)(a.font),{x:h,y:u,textAlign:p}=o;(0,d.Z)(e,s._pointLabels[n],h,u+l.lineHeight/2,l,{color:a.color,textAlign:p,textBaseline:"middle"})}}function ko(s,t,e,i){const{ctx:n}=s;if(e)n.arc(s.xCenter,s.yCenter,t,0,d.T);else{let o=s.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=s.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function er(s,t,e,i,n){const o=s.ctx,a=t.circular,{color:l,lineWidth:h}=t;!a&&!i||!l||!h||e<0||(o.save(),o.strokeStyle=l,o.lineWidth=h,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),ko(s,e,a,i),o.closePath(),o.stroke(),o.restore())}function ir(s,t,e){return(0,d.j)(s,{label:e,index:t,type:"pointLabel"})}class ji extends Wn{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,d.E)(ro(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,d.g)(t)&&!isNaN(t)?t:0,this.max=(0,d.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ro(this.options))}generateTickLabels(t){Wn.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const n=(0,d.Q)(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?$o(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=d.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,d.ay)(t*e+(0,d.t)(i))}getDistanceFromCenterForValue(t){if((0,d.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,d.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 ir(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-d.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:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),ko(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:o}=e,a=this._pointLabels.length;let l,h,u;if(e.pointLabels.display&&tr(this,a),n.display&&this.ticks.forEach((p,b)=>{if(b!==0||b===0&&this.min<0){h=this.getDistanceFromCenterForValue(p.value);const _=this.getContext(b),y=n.setContext(_),M=o.setContext(_);er(this,y,h,a,M)}}),i.display){for(t.save(),l=a-1;l>=0;l--){const p=i.setContext(this.getPointLabelContext(l)),{color:b,lineWidth:_}=p;!_||!b||(t.lineWidth=_,t.strokeStyle=b,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,h=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,h),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.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((l,h)=>{if(h===0&&this.min>=0&&!e.reverse)return;const u=i.setContext(this.getContext(h)),p=(0,d.a0)(u.font);if(o=this.getDistanceFromCenterForValue(this.ticks[h].value),u.showLabelBackdrop){t.font=p.string,a=t.measureText(l.label).width,t.fillStyle=u.backdropColor;const b=(0,d.E)(u.backdropPadding);t.fillRect(-a/2-b.left,-o-p.size/2-b.top,a+b.width,p.size+b.height)}(0,d.Z)(t,l.label,0,-o,p,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}R(ji,"id","radialLinear"),R(ji,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:d.aL.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),R(ji,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),R(ji,"descriptors",{angleLines:{_fallback:"grid"}});const Vn={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}},Xt=Object.keys(Vn);function wo(s,t){return s-t}function So(s,t){if((0,d.k)(t))return null;const e=s._adapter,{parser:i,round:n,isoWeekday:o}=s._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),(0,d.g)(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(n&&(a=n==="week"&&((0,d.x)(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Po(s,t,e,i){const n=Xt.length;for(let o=Xt.indexOf(s);o<n-1;++o){const a=Vn[Xt[o]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(l*a.size))<=i)return Xt[o]}return Xt[n-1]}function nr(s,t,e,i,n){for(let o=Xt.length-1;o>=Xt.indexOf(e);o--){const a=Xt[o];if(Vn[a].common&&s._adapter.diff(n,i,a)>=t-1)return a}return Xt[e?Xt.indexOf(e):0]}function sr(s){for(let t=Xt.indexOf(s)+1,e=Xt.length;t<e;++t)if(Vn[Xt[t]].common)return Xt[t]}function Do(s,t,e){if(!e)s[t]=!0;else if(e.length){const{lo:i,hi:n}=(0,d.aP)(e,t),o=e[i]>=t?e[i]:e[n];s[o]=!0}}function or(s,t,e,i){const n=s._adapter,o=+n.startOf(t[0].value,i),a=t[t.length-1].value;let l,h;for(l=o;l<=a;l=+n.add(l,1,i))h=e[l],h>=0&&(t[h].major=!0);return t}function Oo(s,t,e){const i=[],n={},o=t.length;let a,l;for(a=0;a<o;++a)l=t[a],n[l]=a,i.push({value:l,major:!1});return o===0||!e?i:or(s,i,n,e)}class fi extends ae{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 bi._date(t.adapters.date);n.init(e),(0,d.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 t===void 0?null:So(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:l}=this.getUserBounds();function h(u){!a&&!isNaN(u.min)&&(n=Math.min(n,u.min)),!l&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!l)&&(h(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&h(this.getMinMax(!1))),n=(0,d.g)(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=(0,d.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=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,l=(0,d.aO)(n,o,a);return this._unit=e.unit||(i.autoSkip?Po(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):nr(this,l.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:sr(this._unit),this.initOffsets(n),t.reverse&&l.reverse(),Oo(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=(0,d.S)(e,0,a),i=(0,d.S)(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,a=o.unit||Po(o.minUnit,e,i,this._getLabelCapacity(e)),l=(0,d.v)(n.ticks.stepSize,1),h=a==="week"?o.isoWeekday:!1,u=(0,d.x)(h)||h===!0,p={};let b=e,_,y;if(u&&(b=+t.startOf(b,"isoWeek",h)),b=+t.startOf(b,u?"day":a),t.diff(i,e,a)>1e5*l)throw new Error(e+" and "+i+" are too far apart with stepSize of "+l+" "+a);const M=n.ticks.source==="data"&&this.getDataTimestamps();for(_=b,y=0;_<i;_=+t.add(_,l,a),y++)Do(p,_,M);return(_===i||n.bounds==="ticks"||y===1)&&Do(p,_,M),Object.keys(p).sort(wo).map(S=>+S)}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 n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,n){const o=this.options,a=o.ticks.callback;if(a)return(0,d.Q)(a,[t,e,i],this);const l=o.time.displayFormats,h=this._unit,u=this._majorUnit,p=h&&l[h],b=u&&l[u],_=i[e],y=u&&b&&_&&_.major;return this._adapter.format(t,n||(y?b:p))}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 t===null?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,d.t)(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),l=this._resolveTickFontOptions(0).size;return{w:i*o+l*a,h:i*a+l*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Oo(this,[t],this._majorUnit),n),a=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e<i;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}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(So(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,d._)(t.sort(wo))}}R(fi,"id","time"),R(fi,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Hn(s,t,e){let i=0,n=s.length-1,o,a,l,h;e?(t>=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=(0,d.B)(s,"pos",t)),{pos:o,time:l}=s[i],{pos:a,time:h}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=(0,d.B)(s,"time",t)),{time:o,pos:l}=s[i],{time:a,pos:h}=s[n]);const u=a-o;return u?l+(h-l)*(t-o)/u:l}class ao extends fi{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=Hn(e,this.min),this._tableRange=Hn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let a,l,h,u,p;for(a=0,l=t.length;a<l;++a)u=t[a],u>=e&&u<=i&&n.push(u);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,l=n.length;a<l;++a)p=n[a+1],h=n[a-1],u=n[a],Math.round((p+h)/2)!==u&&o.push({time:u,pos:a/(l-1)});return o}_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)||i.length===1)&&i.push(e),i.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Hn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Hn(this._table,i*this._tableRange+this._minPos,!0)}}R(ao,"id","timeseries"),R(ao,"defaults",fi.defaults);var rr=Object.freeze({__proto__:null,CategoryScale:so,LinearScale:jn,LogarithmicScale:oo,RadialLinearScale:ji,TimeScale:fi,TimeSeriesScale:ao});const cr=[Yn,hi,zo,rr]},"./node_modules/chart.js/dist/chunks/helpers.segment.js":function(vt,nt,G){"use strict";G.d(nt,{$:function(){return He},A:function(){return os},B:function(){return We},C:function(){return oi},D:function(){return ns},E:function(){return Cs},F:function(){return Ie},G:function(){return On},H:function(){return te},I:function(){return ci},J:function(){return Ys},K:function(){return Ns},L:function(){return cs},M:function(){return Sn},N:function(){return Zn},O:function(){return Yn},P:function(){return kt},Q:function(){return $n},R:function(){return fe},S:function(){return Ze},T:function(){return Jt},U:function(){return qe},V:function(){return Pi},W:function(){return ss},X:function(){return cn},Y:function(){return ri},Z:function(){return Ps},_:function(){return ls},a:function(){return As},a0:function(){return ai},a1:function(){return Zi},a2:function(){return Ji},a3:function(){return ii},a4:function(){return xe},a5:function(){return yi},a6:function(){return an},a7:function(){return Be},a8:function(){return Ne},a9:function(){return Ai},aA:function(){return Fi},aB:function(){return tn},aC:function(){return Ks},aD:function(){return Di},aE:function(){return ye},aF:function(){return Zt},aG:function(){return ts},aH:function(){return Xi},aI:function(){return Jn},aJ:function(){return Mi},aK:function(){return is},aL:function(){return rn},aM:function(){return Qe},aN:function(){return ys},aO:function(){return ee},aP:function(){return ki},aa:function(){return mn},ab:function(){return _i},ac:function(){return Pe},ad:function(){return hs},ae:function(){return Hs},af:function(){return hn},ag:function(){return $i},ah:function(){return Un},ai:function(){return Ui},aj:function(){return Je},ak:function(){return Te},al:function(){return Bs},am:function(){return Zs},an:function(){return Gs},ao:function(){return Cn},ap:function(){return An},aq:function(){return Me},ar:function(){return Ms},as:function(){return dn},at:function(){return vs},au:function(){return un},av:function(){return Oi},aw:function(){return Os},ax:function(){return zi},ay:function(){return se},az:function(){return Xs},b:function(){return Ft},c:function(){return fs},d:function(){return si},e:function(){return ti},f:function(){return xi},g:function(){return De},h:function(){return Qn},i:function(){return yt},j:function(){return Ci},k:function(){return re},l:function(){return rs},m:function(){return mi},n:function(){return bi},o:function(){return sn},p:function(){return Qi},q:function(){return ds},r:function(){return je},s:function(){return Ae},t:function(){return es},u:function(){return as},v:function(){return It},w:function(){return us},x:function(){return Ki},y:function(){return Fs},z:function(){return js}});function d(r){return r+.5|0}const W=(r,c,f)=>Math.max(Math.min(r,f),c);function X(r){return W(d(r*2.55),0,255)}function Q(r){return W(d(r/2.55),0,100)}function ut(r){return W(d(r*255),0,255)}function j(r){return W(d(r/2.55)/100,0,1)}function at(r){return W(d(r*100),0,100)}const K={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},lt=[..."0123456789ABCDEF"],et=r=>lt[r&15],ft=r=>lt[(r&240)>>4]+lt[r&15],z=r=>(r&240)>>4===(r&15),q=r=>z(r.r)&&z(r.g)&&z(r.b)&&z(r.a);function ct(r){var c=r.length,f;return r[0]==="#"&&(c===4||c===5?f={r:255&K[r[1]]*17,g:255&K[r[2]]*17,b:255&K[r[3]]*17,a:c===5?K[r[4]]*17:255}:(c===7||c===9)&&(f={r:K[r[1]]<<4|K[r[2]],g:K[r[3]]<<4|K[r[4]],b:K[r[5]]<<4|K[r[6]],a:c===9?K[r[7]]<<4|K[r[8]]:255})),f}const ht=(r,c)=>r<255?c(r):"";function Pt(r){var c=q(r)?et:ft;return r?"#"+c(r.r)+c(r.g)+c(r.b)+ht(r.a,c):void 0}const Bt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kt(r,c,f){const g=c*Math.min(f,1-f),m=(x,v=(x+r/30)%12)=>f-g*Math.max(Math.min(v-3,9-v,1),-1);return[m(0),m(8),m(4)]}function Gt(r,c,f){const g=(m,x=(m+r/60)%6)=>f-f*c*Math.max(Math.min(x,4-x,1),0);return[g(5),g(3),g(1)]}function Wt(r,c,f){const g=Kt(r,1,.5);let m;for(c+f>1&&(m=1/(c+f),c*=m,f*=m),m=0;m<3;m++)g[m]*=1-c-f,g[m]+=c;return g}function At(r,c,f,g,m){return r===m?(c-f)/g+(c<f?6:0):c===m?(f-r)/g+2:(r-c)/g+4}function Tt(r){const f=r.r/255,g=r.g/255,m=r.b/255,x=Math.max(f,g,m),v=Math.min(f,g,m),k=(x+v)/2;let w,C,T;return x!==v&&(T=x-v,C=k>.5?T/(2-x-v):T/(x+v),w=At(f,g,m,T,x),w=w*60+.5),[w|0,C||0,k]}function jt(r,c,f,g){return(Array.isArray(c)?r(c[0],c[1],c[2]):r(c,f,g)).map(ut)}function Dt(r,c,f){return jt(Kt,r,c,f)}function xt(r,c,f){return jt(Wt,r,c,f)}function Vt(r,c,f){return jt(Gt,r,c,f)}function N(r){return(r%360+360)%360}function tt(r){const c=Bt.exec(r);let f=255,g;if(!c)return;c[5]!==g&&(f=c[6]?X(+c[5]):ut(+c[5]));const m=N(+c[2]),x=+c[3]/100,v=+c[4]/100;return c[1]==="hwb"?g=xt(m,x,v):c[1]==="hsv"?g=Vt(m,x,v):g=Dt(m,x,v),{r:g[0],g:g[1],b:g[2],a:f}}function st(r,c){var f=Tt(r);f[0]=N(f[0]+c),f=Dt(f),r.r=f[0],r.g=f[1],r.b=f[2]}function wt(r){if(!r)return;const c=Tt(r),f=c[0],g=at(c[1]),m=at(c[2]);return r.a<255?`hsla(${f}, ${g}%, ${m}%, ${j(r.a)})`:`hsl(${f}, ${g}%, ${m}%)`}const bt={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"},ot={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 Lt(){const r={},c=Object.keys(ot),f=Object.keys(bt);let g,m,x,v,k;for(g=0;g<c.length;g++){for(v=k=c[g],m=0;m<f.length;m++)x=f[m],k=k.replace(x,bt[x]);x=parseInt(ot[v],16),r[k]=[x>>16&255,x>>8&255,x&255]}return r}let Ht;function we(r){Ht||(Ht=Lt(),Ht.transparent=[0,0,0,0]);const c=Ht[r.toLowerCase()];return c&&{r:c[0],g:c[1],b:c[2],a:c.length===4?c[3]:255}}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ne(r){const c=Et.exec(r);let f=255,g,m,x;if(c){if(c[7]!==g){const v=+c[7];f=c[8]?X(v):W(v*255,0,255)}return g=+c[1],m=+c[3],x=+c[5],g=255&(c[2]?X(g):W(g,0,255)),m=255&(c[4]?X(m):W(m,0,255)),x=255&(c[6]?X(x):W(x,0,255)),{r:g,g:m,b:x,a:f}}}function he(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${j(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}const Qt=r=>r<=.0031308?r*12.92:Math.pow(r,1/2.4)*1.055-.055,Nt=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function qt(r,c,f){const g=Nt(j(r.r)),m=Nt(j(r.g)),x=Nt(j(r.b));return{r:ut(Qt(g+f*(Nt(j(c.r))-g))),g:ut(Qt(m+f*(Nt(j(c.g))-m))),b:ut(Qt(x+f*(Nt(j(c.b))-x))),a:r.a+f*(c.a-r.a)}}function St(r,c,f){if(r){let g=Tt(r);g[c]=Math.max(0,Math.min(g[c]+g[c]*f,c===0?360:1)),g=Dt(g),r.r=g[0],r.g=g[1],r.b=g[2]}}function $t(r,c){return r&&Object.assign(c||{},r)}function Rt(r){var c={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(c={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(c.a=ut(r[3]))):(c=$t(r,{r:0,g:0,b:0,a:1}),c.a=ut(c.a)),c}function Yt(r){return r.charAt(0)==="r"?ne(r):tt(r)}class Mt{constructor(c){if(c instanceof Mt)return c;const f=typeof c;let g;f==="object"?g=Rt(c):f==="string"&&(g=ct(c)||we(c)||Yt(c)),this._rgb=g,this._valid=!!g}get valid(){return this._valid}get rgb(){var c=$t(this._rgb);return c&&(c.a=j(c.a)),c}set rgb(c){this._rgb=Rt(c)}rgbString(){return this._valid?he(this._rgb):void 0}hexString(){return this._valid?Pt(this._rgb):void 0}hslString(){return this._valid?wt(this._rgb):void 0}mix(c,f){if(c){const g=this.rgb,m=c.rgb;let x;const v=f===x?.5:f,k=2*v-1,w=g.a-m.a,C=((k*w===-1?k:(k+w)/(1+k*w))+1)/2;x=1-C,g.r=255&C*g.r+x*m.r+.5,g.g=255&C*g.g+x*m.g+.5,g.b=255&C*g.b+x*m.b+.5,g.a=v*g.a+(1-v)*m.a,this.rgb=g}return this}interpolate(c,f){return c&&(this._rgb=qt(this._rgb,c._rgb,f)),this}clone(){return new Mt(this.rgb)}alpha(c){return this._rgb.a=ut(c),this}clearer(c){const f=this._rgb;return f.a*=1-c,this}greyscale(){const c=this._rgb,f=d(c.r*.3+c.g*.59+c.b*.11);return c.r=c.g=c.b=f,this}opaquer(c){const f=this._rgb;return f.a*=1+c,this}negate(){const c=this._rgb;return c.r=255-c.r,c.g=255-c.g,c.b=255-c.b,this}lighten(c){return St(this._rgb,2,c),this}darken(c){return St(this._rgb,2,-c),this}saturate(c){return St(this._rgb,1,c),this}desaturate(c){return St(this._rgb,1,-c),this}rotate(c){return st(this._rgb,c),this}}function Se(r){return new Mt(r)}function Zt(){}const Pe=(()=>{let r=0;return()=>r++})();function re(r){return r===null||typeof r>"u"}function Ft(r){if(Array.isArray&&Array.isArray(r))return!0;const c=Object.prototype.toString.call(r);return c.slice(0,7)==="[object"&&c.slice(-6)==="Array]"}function yt(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}function De(r){return(typeof r=="number"||r instanceof Number)&&isFinite(+r)}function Yn(r,c){return De(r)?r:c}function It(r,c){return typeof r>"u"?c:r}const mi=(r,c)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:+r/c,bi=(r,c)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*c:+r;function $n(r,c,f){if(r&&typeof r.call=="function")return r.apply(f,c)}function Ie(r,c,f,g){let m,x,v;if(Ft(r))if(x=r.length,g)for(m=x-1;m>=0;m--)c.call(f,r[m],m);else for(m=0;m<x;m++)c.call(f,r[m],m);else if(yt(r))for(v=Object.keys(r),x=v.length,m=0;m<x;m++)c.call(f,r[v[m]],v[m])}function Un(r,c){let f,g,m,x;if(!r||!c||r.length!==c.length)return!1;for(f=0,g=r.length;f<g;++f)if(m=r[f],x=c[f],m.datasetIndex!==x.datasetIndex||m.index!==x.index)return!1;return!0}function Oe(r){if(Ft(r))return r.map(Oe);if(yt(r)){const c=Object.create(null),f=Object.keys(r),g=f.length;let m=0;for(;m<g;++m)c[f[m]]=Oe(r[f[m]]);return c}return r}function Ni(r){return["__proto__","prototype","constructor"].indexOf(r)===-1}function Xn(r,c,f,g){if(!Ni(r))return;const m=c[r],x=f[r];yt(m)&&yt(x)?xe(m,x,g):c[r]=Oe(x)}function xe(r,c,f){const g=Ft(c)?c:[c],m=g.length;if(!yt(r))return r;f=f||{};const x=f.merger||Xn;let v;for(let k=0;k<m;++k){if(v=g[k],!yt(v))continue;const w=Object.keys(v);for(let C=0,T=w.length;C<T;++C)x(w[C],r,v,f)}return r}function _i(r,c){return xe(r,c,{merger:Kn})}function Kn(r,c,f){if(!Ni(r))return;const g=c[r],m=f[r];yt(g)&&yt(m)?_i(g,m):Object.prototype.hasOwnProperty.call(c,r)||(c[r]=Oe(m))}function Gn(r,c,f,g){c!==void 0&&console.warn(r+': "'+f+'" is deprecated. Please use "'+g+'" instead')}const Ce={"":r=>r,x:r=>r.x,y:r=>r.y};function Yi(r){const c=r.split("."),f=[];let g="";for(const m of c)g+=m,g.endsWith("\\")?g=g.slice(0,-1)+".":(f.push(g),g="");return f}function ze(r){const c=Yi(r);return f=>{for(const g of c){if(g==="")break;f=f&&f[g]}return f}}function xi(r,c){return(Ce[c]||(Ce[c]=ze(c)))(r)}function yi(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Qn=r=>typeof r<"u",Be=r=>typeof r=="function",$i=(r,c)=>{if(r.size!==c.size)return!1;for(const f of r)if(!c.has(f))return!1;return!0};function Ui(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}const kt=Math.PI,Jt=2*kt,qn=Jt+kt,de=Number.POSITIVE_INFINITY,Ge=kt/180,te=kt/2,gt=kt/4,vi=kt*2/3,Qe=Math.log10,Ae=Math.sign;function Mi(r,c,f){return Math.abs(r-c)<f}function Xi(r){const c=Math.round(r);r=Mi(r,c,r/1e3)?c:r;const f=Math.pow(10,Math.floor(Qe(r))),g=r/f;return(g<=1?1:g<=2?2:g<=5?5:10)*f}function Zn(r){const c=[],f=Math.sqrt(r);let g;for(g=1;g<f;g++)r%g===0&&(c.push(g),c.push(r/g));return f===(f|0)&&c.push(f),c.sort((m,x)=>m-x).pop(),c}function Ki(r){return!isNaN(parseFloat(r))&&isFinite(r)}function Jn(r,c){const f=Math.round(r);return f-c<=r&&f+c>=r}function ts(r,c,f){let g,m,x;for(g=0,m=r.length;g<m;g++)x=r[g][f],isNaN(x)||(c.min=Math.min(c.min,x),c.max=Math.max(c.max,x))}function es(r){return r*(kt/180)}function qe(r){return r*(180/kt)}function is(r){if(!De(r))return;let c=1,f=0;for(;Math.round(r*c)/c!==r;)c*=10,f++;return f}function ns(r,c){const f=c.x-r.x,g=c.y-r.y,m=Math.sqrt(f*f+g*g);let x=Math.atan2(g,f);return x<-.5*kt&&(x+=Jt),{angle:x,distance:m}}function ye(r,c){return Math.sqrt(Math.pow(c.x-r.x,2)+Math.pow(c.y-r.y,2))}function Gi(r,c){return(r-c+qn)%Jt-kt}function se(r){return(r%Jt+Jt)%Jt}function Qi(r,c,f,g){const m=se(r),x=se(c),v=se(f),k=se(x-m),w=se(v-m),C=se(m-x),T=se(m-v);return m===x||m===v||g&&x===v||k>w&&C<T}function Ze(r,c,f){return Math.max(c,Math.min(f,r))}function ss(r){return Ze(r,-32768,32767)}function Je(r,c,f,g=1e-6){return r>=Math.min(c,f)-g&&r<=Math.max(c,f)+g}function ki(r,c,f){f=f||(v=>r[v]<c);let g=r.length-1,m=0,x;for(;g-m>1;)x=m+g>>1,f(x)?m=x:g=x;return{lo:m,hi:g}}const We=(r,c,f,g)=>ki(r,f,g?m=>{const x=r[m][c];return x<f||x===f&&r[m+1][c]===f}:m=>r[m][c]<f),os=(r,c,f)=>ki(r,f,g=>r[g][c]>=f);function ee(r,c,f){let g=0,m=r.length;for(;g<m&&r[g]<c;)g++;for(;m>g&&r[m-1]>f;)m--;return g>0||m<r.length?r.slice(g,m):r}const qi=["push","pop","shift","splice","unshift"];function rs(r,c){if(r._chartjs){r._chartjs.listeners.push(c);return}Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[c]}}),qi.forEach(f=>{const g="_onData"+yi(f),m=r[f];Object.defineProperty(r,f,{configurable:!0,enumerable:!1,value(...x){const v=m.apply(this,x);return r._chartjs.listeners.forEach(k=>{typeof k[g]=="function"&&k[g](...x)}),v}})})}function as(r,c){const f=r._chartjs;if(!f)return;const g=f.listeners,m=g.indexOf(c);m!==-1&&g.splice(m,1),!(g.length>0)&&(qi.forEach(x=>{delete r[x]}),delete r._chartjs)}function ls(r){const c=new Set(r);return c.size===r.length?r:Array.from(c)}function lo(r,c,f){return c+" "+r+"px "+f}const je=function(){return typeof window>"u"?function(r){return r()}:window.requestAnimationFrame}();function cs(r,c){let f=[],g=!1;return function(...m){f=m,g||(g=!0,je.call(window,()=>{g=!1,r.apply(c,f)}))}}function hs(r,c){let f;return function(...g){return c?(clearTimeout(f),f=setTimeout(r,c,g)):r.apply(this,g),c}}const Zi=r=>r==="start"?"left":r==="end"?"right":"center",Ji=(r,c,f)=>r==="start"?c:r==="end"?f:(c+f)/2,tn=(r,c,f,g)=>r===(g?"left":"right")?f:r==="center"?(c+f)/2:c;function ds(r,c,f){const g=c.length;let m=0,x=g;if(r._sorted){const{iScale:v,_parsed:k}=r,w=v.axis,{min:C,max:T,minDefined:H,maxDefined:Y}=v.getUserBounds();H&&(m=Ze(Math.min(We(k,w,C).lo,f?g:We(c,w,v.getPixelForValue(C)).lo),0,g-1)),Y?x=Ze(Math.max(We(k,v.axis,T,!0).hi+1,f?0:We(c,w,v.getPixelForValue(T),!0).hi+1),m,g)-m:x=g-m}return{start:m,count:x}}function us(r){const{xScale:c,yScale:f,_scaleRanges:g}=r,m={xmin:c.min,xmax:c.max,ymin:f.min,ymax:f.max};if(!g)return r._scaleRanges=m,!0;const x=g.xmin!==c.min||g.xmax!==c.max||g.ymin!==f.min||g.ymax!==f.max;return Object.assign(g,m),x}const ue=r=>r===0||r===1,wi=(r,c,f)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-c)*Jt/f)),en=(r,c,f)=>Math.pow(2,-10*r)*Math.sin((r-c)*Jt/f)+1,ti={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*te)+1,easeOutSine:r=>Math.sin(r*te),easeInOutSine:r=>-.5*(Math.cos(kt*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>ue(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>ue(r)?r:wi(r,.075,.3),easeOutElastic:r=>ue(r)?r:en(r,.075,.3),easeInOutElastic(r){return ue(r)?r:r<.5?.5*wi(r*2,.1125,.45):.5+.5*en(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let c=1.70158;return(r/=.5)<1?.5*(r*r*(((c*=1.525)+1)*r-c)):.5*((r-=2)*r*(((c*=1.525)+1)*r+c)+2)},easeInBounce:r=>1-ti.easeOutBounce(1-r),easeOutBounce(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},easeInOutBounce:r=>r<.5?ti.easeInBounce(r*2)*.5:ti.easeOutBounce(r*2-1)*.5+.5};function Si(r){if(r&&typeof r=="object"){const c=r.toString();return c==="[object CanvasPattern]"||c==="[object CanvasGradient]"}return!1}function fs(r){return Si(r)?r:new Mt(r)}function ae(r){return Si(r)?r:new Mt(r).saturate(.5).darken(.1).hexString()}const ei=["x","y","borderWidth","radius","tension"],gs=["color","borderColor","backgroundColor"];function ps(r){r.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),r.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:c=>c!=="onProgress"&&c!=="onComplete"&&c!=="fn"}),r.set("animations",{colors:{type:"color",properties:gs},numbers:{type:"number",properties:ei}}),r.describe("animations",{_fallback:"animation"}),r.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:c=>c|0}}}})}function ms(r){r.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const nn=new Map;function oe(r,c){c=c||{};const f=r+JSON.stringify(c);let g=nn.get(f);return g||(g=new Intl.NumberFormat(r,c),nn.set(f,g)),g}function sn(r,c,f){return oe(c,f).format(r)}const on={values(r){return Ft(r)?r:""+r},numeric(r,c,f){if(r===0)return"0";const g=this.chart.options.locale;let m,x=r;if(f.length>1){const C=Math.max(Math.abs(f[0].value),Math.abs(f[f.length-1].value));(C<1e-4||C>1e15)&&(m="scientific"),x=bs(r,f)}const v=Qe(Math.abs(x)),k=isNaN(v)?1:Math.max(Math.min(-1*Math.floor(v),20),0),w={notation:m,minimumFractionDigits:k,maximumFractionDigits:k};return Object.assign(w,this.options.ticks.format),sn(r,g,w)},logarithmic(r,c,f){if(r===0)return"0";const g=f[c].significand||r/Math.pow(10,Math.floor(Qe(r)));return[1,2,3,5,10,15].includes(g)||c>.8*f.length?on.numeric.call(this,r,c,f):""}};function bs(r,c){let f=c.length>3?c[2].value-c[1].value:c[1].value-c[0].value;return Math.abs(f)>=1&&r!==Math.floor(r)&&(f=r-Math.floor(r)),f}var rn={formatters:on};function _s(r){r.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:(c,f)=>f.lineWidth,tickColor:(c,f)=>f.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:rn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),r.route("scale.ticks","color","","color"),r.route("scale.grid","color","","borderColor"),r.route("scale.border","color","","borderColor"),r.route("scale.title","color","","color"),r.describe("scale",{_fallback:!1,_scriptable:c=>!c.startsWith("before")&&!c.startsWith("after")&&c!=="callback"&&c!=="parser",_indexable:c=>c!=="borderDash"&&c!=="tickBorderDash"&&c!=="dash"}),r.describe("scales",{_fallback:"scale"}),r.describe("scale.ticks",{_scriptable:c=>c!=="backdropPadding"&&c!=="callback",_indexable:c=>c!=="backdropPadding"})}const ii=Object.create(null),an=Object.create(null);function Ve(r,c){if(!c)return r;const f=c.split(".");for(let g=0,m=f.length;g<m;++g){const x=f[g];r=r[x]||(r[x]=Object.create(null))}return r}function ni(r,c,f){return typeof c=="string"?xe(Ve(r,c),f):xe(Ve(r,""),c)}class xs{constructor(c,f){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=g=>g.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(g,m)=>ae(m.backgroundColor),this.hoverBorderColor=(g,m)=>ae(m.borderColor),this.hoverColor=(g,m)=>ae(m.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(c),this.apply(f)}set(c,f){return ni(this,c,f)}get(c){return Ve(this,c)}describe(c,f){return ni(an,c,f)}override(c,f){return ni(ii,c,f)}route(c,f,g,m){const x=Ve(this,c),v=Ve(this,g),k="_"+f;Object.defineProperties(x,{[k]:{value:x[f],writable:!0},[f]:{enumerable:!0,get(){const w=this[k],C=v[m];return yt(w)?Object.assign({},C,w):It(w,C)},set(w){this[k]=w}}})}apply(c){c.forEach(f=>f(this))}}var si=new xs({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ps,ms,_s]);function ln(r){return!r||re(r.size)||re(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}function Pi(r,c,f,g,m){let x=c[m];return x||(x=c[m]=r.measureText(m).width,f.push(m)),x>g&&(g=x),g}function ys(r,c,f,g){g=g||{};let m=g.data=g.data||{},x=g.garbageCollect=g.garbageCollect||[];g.font!==c&&(m=g.data={},x=g.garbageCollect=[],g.font=c),r.save(),r.font=c;let v=0;const k=f.length;let w,C,T,H,Y;for(w=0;w<k;w++)if(H=f[w],H!=null&&!Ft(H))v=Pi(r,m,x,v,H);else if(Ft(H))for(C=0,T=H.length;C<T;C++)Y=H[C],Y!=null&&!Ft(Y)&&(v=Pi(r,m,x,v,Y));r.restore();const rt=x.length/2;if(rt>f.length){for(w=0;w<rt;w++)delete m[x[w]];x.splice(0,rt)}return v}function cn(r,c,f){const g=r.currentDevicePixelRatio,m=f!==0?Math.max(f/2,.5):0;return Math.round((c-m)*g)/g+m}function hn(r,c){c=c||r.getContext("2d"),c.save(),c.resetTransform(),c.clearRect(0,0,r.width,r.height),c.restore()}function vs(r,c,f,g){Di(r,c,f,g,null)}function Di(r,c,f,g,m){let x,v,k,w,C,T,H,Y;const rt=c.pointStyle,pt=c.rotation,U=c.radius;let V=(pt||0)*Ge;if(rt&&typeof rt=="object"&&(x=rt.toString(),x==="[object HTMLImageElement]"||x==="[object HTMLCanvasElement]")){r.save(),r.translate(f,g),r.rotate(V),r.drawImage(rt,-rt.width/2,-rt.height/2,rt.width,rt.height),r.restore();return}if(!(isNaN(U)||U<=0)){switch(r.beginPath(),rt){default:m?r.ellipse(f,g,m/2,U,0,0,Jt):r.arc(f,g,U,0,Jt),r.closePath();break;case"triangle":T=m?m/2:U,r.moveTo(f+Math.sin(V)*T,g-Math.cos(V)*U),V+=vi,r.lineTo(f+Math.sin(V)*T,g-Math.cos(V)*U),V+=vi,r.lineTo(f+Math.sin(V)*T,g-Math.cos(V)*U),r.closePath();break;case"rectRounded":C=U*.516,w=U-C,v=Math.cos(V+gt)*w,H=Math.cos(V+gt)*(m?m/2-C:w),k=Math.sin(V+gt)*w,Y=Math.sin(V+gt)*(m?m/2-C:w),r.arc(f-H,g-k,C,V-kt,V-te),r.arc(f+Y,g-v,C,V-te,V),r.arc(f+H,g+k,C,V,V+te),r.arc(f-Y,g+v,C,V+te,V+kt),r.closePath();break;case"rect":if(!pt){w=Math.SQRT1_2*U,T=m?m/2:w,r.rect(f-T,g-w,2*T,2*w);break}V+=gt;case"rectRot":H=Math.cos(V)*(m?m/2:U),v=Math.cos(V)*U,k=Math.sin(V)*U,Y=Math.sin(V)*(m?m/2:U),r.moveTo(f-H,g-k),r.lineTo(f+Y,g-v),r.lineTo(f+H,g+k),r.lineTo(f-Y,g+v),r.closePath();break;case"crossRot":V+=gt;case"cross":H=Math.cos(V)*(m?m/2:U),v=Math.cos(V)*U,k=Math.sin(V)*U,Y=Math.sin(V)*(m?m/2:U),r.moveTo(f-H,g-k),r.lineTo(f+H,g+k),r.moveTo(f+Y,g-v),r.lineTo(f-Y,g+v);break;case"star":H=Math.cos(V)*(m?m/2:U),v=Math.cos(V)*U,k=Math.sin(V)*U,Y=Math.sin(V)*(m?m/2:U),r.moveTo(f-H,g-k),r.lineTo(f+H,g+k),r.moveTo(f+Y,g-v),r.lineTo(f-Y,g+v),V+=gt,H=Math.cos(V)*(m?m/2:U),v=Math.cos(V)*U,k=Math.sin(V)*U,Y=Math.sin(V)*(m?m/2:U),r.moveTo(f-H,g-k),r.lineTo(f+H,g+k),r.moveTo(f+Y,g-v),r.lineTo(f-Y,g+v);break;case"line":v=m?m/2:Math.cos(V)*U,k=Math.sin(V)*U,r.moveTo(f-v,g-k),r.lineTo(f+v,g+k);break;case"dash":r.moveTo(f,g),r.lineTo(f+Math.cos(V)*(m?m/2:U),g+Math.sin(V)*U);break;case!1:r.closePath();break}r.fill(),c.borderWidth>0&&r.stroke()}}function oi(r,c,f){return f=f||.5,!c||r&&r.x>c.left-f&&r.x<c.right+f&&r.y>c.top-f&&r.y<c.bottom+f}function ri(r,c){r.save(),r.beginPath(),r.rect(c.left,c.top,c.right-c.left,c.bottom-c.top),r.clip()}function He(r){r.restore()}function Ms(r,c,f,g,m){if(!c)return r.lineTo(f.x,f.y);if(m==="middle"){const x=(c.x+f.x)/2;r.lineTo(x,c.y),r.lineTo(x,f.y)}else m==="after"!=!!g?r.lineTo(c.x,f.y):r.lineTo(f.x,c.y);r.lineTo(f.x,f.y)}function dn(r,c,f,g){if(!c)return r.lineTo(f.x,f.y);r.bezierCurveTo(g?c.cp1x:c.cp2x,g?c.cp1y:c.cp2y,g?f.cp2x:f.cp1x,g?f.cp2y:f.cp1y,f.x,f.y)}function ks(r,c){c.translation&&r.translate(c.translation[0],c.translation[1]),re(c.rotation)||r.rotate(c.rotation),c.color&&(r.fillStyle=c.color),c.textAlign&&(r.textAlign=c.textAlign),c.textBaseline&&(r.textBaseline=c.textBaseline)}function ws(r,c,f,g,m){if(m.strikethrough||m.underline){const x=r.measureText(g),v=c-x.actualBoundingBoxLeft,k=c+x.actualBoundingBoxRight,w=f-x.actualBoundingBoxAscent,C=f+x.actualBoundingBoxDescent,T=m.strikethrough?(w+C)/2:C;r.strokeStyle=r.fillStyle,r.beginPath(),r.lineWidth=m.decorationWidth||2,r.moveTo(v,T),r.lineTo(k,T),r.stroke()}}function Ss(r,c){const f=r.fillStyle;r.fillStyle=c.color,r.fillRect(c.left,c.top,c.width,c.height),r.fillStyle=f}function Ps(r,c,f,g,m,x={}){const v=Ft(c)?c:[c],k=x.strokeWidth>0&&x.strokeColor!=="";let w,C;for(r.save(),r.font=m.string,ks(r,x),w=0;w<v.length;++w)C=v[w],x.backdrop&&Ss(r,x.backdrop),k&&(x.strokeColor&&(r.strokeStyle=x.strokeColor),re(x.strokeWidth)||(r.lineWidth=x.strokeWidth),r.strokeText(C,f,g,x.maxWidth)),r.fillText(C,f,g,x.maxWidth),ws(r,f,g,C,x),g+=Number(m.lineHeight);r.restore()}function un(r,c){const{x:f,y:g,w:m,h:x,radius:v}=c;r.arc(f+v.topLeft,g+v.topLeft,v.topLeft,1.5*kt,kt,!0),r.lineTo(f,g+x-v.bottomLeft),r.arc(f+v.bottomLeft,g+x-v.bottomLeft,v.bottomLeft,kt,te,!0),r.lineTo(f+m-v.bottomRight,g+x),r.arc(f+m-v.bottomRight,g+x-v.bottomRight,v.bottomRight,te,0,!0),r.lineTo(f+m,g+v.topRight),r.arc(f+m-v.topRight,g+v.topRight,v.topRight,0,-te,!0),r.lineTo(f+v.topLeft,g)}const fn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,gn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ds(r,c){const f=(""+r).match(fn);if(!f||f[1]==="normal")return c*1.2;switch(r=+f[2],f[3]){case"px":return r;case"%":r/=100;break}return c*r}const pn=r=>+r||0;function Te(r,c){const f={},g=yt(c),m=g?Object.keys(c):c,x=yt(r)?g?v=>It(r[v],r[c[v]]):v=>r[v]:()=>r;for(const v of m)f[v]=pn(x(v));return f}function Oi(r){return Te(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Os(r){return Te(r,["topLeft","topRight","bottomLeft","bottomRight"])}function Cs(r){const c=Oi(r);return c.width=c.left+c.right,c.height=c.top+c.bottom,c}function ai(r,c){r=r||{},c=c||si.font;let f=It(r.size,c.size);typeof f=="string"&&(f=parseInt(f,10));let g=It(r.style,c.style);g&&!(""+g).match(gn)&&(console.warn('Invalid font style specified: "'+g+'"'),g=void 0);const m={family:It(r.family,c.family),lineHeight:Ds(It(r.lineHeight,c.lineHeight),f),size:f,style:g,weight:It(r.weight,c.weight),string:""};return m.string=ln(m),m}function As(r,c,f,g){let m=!0,x,v,k;for(x=0,v=r.length;x<v;++x)if(k=r[x],k!==void 0&&(c!==void 0&&typeof k=="function"&&(k=k(c),m=!1),f!==void 0&&Ft(k)&&(k=k[f%k.length],m=!1),k!==void 0))return g&&!m&&(g.cacheable=!1),k}function fe(r,c,f){const{min:g,max:m}=r,x=bi(c,(m-g)/2),v=(k,w)=>f&&k===0?0:k+w;return{min:v(g,-Math.abs(x)),max:v(m,x)}}function Ci(r,c){return Object.assign(Object.create(r),c)}function Ai(r,c=[""],f,g,m=()=>r[0]){const x=f||r;typeof g>"u"&&(g=Mn("_fallback",r));const v={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:x,_fallback:g,_getTarget:m,override:k=>Ai([k,...r],c,x,g)};return new Proxy(v,{deleteProperty(k,w){return delete k[w],delete k._keys,delete r[0][w],!0},get(k,w){return bn(k,w,()=>Es(w,c,r,k))},getOwnPropertyDescriptor(k,w){return Reflect.getOwnPropertyDescriptor(k._scopes[0],w)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(k,w){return kn(k).includes(w)},ownKeys(k){return kn(k)},set(k,w,C){const T=k._storage||(k._storage=m());return k[w]=T[w]=C,delete k._keys,!0}})}function Ne(r,c,f,g){const m={_cacheable:!1,_proxy:r,_context:c,_subProxy:f,_stack:new Set,_descriptors:mn(r,g),setContext:x=>Ne(r,x,f,g),override:x=>Ne(r.override(x),c,f,g)};return new Proxy(m,{deleteProperty(x,v){return delete x[v],delete r[v],!0},get(x,v,k){return bn(x,v,()=>Ts(x,v,k))},getOwnPropertyDescriptor(x,v){return x._descriptors.allKeys?Reflect.has(r,v)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,v)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(x,v){return Reflect.has(r,v)},ownKeys(){return Reflect.ownKeys(r)},set(x,v,k){return r[v]=k,delete x[v],!0}})}function mn(r,c={scriptable:!0,indexable:!0}){const{_scriptable:f=c.scriptable,_indexable:g=c.indexable,_allKeys:m=c.allKeys}=r;return{allKeys:m,scriptable:f,indexable:g,isScriptable:Be(f)?f:()=>f,isIndexable:Be(g)?g:()=>g}}const Le=(r,c)=>r?r+yi(c):c,Ee=(r,c)=>yt(c)&&r!=="adapters"&&(Object.getPrototypeOf(c)===null||c.constructor===Object);function bn(r,c,f){if(Object.prototype.hasOwnProperty.call(r,c))return r[c];const g=f();return r[c]=g,g}function Ts(r,c,f){const{_proxy:g,_context:m,_subProxy:x,_descriptors:v}=r;let k=g[c];return Be(k)&&v.isScriptable(c)&&(k=Ye(c,k,r,f)),Ft(k)&&k.length&&(k=_n(c,k,r,v.isIndexable)),Ee(c,k)&&(k=Ne(k,m,x&&x[c],v)),k}function Ye(r,c,f,g){const{_proxy:m,_context:x,_subProxy:v,_stack:k}=f;if(k.has(r))throw new Error("Recursion detected: "+Array.from(k).join("->")+"->"+r);k.add(r);let w=c(x,v||g);return k.delete(r),Ee(r,w)&&(w=Ti(m._scopes,m,r,w)),w}function _n(r,c,f,g){const{_proxy:m,_context:x,_subProxy:v,_descriptors:k}=f;if(typeof x.index<"u"&&g(r))return c[x.index%c.length];if(yt(c[0])){const w=c,C=m._scopes.filter(T=>T!==w);c=[];for(const T of w){const H=Ti(C,m,r,T);c.push(Ne(H,x,v&&v[r],k))}}return c}function xn(r,c,f){return Be(r)?r(c,f):r}const Ls=(r,c)=>r===!0?c:typeof r=="string"?xi(c,r):void 0;function yn(r,c,f,g,m){for(const x of c){const v=Ls(f,x);if(v){r.add(v);const k=xn(v._fallback,f,m);if(typeof k<"u"&&k!==f&&k!==g)return k}else if(v===!1&&typeof g<"u"&&f!==g)return null}return!1}function Ti(r,c,f,g){const m=c._rootScopes,x=xn(c._fallback,f,g),v=[...r,...m],k=new Set;k.add(g);let w=vn(k,v,f,x||f,g);return w===null||typeof x<"u"&&x!==f&&(w=vn(k,v,x,w,g),w===null)?!1:Ai(Array.from(k),[""],m,x,()=>Li(c,f,g))}function vn(r,c,f,g,m){for(;f;)f=yn(r,c,f,g,m);return f}function Li(r,c,f){const g=r._getTarget();c in g||(g[c]={});const m=g[c];return Ft(m)&&yt(f)?f:m||{}}function Es(r,c,f,g){let m;for(const x of c)if(m=Mn(Le(x,r),f),typeof m<"u")return Ee(r,m)?Ti(f,g,r,m):m}function Mn(r,c){for(const f of c){if(!f)continue;const g=f[r];if(typeof g<"u")return g}}function kn(r){let c=r._keys;return c||(c=r._keys=Rs(r._scopes)),c}function Rs(r){const c=new Set;for(const f of r)for(const g of Object.keys(f).filter(m=>!m.startsWith("_")))c.add(g);return Array.from(c)}function Fs(r,c,f,g){const{iScale:m}=r,{key:x="r"}=this._parsing,v=new Array(g);let k,w,C,T;for(k=0,w=g;k<w;++k)C=k+f,T=c[C],v[k]={r:m.parse(xi(T,x),C)};return v}const le=Number.EPSILON||1e-14,ve=(r,c)=>c<r.length&&!r[c].skip&&r[c],Re=r=>r==="x"?"y":"x";function wn(r,c,f,g){const m=r.skip?c:r,x=c,v=f.skip?c:f,k=ye(x,m),w=ye(v,x);let C=k/(k+w),T=w/(k+w);C=isNaN(C)?0:C,T=isNaN(T)?0:T;const H=g*C,Y=g*T;return{previous:{x:x.x-H*(v.x-m.x),y:x.y-H*(v.y-m.y)},next:{x:x.x+Y*(v.x-m.x),y:x.y+Y*(v.y-m.y)}}}function ge(r,c,f){const g=r.length;let m,x,v,k,w,C=ve(r,0);for(let T=0;T<g-1;++T)if(w=C,C=ve(r,T+1),!(!w||!C)){if(Mi(c[T],0,le)){f[T]=f[T+1]=0;continue}m=f[T]/c[T],x=f[T+1]/c[T],k=Math.pow(m,2)+Math.pow(x,2),!(k<=9)&&(v=3/Math.sqrt(k),f[T]=m*v*c[T],f[T+1]=x*v*c[T])}}function Is(r,c,f="x"){const g=Re(f),m=r.length;let x,v,k,w=ve(r,0);for(let C=0;C<m;++C){if(v=k,k=w,w=ve(r,C+1),!k)continue;const T=k[f],H=k[g];v&&(x=(T-v[f])/3,k[`cp1${f}`]=T-x,k[`cp1${g}`]=H-x*c[C]),w&&(x=(w[f]-T)/3,k[`cp2${f}`]=T+x,k[`cp2${g}`]=H+x*c[C])}}function zs(r,c="x"){const f=Re(c),g=r.length,m=Array(g).fill(0),x=Array(g);let v,k,w,C=ve(r,0);for(v=0;v<g;++v)if(k=w,w=C,C=ve(r,v+1),!!w){if(C){const T=C[c]-w[c];m[v]=T!==0?(C[f]-w[f])/T:0}x[v]=k?C?Ae(m[v-1])!==Ae(m[v])?0:(m[v-1]+m[v])/2:m[v-1]:m[v]}ge(r,m,x),Is(r,x,c)}function li(r,c,f){return Math.max(Math.min(r,f),c)}function Ei(r,c){let f,g,m,x,v,k=oi(r[0],c);for(f=0,g=r.length;f<g;++f)v=x,x=k,k=f<g-1&&oi(r[f+1],c),x&&(m=r[f],v&&(m.cp1x=li(m.cp1x,c.left,c.right),m.cp1y=li(m.cp1y,c.top,c.bottom)),k&&(m.cp2x=li(m.cp2x,c.left,c.right),m.cp2y=li(m.cp2y,c.top,c.bottom)))}function Bs(r,c,f,g,m){let x,v,k,w;if(c.spanGaps&&(r=r.filter(C=>!C.skip)),c.cubicInterpolationMode==="monotone")zs(r,m);else{let C=g?r[r.length-1]:r[0];for(x=0,v=r.length;x<v;++x)k=r[x],w=wn(C,k,r[Math.min(x+1,v-(g?0:1))%v],c.tension),k.cp1x=w.previous.x,k.cp1y=w.previous.y,k.cp2x=w.next.x,k.cp2y=w.next.y,C=k}c.capBezierPoints&&Ei(r,f)}function Sn(){return typeof window<"u"&&typeof document<"u"}function ci(r){let c=r.parentNode;return c&&c.toString()==="[object ShadowRoot]"&&(c=c.host),c}function pe(r,c,f){let g;return typeof r=="string"?(g=parseInt(r,10),r.indexOf("%")!==-1&&(g=g/100*c.parentNode[f])):g=r,g}const hi=r=>r.ownerDocument.defaultView.getComputedStyle(r,null);function Ri(r,c){return hi(r).getPropertyValue(c)}const Pn=["top","right","bottom","left"];function me(r,c,f){const g={};f=f?"-"+f:"";for(let m=0;m<4;m++){const x=Pn[m];g[x]=parseFloat(r[c+"-"+x+f])||0}return g.width=g.left+g.right,g.height=g.top+g.bottom,g}const Dn=(r,c,f)=>(r>0||c>0)&&(!f||!f.shadowRoot);function Ws(r,c){const f=r.touches,g=f&&f.length?f[0]:r,{offsetX:m,offsetY:x}=g;let v=!1,k,w;if(Dn(m,x,r.target))k=m,w=x;else{const C=c.getBoundingClientRect();k=g.clientX-C.left,w=g.clientY-C.top,v=!0}return{x:k,y:w,box:v}}function js(r,c){if("native"in r)return r;const{canvas:f,currentDevicePixelRatio:g}=c,m=hi(f),x=m.boxSizing==="border-box",v=me(m,"padding"),k=me(m,"border","width"),{x:w,y:C,box:T}=Ws(r,f),H=v.left+(T&&k.left),Y=v.top+(T&&k.top);let{width:rt,height:pt}=c;return x&&(rt-=v.width+k.width,pt-=v.height+k.height),{x:Math.round((w-H)/rt*f.width/g),y:Math.round((C-Y)/pt*f.height/g)}}function Vs(r,c,f){let g,m;if(c===void 0||f===void 0){const x=ci(r);if(!x)c=r.clientWidth,f=r.clientHeight;else{const v=x.getBoundingClientRect(),k=hi(x),w=me(k,"border","width"),C=me(k,"padding");c=v.width-C.width-w.width,f=v.height-C.height-w.height,g=pe(k.maxWidth,x,"clientWidth"),m=pe(k.maxHeight,x,"clientHeight")}}return{width:c,height:f,maxWidth:g||de,maxHeight:m||de}}const di=r=>Math.round(r*10)/10;function On(r,c,f,g){const m=hi(r),x=me(m,"margin"),v=pe(m.maxWidth,r,"clientWidth")||de,k=pe(m.maxHeight,r,"clientHeight")||de,w=Vs(r,c,f);let{width:C,height:T}=w;if(m.boxSizing==="content-box"){const Y=me(m,"border","width"),rt=me(m,"padding");C-=rt.width+Y.width,T-=rt.height+Y.height}return C=Math.max(0,C-x.width),T=Math.max(0,g?C/g:T-x.height),C=di(Math.min(C,v,w.maxWidth)),T=di(Math.min(T,k,w.maxHeight)),C&&!T&&(T=di(C/2)),(c!==void 0||f!==void 0)&&g&&w.height&&T>w.height&&(T=w.height,C=di(Math.floor(T*g))),{width:C,height:T}}function Hs(r,c,f){const g=c||1,m=Math.floor(r.height*g),x=Math.floor(r.width*g);r.height=Math.floor(r.height),r.width=Math.floor(r.width);const v=r.canvas;return v.style&&(f||!v.style.height&&!v.style.width)&&(v.style.height=`${r.height}px`,v.style.width=`${r.width}px`),r.currentDevicePixelRatio!==g||v.height!==m||v.width!==x?(r.currentDevicePixelRatio=g,v.height=m,v.width=x,r.ctx.setTransform(g,0,0,g,0,0),!0):!1}const Ns=function(){let r=!1;try{const c={get passive(){return r=!0,!1}};Sn()&&(window.addEventListener("test",null,c),window.removeEventListener("test",null,c))}catch{}return r}();function Ys(r,c){const f=Ri(r,c),g=f&&f.match(/^(\d+)(\.\d+)?px$/);return g?+g[1]:void 0}function Me(r,c,f,g){return{x:r.x+f*(c.x-r.x),y:r.y+f*(c.y-r.y)}}function Cn(r,c,f,g){return{x:r.x+f*(c.x-r.x),y:g==="middle"?f<.5?r.y:c.y:g==="after"?f<1?r.y:c.y:f>0?c.y:r.y}}function An(r,c,f,g){const m={x:r.cp2x,y:r.cp2y},x={x:c.cp1x,y:c.cp1y},v=Me(r,m,f),k=Me(m,x,f),w=Me(x,c,f),C=Me(v,k,f),T=Me(k,w,f);return Me(C,T,f)}const $s=function(r,c){return{x(f){return r+r+c-f},setWidth(f){c=f},textAlign(f){return f==="center"?f:f==="right"?"left":"right"},xPlus(f,g){return f-g},leftForLtr(f,g){return f-g}}},Us=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,c){return r+c},leftForLtr(r,c){return r}}};function Xs(r,c,f){return r?$s(c,f):Us()}function Fi(r,c){let f,g;(c==="ltr"||c==="rtl")&&(f=r.canvas.style,g=[f.getPropertyValue("direction"),f.getPropertyPriority("direction")],f.setProperty("direction",c,"important"),r.prevTextDirection=g)}function Ks(r,c){c!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",c[0],c[1]))}function ui(r){return r==="angle"?{between:Qi,compare:Gi,normalize:se}:{between:Je,compare:(c,f)=>c-f,normalize:c=>c}}function Ii({start:r,end:c,count:f,loop:g,style:m}){return{start:r%f,end:c%f,loop:g&&(c-r+1)%f===0,style:m}}function Tn(r,c,f){const{property:g,start:m,end:x}=f,{between:v,normalize:k}=ui(g),w=c.length;let{start:C,end:T,loop:H}=r,Y,rt;if(H){for(C+=w,T+=w,Y=0,rt=w;Y<rt&&v(k(c[C%w][g]),m,x);++Y)C--,T--;C%=w,T%=w}return T<C&&(T+=w),{start:C,end:T,loop:H,style:r.style}}function zi(r,c,f){if(!f)return[r];const{property:g,start:m,end:x}=f,v=c.length,{compare:k,between:w,normalize:C}=ui(g),{start:T,end:H,loop:Y,style:rt}=Tn(r,c,f),pt=[];let U=!1,V=null,Ot,Fe,$e;const eo=()=>w(m,$e,Ot)&&k(m,$e)!==0,Rn=()=>k(x,Ot)===0||w(x,$e,Ot),io=()=>U||eo(),Fn=()=>!U||Rn();for(let be=T,In=T;be<=H;++be)Fe=c[be%v],!Fe.skip&&(Ot=C(Fe[g]),Ot!==$e&&(U=w(Ot,m,x),V===null&&io()&&(V=k(Ot,m)===0?be:In),V!==null&&Fn()&&(pt.push(Ii({start:V,end:be,loop:Y,count:v,style:rt})),V=null),In=be,$e=Ot));return V!==null&&pt.push(Ii({start:V,end:H,loop:Y,count:v,style:rt})),pt}function Gs(r,c){const f=[],g=r.segments;for(let m=0;m<g.length;m++){const x=zi(g[m],r.points,c);x.length&&f.push(...x)}return f}function Qs(r,c,f,g){let m=0,x=c-1;if(f&&!g)for(;m<c&&!r[m].skip;)m++;for(;m<c&&r[m].skip;)m++;for(m%=c,f&&(x+=m);x>m&&r[x%c].skip;)x--;return x%=c,{start:m,end:x}}function qs(r,c,f,g){const m=r.length,x=[];let v=c,k=r[c],w;for(w=c+1;w<=f;++w){const C=r[w%m];C.skip||C.stop?k.skip||(g=!1,x.push({start:c%m,end:(w-1)%m,loop:g}),c=v=C.stop?w:null):(v=w,k.skip&&(c=w)),k=C}return v!==null&&x.push({start:c%m,end:v%m,loop:g}),x}function Zs(r,c){const f=r.points,g=r.options.spanGaps,m=f.length;if(!m)return[];const x=!!r._loop,{start:v,end:k}=Qs(f,m,x,g);if(g===!0)return Ln(r,[{start:v,end:k,loop:x}],f,c);const w=k<v?k+m:k,C=!!r._fullLoop&&v===0&&k===m-1;return Ln(r,qs(f,v,w,C),f,c)}function Ln(r,c,f,g){return!g||!g.setContext||!f?c:Js(r,c,f,g)}function Js(r,c,f,g){const m=r._chart.getContext(),x=En(r.options),{_datasetIndex:v,options:{spanGaps:k}}=r,w=f.length,C=[];let T=x,H=c[0].start,Y=H;function rt(pt,U,V,Ot){const Fe=k?-1:1;if(pt!==U){for(pt+=w;f[pt%w].skip;)pt-=Fe;for(;f[U%w].skip;)U+=Fe;pt%w!==U%w&&(C.push({start:pt%w,end:U%w,loop:V,style:Ot}),T=Ot,H=U%w)}}for(const pt of c){H=k?H:pt.start;let U=f[H%w],V;for(Y=H+1;Y<=pt.end;Y++){const Ot=f[Y%w];V=En(g.setContext(Ci(m,{type:"segment",p0:U,p1:Ot,p0DataIndex:(Y-1)%w,p1DataIndex:Y%w,datasetIndex:v}))),to(V,T)&&rt(H,Y-1,pt.loop,T),U=Ot,T=V}H<Y-1&&rt(H,Y-1,pt.loop,T)}return C}function En(r){return{backgroundColor:r.backgroundColor,borderCapStyle:r.borderCapStyle,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderJoinStyle:r.borderJoinStyle,borderWidth:r.borderWidth,borderColor:r.borderColor}}function to(r,c){if(!c)return!1;const f=[],g=function(m,x){return Si(x)?(f.includes(x)||f.push(x),f.indexOf(x)):x};return JSON.stringify(r,g)!==JSON.stringify(c,g)}},"./node_modules/chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm.js":function(vt,nt,G){"use strict";var d=G("./node_modules/chart.js/dist/chart.js"),W=G("./node_modules/dayjs/dayjs.min.js"),X=G("./node_modules/dayjs/plugin/customParseFormat.js"),Q=G("./node_modules/dayjs/plugin/advancedFormat.js"),ut=G("./node_modules/dayjs/plugin/quarterOfYear.js"),j=G("./node_modules/dayjs/plugin/localizedFormat.js"),at=G("./node_modules/dayjs/plugin/isoWeek.js");W.extend(Q),W.extend(ut),W.extend(j),W.extend(X),W.extend(at);var K={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};d.ij._date.override({formats:function(){return K},parse:function(et,ft){var z=typeof et;return et===null||z==="undefined"?null:z==="string"&&typeof ft=="string"?W(et,ft).isValid()?W(et,ft).valueOf():null:et instanceof W?null:W(et).isValid()?W(et).valueOf():null},format:function(et,ft){return W(et).format(ft)},add:function(et,ft,z){return W(et).add(ft,z).valueOf()},diff:function(et,ft,z){return W(et).diff(W(ft),z)},startOf:function(et,ft,z){if(ft==="isoWeek"){var q=typeof z=="number"&&z>0&&z<7?z:1;return W(et).isoWeekday(q).startOf("day").valueOf()}return W(et).startOf(ft).valueOf()},endOf:function(et,ft){return W(et).endOf(ft).valueOf()}})},"./node_modules/vue-chartjs/dist/index.js":function(vt,nt,G){"use strict";G.d(nt,{N1:function(){return At},yP:function(){return Gt}});var d=G("./node_modules/chart.js/dist/chart.js"),W=G("./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js"),X=G("./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");const Q={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},j={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Q,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},at=W.rE[0]==="2"?(N,tt)=>Object.assign(N,{attrs:tt}):(N,tt)=>Object.assign(N,tt);function K(N){return(0,X.ju)(N)?(0,X.ux)(N):N}function lt(N){let tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N;return(0,X.ju)(tt)?new Proxy(N,{}):N}function et(N,tt){const st=N.options;st&&tt&&Object.assign(st,tt)}function ft(N,tt){N.labels=tt}function z(N,tt,st){const wt=[];N.datasets=tt.map(bt=>{const ot=N.datasets.find(Lt=>Lt[st]===bt[st]);return!ot||!bt.data||wt.includes(ot)?{...bt}:(wt.push(ot),Object.assign(ot,bt),ot)})}function q(N,tt){const st={labels:[],datasets:[]};return ft(st,N.labels),z(st,N.datasets,tt),st}function ct(N,tt){return N.getElementsAtEventForMode(tt,"dataset",{intersect:!0},!1)}function ht(N,tt){return N.getElementsAtEventForMode(tt,"nearest",{intersect:!0},!1)}function Pt(N,tt){return N.getElementsAtEventForMode(tt,"index",{intersect:!0},!1)}const Bt=(0,W.pM)({props:j,setup(N,tt){let{expose:st,slots:wt}=tt;const bt=(0,X.KR)(null),ot=(0,X.IJ)(null);st({chart:ot});const Lt=()=>{if(!bt.value)return;const{type:Et,data:ne,options:he,plugins:Qt,datasetIdKey:Nt}=N,qt=q(ne,Nt),St=lt(qt,ne);ot.value=new d.t1(bt.value,{type:Et,data:St,options:{...he},plugins:Qt})},Ht=()=>{const Et=(0,X.ux)(ot.value);Et&&(N.destroyDelay>0?setTimeout(()=>{Et.destroy(),ot.value=null},N.destroyDelay):(Et.destroy(),ot.value=null))},we=Et=>{Et.update(N.updateMode)};return(0,W.sV)(Lt),(0,W.hi)(Ht),(0,W.wB)([()=>N.options,()=>N.data],(Et,ne)=>{let[he,Qt]=Et,[Nt,qt]=ne;const St=(0,X.ux)(ot.value);if(!St)return;let $t=!1;if(he){const Rt=K(he),Yt=K(Nt);Rt&&Rt!==Yt&&(et(St,Rt),$t=!0)}if(Qt){const Rt=K(Qt.labels),Yt=K(qt.labels),Mt=K(Qt.datasets),Se=K(qt.datasets);Rt!==Yt&&(ft(St.config.data,Rt),$t=!0),Mt&&Mt!==Se&&(z(St.config.data,Mt,N.datasetIdKey),$t=!0)}$t&&(0,W.dY)(()=>{we(St)})},{deep:!0}),()=>(0,W.h)("canvas",{role:"img",ariaLabel:N.ariaLabel,ariaDescribedby:N.ariaDescribedby,ref:bt},[(0,W.h)("p",{},[wt.default?wt.default():""])])}});function Kt(N,tt){return d.t1.register(tt),(0,W.pM)({props:Q,setup(st,wt){let{expose:bt}=wt;const ot=(0,X.IJ)(null),Lt=Ht=>{ot.value=Ht?.chart};return bt({chart:ot}),()=>(0,W.h)(Bt,at({ref:Lt},{type:N,...st}))}})}const Gt=Kt("bar",d.A6),Wt=null,At=Kt("line",d.ZT),Tt=null,jt=null,Dt=null,xt=null,Vt=null}}]);