From 6090450faaff89dad18b44523ded2264d4fe6f99 Mon Sep 17 00:00:00 2001 From: Upptime Bot <73812536+upptime-bot@users.noreply.github.com> Date: Sat, 3 Dec 2022 02:10:27 +0000 Subject: [PATCH] deploy: a09535b388bb18895713abc1c564e803b4e49b11 --- client/_number_.56a36acc.js | 2 +- client/createOctokit.8667135d.js | 2 +- client/legacy/_number_.b6a5245c.js | 2 +- client/legacy/createOctokit.126881c2.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/_number_.56a36acc.js b/client/_number_.56a36acc.js index 427dd76e6e..916f9d6d8b 100644 --- a/client/_number_.56a36acc.js +++ b/client/_number_.56a36acc.js @@ -18,4 +18,4 @@ function fe(t){return t+.5|0}const ge=(t,e,i)=>Math.max(Math.min(t,i),e);functio * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License - */var _s=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=se.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ys={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=qe(t||"transparent"),n=s.valid&&qe(e||"transparent");return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class vs{constructor(t,e,i,s){const n=e[i];s=Mi([t.to,s,n,t.from]);const o=Mi([t.from,n,s]);this._active=!0,this._fn=t.fn||ys[t.type||typeof o],this._easing=ue[t.easing]||ue.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=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Mi([t.to,e,s,t.from]),this._from=Mi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ti.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ti.describe("animations",{_fallback:"animation"}),ti.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ms{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!rt(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const s=t[i];if(!rt(s))return;const n={};for(const t of ws)n[t]=s[t];(at(s.properties)&&s.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new vs(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(_s.add(this._chart,i),!0):void 0}}function ks(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Ss(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function As(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Es(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const Ls=t=>"reset"===t||"none"===t,Rs=(t,e)=>e?t:Object.assign({},t);class Is{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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ps(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Es(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=ct(i.xAxisID,Ts(t,"x")),o=e.yAxisID=ct(i.yAxisID,Ts(t,"y")),a=e.rAxisID=ct(i.rAxisID,Ts(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,n,o,a),h=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}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&&ee(this._data,this),t._stacked&&Es(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rt(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,o;for(s=0,n=e.length;s{const e="_onData"+Mt(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=Ps(e.vScale,e),e.stack!==i.stack&&(s=!0,Es(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&As(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,a=n.axis;let r,l,h,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=at(s[t])?this.parseArrayData(i,s,t,e):rt(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===l[a]||d&&l[a]t&&!e.hidden&&e._stacked&&{keys:Ss(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=s[d];const e=u[a.axis];return!lt(u[t.axis])||h>e||c=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Rs(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new Ms(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ls(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){Ls(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Ls(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;at-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(kt(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function $s(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;ht.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if(ot(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!a(i))&&((!1===n||-1===o.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(c,e,o)*n,d===o&&(p-=c/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),a=Math.max(t,i);p=Math.max(Math.min(p,a),s),h=p+c}if(p===e.getPixelForValue(o)){const t=zt(c)*e.getLineWidthForValue(o)/2;p+=t,c-=t}return{size:c,base:p,head:h,center:h+c/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=ct(s.maxBarThickness,1/0);let a,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),a=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+o+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d""}}}};class Us extends Is{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,a=t=>+i[t];if(rt(i[t])){const{key:t="value"}=this._parsing;a=e=>+wt(i[e],t)}for(n=t,o=t+e;nqt(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>qt(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,h,d),m=f(Et,c,u),b=g(Pt,h,d),x=g(Pt+Et,c,u);s=(p-b)/2,n=(m-x)/2,o=-(p+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),b=(i.width-o)/f,x=(i.height-o)/g,_=Math.max(Math.min(b,x)/2,0),y=dt(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/Ot)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?Ot*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ls(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s"spacing"!==t,_indexable:t=>"spacing"!==t},Us.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return at(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Xs extends Is{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=re(e,s,o);this._drawStart=a,this._drawCount=r,le(e)&&(a=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,a,r,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,s),d=o.axis,u=a.axis,{spanGaps:f,segment:g}=this.options,p=$t(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||n||"none"===s;let b=e>0&&this.getParsed(e-1);for(let f=e;f0&&Math.abs(i[d]-b[d])>p,g&&(x.parsed=i,x.raw=l.data[f]),c&&(x.options=h||this.resolveDataElementOptions(f,e.active?"active":s)),m||this.updateElement(e,f,x,s),b=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Xs.id="line",Xs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Xs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class qs extends Is{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ls(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return $i.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*Pt;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Nt(this.resolveDataElementOptions(t,e).angle||i):0}}qs.id="polarArea",qs.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},qs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Ks extends Us{}Ks.id="pie",Ks.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Gs extends Is{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,s){return $i.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}Zs.defaults={},Zs.defaultRoutes=void 0;const Js={values:t=>at(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=It(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ls(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(It(t)));return 1===s||2===s||5===s?Js.numeric.call(this,t,e,i):""}};var Qs={formatters:Js};function tn(t,e){const i=t.options.ticks,s=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;is)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nt-e)).pop(),e}(s);for(let t=0,e=o.length-1;tn)return e}return Math.max(n,1)}(n,e,s);if(o>0){let t,i;const s=o>1?Math.round((r-a)/(o-1)):null;for(en(e,l,h,ot(s)?0:a-s,a),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Qs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ti.route("scale.ticks","color","","color"),ti.route("scale.grid","color","","borderColor"),ti.route("scale.grid","borderColor","","borderColor"),ti.route("scale.title","color","","color"),ti.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ti.describe("scales",{_fallback:"scale"}),ti.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const sn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function nn(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return h}function an(t){return t.drawTicks?t.tickLength:0}function rn(t,e){if(!t.display)return 0;const i=wi(t.font,e),s=vi(t.padding);return(at(t.text)?t.text.length:1)*i.lineHeight+s.height}function ln(t,e,i){let s=oe(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class hn extends Zs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=ht(t,Number.POSITIVE_INFINITY),e=ht(e,Number.NEGATIVE_INFINITY),i=ht(i,Number.POSITIVE_INFINITY),s=ht(s,Number.NEGATIVE_INFINITY),{min:ht(t,i),max:ht(e,s),minDefined:lt(t),maxDefined:lt(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;rs?s:i,s=n&&i>s?i:s,{min:ht(i,ht(s,i)),max:ht(s,ht(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ut(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.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=function(t,e,i){const{min:s,max:n}=t,o=dt(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Kt(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-an(t.grid)-e.padding-rn(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Wt(Math.min(Math.asin(Kt((h.highest.height+6)/o,-1,1)),Math.asin(Kt(a/r,-1,1))-Math.asin(Kt(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){ut(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ut(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=rn(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=an(n)+o):(t.height=this.maxHeight,t.width=an(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=Nt(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ut(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:n[t]||0,height:o[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:n,heights:o}}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 Kt(this._alignToPixels?si(this.chart,e,0):e,-32768,32767)}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&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o}=s,a=n.offset,r=this.isHorizontal(),l=this.ticks.length+(a?1:0),h=an(n),c=[],d=n.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,g=function(t){return si(i,t,u)};let p,m,b,x,_,y,v,w,M,k,S,D;if("top"===o)p=g(this.bottom),y=this.bottom-h,w=p-f,k=g(t.top)+f,D=t.bottom;else if("bottom"===o)p=g(this.top),k=t.top,D=g(t.bottom)-f,y=p+f,w=this.top+h;else if("left"===o)p=g(this.right),_=this.right-h,v=p-f,M=g(t.left)+f,S=t.right;else if("right"===o)p=g(this.left),M=t.left,S=g(t.right)-f,_=p+f,v=this.left+h;else if("x"===e){if("center"===o)p=g((t.top+t.bottom)/2+.5);else if(rt(o)){const t=Object.keys(o)[0],e=o[t];p=g(this.chart.scales[t].getPixelForValue(e))}k=t.top,D=t.bottom,y=p+f,w=y+h}else if("y"===e){if("center"===o)p=g((t.left+t.right)/2);else if(rt(o)){const t=Object.keys(o)[0],e=o[t];p=g(this.chart.scales[t].getPixelForValue(e))}_=p-f,v=_-h,M=t.left,S=t.right}const P=ct(s.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/P));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ti.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&ti.describe(e,t.descriptors)}(t,o,i),this.override&&ti.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ti[s]&&(delete ti[s][i],this.override&&delete Ge[i])}}var dn=new class{constructor(){this.controllers=new cn(Is,"datasets",!0),this.elements=new cn(Zs,"elements"),this.plugins=new cn(Object,"plugins"),this.scales=new cn(hn,"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((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):ft(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=Mt(t);ut(i["before"+s],[],i),e[t](i),ut(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let h=e;h0&&Math.abs(i[u]-x[u])>m,p&&(g.parsed=i,g.raw=l.data[h]),d&&(g.options=c||this.resolveDataElementOptions(h,e.active?"active":s)),b||this.updateElement(e,h,g,s),x=i}this.updateSharedOptions(c,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}un.id="scatter",un.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},un.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var fn=Object.freeze({__proto__:null,BarController:js,BubbleController:Ys,DoughnutController:Us,LineController:Xs,PolarAreaController:qs,PieController:Ks,RadarController:Gs,ScatterController:un});function gn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pn{constructor(t){this.options=t||{}}init(t){}formats(){return gn()}parse(t,e){return gn()}format(t,e){return gn()}add(t,e,i){return gn()}diff(t,e,i){return gn()}startOf(t,e,i){return gn()}endOf(t,e){return gn()}}pn.override=function(t){Object.assign(pn.prototype,t)};var mn={_date:pn};function bn(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?Qt:Jt;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function xn(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var Mn={evaluateInteractionItems:xn,modes:{index(t,e,i,s){const n=Ji(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?_n(t,n,o,s,a):vn(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=Ji(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?_n(t,n,o,s,a):vn(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t_n(t,Ji(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=Ji(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return vn(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>wn(t,Ji(e,t),"x",i.intersect,s),y:(t,e,i,s)=>wn(t,Ji(e,t),"y",i.intersect,s)}};const kn=["left","top","right","bottom"];function Sn(t,e){return t.filter((t=>t.pos===e))}function Dn(t,e){return t.filter((t=>-1===kn.indexOf(t.pos)&&t.box.axis===e))}function Pn(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function On(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!kn.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function Ln(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),s=Pn(Sn(e,"left"),!0),n=Pn(Sn(e,"right")),o=Pn(Sn(e,"top"),!0),a=Pn(Sn(e,"bottom")),r=Dn(e,"x"),l=Dn(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Sn(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;ft(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);An(u,vi(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=On(l.concat(h),d);Ln(r.fullSize,f,d,g),Ln(l,f,d,g),Ln(h,f,d,g)&&Ln(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),In(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,In(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ft(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Fn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class $n extends Fn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Vn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Bn=t=>null===t||""===t;const Nn=!!is&&{passive:!0};function Wn(t,e,i){t.canvas.removeEventListener(e,i,Nn)}function Hn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function jn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Hn(i.addedNodes,s),e=e&&!Hn(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Yn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Hn(i.removedNodes,s),e=e&&!Hn(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const Un=new Map;let Xn=0;function qn(){const t=window.devicePixelRatio;t!==Xn&&(Xn=t,Un.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Kn(t,e,i){const s=t.canvas,n=s&&Xi(s);if(!n)return;const o=ne(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){Un.size||window.addEventListener("resize",qn),Un.set(t,e)}(t,o),a}function Gn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Un.delete(t),Un.size||window.removeEventListener("resize",qn)}(t)}function Zn(t,e,i){const s=t.canvas,n=ne((e=>{null!==t.ctx&&i(function(t,e){const i=Vn[t.type]||t.type,{x:s,y:n}=Ji(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Nn)}(s,e,n),n}class Jn extends Fn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Bn(n)){const e=ss(t,"width");void 0!==e&&(t.width=e)}if(Bn(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ss(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const s=i[t];ot(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:jn,detach:Yn,resize:Kn}[e]||Zn;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Gn,detach:Gn,resize:Gn}[e]||Wn)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ts(t,e,i,s)}isAttached(t){const e=Xi(t);return!(!e||!e.isConnected)}}class Qn{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===ut(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){ot(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=ct(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(dn.plugins.items);for(let t=0;tt.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function to(t,e){return e||!1!==t?!0===t?{}:t:null}function eo(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function io(t,e){const i=ti.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function so(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function no(t){const e=t.options||(t.options={});e.plugins=ct(e.plugins,{}),e.scales=function(t,e){const i=Ge[t.type]||{scales:{}},s=e.scales||{},n=io(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(s).forEach((t=>{const e=s[t];if(!rt(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=so(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),h=i.scales||{};o[r]=o[r]||t,a[t]=_t(Object.create(null),[{axis:r},e,h[r],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,r=i.indexAxis||io(n,e),l=(Ge[n]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||o[e]||e;a[n]=a[n]||Object.create(null),_t(a[n],[{axis:e},s[n],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];_t(e,[ti.scales[e.type],ti.scale])})),a}(t,e)}function oo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const ao=new Map,ro=new Set;function lo(t,e){let i=ao.get(t);return i||(i=e(),ao.set(t,i),ro.add(i)),i}const ho=(t,e,i)=>{const s=wt(e,i);void 0!==s&&t.add(s)};class co{constructor(t){this._config=function(t){return(t=t||{}).data=oo(t.data),no(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=oo(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(),no(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return lo(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return lo(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return lo(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return lo(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>ho(r,t,e)))),e.forEach((t=>ho(r,s,t))),e.forEach((t=>ho(r,Ge[n]||{},t))),e.forEach((t=>ho(r,ti,t))),e.forEach((t=>ho(r,Ze,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),ro.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ge[e]||{},ti.datasets[e]||{},{type:e},ti,Ze]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=uo(this._resolverCache,t,s);let r=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=Pi(t);for(const n of e){const e=i(n),o=s(n),a=(o||e)&&t[n];if(e&&(St(a)||fo(a))||o&&at(a))return!0}return!1}(o,e)){n.$shared=!1;r=Di(o,i=St(i)?i():i,this.createResolver(t,i,a))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],s){const{resolver:n}=uo(this._resolverCache,t,i);return rt(e)?Di(n,e,void 0,s):n}}function uo(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Si(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const fo=t=>rt(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||St(t[i])),!1);const go=["top","bottom","left","right","chartArea"];function po(t,e){return"top"===t||"bottom"===t||-1===go.indexOf(t)&&"x"===e}function mo(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function bo(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),ut(i&&i.onComplete,[t],e)}function xo(t){const e=t.chart,i=e.options.animation;ut(i&&i.onProgress,[t],e)}function _o(t){return Ui()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yo={},vo=t=>{const e=_o(t);return Object.values(yo).filter((t=>t.canvas===e)).pop()};function wo(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}class Mo{constructor(t,e){const i=this.config=new co(e),s=_o(t),n=vo(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ui()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?$n:Jn}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),r=a&&a.canvas,l=r&&r.height,h=r&&r.width;this.id=nt(),this.ctx=a,this.canvas=r,this.width=h,this.height=l,this._options=o,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 Qn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],yo[this.id]=this,a&&r?(_s.listen(this,"complete",bo),_s.listen(this,"progress",xo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return ot(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():es(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ni(this.canvas,this.ctx),this}stop(){return _s.stop(this),this}resize(t,e){_s.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,es(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),ut(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ft(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=so(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),ft(n,(e=>{const n=e.options,o=n.id,a=so(o,n),r=ct(n.type,e.dtype);void 0!==n.position&&po(n.position,a)===po(e.dposition)||(n.position=e.dposition),s[o]=!0;let l=null;if(o in i&&i[o].type===r)l=i[o];else{l=new(dn.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),ft(s,((t,e)=>{t||delete i[e]})),ft(i,(t=>{zn.configure(this,t,t.options),zn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{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()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(mo("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ft(this.scales,(t=>{zn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Dt(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){wo(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;zn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],ft(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&li(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&hi(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ri(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Mn.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ki(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);kt(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),_s.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};ft(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){ft(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},ft(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!gt(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,ut(n.onHover,[t,a,this],this),r&&ut(n.onClick,[t,a,this],this));const h=!gt(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}const ko=()=>ft(Mo.instances,(t=>t._plugins.invalidate()));function So(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=e;let h=n/r;t.beginPath(),t.arc(o,a,r,s-h,i+h),l>n?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+Et,s-Et),t.closePath(),t.clip()}function Do(t,e,i,s){const n=xi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Kt(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Kt(n.innerStart,0,a),innerEnd:Kt(n.innerEnd,0,a)}}function Po(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Oo(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const g=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/Pt)/d)/2,m=l+p+f,b=n-p-f,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=Do(e,u,d,b-m),w=d-x,M=d-_,k=m+x/w,S=b-_/M,D=u+y,P=u+v,O=m+y/D,C=b-v/P;if(t.beginPath(),o){if(t.arc(a,r,d,k,S),_>0){const e=Po(M,S,a,r);t.arc(e.x,e.y,_,S,b+Et)}const e=Po(P,b,a,r);if(t.lineTo(e.x,e.y),v>0){const e=Po(P,C,a,r);t.arc(e.x,e.y,v,b+Et,C+Math.PI)}if(t.arc(a,r,u,b-v/u,m+y/u,!0),y>0){const e=Po(D,O,a,r);t.arc(e.x,e.y,y,O+Math.PI,m-Et)}const i=Po(w,m,a,r);if(t.lineTo(i.x,i.y),x>0){const e=Po(w,k,a,r);t.arc(e.x,e.y,x,m-Et,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function Co(t,e,i,s,n,o){const{options:a}=e,{borderWidth:r,borderJoinStyle:l}=a,h="inner"===a.borderAlign;r&&(h?(t.lineWidth=2*r,t.lineJoin=l||"round"):(t.lineWidth=r,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:s,y:n,startAngle:o,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),h=e.innerRadius+a;let c;for(i&&So(t,e,o+Ot),t.beginPath(),t.arc(s,n,h,o+Ot,o,!0),c=0;c{dn.add(...t),ko()}},unregister:{enumerable:true,value:(...t)=>{dn.remove(...t),ko()}}});class Ao extends Zs{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=jt(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=ct(c,r-a)>=Ot||qt(n,a,r),f=Gt(o,l+d,h+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Ot?Math.floor(i/Ot):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(s){a=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*a,Math.sin(e)*a),this.circumference>=Pt&&(a=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){Oo(t,e,i,s,a+Ot,n);for(let e=0;er&&o>r;return{count:s,start:l,loop:e.loop,ilen:h(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=g=i),p=i}_()}function zo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Io:Ro}Ao.id="arc",Ao.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Ao.defaultRoutes={backgroundColor:"backgroundColor"};const Fo="function"==typeof Path2D;function $o(t,e,i,s){Fo&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),To(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=zo(e);for(const r of n)To(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Vo extends Zs{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Yi(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return ms(t,!0===s?[{start:a,end:r,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r"borderDash"!==t&&"fill"!==t};class No extends Zs{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2){Go(t)}))}var Jo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Zo(t);const s=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:o,indexAxis:a}=e,r=t.getDatasetMeta(n),l=o||e.data;if("y"===Mi([a,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const h=t.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=Kt(Jt(e,o.axis,a).lo,0,i-1)),s=h?Kt(Jt(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(r,l);if(d<=(i.threshold||4*s))return void Go(e);let u;switch(ot(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,g,p=e;for(a[l++]=t[p],c=0;cu&&(u=f,d=t[s],g=s);a[l++]=d,p=g}return a[l++]=t[h],a}(l,c,d,s,i);break;case"min-max":u=function(t,e,i,s){let n,o,a,r,l,h,c,d,u,f,g=0,p=0;const m=[],b=e+i-1,x=t[e].x,_=t[b].x-x;for(n=e;nf&&(f=r,c=n),g=(p*g+o.x)/++p;else{const i=n-1;if(!ot(h)&&!ot(c)){const e=Math.min(h,c),s=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:g}),s!==d&&s!==i&&m.push({...t[s],x:g})}n>0&&i!==d&&m.push(t[i]),m.push(o),l=e,p=0,u=f=r,h=c=d=n}}return m}(l,c,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Zo(t)}};function Qo(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=Xt(n),o=Xt(o)),{property:t,start:n,end:o}}function ta(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ea(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function ia(t,e){let i=[],s=!1;return at(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=ta(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new Vo({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function sa(t){return t&&!1!==t.fill}function na(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!lt(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function oa(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=ct(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(rt(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return lt(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function aa(t,e,i){const s=[];for(let n=0;n=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&ca(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;sa(i)&&ca(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;sa(s)&&"beforeDatasetDraw"===i.drawTime&&ca(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ma=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class ba extends Zs{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=ut(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=wi(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=ma(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,n,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:s},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const p=i+e/2+n.measureText(t.text).width;o>0&&u+s+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:s},d=Math.max(d,p),u+=s+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=hs(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=ae(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=ae(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=ae(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=ae(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;li(t,this),this._draw(),hi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ti.color,r=hs(t.rtl,this.left,this.width),l=wi(o.font),{color:h,padding:c}=o,d=l.size,u=d/2;let f;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=ma(o,d),b=this.isHorizontal(),x=this._computeTitleHeight();f=b?{x:ae(n,this.left+c,this.right-i[0]),y:this.top+c+x,line:0}:{x:this.left+c,y:ae(n,this.top+x+c,this.bottom-e[0].height),line:0},cs(this.ctx,t.textDirection);const _=m+c;this.legendItems.forEach(((y,v)=>{s.strokeStyle=y.fontColor||h,s.fillStyle=y.fontColor||h;const w=s.measureText(y.text).width,M=r.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=g+u+w;let S=f.x,D=f.y;r.setWidth(this.width),b?v>0&&S+k+c>this.right&&(D=f.y+=_,f.line++,S=f.x=ae(n,this.left+c,this.right-i[f.line])):v>0&&D+_>this.bottom&&(S=f.x=S+e[f.line].width+c,f.line++,D=f.y=ae(n,this.top+x+c,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const n=ct(i.lineWidth,1);if(s.fillStyle=ct(i.fillStyle,a),s.lineCap=ct(i.lineCap,"butt"),s.lineDashOffset=ct(i.lineDashOffset,0),s.lineJoin=ct(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=ct(i.strokeStyle,a),s.setLineDash(ct(i.lineDash,[])),o.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,g/2);ai(s,a,l,e+u,o.pointStyleWidth&&g)}else{const o=e+Math.max((d-p)/2,0),a=r.leftForLtr(t,g),l=yi(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?gi(s,{x:a,y:o,w:g,h:p,radius:l}):s.rect(a,o,g,p),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(S),D,y),S=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(M,S+g+u,b?S+k:this.right,t.rtl),function(t,e,i){ui(s,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),D,y),b?f.x+=k+c:f.y+=_})),ds(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=wi(e.font),s=vi(e.padding);if(!e.display)return;const n=hs(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=ae(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+ae(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ae(a,c,c+d);o.textAlign=n.textAlign(oe(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ui(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=wi(t.font),i=vi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Gt(t,this.left,this.right)&&Gt(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=vi(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class _a extends Zs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=at(i.text)?i.text.length:1;this._padding=vi(i.padding);const n=s*wi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=ae(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=ae(a,s,e),c=-.5*Pt):(l=n-t,h=ae(a,e,s),c=.5*Pt),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=wi(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);ui(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:oe(e.align),textBaseline:"middle",translation:[n,o]})}}var ya={id:"title",_element:_a,start(t,e,i){!function(t,e){const i=new _a({ctx:t.ctx,options:e,chart:t});zn.configure(t,i,e),zn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;zn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;zn.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const va=new WeakMap;var wa={id:"subtitle",start(t,e,i){const s=new _a({ctx:t.ctx,options:i,chart:t});zn.configure(t,s,i),zn.addBox(t,s),va.set(t,s)},stop(t){zn.removeBox(t,va.get(t)),va.delete(t)},beforeUpdate(t,e,i){const s=va.get(t);zn.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ma={average(t){if(!t.length)return!1;let e,i,s=0,n=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Da(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Pa(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=wi(e.bodyFont),h=wi(e.titleFont),c=wi(e.footerFont),d=o.length,u=n.length,f=s.length,g=vi(e.padding);let p=g.height,m=0,b=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let x=0;const _=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,ft(t.title,_),i.font=l.string,ft(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?a+2+e.boxPadding:0,ft(s,(t=>{ft(t.before,_),ft(t.lines,_),ft(t.after,_)})),x=0,i.font=c.string,ft(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function Oa(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function Ca(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Oa(t,e,i,s),yAlign:s}}function Aa(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=yi(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Kt(g,0,s.width-e.width),y:Kt(p,0,s.height-e.height)}}function Ta(t,e,i){const s=vi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function Ea(t){return ka([],Sa(t))}function La(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Ra extends Zs{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||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new Ms(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,ki(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let a=[];return a=ka(a,Sa(s)),a=ka(a,Sa(n)),a=ka(a,Sa(o)),a}getBeforeBody(t,e){return Ea(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return ft(t,(t=>{const e={before:[],lines:[],after:[]},n=La(i,t);ka(e.before,Sa(n.beforeLabel.call(this,t))),ka(e.lines,n.label.call(this,t)),ka(e.after,Sa(n.afterLabel.call(this,t))),s.push(e)})),s}getAfterBody(t,e){return Ea(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let a=[];return a=ka(a,Sa(s)),a=ka(a,Sa(n)),a=ka(a,Sa(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),ft(l,(e=>{const i=La(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=Ma[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Pa(this,i),a=Object.assign({},t,e),r=Ca(this.chart,i,a),l=Aa(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=yi(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,x=_+o,y=_-o):(p=d+f,m=p+o,x=_-o,y=_+o),b=p):(m="left"===s?d+Math.max(r,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(x=u,_=x-o,p=m-o,b=m+o):(x=u+g,_=x+o,p=m+o,b=m-o),y=x),{x1:p,x2:m,x3:b,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=hs(i.rtl,this.x,this.width);for(t.x=Ta(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=wi(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,gi(t,{x:e,y:g,w:l,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),gi(t,{x:i,y:g+1,w:l-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,g,l,r),t.strokeRect(e,g,l,r),t.fillStyle=o.backgroundColor,t.fillRect(i,g+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=wi(i.bodyFont);let d=c.lineHeight,u=0;const f=hs(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+n},p=f.textAlign(o);let m,b,x,_,y,v,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Ta(this,p,i),e.fillStyle=i.bodyColor,ft(this.beforeBody,g),u=a&&"right"!==p?"center"===o?l/2+h:l+2+h:0,_=0,v=s.length;_0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=Ma[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Pa(this,t),a=Object.assign({},i,this._size),r=Ca(e,t,a),l=Aa(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=vi(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),cs(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),ds(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!gt(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!gt(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=Ma[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}Ra.positioners=Ma;var Ia={id:"tooltip",_element:Ra,positioners:Ma,afterInit(t,e,i){i&&(t.tooltip=new Ra({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:st,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},za=Object.freeze({__proto__:null,Decimation:Jo,Filler:pa,Legend:xa,SubTitle:wa,Title:ya,Tooltip:Ia});function Fa(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}class $a extends hn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(ot(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Kt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Fa(i,t,ct(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Va(t,e){const i=[],{bounds:s,step:n,min:o,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=n||1,f=h-1,{min:g,max:p}=e,m=!ot(o),b=!ot(a),x=!ot(l),_=(p-g)/(c+1);let y,v,w,M,k=Ft((p-g)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ft(M*k/f/u)*u),ot(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===s?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&b&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/n,k/1e3)?(M=Math.round(Math.min((a-o)/k,h)),k=(a-o)/M,v=o,w=a):x?(v=m?o:v,w=b?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=Vt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(Ht(k),Ht(v));y=Math.pow(10,ot(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let D=0;for(m&&(d&&v!==o?(i.push({value:o}),vs=e?s:t,a=t=>n=i?n:t;if(t){const t=zt(s),e=zt(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=Va({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Bt(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ls(t,this.chart.options.locale,this.options.ticks.format)}}class Wa extends Na{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=lt(t)?t:0,this.max=lt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Nt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ha(t){return 1===t/Math.pow(10,Math.floor(It(t)))}Wa.id="linear",Wa.defaults={ticks:{callback:Qs.formatters.numeric}};class ja extends hn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Na.prototype.parse.apply(this,[t,e]);if(0!==i)return lt(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=lt(t)?Math.max(0,t):null,this.max=lt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t,a=(t,e)=>Math.pow(10,Math.floor(It(t))+e);i===s&&(i<=0?(n(1),o(10)):(n(a(i,-1)),o(a(s,1)))),i<=0&&n(a(s,-1)),s<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&n(a(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(It(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=ht(t.min,Math.pow(10,Math.floor(It(e.min)))),a=Math.floor(It(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{n.push({value:o,major:Ha(o)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l}while(an?{start:e-i,end:e}:{start:e,end:e+i}}function Xa(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],n=[],o=t._pointLabels.length,a=t.options.pointLabels,r=a.centerPointLabels?Pt/o:0;for(let d=0;de.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Ka(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ga(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Za(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Ja(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,Ot);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o{const i=ut(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Xa(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return Xt(t*(Ot/(this._pointLabels.length||1))+Nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(ot(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(ot(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=0;n--){const e=s.setContext(t.getPointLabelContext(n)),o=wi(e.font),{x:a,y:r,textAlign:l,left:h,top:c,right:d,bottom:u}=t._pointLabelItems[n],{backdropColor:f}=e;if(!ot(f)){const t=yi(e.borderRadius),s=vi(e.backdropPadding);i.fillStyle=f;const n=h-s.left,o=c-s.top,a=d-h+s.width,r=u-c+s.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),gi(i,{x:n,y:o,w:a,h:r,radius:t}),i.fill()):i.fillRect(n,o,a,r)}ui(i,t._pointLabels[n],a,r+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,n),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,s){const n=t.ctx,o=e.circular,{color:a,lineWidth:r}=e;!o&&!s||!a||!r||i<0||(n.save(),n.strokeStyle=a,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),Ja(t,i,o,s),n.closePath(),n.stroke(),n.restore())}(this,s.setContext(this.getContext(e-1)),a,n)}})),i.display){for(t.save(),o=n-1;o>=0;o--){const s=i.setContext(this.getPointLabelContext(o)),{color:n,lineWidth:l}=s;l&&n&&(t.lineWidth=l,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),r=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=wi(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=vi(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}ui(t,s.label,0,-n,l,{color:r.color})})),t.restore()}drawTitle(){}}Qa.id="radialLinear",Qa.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Qa.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Qa.descriptors={angleLines:{_fallback:"grid"}};const tr={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}},er=Object.keys(tr);function ir(t,e){return t-e}function sr(t,e){if(ot(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof s&&(a=s(a)),lt(a)||(a="string"==typeof s?i.parse(a,s):i.parse(a)),null===a?null:(n&&(a="week"!==n||!$t(o)&&!0!==o?i.startOf(a,n):i.startOf(a,"isoWeek",o)),+a)}function nr(t,e,i,s){const n=er.length;for(let o=er.indexOf(t);o=e?i[s]:i[n]]=!0}}else t[e]=!0}function ar(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,s,n,i):s}class rr extends hn{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={}),s=this._adapter=new mn._date(t.adapters.date);s.init(e),_t(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:sr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();function r(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),a||isNaN(t.max)||(n=Math.max(n,t.max))}o&&a||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),s=lt(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=lt(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=function(t,e,i){let s=0,n=t.length;for(;ss&&t[n-1]>i;)n--;return s>0||n=er.indexOf(i);o--){const i=er[o];if(tr[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return er[i?er.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=er.indexOf(t)+1,i=er.length;e+t.value)))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=Kt(s,0,o),n=Kt(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||nr(n.minUnit,e,i,this._getLabelCapacity(e)),a=ct(n.stepSize,1),r="week"===o&&n.isoWeekday,l=$t(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const f="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;ct-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.time.displayFormats,a=this._unit,r=this._majorUnit,l=a&&o[a],h=r&&o[r],c=i[e],d=r&&h&&c&&c.major,u=this._adapter.format(t,s||(d?h:l)),f=n.ticks.callback;return f?ut(f,[u,e,i],this):u}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Jt(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Jt(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}rr.id="time",rr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class hr extends rr{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=lr(e,this.min),this._tableRange=lr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o{l=new Mo(s,{type:o,data:n,options:a,plugins:r})})),E((()=>{l&&(l.data=n,l.type=o,l.options=a,l.plugins=r,l.update())})),L((()=>{l&&l.destroy(),l=null})),t.$$set=t=>{i(8,e=C(C({},e),R(t))),"data"in t&&i(2,n=t.data),"type"in t&&i(3,o=t.type),"options"in t&&i(4,a=t.options),"plugins"in t&&i(5,r=t.plugins)},e=R(e),[s,h,n,o,a,r,function(t){I[t?"unshift":"push"]((()=>{s=t,i(0,s)}))}]}class fr extends t{constructor(t){super(),e(this,t,ur,dr,i,{data:2,type:3,options:4,plugins:5})}}function gr(t){let e,i;const s=[t[0],{type:"line"}];let n={};for(let t=0;t{i(0,e=C(C({},e),R(t)))},[e=R(e)]}class mr extends t{constructor(t){super(),e(this,t,pr,gr,i,{})}}function br(t){let e,i,l,c,f,x=u.i18n.sevelDayResponseTime+"";return c=new mr({props:{data:{labels:t[1],datasets:[{label:u.i18n.responseTimeMs,backgroundColor:u.graphBackgroundColor||"#89e0cf",borderColor:u.graphBorderColor||"#1abc9c",data:t[2]}]},width:t[3],height:400,options:{responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{display:!1,gridLines:{display:!1}}]}}}}),{c(){e=s("h2"),i=g(x),l=p(),M(c.$$.fragment)},l(t){e=n(t,"H2",{});var s=o(e);i=m(s,x),s.forEach(a),l=b(t),k(c.$$.fragment,t)},m(t,s){r(t,e,s),y(e,i),r(t,l,s),S(c,t,s),f=!0},p(t,e){const i={};6&e&&(i.data={labels:t[1],datasets:[{label:u.i18n.responseTimeMs,backgroundColor:u.graphBackgroundColor||"#89e0cf",borderColor:u.graphBorderColor||"#1abc9c",data:t[2]}]}),8&e&&(i.width=t[3]),c.$set(i)},i(t){f||(d(c.$$.fragment,t),f=!0)},o(t){h(c.$$.fragment,t),f=!1},d(t){t&&a(e),t&&a(l),D(c,t)}}}function xr(t){let e,i;return e=new B({}),{c(){M(e.$$.fragment)},l(t){k(e.$$.fragment,t)},m(t,s){S(e,t,s),i=!0},p:w,i(t){i||(d(e.$$.fragment,t),i=!0)},o(t){h(e.$$.fragment,t),i=!1},d(t){D(e,t)}}}function _r(t){let e,i,u,f,g;const p=[xr,br],m=[];function b(t,e){return t[0]?0:t[2].length?1:-1}return~(i=b(t))&&(u=m[i]=p[i](t)),{c(){e=s("section"),u&&u.c(),this.h()},l(t){e=n(t,"SECTION",{});var i=o(e);u&&u.l(i),i.forEach(a),this.h()},h(){F((()=>t[5].call(e)))},m(s,n){r(s,e,n),~i&&m[i].m(e,null),f=$(e,t[5].bind(e)),g=!0},p(t,[s]){let n=i;i=b(t),i===n?~i&&m[i].p(t,s):(u&&(l(),h(m[n],1,1,(()=>{m[n]=null})),c()),~i?(u=m[i],u?u.p(t,s):(u=m[i]=p[i](t),u.c()),d(u,1),u.m(e,null)):u=null)},i(t){g||(d(u),g=!0)},o(t){h(u),g=!1},d(t){t&&a(e),~i&&m[i].d(),f()}}}function yr(t,e,i){let{slug:s}=e,n=!0;const o=N(),a=u.owner,r=u.repo;let l=[],h=[],c=[],d=800;return f((async()=>{try{l=(await W(`commits-${a}-${r}-${s}`,(()=>o.repos.listCommits({owner:a,repo:r,path:`history/${s}.yml`,per_page:28})))).data.reverse()}catch(t){V(t)}l=l.map(((t,e)=>(t.showHeading=0===e||new Date(l[e-1].created_at).toLocaleDateString()!==new Date(t.created_at).toLocaleDateString(),t))),i(2,c=l.filter((t=>t.commit.message.includes("ms) [skip ci]"))).map((t=>parseInt(t.commit.message.split(" in ")[1].split("ms")[0])))),i(1,h=l.filter((t=>t.commit.message.includes("ms) [skip ci]"))).map((t=>new Date(t.commit.committer.date).toLocaleString()))),i(0,n=!1)})),t.$$set=t=>{"slug"in t&&i(4,s=t.slug)},[n,h,c,d,s,function(){d=this.clientWidth,i(3,d)}]}class vr extends t{constructor(t){super(),e(this,t,yr,_r,i,{slug:4})}}function wr(t){let e,i,s,n,o,l;return e=new q({props:{slug:t[0]}}),s=new vr({props:{slug:t[0]}}),o=new it({props:{slug:t[0]}}),{c(){M(e.$$.fragment),i=p(),M(s.$$.fragment),n=p(),M(o.$$.fragment)},l(t){k(e.$$.fragment,t),i=b(t),k(s.$$.fragment,t),n=b(t),k(o.$$.fragment,t)},m(t,a){S(e,t,a),r(t,i,a),S(s,t,a),r(t,n,a),S(o,t,a),l=!0},p(t,[i]){const n={};1&i&&(n.slug=t[0]),e.$set(n);const a={};1&i&&(a.slug=t[0]),s.$set(a);const r={};1&i&&(r.slug=t[0]),o.$set(r)},i(t){l||(d(e.$$.fragment,t),d(s.$$.fragment,t),d(o.$$.fragment,t),l=!0)},o(t){h(e.$$.fragment,t),h(s.$$.fragment,t),h(o.$$.fragment,t),l=!1},d(t){D(e,t),t&&a(i),D(s,t),t&&a(n),D(o,t)}}}async function Mr(t){const{number:e}=t.params;return{slug:e}}function kr(t,e,i){let{slug:s}=e;return t.$$set=t=>{"slug"in t&&i(0,s=t.slug)},[s]}class Sr extends t{constructor(t){super(),e(this,t,kr,wr,i,{slug:0})}}export{Sr as default,Mr as preload}; + */var _s=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=se.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ys="transparent",vs={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=qe(t||ys),n=s.valid&&qe(e||ys);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ws{constructor(t,e,i,s){const n=e[i];s=Mi([t.to,s,n,t.from]);const o=Mi([t.from,n,s]);this._active=!0,this._fn=t.fn||vs[t.type||typeof o],this._easing=ue[t.easing]||ue.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=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Mi([t.to,e,s,t.from]),this._from=Mi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ti.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ti.describe("animations",{_fallback:"animation"}),ti.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class ks{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!rt(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const s=t[i];if(!rt(s))return;const n={};for(const t of Ms)n[t]=s[t];(at(s.properties)&&s.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new ws(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(_s.add(this._chart,i),!0):void 0}}function Ss(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Ds(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function Ts(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Ls(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const Rs=t=>"reset"===t||"none"===t,Is=(t,e)=>e?t:Object.assign({},t);class zs{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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Os(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Ls(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=ct(i.xAxisID,Es(t,"x")),o=e.yAxisID=ct(i.yAxisID,Es(t,"y")),a=e.rAxisID=ct(i.rAxisID,Es(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,n,o,a),h=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}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&&ee(this._data,this),t._stacked&&Ls(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rt(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,o;for(s=0,n=e.length;s{const e="_onData"+Mt(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=Os(e.vScale,e),e.stack!==i.stack&&(s=!0,Ls(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&Ts(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,a=n.axis;let r,l,h,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=at(s[t])?this.parseArrayData(i,s,t,e):rt(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===l[a]||d&&l[a]t&&!e.hidden&&e._stacked&&{keys:Ds(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=s[d];const e=u[a.axis];return!lt(u[t.axis])||h>e||c=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Is(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new ks(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Rs(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){Rs(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Rs(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;at-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(kt(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Vs(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;ht.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if(ot(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!a(i))&&((!1===n||-1===o.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(c,e,o)*n,d===o&&(p-=c/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),a=Math.max(t,i);p=Math.max(Math.min(p,a),s),h=p+c}if(p===e.getPixelForValue(o)){const t=zt(c)*e.getLineWidthForValue(o)/2;p+=t,c-=t}return{size:c,base:p,head:h,center:h+c/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=ct(s.maxBarThickness,1/0);let a,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),a=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+o+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d""}}}};class Xs extends zs{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,a=t=>+i[t];if(rt(i[t])){const{key:t="value"}=this._parsing;a=e=>+wt(i[e],t)}for(n=t,o=t+e;nqt(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>qt(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,h,d),m=f(Et,c,u),b=g(Pt,h,d),x=g(Pt+Et,c,u);s=(p-b)/2,n=(m-x)/2,o=-(p+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),b=(i.width-o)/f,x=(i.height-o)/g,_=Math.max(Math.min(b,x)/2,0),y=dt(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/Ot)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?Ot*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ls(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s"spacing"!==t,_indexable:t=>"spacing"!==t},Xs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return at(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class qs extends zs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=re(e,s,o);this._drawStart=a,this._drawCount=r,le(e)&&(a=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,a,r,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,s),d=o.axis,u=a.axis,{spanGaps:f,segment:g}=this.options,p=$t(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||n||"none"===s;let b=e>0&&this.getParsed(e-1);for(let f=e;f0&&Math.abs(i[d]-b[d])>p,g&&(x.parsed=i,x.raw=l.data[f]),c&&(x.options=h||this.resolveDataElementOptions(f,e.active?"active":s)),m||this.updateElement(e,f,x,s),b=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}qs.id="line",qs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},qs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ks extends zs{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ls(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return $i.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*Pt;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Nt(this.resolveDataElementOptions(t,e).angle||i):0}}Ks.id="polarArea",Ks.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ks.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Gs extends Xs{}Gs.id="pie",Gs.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Zs extends zs{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,s){return $i.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}Js.defaults={},Js.defaultRoutes=void 0;const Qs={values:t=>at(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=It(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ls(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(It(t)));return 1===s||2===s||5===s?Qs.numeric.call(this,t,e,i):""}};var tn={formatters:Qs};function en(t,e){const i=t.options.ticks,s=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;is)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nt-e)).pop(),e}(s);for(let t=0,e=o.length-1;tn)return e}return Math.max(n,1)}(n,e,s);if(o>0){let t,i;const s=o>1?Math.round((r-a)/(o-1)):null;for(sn(e,l,h,ot(s)?0:a-s,a),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:tn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ti.route("scale.ticks","color","","color"),ti.route("scale.grid","color","","borderColor"),ti.route("scale.grid","borderColor","","borderColor"),ti.route("scale.title","color","","color"),ti.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ti.describe("scales",{_fallback:"scale"}),ti.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const nn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function on(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return h}function rn(t){return t.drawTicks?t.tickLength:0}function ln(t,e){if(!t.display)return 0;const i=wi(t.font,e),s=vi(t.padding);return(at(t.text)?t.text.length:1)*i.lineHeight+s.height}function hn(t,e,i){let s=oe(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class cn extends Js{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=ht(t,Number.POSITIVE_INFINITY),e=ht(e,Number.NEGATIVE_INFINITY),i=ht(i,Number.POSITIVE_INFINITY),s=ht(s,Number.NEGATIVE_INFINITY),{min:ht(t,i),max:ht(e,s),minDefined:lt(t),maxDefined:lt(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;rs?s:i,s=n&&i>s?i:s,{min:ht(i,ht(s,i)),max:ht(s,ht(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ut(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.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=function(t,e,i){const{min:s,max:n}=t,o=dt(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Kt(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-rn(t.grid)-e.padding-ln(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Wt(Math.min(Math.asin(Kt((h.highest.height+6)/o,-1,1)),Math.asin(Kt(a/r,-1,1))-Math.asin(Kt(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){ut(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ut(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=ln(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=rn(n)+o):(t.height=this.maxHeight,t.width=rn(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=Nt(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ut(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:n[t]||0,height:o[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:n,heights:o}}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 Kt(this._alignToPixels?si(this.chart,e,0):e,-32768,32767)}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&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o}=s,a=n.offset,r=this.isHorizontal(),l=this.ticks.length+(a?1:0),h=rn(n),c=[],d=n.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,g=function(t){return si(i,t,u)};let p,m,b,x,_,y,v,w,M,k,S,D;if("top"===o)p=g(this.bottom),y=this.bottom-h,w=p-f,k=g(t.top)+f,D=t.bottom;else if("bottom"===o)p=g(this.top),k=t.top,D=g(t.bottom)-f,y=p+f,w=this.top+h;else if("left"===o)p=g(this.right),_=this.right-h,v=p-f,M=g(t.left)+f,S=t.right;else if("right"===o)p=g(this.left),M=t.left,S=g(t.right)-f,_=p+f,v=this.left+h;else if("x"===e){if("center"===o)p=g((t.top+t.bottom)/2+.5);else if(rt(o)){const t=Object.keys(o)[0],e=o[t];p=g(this.chart.scales[t].getPixelForValue(e))}k=t.top,D=t.bottom,y=p+f,w=y+h}else if("y"===e){if("center"===o)p=g((t.left+t.right)/2);else if(rt(o)){const t=Object.keys(o)[0],e=o[t];p=g(this.chart.scales[t].getPixelForValue(e))}_=p-f,v=_-h,M=t.left,S=t.right}const P=ct(s.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/P));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ti.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&ti.describe(e,t.descriptors)}(t,o,i),this.override&&ti.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ti[s]&&(delete ti[s][i],this.override&&delete Ge[i])}}var un=new class{constructor(){this.controllers=new dn(zs,"datasets",!0),this.elements=new dn(Js,"elements"),this.plugins=new dn(Object,"plugins"),this.scales=new dn(cn,"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((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):ft(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=Mt(t);ut(i["before"+s],[],i),e[t](i),ut(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let h=e;h0&&Math.abs(i[u]-x[u])>m,p&&(g.parsed=i,g.raw=l.data[h]),d&&(g.options=c||this.resolveDataElementOptions(h,e.active?"active":s)),b||this.updateElement(e,h,g,s),x=i}this.updateSharedOptions(c,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}fn.id="scatter",fn.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},fn.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var gn=Object.freeze({__proto__:null,BarController:Ys,BubbleController:Us,DoughnutController:Xs,LineController:qs,PolarAreaController:Ks,PieController:Gs,RadarController:Zs,ScatterController:fn});function pn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mn{constructor(t){this.options=t||{}}init(t){}formats(){return pn()}parse(t,e){return pn()}format(t,e){return pn()}add(t,e,i){return pn()}diff(t,e,i){return pn()}startOf(t,e,i){return pn()}endOf(t,e){return pn()}}mn.override=function(t){Object.assign(mn.prototype,t)};var bn={_date:mn};function xn(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?Qt:Jt;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function _n(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var kn={evaluateInteractionItems:_n,modes:{index(t,e,i,s){const n=Ji(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?yn(t,n,o,s,a):wn(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=Ji(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?yn(t,n,o,s,a):wn(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tyn(t,Ji(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=Ji(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return wn(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>Mn(t,Ji(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Mn(t,Ji(e,t),"y",i.intersect,s)}};const Sn=["left","top","right","bottom"];function Dn(t,e){return t.filter((t=>t.pos===e))}function Pn(t,e){return t.filter((t=>-1===Sn.indexOf(t.pos)&&t.box.axis===e))}function On(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Cn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Sn.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function Rn(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),s=On(Dn(e,"left"),!0),n=On(Dn(e,"right")),o=On(Dn(e,"top"),!0),a=On(Dn(e,"bottom")),r=Pn(e,"x"),l=Pn(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Dn(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;ft(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);Tn(u,vi(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=Cn(l.concat(h),d);Rn(r.fullSize,f,d,g),Rn(l,f,d,g),Rn(h,f,d,g)&&Rn(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),zn(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,zn(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ft(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class $n{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Vn extends $n{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Bn="$chartjs",Nn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Wn=t=>null===t||""===t;const Hn=!!is&&{passive:!0};function jn(t,e,i){t.canvas.removeEventListener(e,i,Hn)}function Yn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Un(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Yn(i.addedNodes,s),e=e&&!Yn(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Xn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Yn(i.removedNodes,s),e=e&&!Yn(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const qn=new Map;let Kn=0;function Gn(){const t=window.devicePixelRatio;t!==Kn&&(Kn=t,qn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Zn(t,e,i){const s=t.canvas,n=s&&Xi(s);if(!n)return;const o=ne(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){qn.size||window.addEventListener("resize",Gn),qn.set(t,e)}(t,o),a}function Jn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){qn.delete(t),qn.size||window.removeEventListener("resize",Gn)}(t)}function Qn(t,e,i){const s=t.canvas,n=ne((e=>{null!==t.ctx&&i(function(t,e){const i=Nn[t.type]||t.type,{x:s,y:n}=Ji(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Hn)}(s,e,n),n}class to extends $n{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[Bn]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Wn(n)){const e=ss(t,"width");void 0!==e&&(t.width=e)}if(Wn(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ss(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Bn])return!1;const i=e[Bn].initial;["height","width"].forEach((t=>{const s=i[t];ot(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[Bn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:Un,detach:Xn,resize:Zn}[e]||Qn;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Jn,detach:Jn,resize:Jn}[e]||jn)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ts(t,e,i,s)}isAttached(t){const e=Xi(t);return!(!e||!e.isConnected)}}class eo{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===ut(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){ot(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=ct(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(un.plugins.items);for(let t=0;tt.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function io(t,e){return e||!1!==t?!0===t?{}:t:null}function so(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function no(t,e){const i=ti.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function oo(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function ao(t){const e=t.options||(t.options={});e.plugins=ct(e.plugins,{}),e.scales=function(t,e){const i=Ge[t.type]||{scales:{}},s=e.scales||{},n=no(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(s).forEach((t=>{const e=s[t];if(!rt(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=oo(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),h=i.scales||{};o[r]=o[r]||t,a[t]=_t(Object.create(null),[{axis:r},e,h[r],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,r=i.indexAxis||no(n,e),l=(Ge[n]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||o[e]||e;a[n]=a[n]||Object.create(null),_t(a[n],[{axis:e},s[n],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];_t(e,[ti.scales[e.type],ti.scale])})),a}(t,e)}function ro(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const lo=new Map,ho=new Set;function co(t,e){let i=lo.get(t);return i||(i=e(),lo.set(t,i),ho.add(i)),i}const uo=(t,e,i)=>{const s=wt(e,i);void 0!==s&&t.add(s)};class fo{constructor(t){this._config=function(t){return(t=t||{}).data=ro(t.data),ao(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ro(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(),ao(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return co(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return co(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return co(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return co(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>uo(r,t,e)))),e.forEach((t=>uo(r,s,t))),e.forEach((t=>uo(r,Ge[n]||{},t))),e.forEach((t=>uo(r,ti,t))),e.forEach((t=>uo(r,Ze,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),ho.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ge[e]||{},ti.datasets[e]||{},{type:e},ti,Ze]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=go(this._resolverCache,t,s);let r=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=Pi(t);for(const n of e){const e=i(n),o=s(n),a=(o||e)&&t[n];if(e&&(St(a)||po(a))||o&&at(a))return!0}return!1}(o,e)){n.$shared=!1;r=Di(o,i=St(i)?i():i,this.createResolver(t,i,a))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],s){const{resolver:n}=go(this._resolverCache,t,i);return rt(e)?Di(n,e,void 0,s):n}}function go(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Si(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const po=t=>rt(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||St(t[i])),!1);const mo=["top","bottom","left","right","chartArea"];function bo(t,e){return"top"===t||"bottom"===t||-1===mo.indexOf(t)&&"x"===e}function xo(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function _o(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),ut(i&&i.onComplete,[t],e)}function yo(t){const e=t.chart,i=e.options.animation;ut(i&&i.onProgress,[t],e)}function vo(t){return Ui()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const wo={},Mo=t=>{const e=vo(t);return Object.values(wo).filter((t=>t.canvas===e)).pop()};function ko(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}class So{constructor(t,e){const i=this.config=new fo(e),s=vo(t),n=Mo(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ui()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Vn:to}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),r=a&&a.canvas,l=r&&r.height,h=r&&r.width;this.id=nt(),this.ctx=a,this.canvas=r,this.width=h,this.height=l,this._options=o,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 eo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],wo[this.id]=this,a&&r?(_s.listen(this,"complete",_o),_s.listen(this,"progress",yo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return ot(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():es(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ni(this.canvas,this.ctx),this}stop(){return _s.stop(this),this}resize(t,e){_s.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,es(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),ut(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ft(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=oo(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),ft(n,(e=>{const n=e.options,o=n.id,a=oo(o,n),r=ct(n.type,e.dtype);void 0!==n.position&&bo(n.position,a)===bo(e.dposition)||(n.position=e.dposition),s[o]=!0;let l=null;if(o in i&&i[o].type===r)l=i[o];else{l=new(un.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),ft(s,((t,e)=>{t||delete i[e]})),ft(i,(t=>{Fn.configure(this,t,t.options),Fn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{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()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(xo("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ft(this.scales,(t=>{Fn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Dt(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){ko(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Fn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],ft(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&li(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&hi(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ri(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=kn.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ki(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);kt(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),_s.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};ft(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){ft(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},ft(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!gt(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,ut(n.onHover,[t,a,this],this),r&&ut(n.onClick,[t,a,this],this));const h=!gt(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}const Do=()=>ft(So.instances,(t=>t._plugins.invalidate())),Po=!0;function Oo(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=e;let h=n/r;t.beginPath(),t.arc(o,a,r,s-h,i+h),l>n?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+Et,s-Et),t.closePath(),t.clip()}function Co(t,e,i,s){const n=xi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Kt(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Kt(n.innerStart,0,a),innerEnd:Kt(n.innerEnd,0,a)}}function Ao(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function To(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const g=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/Pt)/d)/2,m=l+p+f,b=n-p-f,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=Co(e,u,d,b-m),w=d-x,M=d-_,k=m+x/w,S=b-_/M,D=u+y,P=u+v,O=m+y/D,C=b-v/P;if(t.beginPath(),o){if(t.arc(a,r,d,k,S),_>0){const e=Ao(M,S,a,r);t.arc(e.x,e.y,_,S,b+Et)}const e=Ao(P,b,a,r);if(t.lineTo(e.x,e.y),v>0){const e=Ao(P,C,a,r);t.arc(e.x,e.y,v,b+Et,C+Math.PI)}if(t.arc(a,r,u,b-v/u,m+y/u,!0),y>0){const e=Ao(D,O,a,r);t.arc(e.x,e.y,y,O+Math.PI,m-Et)}const i=Ao(w,m,a,r);if(t.lineTo(i.x,i.y),x>0){const e=Ao(w,k,a,r);t.arc(e.x,e.y,x,m-Et,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function Eo(t,e,i,s,n,o){const{options:a}=e,{borderWidth:r,borderJoinStyle:l}=a,h="inner"===a.borderAlign;r&&(h?(t.lineWidth=2*r,t.lineJoin=l||"round"):(t.lineWidth=r,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:s,y:n,startAngle:o,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),h=e.innerRadius+a;let c;for(i&&Oo(t,e,o+Ot),t.beginPath(),t.arc(s,n,h,o+Ot,o,!0),c=0;c{un.add(...t),Do()}},unregister:{enumerable:Po,value:(...t)=>{un.remove(...t),Do()}}});class Lo extends Js{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=jt(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=ct(c,r-a)>=Ot||qt(n,a,r),f=Gt(o,l+d,h+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Ot?Math.floor(i/Ot):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(s){a=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*a,Math.sin(e)*a),this.circumference>=Pt&&(a=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){To(t,e,i,s,a+Ot,n);for(let e=0;er&&o>r;return{count:s,start:l,loop:e.loop,ilen:h(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=g=i),p=i}_()}function Vo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?$o:Fo}Lo.id="arc",Lo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Lo.defaultRoutes={backgroundColor:"backgroundColor"};const Bo="function"==typeof Path2D;function No(t,e,i,s){Bo&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Ro(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=Vo(e);for(const r of n)Ro(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Wo extends Js{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Yi(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return ms(t,!0===s?[{start:a,end:r,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r"borderDash"!==t&&"fill"!==t};class jo extends Js{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2){Qo(t)}))}var ea={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void ta(t);const s=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:o,indexAxis:a}=e,r=t.getDatasetMeta(n),l=o||e.data;if("y"===Mi([a,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const h=t.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=Kt(Jt(e,o.axis,a).lo,0,i-1)),s=h?Kt(Jt(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(r,l);if(d<=(i.threshold||4*s))return void Qo(e);let u;switch(ot(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,g,p=e;for(a[l++]=t[p],c=0;cu&&(u=f,d=t[s],g=s);a[l++]=d,p=g}return a[l++]=t[h],a}(l,c,d,s,i);break;case"min-max":u=function(t,e,i,s){let n,o,a,r,l,h,c,d,u,f,g=0,p=0;const m=[],b=e+i-1,x=t[e].x,_=t[b].x-x;for(n=e;nf&&(f=r,c=n),g=(p*g+o.x)/++p;else{const i=n-1;if(!ot(h)&&!ot(c)){const e=Math.min(h,c),s=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:g}),s!==d&&s!==i&&m.push({...t[s],x:g})}n>0&&i!==d&&m.push(t[i]),m.push(o),l=e,p=0,u=f=r,h=c=d=n}}return m}(l,c,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){ta(t)}};function ia(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=Xt(n),o=Xt(o)),{property:t,start:n,end:o}}function sa(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function na(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function oa(t,e){let i=[],s=!1;return at(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=sa(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new Wo({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function aa(t){return t&&!1!==t.fill}function ra(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!lt(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function la(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=ct(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(rt(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return lt(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ha(t,e,i){const s=[];for(let n=0;n=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&fa(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;aa(i)&&fa(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;aa(s)&&"beforeDatasetDraw"===i.drawTime&&fa(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _a=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class ya extends Js{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=ut(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=wi(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=_a(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,n,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:s},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const p=i+e/2+n.measureText(t.text).width;o>0&&u+s+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:s},d=Math.max(d,p),u+=s+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=hs(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=ae(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=ae(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=ae(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=ae(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;li(t,this),this._draw(),hi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ti.color,r=hs(t.rtl,this.left,this.width),l=wi(o.font),{color:h,padding:c}=o,d=l.size,u=d/2;let f;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=_a(o,d),b=this.isHorizontal(),x=this._computeTitleHeight();f=b?{x:ae(n,this.left+c,this.right-i[0]),y:this.top+c+x,line:0}:{x:this.left+c,y:ae(n,this.top+x+c,this.bottom-e[0].height),line:0},cs(this.ctx,t.textDirection);const _=m+c;this.legendItems.forEach(((y,v)=>{s.strokeStyle=y.fontColor||h,s.fillStyle=y.fontColor||h;const w=s.measureText(y.text).width,M=r.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=g+u+w;let S=f.x,D=f.y;r.setWidth(this.width),b?v>0&&S+k+c>this.right&&(D=f.y+=_,f.line++,S=f.x=ae(n,this.left+c,this.right-i[f.line])):v>0&&D+_>this.bottom&&(S=f.x=S+e[f.line].width+c,f.line++,D=f.y=ae(n,this.top+x+c,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const n=ct(i.lineWidth,1);if(s.fillStyle=ct(i.fillStyle,a),s.lineCap=ct(i.lineCap,"butt"),s.lineDashOffset=ct(i.lineDashOffset,0),s.lineJoin=ct(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=ct(i.strokeStyle,a),s.setLineDash(ct(i.lineDash,[])),o.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,g/2);ai(s,a,l,e+u,o.pointStyleWidth&&g)}else{const o=e+Math.max((d-p)/2,0),a=r.leftForLtr(t,g),l=yi(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?gi(s,{x:a,y:o,w:g,h:p,radius:l}):s.rect(a,o,g,p),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(S),D,y),S=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(M,S+g+u,b?S+k:this.right,t.rtl),function(t,e,i){ui(s,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),D,y),b?f.x+=k+c:f.y+=_})),ds(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=wi(e.font),s=vi(e.padding);if(!e.display)return;const n=hs(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=ae(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+ae(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ae(a,c,c+d);o.textAlign=n.textAlign(oe(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ui(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=wi(t.font),i=vi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Gt(t,this.left,this.right)&&Gt(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=vi(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class wa extends Js{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=at(i.text)?i.text.length:1;this._padding=vi(i.padding);const n=s*wi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=ae(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=ae(a,s,e),c=-.5*Pt):(l=n-t,h=ae(a,e,s),c=.5*Pt),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=wi(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);ui(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:oe(e.align),textBaseline:"middle",translation:[n,o]})}}var Ma={id:"title",_element:wa,start(t,e,i){!function(t,e){const i=new wa({ctx:t.ctx,options:e,chart:t});Fn.configure(t,i,e),Fn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Fn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;Fn.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ka=new WeakMap;var Sa={id:"subtitle",start(t,e,i){const s=new wa({ctx:t.ctx,options:i,chart:t});Fn.configure(t,s,i),Fn.addBox(t,s),ka.set(t,s)},stop(t){Fn.removeBox(t,ka.get(t)),ka.delete(t)},beforeUpdate(t,e,i){const s=ka.get(t);Fn.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Da={average(t){if(!t.length)return!1;let e,i,s=0,n=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Ca(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Aa(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=wi(e.bodyFont),h=wi(e.titleFont),c=wi(e.footerFont),d=o.length,u=n.length,f=s.length,g=vi(e.padding);let p=g.height,m=0,b=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let x=0;const _=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,ft(t.title,_),i.font=l.string,ft(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?a+2+e.boxPadding:0,ft(s,(t=>{ft(t.before,_),ft(t.lines,_),ft(t.after,_)})),x=0,i.font=c.string,ft(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function Ta(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function Ea(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Ta(t,e,i,s),yAlign:s}}function La(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=yi(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Kt(g,0,s.width-e.width),y:Kt(p,0,s.height-e.height)}}function Ra(t,e,i){const s=vi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function Ia(t){return Pa([],Oa(t))}function za(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Fa extends Js{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||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new ks(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,ki(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let a=[];return a=Pa(a,Oa(s)),a=Pa(a,Oa(n)),a=Pa(a,Oa(o)),a}getBeforeBody(t,e){return Ia(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return ft(t,(t=>{const e={before:[],lines:[],after:[]},n=za(i,t);Pa(e.before,Oa(n.beforeLabel.call(this,t))),Pa(e.lines,n.label.call(this,t)),Pa(e.after,Oa(n.afterLabel.call(this,t))),s.push(e)})),s}getAfterBody(t,e){return Ia(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let a=[];return a=Pa(a,Oa(s)),a=Pa(a,Oa(n)),a=Pa(a,Oa(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),ft(l,(e=>{const i=za(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=Da[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Aa(this,i),a=Object.assign({},t,e),r=Ea(this.chart,i,a),l=La(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=yi(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,x=_+o,y=_-o):(p=d+f,m=p+o,x=_-o,y=_+o),b=p):(m="left"===s?d+Math.max(r,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(x=u,_=x-o,p=m-o,b=m+o):(x=u+g,_=x+o,p=m+o,b=m-o),y=x),{x1:p,x2:m,x3:b,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=hs(i.rtl,this.x,this.width);for(t.x=Ra(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=wi(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,gi(t,{x:e,y:g,w:l,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),gi(t,{x:i,y:g+1,w:l-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,g,l,r),t.strokeRect(e,g,l,r),t.fillStyle=o.backgroundColor,t.fillRect(i,g+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=wi(i.bodyFont);let d=c.lineHeight,u=0;const f=hs(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+n},p=f.textAlign(o);let m,b,x,_,y,v,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Ra(this,p,i),e.fillStyle=i.bodyColor,ft(this.beforeBody,g),u=a&&"right"!==p?"center"===o?l/2+h:l+2+h:0,_=0,v=s.length;_0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=Da[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Aa(this,t),a=Object.assign({},i,this._size),r=Ea(e,t,a),l=La(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=vi(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),cs(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),ds(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!gt(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!gt(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=Da[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}Fa.positioners=Da;var $a={id:"tooltip",_element:Fa,positioners:Da,afterInit(t,e,i){i&&(t.tooltip=new Fa({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:st,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Va=Object.freeze({__proto__:null,Decimation:ea,Filler:xa,Legend:va,SubTitle:Sa,Title:Ma,Tooltip:$a});function Ba(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}class Na extends cn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(ot(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Kt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ba(i,t,ct(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wa(t,e){const i=[],{bounds:s,step:n,min:o,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=n||1,f=h-1,{min:g,max:p}=e,m=!ot(o),b=!ot(a),x=!ot(l),_=(p-g)/(c+1);let y,v,w,M,k=Ft((p-g)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ft(M*k/f/u)*u),ot(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===s?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&b&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/n,k/1e3)?(M=Math.round(Math.min((a-o)/k,h)),k=(a-o)/M,v=o,w=a):x?(v=m?o:v,w=b?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=Vt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(Ht(k),Ht(v));y=Math.pow(10,ot(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let D=0;for(m&&(d&&v!==o?(i.push({value:o}),vs=e?s:t,a=t=>n=i?n:t;if(t){const t=zt(s),e=zt(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=Wa({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Bt(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ls(t,this.chart.options.locale,this.options.ticks.format)}}class Ya extends ja{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=lt(t)?t:0,this.max=lt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Nt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ua(t){return 1===t/Math.pow(10,Math.floor(It(t)))}Ya.id="linear",Ya.defaults={ticks:{callback:tn.formatters.numeric}};class Xa extends cn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ja.prototype.parse.apply(this,[t,e]);if(0!==i)return lt(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=lt(t)?Math.max(0,t):null,this.max=lt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t,a=(t,e)=>Math.pow(10,Math.floor(It(t))+e);i===s&&(i<=0?(n(1),o(10)):(n(a(i,-1)),o(a(s,1)))),i<=0&&n(a(s,-1)),s<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&n(a(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(It(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=ht(t.min,Math.pow(10,Math.floor(It(e.min)))),a=Math.floor(It(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{n.push({value:o,major:Ua(o)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l}while(an?{start:e-i,end:e}:{start:e,end:e+i}}function Ga(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],n=[],o=t._pointLabels.length,a=t.options.pointLabels,r=a.centerPointLabels?Pt/o:0;for(let d=0;de.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Ja(t){return 0===t||180===t?"center":t<180?"left":"right"}function Qa(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function tr(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function er(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,Ot);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o{const i=ut(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ga(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return Xt(t*(Ot/(this._pointLabels.length||1))+Nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(ot(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(ot(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=0;n--){const e=s.setContext(t.getPointLabelContext(n)),o=wi(e.font),{x:a,y:r,textAlign:l,left:h,top:c,right:d,bottom:u}=t._pointLabelItems[n],{backdropColor:f}=e;if(!ot(f)){const t=yi(e.borderRadius),s=vi(e.backdropPadding);i.fillStyle=f;const n=h-s.left,o=c-s.top,a=d-h+s.width,r=u-c+s.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),gi(i,{x:n,y:o,w:a,h:r,radius:t}),i.fill()):i.fillRect(n,o,a,r)}ui(i,t._pointLabels[n],a,r+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,n),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,s){const n=t.ctx,o=e.circular,{color:a,lineWidth:r}=e;!o&&!s||!a||!r||i<0||(n.save(),n.strokeStyle=a,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),er(t,i,o,s),n.closePath(),n.stroke(),n.restore())}(this,s.setContext(this.getContext(e-1)),a,n)}})),i.display){for(t.save(),o=n-1;o>=0;o--){const s=i.setContext(this.getPointLabelContext(o)),{color:n,lineWidth:l}=s;l&&n&&(t.lineWidth=l,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),r=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=wi(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=vi(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}ui(t,s.label,0,-n,l,{color:r.color})})),t.restore()}drawTitle(){}}ir.id="radialLinear",ir.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:tn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},ir.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ir.descriptors={angleLines:{_fallback:"grid"}};const sr={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}},nr=Object.keys(sr);function or(t,e){return t-e}function ar(t,e){if(ot(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof s&&(a=s(a)),lt(a)||(a="string"==typeof s?i.parse(a,s):i.parse(a)),null===a?null:(n&&(a="week"!==n||!$t(o)&&!0!==o?i.startOf(a,n):i.startOf(a,"isoWeek",o)),+a)}function rr(t,e,i,s){const n=nr.length;for(let o=nr.indexOf(t);o=e?i[s]:i[n]]=!0}}else t[e]=!0}function hr(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,s,n,i):s}class cr extends cn{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={}),s=this._adapter=new bn._date(t.adapters.date);s.init(e),_t(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:ar(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();function r(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),a||isNaN(t.max)||(n=Math.max(n,t.max))}o&&a||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),s=lt(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=lt(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=function(t,e,i){let s=0,n=t.length;for(;ss&&t[n-1]>i;)n--;return s>0||n=nr.indexOf(i);o--){const i=nr[o];if(sr[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return nr[i?nr.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=nr.indexOf(t)+1,i=nr.length;e+t.value)))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=Kt(s,0,o),n=Kt(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||rr(n.minUnit,e,i,this._getLabelCapacity(e)),a=ct(n.stepSize,1),r="week"===o&&n.isoWeekday,l=$t(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const f="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;ct-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.time.displayFormats,a=this._unit,r=this._majorUnit,l=a&&o[a],h=r&&o[r],c=i[e],d=r&&h&&c&&c.major,u=this._adapter.format(t,s||(d?h:l)),f=n.ticks.callback;return f?ut(f,[u,e,i],this):u}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Jt(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Jt(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}cr.id="time",cr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ur extends cr{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=dr(e,this.min),this._tableRange=dr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o{l=new So(s,{type:o,data:n,options:a,plugins:r})})),E((()=>{l&&(l.data=n,l.type=o,l.options=a,l.plugins=r,l.update())})),L((()=>{l&&l.destroy(),l=null})),t.$$set=t=>{i(8,e=C(C({},e),R(t))),"data"in t&&i(2,n=t.data),"type"in t&&i(3,o=t.type),"options"in t&&i(4,a=t.options),"plugins"in t&&i(5,r=t.plugins)},e=R(e),[s,h,n,o,a,r,function(t){I[t?"unshift":"push"]((()=>{s=t,i(0,s)}))}]}class mr extends t{constructor(t){super(),e(this,t,pr,gr,i,{data:2,type:3,options:4,plugins:5})}}function br(t){let e,i;const s=[t[0],{type:"line"}];let n={};for(let t=0;t{i(0,e=C(C({},e),R(t)))},[e=R(e)]}class _r extends t{constructor(t){super(),e(this,t,xr,br,i,{})}}function yr(t){let e,i,l,c,f,x=u.i18n.sevelDayResponseTime+"";return c=new _r({props:{data:{labels:t[1],datasets:[{label:u.i18n.responseTimeMs,backgroundColor:u.graphBackgroundColor||"#89e0cf",borderColor:u.graphBorderColor||"#1abc9c",data:t[2]}]},width:t[3],height:400,options:{responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{display:!1,gridLines:{display:!1}}]}}}}),{c(){e=s("h2"),i=g(x),l=p(),M(c.$$.fragment)},l(t){e=n(t,"H2",{});var s=o(e);i=m(s,x),s.forEach(a),l=b(t),k(c.$$.fragment,t)},m(t,s){r(t,e,s),y(e,i),r(t,l,s),S(c,t,s),f=!0},p(t,e){const i={};6&e&&(i.data={labels:t[1],datasets:[{label:u.i18n.responseTimeMs,backgroundColor:u.graphBackgroundColor||"#89e0cf",borderColor:u.graphBorderColor||"#1abc9c",data:t[2]}]}),8&e&&(i.width=t[3]),c.$set(i)},i(t){f||(d(c.$$.fragment,t),f=!0)},o(t){h(c.$$.fragment,t),f=!1},d(t){t&&a(e),t&&a(l),D(c,t)}}}function vr(t){let e,i;return e=new B({}),{c(){M(e.$$.fragment)},l(t){k(e.$$.fragment,t)},m(t,s){S(e,t,s),i=!0},p:w,i(t){i||(d(e.$$.fragment,t),i=!0)},o(t){h(e.$$.fragment,t),i=!1},d(t){D(e,t)}}}function wr(t){let e,i,u,f,g;const p=[vr,yr],m=[];function b(t,e){return t[0]?0:t[2].length?1:-1}return~(i=b(t))&&(u=m[i]=p[i](t)),{c(){e=s("section"),u&&u.c(),this.h()},l(t){e=n(t,"SECTION",{});var i=o(e);u&&u.l(i),i.forEach(a),this.h()},h(){F((()=>t[5].call(e)))},m(s,n){r(s,e,n),~i&&m[i].m(e,null),f=$(e,t[5].bind(e)),g=!0},p(t,[s]){let n=i;i=b(t),i===n?~i&&m[i].p(t,s):(u&&(l(),h(m[n],1,1,(()=>{m[n]=null})),c()),~i?(u=m[i],u?u.p(t,s):(u=m[i]=p[i](t),u.c()),d(u,1),u.m(e,null)):u=null)},i(t){g||(d(u),g=!0)},o(t){h(u),g=!1},d(t){t&&a(e),~i&&m[i].d(),f()}}}function Mr(t,e,i){let{slug:s}=e,n=!0;const o=N(),a=u.owner,r=u.repo;let l=[],h=[],c=[],d=800;return f((async()=>{try{l=(await W(`commits-${a}-${r}-${s}`,(()=>o.repos.listCommits({owner:a,repo:r,path:`history/${s}.yml`,per_page:28})))).data.reverse()}catch(t){V(t)}l=l.map(((t,e)=>(t.showHeading=0===e||new Date(l[e-1].created_at).toLocaleDateString()!==new Date(t.created_at).toLocaleDateString(),t))),i(2,c=l.filter((t=>t.commit.message.includes("ms) [skip ci]"))).map((t=>parseInt(t.commit.message.split(" in ")[1].split("ms")[0])))),i(1,h=l.filter((t=>t.commit.message.includes("ms) [skip ci]"))).map((t=>new Date(t.commit.committer.date).toLocaleString()))),i(0,n=!1)})),t.$$set=t=>{"slug"in t&&i(4,s=t.slug)},[n,h,c,d,s,function(){d=this.clientWidth,i(3,d)}]}class kr extends t{constructor(t){super(),e(this,t,Mr,wr,i,{slug:4})}}function Sr(t){let e,i,s,n,o,l;return e=new q({props:{slug:t[0]}}),s=new kr({props:{slug:t[0]}}),o=new it({props:{slug:t[0]}}),{c(){M(e.$$.fragment),i=p(),M(s.$$.fragment),n=p(),M(o.$$.fragment)},l(t){k(e.$$.fragment,t),i=b(t),k(s.$$.fragment,t),n=b(t),k(o.$$.fragment,t)},m(t,a){S(e,t,a),r(t,i,a),S(s,t,a),r(t,n,a),S(o,t,a),l=!0},p(t,[i]){const n={};1&i&&(n.slug=t[0]),e.$set(n);const a={};1&i&&(a.slug=t[0]),s.$set(a);const r={};1&i&&(r.slug=t[0]),o.$set(r)},i(t){l||(d(e.$$.fragment,t),d(s.$$.fragment,t),d(o.$$.fragment,t),l=!0)},o(t){h(e.$$.fragment,t),h(s.$$.fragment,t),h(o.$$.fragment,t),l=!1},d(t){D(e,t),t&&a(i),D(s,t),t&&a(n),D(o,t)}}}async function Dr(t){const{number:e}=t.params;return{slug:e}}function Pr(t,e,i){let{slug:s}=e;return t.$$set=t=>{"slug"in t&&i(0,s=t.slug)},[s]}class Or extends t{constructor(t){super(),e(this,t,Pr,Sr,i,{slug:0})}}export{Or as default,Dr as preload}; diff --git a/client/createOctokit.8667135d.js b/client/createOctokit.8667135d.js index bff8e253af..80c71cef1d 100644 --- a/client/createOctokit.8667135d.js +++ b/client/createOctokit.8667135d.js @@ -5,4 +5,4 @@ import{S as e,i as r,s,e as o,L as t,b as n,d as i,M as a,f as c,g as p,r as l,h * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ -function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function R(e){var r,s;return!1!==S(e)&&(void 0===(r=e.constructor)||!1!==S(s=r.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}function U(e,r){const s=Object.assign({},e);return Object.keys(r).forEach((o=>{R(r[o])?o in e?s[o]=U(e[o],r[o]):Object.assign(s,{[o]:r[o]}):Object.assign(s,{[o]:r[o]})})),s}function C(e){for(const r in e)void 0===e[r]&&delete e[r];return e}function D(e,r,s){if("string"==typeof r){let[e,o]=r.split(" ");s=Object.assign(o?{method:e,url:o}:{url:e},s)}else s=Object.assign({},r);var o;s.headers=(o=s.headers)?Object.keys(o).reduce(((e,r)=>(e[r.toLowerCase()]=o[r],e)),{}):{},C(s),C(s.headers);const t=U(e||{},s);return e&&e.mediaType.previews.length&&(t.mediaType.previews=e.mediaType.previews.filter((e=>!t.mediaType.previews.includes(e))).concat(t.mediaType.previews)),t.mediaType.previews=t.mediaType.previews.map((e=>e.replace(/-preview/,""))),t}v.Hook=A,v.Singular=F,v.Collection=O;const L=/\{[^}]+\}/g;function j(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function I(e,r){return Object.keys(e).filter((e=>!r.includes(e))).reduce(((r,s)=>(r[s]=e[s],r)),{})}function q(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function H(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function W(e,r,s){return r="+"===e||"#"===e?q(r):H(r),s?H(s)+"="+r:r}function B(e){return null!=e}function x(e){return";"===e||"&"===e||"?"===e}function $(e,r){var s=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,t){if(o){let e="";const t=[];if(-1!==s.indexOf(o.charAt(0))&&(e=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach((function(s){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(s);t.push(function(e,r,s,o){var t=e[s],n=[];if(B(t)&&""!==t)if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)t=t.toString(),o&&"*"!==o&&(t=t.substring(0,parseInt(o,10))),n.push(W(r,t,x(r)?s:""));else if("*"===o)Array.isArray(t)?t.filter(B).forEach((function(e){n.push(W(r,e,x(r)?s:""))})):Object.keys(t).forEach((function(e){B(t[e])&&n.push(W(r,t[e],e))}));else{const e=[];Array.isArray(t)?t.filter(B).forEach((function(s){e.push(W(r,s))})):Object.keys(t).forEach((function(s){B(t[s])&&(e.push(H(s)),e.push(W(r,t[s].toString())))})),x(r)?n.push(H(s)+"="+e.join(",")):0!==e.length&&n.push(e.join(","))}else";"===r?B(t)&&n.push(H(s)):""!==t||"&"!==r&&"?"!==r?""===t&&n.push(""):n.push(H(s)+"=");return n}(r,e,o[1],o[2]||o[3]))})),e&&"+"!==e){var n=",";return"?"===e?n="&":"#"!==e&&(n=e),(0!==t.length?e:"")+t.join(n)}return t.join(",")}return q(t)}))}function z(e){let r,s=e.method.toUpperCase(),o=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),t=Object.assign({},e.headers),n=I(e,["method","baseUrl","url","headers","request","mediaType"]);const i=function(e){const r=e.match(L);return r?r.map(j).reduce(((e,r)=>e.concat(r)),[]):[]}(o);var a;o=(a=o,{expand:$.bind(null,a)}).expand(n),/^http/.test(o)||(o=e.baseUrl+o);const c=I(n,Object.keys(e).filter((e=>i.includes(e))).concat("baseUrl"));if(!/application\/octet-stream/i.test(t.accept)&&(e.mediaType.format&&(t.accept=t.accept.split(/,/).map((r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")),e.mediaType.previews.length)){const r=t.accept.match(/[\w-]+(?=-preview)/g)||[];t.accept=r.concat(e.mediaType.previews).map((r=>`application/vnd.github.${r}-preview${e.mediaType.format?`.${e.mediaType.format}`:"+json"}`)).join(",")}return["GET","HEAD"].includes(s)?o=function(e,r){const s=/\?/.test(e)?"&":"?",o=Object.keys(r);return 0===o.length?e:e+s+o.map((e=>"q"===e?"q="+r.q.split("+").map(encodeURIComponent).join("+"):`${e}=${encodeURIComponent(r[e])}`)).join("&")}(o,c):"data"in c?r=c.data:Object.keys(c).length?r=c:t["content-length"]=0,t["content-type"]||void 0===r||(t["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(s)&&void 0===r&&(r=""),Object.assign({method:s,url:o,headers:t},void 0!==r?{body:r}:null,e.request?{request:e.request}:null)}function K(e,r,s){return z(D(e,r,s))}const M=function e(r,s){const o=D(r,s),t=K.bind(null,o);return Object.assign(t,{DEFAULTS:o,defaults:e.bind(null,o),merge:D.bind(null,o),parse:z})}(null,{method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":`octokit-endpoint.js/6.0.12 ${T()}`},mediaType:{format:"",previews:[]}});var V,N,J=(V=function(e,r){var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s)return s;throw new Error("unable to locate global object")}();e.exports=r=s.fetch,s.fetch&&(r.default=s.fetch.bind(s)),r.Headers=s.Headers,r.Request=s.Request,r.Response=s.Response},V(N={exports:{}},N.exports),N.exports);class Z extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}}var Y=function e(r,s){if(r&&s)return e(r)(s);if("function"!=typeof r)throw new TypeError("need wrapper function");return Object.keys(r).forEach((function(e){o[e]=r[e]})),o;function o(){for(var e=new Array(arguments.length),s=0;sconsole.warn(e))),oe=Q((e=>console.warn(e)));class te extends Error{constructor(e,r,s){let o;super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=r,"headers"in s&&void 0!==s.headers&&(o=s.headers),"response"in s&&(this.response=s.response,o=s.response.headers);const t=Object.assign({},s.request);s.request.headers.authorization&&(t.headers=Object.assign({},s.request.headers,{authorization:s.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),t.url=t.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=t,Object.defineProperty(this,"code",{get:()=>(se(new Z("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),r)}),Object.defineProperty(this,"headers",{get:()=>(oe(new Z("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")),o||{})})}}function ne(e){const r=e.request&&e.request.log?e.request.log:console;(R(e.body)||Array.isArray(e.body))&&(e.body=JSON.stringify(e.body));let s,o,t={};return(e.request&&e.request.fetch||J)(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then((async n=>{o=n.url,s=n.status;for(const e of n.headers)t[e[0]]=e[1];if("deprecation"in t){const s=t.link&&t.link.match(/<([^>]+)>; rel="deprecation"/),o=s&&s.pop();r.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${t.sunset}${o?`. See ${o}`:""}`)}if(204!==s&&205!==s){if("HEAD"===e.method){if(s<400)return;throw new te(n.statusText,s,{response:{url:o,status:s,headers:t,data:void 0},request:e})}if(304===s)throw new te("Not modified",s,{response:{url:o,status:s,headers:t,data:await ie(n)},request:e});if(s>=400){const r=await ie(n),i=new te(function(e){if("string"==typeof e)return e;if("message"in e)return Array.isArray(e.errors)?`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`:e.message;return`Unknown error: ${JSON.stringify(e)}`}(r),s,{response:{url:o,status:s,headers:t,data:r},request:e});throw i}return ie(n)}})).then((e=>({status:s,url:o,headers:t,data:e}))).catch((r=>{if(r instanceof te)throw r;throw new te(r.message,500,{request:e})}))}async function ie(e){const r=e.headers.get("content-type");return/application\/json/.test(r)?e.json():!r||/^text\/|charset=utf-8$/.test(r)?e.text():function(e){return e.arrayBuffer()}(e)}const ae=function e(r,s){const o=r.defaults(s);return Object.assign((function(r,s){const t=o.merge(r,s);if(!t.request||!t.request.hook)return ne(o.parse(t));const n=(e,r)=>ne(o.parse(o.merge(e,r)));return Object.assign(n,{endpoint:o,defaults:e.bind(null,o)}),t.request.hook(n,t)}),{endpoint:o,defaults:e.bind(null,o)})}(M,{headers:{"user-agent":`octokit-request.js/5.6.3 ${T()}`}});class ce extends Error{constructor(e,r,s){super("Request failed due to following response errors:\n"+s.errors.map((e=>` - ${e.message}`)).join("\n")),this.request=e,this.headers=r,this.response=s,this.name="GraphqlResponseError",this.errors=s.errors,this.data=s.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const pe=["method","baseUrl","url","headers","request","query","mediaType"],le=["query","method","url"],ue=/\/api\/v3\/?$/;function de(e,r){const s=e.defaults(r);return Object.assign(((e,r)=>function(e,r,s){if(s){if("string"==typeof r&&"query"in s)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(const e in s)if(le.includes(e))return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}const o="string"==typeof r?Object.assign({query:r},s):r,t=Object.keys(o).reduce(((e,r)=>pe.includes(r)?(e[r]=o[r],e):(e.variables||(e.variables={}),e.variables[r]=o[r],e)),{}),n=o.baseUrl||e.endpoint.DEFAULTS.baseUrl;return ue.test(n)&&(t.url=n.replace(ue,"/api/graphql")),e(t).then((e=>{if(e.data.errors){const r={};for(const s of Object.keys(e.headers))r[s]=e.headers[s];throw new ce(t,r,e.data)}return e.data.data}))}(s,e,r)),{defaults:de.bind(null,s),endpoint:ae.endpoint})}de(ae,{headers:{"user-agent":`octokit-graphql.js/4.8.0 ${T()}`},method:"POST",url:"/graphql"});const ge=/^v1\./,me=/^ghs_/,Ee=/^ghu_/;async function Te(e){const r=3===e.split(/\./).length,s=ge.test(e)||me.test(e),o=Ee.test(e);return{type:"token",token:e,tokenType:r?"app":s?"installation":o?"user-to-server":"oauth"}}async function he(e,r,s,o){const t=r.endpoint.merge(s,o);return t.headers.authorization=function(e){return 3===e.split(/\./).length?`bearer ${e}`:`token ${e}`}(e),r(t)}const we=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if("string"!=typeof e)throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Te.bind(null,e),{hook:he.bind(null,e)})};class be{constructor(e={}){const r=new O,s={baseUrl:ae.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};var o;if(s.headers["user-agent"]=[e.userAgent,`octokit-core.js/3.6.0 ${T()}`].filter(Boolean).join(" "),e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=ae.defaults(s),this.graphql=(o=this.request,de(o,{method:"POST",url:"/graphql"})).defaults(s),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=r,e.authStrategy){const{authStrategy:s,...o}=e,t=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",t.hook),this.auth=t}else if(e.auth){const s=we(e.auth);r.wrap("request",s.hook),this.auth=s}else this.auth=async()=>({type:"unauthenticated"});this.constructor.plugins.forEach((r=>{Object.assign(this,r(this,e))}))}static defaults(e){return class extends(this){constructor(...r){const s=r[0]||{};super("function"!=typeof e?Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null):e(s))}}}static plugin(...e){var r;const s=this.plugins;return(r=class extends(this){}).plugins=s.concat(e.filter((e=>!s.includes(e)))),r}}be.VERSION="3.6.0",be.plugins=[];function _e(e){e.hook.wrap("request",((r,s)=>{e.log.debug("request",s);const o=Date.now(),t=e.request.endpoint.parse(s),n=t.url.replace(s.baseUrl,"");return r(s).then((r=>(e.log.info(`${t.method} ${n} - ${r.status} in ${Date.now()-o}ms`),r))).catch((r=>{throw e.log.info(`${t.method} ${n} - ${r.status} in ${Date.now()-o}ms`),r}))}))}_e.VERSION="1.0.4";function ke(e,r,s){const o="function"==typeof r?r.endpoint(s):e.request.endpoint(r,s),t="function"==typeof r?r:e.request,n=o.method,i=o.headers;let a=o.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!a)return{done:!0};try{const e=function(e){if(!e.data)return{...e,data:[]};if(!("total_count"in e.data)||"url"in e.data)return e;const r=e.data.incomplete_results,s=e.data.repository_selection,o=e.data.total_count;delete e.data.incomplete_results,delete e.data.repository_selection,delete e.data.total_count;const t=Object.keys(e.data)[0],n=e.data[t];return e.data=n,void 0!==r&&(e.data.incomplete_results=r),void 0!==s&&(e.data.repository_selection=s),e.data.total_count=o,e}(await t({method:n,url:a,headers:i}));return a=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:e}}catch(e){if(409!==e.status)throw e;return a="",{value:{status:200,headers:{},data:[]}}}}})}}function fe(e,r,s,o){return"function"==typeof s&&(o=s,s=void 0),Ge(e,[],ke(e,r,s)[Symbol.asyncIterator](),o)}function Ge(e,r,s,o){return s.next().then((t=>{if(t.done)return r;let n=!1;return r=r.concat(o?o(t.value,(function(){n=!0})):t.value.data),n?r:Ge(e,r,s,o)}))}function Pe(e){return{paginate:Object.assign(fe.bind(null,e),{iterator:ke.bind(null,e)})}}Object.assign(fe,{iterator:ke}),Pe.VERSION="2.21.3";const ye={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createOrUpdateEnvironmentSecret:["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteEnvironmentSecret:["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForEnterprise:["GET /enterprises/{enterprise}/actions/cache/usage"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getEnvironmentPublicKey:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],getGithubActionsDefaultWorkflowPermissionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listEnvironmentSecrets:["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setGithubActionsDefaultWorkflowPermissionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubAdvancedSecurityBillingGhe:["GET /enterprises/{enterprise}/settings/billing/advanced-security"],getGithubAdvancedSecurityBillingOrg:["GET /orgs/{org}/settings/billing/advanced-security"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]},emojis:{get:["GET /emojis"]},enterpriseAdmin:{addCustomLabelsToSelfHostedRunnerForEnterprise:["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],disableSelectedOrganizationGithubActionsEnterprise:["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],enableSelectedOrganizationGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],getAllowedActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/selected-actions"],getGithubActionsPermissionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions"],getServerStatistics:["GET /enterprise-installation/{enterprise_or_org}/server-statistics"],listLabelsForSelfHostedRunnerForEnterprise:["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],listSelectedOrganizationsEnabledGithubActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/organizations"],removeAllCustomLabelsFromSelfHostedRunnerForEnterprise:["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForEnterprise:["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"],setAllowedActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForEnterprise:["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],setGithubActionsPermissionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions"],setSelectedOrganizationsEnabledGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import"],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors"],getImportStatus:["GET /repos/{owner}/{repo}/import"],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs"],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],updateImport:["PATCH /repos/{owner}/{repo}/import"]},orgs:{blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createInvitation:["POST /orgs/{org}/invitations"],createWebhook:["POST /orgs/{org}/hooks"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],get:["GET /orgs/{org}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listBlockedUsers:["GET /orgs/{org}/blocks"],listCustomRoles:["GET /organizations/{organization_id}/custom_roles"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}"],createCard:["POST /projects/columns/{column_id}/cards"],createColumn:["POST /projects/{project_id}/columns"],createForAuthenticatedUser:["POST /user/projects"],createForOrg:["POST /orgs/{org}/projects"],createForRepo:["POST /repos/{owner}/{repo}/projects"],delete:["DELETE /projects/{project_id}"],deleteCard:["DELETE /projects/columns/cards/{card_id}"],deleteColumn:["DELETE /projects/columns/{column_id}"],get:["GET /projects/{project_id}"],getCard:["GET /projects/columns/cards/{card_id}"],getColumn:["GET /projects/columns/{column_id}"],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission"],listCards:["GET /projects/columns/{column_id}/cards"],listCollaborators:["GET /projects/{project_id}/collaborators"],listColumns:["GET /projects/{project_id}/columns"],listForOrg:["GET /orgs/{org}/projects"],listForRepo:["GET /repos/{owner}/{repo}/projects"],listForUser:["GET /users/{username}/projects"],moveCard:["POST /projects/columns/cards/{card_id}/moves"],moveColumn:["POST /projects/columns/{column_id}/moves"],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}"],update:["PATCH /projects/{project_id}"],updateCard:["PATCH /projects/columns/cards/{card_id}"],updateColumn:["PATCH /projects/columns/{column_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createTagProtection:["POST /repos/{owner}/{repo}/tags/protection"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteTagProtection:["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableLfsForRepo:["DELETE /repos/{owner}/{repo}/lfs"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enableLfsForRepo:["PUT /repos/{owner}/{repo}/lfs"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTagProtection:["GET /repos/{owner}/{repo}/tags/protection"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/secret-scanning/alerts"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}};function ve(e,r,s,o,t){const n=e.request.defaults(o);return Object.assign((function(...o){let i=n.endpoint.merge(...o);if(t.mapToData)return i=Object.assign({},i,{data:i[t.mapToData],[t.mapToData]:void 0}),n(i);if(t.renamed){const[o,n]=t.renamed;e.log.warn(`octokit.${r}.${s}() has been renamed to octokit.${o}.${n}()`)}if(t.deprecated&&e.log.warn(t.deprecated),t.renamedParameters){const i=n.endpoint.merge(...o);for(const[o,n]of Object.entries(t.renamedParameters))o in i&&(e.log.warn(`"${o}" parameter is deprecated for "octokit.${r}.${s}()". Use "${n}" instead`),n in i||(i[n]=i[o]),delete i[o]);return n(i)}return n(...o)}),n)}function Ae(e){const r=function(e,r){const s={};for(const[o,t]of Object.entries(r))for(const[r,n]of Object.entries(t)){const[t,i,a]=n,[c,p]=t.split(/ /),l=Object.assign({method:c,url:p},i);s[o]||(s[o]={});const u=s[o];u[r]=a?ve(e,o,r,l,a):e.request.defaults(l)}return s}(e,ye);return{...r,rest:r}}Ae.VERSION="5.16.2";const Fe=be.plugin(_e,Ae,Pe).defaults({userAgent:"octokit-rest.js/18.12.0"}),{apiBaseUrl:Oe}=l["status-website"]||{},Se=l.userAgent,Re=()=>{let e="";return"undefined"!=typeof window&&"localStorage"in window&&localStorage.getItem("personal-access-token")&&(e=localStorage.getItem("personal-access-token")),new Fe({baseUrl:Oe,userAgent:Se,auth:e||void 0})},Ue=e=>{"Bad credentials"===e.message?window.location.href=l.path+"/error":(e.message||"").indexOf("rate limit exceeded")>-1?window.location.href=l.path+"/rate-limit-exceeded":(window.location.href=l.path+"/error",console.log(e.message))},Ce=async(e,r)=>{try{if("undefined"!=typeof window&&"localStorage"in window){const r=localStorage.getItem(e);if(r){const s=JSON.parse(r);if(!((new Date).getTime()-new Date(s.createdAt||"").getTime()>("localhost"===document.domain?l["status-website"].localhostCacheTime||36e5:l["status-website"].productionCacheTime||12e4)))return console.log("Got cached item"),s.data;localStorage.removeItem(e)}}}catch(e){}console.log("Got here");const s=await r();return localStorage.setItem(e,JSON.stringify({data:s,createdAt:new Date})),s};export{E as L,Ce as a,Re as c,Ue as h}; +function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function R(e){var r,s;return!1!==S(e)&&(void 0===(r=e.constructor)||!1!==S(s=r.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}function U(e,r){const s=Object.assign({},e);return Object.keys(r).forEach((o=>{R(r[o])?o in e?s[o]=U(e[o],r[o]):Object.assign(s,{[o]:r[o]}):Object.assign(s,{[o]:r[o]})})),s}function C(e){for(const r in e)void 0===e[r]&&delete e[r];return e}function D(e,r,s){if("string"==typeof r){let[e,o]=r.split(" ");s=Object.assign(o?{method:e,url:o}:{url:e},s)}else s=Object.assign({},r);var o;s.headers=(o=s.headers)?Object.keys(o).reduce(((e,r)=>(e[r.toLowerCase()]=o[r],e)),{}):{},C(s),C(s.headers);const t=U(e||{},s);return e&&e.mediaType.previews.length&&(t.mediaType.previews=e.mediaType.previews.filter((e=>!t.mediaType.previews.includes(e))).concat(t.mediaType.previews)),t.mediaType.previews=t.mediaType.previews.map((e=>e.replace(/-preview/,""))),t}v.Hook=A,v.Singular=F,v.Collection=O;const L=/\{[^}]+\}/g;function j(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function I(e,r){return Object.keys(e).filter((e=>!r.includes(e))).reduce(((r,s)=>(r[s]=e[s],r)),{})}function q(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function H(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function W(e,r,s){return r="+"===e||"#"===e?q(r):H(r),s?H(s)+"="+r:r}function B(e){return null!=e}function x(e){return";"===e||"&"===e||"?"===e}function $(e,r){var s=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,t){if(o){let e="";const t=[];if(-1!==s.indexOf(o.charAt(0))&&(e=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach((function(s){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(s);t.push(function(e,r,s,o){var t=e[s],n=[];if(B(t)&&""!==t)if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)t=t.toString(),o&&"*"!==o&&(t=t.substring(0,parseInt(o,10))),n.push(W(r,t,x(r)?s:""));else if("*"===o)Array.isArray(t)?t.filter(B).forEach((function(e){n.push(W(r,e,x(r)?s:""))})):Object.keys(t).forEach((function(e){B(t[e])&&n.push(W(r,t[e],e))}));else{const e=[];Array.isArray(t)?t.filter(B).forEach((function(s){e.push(W(r,s))})):Object.keys(t).forEach((function(s){B(t[s])&&(e.push(H(s)),e.push(W(r,t[s].toString())))})),x(r)?n.push(H(s)+"="+e.join(",")):0!==e.length&&n.push(e.join(","))}else";"===r?B(t)&&n.push(H(s)):""!==t||"&"!==r&&"?"!==r?""===t&&n.push(""):n.push(H(s)+"=");return n}(r,e,o[1],o[2]||o[3]))})),e&&"+"!==e){var n=",";return"?"===e?n="&":"#"!==e&&(n=e),(0!==t.length?e:"")+t.join(n)}return t.join(",")}return q(t)}))}function z(e){let r,s=e.method.toUpperCase(),o=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),t=Object.assign({},e.headers),n=I(e,["method","baseUrl","url","headers","request","mediaType"]);const i=function(e){const r=e.match(L);return r?r.map(j).reduce(((e,r)=>e.concat(r)),[]):[]}(o);var a;o=(a=o,{expand:$.bind(null,a)}).expand(n),/^http/.test(o)||(o=e.baseUrl+o);const c=I(n,Object.keys(e).filter((e=>i.includes(e))).concat("baseUrl"));if(!/application\/octet-stream/i.test(t.accept)&&(e.mediaType.format&&(t.accept=t.accept.split(/,/).map((r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")),e.mediaType.previews.length)){const r=t.accept.match(/[\w-]+(?=-preview)/g)||[];t.accept=r.concat(e.mediaType.previews).map((r=>`application/vnd.github.${r}-preview${e.mediaType.format?`.${e.mediaType.format}`:"+json"}`)).join(",")}return["GET","HEAD"].includes(s)?o=function(e,r){const s=/\?/.test(e)?"&":"?",o=Object.keys(r);return 0===o.length?e:e+s+o.map((e=>"q"===e?"q="+r.q.split("+").map(encodeURIComponent).join("+"):`${e}=${encodeURIComponent(r[e])}`)).join("&")}(o,c):"data"in c?r=c.data:Object.keys(c).length?r=c:t["content-length"]=0,t["content-type"]||void 0===r||(t["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(s)&&void 0===r&&(r=""),Object.assign({method:s,url:o,headers:t},void 0!==r?{body:r}:null,e.request?{request:e.request}:null)}function K(e,r,s){return z(D(e,r,s))}const M=function e(r,s){const o=D(r,s),t=K.bind(null,o);return Object.assign(t,{DEFAULTS:o,defaults:e.bind(null,o),merge:D.bind(null,o),parse:z})}(null,{method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":`octokit-endpoint.js/6.0.12 ${T()}`},mediaType:{format:"",previews:[]}});var V,N,J=(V=function(e,r){var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s)return s;throw new Error("unable to locate global object")}();e.exports=r=s.fetch,s.fetch&&(r.default=s.fetch.bind(s)),r.Headers=s.Headers,r.Request=s.Request,r.Response=s.Response},V(N={exports:{}},N.exports),N.exports);class Z extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}}var Y=function e(r,s){if(r&&s)return e(r)(s);if("function"!=typeof r)throw new TypeError("need wrapper function");return Object.keys(r).forEach((function(e){o[e]=r[e]})),o;function o(){for(var e=new Array(arguments.length),s=0;sconsole.warn(e))),oe=Q((e=>console.warn(e)));class te extends Error{constructor(e,r,s){let o;super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=r,"headers"in s&&void 0!==s.headers&&(o=s.headers),"response"in s&&(this.response=s.response,o=s.response.headers);const t=Object.assign({},s.request);s.request.headers.authorization&&(t.headers=Object.assign({},s.request.headers,{authorization:s.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),t.url=t.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=t,Object.defineProperty(this,"code",{get:()=>(se(new Z("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),r)}),Object.defineProperty(this,"headers",{get:()=>(oe(new Z("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")),o||{})})}}function ne(e){const r=e.request&&e.request.log?e.request.log:console;(R(e.body)||Array.isArray(e.body))&&(e.body=JSON.stringify(e.body));let s,o,t={};return(e.request&&e.request.fetch||J)(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then((async n=>{o=n.url,s=n.status;for(const e of n.headers)t[e[0]]=e[1];if("deprecation"in t){const s=t.link&&t.link.match(/<([^>]+)>; rel="deprecation"/),o=s&&s.pop();r.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${t.sunset}${o?`. See ${o}`:""}`)}if(204!==s&&205!==s){if("HEAD"===e.method){if(s<400)return;throw new te(n.statusText,s,{response:{url:o,status:s,headers:t,data:void 0},request:e})}if(304===s)throw new te("Not modified",s,{response:{url:o,status:s,headers:t,data:await ie(n)},request:e});if(s>=400){const r=await ie(n),i=new te(function(e){if("string"==typeof e)return e;if("message"in e)return Array.isArray(e.errors)?`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`:e.message;return`Unknown error: ${JSON.stringify(e)}`}(r),s,{response:{url:o,status:s,headers:t,data:r},request:e});throw i}return ie(n)}})).then((e=>({status:s,url:o,headers:t,data:e}))).catch((r=>{if(r instanceof te)throw r;throw new te(r.message,500,{request:e})}))}async function ie(e){const r=e.headers.get("content-type");return/application\/json/.test(r)?e.json():!r||/^text\/|charset=utf-8$/.test(r)?e.text():function(e){return e.arrayBuffer()}(e)}const ae=function e(r,s){const o=r.defaults(s);return Object.assign((function(r,s){const t=o.merge(r,s);if(!t.request||!t.request.hook)return ne(o.parse(t));const n=(e,r)=>ne(o.parse(o.merge(e,r)));return Object.assign(n,{endpoint:o,defaults:e.bind(null,o)}),t.request.hook(n,t)}),{endpoint:o,defaults:e.bind(null,o)})}(M,{headers:{"user-agent":`octokit-request.js/5.6.3 ${T()}`}});class ce extends Error{constructor(e,r,s){super("Request failed due to following response errors:\n"+s.errors.map((e=>` - ${e.message}`)).join("\n")),this.request=e,this.headers=r,this.response=s,this.name="GraphqlResponseError",this.errors=s.errors,this.data=s.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const pe=["method","baseUrl","url","headers","request","query","mediaType"],le=["query","method","url"],ue=/\/api\/v3\/?$/;function de(e,r){const s=e.defaults(r);return Object.assign(((e,r)=>function(e,r,s){if(s){if("string"==typeof r&&"query"in s)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(const e in s)if(le.includes(e))return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}const o="string"==typeof r?Object.assign({query:r},s):r,t=Object.keys(o).reduce(((e,r)=>pe.includes(r)?(e[r]=o[r],e):(e.variables||(e.variables={}),e.variables[r]=o[r],e)),{}),n=o.baseUrl||e.endpoint.DEFAULTS.baseUrl;return ue.test(n)&&(t.url=n.replace(ue,"/api/graphql")),e(t).then((e=>{if(e.data.errors){const r={};for(const s of Object.keys(e.headers))r[s]=e.headers[s];throw new ce(t,r,e.data)}return e.data.data}))}(s,e,r)),{defaults:de.bind(null,s),endpoint:ae.endpoint})}de(ae,{headers:{"user-agent":`octokit-graphql.js/4.8.0 ${T()}`},method:"POST",url:"/graphql"});const ge=/^v1\./,me=/^ghs_/,Ee=/^ghu_/;async function Te(e){const r=3===e.split(/\./).length,s=ge.test(e)||me.test(e),o=Ee.test(e);return{type:"token",token:e,tokenType:r?"app":s?"installation":o?"user-to-server":"oauth"}}async function he(e,r,s,o){const t=r.endpoint.merge(s,o);return t.headers.authorization=function(e){return 3===e.split(/\./).length?`bearer ${e}`:`token ${e}`}(e),r(t)}const we=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if("string"!=typeof e)throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Te.bind(null,e),{hook:he.bind(null,e)})},be="3.6.0";class _e{constructor(e={}){const r=new O,s={baseUrl:ae.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};var o;if(s.headers["user-agent"]=[e.userAgent,`octokit-core.js/${be} ${T()}`].filter(Boolean).join(" "),e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=ae.defaults(s),this.graphql=(o=this.request,de(o,{method:"POST",url:"/graphql"})).defaults(s),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=r,e.authStrategy){const{authStrategy:s,...o}=e,t=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",t.hook),this.auth=t}else if(e.auth){const s=we(e.auth);r.wrap("request",s.hook),this.auth=s}else this.auth=async()=>({type:"unauthenticated"});this.constructor.plugins.forEach((r=>{Object.assign(this,r(this,e))}))}static defaults(e){return class extends(this){constructor(...r){const s=r[0]||{};super("function"!=typeof e?Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null):e(s))}}}static plugin(...e){var r;const s=this.plugins;return(r=class extends(this){}).plugins=s.concat(e.filter((e=>!s.includes(e)))),r}}_e.VERSION=be,_e.plugins=[];function ke(e){e.hook.wrap("request",((r,s)=>{e.log.debug("request",s);const o=Date.now(),t=e.request.endpoint.parse(s),n=t.url.replace(s.baseUrl,"");return r(s).then((r=>(e.log.info(`${t.method} ${n} - ${r.status} in ${Date.now()-o}ms`),r))).catch((r=>{throw e.log.info(`${t.method} ${n} - ${r.status} in ${Date.now()-o}ms`),r}))}))}ke.VERSION="1.0.4";function fe(e,r,s){const o="function"==typeof r?r.endpoint(s):e.request.endpoint(r,s),t="function"==typeof r?r:e.request,n=o.method,i=o.headers;let a=o.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!a)return{done:!0};try{const e=function(e){if(!e.data)return{...e,data:[]};if(!("total_count"in e.data)||"url"in e.data)return e;const r=e.data.incomplete_results,s=e.data.repository_selection,o=e.data.total_count;delete e.data.incomplete_results,delete e.data.repository_selection,delete e.data.total_count;const t=Object.keys(e.data)[0],n=e.data[t];return e.data=n,void 0!==r&&(e.data.incomplete_results=r),void 0!==s&&(e.data.repository_selection=s),e.data.total_count=o,e}(await t({method:n,url:a,headers:i}));return a=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:e}}catch(e){if(409!==e.status)throw e;return a="",{value:{status:200,headers:{},data:[]}}}}})}}function Ge(e,r,s,o){return"function"==typeof s&&(o=s,s=void 0),Pe(e,[],fe(e,r,s)[Symbol.asyncIterator](),o)}function Pe(e,r,s,o){return s.next().then((t=>{if(t.done)return r;let n=!1;return r=r.concat(o?o(t.value,(function(){n=!0})):t.value.data),n?r:Pe(e,r,s,o)}))}function ye(e){return{paginate:Object.assign(Ge.bind(null,e),{iterator:fe.bind(null,e)})}}Object.assign(Ge,{iterator:fe}),ye.VERSION="2.21.3";const ve={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createOrUpdateEnvironmentSecret:["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteEnvironmentSecret:["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForEnterprise:["GET /enterprises/{enterprise}/actions/cache/usage"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getEnvironmentPublicKey:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],getGithubActionsDefaultWorkflowPermissionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listEnvironmentSecrets:["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setGithubActionsDefaultWorkflowPermissionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubAdvancedSecurityBillingGhe:["GET /enterprises/{enterprise}/settings/billing/advanced-security"],getGithubAdvancedSecurityBillingOrg:["GET /orgs/{org}/settings/billing/advanced-security"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]},emojis:{get:["GET /emojis"]},enterpriseAdmin:{addCustomLabelsToSelfHostedRunnerForEnterprise:["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],disableSelectedOrganizationGithubActionsEnterprise:["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],enableSelectedOrganizationGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],getAllowedActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/selected-actions"],getGithubActionsPermissionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions"],getServerStatistics:["GET /enterprise-installation/{enterprise_or_org}/server-statistics"],listLabelsForSelfHostedRunnerForEnterprise:["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],listSelectedOrganizationsEnabledGithubActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/organizations"],removeAllCustomLabelsFromSelfHostedRunnerForEnterprise:["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForEnterprise:["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"],setAllowedActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForEnterprise:["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"],setGithubActionsPermissionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions"],setSelectedOrganizationsEnabledGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import"],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors"],getImportStatus:["GET /repos/{owner}/{repo}/import"],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs"],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],updateImport:["PATCH /repos/{owner}/{repo}/import"]},orgs:{blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createInvitation:["POST /orgs/{org}/invitations"],createWebhook:["POST /orgs/{org}/hooks"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],get:["GET /orgs/{org}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listBlockedUsers:["GET /orgs/{org}/blocks"],listCustomRoles:["GET /organizations/{organization_id}/custom_roles"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}"],createCard:["POST /projects/columns/{column_id}/cards"],createColumn:["POST /projects/{project_id}/columns"],createForAuthenticatedUser:["POST /user/projects"],createForOrg:["POST /orgs/{org}/projects"],createForRepo:["POST /repos/{owner}/{repo}/projects"],delete:["DELETE /projects/{project_id}"],deleteCard:["DELETE /projects/columns/cards/{card_id}"],deleteColumn:["DELETE /projects/columns/{column_id}"],get:["GET /projects/{project_id}"],getCard:["GET /projects/columns/cards/{card_id}"],getColumn:["GET /projects/columns/{column_id}"],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission"],listCards:["GET /projects/columns/{column_id}/cards"],listCollaborators:["GET /projects/{project_id}/collaborators"],listColumns:["GET /projects/{project_id}/columns"],listForOrg:["GET /orgs/{org}/projects"],listForRepo:["GET /repos/{owner}/{repo}/projects"],listForUser:["GET /users/{username}/projects"],moveCard:["POST /projects/columns/cards/{card_id}/moves"],moveColumn:["POST /projects/columns/{column_id}/moves"],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}"],update:["PATCH /projects/{project_id}"],updateCard:["PATCH /projects/columns/cards/{card_id}"],updateColumn:["PATCH /projects/columns/{column_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createTagProtection:["POST /repos/{owner}/{repo}/tags/protection"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteTagProtection:["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableLfsForRepo:["DELETE /repos/{owner}/{repo}/lfs"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enableLfsForRepo:["PUT /repos/{owner}/{repo}/lfs"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTagProtection:["GET /repos/{owner}/{repo}/tags/protection"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/secret-scanning/alerts"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}};function Ae(e,r,s,o,t){const n=e.request.defaults(o);return Object.assign((function(...o){let i=n.endpoint.merge(...o);if(t.mapToData)return i=Object.assign({},i,{data:i[t.mapToData],[t.mapToData]:void 0}),n(i);if(t.renamed){const[o,n]=t.renamed;e.log.warn(`octokit.${r}.${s}() has been renamed to octokit.${o}.${n}()`)}if(t.deprecated&&e.log.warn(t.deprecated),t.renamedParameters){const i=n.endpoint.merge(...o);for(const[o,n]of Object.entries(t.renamedParameters))o in i&&(e.log.warn(`"${o}" parameter is deprecated for "octokit.${r}.${s}()". Use "${n}" instead`),n in i||(i[n]=i[o]),delete i[o]);return n(i)}return n(...o)}),n)}function Fe(e){const r=function(e,r){const s={};for(const[o,t]of Object.entries(r))for(const[r,n]of Object.entries(t)){const[t,i,a]=n,[c,p]=t.split(/ /),l=Object.assign({method:c,url:p},i);s[o]||(s[o]={});const u=s[o];u[r]=a?Ae(e,o,r,l,a):e.request.defaults(l)}return s}(e,ve);return{...r,rest:r}}Fe.VERSION="5.16.2";const Oe=_e.plugin(ke,Fe,ye).defaults({userAgent:"octokit-rest.js/18.12.0"}),{apiBaseUrl:Se}=l["status-website"]||{},Re=l.userAgent,Ue=()=>{let e="";return"undefined"!=typeof window&&"localStorage"in window&&localStorage.getItem("personal-access-token")&&(e=localStorage.getItem("personal-access-token")),new Oe({baseUrl:Se,userAgent:Re,auth:e||void 0})},Ce=e=>{"Bad credentials"===e.message?window.location.href=l.path+"/error":(e.message||"").indexOf("rate limit exceeded")>-1?window.location.href=l.path+"/rate-limit-exceeded":(window.location.href=l.path+"/error",console.log(e.message))},De=async(e,r)=>{try{if("undefined"!=typeof window&&"localStorage"in window){const r=localStorage.getItem(e);if(r){const s=JSON.parse(r);if(!((new Date).getTime()-new Date(s.createdAt||"").getTime()>("localhost"===document.domain?l["status-website"].localhostCacheTime||36e5:l["status-website"].productionCacheTime||12e4)))return console.log("Got cached item"),s.data;localStorage.removeItem(e)}}}catch(e){}console.log("Got here");const s=await r();return localStorage.setItem(e,JSON.stringify({data:s,createdAt:new Date})),s};export{E as L,De as a,Ue as c,Ce as h}; diff --git a/client/legacy/_number_.b6a5245c.js b/client/legacy/_number_.b6a5245c.js index c16845d236..96d0060b7f 100644 --- a/client/legacy/_number_.b6a5245c.js +++ b/client/legacy/_number_.b6a5245c.js @@ -11,4 +11,4 @@ import{_ as t,a as e,i,s as n,b as a,c as r,S as o,d as s,e as l,g as u,j as h,k * (c) 2022 Jukka Kurkela * Released under the MIT License */ -function Te(t){return t+.5|0}var Re=function(t,e,i){return Math.max(Math.min(t,i),e)};function Ee(t){return Re(Te(2.55*t),0,255)}function Le(t){return Re(Te(255*t),0,255)}function Ie(t){return Re(Te(t/2.55)/100,0,1)}function ze(t){return Re(Te(100*t),0,100)}var Fe={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},Ve=F("0123456789ABCDEF"),Be=function(t){return Ve[15&t]},Ne=function(t){return Ve[(240&t)>>4]+Ve[15&t]},We=function(t){return(240&t)>>4==(15&t)};function je(t){var e=function(t){return We(t.r)&&We(t.g)&&We(t.b)&&We(t.a)}(t)?Be:Ne;return t?"#"+e(t.r)+e(t.g)+e(t.b)+function(t,e){return t<255?e(t):""}(t.a,e):void 0}var He=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $e(t,e,i){var n=e*Math.min(i,1-i),a=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-n*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function Ye(t,e,i){var n=function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+t/60)%6;return i-i*e*Math.max(Math.min(a,4-a,1),0)};return[n(5),n(3),n(1)]}function Ue(t,e,i){var n,a=$e(t,1,.5);for(e+i>1&&(e*=n=1/(e+i),i*=n),n=0;n<3;n++)a[n]*=1-e-i,a[n]+=e;return a}function Xe(t){var e,i,n,a=t.r/255,r=t.g/255,o=t.b/255,s=Math.max(a,r,o),l=Math.min(a,r,o),u=(s+l)/2;return s!==l&&(n=s-l,i=u>.5?n/(2-s-l):n/(s+l),e=function(t,e,i,n,a){return t===a?(e-i)/n+(e>16&255,i>>8&255,255&i]}return r}()).transparent=[0,0,0,0]);var e=Je[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}var ii=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var ni=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},ai=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)};function ri(t,e,i){if(t){var n=Xe(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ke(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function oi(t,e){return t?Object.assign(e||{},t):t}function si(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Le(t[3]))):(e=oi(t,{r:0,g:0,b:0,a:1})).a=Le(e.a),e}function li(t){return"r"===t.charAt(0)?function(t){var e,i,n,a=ii.exec(t),r=255;if(a){if(a[7]!==e){var o=+a[7];r=a[8]?Ee(o):Re(255*o,0,255)}return e=+a[1],i=+a[3],n=+a[5],{r:e=255&(a[2]?Ee(e):Re(e,0,255)),g:i=255&(a[4]?Ee(i):Re(i,0,255)),b:n=255&(a[6]?Ee(n):Re(n,0,255)),a:r}}}(t):Ze(t)}var ui=function(){function t(i){if(e(this,t),i instanceof t)return i;var n,a,r,o,s=V(i);"object"===s?n=si(i):"string"===s&&(o=(a=i).length,"#"===a[0]&&(4===o||5===o?r={r:255&17*Fe[a[1]],g:255&17*Fe[a[2]],b:255&17*Fe[a[3]],a:5===o?17*Fe[a[4]]:255}:7!==o&&9!==o||(r={r:Fe[a[1]]<<4|Fe[a[2]],g:Fe[a[3]]<<4|Fe[a[4]],b:Fe[a[5]]<<4|Fe[a[6]],a:9===o?Fe[a[7]]<<4|Fe[a[8]]:255})),n=r||ei(i)||li(i)),this._rgb=n,this._valid=!!n}return r(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=oi(this._rgb);return t&&(t.a=Ie(t.a)),t},set:function(t){this._rgb=si(t)}},{key:"rgbString",value:function(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(Ie(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0;var t}},{key:"hexString",value:function(){return this._valid?je(this._rgb):void 0}},{key:"hslString",value:function(){return this._valid?function(t){if(t){var e=Xe(t),i=e[0],n=ze(e[1]),a=ze(e[2]);return t.a<255?"hsla(".concat(i,", ").concat(n,"%, ").concat(a,"%, ").concat(Ie(t.a),")"):"hsl(".concat(i,", ").concat(n,"%, ").concat(a,"%)")}}(this._rgb):void 0}},{key:"mix",value:function(t,e){if(t){var i,n=this.rgb,a=t.rgb,r=e===i?.5:e,o=2*r-1,s=n.a-a.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*a.r+.5,n.g=255&l*n.g+i*a.g+.5,n.b=255&l*n.b+i*a.b+.5,n.a=r*n.a+(1-r)*a.a,this.rgb=n}return this}},{key:"interpolate",value:function(t,e){return t&&(this._rgb=function(t,e,i){var n=ai(Ie(t.r)),a=ai(Ie(t.g)),r=ai(Ie(t.b));return{r:Le(ni(n+i*(ai(Ie(e.r))-n))),g:Le(ni(a+i*(ai(Ie(e.g))-a))),b:Le(ni(r+i*(ai(Ie(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}},{key:"clone",value:function(){return new t(this.rgb)}},{key:"alpha",value:function(t){return this._rgb.a=Le(t),this}},{key:"clearer",value:function(t){return this._rgb.a*=1-t,this}},{key:"greyscale",value:function(){var t=this._rgb,e=Te(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}},{key:"opaquer",value:function(t){return this._rgb.a*=1+t,this}},{key:"negate",value:function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}},{key:"lighten",value:function(t){return ri(this._rgb,2,t),this}},{key:"darken",value:function(t){return ri(this._rgb,2,-t),this}},{key:"saturate",value:function(t){return ri(this._rgb,1,t),this}},{key:"desaturate",value:function(t){return ri(this._rgb,1,-t),this}},{key:"rotate",value:function(t){return function(t,e){var i=Xe(t);i[0]=Ge(i[0]+e),i=Ke(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}]),t}();function hi(t){return new ui(t)}function ci(t){if(t&&"object"===V(t)){var e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function fi(t){return ci(t)?t:hi(t)}function di(t){return ci(t)?t:hi(t).saturate(.5).darken(.1).hexString()}var vi=Object.create(null),gi=Object.create(null);function pi(t,e){if(!e)return t;for(var i=e.split("."),n=0,a=i.length;nn&&(n=r),n}function _i(t,e,i,n){var a=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;var o,s,l,u,h,c=0,f=i.length;for(o=0;oi.length){for(o=0;o0&&t.stroke()}}function Pi(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y5&&void 0!==arguments[5]?arguments[5]:{},l=Mt(e)?e:[e],u=s.strokeWidth>0&&""!==s.strokeColor;for(t.save(),t.font=a.string,Ri(t,s),r=0;r1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return t[0]};jt(a)||(a=an("_fallback",t));var o=(et(e={},Symbol.toStringTag,"Object"),et(e,"_cacheable",!0),et(e,"_scopes",t),et(e,"_rootScopes",n),et(e,"_fallback",a),et(e,"_getTarget",r),et(e,"override",(function(e){return Yi([e].concat(F(t)),i,n,a)})),e);return new Proxy(o,{deleteProperty:function(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get:function(e,n){return Gi(e,n,(function(){return nn(n,i,t,e)}))},getOwnPropertyDescriptor:function(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t[0])},has:function(t,e){return rn(t).includes(e)},ownKeys:function(t){return rn(t)},set:function(t,e,i){var n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function Ui(t,e,i,n){var a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Xi(t,n),setContext:function(e){return Ui(t,e,i,n)},override:function(a){return Ui(t.override(a),e,i,n)}};return new Proxy(a,{deleteProperty:function(e,i){return delete e[i],delete t[i],!0},get:function(t,e,i){return Gi(t,e,(function(){return function(t,e,i){var n=t._proxy,a=t._context,r=t._subProxy,o=t._descriptors,s=n[e];Ht(s)&&o.isScriptable(e)&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._stack;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t),e=e(r,o||n),s.delete(t),Ki(t,e)&&(e=tn(a._scopes,a,t,e));return e}(e,s,t,i));Mt(s)&&s.length&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._descriptors;if(jt(r.index)&&n(t))e=e[r.index%e.length];else if(St(e[0])){var l=e,u=a._scopes.filter((function(t){return t!==l}));e=[];var h,c=yt(l);try{for(c.s();!(h=c.n()).done;){var f=tn(u,a,t,h.value);e.push(Ui(f,r,o&&o[t],s))}}catch(t){c.e(t)}finally{c.f()}}return e}(e,s,t,o.isIndexable));Ki(e,s)&&(s=Ui(s,a,r&&r[e],o));return s}(t,e,i)}))},getOwnPropertyDescriptor:function(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t)},has:function(e,i){return Reflect.has(t,i)},ownKeys:function(){return Reflect.ownKeys(t)},set:function(e,i,n){return t[i]=n,delete e[i],!0}})}function Xi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},i=t._scriptable,n=void 0===i?e.scriptable:i,a=t._indexable,r=void 0===a?e.indexable:a,o=t._allKeys,s=void 0===o?e.allKeys:o;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Ht(n)?n:function(){return n},isIndexable:Ht(r)?r:function(){return r}}}var qi=function(t,e){return t?t+Wt(e):e},Ki=function(t,e){return St(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object)};function Gi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=i();return t[e]=n,n}function Zi(t,e,i){return Ht(t)?t(e,i):t}var Ji=function(t,e){return!0===t?e:"string"==typeof t?Nt(e,t):void 0};function Qi(t,e,i,n,a){var r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value,l=Ji(i,s);if(l){t.add(l);var u=Zi(l._fallback,i,a);if(jt(u)&&u!==i&&u!==n)return u}else if(!1===l&&jt(n)&&i!==n)return null}}catch(t){o.e(t)}finally{o.f()}return!1}function tn(t,e,i,n){var a=e._rootScopes,r=Zi(e._fallback,i,n),o=[].concat(F(t),F(a)),s=new Set;s.add(n);var l=en(s,o,i,r||i,n);return null!==l&&((!jt(r)||r===i||null!==(l=en(s,o,r,l,n)))&&Yi(Array.from(s),[""],a,r,(function(){return function(t,e,i){var n=t._getTarget();e in n||(n[e]={});var a=n[e];if(Mt(a)&&St(i))return i;return a}(e,i,n)})))}function en(t,e,i,n,a){for(;i;)i=Qi(t,e,i,n,a);return i}function nn(t,e,i,n){var a,r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(a=an(qi(s,t),i),jt(a))return Ki(t,a)?tn(i,n,t,a):a}}catch(t){o.e(t)}finally{o.f()}}function an(t,e){var i,n=yt(e);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a){var r=a[t];if(jt(r))return r}}}catch(t){n.e(t)}finally{n.f()}}function rn(t){var e=t._keys;return e||(e=t._keys=function(t){var e,i=new Set,n=yt(t);try{for(n.s();!(e=n.n()).done;){var a,r=e.value,o=yt(Object.keys(r).filter((function(t){return!t.startsWith("_")})));try{for(o.s();!(a=o.n()).done;){var s=a.value;i.add(s)}}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}return Array.from(i)}(t._scopes)),e}function on(t,e,i,n){var a,r,o,s,l=t.iScale,u=this._parsing.key,h=void 0===u?"r":u,c=new Array(n);for(a=0,r=n;a2&&void 0!==arguments[2]?arguments[2]:"x",o=un(r),s=t.length,l=ln(t,0),u=0;u1&&void 0!==arguments[1]?arguments[1]:"x",r=un(a),o=t.length,s=Array(o).fill(0),l=Array(o),u=ln(t,0);for(e=0;e0||e>0)&&(!i||!i.shadowRoot)}(o,s,t.target))i=o,n=s;else{var u=e.getBoundingClientRect();i=r.clientX-u.left,n=r.clientY-u.top,l=!0}return{x:i,y:n,box:l}}(t,i),u=l.x,h=l.y,c=l.box,f=o.left+(c&&s.left),d=o.top+(c&&s.top),v=e.width,g=e.height;return r&&(v-=o.width+s.width,g-=o.height+s.height),{x:Math.round((u-f)/v*i.width/n),y:Math.round((h-d)/g*i.height/n)}}var _n=function(t){return Math.round(10*t)/10};function kn(t,e,i,n){var a=mn(t),r=bn(a,"margin"),o=pn(a.maxWidth,t,"clientWidth")||qt,s=pn(a.maxHeight,t,"clientHeight")||qt,l=function(t,e,i){var n,a;if(void 0===e||void 0===i){var r=gn(t);if(r){var o=r.getBoundingClientRect(),s=mn(r),l=bn(s,"border","width"),u=bn(s,"padding");e=o.width-u.width-l.width,i=o.height-u.height-l.height,n=pn(s.maxWidth,r,"clientWidth"),a=pn(s.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||qt,maxHeight:a||qt}}(t,e,i),u=l.width,h=l.height;if("content-box"===a.boxSizing){var c=bn(a,"border","width"),f=bn(a,"padding");u-=f.width+c.width,h-=f.height+c.height}return u=Math.max(0,u-r.width),h=Math.max(0,n?Math.floor(u/n):h-r.height),u=_n(Math.min(u,o,l.maxWidth)),h=_n(Math.min(h,s,l.maxHeight)),u&&!h&&(h=_n(u/2)),{width:u,height:h}}function wn(t,e,i){var n=e||1,a=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=a/n,t.width=r/n;var o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height="".concat(t.height,"px"),o.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==n||o.height!==a||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=a,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}var Mn=function(){var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Sn(t,e){var i=function(t,e){return mn(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Pn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Dn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function On(t,e,i,n){var a={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Pn(t,a,i),s=Pn(a,r,i),l=Pn(r,e,i),u=Pn(o,s,i),h=Pn(s,l,i);return Pn(u,h,i)}var An=new Map;function Cn(t,e,i){return function(t,e){e=e||{};var i=t+JSON.stringify(e),n=An.get(i);return n||(n=new Intl.NumberFormat(t,e),An.set(i,n)),n}(e,i).format(t)}function Tn(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function Rn(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function En(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ln(t){return"angle"===t?{between:fe,compare:he,normalize:ce}:{between:ve,compare:function(t,e){return t-e},normalize:function(t){return t}}}function In(t){var e=t.start,i=t.end,n=t.count;return{start:e%n,end:i%n,loop:t.loop&&(i-e+1)%n==0,style:t.style}}function zn(t,e,i){if(!i)return[t];for(var n,a,r,o=i.property,s=i.start,l=i.end,u=e.length,h=Ln(o),c=h.compare,f=h.between,d=h.normalize,v=function(t,e,i){var n,a,r=i.property,o=i.start,s=i.end,l=Ln(r),u=l.between,h=l.normalize,c=e.length,f=t.start,d=t.end,v=t.loop;if(v){for(f+=c,d+=c,n=0,a=c;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function Yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:Date.now(),i=0;this._charts.forEach((function(n,a){if(n.running&&n.items.length){for(var r,o=n.items,s=o.length-1,l=!1;s>=0;--s)(r=o[s])._active?(r._total>n.duration&&(n.duration=r._total),r.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(a.draw(),t._notify(a,n,e,"progress")),o.length||(n.running=!1,t._notify(a,n,e,"complete"),n.initial=!1),i+=o.length}})),this._lastDate=e,0===i&&(this._running=!1)}},{key:"_getAnims",value:function(t){var e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}},{key:"listen",value:function(t,e,i){this._getAnims(t).listeners[e].push(i)}},{key:"add",value:function(t,e){var i;e&&e.length&&(i=this._getAnims(t).items).push.apply(i,F(e))}},{key:"has",value:function(t){return this._getAnims(t).items.length>0}},{key:"start",value:function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((function(t,e){return Math.max(t,e._duration)}),0),this._refresh())}},{key:"running",value:function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}},{key:"stop",value:function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var i=e.items,n=i.length-1;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}},{key:"remove",value:function(t){return this._charts.delete(t)}}]),t}()),Xn={boolean:function(t,e,i){return i>.5?e:t},color:function(t,e,i){var n=fi(t||"transparent"),a=n.valid&&fi(e||"transparent");return a&&a.valid?a.mix(n,i).hexString():e},number:function(t,e,i){return t+(e-t)*i}},qn=function(){function t(i,n,a,r){e(this,t);var o=n[a];r=Hi([i.to,r,o,i.from]);var s=Hi([i.from,o,r]);this._active=!0,this._fn=i.fn||Xn[i.type||V(s)],this._easing=Ce[i.easing]||Ce.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=n,this._prop=a,this._from=s,this._to=r,this._promises=void 0}return r(t,[{key:"active",value:function(){return this._active}},{key:"update",value:function(t,e,i){if(this._active){this._notify(!1);var n=this._target[this._prop],a=i-this._start,r=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Hi([t.to,e,n,t.from]),this._from=Hi([t.from,n,e])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(t){var e,i=t-this._start,n=this._duration,a=this._prop,r=this._from,o=this._loop,s=this._to;if(this._active=r!==s&&(o||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,s,e))}},{key:"wait",value:function(){var t=this._promises||(this._promises=[]);return new Promise((function(e,i){t.push({res:e,rej:i})}))}},{key:"_notify",value:function(t){for(var e=t?"res":"rej",i=this._promises||[],n=0;n=0;--i){var l=o[i];if("$"!==l.charAt(0))if("options"!==l){var u=e[l],h=r[l],c=n.get(l);if(h){if(c&&h.active()){h.update(c,u,s);continue}h.cancel()}c&&c.duration?(r[l]=h=new qn(c,t,l,u),a.push(h)):t[l]=u}else a.push.apply(a,F(this._animateOptions(t,e)))}return a}},{key:"update",value:function(t,e){if(0!==this._properties.size){var i=this._createAnimations(t,e);return i.length?(Un.add(this._chart,i),!0):void 0}Object.assign(t,e)}}]),t}();function Zn(t,e){var i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:a,end:n?a:r}}function Jn(t,e){var i,n,a=[],r=t._getSortedDatasetMetas(e);for(i=0,n=r.length;i3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,u="single"===s.mode;if(null!==e){for(n=0,a=l.length;n0||!i&&s<0)return o.index}}catch(t){r.e(t)}finally{r.f()}return null}function na(t,e){for(var i,n=t.chart,a=t._cachedMeta,r=n._stacks||(n._stacks={}),o=a.iScale,s=a.vScale,l=a.index,u=o.axis,h=s.axis,c=function(t,e,i){return"".concat(t.id,".").concat(e.id,".").concat(i.stack||i.type)}(o,s,a),f=e.length,d=0;d0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=o,r._sorted=!0,a=o;else{a=Mt(o[t])?this.parseArrayData(r,o,t,e):St(o[t])?this.parseObjectData(r,o,t,e):this.parsePrimitiveData(r,o,t,e);for(i=0;ie||d=0;--i)if(!v()){this.updateRangeFromParsed(h,t,n,u);break}return h}},{key:"getAllParsedValues",value:function(t){var e,i,n,a=this._cachedMeta._parsed,r=[];for(e=0,i=a.length;e=0&&t1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,a="active"===i,r=this._cachedDataOpts,o=t+"-"+i,s=r[o],l=this.enableOptionSharing&&jt(n);if(s)return sa(s,l);var u=this.chart.config,h=u.datasetElementScopeKeys(this._type,t),c=a?["".concat(t,"Hover"),"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),h),d=Object.keys(bi.elements[t]),v=function(){return e.getContext(n,a)},g=u.resolveNamedOptions(f,d,v,c);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(sa(g,l))),g}},{key:"_resolveAnimations",value:function(t,e,i){var n,a=this.chart,r=this._cachedDataOpts,o="animation-".concat(e),s=r[o];if(s)return s;if(!1!==a.options.animation){var l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,e),h=l.getOptionScopes(this.getDataset(),u);n=l.createResolver(h,this.getContext(t,i,e))}var c=new Gn(a,n&&n.animations);return n&&n._cacheable&&(r[o]=Object.freeze(c)),c}},{key:"getSharedOptions",value:function(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}},{key:"includeOptions",value:function(t,e){return!e||oa(t)||this.chart._animationsDisabled}},{key:"_getSharedOptions",value:function(t,e){var i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,a=this.getSharedOptions(i),r=this.includeOptions(e,a)||a!==n;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:r}}},{key:"updateElement",value:function(t,e,i,n){oa(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}},{key:"updateSharedOptions",value:function(t,e,i){t&&!oa(e)&&this._resolveAnimations(void 0,e).update(t,i)}},{key:"_setStyle",value:function(t,e,i,n){t.active=n;var a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}},{key:"removeHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!1)}},{key:"setHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}},{key:"_resyncElements",value:function(t){var e,i=this._data,n=this._cachedMeta.data,a=$n(this._syncList);try{for(a.s();!(e=a.n()).done;){var r=v(e.value,3),o=r[0],s=r[1],l=r[2];this[o](s,l)}}catch(t){a.e(t)}finally{a.f()}this._syncList=[];var u=n.length,h=i.length,c=Math.min(h,u);c&&this.parse(0,c),h>u?this._insertElements(u,h-u,t):h2&&void 0!==arguments[2])||arguments[2],a=this._cachedMeta,r=a.data,o=t+e,s=function(t){for(t.length+=e,i=t.length-1;i>=o;i--)t[i]=t[i-e]};for(s(r),i=t;iMath.abs(s)&&(l=s,u=o),e[i.axis]=u,e._custom={barStart:l,barEnd:u,start:a,end:r,min:o,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function ca(t,e,i,n){var a,r,o,s,l=t.iScale,u=t.vScale,h=l.getLabels(),c=l===u,f=[];for(a=i,r=i+n;at.x,i="left",n="right"):(e=t.base=i?1:-1)}(i,a,u)*l,d===u&&(m-=i/2);var y=a.getPixelForDecimal(0),b=a.getPixelForDecimal(1),x=Math.min(y,b),_=Math.max(y,b);e=(m=Math.max(Math.min(m,_),x))+i}if(m===a.getPixelForValue(u)){var k=te(i)*a.getLineWidthForValue(u)/2;m+=k,i-=k}return{size:i,base:m,head:e,center:e+i/2}}},{key:"_calculateBarIndexPixels",value:function(t,e){var i,n,a=e.scale,r=this.options,o=r.skipNull,s=Ot(r.maxBarThickness,1/0);if(e.grouped){var l=o?this._getStackCount(t):e.stackCount,u="flex"===r.barThickness?function(t,e,i,n){var a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=e.xScale,n=e.yScale,a=this.getParsed(t),r=i.getLabelForValue(a.x),o=n.getLabelForValue(a.y),s=a._custom;return{label:e.label,value:"("+r+", "+o+(s?", "+s:"")+")"}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}},{key:"updateElements",value:function(t,e,i,n){for(var a="reset"===n,r=this._cachedMeta,o=r.iScale,s=r.vScale,l=this._getSharedOptions(e,n),u=l.sharedOptions,h=l.includeOptions,c=o.axis,f=s.axis,d=e;d0&&!isNaN(t)?Ut*(Math.abs(t)/e):0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Cn(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}},{key:"getMaxBorderWidth",value:function(t){var e,i,n,a,r,o=0,s=this.chart;if(!t)for(e=0,i=s.data.datasets.length;e0&&this.getParsed(e-1),_=e;_0&&Math.abs(w[d]-x[d])>y,m&&(M.parsed=w,M.raw=u.data[_]),f&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,M,n),x=w}}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;var a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,r)/2}},{key:"draw",value:function(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),B(s(a.prototype),"draw",this).call(this)}}]),a}();xa.id="line",xa.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},xa.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var _a=function(i){t(a,la);var n=Hn(a);function a(t,i){var r;return e(this,a),(r=n.call(this,t,i)).innerRadius=void 0,r.outerRadius=void 0,r}return r(a,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Cn(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}},{key:"parseObjectData",value:function(t,e,i,n){return on.bind(this)(t,e,i,n)}},{key:"update",value:function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}},{key:"getMinMax",value:function(){var t=this,e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((function(e,n){var a=t.getParsed(n).r;!isNaN(a)&&t.chart.getDataVisibility(n)&&(ai.max&&(i.max=a))})),i}},{key:"_updateRadius",value:function(){var t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),r=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}},{key:"updateElements",value:function(t,e,i,n){var a,r="reset"===n,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,h=l.yCenter,c=l.getIndexAngle(0)-.5*Yt,f=c,d=360/this.countVisibleElements();for(a=0;a1){var o=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(o<1e-4||o>1e15)&&(n="scientific"),r=function(t,e){var i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}var s=Qt(Math.abs(r)),l=Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:n,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(u,this.options.ticks.format),Cn(t,a,u)},logarithmic:function(t,e,i){if(0===t)return"0";var n=t/Math.pow(10,Math.floor(Qt(t)));return 1===n||2===n||5===n?Sa.numeric.call(this,t,e,i):""}};var Pa={formatters:Sa};function Da(t,e){var i=t.options.ticks,n=i.maxTicksLimit||function(t){var e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(n,a))}(t),a=i.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;en)return function(t,e,i,n){var a,r=0,o=i[0];for(n=Math.ceil(n),a=0;aa)return l}return Math.max(a,1)}(a,e,n);if(r>0){var h,c,f=r>1?Math.round((s-o)/(r-1)):null;for(Oa(e,l,u,wt(f)?0:o-f,o),h=0,c=r-1;hs+l)))return u}function Ra(t){return t.drawTicks?t.tickLength:0}function Ea(t,e){if(!t.display)return 0;var i=ji(t.font,e),n=Wi(t.padding);return(Mt(t.text)?t.text.length:1)*i.lineHeight+n.height}function La(t,e,i){var n=we(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=function(t){return"left"===t?"right":"right"===t?"left":t}(n)),n}var Ia=function(i){t(a,Ma);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this)).id=t.id,i.type=t.type,i.options=void 0,i.ctx=t.ctx,i.chart=t.chart,i.top=void 0,i.bottom=void 0,i.left=void 0,i.right=void 0,i.width=void 0,i.height=void 0,i._margins={left:0,right:0,top:0,bottom:0},i.maxWidth=void 0,i.maxHeight=void 0,i.paddingTop=void 0,i.paddingBottom=void 0,i.paddingLeft=void 0,i.paddingRight=void 0,i.axis=void 0,i.labelRotation=void 0,i.min=void 0,i.max=void 0,i._range=void 0,i.ticks=[],i._gridLineItems=null,i._labelItems=null,i._labelSizes=null,i._length=0,i._maxLength=0,i._longestTextCache={},i._startPixel=void 0,i._endPixel=void 0,i._reversePixels=!1,i._userMax=void 0,i._userMin=void 0,i._suggestedMax=void 0,i._suggestedMin=void 0,i._ticksLength=0,i._borderValue=0,i._cache={},i._dataLimitsCached=!1,i.$context=void 0,i}return r(a,[{key:"init",value:function(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)}},{key:"parse",value:function(t,e){return t}},{key:"getUserBounds",value:function(){var t=this._userMin,e=this._userMax,i=this._suggestedMin,n=this._suggestedMax;return t=Dt(t,Number.POSITIVE_INFINITY),e=Dt(e,Number.NEGATIVE_INFINITY),i=Dt(i,Number.POSITIVE_INFINITY),n=Dt(n,Number.NEGATIVE_INFINITY),{min:Dt(t,i),max:Dt(e,n),minDefined:Pt(t),maxDefined:Pt(e)}}},{key:"getMinMax",value:function(t){var e,i=this.getUserBounds(),n=i.min,a=i.max,r=i.minDefined,o=i.maxDefined;if(r&&o)return{min:n,max:a};for(var s=this.getMatchingVisibleMetas(),l=0,u=s.length;la?a:n,Dt(a=r&&n>a?n:a,n)),max:Dt(a,Dt(n,a))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){Ct(this.options.beforeUpdate,[this])}},{key:"update",value:function(t,e,i){var n=this.options,a=n.beginAtZero,r=n.grace,o=n.ticks,s=o.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=function(t,e,i){var n=t.min,a=t.max,r=At(e,(a-n)/2),o=function(t,e){return i&&0===t?0:t+e};return{min:o(n,-Math.abs(r)),max:o(a,r)}}(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s=s||r<=1||!this.isHorizontal())this.labelRotation=o;else{var u=this._getLabelSizes(),h=u.widest.width,c=u.highest.height,f=de(this.chart.width-h,0,this.maxWidth);h+6>(t=n.offset?this.maxWidth/r:f/(r-1))&&(t=f/(r-(n.offset?.5:1)),e=this.maxHeight-Ra(n.grid)-a.padding-Ea(n.title,this.chart.options.font),i=Math.sqrt(h*h+c*c),l=oe(Math.min(Math.asin(de((u.highest.height+6)/t,-1,1)),Math.asin(de(e/i,-1,1))-Math.asin(de(c/i,-1,1)))),l=Math.max(o,Math.min(s,l))),this.labelRotation=l}}},{key:"afterCalculateLabelRotation",value:function(){Ct(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){Ct(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t={width:0,height:0},e=this.chart,i=this.options,n=i.ticks,a=i.title,r=i.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=Ea(a,e.options.font);if(s?(t.width=this.maxWidth,t.height=Ra(r)+l):(t.height=this.maxHeight,t.width=Ra(r)+l),n.display&&this.ticks.length){var u=this._getLabelSizes(),h=u.first,c=u.last,f=u.widest,d=u.highest,v=2*n.padding,g=re(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(s){var y=n.mirror?0:m*f.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{var b=n.mirror?0:p*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+v)}this._calculatePadding(h,c,m,p)}}this._handleMargins(),s?(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)}},{key:"_calculatePadding",value:function(t,e,i,n){var a=this.options,r=a.ticks,o=r.align,s=r.padding,l=a.position,u=0!==this.labelRotation,h="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,v=0;u?h?(d=n*t.width,v=i*e.height):(d=i*t.height,v=n*e.width):"start"===o?v=e.width:"end"===o?d=t.width:"inner"!==o&&(d=t.width/2,v=e.width/2),this.paddingLeft=Math.max((d-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((v-f+s)*this.width/(this.width-f),0)}else{var g=e.height/2,p=t.height/2;"start"===o?(g=0,p=t.height):"end"===o&&(g=e.height,p=0),this.paddingTop=g+s,this.paddingBottom=p+s}}},{key:"_handleMargins",value:function(){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))}},{key:"afterFit",value:function(){Ct(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options,e=t.axis,i=t.position;return"top"===i||"bottom"===i||"x"===e}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(t){var e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;ee){for(i=0;ie.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getPixelForDecimal",value:function(t){this._reversePixels&&(t=1-t);var e=this._startPixel+t*this._length;return de(this._alignToPixels?ki(this.chart,e,0):e,-32768,32767)}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0}},{key:"getContext",value:function(t){var e=this.ticks||[];if(t>=0&&to*n?o/i:s/n:s*n0}},{key:"_computeGridLineItems",value:function(t){var e,i,n,a,r,o,s,l,u,h,c,f,d=this.axis,v=this.chart,g=this.options,p=g.grid,m=g.position,y=p.offset,b=this.isHorizontal(),x=this.ticks.length+(y?1:0),_=Ra(p),k=[],w=p.setContext(this.getContext()),M=w.drawBorder?w.borderWidth:0,S=M/2,P=function(t){return ki(v,t,M)};if("top"===m)e=P(this.bottom),o=this.bottom-_,l=e-S,h=P(t.top)+S,f=t.bottom;else if("bottom"===m)e=P(this.top),h=t.top,f=P(t.bottom)-S,o=e+S,l=this.top+_;else if("left"===m)e=P(this.right),r=this.right-_,s=e-S,u=P(t.left)+S,c=t.right;else if("right"===m)e=P(this.left),u=t.left,c=P(t.right)-S,r=e+S,s=this.left+_;else if("x"===d){if("center"===m)e=P((t.top+t.bottom)/2+.5);else if(St(m)){var D=Object.keys(m)[0],O=m[D];e=P(this.chart.scales[D].getPixelForValue(O))}h=t.top,f=t.bottom,l=(o=e+S)+_}else if("y"===d){if("center"===m)e=P((t.left+t.right)/2);else if(St(m)){var A=Object.keys(m)[0],C=m[A];e=P(this.chart.scales[A].getPixelForValue(C))}s=(r=e-S)-_,u=t.left,c=t.right}var T=Ot(g.ticks.maxTicksLimit,x),R=Math.max(1,Math.ceil(x/T));for(i=0;i=0?e.setContext(this.getContext(i)).lineWidth:0}},{key:"drawGrid",value:function(t){var e,i,n=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=function(t,e,i){i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(n.display)for(e=0,i=r.length;e0&&this.getParsed(e-1),_=e;_0&&Math.abs(w[d]-x[d])>y,m&&(M.parsed=w,M.raw=u.data[_]),f&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,M,n),x=w}this.updateSharedOptions(c,n,h)}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){for(var i=0,n=e.length-1;n>=0;--n)i=Math.max(i,e[n].size(this.resolveDataElementOptions(n))/2);return i>0&&i}var a=t.dataset,r=a.options&&a.options.borderWidth||0;if(!e.length)return r;var o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,s)/2}}]),a}();Ba.id="scatter",Ba.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Ba.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:function(){return""},label:function(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Na=Object.freeze({__proto__:null,BarController:ma,BubbleController:ya,DoughnutController:ba,LineController:xa,PolarAreaController:_a,PieController:ka,RadarController:wa,ScatterController:Ba});function Wa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var ja=function(){function t(i){e(this,t),this.options=i||{}}return r(t,[{key:"init",value:function(t){}},{key:"formats",value:function(){return Wa()}},{key:"parse",value:function(t,e){return Wa()}},{key:"format",value:function(t,e){return Wa()}},{key:"add",value:function(t,e,i){return Wa()}},{key:"diff",value:function(t,e,i){return Wa()}},{key:"startOf",value:function(t,e,i){return Wa()}},{key:"endOf",value:function(t,e){return Wa()}}]),t}();ja.override=function(t){Object.assign(ja.prototype,t)};var Ha={_date:ja};function $a(t,e,i,n){var a=t.controller,r=t.data,o=t._sorted,s=a._cachedMeta.iScale;if(s&&e===s.axis&&"r"!==e&&o&&r.length){var l=s._reversePixels?me:pe;if(!n)return l(r,e,i);if(a._sharedOptions){var u=r[0],h="function"==typeof u.getRange&&u.getRange(e);if(h){var c=l(r,e,i-h),f=l(r,e,i+h);return{lo:c.lo,hi:f.hi}}}}return{lo:0,hi:r.length-1}}function Ya(t,e,i,n,a){for(var r=t.getSortedVisibleDatasetMetas(),o=i[e],s=0,l=r.length;s0){var l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(var h=0;h3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},r=Wr(this._resolverCache,t,n),o=r.resolver,s=r.subPrefixes,l=o;if(Hr(o,e)){a.$shared=!1,i=Ht(i)?i():i;var u=this.createResolver(t,i,s);l=Ui(o,i,u)}var h,c=$n(e);try{for(c.s();!(h=c.n()).done;){var f=h.value;a[f]=l[f]}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"createResolver",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],n=arguments.length>3?arguments[3]:void 0,a=Wr(this._resolverCache,t,i),r=a.resolver;return St(e)?Ui(r,e,void 0,n):r}}]),t}();function Wr(t,e,i){var n=t.get(e);n||(n=new Map,t.set(e,n));var a=i.join(),r=n.get(a);r||(r={resolver:Yi(e,i),subPrefixes:i.filter((function(t){return!t.toLowerCase().includes("hover")}))},n.set(a,r));return r}var jr=function(t){return St(t)&&Object.getOwnPropertyNames(t).reduce((function(e,i){return e||Ht(t[i])}),!1)};function Hr(t,e){var i,n=Xi(t),a=n.isScriptable,r=n.isIndexable,o=$n(e);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=a(s),u=r(s),h=(u||l)&&t[s];if(l&&(Ht(h)||jr(h))||u&&Mt(h))return!0}}catch(t){o.e(t)}finally{o.f()}return!1}var $r=["top","bottom","left","right","chartArea"];function Yr(t,e){return"top"===t||"bottom"===t||-1===$r.indexOf(t)&&"x"===e}function Ur(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Xr(t){var e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Ct(i&&i.onComplete,[t],e)}function qr(t){var e=t.chart,i=e.options.animation;Ct(i&&i.onProgress,[t],e)}function Kr(t){return vn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var Gr={},Zr=function(t){var e=Kr(t);return Object.values(Gr).filter((function(t){return t.canvas===e})).pop()};function Jr(t,e,i){for(var n=0,a=Object.keys(t);n=e){var s=t[r];delete t[r],(i>0||o>e)&&(t[o+i]=s)}}}var Qr=function(){function t(i,n){var a=this;e(this,t);var r=this.config=new Nr(n),o=Kr(i),s=Zr(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");var l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function(t){return!vn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?vr:Or}(o)),this.platform.updateConfig(r);var u,h,c,f=this.platform.acquireContext(o,l.aspectRatio),d=f&&f.canvas,v=d&&d.height,g=d&&d.width;this.id=kt(),this.ctx=f,this.canvas=d,this.width=g,this.height=v,this._options=l,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 Ar,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(u=function(t){return a.update(t)},h=l.resizeDelay||0,function(){for(var t=arguments.length,e=new Array(t),i=0;ie){for(var n=e;ni.length&&delete this._stacks,e.forEach((function(e,n){0===i.filter((function(t){return t===e._dataset})).length&&t._destroyDatasetMeta(n)}))}},{key:"buildOrUpdateControllers",value:function(){var t,e,i=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=n.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(t){var e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&Di(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&Oi(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}},{key:"isPointInArea",value:function(t){return Pi(t,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(t,e,i,n){var a=Ga.modes[e];return"function"==typeof a?a(this,t,i,n):[]}},{key:"getDatasetMeta",value:function(t){var e=this.data.datasets[t],i=this._metasets,n=i.filter((function(t){return t&&t._dataset===e})).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}},{key:"getContext",value:function(){return this.$context||(this.$context=$i(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(t){var e=this.data.datasets[t];if(!e)return!1;var i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}},{key:"setDatasetVisibility",value:function(t,e){this.getDatasetMeta(t).hidden=!e}},{key:"toggleDataVisibility",value:function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}},{key:"getDataVisibility",value:function(t){return!this._hiddenIndices[t]}},{key:"_updateVisibility",value:function(t,e,i){var n=i?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,n);jt(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(a,{visible:i}),this.update((function(e){return e.datasetIndex===t?n:void 0})))}},{key:"hide",value:function(t,e){this._updateVisibility(t,e,!1)}},{key:"show",value:function(t,e){this._updateVisibility(t,e,!0)}},{key:"_destroyDatasetMeta",value:function(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}},{key:"_stop",value:function(){var t,e;for(this.stop(),Un.remove(this),t=0,e=this.data.datasets.length;ta?(u=a/l,t.arc(r,o,l,i+u,n-u,!0)):t.arc(r,o,a,i+Gt,n-Gt),t.closePath(),t.clip()}function io(t,e,i,n){var a=Vi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),s=function(t){var e=(i-Math.min(r,t))*n/2;return de(t,0,Math.min(r,e))};return{outerStart:s(a.outerStart),outerEnd:s(a.outerEnd),innerStart:de(a.innerStart,0,o),innerEnd:de(a.innerEnd,0,o)}}function no(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function ao(t,e,i,n,a,r){var o=e.x,s=e.y,l=e.startAngle,u=e.pixelMargin,h=e.innerRadius,c=Math.max(e.outerRadius+n+i-u,0),f=h>0?h+n+i+u:0,d=0,v=a-l;if(n){var g=((h>0?h-n:0)+(c>0?c-n:0))/2;d=(v-(0!==g?v*g/(g+n):v))/2}var p=(v-Math.max(.001,v*c-i/Yt)/c)/2,m=l+p+d,y=a-p-d,b=io(e,f,c,y-m),x=b.outerStart,_=b.outerEnd,k=b.innerStart,w=b.innerEnd,M=c-x,S=c-_,P=m+x/M,D=y-_/S,O=f+k,A=f+w,C=m+k/O,T=y-w/A;if(t.beginPath(),r){if(t.arc(o,s,c,P,D),_>0){var R=no(S,D,o,s);t.arc(R.x,R.y,_,D,y+Gt)}var E=no(A,y,o,s);if(t.lineTo(E.x,E.y),w>0){var L=no(A,T,o,s);t.arc(L.x,L.y,w,y+Gt,T+Math.PI)}if(t.arc(o,s,f,y-w/f,m+k/f,!0),k>0){var I=no(O,C,o,s);t.arc(I.x,I.y,k,C+Math.PI,m-Gt)}var z=no(M,m,o,s);if(t.lineTo(z.x,z.y),x>0){var F=no(M,P,o,s);t.arc(F.x,F.y,x,m-Gt,P)}}else{t.moveTo(o,s);var V=Math.cos(P)*c+o,B=Math.sin(P)*c+s;t.lineTo(V,B);var N=Math.cos(D)*c+o,W=Math.sin(D)*c+s;t.lineTo(N,W)}t.closePath()}function ro(t,e,i,n,a,r){var o=e.options,s=o.borderWidth,l=o.borderJoinStyle,u="inner"===o.borderAlign;s&&(u?(t.lineWidth=2*s,t.lineJoin=l||"round"):(t.lineWidth=s,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){var n,a=e.x,r=e.y,o=e.startAngle,s=e.pixelMargin,l=e.fullCircles,u=Math.max(e.outerRadius-s,0),h=e.innerRadius+s;for(i&&eo(t,e,o+Ut),t.beginPath(),t.arc(a,r,h,o+Ut,o,!0),n=0;n=Ut||fe(a,s,l),v=ve(r,u+f,h+f);return d&&v}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),i=e.x,n=e.y,a=e.startAngle,r=e.endAngle,o=e.innerRadius,s=e.outerRadius,l=this.options,u=l.offset,h=(a+r)/2,c=(o+s+l.spacing+u)/2;return{x:i+Math.cos(h)*c,y:n+Math.sin(h)*c}}},{key:"tooltipPosition",value:function(t){return this.getCenterPoint(t)}},{key:"draw",value:function(t){var e=this.options,i=this.circumference,n=(e.offset||0)/2,a=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Ut?Math.floor(i/Ut):0,!(0===i||this.innerRadius<0||this.outerRadius<0)){t.save();var o=0;if(n){o=n/2;var s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o),this.circumference>=Yt&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;var l=function(t,e,i,n,a){var r=e.fullCircles,o=e.startAngle,s=e.circumference,l=e.endAngle;if(r){ao(t,e,i,n,o+Ut,a);for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=Ot(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Ot(i.borderDash,e.borderDash)),t.lineDashOffset=Ot(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Ot(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ot(i.borderWidth,e.borderWidth),t.strokeStyle=Ot(i.borderColor,e.borderColor)}function lo(t,e,i){t.lineTo(i.x,i.y)}function uo(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.length,a=i.start,r=void 0===a?0:a,o=i.end,s=void 0===o?n-1:o,l=e.start,u=e.end,h=Math.max(r,l),c=Math.min(s,u),f=ru&&s>u;return{count:n,start:h,loop:e.loop,ilen:cl&&(l=M),b=(x*b+w)/++x):(k(),t.lineTo(w,M),o=S,x=0,s=l=M),u=M}k()}function fo(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?co:ho}oo.id="arc",oo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},oo.defaultRoutes={backgroundColor:"backgroundColor"};var vo="function"==typeof Path2D;function go(t,e,i,n){vo&&!e.options.segment?function(t,e,i,n){var a=e._path;a||(a=e._path=new Path2D,e.path(a,i,n)&&a.closePath()),so(t,e.options),t.stroke(a)}(t,e,i,n):function(t,e,i,n){var a,r=e.segments,o=e.options,s=fo(e),l=$n(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;so(t,o,u.style),t.beginPath(),s(t,e,u,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}}catch(t){l.e(t)}finally{l.f()}}(t,e,i,n)}var po=function(i){t(o,Ma);var n=Hn(o);function o(t){var i;return e(this,o),(i=n.call(this)).animated=!0,i.options=void 0,i._chart=void 0,i._loop=void 0,i._fullLoop=void 0,i._path=void 0,i._points=void 0,i._segments=void 0,i._decimated=!1,i._pointsUpdated=!1,i._datasetIndex=void 0,t&&Object.assign(a(i),t),i}return r(o,[{key:"updateControlPoints",value:function(t,e){var i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){var n=i.spanGaps?this._loop:this._fullLoop;dn(this._points,i,t,n,e),this._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(t,e){var i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];var r=!!t._loop,o=function(t,e,i,n){var a=0,r=e-1;if(i&&!n)for(;aa&&t[r%e].skip;)r--;return{start:a,end:r%=e}}(i,a,r,n),s=o.start,l=o.end;return Vn(t,!0===n?[{start:s,end:l,loop:r}]:function(t,e,i,n){var a,r=t.length,o=[],s=e,l=t[e];for(a=e+1;a<=i;++a){var u=t[a%r];u.skip||u.stop?l.skip||(n=!1,o.push({start:e%r,end:(a-1)%r,loop:n}),e=s=u.stop?a:null):(s=a,l.skip&&(e=a)),l=u}return null!==s&&o.push({start:e%r,end:s%r,loop:n}),o}(i,s,l2&&void 0!==arguments[2]?arguments[2]:{},n=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,o=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+n,y:t.y+a,w:t.w+r,h:t.h+o,radius:t.radius}}yo.id="point",yo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},yo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var So=function(i){t(o,Ma);var n=Hn(o);function o(t){var i;return e(this,o),(i=n.call(this)).options=void 0,i.horizontal=void 0,i.base=void 0,i.width=void 0,i.height=void 0,i.inflateAmount=void 0,t&&Object.assign(a(i),t),i}return r(o,[{key:"draw",value:function(t){var e,i=this.inflateAmount,n=this.options,a=n.borderColor,r=n.backgroundColor,o=_o(this),s=o.inner,l=o.outer,u=(e=l.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?Li:wo;t.save(),l.w===s.w&&l.h===s.h||(t.beginPath(),u(t,Mo(l,i,s)),t.clip(),u(t,Mo(s,-i,l)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),u(t,Mo(s,i)),t.fillStyle=r,t.fill(),t.restore()}},{key:"inRange",value:function(t,e,i){return ko(this,t,e,i)}},{key:"inXRange",value:function(t,e){return ko(this,t,null,e)}},{key:"inYRange",value:function(t,e){return ko(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","base","horizontal"],t),i=e.x,n=e.y,a=e.base,r=e.horizontal;return{x:r?(i+a)/2:i,y:r?n:(n+a)/2}}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}]),o}();So.id="bar",So.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},So.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Po=Object.freeze({__proto__:null,ArcElement:oo,LineElement:po,PointElement:yo,BarElement:So});function Do(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Oo(t){t.data.datasets.forEach((function(t){Do(t)}))}var Ao={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(t,e,i){if(i.enabled){var n=t.width;t.data.datasets.forEach((function(e,a){var r=e._data,o=e.indexAxis,s=t.getDatasetMeta(a),l=r||e.data;if("y"!==Hi([o,t.options.indexAxis])&&s.controller.supportsDecimation){var u=t.scales[s.xAxisID];if(("linear"===u.type||"time"===u.type)&&!t.options.parsing){var h=function(t,e){var i=e.length,n=0,a=t.iScale,r=a.getUserBounds(),o=r.min,s=r.max,l=r.minDefined,u=r.maxDefined;return l&&(n=de(pe(e,a.axis,o).lo,0,i-1)),{start:n,count:u?de(pe(e,a.axis,s).hi+1,n,i)-n:i-n}}(s,l),c=h.start,f=h.count;if(f<=(i.threshold||4*n))Do(e);else{var d;switch(wt(r)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,a){var r=a.samples||n;if(r>=i)return t.slice(e,e+i);var o,s,l,u,h,c=[],f=(i-2)/(r-2),d=0,v=e+i-1,g=e;for(c[d++]=t[g],o=0;ol&&(l=u,s=t[y],h=y);c[d++]=s,g=h}return c[d++]=t[v],c}(l,c,f,n,i);break;case"min-max":d=function(t,e,i,n){var a,r,o,s,l,u,h,c,f,d,v=0,g=0,p=[],m=e+i-1,y=t[e].x,b=t[m].x-y;for(a=e;ad&&(d=s,h=a),v=(g*v+r.x)/++g;else{var _=a-1;if(!wt(u)&&!wt(h)){var k=Math.min(u,h),w=Math.max(u,h);k!==c&&k!==_&&p.push(jn(jn({},t[k]),{},{x:v})),w!==c&&w!==_&&p.push(jn(jn({},t[w]),{},{x:v}))}a>0&&_!==c&&p.push(t[_]),p.push(r),l=x,g=0,f=d=s,u=h=c=a}}return p}(l,c,f,n);break;default:throw new Error("Unsupported decimation algorithm '".concat(i.algorithm,"'"))}e._decimated=d}}}}))}else Oo(t)},destroy:function(t){Oo(t)}};function Co(t,e,i,n){if(!n){var a=e[t],r=i[t];return"angle"===t&&(a=ce(a),r=ce(r)),{property:t,start:a,end:r}}}function To(t,e,i){for(;e>t;e--){var n=i[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Ro(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Eo(t,e){var i=[],n=!1;return Mt(t)?(n=!0,i=t):i=function(t,e){var i=t||{},n=i.x,a=void 0===n?null:n,r=i.y,o=void 0===r?null:r,s=e.points,l=[];return e.segments.forEach((function(t){var e=t.start,i=t.end;i=To(e,i,s);var n=s[e],r=s[i];null!==o?(l.push({x:n.x,y:o}),l.push({x:r.x,y:o})):null!==a&&(l.push({x:a,y:n.y}),l.push({x:a,y:r.y}))})),l}(t,e),i.length?new po({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Lo(t){return t&&!1!==t.fill}function Io(t,e,i){var n,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!Pt(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function zo(t,e,i){var n=function(t){var e=t.options,i=e.fill,n=Ot(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(St(n))return!isNaN(n.value)&&n;var a=parseFloat(n);return Pt(a)&&Math.floor(a)===a?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,a,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Fo(t,e,i){for(var n=[],a=0;a=0;--o){var s=a[o].$filler;s&&(s.line.updateControlPoints(r,s.axis),n&&s.fill&&Wo(t.ctx,s,r))}},beforeDatasetsDraw:function(t,e,i){if("beforeDatasetsDraw"===i.drawTime)for(var n=t.getSortedVisibleDatasetMetas(),a=n.length-1;a>=0;--a){var r=n[a].$filler;Lo(r)&&Wo(t.ctx,r,t.chartArea)}},beforeDatasetDraw:function(t,e,i){var n=e.meta.$filler;Lo(n)&&"beforeDatasetDraw"===i.drawTime&&Wo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Xo=function(t,e){var i=t.boxHeight,n=void 0===i?e:i,a=t.boxWidth,r=void 0===a?e:a;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},qo=function(i){t(a,Ma);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this))._added=!1,i.legendHitBoxes=[],i._hoveredItem=null,i.doughnutMode=!1,i.chart=t.chart,i.options=t.options,i.ctx=t.ctx,i.legendItems=void 0,i.columnSizes=void 0,i.lineWidths=void 0,i.maxHeight=void 0,i.maxWidth=void 0,i.top=void 0,i.bottom=void 0,i.left=void 0,i.right=void 0,i.height=void 0,i.width=void 0,i._margins=void 0,i.position=void 0,i.weight=void 0,i.fullSize=void 0,i}return r(a,[{key:"update",value:function(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}},{key:"setDimensions",value:function(){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)}},{key:"buildLabels",value:function(){var t=this,e=this.options.labels||{},i=Ct(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),e.sort&&(i=i.sort((function(i,n){return e.sort(i,n,t.chart.data)}))),this.options.reverse&&i.reverse(),this.legendItems=i}},{key:"fit",value:function(){var t=this.options,e=this.ctx;if(t.display){var i,n,a=t.labels,r=ji(a.font),o=r.size,s=this._computeTitleHeight(),l=Xo(a,o),u=l.boxWidth,h=l.itemHeight;e.font=r.string,this.isHorizontal()?(i=this.maxWidth,n=this._fitRows(s,o,u,h)+10):(n=this.maxHeight,i=this._fitCols(s,o,u,h)+10),this.width=Math.min(i,t.maxWidth||this.maxWidth),this.height=Math.min(n,t.maxHeight||this.maxHeight)}else this.width=this.height=0}},{key:"_fitRows",value:function(t,e,i,n){var a=this.ctx,r=this.maxWidth,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+o,h=t;a.textAlign="left",a.textBaseline="middle";var c=-1,f=-u;return this.legendItems.forEach((function(t,d){var v=i+e/2+a.measureText(t.text).width;(0===d||l[l.length-1]+v+2*o>r)&&(h+=u,l[l.length-(d>0?0:1)]=0,f+=u,c++),s[d]={left:0,top:f,row:c,width:v,height:n},l[l.length-1]+=v+o})),h}},{key:"_fitCols",value:function(t,e,i,n){var a=this.ctx,r=this.maxHeight,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.columnSizes=[],u=r-t,h=o,c=0,f=0,d=0,v=0;return this.legendItems.forEach((function(t,r){var g=i+e/2+a.measureText(t.text).width;r>0&&f+n+2*o>u&&(h+=c+o,l.push({width:c,height:f}),d+=c+o,v++,c=f=0),s[r]={left:d,top:f,col:v,width:g,height:n},c=Math.max(c,g),f+=n+o})),h+=c,l.push({width:c,height:f}),h}},{key:"adjustHitBoxes",value:function(){if(this.options.display){var t=this._computeTitleHeight(),e=this.legendHitBoxes,i=this.options,n=i.align,a=i.labels.padding,r=Tn(i.rtl,this.left,this.width);if(this.isHorizontal()){var o,s=0,l=Me(n,this.left+a,this.right-this.lineWidths[s]),u=$n(e);try{for(u.s();!(o=u.n()).done;){var h=o.value;s!==h.row&&(s=h.row,l=Me(n,this.left+a,this.right-this.lineWidths[s])),h.top+=this.top+t+a,h.left=r.leftForLtr(r.x(l),h.width),l+=h.width+a}}catch(t){u.e(t)}finally{u.f()}}else{var c,f=0,d=Me(n,this.top+t+a,this.bottom-this.columnSizes[f].height),v=$n(e);try{for(v.s();!(c=v.n()).done;){var g=c.value;g.col!==f&&(f=g.col,d=Me(n,this.top+t+a,this.bottom-this.columnSizes[f].height)),g.top=d,g.left+=this.left+a,g.left=r.leftForLtr(r.x(g.left),g.width),d+=g.height+a}}catch(t){v.e(t)}finally{v.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){if(this.options.display){var t=this.ctx;Di(t,this),this._draw(),Oi(t)}}},{key:"_draw",value:function(){var t,e=this,i=this.options,n=this.columnSizes,a=this.lineWidths,r=this.ctx,o=i.align,s=i.labels,l=bi.color,u=Tn(i.rtl,this.left,this.width),h=ji(s.font),c=s.color,f=s.padding,d=h.size,v=d/2;this.drawTitle(),r.textAlign=u.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=h.string;var g=Xo(s,d),p=g.boxWidth,m=g.boxHeight,y=g.itemHeight,b=this.isHorizontal(),x=this._computeTitleHeight();t=b?{x:Me(o,this.left+f,this.right-a[0]),y:this.top+f+x,line:0}:{x:this.left+f,y:Me(o,this.top+x+f,this.bottom-n[0].height),line:0},Rn(this.ctx,i.textDirection);var _=y+f;this.legendItems.forEach((function(g,k){r.strokeStyle=g.fontColor||c,r.fillStyle=g.fontColor||c;var w=r.measureText(g.text).width,M=u.textAlign(g.textAlign||(g.textAlign=s.textAlign)),S=p+v+w,P=t.x,D=t.y;u.setWidth(e.width),b?k>0&&P+S+f>e.right&&(D=t.y+=_,t.line++,P=t.x=Me(o,e.left+f,e.right-a[t.line])):k>0&&D+_>e.bottom&&(P=t.x=P+n[t.line].width+f,t.line++,D=t.y=Me(o,e.top+x+f,e.bottom-n[t.line].height)),function(t,e,i){if(!(isNaN(p)||p<=0||isNaN(m)||m<0)){r.save();var n=Ot(i.lineWidth,1);if(r.fillStyle=Ot(i.fillStyle,l),r.lineCap=Ot(i.lineCap,"butt"),r.lineDashOffset=Ot(i.lineDashOffset,0),r.lineJoin=Ot(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=Ot(i.strokeStyle,l),r.setLineDash(Ot(i.lineDash,[])),s.usePointStyle){var a={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},o=u.xPlus(t,p/2);Si(r,a,o,e+v,s.pointStyleWidth&&p)}else{var h=e+Math.max((d-m)/2,0),c=u.leftForLtr(t,p),f=Ni(i.borderRadius);r.beginPath(),Object.values(f).some((function(t){return 0!==t}))?Li(r,{x:c,y:h,w:p,h:m,radius:f}):r.rect(c,h,p,m),r.fill(),0!==n&&r.stroke()}r.restore()}}(u.x(P),D,g),P=function(t,e,i,n){return t===(n?"left":"right")?i:"center"===t?(e+i)/2:e}(M,P+p+v,b?P+S:e.right,i.rtl),function(t,e,i){Ti(r,i.text,t,e+y/2,h,{strikethrough:i.hidden,textAlign:u.textAlign(i.textAlign)})}(u.x(P),D,g),b?t.x+=S+f:t.y+=_})),En(this.ctx,i.textDirection)}},{key:"drawTitle",value:function(){var t=this.options,e=t.title,i=ji(e.font),n=Wi(e.padding);if(e.display){var a,r=Tn(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=i.size/2,u=n.top+l,h=this.left,c=this.width;if(this.isHorizontal())c=Math.max.apply(Math,F(this.lineWidths)),a=this.top+u,h=Me(t.align,h,this.right-c);else{var f=this.columnSizes.reduce((function(t,e){return Math.max(t,e.height)}),0);a=u+Me(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}var d=Me(s,h,h+c);o.textAlign=r.textAlign(we(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ti(o,e.text,d,a,i)}}},{key:"_computeTitleHeight",value:function(){var t=this.options.title,e=ji(t.font),i=Wi(t.padding);return t.display?e.lineHeight+i.height:0}},{key:"_getLegendItemAt",value:function(t,e){var i,n,a;if(ve(t,this.left,this.right)&&ve(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i-1?t.split("\n"):t}function ns(t,e){var i=e.element,n=e.datasetIndex,a=e.index,r=t.getDatasetMeta(n).controller,o=r.getLabelAndValue(a),s=o.label,l=o.value;return{chart:t,label:s,parsed:r.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:l,dataset:r.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function as(t,e){var i=t.chart.ctx,n=t.body,a=t.footer,r=t.title,o=e.boxWidth,s=e.boxHeight,l=ji(e.bodyFont),u=ji(e.titleFont),h=ji(e.footerFont),c=r.length,f=a.length,d=n.length,v=Wi(e.padding),g=v.height,p=0,m=n.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);(m+=t.beforeBody.length+t.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),m)&&(g+=d*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(m-d)*l.lineHeight+(m-1)*e.bodySpacing);f&&(g+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);var y=0,b=function(t){p=Math.max(p,i.measureText(t).width+y)};return i.save(),i.font=u.string,Tt(t.title,b),i.font=l.string,Tt(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?o+2+e.boxPadding:0,Tt(n,(function(t){Tt(t.before,b),Tt(t.lines,b),Tt(t.after,b)})),y=0,i.font=h.string,Tt(t.footer,b),i.restore(),{width:p+=v.width,height:g}}function rs(t,e,i,n){var a=i.x,r=i.width,o=t.width,s=t.chartArea,l=s.left,u=s.right,h="center";return"center"===n?h=a<=(l+u)/2?"left":"right":a<=r/2?h="left":a>=o-r/2&&(h="right"),function(t,e,i,n){var a=n.x,r=n.width,o=i.caretSize+i.caretPadding;return"left"===t&&a+r+o>e.width||"right"===t&&a-r-o<0||void 0}(h,t,e,i)&&(h="center"),h}function os(t,e,i){var n=i.yAlign||e.yAlign||function(t,e){var i=e.y,n=e.height;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||rs(t,e,i,n),yAlign:n}}function ss(t,e,i,n){var a=t.caretSize,r=t.caretPadding,o=t.cornerRadius,s=i.xAlign,l=i.yAlign,u=a+r,h=Ni(o),c=h.topLeft,f=h.topRight,d=h.bottomLeft,v=h.bottomRight,g=function(t,e){var i=t.x,n=t.width;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,s),p=function(t,e,i){var n=t.y,a=t.height;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,u);return"center"===l?"left"===s?g+=u:"right"===s&&(g-=u):"left"===s?g-=Math.max(c,d)+a:"right"===s&&(g+=Math.max(f,v)+a),{x:de(g,0,n.width-e.width),y:de(p,0,n.height-e.height)}}function ls(t,e,i){var n=Wi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function us(t){return es([],is(t))}function hs(t,e){var i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}var cs=function(i){t(a,Ma);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this)).opacity=0,i._active=[],i._eventPosition=void 0,i._size=void 0,i._cachedAnimations=void 0,i._tooltipItems=[],i.$animations=void 0,i.$context=void 0,i.chart=t.chart||t._chart,i._chart=i.chart,i.options=t.options,i.dataPoints=void 0,i.title=void 0,i.beforeBody=void 0,i.body=void 0,i.afterBody=void 0,i.footer=void 0,i.xAlign=void 0,i.yAlign=void 0,i.x=void 0,i.y=void 0,i.height=void 0,i.width=void 0,i.caretX=void 0,i.caretY=void 0,i.labelColors=void 0,i.labelPointStyles=void 0,i.labelTextColors=void 0,i}return r(a,[{key:"initialize",value:function(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var t=this._cachedAnimations;if(t)return t;var e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new Gn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}},{key:"getContext",value:function(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,$i(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}},{key:"getTitle",value:function(t,e){var i=e.callbacks,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]),o=[];return o=es(o,is(n)),o=es(o,is(a)),o=es(o,is(r))}},{key:"getBeforeBody",value:function(t,e){return us(e.callbacks.beforeBody.apply(this,[t]))}},{key:"getBody",value:function(t,e){var i=this,n=e.callbacks,a=[];return Tt(t,(function(t){var e={before:[],lines:[],after:[]},r=hs(n,t);es(e.before,is(r.beforeLabel.call(i,t))),es(e.lines,r.label.call(i,t)),es(e.after,is(r.afterLabel.call(i,t))),a.push(e)})),a}},{key:"getAfterBody",value:function(t,e){return us(e.callbacks.afterBody.apply(this,[t]))}},{key:"getFooter",value:function(t,e){var i=e.callbacks,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]),o=[];return o=es(o,is(n)),o=es(o,is(a)),o=es(o,is(r))}},{key:"_createItems",value:function(t){var e,i,n=this,a=this._active,r=this.chart.data,o=[],s=[],l=[],u=[];for(e=0,i=a.length;e0&&e.stroke()}},{key:"_updateAnimationTarget",value:function(t){var e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){var r=ts[t.position].call(this,this._active,this._eventPosition);if(!r)return;var o=this._size=as(this,t),s=Object.assign({},r,this._size),l=os(e,t,s),u=ss(t,s,l,e);n._to===u.x&&a._to===u.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}},{key:"_willRender",value:function(){return!!this.opacity}},{key:"draw",value:function(t){var e=this.options.setContext(this.getContext()),i=this.opacity;if(i){this._updateAnimationTarget(e);var n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;var r=Wi(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),Rn(t,e.textDirection),a.y+=r.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),En(t,e.textDirection),t.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t,e){var i=this,n=this._active,a=t.map((function(t){var e=t.datasetIndex,n=t.index,a=i.chart.getDatasetMeta(e);if(!a)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:a.data[n],index:n}})),r=!Rt(n,a),o=this._positionChanged(a,e);(r||o)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}},{key:"handleEvent",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var n=this.options,a=this._active||[],r=this._getActiveElements(t,a,e,i),o=this._positionChanged(r,t),s=e||!Rt(r,a)||o;return s&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}},{key:"_getActiveElements",value:function(t,e,i,n){var a=this.options;if("mouseout"===t.type)return[];if(!n)return e;var r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}},{key:"_positionChanged",value:function(t,e){var i=this.caretX,n=this.caretY,a=this.options,r=ts[a.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}]),a}();cs.positioners=ts;var fs={id:"tooltip",_element:cs,positioners:ts,afterInit:function(t,e,i){i&&(t.tooltip=new cs({chart:t,options:i}))},beforeUpdate:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw:function(t){var e=t.tooltip;if(e&&e._willRender()){var i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent:function(t,e){if(t.tooltip){var i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:function(t,e){return e.bodyFont.size},boxWidth:function(t,e){return e.bodyFont.size},multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:xt,title:function(t){if(t.length>0){var e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex=0&&te.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getValueForPixel",value:function(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),a}();function ps(t,e){var i,n,a,r,o,s,l,u=[],h=t.bounds,c=t.step,f=t.min,d=t.max,v=t.precision,g=t.count,p=t.maxTicks,m=t.maxDigits,y=t.includeBounds,b=c||1,x=p-1,_=e.min,k=e.max,w=!wt(f),M=!wt(d),S=!wt(g),P=(k-_)/(m+1),D=ee((k-_)/x/b)*b;if(D<1e-14&&!w&&!M)return[{value:_},{value:k}];(r=Math.ceil(k/D)-Math.floor(_/D))>x&&(D=ee(r*D/x/b)*b),wt(v)||(i=Math.pow(10,v),D=Math.ceil(D*i)/i),"ticks"===h?(n=Math.floor(_/D)*D,a=Math.ceil(k/D)*D):(n=_,a=k),w&&M&&c&&(o=(d-f)/c,s=D/1e3,(l=Math.round(o))-s<=o&&l+s>=o)?(D=(d-f)/(r=Math.round(Math.min((d-f)/D,p))),n=f,a=d):S?D=((a=M?d:a)-(n=w?f:n))/(r=g-1):r=ne(r=(a-n)/D,Math.round(r),D/1e3)?Math.round(r):Math.ceil(r);var O=Math.max(se(D),se(n));i=Math.pow(10,wt(v)?O:v),n=Math.round(n*i)/i,a=Math.round(a*i)/i;var A=0;for(w&&(y&&n!==f?(u.push({value:f}),n0&&u>0&&o(0)}if(a===r){var h=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(h=Math.abs(.05*r)),s(r+h),t||o(a-h)}this.min=a,this.max=r}},{key:"getTickLimit",value:function(){var t,e=this.options.ticks,i=e.maxTicksLimit,n=e.stepSize;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(n," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var t=this.options,e=t.ticks,i=this.getTickLimit(),n=ps({maxTicks:i=Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ae(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}},{key:"configure",value:function(){var t=this.ticks,e=this.min,i=this.max;if(B(s(a.prototype),"configure",this).call(this),this.options.offset&&t.length){var n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}},{key:"getLabelForValue",value:function(t){return Cn(t,this.chart.options.locale,this.options.ticks.format)}}]),a}(),bs=function(i){t(a,ys);var n=Hn(a);function a(){return e(this,a),n.apply(this,arguments)}return r(a,[{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Pt(e)?e:0,this.max=Pt(i)?i:1,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var t=this.isHorizontal(),e=t?this.width:this.height,i=re(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}},{key:"getPixelForValue",value:function(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}]),a}();function xs(t){return 1===t/Math.pow(10,Math.floor(Qt(t)))}bs.id="linear",bs.defaults={ticks:{callback:Pa.formatters.numeric}};var _s=function(i){t(a,Ia);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t)).start=void 0,i.end=void 0,i._startValue=void 0,i._valueRange=0,i}return r(a,[{key:"parse",value:function(t,e){var i=ys.prototype.parse.apply(this,[t,e]);if(0!==i)return Pt(i)&&i>0?i:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Pt(e)?Math.max(0,e):null,this.max=Pt(i)?Math.max(0,i):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this.getUserBounds(),e=t.minDefined,i=t.maxDefined,n=this.min,a=this.max,r=function(t){return n=e?n:t},o=function(t){return a=i?a:t},s=function(t,e){return Math.pow(10,Math.floor(Qt(t))+e)};n===a&&(n<=0?(r(1),o(10)):(r(s(n,-1)),o(s(a,1)))),n<=0&&r(s(a,-1)),a<=0&&o(s(n,1)),this._zero&&this.min!==this._suggestedMin&&n===s(this.min,0)&&r(s(n,-1)),this.min=n,this.max=a}},{key:"buildTicks",value:function(){var t=this.options,e=function(t,e){var i=Math.floor(Qt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[],r=Dt(t.min,Math.pow(10,Math.floor(Qt(e.min)))),o=Math.floor(Qt(r)),s=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{a.push({value:r,major:xs(r)}),10==++s&&(s=1,l=++o>=0?1:l),r=Math.round(s*Math.pow(10,o)*l)/l}while(oa?{start:e-i,end:e}:{start:e,end:e+i}}function Ms(t){for(var e,i,n,a={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},r=Object.assign({},a),o=[],s=[],l=t._pointLabels.length,u=t.options.pointLabels,h=u.centerPointLabels?Yt/l:0,c=0;ce.r&&(s=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+s)),a.starte.b&&(l=(a.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function Ps(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ds(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Os(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function As(t,e,i,n){var a=t.ctx;if(i)a.arc(t.xCenter,t.yCenter,e,0,Ut);else{var r=t.getPointPosition(0,e);a.moveTo(r.x,r.y);for(var o=1;o=0&&t2&&void 0!==arguments[2]?arguments[2]:0,n=this.getIndexAngle(t)-Gt+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(t){var e=this._pointLabelItems[t];return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}},{key:"drawBackground",value:function(){var t=this.options,e=t.backgroundColor,i=t.grid.circular;if(e){var n=this.ctx;n.save(),n.beginPath(),As(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}},{key:"drawGrid",value:function(){var t,e,i,n=this,a=this.ctx,r=this.options,o=r.angleLines,s=r.grid,l=this._pointLabels.length;if(r.pointLabels.display&&function(t,e){for(var i=t.ctx,n=t.options.pointLabels,a=e-1;a>=0;a--){var r=n.setContext(t.getPointLabelContext(a)),o=ji(r.font),s=t._pointLabelItems[a],l=s.x,u=s.y,h=s.textAlign,c=s.left,f=s.top,d=s.right,v=s.bottom,g=r.backdropColor;if(!wt(g)){var p=Ni(r.borderRadius),m=Wi(r.backdropPadding);i.fillStyle=g;var y=c-m.left,b=f-m.top,x=d-c+m.width,_=v-f+m.height;Object.values(p).some((function(t){return 0!==t}))?(i.beginPath(),Li(i,{x:y,y:b,w:x,h:_,radius:p}),i.fill()):i.fillRect(y,b,x,_)}Ti(i,t._pointLabels[a],l,u+o.lineHeight/2,o,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,l),s.display&&this.ticks.forEach((function(t,i){if(0!==i){e=n.getDistanceFromCenterForValue(t.value);var a=s.setContext(n.getContext(i-1));!function(t,e,i,n){var a=t.ctx,r=e.circular,o=e.color,s=e.lineWidth;!r&&!n||!o||!s||i<0||(a.save(),a.strokeStyle=o,a.lineWidth=s,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),As(t,i,r,n),a.closePath(),a.stroke(),a.restore())}(n,a,e,l)}})),o.display){for(a.save(),t=l-1;t>=0;t--){var u=o.setContext(this.getPointLabelContext(t)),h=u.color,c=u.lineWidth;c&&h&&(a.lineWidth=c,a.strokeStyle=h,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var t=this,e=this.ctx,i=this.options,n=i.ticks;if(n.display){var a,r,o=this.getIndexAngle(0);e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((function(o,s){if(0!==s||i.reverse){var l=n.setContext(t.getContext(s)),u=ji(l.font);if(a=t.getDistanceFromCenterForValue(t.ticks[s].value),l.showLabelBackdrop){e.font=u.string,r=e.measureText(o.label).width,e.fillStyle=l.backdropColor;var h=Wi(l.backdropPadding);e.fillRect(-r/2-h.left,-a-u.size/2-h.top,r+h.width,u.size+h.height)}Ti(e,o.label,0,-a,u,{color:l.color})}})),e.restore()}}},{key:"drawTitle",value:function(){}}]),a}();Cs.id="radialLinear",Cs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pa.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(t){return t},padding:5,centerPointLabels:!1}},Cs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Cs.descriptors={angleLines:{_fallback:"grid"}};var Ts={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}},Rs=Object.keys(Ts);function Es(t,e){return t-e}function Ls(t,e){if(wt(e))return null;var i=t._adapter,n=t._parseOpts,a=n.parser,r=n.round,o=n.isoWeekday,s=e;return"function"==typeof a&&(s=a(s)),Pt(s)||(s="string"==typeof a?i.parse(s,a):i.parse(s)),null===s?null:(r&&(s="week"!==r||!ie(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function Is(t,e,i,n){for(var a=Rs.length,r=Rs.indexOf(t);r=e?i[a]:i[r]]=!0}}else t[e]=!0}function Fs(t,e,i){var n,a,r=[],o={},s=e.length;for(n=0;n=0&&(e[r].major=!0);return e}(t,r,o,i):r}var Vs=function(i){t(a,Ia);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t))._cache={data:[],labels:[],all:[]},i._unit="day",i._majorUnit=void 0,i._offsets={},i._normalized=!1,i._parseOpts=void 0,i}return r(a,[{key:"init",value:function(t,e){var i=t.time||(t.time={}),n=this._adapter=new Ha._date(t.adapters.date);n.init(e),Ft(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},B(s(a.prototype),"init",this).call(this,t),this._normalized=e.normalized}},{key:"parse",value:function(t,e){return void 0===t?null:Ls(this,t)}},{key:"beforeLayout",value:function(){B(s(a.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var t=this.options,e=this._adapter,i=t.time.unit||"day",n=this.getUserBounds(),a=n.min,r=n.max,o=n.minDefined,s=n.maxDefined;function l(t){o||isNaN(t.min)||(a=Math.min(a,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),a=Pt(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=Pt(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}},{key:"_getLabelBounds",value:function(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}},{key:"buildTicks",value:function(){var t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);var a=this.min,r=function(t,e,i){for(var n=0,a=t.length;nn&&t[a-1]>i;)a--;return n>0||a=Rs.indexOf(i);r--){var o=Rs[r];if(Ts[o].common&&t._adapter.diff(a,n,o)>=e-1)return o}return Rs[i?Rs.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(var e=Rs.indexOf(t)+1,i=Rs.length;e1e5*l)throw new Error(n+" and "+a+" are too far apart with stepSize of "+l+" "+s);var d="data"===r.ticks.source&&this.getDataTimestamps();for(t=f,e=0;t0?o:1}},{key:"getDataTimestamps",value:function(){var t,e,i=this._cache.data||[];if(i.length)return i;var n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[s].pos&&e<=t[l].pos){var u=pe(t,"pos",e);s=u.lo,l=u.hi}var h=t[s];n=h.pos,r=h.time;var c=t[l];a=c.pos,o=c.time}else{if(e>=t[s].time&&e<=t[l].time){var f=pe(t,"time",e);s=f.lo,l=f.hi}var d=t[s];n=d.time,r=d.pos;var v=t[l];a=v.time,o=v.pos}var g=a-n;return g?r+(o-r)*(e-n)/g:r}Vs.id="time",Vs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var Ns=function(i){t(a,Vs);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t))._table=[],i._minPos=void 0,i._tableRange=void 0,i}return r(a,[{key:"initOffsets",value:function(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Bs(e,this.min),this._tableRange=Bs(e,this.max)-this._minPos,B(s(a.prototype),"initOffsets",this).call(this,t)}},{key:"buildLookupTable",value:function(t){var e,i,n,a,r,o=this.min,s=this.max,l=[],u=[];for(e=0,i=t.length;e=o&&a<=s&&l.push(a);if(l.length<2)return[{time:o,pos:0},{time:s,pos:1}];for(e=0,i=l.length;e>4]+Ve[15&t]},We=function(t){return(240&t)>>4==(15&t)};function je(t){var e=function(t){return We(t.r)&&We(t.g)&&We(t.b)&&We(t.a)}(t)?Be:Ne;return t?"#"+e(t.r)+e(t.g)+e(t.b)+function(t,e){return t<255?e(t):""}(t.a,e):void 0}var He=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $e(t,e,i){var n=e*Math.min(i,1-i),a=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-n*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function Ye(t,e,i){var n=function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+t/60)%6;return i-i*e*Math.max(Math.min(a,4-a,1),0)};return[n(5),n(3),n(1)]}function Ue(t,e,i){var n,a=$e(t,1,.5);for(e+i>1&&(e*=n=1/(e+i),i*=n),n=0;n<3;n++)a[n]*=1-e-i,a[n]+=e;return a}function Xe(t){var e,i,n,a=t.r/255,r=t.g/255,o=t.b/255,s=Math.max(a,r,o),l=Math.min(a,r,o),u=(s+l)/2;return s!==l&&(n=s-l,i=u>.5?n/(2-s-l):n/(s+l),e=function(t,e,i,n,a){return t===a?(e-i)/n+(e>16&255,i>>8&255,255&i]}return r}()).transparent=[0,0,0,0]);var e=Je[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}var ii=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var ni=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},ai=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)};function ri(t,e,i){if(t){var n=Xe(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ke(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function oi(t,e){return t?Object.assign(e||{},t):t}function si(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Le(t[3]))):(e=oi(t,{r:0,g:0,b:0,a:1})).a=Le(e.a),e}function li(t){return"r"===t.charAt(0)?function(t){var e,i,n,a=ii.exec(t),r=255;if(a){if(a[7]!==e){var o=+a[7];r=a[8]?Ee(o):Re(255*o,0,255)}return e=+a[1],i=+a[3],n=+a[5],{r:e=255&(a[2]?Ee(e):Re(e,0,255)),g:i=255&(a[4]?Ee(i):Re(i,0,255)),b:n=255&(a[6]?Ee(n):Re(n,0,255)),a:r}}}(t):Ze(t)}var ui=function(){function t(i){if(e(this,t),i instanceof t)return i;var n,a,r,o,s=V(i);"object"===s?n=si(i):"string"===s&&(o=(a=i).length,"#"===a[0]&&(4===o||5===o?r={r:255&17*Fe[a[1]],g:255&17*Fe[a[2]],b:255&17*Fe[a[3]],a:5===o?17*Fe[a[4]]:255}:7!==o&&9!==o||(r={r:Fe[a[1]]<<4|Fe[a[2]],g:Fe[a[3]]<<4|Fe[a[4]],b:Fe[a[5]]<<4|Fe[a[6]],a:9===o?Fe[a[7]]<<4|Fe[a[8]]:255})),n=r||ei(i)||li(i)),this._rgb=n,this._valid=!!n}return r(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=oi(this._rgb);return t&&(t.a=Ie(t.a)),t},set:function(t){this._rgb=si(t)}},{key:"rgbString",value:function(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(Ie(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0;var t}},{key:"hexString",value:function(){return this._valid?je(this._rgb):void 0}},{key:"hslString",value:function(){return this._valid?function(t){if(t){var e=Xe(t),i=e[0],n=ze(e[1]),a=ze(e[2]);return t.a<255?"hsla(".concat(i,", ").concat(n,"%, ").concat(a,"%, ").concat(Ie(t.a),")"):"hsl(".concat(i,", ").concat(n,"%, ").concat(a,"%)")}}(this._rgb):void 0}},{key:"mix",value:function(t,e){if(t){var i,n=this.rgb,a=t.rgb,r=e===i?.5:e,o=2*r-1,s=n.a-a.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*a.r+.5,n.g=255&l*n.g+i*a.g+.5,n.b=255&l*n.b+i*a.b+.5,n.a=r*n.a+(1-r)*a.a,this.rgb=n}return this}},{key:"interpolate",value:function(t,e){return t&&(this._rgb=function(t,e,i){var n=ai(Ie(t.r)),a=ai(Ie(t.g)),r=ai(Ie(t.b));return{r:Le(ni(n+i*(ai(Ie(e.r))-n))),g:Le(ni(a+i*(ai(Ie(e.g))-a))),b:Le(ni(r+i*(ai(Ie(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}},{key:"clone",value:function(){return new t(this.rgb)}},{key:"alpha",value:function(t){return this._rgb.a=Le(t),this}},{key:"clearer",value:function(t){return this._rgb.a*=1-t,this}},{key:"greyscale",value:function(){var t=this._rgb,e=Te(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}},{key:"opaquer",value:function(t){return this._rgb.a*=1+t,this}},{key:"negate",value:function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}},{key:"lighten",value:function(t){return ri(this._rgb,2,t),this}},{key:"darken",value:function(t){return ri(this._rgb,2,-t),this}},{key:"saturate",value:function(t){return ri(this._rgb,1,t),this}},{key:"desaturate",value:function(t){return ri(this._rgb,1,-t),this}},{key:"rotate",value:function(t){return function(t,e){var i=Xe(t);i[0]=Ge(i[0]+e),i=Ke(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}]),t}();function hi(t){return new ui(t)}function ci(t){if(t&&"object"===V(t)){var e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function fi(t){return ci(t)?t:hi(t)}function di(t){return ci(t)?t:hi(t).saturate(.5).darken(.1).hexString()}var vi=Object.create(null),gi=Object.create(null);function pi(t,e){if(!e)return t;for(var i=e.split("."),n=0,a=i.length;nn&&(n=r),n}function _i(t,e,i,n){var a=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;var o,s,l,u,h,c=0,f=i.length;for(o=0;oi.length){for(o=0;o0&&t.stroke()}}function Pi(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y5&&void 0!==arguments[5]?arguments[5]:{},l=Mt(e)?e:[e],u=s.strokeWidth>0&&""!==s.strokeColor;for(t.save(),t.font=a.string,Ri(t,s),r=0;r1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return t[0]};jt(a)||(a=an("_fallback",t));var o=(et(e={},Symbol.toStringTag,"Object"),et(e,"_cacheable",!0),et(e,"_scopes",t),et(e,"_rootScopes",n),et(e,"_fallback",a),et(e,"_getTarget",r),et(e,"override",(function(e){return Yi([e].concat(F(t)),i,n,a)})),e);return new Proxy(o,{deleteProperty:function(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get:function(e,n){return Gi(e,n,(function(){return nn(n,i,t,e)}))},getOwnPropertyDescriptor:function(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t[0])},has:function(t,e){return rn(t).includes(e)},ownKeys:function(t){return rn(t)},set:function(t,e,i){var n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function Ui(t,e,i,n){var a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Xi(t,n),setContext:function(e){return Ui(t,e,i,n)},override:function(a){return Ui(t.override(a),e,i,n)}};return new Proxy(a,{deleteProperty:function(e,i){return delete e[i],delete t[i],!0},get:function(t,e,i){return Gi(t,e,(function(){return function(t,e,i){var n=t._proxy,a=t._context,r=t._subProxy,o=t._descriptors,s=n[e];Ht(s)&&o.isScriptable(e)&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._stack;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t),e=e(r,o||n),s.delete(t),Ki(t,e)&&(e=tn(a._scopes,a,t,e));return e}(e,s,t,i));Mt(s)&&s.length&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._descriptors;if(jt(r.index)&&n(t))e=e[r.index%e.length];else if(St(e[0])){var l=e,u=a._scopes.filter((function(t){return t!==l}));e=[];var h,c=yt(l);try{for(c.s();!(h=c.n()).done;){var f=tn(u,a,t,h.value);e.push(Ui(f,r,o&&o[t],s))}}catch(t){c.e(t)}finally{c.f()}}return e}(e,s,t,o.isIndexable));Ki(e,s)&&(s=Ui(s,a,r&&r[e],o));return s}(t,e,i)}))},getOwnPropertyDescriptor:function(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t)},has:function(e,i){return Reflect.has(t,i)},ownKeys:function(){return Reflect.ownKeys(t)},set:function(e,i,n){return t[i]=n,delete e[i],!0}})}function Xi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},i=t._scriptable,n=void 0===i?e.scriptable:i,a=t._indexable,r=void 0===a?e.indexable:a,o=t._allKeys,s=void 0===o?e.allKeys:o;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Ht(n)?n:function(){return n},isIndexable:Ht(r)?r:function(){return r}}}var qi=function(t,e){return t?t+Wt(e):e},Ki=function(t,e){return St(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object)};function Gi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=i();return t[e]=n,n}function Zi(t,e,i){return Ht(t)?t(e,i):t}var Ji=function(t,e){return!0===t?e:"string"==typeof t?Nt(e,t):void 0};function Qi(t,e,i,n,a){var r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value,l=Ji(i,s);if(l){t.add(l);var u=Zi(l._fallback,i,a);if(jt(u)&&u!==i&&u!==n)return u}else if(!1===l&&jt(n)&&i!==n)return null}}catch(t){o.e(t)}finally{o.f()}return!1}function tn(t,e,i,n){var a=e._rootScopes,r=Zi(e._fallback,i,n),o=[].concat(F(t),F(a)),s=new Set;s.add(n);var l=en(s,o,i,r||i,n);return null!==l&&((!jt(r)||r===i||null!==(l=en(s,o,r,l,n)))&&Yi(Array.from(s),[""],a,r,(function(){return function(t,e,i){var n=t._getTarget();e in n||(n[e]={});var a=n[e];if(Mt(a)&&St(i))return i;return a}(e,i,n)})))}function en(t,e,i,n,a){for(;i;)i=Qi(t,e,i,n,a);return i}function nn(t,e,i,n){var a,r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(a=an(qi(s,t),i),jt(a))return Ki(t,a)?tn(i,n,t,a):a}}catch(t){o.e(t)}finally{o.f()}}function an(t,e){var i,n=yt(e);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a){var r=a[t];if(jt(r))return r}}}catch(t){n.e(t)}finally{n.f()}}function rn(t){var e=t._keys;return e||(e=t._keys=function(t){var e,i=new Set,n=yt(t);try{for(n.s();!(e=n.n()).done;){var a,r=e.value,o=yt(Object.keys(r).filter((function(t){return!t.startsWith("_")})));try{for(o.s();!(a=o.n()).done;){var s=a.value;i.add(s)}}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}return Array.from(i)}(t._scopes)),e}function on(t,e,i,n){var a,r,o,s,l=t.iScale,u=this._parsing.key,h=void 0===u?"r":u,c=new Array(n);for(a=0,r=n;a2&&void 0!==arguments[2]?arguments[2]:"x",o=un(r),s=t.length,l=ln(t,0),u=0;u1&&void 0!==arguments[1]?arguments[1]:"x",r=un(a),o=t.length,s=Array(o).fill(0),l=Array(o),u=ln(t,0);for(e=0;e0||e>0)&&(!i||!i.shadowRoot)}(o,s,t.target))i=o,n=s;else{var u=e.getBoundingClientRect();i=r.clientX-u.left,n=r.clientY-u.top,l=!0}return{x:i,y:n,box:l}}(t,i),u=l.x,h=l.y,c=l.box,f=o.left+(c&&s.left),d=o.top+(c&&s.top),v=e.width,g=e.height;return r&&(v-=o.width+s.width,g-=o.height+s.height),{x:Math.round((u-f)/v*i.width/n),y:Math.round((h-d)/g*i.height/n)}}var _n=function(t){return Math.round(10*t)/10};function kn(t,e,i,n){var a=mn(t),r=bn(a,"margin"),o=pn(a.maxWidth,t,"clientWidth")||qt,s=pn(a.maxHeight,t,"clientHeight")||qt,l=function(t,e,i){var n,a;if(void 0===e||void 0===i){var r=gn(t);if(r){var o=r.getBoundingClientRect(),s=mn(r),l=bn(s,"border","width"),u=bn(s,"padding");e=o.width-u.width-l.width,i=o.height-u.height-l.height,n=pn(s.maxWidth,r,"clientWidth"),a=pn(s.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||qt,maxHeight:a||qt}}(t,e,i),u=l.width,h=l.height;if("content-box"===a.boxSizing){var c=bn(a,"border","width"),f=bn(a,"padding");u-=f.width+c.width,h-=f.height+c.height}return u=Math.max(0,u-r.width),h=Math.max(0,n?Math.floor(u/n):h-r.height),u=_n(Math.min(u,o,l.maxWidth)),h=_n(Math.min(h,s,l.maxHeight)),u&&!h&&(h=_n(u/2)),{width:u,height:h}}function wn(t,e,i){var n=e||1,a=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=a/n,t.width=r/n;var o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height="".concat(t.height,"px"),o.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==n||o.height!==a||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=a,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}var Mn=function(){var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Sn(t,e){var i=function(t,e){return mn(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Pn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Dn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function On(t,e,i,n){var a={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Pn(t,a,i),s=Pn(a,r,i),l=Pn(r,e,i),u=Pn(o,s,i),h=Pn(s,l,i);return Pn(u,h,i)}var An=new Map;function Cn(t,e,i){return function(t,e){e=e||{};var i=t+JSON.stringify(e),n=An.get(i);return n||(n=new Intl.NumberFormat(t,e),An.set(i,n)),n}(e,i).format(t)}function Tn(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function Rn(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function En(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ln(t){return"angle"===t?{between:fe,compare:he,normalize:ce}:{between:ve,compare:function(t,e){return t-e},normalize:function(t){return t}}}function In(t){var e=t.start,i=t.end,n=t.count;return{start:e%n,end:i%n,loop:t.loop&&(i-e+1)%n==0,style:t.style}}function zn(t,e,i){if(!i)return[t];for(var n,a,r,o=i.property,s=i.start,l=i.end,u=e.length,h=Ln(o),c=h.compare,f=h.between,d=h.normalize,v=function(t,e,i){var n,a,r=i.property,o=i.start,s=i.end,l=Ln(r),u=l.between,h=l.normalize,c=e.length,f=t.start,d=t.end,v=t.loop;if(v){for(f+=c,d+=c,n=0,a=c;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function Yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:Date.now(),i=0;this._charts.forEach((function(n,a){if(n.running&&n.items.length){for(var r,o=n.items,s=o.length-1,l=!1;s>=0;--s)(r=o[s])._active?(r._total>n.duration&&(n.duration=r._total),r.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(a.draw(),t._notify(a,n,e,"progress")),o.length||(n.running=!1,t._notify(a,n,e,"complete"),n.initial=!1),i+=o.length}})),this._lastDate=e,0===i&&(this._running=!1)}},{key:"_getAnims",value:function(t){var e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}},{key:"listen",value:function(t,e,i){this._getAnims(t).listeners[e].push(i)}},{key:"add",value:function(t,e){var i;e&&e.length&&(i=this._getAnims(t).items).push.apply(i,F(e))}},{key:"has",value:function(t){return this._getAnims(t).items.length>0}},{key:"start",value:function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((function(t,e){return Math.max(t,e._duration)}),0),this._refresh())}},{key:"running",value:function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}},{key:"stop",value:function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var i=e.items,n=i.length-1;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}},{key:"remove",value:function(t){return this._charts.delete(t)}}]),t}()),Xn="transparent",qn={boolean:function(t,e,i){return i>.5?e:t},color:function(t,e,i){var n=fi(t||Xn),a=n.valid&&fi(e||Xn);return a&&a.valid?a.mix(n,i).hexString():e},number:function(t,e,i){return t+(e-t)*i}},Kn=function(){function t(i,n,a,r){e(this,t);var o=n[a];r=Hi([i.to,r,o,i.from]);var s=Hi([i.from,o,r]);this._active=!0,this._fn=i.fn||qn[i.type||V(s)],this._easing=Ce[i.easing]||Ce.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=n,this._prop=a,this._from=s,this._to=r,this._promises=void 0}return r(t,[{key:"active",value:function(){return this._active}},{key:"update",value:function(t,e,i){if(this._active){this._notify(!1);var n=this._target[this._prop],a=i-this._start,r=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Hi([t.to,e,n,t.from]),this._from=Hi([t.from,n,e])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(t){var e,i=t-this._start,n=this._duration,a=this._prop,r=this._from,o=this._loop,s=this._to;if(this._active=r!==s&&(o||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,s,e))}},{key:"wait",value:function(){var t=this._promises||(this._promises=[]);return new Promise((function(e,i){t.push({res:e,rej:i})}))}},{key:"_notify",value:function(t){for(var e=t?"res":"rej",i=this._promises||[],n=0;n=0;--i){var l=o[i];if("$"!==l.charAt(0))if("options"!==l){var u=e[l],h=r[l],c=n.get(l);if(h){if(c&&h.active()){h.update(c,u,s);continue}h.cancel()}c&&c.duration?(r[l]=h=new Kn(c,t,l,u),a.push(h)):t[l]=u}else a.push.apply(a,F(this._animateOptions(t,e)))}return a}},{key:"update",value:function(t,e){if(0!==this._properties.size){var i=this._createAnimations(t,e);return i.length?(Un.add(this._chart,i),!0):void 0}Object.assign(t,e)}}]),t}();function Jn(t,e){var i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:a,end:n?a:r}}function Qn(t,e){var i,n,a=[],r=t._getSortedDatasetMetas(e);for(i=0,n=r.length;i3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,u="single"===s.mode;if(null!==e){for(n=0,a=l.length;n0||!i&&s<0)return o.index}}catch(t){r.e(t)}finally{r.f()}return null}function aa(t,e){for(var i,n=t.chart,a=t._cachedMeta,r=n._stacks||(n._stacks={}),o=a.iScale,s=a.vScale,l=a.index,u=o.axis,h=s.axis,c=function(t,e,i){return"".concat(t.id,".").concat(e.id,".").concat(i.stack||i.type)}(o,s,a),f=e.length,d=0;d0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=o,r._sorted=!0,a=o;else{a=Mt(o[t])?this.parseArrayData(r,o,t,e):St(o[t])?this.parseObjectData(r,o,t,e):this.parsePrimitiveData(r,o,t,e);for(i=0;ie||d=0;--i)if(!v()){this.updateRangeFromParsed(h,t,n,u);break}return h}},{key:"getAllParsedValues",value:function(t){var e,i,n,a=this._cachedMeta._parsed,r=[];for(e=0,i=a.length;e=0&&t1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,a="active"===i,r=this._cachedDataOpts,o=t+"-"+i,s=r[o],l=this.enableOptionSharing&&jt(n);if(s)return la(s,l);var u=this.chart.config,h=u.datasetElementScopeKeys(this._type,t),c=a?["".concat(t,"Hover"),"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),h),d=Object.keys(bi.elements[t]),v=function(){return e.getContext(n,a)},g=u.resolveNamedOptions(f,d,v,c);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(la(g,l))),g}},{key:"_resolveAnimations",value:function(t,e,i){var n,a=this.chart,r=this._cachedDataOpts,o="animation-".concat(e),s=r[o];if(s)return s;if(!1!==a.options.animation){var l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,e),h=l.getOptionScopes(this.getDataset(),u);n=l.createResolver(h,this.getContext(t,i,e))}var c=new Zn(a,n&&n.animations);return n&&n._cacheable&&(r[o]=Object.freeze(c)),c}},{key:"getSharedOptions",value:function(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}},{key:"includeOptions",value:function(t,e){return!e||sa(t)||this.chart._animationsDisabled}},{key:"_getSharedOptions",value:function(t,e){var i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,a=this.getSharedOptions(i),r=this.includeOptions(e,a)||a!==n;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:r}}},{key:"updateElement",value:function(t,e,i,n){sa(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}},{key:"updateSharedOptions",value:function(t,e,i){t&&!sa(e)&&this._resolveAnimations(void 0,e).update(t,i)}},{key:"_setStyle",value:function(t,e,i,n){t.active=n;var a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}},{key:"removeHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!1)}},{key:"setHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}},{key:"_resyncElements",value:function(t){var e,i=this._data,n=this._cachedMeta.data,a=$n(this._syncList);try{for(a.s();!(e=a.n()).done;){var r=v(e.value,3),o=r[0],s=r[1],l=r[2];this[o](s,l)}}catch(t){a.e(t)}finally{a.f()}this._syncList=[];var u=n.length,h=i.length,c=Math.min(h,u);c&&this.parse(0,c),h>u?this._insertElements(u,h-u,t):h2&&void 0!==arguments[2])||arguments[2],a=this._cachedMeta,r=a.data,o=t+e,s=function(t){for(t.length+=e,i=t.length-1;i>=o;i--)t[i]=t[i-e]};for(s(r),i=t;iMath.abs(s)&&(l=s,u=o),e[i.axis]=u,e._custom={barStart:l,barEnd:u,start:a,end:r,min:o,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function fa(t,e,i,n){var a,r,o,s,l=t.iScale,u=t.vScale,h=l.getLabels(),c=l===u,f=[];for(a=i,r=i+n;at.x,i="left",n="right"):(e=t.base=i?1:-1)}(i,a,u)*l,d===u&&(m-=i/2);var y=a.getPixelForDecimal(0),b=a.getPixelForDecimal(1),x=Math.min(y,b),_=Math.max(y,b);e=(m=Math.max(Math.min(m,_),x))+i}if(m===a.getPixelForValue(u)){var k=te(i)*a.getLineWidthForValue(u)/2;m+=k,i-=k}return{size:i,base:m,head:e,center:e+i/2}}},{key:"_calculateBarIndexPixels",value:function(t,e){var i,n,a=e.scale,r=this.options,o=r.skipNull,s=Ot(r.maxBarThickness,1/0);if(e.grouped){var l=o?this._getStackCount(t):e.stackCount,u="flex"===r.barThickness?function(t,e,i,n){var a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=e.xScale,n=e.yScale,a=this.getParsed(t),r=i.getLabelForValue(a.x),o=n.getLabelForValue(a.y),s=a._custom;return{label:e.label,value:"("+r+", "+o+(s?", "+s:"")+")"}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}},{key:"updateElements",value:function(t,e,i,n){for(var a="reset"===n,r=this._cachedMeta,o=r.iScale,s=r.vScale,l=this._getSharedOptions(e,n),u=l.sharedOptions,h=l.includeOptions,c=o.axis,f=s.axis,d=e;d0&&!isNaN(t)?Ut*(Math.abs(t)/e):0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Cn(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}},{key:"getMaxBorderWidth",value:function(t){var e,i,n,a,r,o=0,s=this.chart;if(!t)for(e=0,i=s.data.datasets.length;e0&&this.getParsed(e-1),_=e;_0&&Math.abs(w[d]-x[d])>y,m&&(M.parsed=w,M.raw=u.data[_]),f&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,M,n),x=w}}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;var a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,r)/2}},{key:"draw",value:function(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),B(s(a.prototype),"draw",this).call(this)}}]),a}();_a.id="line",_a.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},_a.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var ka=function(i){t(a,ua);var n=Hn(a);function a(t,i){var r;return e(this,a),(r=n.call(this,t,i)).innerRadius=void 0,r.outerRadius=void 0,r}return r(a,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Cn(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}},{key:"parseObjectData",value:function(t,e,i,n){return on.bind(this)(t,e,i,n)}},{key:"update",value:function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}},{key:"getMinMax",value:function(){var t=this,e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((function(e,n){var a=t.getParsed(n).r;!isNaN(a)&&t.chart.getDataVisibility(n)&&(ai.max&&(i.max=a))})),i}},{key:"_updateRadius",value:function(){var t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),r=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}},{key:"updateElements",value:function(t,e,i,n){var a,r="reset"===n,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,h=l.yCenter,c=l.getIndexAngle(0)-.5*Yt,f=c,d=360/this.countVisibleElements();for(a=0;a1){var o=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(o<1e-4||o>1e15)&&(n="scientific"),r=function(t,e){var i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}var s=Qt(Math.abs(r)),l=Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:n,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(u,this.options.ticks.format),Cn(t,a,u)},logarithmic:function(t,e,i){if(0===t)return"0";var n=t/Math.pow(10,Math.floor(Qt(t)));return 1===n||2===n||5===n?Pa.numeric.call(this,t,e,i):""}};var Da={formatters:Pa};function Oa(t,e){var i=t.options.ticks,n=i.maxTicksLimit||function(t){var e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(n,a))}(t),a=i.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;en)return function(t,e,i,n){var a,r=0,o=i[0];for(n=Math.ceil(n),a=0;aa)return l}return Math.max(a,1)}(a,e,n);if(r>0){var h,c,f=r>1?Math.round((s-o)/(r-1)):null;for(Aa(e,l,u,wt(f)?0:o-f,o),h=0,c=r-1;hs+l)))return u}function Ea(t){return t.drawTicks?t.tickLength:0}function La(t,e){if(!t.display)return 0;var i=ji(t.font,e),n=Wi(t.padding);return(Mt(t.text)?t.text.length:1)*i.lineHeight+n.height}function Ia(t,e,i){var n=we(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=function(t){return"left"===t?"right":"right"===t?"left":t}(n)),n}var za=function(i){t(a,Sa);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this)).id=t.id,i.type=t.type,i.options=void 0,i.ctx=t.ctx,i.chart=t.chart,i.top=void 0,i.bottom=void 0,i.left=void 0,i.right=void 0,i.width=void 0,i.height=void 0,i._margins={left:0,right:0,top:0,bottom:0},i.maxWidth=void 0,i.maxHeight=void 0,i.paddingTop=void 0,i.paddingBottom=void 0,i.paddingLeft=void 0,i.paddingRight=void 0,i.axis=void 0,i.labelRotation=void 0,i.min=void 0,i.max=void 0,i._range=void 0,i.ticks=[],i._gridLineItems=null,i._labelItems=null,i._labelSizes=null,i._length=0,i._maxLength=0,i._longestTextCache={},i._startPixel=void 0,i._endPixel=void 0,i._reversePixels=!1,i._userMax=void 0,i._userMin=void 0,i._suggestedMax=void 0,i._suggestedMin=void 0,i._ticksLength=0,i._borderValue=0,i._cache={},i._dataLimitsCached=!1,i.$context=void 0,i}return r(a,[{key:"init",value:function(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)}},{key:"parse",value:function(t,e){return t}},{key:"getUserBounds",value:function(){var t=this._userMin,e=this._userMax,i=this._suggestedMin,n=this._suggestedMax;return t=Dt(t,Number.POSITIVE_INFINITY),e=Dt(e,Number.NEGATIVE_INFINITY),i=Dt(i,Number.POSITIVE_INFINITY),n=Dt(n,Number.NEGATIVE_INFINITY),{min:Dt(t,i),max:Dt(e,n),minDefined:Pt(t),maxDefined:Pt(e)}}},{key:"getMinMax",value:function(t){var e,i=this.getUserBounds(),n=i.min,a=i.max,r=i.minDefined,o=i.maxDefined;if(r&&o)return{min:n,max:a};for(var s=this.getMatchingVisibleMetas(),l=0,u=s.length;la?a:n,Dt(a=r&&n>a?n:a,n)),max:Dt(a,Dt(n,a))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){Ct(this.options.beforeUpdate,[this])}},{key:"update",value:function(t,e,i){var n=this.options,a=n.beginAtZero,r=n.grace,o=n.ticks,s=o.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=function(t,e,i){var n=t.min,a=t.max,r=At(e,(a-n)/2),o=function(t,e){return i&&0===t?0:t+e};return{min:o(n,-Math.abs(r)),max:o(a,r)}}(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s=s||r<=1||!this.isHorizontal())this.labelRotation=o;else{var u=this._getLabelSizes(),h=u.widest.width,c=u.highest.height,f=de(this.chart.width-h,0,this.maxWidth);h+6>(t=n.offset?this.maxWidth/r:f/(r-1))&&(t=f/(r-(n.offset?.5:1)),e=this.maxHeight-Ea(n.grid)-a.padding-La(n.title,this.chart.options.font),i=Math.sqrt(h*h+c*c),l=oe(Math.min(Math.asin(de((u.highest.height+6)/t,-1,1)),Math.asin(de(e/i,-1,1))-Math.asin(de(c/i,-1,1)))),l=Math.max(o,Math.min(s,l))),this.labelRotation=l}}},{key:"afterCalculateLabelRotation",value:function(){Ct(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){Ct(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t={width:0,height:0},e=this.chart,i=this.options,n=i.ticks,a=i.title,r=i.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=La(a,e.options.font);if(s?(t.width=this.maxWidth,t.height=Ea(r)+l):(t.height=this.maxHeight,t.width=Ea(r)+l),n.display&&this.ticks.length){var u=this._getLabelSizes(),h=u.first,c=u.last,f=u.widest,d=u.highest,v=2*n.padding,g=re(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(s){var y=n.mirror?0:m*f.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{var b=n.mirror?0:p*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+v)}this._calculatePadding(h,c,m,p)}}this._handleMargins(),s?(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)}},{key:"_calculatePadding",value:function(t,e,i,n){var a=this.options,r=a.ticks,o=r.align,s=r.padding,l=a.position,u=0!==this.labelRotation,h="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,v=0;u?h?(d=n*t.width,v=i*e.height):(d=i*t.height,v=n*e.width):"start"===o?v=e.width:"end"===o?d=t.width:"inner"!==o&&(d=t.width/2,v=e.width/2),this.paddingLeft=Math.max((d-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((v-f+s)*this.width/(this.width-f),0)}else{var g=e.height/2,p=t.height/2;"start"===o?(g=0,p=t.height):"end"===o&&(g=e.height,p=0),this.paddingTop=g+s,this.paddingBottom=p+s}}},{key:"_handleMargins",value:function(){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))}},{key:"afterFit",value:function(){Ct(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options,e=t.axis,i=t.position;return"top"===i||"bottom"===i||"x"===e}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(t){var e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;ee){for(i=0;ie.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getPixelForDecimal",value:function(t){this._reversePixels&&(t=1-t);var e=this._startPixel+t*this._length;return de(this._alignToPixels?ki(this.chart,e,0):e,-32768,32767)}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0}},{key:"getContext",value:function(t){var e=this.ticks||[];if(t>=0&&to*n?o/i:s/n:s*n0}},{key:"_computeGridLineItems",value:function(t){var e,i,n,a,r,o,s,l,u,h,c,f,d=this.axis,v=this.chart,g=this.options,p=g.grid,m=g.position,y=p.offset,b=this.isHorizontal(),x=this.ticks.length+(y?1:0),_=Ea(p),k=[],w=p.setContext(this.getContext()),M=w.drawBorder?w.borderWidth:0,S=M/2,P=function(t){return ki(v,t,M)};if("top"===m)e=P(this.bottom),o=this.bottom-_,l=e-S,h=P(t.top)+S,f=t.bottom;else if("bottom"===m)e=P(this.top),h=t.top,f=P(t.bottom)-S,o=e+S,l=this.top+_;else if("left"===m)e=P(this.right),r=this.right-_,s=e-S,u=P(t.left)+S,c=t.right;else if("right"===m)e=P(this.left),u=t.left,c=P(t.right)-S,r=e+S,s=this.left+_;else if("x"===d){if("center"===m)e=P((t.top+t.bottom)/2+.5);else if(St(m)){var D=Object.keys(m)[0],O=m[D];e=P(this.chart.scales[D].getPixelForValue(O))}h=t.top,f=t.bottom,l=(o=e+S)+_}else if("y"===d){if("center"===m)e=P((t.left+t.right)/2);else if(St(m)){var A=Object.keys(m)[0],C=m[A];e=P(this.chart.scales[A].getPixelForValue(C))}s=(r=e-S)-_,u=t.left,c=t.right}var T=Ot(g.ticks.maxTicksLimit,x),R=Math.max(1,Math.ceil(x/T));for(i=0;i=0?e.setContext(this.getContext(i)).lineWidth:0}},{key:"drawGrid",value:function(t){var e,i,n=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=function(t,e,i){i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(n.display)for(e=0,i=r.length;e0&&this.getParsed(e-1),_=e;_0&&Math.abs(w[d]-x[d])>y,m&&(M.parsed=w,M.raw=u.data[_]),f&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,M,n),x=w}this.updateSharedOptions(c,n,h)}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){for(var i=0,n=e.length-1;n>=0;--n)i=Math.max(i,e[n].size(this.resolveDataElementOptions(n))/2);return i>0&&i}var a=t.dataset,r=a.options&&a.options.borderWidth||0;if(!e.length)return r;var o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,s)/2}}]),a}();Na.id="scatter",Na.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Na.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:function(){return""},label:function(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Wa=Object.freeze({__proto__:null,BarController:ya,BubbleController:ba,DoughnutController:xa,LineController:_a,PolarAreaController:ka,PieController:wa,RadarController:Ma,ScatterController:Na});function ja(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Ha=function(){function t(i){e(this,t),this.options=i||{}}return r(t,[{key:"init",value:function(t){}},{key:"formats",value:function(){return ja()}},{key:"parse",value:function(t,e){return ja()}},{key:"format",value:function(t,e){return ja()}},{key:"add",value:function(t,e,i){return ja()}},{key:"diff",value:function(t,e,i){return ja()}},{key:"startOf",value:function(t,e,i){return ja()}},{key:"endOf",value:function(t,e){return ja()}}]),t}();Ha.override=function(t){Object.assign(Ha.prototype,t)};var $a={_date:Ha};function Ya(t,e,i,n){var a=t.controller,r=t.data,o=t._sorted,s=a._cachedMeta.iScale;if(s&&e===s.axis&&"r"!==e&&o&&r.length){var l=s._reversePixels?me:pe;if(!n)return l(r,e,i);if(a._sharedOptions){var u=r[0],h="function"==typeof u.getRange&&u.getRange(e);if(h){var c=l(r,e,i-h),f=l(r,e,i+h);return{lo:c.lo,hi:f.hi}}}}return{lo:0,hi:r.length-1}}function Ua(t,e,i,n,a){for(var r=t.getSortedVisibleDatasetMetas(),o=i[e],s=0,l=r.length;s0){var l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(var h=0;h3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},r=Hr(this._resolverCache,t,n),o=r.resolver,s=r.subPrefixes,l=o;if(Yr(o,e)){a.$shared=!1,i=Ht(i)?i():i;var u=this.createResolver(t,i,s);l=Ui(o,i,u)}var h,c=$n(e);try{for(c.s();!(h=c.n()).done;){var f=h.value;a[f]=l[f]}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"createResolver",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],n=arguments.length>3?arguments[3]:void 0,a=Hr(this._resolverCache,t,i),r=a.resolver;return St(e)?Ui(r,e,void 0,n):r}}]),t}();function Hr(t,e,i){var n=t.get(e);n||(n=new Map,t.set(e,n));var a=i.join(),r=n.get(a);r||(r={resolver:Yi(e,i),subPrefixes:i.filter((function(t){return!t.toLowerCase().includes("hover")}))},n.set(a,r));return r}var $r=function(t){return St(t)&&Object.getOwnPropertyNames(t).reduce((function(e,i){return e||Ht(t[i])}),!1)};function Yr(t,e){var i,n=Xi(t),a=n.isScriptable,r=n.isIndexable,o=$n(e);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=a(s),u=r(s),h=(u||l)&&t[s];if(l&&(Ht(h)||$r(h))||u&&Mt(h))return!0}}catch(t){o.e(t)}finally{o.f()}return!1}var Ur=["top","bottom","left","right","chartArea"];function Xr(t,e){return"top"===t||"bottom"===t||-1===Ur.indexOf(t)&&"x"===e}function qr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Kr(t){var e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Ct(i&&i.onComplete,[t],e)}function Gr(t){var e=t.chart,i=e.options.animation;Ct(i&&i.onProgress,[t],e)}function Zr(t){return vn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var Jr={},Qr=function(t){var e=Zr(t);return Object.values(Jr).filter((function(t){return t.canvas===e})).pop()};function to(t,e,i){for(var n=0,a=Object.keys(t);n=e){var s=t[r];delete t[r],(i>0||o>e)&&(t[o+i]=s)}}}var eo=function(){function t(i,n){var a=this;e(this,t);var r=this.config=new jr(n),o=Zr(i),s=Qr(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");var l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function(t){return!vn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?gr:Cr}(o)),this.platform.updateConfig(r);var u,h,c,f=this.platform.acquireContext(o,l.aspectRatio),d=f&&f.canvas,v=d&&d.height,g=d&&d.width;this.id=kt(),this.ctx=f,this.canvas=d,this.width=g,this.height=v,this._options=l,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 Tr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(u=function(t){return a.update(t)},h=l.resizeDelay||0,function(){for(var t=arguments.length,e=new Array(t),i=0;ie){for(var n=e;ni.length&&delete this._stacks,e.forEach((function(e,n){0===i.filter((function(t){return t===e._dataset})).length&&t._destroyDatasetMeta(n)}))}},{key:"buildOrUpdateControllers",value:function(){var t,e,i=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=n.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(t){var e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&Di(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&Oi(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}},{key:"isPointInArea",value:function(t){return Pi(t,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(t,e,i,n){var a=Za.modes[e];return"function"==typeof a?a(this,t,i,n):[]}},{key:"getDatasetMeta",value:function(t){var e=this.data.datasets[t],i=this._metasets,n=i.filter((function(t){return t&&t._dataset===e})).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}},{key:"getContext",value:function(){return this.$context||(this.$context=$i(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(t){var e=this.data.datasets[t];if(!e)return!1;var i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}},{key:"setDatasetVisibility",value:function(t,e){this.getDatasetMeta(t).hidden=!e}},{key:"toggleDataVisibility",value:function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}},{key:"getDataVisibility",value:function(t){return!this._hiddenIndices[t]}},{key:"_updateVisibility",value:function(t,e,i){var n=i?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,n);jt(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(a,{visible:i}),this.update((function(e){return e.datasetIndex===t?n:void 0})))}},{key:"hide",value:function(t,e){this._updateVisibility(t,e,!1)}},{key:"show",value:function(t,e){this._updateVisibility(t,e,!0)}},{key:"_destroyDatasetMeta",value:function(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}},{key:"_stop",value:function(){var t,e;for(this.stop(),Un.remove(this),t=0,e=this.data.datasets.length;ta?(u=a/l,t.arc(r,o,l,i+u,n-u,!0)):t.arc(r,o,a,i+Gt,n-Gt),t.closePath(),t.clip()}function ro(t,e,i,n){var a=Vi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),s=function(t){var e=(i-Math.min(r,t))*n/2;return de(t,0,Math.min(r,e))};return{outerStart:s(a.outerStart),outerEnd:s(a.outerEnd),innerStart:de(a.innerStart,0,o),innerEnd:de(a.innerEnd,0,o)}}function oo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function so(t,e,i,n,a,r){var o=e.x,s=e.y,l=e.startAngle,u=e.pixelMargin,h=e.innerRadius,c=Math.max(e.outerRadius+n+i-u,0),f=h>0?h+n+i+u:0,d=0,v=a-l;if(n){var g=((h>0?h-n:0)+(c>0?c-n:0))/2;d=(v-(0!==g?v*g/(g+n):v))/2}var p=(v-Math.max(.001,v*c-i/Yt)/c)/2,m=l+p+d,y=a-p-d,b=ro(e,f,c,y-m),x=b.outerStart,_=b.outerEnd,k=b.innerStart,w=b.innerEnd,M=c-x,S=c-_,P=m+x/M,D=y-_/S,O=f+k,A=f+w,C=m+k/O,T=y-w/A;if(t.beginPath(),r){if(t.arc(o,s,c,P,D),_>0){var R=oo(S,D,o,s);t.arc(R.x,R.y,_,D,y+Gt)}var E=oo(A,y,o,s);if(t.lineTo(E.x,E.y),w>0){var L=oo(A,T,o,s);t.arc(L.x,L.y,w,y+Gt,T+Math.PI)}if(t.arc(o,s,f,y-w/f,m+k/f,!0),k>0){var I=oo(O,C,o,s);t.arc(I.x,I.y,k,C+Math.PI,m-Gt)}var z=oo(M,m,o,s);if(t.lineTo(z.x,z.y),x>0){var F=oo(M,P,o,s);t.arc(F.x,F.y,x,m-Gt,P)}}else{t.moveTo(o,s);var V=Math.cos(P)*c+o,B=Math.sin(P)*c+s;t.lineTo(V,B);var N=Math.cos(D)*c+o,W=Math.sin(D)*c+s;t.lineTo(N,W)}t.closePath()}function lo(t,e,i,n,a,r){var o=e.options,s=o.borderWidth,l=o.borderJoinStyle,u="inner"===o.borderAlign;s&&(u?(t.lineWidth=2*s,t.lineJoin=l||"round"):(t.lineWidth=s,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){var n,a=e.x,r=e.y,o=e.startAngle,s=e.pixelMargin,l=e.fullCircles,u=Math.max(e.outerRadius-s,0),h=e.innerRadius+s;for(i&&ao(t,e,o+Ut),t.beginPath(),t.arc(a,r,h,o+Ut,o,!0),n=0;n=Ut||fe(a,s,l),v=ve(r,u+f,h+f);return d&&v}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),i=e.x,n=e.y,a=e.startAngle,r=e.endAngle,o=e.innerRadius,s=e.outerRadius,l=this.options,u=l.offset,h=(a+r)/2,c=(o+s+l.spacing+u)/2;return{x:i+Math.cos(h)*c,y:n+Math.sin(h)*c}}},{key:"tooltipPosition",value:function(t){return this.getCenterPoint(t)}},{key:"draw",value:function(t){var e=this.options,i=this.circumference,n=(e.offset||0)/2,a=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Ut?Math.floor(i/Ut):0,!(0===i||this.innerRadius<0||this.outerRadius<0)){t.save();var o=0;if(n){o=n/2;var s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o),this.circumference>=Yt&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;var l=function(t,e,i,n,a){var r=e.fullCircles,o=e.startAngle,s=e.circumference,l=e.endAngle;if(r){so(t,e,i,n,o+Ut,a);for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=Ot(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Ot(i.borderDash,e.borderDash)),t.lineDashOffset=Ot(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Ot(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ot(i.borderWidth,e.borderWidth),t.strokeStyle=Ot(i.borderColor,e.borderColor)}function co(t,e,i){t.lineTo(i.x,i.y)}function fo(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.length,a=i.start,r=void 0===a?0:a,o=i.end,s=void 0===o?n-1:o,l=e.start,u=e.end,h=Math.max(r,l),c=Math.min(s,u),f=ru&&s>u;return{count:n,start:h,loop:e.loop,ilen:cl&&(l=M),b=(x*b+w)/++x):(k(),t.lineTo(w,M),o=S,x=0,s=l=M),u=M}k()}function po(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?go:vo}uo.id="arc",uo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},uo.defaultRoutes={backgroundColor:"backgroundColor"};var mo="function"==typeof Path2D;function yo(t,e,i,n){mo&&!e.options.segment?function(t,e,i,n){var a=e._path;a||(a=e._path=new Path2D,e.path(a,i,n)&&a.closePath()),ho(t,e.options),t.stroke(a)}(t,e,i,n):function(t,e,i,n){var a,r=e.segments,o=e.options,s=po(e),l=$n(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;ho(t,o,u.style),t.beginPath(),s(t,e,u,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}}catch(t){l.e(t)}finally{l.f()}}(t,e,i,n)}var bo=function(i){t(o,Sa);var n=Hn(o);function o(t){var i;return e(this,o),(i=n.call(this)).animated=!0,i.options=void 0,i._chart=void 0,i._loop=void 0,i._fullLoop=void 0,i._path=void 0,i._points=void 0,i._segments=void 0,i._decimated=!1,i._pointsUpdated=!1,i._datasetIndex=void 0,t&&Object.assign(a(i),t),i}return r(o,[{key:"updateControlPoints",value:function(t,e){var i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){var n=i.spanGaps?this._loop:this._fullLoop;dn(this._points,i,t,n,e),this._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(t,e){var i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];var r=!!t._loop,o=function(t,e,i,n){var a=0,r=e-1;if(i&&!n)for(;aa&&t[r%e].skip;)r--;return{start:a,end:r%=e}}(i,a,r,n),s=o.start,l=o.end;return Vn(t,!0===n?[{start:s,end:l,loop:r}]:function(t,e,i,n){var a,r=t.length,o=[],s=e,l=t[e];for(a=e+1;a<=i;++a){var u=t[a%r];u.skip||u.stop?l.skip||(n=!1,o.push({start:e%r,end:(a-1)%r,loop:n}),e=s=u.stop?a:null):(s=a,l.skip&&(e=a)),l=u}return null!==s&&o.push({start:e%r,end:s%r,loop:n}),o}(i,s,l2&&void 0!==arguments[2]?arguments[2]:{},n=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,o=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+n,y:t.y+a,w:t.w+r,h:t.h+o,radius:t.radius}}_o.id="point",_o.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},_o.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Oo=function(i){t(o,Sa);var n=Hn(o);function o(t){var i;return e(this,o),(i=n.call(this)).options=void 0,i.horizontal=void 0,i.base=void 0,i.width=void 0,i.height=void 0,i.inflateAmount=void 0,t&&Object.assign(a(i),t),i}return r(o,[{key:"draw",value:function(t){var e,i=this.inflateAmount,n=this.options,a=n.borderColor,r=n.backgroundColor,o=Mo(this),s=o.inner,l=o.outer,u=(e=l.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?Li:Po;t.save(),l.w===s.w&&l.h===s.h||(t.beginPath(),u(t,Do(l,i,s)),t.clip(),u(t,Do(s,-i,l)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),u(t,Do(s,i)),t.fillStyle=r,t.fill(),t.restore()}},{key:"inRange",value:function(t,e,i){return So(this,t,e,i)}},{key:"inXRange",value:function(t,e){return So(this,t,null,e)}},{key:"inYRange",value:function(t,e){return So(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","base","horizontal"],t),i=e.x,n=e.y,a=e.base,r=e.horizontal;return{x:r?(i+a)/2:i,y:r?n:(n+a)/2}}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}]),o}();Oo.id="bar",Oo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Oo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Ao=Object.freeze({__proto__:null,ArcElement:uo,LineElement:bo,PointElement:_o,BarElement:Oo});function Co(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function To(t){t.data.datasets.forEach((function(t){Co(t)}))}var Ro={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(t,e,i){if(i.enabled){var n=t.width;t.data.datasets.forEach((function(e,a){var r=e._data,o=e.indexAxis,s=t.getDatasetMeta(a),l=r||e.data;if("y"!==Hi([o,t.options.indexAxis])&&s.controller.supportsDecimation){var u=t.scales[s.xAxisID];if(("linear"===u.type||"time"===u.type)&&!t.options.parsing){var h=function(t,e){var i=e.length,n=0,a=t.iScale,r=a.getUserBounds(),o=r.min,s=r.max,l=r.minDefined,u=r.maxDefined;return l&&(n=de(pe(e,a.axis,o).lo,0,i-1)),{start:n,count:u?de(pe(e,a.axis,s).hi+1,n,i)-n:i-n}}(s,l),c=h.start,f=h.count;if(f<=(i.threshold||4*n))Co(e);else{var d;switch(wt(r)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,a){var r=a.samples||n;if(r>=i)return t.slice(e,e+i);var o,s,l,u,h,c=[],f=(i-2)/(r-2),d=0,v=e+i-1,g=e;for(c[d++]=t[g],o=0;ol&&(l=u,s=t[y],h=y);c[d++]=s,g=h}return c[d++]=t[v],c}(l,c,f,n,i);break;case"min-max":d=function(t,e,i,n){var a,r,o,s,l,u,h,c,f,d,v=0,g=0,p=[],m=e+i-1,y=t[e].x,b=t[m].x-y;for(a=e;ad&&(d=s,h=a),v=(g*v+r.x)/++g;else{var _=a-1;if(!wt(u)&&!wt(h)){var k=Math.min(u,h),w=Math.max(u,h);k!==c&&k!==_&&p.push(jn(jn({},t[k]),{},{x:v})),w!==c&&w!==_&&p.push(jn(jn({},t[w]),{},{x:v}))}a>0&&_!==c&&p.push(t[_]),p.push(r),l=x,g=0,f=d=s,u=h=c=a}}return p}(l,c,f,n);break;default:throw new Error("Unsupported decimation algorithm '".concat(i.algorithm,"'"))}e._decimated=d}}}}))}else To(t)},destroy:function(t){To(t)}};function Eo(t,e,i,n){if(!n){var a=e[t],r=i[t];return"angle"===t&&(a=ce(a),r=ce(r)),{property:t,start:a,end:r}}}function Lo(t,e,i){for(;e>t;e--){var n=i[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Io(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function zo(t,e){var i=[],n=!1;return Mt(t)?(n=!0,i=t):i=function(t,e){var i=t||{},n=i.x,a=void 0===n?null:n,r=i.y,o=void 0===r?null:r,s=e.points,l=[];return e.segments.forEach((function(t){var e=t.start,i=t.end;i=Lo(e,i,s);var n=s[e],r=s[i];null!==o?(l.push({x:n.x,y:o}),l.push({x:r.x,y:o})):null!==a&&(l.push({x:a,y:n.y}),l.push({x:a,y:r.y}))})),l}(t,e),i.length?new bo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Fo(t){return t&&!1!==t.fill}function Vo(t,e,i){var n,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!Pt(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function Bo(t,e,i){var n=function(t){var e=t.options,i=e.fill,n=Ot(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(St(n))return!isNaN(n.value)&&n;var a=parseFloat(n);return Pt(a)&&Math.floor(a)===a?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,a,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function No(t,e,i){for(var n=[],a=0;a=0;--o){var s=a[o].$filler;s&&(s.line.updateControlPoints(r,s.axis),n&&s.fill&&$o(t.ctx,s,r))}},beforeDatasetsDraw:function(t,e,i){if("beforeDatasetsDraw"===i.drawTime)for(var n=t.getSortedVisibleDatasetMetas(),a=n.length-1;a>=0;--a){var r=n[a].$filler;Fo(r)&&$o(t.ctx,r,t.chartArea)}},beforeDatasetDraw:function(t,e,i){var n=e.meta.$filler;Fo(n)&&"beforeDatasetDraw"===i.drawTime&&$o(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Go=function(t,e){var i=t.boxHeight,n=void 0===i?e:i,a=t.boxWidth,r=void 0===a?e:a;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},Zo=function(i){t(a,Sa);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this))._added=!1,i.legendHitBoxes=[],i._hoveredItem=null,i.doughnutMode=!1,i.chart=t.chart,i.options=t.options,i.ctx=t.ctx,i.legendItems=void 0,i.columnSizes=void 0,i.lineWidths=void 0,i.maxHeight=void 0,i.maxWidth=void 0,i.top=void 0,i.bottom=void 0,i.left=void 0,i.right=void 0,i.height=void 0,i.width=void 0,i._margins=void 0,i.position=void 0,i.weight=void 0,i.fullSize=void 0,i}return r(a,[{key:"update",value:function(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}},{key:"setDimensions",value:function(){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)}},{key:"buildLabels",value:function(){var t=this,e=this.options.labels||{},i=Ct(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),e.sort&&(i=i.sort((function(i,n){return e.sort(i,n,t.chart.data)}))),this.options.reverse&&i.reverse(),this.legendItems=i}},{key:"fit",value:function(){var t=this.options,e=this.ctx;if(t.display){var i,n,a=t.labels,r=ji(a.font),o=r.size,s=this._computeTitleHeight(),l=Go(a,o),u=l.boxWidth,h=l.itemHeight;e.font=r.string,this.isHorizontal()?(i=this.maxWidth,n=this._fitRows(s,o,u,h)+10):(n=this.maxHeight,i=this._fitCols(s,o,u,h)+10),this.width=Math.min(i,t.maxWidth||this.maxWidth),this.height=Math.min(n,t.maxHeight||this.maxHeight)}else this.width=this.height=0}},{key:"_fitRows",value:function(t,e,i,n){var a=this.ctx,r=this.maxWidth,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+o,h=t;a.textAlign="left",a.textBaseline="middle";var c=-1,f=-u;return this.legendItems.forEach((function(t,d){var v=i+e/2+a.measureText(t.text).width;(0===d||l[l.length-1]+v+2*o>r)&&(h+=u,l[l.length-(d>0?0:1)]=0,f+=u,c++),s[d]={left:0,top:f,row:c,width:v,height:n},l[l.length-1]+=v+o})),h}},{key:"_fitCols",value:function(t,e,i,n){var a=this.ctx,r=this.maxHeight,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.columnSizes=[],u=r-t,h=o,c=0,f=0,d=0,v=0;return this.legendItems.forEach((function(t,r){var g=i+e/2+a.measureText(t.text).width;r>0&&f+n+2*o>u&&(h+=c+o,l.push({width:c,height:f}),d+=c+o,v++,c=f=0),s[r]={left:d,top:f,col:v,width:g,height:n},c=Math.max(c,g),f+=n+o})),h+=c,l.push({width:c,height:f}),h}},{key:"adjustHitBoxes",value:function(){if(this.options.display){var t=this._computeTitleHeight(),e=this.legendHitBoxes,i=this.options,n=i.align,a=i.labels.padding,r=Tn(i.rtl,this.left,this.width);if(this.isHorizontal()){var o,s=0,l=Me(n,this.left+a,this.right-this.lineWidths[s]),u=$n(e);try{for(u.s();!(o=u.n()).done;){var h=o.value;s!==h.row&&(s=h.row,l=Me(n,this.left+a,this.right-this.lineWidths[s])),h.top+=this.top+t+a,h.left=r.leftForLtr(r.x(l),h.width),l+=h.width+a}}catch(t){u.e(t)}finally{u.f()}}else{var c,f=0,d=Me(n,this.top+t+a,this.bottom-this.columnSizes[f].height),v=$n(e);try{for(v.s();!(c=v.n()).done;){var g=c.value;g.col!==f&&(f=g.col,d=Me(n,this.top+t+a,this.bottom-this.columnSizes[f].height)),g.top=d,g.left+=this.left+a,g.left=r.leftForLtr(r.x(g.left),g.width),d+=g.height+a}}catch(t){v.e(t)}finally{v.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){if(this.options.display){var t=this.ctx;Di(t,this),this._draw(),Oi(t)}}},{key:"_draw",value:function(){var t,e=this,i=this.options,n=this.columnSizes,a=this.lineWidths,r=this.ctx,o=i.align,s=i.labels,l=bi.color,u=Tn(i.rtl,this.left,this.width),h=ji(s.font),c=s.color,f=s.padding,d=h.size,v=d/2;this.drawTitle(),r.textAlign=u.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=h.string;var g=Go(s,d),p=g.boxWidth,m=g.boxHeight,y=g.itemHeight,b=this.isHorizontal(),x=this._computeTitleHeight();t=b?{x:Me(o,this.left+f,this.right-a[0]),y:this.top+f+x,line:0}:{x:this.left+f,y:Me(o,this.top+x+f,this.bottom-n[0].height),line:0},Rn(this.ctx,i.textDirection);var _=y+f;this.legendItems.forEach((function(g,k){r.strokeStyle=g.fontColor||c,r.fillStyle=g.fontColor||c;var w=r.measureText(g.text).width,M=u.textAlign(g.textAlign||(g.textAlign=s.textAlign)),S=p+v+w,P=t.x,D=t.y;u.setWidth(e.width),b?k>0&&P+S+f>e.right&&(D=t.y+=_,t.line++,P=t.x=Me(o,e.left+f,e.right-a[t.line])):k>0&&D+_>e.bottom&&(P=t.x=P+n[t.line].width+f,t.line++,D=t.y=Me(o,e.top+x+f,e.bottom-n[t.line].height)),function(t,e,i){if(!(isNaN(p)||p<=0||isNaN(m)||m<0)){r.save();var n=Ot(i.lineWidth,1);if(r.fillStyle=Ot(i.fillStyle,l),r.lineCap=Ot(i.lineCap,"butt"),r.lineDashOffset=Ot(i.lineDashOffset,0),r.lineJoin=Ot(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=Ot(i.strokeStyle,l),r.setLineDash(Ot(i.lineDash,[])),s.usePointStyle){var a={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},o=u.xPlus(t,p/2);Si(r,a,o,e+v,s.pointStyleWidth&&p)}else{var h=e+Math.max((d-m)/2,0),c=u.leftForLtr(t,p),f=Ni(i.borderRadius);r.beginPath(),Object.values(f).some((function(t){return 0!==t}))?Li(r,{x:c,y:h,w:p,h:m,radius:f}):r.rect(c,h,p,m),r.fill(),0!==n&&r.stroke()}r.restore()}}(u.x(P),D,g),P=function(t,e,i,n){return t===(n?"left":"right")?i:"center"===t?(e+i)/2:e}(M,P+p+v,b?P+S:e.right,i.rtl),function(t,e,i){Ti(r,i.text,t,e+y/2,h,{strikethrough:i.hidden,textAlign:u.textAlign(i.textAlign)})}(u.x(P),D,g),b?t.x+=S+f:t.y+=_})),En(this.ctx,i.textDirection)}},{key:"drawTitle",value:function(){var t=this.options,e=t.title,i=ji(e.font),n=Wi(e.padding);if(e.display){var a,r=Tn(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=i.size/2,u=n.top+l,h=this.left,c=this.width;if(this.isHorizontal())c=Math.max.apply(Math,F(this.lineWidths)),a=this.top+u,h=Me(t.align,h,this.right-c);else{var f=this.columnSizes.reduce((function(t,e){return Math.max(t,e.height)}),0);a=u+Me(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}var d=Me(s,h,h+c);o.textAlign=r.textAlign(we(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ti(o,e.text,d,a,i)}}},{key:"_computeTitleHeight",value:function(){var t=this.options.title,e=ji(t.font),i=Wi(t.padding);return t.display?e.lineHeight+i.height:0}},{key:"_getLegendItemAt",value:function(t,e){var i,n,a;if(ve(t,this.left,this.right)&&ve(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i-1?t.split("\n"):t}function os(t,e){var i=e.element,n=e.datasetIndex,a=e.index,r=t.getDatasetMeta(n).controller,o=r.getLabelAndValue(a),s=o.label,l=o.value;return{chart:t,label:s,parsed:r.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:l,dataset:r.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function ss(t,e){var i=t.chart.ctx,n=t.body,a=t.footer,r=t.title,o=e.boxWidth,s=e.boxHeight,l=ji(e.bodyFont),u=ji(e.titleFont),h=ji(e.footerFont),c=r.length,f=a.length,d=n.length,v=Wi(e.padding),g=v.height,p=0,m=n.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);(m+=t.beforeBody.length+t.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),m)&&(g+=d*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(m-d)*l.lineHeight+(m-1)*e.bodySpacing);f&&(g+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);var y=0,b=function(t){p=Math.max(p,i.measureText(t).width+y)};return i.save(),i.font=u.string,Tt(t.title,b),i.font=l.string,Tt(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?o+2+e.boxPadding:0,Tt(n,(function(t){Tt(t.before,b),Tt(t.lines,b),Tt(t.after,b)})),y=0,i.font=h.string,Tt(t.footer,b),i.restore(),{width:p+=v.width,height:g}}function ls(t,e,i,n){var a=i.x,r=i.width,o=t.width,s=t.chartArea,l=s.left,u=s.right,h="center";return"center"===n?h=a<=(l+u)/2?"left":"right":a<=r/2?h="left":a>=o-r/2&&(h="right"),function(t,e,i,n){var a=n.x,r=n.width,o=i.caretSize+i.caretPadding;return"left"===t&&a+r+o>e.width||"right"===t&&a-r-o<0||void 0}(h,t,e,i)&&(h="center"),h}function us(t,e,i){var n=i.yAlign||e.yAlign||function(t,e){var i=e.y,n=e.height;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||ls(t,e,i,n),yAlign:n}}function hs(t,e,i,n){var a=t.caretSize,r=t.caretPadding,o=t.cornerRadius,s=i.xAlign,l=i.yAlign,u=a+r,h=Ni(o),c=h.topLeft,f=h.topRight,d=h.bottomLeft,v=h.bottomRight,g=function(t,e){var i=t.x,n=t.width;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,s),p=function(t,e,i){var n=t.y,a=t.height;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,u);return"center"===l?"left"===s?g+=u:"right"===s&&(g-=u):"left"===s?g-=Math.max(c,d)+a:"right"===s&&(g+=Math.max(f,v)+a),{x:de(g,0,n.width-e.width),y:de(p,0,n.height-e.height)}}function cs(t,e,i){var n=Wi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function fs(t){return as([],rs(t))}function ds(t,e){var i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}var vs=function(i){t(a,Sa);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this)).opacity=0,i._active=[],i._eventPosition=void 0,i._size=void 0,i._cachedAnimations=void 0,i._tooltipItems=[],i.$animations=void 0,i.$context=void 0,i.chart=t.chart||t._chart,i._chart=i.chart,i.options=t.options,i.dataPoints=void 0,i.title=void 0,i.beforeBody=void 0,i.body=void 0,i.afterBody=void 0,i.footer=void 0,i.xAlign=void 0,i.yAlign=void 0,i.x=void 0,i.y=void 0,i.height=void 0,i.width=void 0,i.caretX=void 0,i.caretY=void 0,i.labelColors=void 0,i.labelPointStyles=void 0,i.labelTextColors=void 0,i}return r(a,[{key:"initialize",value:function(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var t=this._cachedAnimations;if(t)return t;var e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new Zn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}},{key:"getContext",value:function(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,$i(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}},{key:"getTitle",value:function(t,e){var i=e.callbacks,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]),o=[];return o=as(o,rs(n)),o=as(o,rs(a)),o=as(o,rs(r))}},{key:"getBeforeBody",value:function(t,e){return fs(e.callbacks.beforeBody.apply(this,[t]))}},{key:"getBody",value:function(t,e){var i=this,n=e.callbacks,a=[];return Tt(t,(function(t){var e={before:[],lines:[],after:[]},r=ds(n,t);as(e.before,rs(r.beforeLabel.call(i,t))),as(e.lines,r.label.call(i,t)),as(e.after,rs(r.afterLabel.call(i,t))),a.push(e)})),a}},{key:"getAfterBody",value:function(t,e){return fs(e.callbacks.afterBody.apply(this,[t]))}},{key:"getFooter",value:function(t,e){var i=e.callbacks,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]),o=[];return o=as(o,rs(n)),o=as(o,rs(a)),o=as(o,rs(r))}},{key:"_createItems",value:function(t){var e,i,n=this,a=this._active,r=this.chart.data,o=[],s=[],l=[],u=[];for(e=0,i=a.length;e0&&e.stroke()}},{key:"_updateAnimationTarget",value:function(t){var e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){var r=ns[t.position].call(this,this._active,this._eventPosition);if(!r)return;var o=this._size=ss(this,t),s=Object.assign({},r,this._size),l=us(e,t,s),u=hs(t,s,l,e);n._to===u.x&&a._to===u.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}},{key:"_willRender",value:function(){return!!this.opacity}},{key:"draw",value:function(t){var e=this.options.setContext(this.getContext()),i=this.opacity;if(i){this._updateAnimationTarget(e);var n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;var r=Wi(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),Rn(t,e.textDirection),a.y+=r.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),En(t,e.textDirection),t.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t,e){var i=this,n=this._active,a=t.map((function(t){var e=t.datasetIndex,n=t.index,a=i.chart.getDatasetMeta(e);if(!a)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:a.data[n],index:n}})),r=!Rt(n,a),o=this._positionChanged(a,e);(r||o)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}},{key:"handleEvent",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var n=this.options,a=this._active||[],r=this._getActiveElements(t,a,e,i),o=this._positionChanged(r,t),s=e||!Rt(r,a)||o;return s&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}},{key:"_getActiveElements",value:function(t,e,i,n){var a=this.options;if("mouseout"===t.type)return[];if(!n)return e;var r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}},{key:"_positionChanged",value:function(t,e){var i=this.caretX,n=this.caretY,a=this.options,r=ns[a.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}]),a}();vs.positioners=ns;var gs={id:"tooltip",_element:vs,positioners:ns,afterInit:function(t,e,i){i&&(t.tooltip=new vs({chart:t,options:i}))},beforeUpdate:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw:function(t){var e=t.tooltip;if(e&&e._willRender()){var i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent:function(t,e){if(t.tooltip){var i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:function(t,e){return e.bodyFont.size},boxWidth:function(t,e){return e.bodyFont.size},multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:xt,title:function(t){if(t.length>0){var e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex=0&&te.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getValueForPixel",value:function(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),a}();function bs(t,e){var i,n,a,r,o,s,l,u=[],h=t.bounds,c=t.step,f=t.min,d=t.max,v=t.precision,g=t.count,p=t.maxTicks,m=t.maxDigits,y=t.includeBounds,b=c||1,x=p-1,_=e.min,k=e.max,w=!wt(f),M=!wt(d),S=!wt(g),P=(k-_)/(m+1),D=ee((k-_)/x/b)*b;if(D<1e-14&&!w&&!M)return[{value:_},{value:k}];(r=Math.ceil(k/D)-Math.floor(_/D))>x&&(D=ee(r*D/x/b)*b),wt(v)||(i=Math.pow(10,v),D=Math.ceil(D*i)/i),"ticks"===h?(n=Math.floor(_/D)*D,a=Math.ceil(k/D)*D):(n=_,a=k),w&&M&&c&&(o=(d-f)/c,s=D/1e3,(l=Math.round(o))-s<=o&&l+s>=o)?(D=(d-f)/(r=Math.round(Math.min((d-f)/D,p))),n=f,a=d):S?D=((a=M?d:a)-(n=w?f:n))/(r=g-1):r=ne(r=(a-n)/D,Math.round(r),D/1e3)?Math.round(r):Math.ceil(r);var O=Math.max(se(D),se(n));i=Math.pow(10,wt(v)?O:v),n=Math.round(n*i)/i,a=Math.round(a*i)/i;var A=0;for(w&&(y&&n!==f?(u.push({value:f}),n0&&u>0&&o(0)}if(a===r){var h=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(h=Math.abs(.05*r)),s(r+h),t||o(a-h)}this.min=a,this.max=r}},{key:"getTickLimit",value:function(){var t,e=this.options.ticks,i=e.maxTicksLimit,n=e.stepSize;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(n," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var t=this.options,e=t.ticks,i=this.getTickLimit(),n=bs({maxTicks:i=Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ae(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}},{key:"configure",value:function(){var t=this.ticks,e=this.min,i=this.max;if(B(s(a.prototype),"configure",this).call(this),this.options.offset&&t.length){var n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}},{key:"getLabelForValue",value:function(t){return Cn(t,this.chart.options.locale,this.options.ticks.format)}}]),a}(),ks=function(i){t(a,_s);var n=Hn(a);function a(){return e(this,a),n.apply(this,arguments)}return r(a,[{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Pt(e)?e:0,this.max=Pt(i)?i:1,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var t=this.isHorizontal(),e=t?this.width:this.height,i=re(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}},{key:"getPixelForValue",value:function(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}]),a}();function ws(t){return 1===t/Math.pow(10,Math.floor(Qt(t)))}ks.id="linear",ks.defaults={ticks:{callback:Da.formatters.numeric}};var Ms=function(i){t(a,za);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t)).start=void 0,i.end=void 0,i._startValue=void 0,i._valueRange=0,i}return r(a,[{key:"parse",value:function(t,e){var i=_s.prototype.parse.apply(this,[t,e]);if(0!==i)return Pt(i)&&i>0?i:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Pt(e)?Math.max(0,e):null,this.max=Pt(i)?Math.max(0,i):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this.getUserBounds(),e=t.minDefined,i=t.maxDefined,n=this.min,a=this.max,r=function(t){return n=e?n:t},o=function(t){return a=i?a:t},s=function(t,e){return Math.pow(10,Math.floor(Qt(t))+e)};n===a&&(n<=0?(r(1),o(10)):(r(s(n,-1)),o(s(a,1)))),n<=0&&r(s(a,-1)),a<=0&&o(s(n,1)),this._zero&&this.min!==this._suggestedMin&&n===s(this.min,0)&&r(s(n,-1)),this.min=n,this.max=a}},{key:"buildTicks",value:function(){var t=this.options,e=function(t,e){var i=Math.floor(Qt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[],r=Dt(t.min,Math.pow(10,Math.floor(Qt(e.min)))),o=Math.floor(Qt(r)),s=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{a.push({value:r,major:ws(r)}),10==++s&&(s=1,l=++o>=0?1:l),r=Math.round(s*Math.pow(10,o)*l)/l}while(oa?{start:e-i,end:e}:{start:e,end:e+i}}function Ds(t){for(var e,i,n,a={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},r=Object.assign({},a),o=[],s=[],l=t._pointLabels.length,u=t.options.pointLabels,h=u.centerPointLabels?Yt/l:0,c=0;ce.r&&(s=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+s)),a.starte.b&&(l=(a.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function As(t){return 0===t||180===t?"center":t<180?"left":"right"}function Cs(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ts(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Rs(t,e,i,n){var a=t.ctx;if(i)a.arc(t.xCenter,t.yCenter,e,0,Ut);else{var r=t.getPointPosition(0,e);a.moveTo(r.x,r.y);for(var o=1;o=0&&t2&&void 0!==arguments[2]?arguments[2]:0,n=this.getIndexAngle(t)-Gt+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(t){var e=this._pointLabelItems[t];return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}},{key:"drawBackground",value:function(){var t=this.options,e=t.backgroundColor,i=t.grid.circular;if(e){var n=this.ctx;n.save(),n.beginPath(),Rs(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}},{key:"drawGrid",value:function(){var t,e,i,n=this,a=this.ctx,r=this.options,o=r.angleLines,s=r.grid,l=this._pointLabels.length;if(r.pointLabels.display&&function(t,e){for(var i=t.ctx,n=t.options.pointLabels,a=e-1;a>=0;a--){var r=n.setContext(t.getPointLabelContext(a)),o=ji(r.font),s=t._pointLabelItems[a],l=s.x,u=s.y,h=s.textAlign,c=s.left,f=s.top,d=s.right,v=s.bottom,g=r.backdropColor;if(!wt(g)){var p=Ni(r.borderRadius),m=Wi(r.backdropPadding);i.fillStyle=g;var y=c-m.left,b=f-m.top,x=d-c+m.width,_=v-f+m.height;Object.values(p).some((function(t){return 0!==t}))?(i.beginPath(),Li(i,{x:y,y:b,w:x,h:_,radius:p}),i.fill()):i.fillRect(y,b,x,_)}Ti(i,t._pointLabels[a],l,u+o.lineHeight/2,o,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,l),s.display&&this.ticks.forEach((function(t,i){if(0!==i){e=n.getDistanceFromCenterForValue(t.value);var a=s.setContext(n.getContext(i-1));!function(t,e,i,n){var a=t.ctx,r=e.circular,o=e.color,s=e.lineWidth;!r&&!n||!o||!s||i<0||(a.save(),a.strokeStyle=o,a.lineWidth=s,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),Rs(t,i,r,n),a.closePath(),a.stroke(),a.restore())}(n,a,e,l)}})),o.display){for(a.save(),t=l-1;t>=0;t--){var u=o.setContext(this.getPointLabelContext(t)),h=u.color,c=u.lineWidth;c&&h&&(a.lineWidth=c,a.strokeStyle=h,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var t=this,e=this.ctx,i=this.options,n=i.ticks;if(n.display){var a,r,o=this.getIndexAngle(0);e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((function(o,s){if(0!==s||i.reverse){var l=n.setContext(t.getContext(s)),u=ji(l.font);if(a=t.getDistanceFromCenterForValue(t.ticks[s].value),l.showLabelBackdrop){e.font=u.string,r=e.measureText(o.label).width,e.fillStyle=l.backdropColor;var h=Wi(l.backdropPadding);e.fillRect(-r/2-h.left,-a-u.size/2-h.top,r+h.width,u.size+h.height)}Ti(e,o.label,0,-a,u,{color:l.color})}})),e.restore()}}},{key:"drawTitle",value:function(){}}]),a}();Es.id="radialLinear",Es.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Da.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(t){return t},padding:5,centerPointLabels:!1}},Es.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Es.descriptors={angleLines:{_fallback:"grid"}};var Ls={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}},Is=Object.keys(Ls);function zs(t,e){return t-e}function Fs(t,e){if(wt(e))return null;var i=t._adapter,n=t._parseOpts,a=n.parser,r=n.round,o=n.isoWeekday,s=e;return"function"==typeof a&&(s=a(s)),Pt(s)||(s="string"==typeof a?i.parse(s,a):i.parse(s)),null===s?null:(r&&(s="week"!==r||!ie(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function Vs(t,e,i,n){for(var a=Is.length,r=Is.indexOf(t);r=e?i[a]:i[r]]=!0}}else t[e]=!0}function Ns(t,e,i){var n,a,r=[],o={},s=e.length;for(n=0;n=0&&(e[r].major=!0);return e}(t,r,o,i):r}var Ws=function(i){t(a,za);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t))._cache={data:[],labels:[],all:[]},i._unit="day",i._majorUnit=void 0,i._offsets={},i._normalized=!1,i._parseOpts=void 0,i}return r(a,[{key:"init",value:function(t,e){var i=t.time||(t.time={}),n=this._adapter=new $a._date(t.adapters.date);n.init(e),Ft(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},B(s(a.prototype),"init",this).call(this,t),this._normalized=e.normalized}},{key:"parse",value:function(t,e){return void 0===t?null:Fs(this,t)}},{key:"beforeLayout",value:function(){B(s(a.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var t=this.options,e=this._adapter,i=t.time.unit||"day",n=this.getUserBounds(),a=n.min,r=n.max,o=n.minDefined,s=n.maxDefined;function l(t){o||isNaN(t.min)||(a=Math.min(a,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),a=Pt(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=Pt(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}},{key:"_getLabelBounds",value:function(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}},{key:"buildTicks",value:function(){var t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);var a=this.min,r=function(t,e,i){for(var n=0,a=t.length;nn&&t[a-1]>i;)a--;return n>0||a=Is.indexOf(i);r--){var o=Is[r];if(Ls[o].common&&t._adapter.diff(a,n,o)>=e-1)return o}return Is[i?Is.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(var e=Is.indexOf(t)+1,i=Is.length;e1e5*l)throw new Error(n+" and "+a+" are too far apart with stepSize of "+l+" "+s);var d="data"===r.ticks.source&&this.getDataTimestamps();for(t=f,e=0;t0?o:1}},{key:"getDataTimestamps",value:function(){var t,e,i=this._cache.data||[];if(i.length)return i;var n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[s].pos&&e<=t[l].pos){var u=pe(t,"pos",e);s=u.lo,l=u.hi}var h=t[s];n=h.pos,r=h.time;var c=t[l];a=c.pos,o=c.time}else{if(e>=t[s].time&&e<=t[l].time){var f=pe(t,"time",e);s=f.lo,l=f.hi}var d=t[s];n=d.time,r=d.pos;var v=t[l];a=v.time,o=v.pos}var g=a-n;return g?r+(o-r)*(e-n)/g:r}Ws.id="time",Ws.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var Hs=function(i){t(a,Ws);var n=Hn(a);function a(t){var i;return e(this,a),(i=n.call(this,t))._table=[],i._minPos=void 0,i._tableRange=void 0,i}return r(a,[{key:"initOffsets",value:function(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=js(e,this.min),this._tableRange=js(e,this.max)-this._minPos,B(s(a.prototype),"initOffsets",this).call(this,t)}},{key:"buildLookupTable",value:function(t){var e,i,n,a,r,o=this.min,s=this.max,l=[],u=[];for(e=0,i=t.length;e=o&&a<=s&&l.push(a);if(l.length<2)return[{time:o,pos:0},{time:s,pos:1}];for(e=0,i=l.length;e=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,n=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw n}}}}function Pe(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t]+)>; rel="deprecation"/),l=u&&u.pop(),r.warn('[@octokit/request] "'.concat(e.method," ").concat(e.url,'" is deprecated. It is scheduled to be removed on ').concat(s.sunset).concat(l?". See ".concat(l):""))),204!==t&&205!==t){n.next=7;break}return n.abrupt("return");case 7:if("HEAD"!==e.method){n.next=11;break}if(!(t<400)){n.next=10;break}return n.abrupt("return");case 10:throw new ye(i.statusText,t,{response:{url:o,status:t,headers:s,data:void 0},request:e});case 11:if(304!==t){n.next=24;break}return n.t0=ye,n.t1=t,n.t2=o,n.t3=t,n.t4=s,n.next=19,Fe(i);case 19:throw n.t5=n.sent,n.t6={url:n.t2,status:n.t3,headers:n.t4,data:n.t5},n.t7=e,n.t8={response:n.t6,request:n.t7},new n.t0("Not modified",n.t1,n.t8);case 24:if(!(t>=400)){n.next=30;break}return n.next=27,Fe(i);case 27:throw d=n.sent,new ye(Re(d),t,{response:{url:o,status:t,headers:s,data:d},request:e});case 30:return n.abrupt("return",Fe(i));case 31:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).then((function(e){return{status:t,url:o,headers:s,data:e}})).catch((function(r){if(r instanceof ye)throw r;throw new ye(r.message,500,{request:e})}))}function Fe(e){return Se.apply(this,arguments)}function Se(){return(Se=S(G.mark((function e(r){var t;return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.headers.get("content-type"),!/application\/json/.test(t)){e.next=3;break}return e.abrupt("return",r.json());case 3:if(t&&!/^text\/|charset=utf-8$/.test(t)){e.next=5;break}return e.abrupt("return",r.text());case 5:return e.abrupt("return",Ae(r));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e){return"string"==typeof e?e:"message"in e?Array.isArray(e.errors)?"".concat(e.message,": ").concat(e.errors.map(JSON.stringify).join(", ")):e.message:"Unknown error: ".concat(JSON.stringify(e))}var Ue=function e(r,t){var o=r.defaults(t);return Object.assign((function(r,t){var s=o.merge(r,t);if(!s.request||!s.request.hook)return Oe(o.parse(s));var n=function(e,r){return Oe(o.parse(o.merge(e,r)))};return Object.assign(n,{endpoint:o,defaults:e.bind(null,o)}),s.request.hook(n,s)}),{endpoint:o,defaults:e.bind(null,o)})}(de,{headers:{"user-agent":"octokit-request.js/".concat("5.6.3"," ").concat(L())}});function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,s=r(e);if(t){var n=r(this).constructor;o=Reflect.construct(s,arguments,n)}else o=s.apply(this,arguments);return p(this,o)}}var Ce=function(e){t(s,e);var r=De(s);function s(e,t,n){var a;return o(this,s),(a=r.call(this,"Request failed due to following response errors:\n"+n.errors.map((function(e){return" - ".concat(e.message)})).join("\n"))).request=e,a.headers=t,a.response=n,a.name="GraphqlResponseError",a.errors=n.errors,a.data=n.data,Error.captureStackTrace&&Error.captureStackTrace(i(a),a.constructor),a}return a(s)}(O(Error)),Le=["method","baseUrl","url","headers","request","query","mediaType"],je=["query","method","url"],Ie=/\/api\/v3\/?$/;function qe(e,r){var t=e.defaults(r);return Object.assign((function(e,r){return function(e,r,t){if(t){if("string"==typeof r&&"query"in t)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(var o in t)if(je.includes(o))return Promise.reject(new Error('[@octokit/graphql] "'.concat(o,'" cannot be used as variable name')))}var s="string"==typeof r?Object.assign({query:r},t):r,n=Object.keys(s).reduce((function(e,r){return Le.includes(r)?(e[r]=s[r],e):(e.variables||(e.variables={}),e.variables[r]=s[r],e)}),{}),i=s.baseUrl||e.endpoint.DEFAULTS.baseUrl;return Ie.test(i)&&(n.url=i.replace(Ie,"/api/graphql")),e(n).then((function(e){if(e.data.errors){for(var r={},t=0,o=Object.keys(e.headers);t0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var s=new J,n={baseUrl:Ue.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},t.request,{hook:s.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=[t.userAgent,"octokit-core.js/".concat("3.6.0"," ").concat(L())].filter(Boolean).join(" "),t.baseUrl&&(n.baseUrl=t.baseUrl),t.previews&&(n.mediaType.previews=t.previews),t.timeZone&&(n.headers["time-zone"]=t.timeZone),this.request=Ue.defaults(n),this.graphql=xe(this.request).defaults(n),this.log=Object.assign({debug:function(){},info:function(){},warn:console.warn.bind(console),error:console.error.bind(console)},t.log),this.hook=s,t.authStrategy){var i=t.authStrategy,a=C(t,$e),c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},t.auth));s.wrap("request",c.hook),this.auth=c}else if(t.auth){var p=Je(t.auth);s.wrap("request",p.hook),this.auth=p}else this.auth=S(G.mark((function e(){return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{type:"unauthenticated"});case 1:case"end":return e.stop()}}),e)})));var u=this.constructor;u.plugins.forEach((function(e){Object.assign(r,e(r,t))}))}return a(e,null,[{key:"defaults",value:function(e){var r=function(r){t(n,r);var s=Ze(n);function n(){var r;o(this,n);var t=(arguments.length<=0?void 0:arguments[0])||{};return"function"==typeof e?(r=s.call(this,e(t)),p(r)):s.call(this,Object.assign({},e,t,t.userAgent&&e.userAgent?{userAgent:"".concat(t.userAgent," ").concat(e.userAgent)}:null))}return a(n)}(this);return r}},{key:"plugin",value:function(){for(var e,r=this.plugins,s=arguments.length,n=new Array(s),i=0;i]+)>;\s*rel="next"/)||[])[1],e.abrupt("return",{value:t});case 11:if(e.prev=11,e.t0=e.catch(2),409===e.t0.status){e.next=15;break}throw e.t0;case 15:return a="",e.abrupt("return",{value:{status:200,headers:{},data:[]}});case 17:case"end":return e.stop()}}),e,null,[[2,11]])})))()}}}))}function or(e,r,t,o){return"function"==typeof t&&(o=t,t=void 0),sr(e,[],tr(e,r,t)[Symbol.asyncIterator](),o)}function sr(e,r,t,o){return t.next().then((function(s){if(s.done)return r;var n=!1;return r=r.concat(o?o(s.value,(function(){n=!0})):s.value.data),n?r:sr(e,r,t,o)}))}function nr(e){return{paginate:Object.assign(or.bind(null,e),{iterator:tr.bind(null,e)})}}function ir(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ar(e){for(var r=1;r-1?window.location.href=h.path+"/rate-limit-exceeded":(window.location.href=h.path+"/error",console.log(e.message))},Tr=function(){var e=S(G.mark((function e(r,t){var o,s,n;return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"undefined"==typeof window){e.next=12;break}if(!("localStorage"in window)){e.next=12;break}if(!(o=localStorage.getItem(r))){e.next=12;break}if(s=JSON.parse(o),!((new Date).getTime()-new Date(s.createdAt||"").getTime()>("localhost"===document.domain?h["status-website"].localhostCacheTime||36e5:h["status-website"].productionCacheTime||12e4))){e.next=10;break}localStorage.removeItem(r),e.next=12;break;case 10:return console.log("Got cached item"),e.abrupt("return",s.data);case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(0);case 16:return console.log("Got here"),e.next=19,t();case 19:return n=e.sent,localStorage.setItem(r,JSON.stringify({data:n,createdAt:new Date})),e.abrupt("return",n);case 22:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(r,t){return e.apply(this,arguments)}}();export{D as L,S as _,Tr as a,$ as b,mr as c,Er as h}; + */function Z(e){return"[object Object]"===Object.prototype.toString.call(e)}function Y(e){var r,t;return!1!==Z(e)&&(void 0===(r=e.constructor)||!1!==Z(t=r.prototype)&&!1!==t.hasOwnProperty("isPrototypeOf"))}function X(e,r){var t=Object.assign({},e);return Object.keys(r).forEach((function(o){Y(r[o])&&o in e?t[o]=X(e[o],r[o]):Object.assign(t,$({},o,r[o]))})),t}function Q(e){for(var r in e)void 0===e[r]&&delete e[r];return e}function ee(e,r,t){if("string"==typeof r){var o=r.split(" "),s=v(o,2),n=s[0],i=s[1];t=Object.assign(i?{method:n,url:i}:{url:n},t)}else t=Object.assign({},r);var a;t.headers=(a=t.headers)?Object.keys(a).reduce((function(e,r){return e[r.toLowerCase()]=a[r],e}),{}):{},Q(t),Q(t.headers);var c=X(e||{},t);return e&&e.mediaType.previews.length&&(c.mediaType.previews=e.mediaType.previews.filter((function(e){return!c.mediaType.previews.includes(e)})).concat(c.mediaType.previews)),c.mediaType.previews=c.mediaType.previews.map((function(e){return e.replace(/-preview/,"")})),c}M.Hook=V,M.Singular=N,M.Collection=J;var re=/\{[^}]+\}/g;function te(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function oe(e,r){return Object.keys(e).filter((function(e){return!r.includes(e)})).reduce((function(r,t){return r[t]=e[t],r}),{})}function se(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function ne(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function ie(e,r,t){return r="+"===e||"#"===e?se(r):ne(r),t?ne(t)+"="+r:r}function ae(e){return null!=e}function ce(e){return";"===e||"&"===e||"?"===e}function pe(e,r){var t=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,s){if(o){var n="",i=[];if(-1!==t.indexOf(o.charAt(0))&&(n=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach((function(e){var t=/([^:\*]*)(?::(\d+)|(\*))?/.exec(e);i.push(function(e,r,t,o){var s=e[t],n=[];if(ae(s)&&""!==s)if("string"==typeof s||"number"==typeof s||"boolean"==typeof s)s=s.toString(),o&&"*"!==o&&(s=s.substring(0,parseInt(o,10))),n.push(ie(r,s,ce(r)?t:""));else if("*"===o)Array.isArray(s)?s.filter(ae).forEach((function(e){n.push(ie(r,e,ce(r)?t:""))})):Object.keys(s).forEach((function(e){ae(s[e])&&n.push(ie(r,s[e],e))}));else{var i=[];Array.isArray(s)?s.filter(ae).forEach((function(e){i.push(ie(r,e))})):Object.keys(s).forEach((function(e){ae(s[e])&&(i.push(ne(e)),i.push(ie(r,s[e].toString())))})),ce(r)?n.push(ne(t)+"="+i.join(",")):0!==i.length&&n.push(i.join(","))}else";"===r?ae(s)&&n.push(ne(t)):""!==s||"&"!==r&&"?"!==r?""===s&&n.push(""):n.push(ne(t)+"=");return n}(r,n,t[1],t[2]||t[3]))})),n&&"+"!==n){var a=",";return"?"===n?a="&":"#"!==n&&(a=n),(0!==i.length?n:"")+i.join(a)}return i.join(",")}return se(s)}))}function ue(e){var r,t,o=e.method.toUpperCase(),s=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},e.headers),i=oe(e,["method","baseUrl","url","headers","request","mediaType"]),a=function(e){var r=e.match(re);return r?r.map(te).reduce((function(e,r){return e.concat(r)}),[]):[]}(s);s=(t=s,{expand:pe.bind(null,t)}).expand(i),/^http/.test(s)||(s=e.baseUrl+s);var c=oe(i,Object.keys(e).filter((function(e){return a.includes(e)})).concat("baseUrl"));if(!/application\/octet-stream/i.test(n.accept)&&(e.mediaType.format&&(n.accept=n.accept.split(/,/).map((function(r){return r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,"application/vnd$1$2.".concat(e.mediaType.format))})).join(",")),e.mediaType.previews.length)){var p=n.accept.match(/[\w-]+(?=-preview)/g)||[];n.accept=p.concat(e.mediaType.previews).map((function(r){var t=e.mediaType.format?".".concat(e.mediaType.format):"+json";return"application/vnd.github.".concat(r,"-preview").concat(t)})).join(",")}return["GET","HEAD"].includes(o)?s=function(e,r){var t=/\?/.test(e)?"&":"?",o=Object.keys(r);return 0===o.length?e:e+t+o.map((function(e){return"q"===e?"q="+r.q.split("+").map(encodeURIComponent).join("+"):"".concat(e,"=").concat(encodeURIComponent(r[e]))})).join("&")}(s,c):"data"in c?r=c.data:Object.keys(c).length?r=c:n["content-length"]=0,n["content-type"]||void 0===r||(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(o)&&void 0===r&&(r=""),Object.assign({method:o,url:s,headers:n},void 0!==r?{body:r}:null,e.request?{request:e.request}:null)}function le(e,r,t){return ue(ee(e,r,t))}var de=function e(r,t){var o=ee(r,t),s=le.bind(null,o);return Object.assign(s,{DEFAULTS:o,defaults:e.bind(null,o),merge:ee.bind(null,o),parse:ue})}(null,{method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":"octokit-endpoint.js/".concat("6.0.12"," ").concat(L())},mediaType:{format:"",previews:[]}}),ge=y((function(e,r){var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();e.exports=r=t.fetch,t.fetch&&(r.default=t.fetch.bind(t)),r.Headers=t.Headers,r.Request=t.Request,r.Response=t.Response}));function me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,s=r(e);if(t){var n=r(this).constructor;o=Reflect.construct(s,arguments,n)}else o=s.apply(this,arguments);return p(this,o)}}var Ee=function(e){t(s,e);var r=me(s);function s(e){var t;return o(this,s),t=r.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(i(t),t.constructor),t.name="Deprecation",t}return a(s)}(O(Error)),Te=function e(r,t){if(r&&t)return e(r)(t);if("function"!=typeof r)throw new TypeError("need wrapper function");return Object.keys(r).forEach((function(e){o[e]=r[e]})),o;function o(){for(var e=new Array(arguments.length),t=0;t=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,n=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw n}}}}function Pe(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t]+)>; rel="deprecation"/),l=u&&u.pop(),r.warn('[@octokit/request] "'.concat(e.method," ").concat(e.url,'" is deprecated. It is scheduled to be removed on ').concat(s.sunset).concat(l?". See ".concat(l):""))),204!==t&&205!==t){n.next=7;break}return n.abrupt("return");case 7:if("HEAD"!==e.method){n.next=11;break}if(!(t<400)){n.next=10;break}return n.abrupt("return");case 10:throw new ye(i.statusText,t,{response:{url:o,status:t,headers:s,data:void 0},request:e});case 11:if(304!==t){n.next=24;break}return n.t0=ye,n.t1=t,n.t2=o,n.t3=t,n.t4=s,n.next=19,Fe(i);case 19:throw n.t5=n.sent,n.t6={url:n.t2,status:n.t3,headers:n.t4,data:n.t5},n.t7=e,n.t8={response:n.t6,request:n.t7},new n.t0("Not modified",n.t1,n.t8);case 24:if(!(t>=400)){n.next=30;break}return n.next=27,Fe(i);case 27:throw d=n.sent,new ye(Re(d),t,{response:{url:o,status:t,headers:s,data:d},request:e});case 30:return n.abrupt("return",Fe(i));case 31:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).then((function(e){return{status:t,url:o,headers:s,data:e}})).catch((function(r){if(r instanceof ye)throw r;throw new ye(r.message,500,{request:e})}))}function Fe(e){return Se.apply(this,arguments)}function Se(){return(Se=S(G.mark((function e(r){var t;return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.headers.get("content-type"),!/application\/json/.test(t)){e.next=3;break}return e.abrupt("return",r.json());case 3:if(t&&!/^text\/|charset=utf-8$/.test(t)){e.next=5;break}return e.abrupt("return",r.text());case 5:return e.abrupt("return",Ae(r));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e){return"string"==typeof e?e:"message"in e?Array.isArray(e.errors)?"".concat(e.message,": ").concat(e.errors.map(JSON.stringify).join(", ")):e.message:"Unknown error: ".concat(JSON.stringify(e))}var Ue=function e(r,t){var o=r.defaults(t);return Object.assign((function(r,t){var s=o.merge(r,t);if(!s.request||!s.request.hook)return Oe(o.parse(s));var n=function(e,r){return Oe(o.parse(o.merge(e,r)))};return Object.assign(n,{endpoint:o,defaults:e.bind(null,o)}),s.request.hook(n,s)}),{endpoint:o,defaults:e.bind(null,o)})}(de,{headers:{"user-agent":"octokit-request.js/".concat("5.6.3"," ").concat(L())}});function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,s=r(e);if(t){var n=r(this).constructor;o=Reflect.construct(s,arguments,n)}else o=s.apply(this,arguments);return p(this,o)}}var Ce=function(e){t(s,e);var r=De(s);function s(e,t,n){var a;return o(this,s),(a=r.call(this,"Request failed due to following response errors:\n"+n.errors.map((function(e){return" - ".concat(e.message)})).join("\n"))).request=e,a.headers=t,a.response=n,a.name="GraphqlResponseError",a.errors=n.errors,a.data=n.data,Error.captureStackTrace&&Error.captureStackTrace(i(a),a.constructor),a}return a(s)}(O(Error)),Le=["method","baseUrl","url","headers","request","query","mediaType"],je=["query","method","url"],Ie=/\/api\/v3\/?$/;function qe(e,r){var t=e.defaults(r);return Object.assign((function(e,r){return function(e,r,t){if(t){if("string"==typeof r&&"query"in t)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(var o in t)if(je.includes(o))return Promise.reject(new Error('[@octokit/graphql] "'.concat(o,'" cannot be used as variable name')))}var s="string"==typeof r?Object.assign({query:r},t):r,n=Object.keys(s).reduce((function(e,r){return Le.includes(r)?(e[r]=s[r],e):(e.variables||(e.variables={}),e.variables[r]=s[r],e)}),{}),i=s.baseUrl||e.endpoint.DEFAULTS.baseUrl;return Ie.test(i)&&(n.url=i.replace(Ie,"/api/graphql")),e(n).then((function(e){if(e.data.errors){for(var r={},t=0,o=Object.keys(e.headers);t0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var s=new J,n={baseUrl:Ue.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},t.request,{hook:s.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=[t.userAgent,"octokit-core.js/".concat(Ye," ").concat(L())].filter(Boolean).join(" "),t.baseUrl&&(n.baseUrl=t.baseUrl),t.previews&&(n.mediaType.previews=t.previews),t.timeZone&&(n.headers["time-zone"]=t.timeZone),this.request=Ue.defaults(n),this.graphql=xe(this.request).defaults(n),this.log=Object.assign({debug:function(){},info:function(){},warn:console.warn.bind(console),error:console.error.bind(console)},t.log),this.hook=s,t.authStrategy){var i=t.authStrategy,a=C(t,$e),c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},t.auth));s.wrap("request",c.hook),this.auth=c}else if(t.auth){var p=Je(t.auth);s.wrap("request",p.hook),this.auth=p}else this.auth=S(G.mark((function e(){return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{type:"unauthenticated"});case 1:case"end":return e.stop()}}),e)})));var u=this.constructor;u.plugins.forEach((function(e){Object.assign(r,e(r,t))}))}return a(e,null,[{key:"defaults",value:function(e){var r=function(r){t(n,r);var s=Ze(n);function n(){var r;o(this,n);var t=(arguments.length<=0?void 0:arguments[0])||{};return"function"==typeof e?(r=s.call(this,e(t)),p(r)):s.call(this,Object.assign({},e,t,t.userAgent&&e.userAgent?{userAgent:"".concat(t.userAgent," ").concat(e.userAgent)}:null))}return a(n)}(this);return r}},{key:"plugin",value:function(){for(var e,r=this.plugins,s=arguments.length,n=new Array(s),i=0;i]+)>;\s*rel="next"/)||[])[1],e.abrupt("return",{value:t});case 11:if(e.prev=11,e.t0=e.catch(2),409===e.t0.status){e.next=15;break}throw e.t0;case 15:return a="",e.abrupt("return",{value:{status:200,headers:{},data:[]}});case 17:case"end":return e.stop()}}),e,null,[[2,11]])})))()}}}))}function sr(e,r,t,o){return"function"==typeof t&&(o=t,t=void 0),nr(e,[],or(e,r,t)[Symbol.asyncIterator](),o)}function nr(e,r,t,o){return t.next().then((function(s){if(s.done)return r;var n=!1;return r=r.concat(o?o(s.value,(function(){n=!0})):s.value.data),n?r:nr(e,r,t,o)}))}function ir(e){return{paginate:Object.assign(sr.bind(null,e),{iterator:or.bind(null,e)})}}function ar(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function cr(e){for(var r=1;r-1?window.location.href=h.path+"/rate-limit-exceeded":(window.location.href=h.path+"/error",console.log(e.message))},hr=function(){var e=S(G.mark((function e(r,t){var o,s,n;return G.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"undefined"==typeof window){e.next=12;break}if(!("localStorage"in window)){e.next=12;break}if(!(o=localStorage.getItem(r))){e.next=12;break}if(s=JSON.parse(o),!((new Date).getTime()-new Date(s.createdAt||"").getTime()>("localhost"===document.domain?h["status-website"].localhostCacheTime||36e5:h["status-website"].productionCacheTime||12e4))){e.next=10;break}localStorage.removeItem(r),e.next=12;break;case 10:return console.log("Got cached item"),e.abrupt("return",s.data);case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(0);case 16:return console.log("Got here"),e.next=19,t();case 19:return n=e.sent,localStorage.setItem(r,JSON.stringify({data:n,createdAt:new Date})),e.abrupt("return",n);case 22:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(r,t){return e.apply(this,arguments)}}();export{D as L,S as _,hr as a,$ as b,Er as c,Tr as h};