UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)

7 lines 183 kB
(("undefined"!==typeof self?self:this)["webpackJsonpchart"]=("undefined"!==typeof self?self:this)["webpackJsonpchart"]||[]).push([[1],{d549:function(t,e,i){"use strict";i.r(e);const n=function(){return"undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame}();function o(t,e,i){const o=i||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...i){a=o(i),s||(s=!0,n.call(window,()=>{s=!1,t.apply(e,a)}))}}function s(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const a=t=>"start"===t?"left":"end"===t?"right":"center",r=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,l=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;function c(){}const h=function(){let t=0;return function(){return t++}}();function d(t){return null===t||"undefined"===typeof t}function u(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function f(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const g=t=>("number"===typeof t||t instanceof Number)&&isFinite(+t);function p(t,e){return g(t)?t:e}function m(t,e){return"undefined"===typeof t?e:t}const x=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,b=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function _(t,e,i){if(t&&"function"===typeof t.call)return t.apply(i,e)}function y(t,e,i,n){let o,s,a;if(u(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(f(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function v(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function w(t){if(u(t))return t.map(w);if(f(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=w(t[i[o]]);return e}return t}function M(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function k(t,e,i,n){if(!M(t))return;const o=e[t],s=i[t];f(o)&&f(s)?S(o,s,n):e[t]=w(s)}function S(t,e,i){const n=u(e)?e:[e],o=n.length;if(!f(t))return t;i=i||{};const s=i.merger||k;for(let a=0;a<o;++a){if(e=n[a],!f(e))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function P(t,e){return S(t,e,{merger:D})}function D(t,e,i){if(!M(t))return;const n=e[t],o=i[t];f(n)&&f(o)?P(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=w(o))}const C="",O=".";function T(t,e){const i=t.indexOf(O,e);return-1===i?t.length:i}function A(t,e){if(e===C)return t;let i=0,n=T(e,i);while(t&&n>i)t=t[e.substr(i,n-i)],i=n+1,n=T(e,i);return t}function L(t){return t.charAt(0).toUpperCase()+t.slice(1)}const R=t=>"undefined"!==typeof t,E=t=>"function"===typeof t,z=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},I=Math.PI,F=2*I,V=F+I,B=Number.POSITIVE_INFINITY,W=I/180,H=I/2,N=I/4,j=2*I/3,$=Math.log10,Y=Math.sign;function U(t){const e=Math.pow(10,Math.floor($(t))),i=t/e,n=i<=1?1:i<=2?2:i<=5?5:10;return n*e}function X(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function q(t){return!isNaN(parseFloat(t))&&isFinite(t)}function K(t,e,i){return Math.abs(t-e)<i}function Z(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function G(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function J(t){return t*(I/180)}function Q(t){return t*(180/I)}function tt(t){if(!g(t))return;let e=1,i=0;while(Math.round(t*e)/e!==t)e*=10,i++;return i}function et(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*I&&(s+=F),{angle:s,distance:o}}function it(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function nt(t,e){return(t-e+V)%F-I}function ot(t){return(t%F+F)%F}function st(t,e,i,n){const o=ot(t),s=ot(e),a=ot(i),r=ot(s-o),l=ot(a-o),c=ot(o-s),h=ot(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function at(t,e,i){return Math.max(e,Math.min(i,t))}function rt(t){return at(t,-32768,32767)}const lt=t=>0===t||1===t,ct=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*F/i),ht=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*F/i)+1,dt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*H),easeOutSine:t=>Math.sin(t*H),easeInOutSine:t=>-.5*(Math.cos(I*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>lt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>lt(t)?t:ct(t,.075,.3),easeOutElastic:t=>lt(t)?t:ht(t,.075,.3),easeInOutElastic(t){const e=.1125,i=.45;return lt(t)?t:t<.5?.5*ct(2*t,e,i):.5+.5*ht(2*t-1,e,i)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-dt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*dt.easeInBounce(2*t):.5*dt.easeOutBounce(2*t-1)+.5},ut={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},ft="0123456789ABCDEF",gt=t=>ft[15&t],pt=t=>ft[(240&t)>>4]+ft[15&t],mt=t=>(240&t)>>4===(15&t);function xt(t){return mt(t.r)&&mt(t.g)&&mt(t.b)&&mt(t.a)}function bt(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*ut[t[1]],g:255&17*ut[t[2]],b:255&17*ut[t[3]],a:5===i?17*ut[t[4]]:255}:7!==i&&9!==i||(e={r:ut[t[1]]<<4|ut[t[2]],g:ut[t[3]]<<4|ut[t[4]],b:ut[t[5]]<<4|ut[t[6]],a:9===i?ut[t[7]]<<4|ut[t[8]]:255})),e}function _t(t){var e=xt(t)?gt:pt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function yt(t){return t+.5|0}const vt=(t,e,i)=>Math.max(Math.min(t,i),e);function wt(t){return vt(yt(2.55*t),0,255)}function Mt(t){return vt(yt(255*t),0,255)}function kt(t){return vt(yt(t/2.55)/100,0,1)}function St(t){return vt(yt(100*t),0,100)}const Pt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Dt(t){const e=Pt.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?wt(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?wt(i):i),n=255&(e[4]?wt(n):n),o=255&(e[6]?wt(o):o),{r:i,g:n,b:o,a:s}}}function Ct(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${kt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Ot=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Tt(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function At(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Lt(t,e,i){const n=Tt(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function Rt(t){const e=255,i=t.r/e,n=t.g/e,o=t.b/e,s=Math.max(i,n,o),a=Math.min(i,n,o),r=(s+a)/2;let l,c,h;return s!==a&&(h=s-a,c=r>.5?h/(2-s-a):h/(s+a),l=s===i?(n-o)/h+(n<o?6:0):s===n?(o-i)/h+2:(i-n)/h+4,l=60*l+.5),[0|l,c||0,r]}function Et(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(Mt)}function zt(t,e,i){return Et(Tt,t,e,i)}function It(t,e,i){return Et(Lt,t,e,i)}function Ft(t,e,i){return Et(At,t,e,i)}function Vt(t){return(t%360+360)%360}function Bt(t){const e=Ot.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?wt(+e[5]):Mt(+e[5]));const o=Vt(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?It(o,s,a):"hsv"===e[1]?Ft(o,s,a):zt(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}function Wt(t,e){var i=Rt(t);i[0]=Vt(i[0]+e),i=zt(i),t.r=i[0],t.g=i[1],t.b=i[2]}function Ht(t){if(!t)return;const e=Rt(t),i=e[0],n=St(e[1]),o=St(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${kt(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}const Nt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},jt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $t(){const t={},e=Object.keys(jt),i=Object.keys(Nt);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,Nt[s]);s=parseInt(jt[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}let Yt;function Ut(t){Yt||(Yt=$t(),Yt.transparent=[0,0,0,0]);const e=Yt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Xt(t,e,i){if(t){let n=Rt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=zt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function qt(t,e){return t?Object.assign(e||{},t):t}function Kt(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=Mt(t[3]))):(e=qt(t,{r:0,g:0,b:0,a:1}),e.a=Mt(e.a)),e}function Zt(t){return"r"===t.charAt(0)?Dt(t):Bt(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;"object"===e?i=Kt(t):"string"===e&&(i=bt(t)||Ut(t)||Zt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=qt(this._rgb);return t&&(t.a=kt(t.a)),t}set rgb(t){this._rgb=Kt(t)}rgbString(){return this._valid?Ct(this._rgb):this._rgb}hexString(){return this._valid?_t(this._rgb):this._rgb}hslString(){return this._valid?Ht(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=Mt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=yt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Xt(this._rgb,2,t),this}darken(t){return Xt(this._rgb,2,-t),this}saturate(t){return Xt(this._rgb,1,t),this}desaturate(t){return Xt(this._rgb,1,-t),this}rotate(t){return Wt(this._rgb,t),this}}function Jt(t){return new Gt(t)}const Qt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function te(t){return Qt(t)?t:Jt(t)}function ee(t){return Qt(t)?t:Jt(t).saturate(.5).darken(.1).hexString()}const ie=Object.create(null),ne=Object.create(null);function oe(t,e){if(!e)return t;const i=e.split(".");for(let n=0,o=i.length;n<o;++n){const e=i[n];t=t[e]||(t[e]=Object.create(null))}return t}function se(t,e,i){return"string"===typeof e?S(oe(t,e),i):S(oe(t,""),e)}class ae{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ee(e.backgroundColor),this.hoverBorderColor=(t,e)=>ee(e.borderColor),this.hoverColor=(t,e)=>ee(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return se(this,t,e)}get(t){return oe(this,t)}describe(t,e){return se(ne,t,e)}override(t,e){return se(ie,t,e)}route(t,e,i,n){const o=oe(this,t),s=oe(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return f(t)?Object.assign({},e,t):m(t,e)},set(t){this[a]=t}}})}}var re=new ae({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function le(t){return!t||d(t.size)||d(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ce(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function he(t,e,i,n){n=n||{};let o=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,f;for(l=0;l<r;l++)if(d=i[l],void 0!==d&&null!==d&&!0!==u(d))a=ce(t,o,s,a,d);else if(u(d))for(c=0,h=d.length;c<h;c++)f=d[c],void 0===f||null===f||u(f)||(a=ce(t,o,s,a,f));t.restore();const g=s.length/2;if(g>i.length){for(l=0;l<g;l++)delete o[s[l]];s.splice(0,g)}return a}function de(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function ue(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function fe(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*W;if(c&&"object"===typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,F),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=j,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=j,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+N)*r,a=Math.sin(u+N)*r,t.arc(i-s,n-a,l,u-I,u-H),t.arc(i+a,n-s,l,u-H,u),t.arc(i+s,n+a,l,u,u+H),t.arc(i-a,n+s,l,u+H,u+I),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=N;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=N;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=N,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d);break}t.fill(),e.borderWidth>0&&t.stroke()}}function ge(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function pe(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function me(t){t.restore()}function xe(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!==!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function be(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function _e(t,e,i,n,o,s={}){const a=u(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),s.translation&&t.translate(s.translation[0],s.translation[1]),d(s.rotation)||t.rotate(s.rotation),t.font=o.string,s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),l=0;l<a.length;++l){if(c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),d(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),s.strikethrough||s.underline){const e=t.measureText(c),o=i-e.actualBoundingBoxLeft,a=i+e.actualBoundingBoxRight,r=n-e.actualBoundingBoxAscent,l=n+e.actualBoundingBoxDescent,h=s.strikethrough?(r+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}n+=o.lineHeight}t.restore()}function ye(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-H,I,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,I,H,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,H,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-H,!0),t.lineTo(i+a.topLeft,n)}const ve=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),we=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Me(t,e){const i=(""+t).match(ve);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100;break}return e*t}const ke=t=>+t||0;function Se(t,e){const i={},n=f(e),o=n?Object.keys(e):e,s=f(t)?n?i=>m(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of o)i[a]=ke(s(a));return i}function Pe(t){return Se(t,{top:"y",right:"x",bottom:"y",left:"x"})}function De(t){return Se(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ce(t){const e=Pe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Oe(t,e){t=t||{},e=e||re.font;let i=m(t.size,e.size);"string"===typeof i&&(i=parseInt(i,10));let n=m(t.style,e.style);n&&!(""+n).match(we)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:m(t.family,e.family),lineHeight:Me(m(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:m(t.weight,e.weight),string:""};return o.string=le(o),o}function Te(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"===typeof a&&(a=a(e),r=!1),void 0!==i&&u(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ae(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(b(e,i)),max:n+b(e,n)}}function Le(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;while(o-s>1)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const Re=(t,e,i)=>Le(t,i,n=>t[n][e]<i),Ee=(t,e,i)=>Le(t,i,n=>t[n][e]>=i);function ze(t,e,i){let n=0,o=t.length;while(n<o&&t[n]<e)n++;while(o>n&&t[o-1]>i)o--;return n>0||o<t.length?t.slice(n,o):t}const Ie=["push","pop","shift","splice","unshift"];function Fe(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Ie.forEach(e=>{const i="_onData"+L(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"===typeof t[i]&&t[i](...e)}),o}})}))}function Ve(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(Ie.forEach(e=>{delete t[e]}),delete t._chartjs)}function Be(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);if(e.size===n)return t;const o=[];return e.forEach(t=>{o.push(t)}),o}function We(t,e=[""],i=t,n,o=(()=>t[0])){R(n)||(n=ii("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>We([o,...t],e,i,n)};return new Proxy(s,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,n){return Ye(i,n,()=>ei(n,e,t,i))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return ni(t).includes(e)},ownKeys(t){return ni(t)},set(t,e,i){const n=t._storage||(t._storage=o());return n[e]=i,delete t[e],delete t._keys,!0}})}function He(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ne(t,n),setContext:e=>He(t,e,i,n),override:o=>He(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return Ye(t,e,()=>Ue(t,e,i))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,n){return t[i]=n,delete e[i],!0}})}function Ne(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:E(i)?i:()=>i,isIndexable:E(n)?n:()=>n}}const je=(t,e)=>t?t+L(e):e,$e=(t,e)=>f(e)&&"adapters"!==t;function Ye(t,e,i){let n=t[e];return R(n)||(n=i(),R(n)&&(t[e]=n)),n}function Ue(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];return E(r)&&a.isScriptable(e)&&(r=Xe(e,r,t,i)),u(r)&&r.length&&(r=qe(e,r,t,a.isIndexable)),$e(e,r)&&(r=He(r,o,s&&s[e],a)),r}function Xe(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);return r.add(t),e=e(s,a||n),r.delete(t),f(e)&&(e=Je(o._scopes,o,t,e)),e}function qe(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(R(s.index)&&n(t))e=e[s.index%e.length];else if(f(e[0])){const i=e,n=o._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Je(n,o,t,l);e.push(He(i,s,a&&a[t],r))}}return e}function Ke(t,e,i){return E(t)?t(e,i):t}const Ze=(t,e)=>!0===t?e:"string"===typeof t?A(e,t):void 0;function Ge(t,e,i,n){for(const o of e){const e=Ze(i,o);if(e){t.add(e);const o=Ke(e._fallback,i,e);if(R(o)&&o!==i&&o!==n)return o}else if(!1===e&&R(n)&&i!==n)return null}return!1}function Je(t,e,i,n){const o=e._rootScopes,s=Ke(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=Qe(r,a,i,s||i);return null!==l&&((!R(s)||s===i||(l=Qe(r,a,s,l),null!==l))&&We([...r],[""],o,s,()=>ti(e,i,n)))}function Qe(t,e,i,n){while(i)i=Ge(t,e,i,n);return i}function ti(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return u(o)&&f(i)?i:o}function ei(t,e,i,n){let o;for(const s of e)if(o=ii(je(s,t),i),R(o))return $e(t,o)?Je(i,n,t,o):o}function ii(t,e){for(const i of e){if(!i)continue;const e=i[t];if(R(e))return e}}function ni(t){let e=t._keys;return e||(e=t._keys=oi(t._scopes)),e}function oi(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return[...e]}const si=Number.EPSILON||1e-14,ai=(t,e)=>e<t.length&&!t[e].skip&&t[e],ri=t=>"x"===t?"y":"x";function li(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=it(s,o),l=it(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function ci(t,e,i){const n=t.length;let o,s,a,r,l,c=ai(t,0);for(let h=0;h<n-1;++h)l=c,c=ai(t,h+1),l&&c&&(K(e[h],0,si)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}function hi(t,e,i="x"){const n=ri(i),o=t.length;let s,a,r,l=ai(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=ai(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r["cp1"+i]=o-s,r["cp1"+n]=h-s*e[c]),l&&(s=(l[i]-o)/3,r["cp2"+i]=o+s,r["cp2"+n]=h+s*e[c])}}function di(t,e="x"){const i=ri(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=ai(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=ai(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Y(o[a-1])!==Y(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}ci(t,o,s),hi(t,s,e)}function ui(t,e,i){return Math.max(Math.min(t,i),e)}function fi(t,e){let i,n,o,s,a,r=ge(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&ge(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=ui(o.cp1x,e.left,e.right),o.cp1y=ui(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=ui(o.cp2x,e.left,e.right),o.cp2y=ui(o.cp2y,e.top,e.bottom)))}function gi(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)di(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=li(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&fi(t,i)}function pi(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function mi(t,e,i){let n;return"string"===typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const xi=t=>window.getComputedStyle(t,null);function bi(t,e){return xi(t).getPropertyValue(e)}const _i=["top","right","bottom","left"];function yi(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=_i[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const vi=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function wi(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(vi(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}function Mi(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=xi(i),s="border-box"===o.boxSizing,a=yi(o,"padding"),r=yi(o,"border","width"),{x:l,y:c,box:h}=wi(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}function ki(t,e,i){let n,o;if(void 0===e||void 0===i){const s=pi(t);if(s){const t=s.getBoundingClientRect(),a=xi(s),r=yi(a,"border","width"),l=yi(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=mi(a.maxWidth,s,"clientWidth"),o=mi(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||B,maxHeight:o||B}}const Si=t=>Math.round(10*t)/10;function Pi(t,e,i,n){const o=xi(t),s=yi(o,"margin"),a=mi(o.maxWidth,t,"clientWidth")||B,r=mi(o.maxHeight,t,"clientHeight")||B,l=ki(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=yi(o,"border","width"),e=yi(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=Si(Math.min(c,a,l.maxWidth)),h=Si(Math.min(h,r,l.maxHeight)),c&&!h&&(h=Si(c/2)),{width:c,height:h}}function Di(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=t.height+"px",a.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ci=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function Oi(t,e){const i=bi(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ti(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ai(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 Li(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Ti(t,o,i),r=Ti(o,s,i),l=Ti(s,e,i),c=Ti(a,r,i),h=Ti(r,l,i);return Ti(c,h,i)}const Ri=new Map;function Ei(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ri.get(i);return n||(n=new Intl.NumberFormat(t,e),Ri.set(i,n)),n}function zi(t,e,i){return Ei(e,i).format(t)}const Ii=function(t,e){return{x(i){return t+t+e-i},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},Fi=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Vi(t,e,i){return t?Ii(e,i):Fi()}function Bi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Wi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Hi(t){return"angle"===t?{between:st,compare:nt,normalize:ot}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Ni({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i===0,style:o}}function ji(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Hi(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h;++c){if(!a(r(e[d%l][n]),o,s))break;d--,u--}d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}function $i(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=Hi(n),{start:h,end:d,loop:u,style:f}=ji(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>l(o,x,p)&&0!==r(o,x),v=()=>0===r(s,p)||l(s,x,p),w=()=>b||y(),M=()=>!b||v();for(let k=h,S=h;k<=d;++k)m=e[k%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&w()&&(_=0===r(p,o)?k:S),null!==_&&M()&&(g.push(Ni({start:_,end:k,loop:u,count:a,style:f})),_=null),S=k,x=p));return null!==_&&g.push(Ni({start:_,end:d,loop:u,count:a,style:f})),g}function Yi(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=$i(n[o],t.points,e);s.length&&i.push(...s)}return i}function Ui(t,e,i,n){let o=0,s=e-1;if(i&&!n)while(o<e&&!t[o].skip)o++;while(o<e&&t[o].skip)o++;o%=e,i&&(s+=o);while(s>o&&t[s%e].skip)s--;return s%=e,{start:o,end:s}}function Xi(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}function qi(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=Ui(i,o,s,n);if(!0===n)return Ki([{start:a,end:r,loop:s}],i,e);const l=r<a?r+o:r,c=!!t._fullLoop&&0===a&&r===o-1;return Ki(Xi(i,a,l,c),i,e)}function Ki(t,e,i){return i&&i.setContext&&e?Zi(t,e,i):t}function Zi(t,e,i){const n=e.length,o=[];let s=t[0].start,a=s;for(const r of t){let t,l,c=e[s%n];for(a=s+1;a<=r.end;a++){const h=e[a%n];l=Gi(i.setContext({type:"segment",p0:c,p1:h})),Ji(l,t)&&(o.push({start:s,end:a-1,loop:r.loop,style:t}),t=l,s=a-1),c=h,t=l}s<a-1&&(o.push({start:s,end:a-1,loop:r.loop,style:l}),s=a-1)}return o}function Gi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ji(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)} /*! * Chart.js v3.3.2 * https://www.chartjs.org * (c) 2021 Chart.js Contributors * Released under the MIT License */class Qi{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach(n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){const t=this;t._request||(t._running=!0,t._request=n.call(window,()=>{t._update(),t._request=null,t._running&&t._refresh()}))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length}),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var tn=new Qi;const en="transparent",nn={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const n=te(t||en),o=n.valid&&te(e||en);return o&&o.valid?o.mix(n,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class on{constructor(t,e,i,n){const o=e[i];n=Te([t.to,n,o,t.from]);const s=Te([t.from,o,n]);this._active=!0,this._fn=t.fn||nn[t.type||typeof s],this._easing=dt[t.easing]||dt.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=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Te([t.to,e,o,t.from]),n._from=Te([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}}const sn=["x","y","borderWidth","radius","tension"],an=["color","borderColor","backgroundColor"];re.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const rn=Object.keys(re.animation);re.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),re.set("animations",{colors:{type:"color",properties:an},numbers:{type:"number",properties:sn}}),re.describe("animations",{_fallback:"animation"}),re.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 ln{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!f(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!f(n))return;const o={};for(const t of rn)o[t]=n[t];(u(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,o)})})}_animateOptions(t,e){const i=e.options,n=hn(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&cn(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new on(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(tn.add(this._chart,i),!0):void 0}}function cn(t,e){const i=[],n=Object.keys(e);for(let o=0;o<n.length;o++){const e=t[n[o]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}function hn(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}function dn(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function un(t,e,i){if(!1===i)return!1;const n=dn(t,i),o=dn(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}function fn(t){let e,i,n,o;return f(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o}}function gn(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function pn(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],g(c)&&(s||0===e||Y(e)===Y(c))&&(e+=c)}return e}}function mn(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}function xn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function bn(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}function _n(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}function yn(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function vn(t,e,i){for(const n of e.getMatchingVisibleMetas("bar").reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function wn(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=bn(s,a,n),d=e.length;let u;for(let f=0;f<d;++f){const t=e[f],{[l]:i,[c]:n}=t,s=t._stacks||(t._stacks={});u=s[c]=yn(o,h,i),u[r]=n,u._top=vn(u,a,!0),u._bottom=vn(u,a,!1)}}function Mn(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function kn(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Sn(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function Pn(t,e){const i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const n of e){const e=n._stacks;if(!e||void 0===e[i]||void 0===e[i][t.index])return;delete e[i][t.index]}}}const Dn=t=>"reset"===t||"none"===t,Cn=(t,e)=>e?t:Object.assign({},t);class On{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.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=xn(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&Pn(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=m(n.xAxisID,Mn(e,"x")),a=i.yAxisID=m(n.yAxisID,Mn(e,"y")),r=i.rAxisID=m(n.rAxisID,Mn(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.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&&Ve(this._data,this),t._stacked&&Pn(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(f(i))t._data=mn(i);else if(n!==i){if(n){Ve(n,t);const e=t._cachedMeta;Pn(e),e._parsed=[]}i&&Object.isExtensible(i)&&Fe(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=xn(i.vScale,i),i.stack!==n.stack&&(o=!0,Pn(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&wn(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,g=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=u(o[t])?i.parseArrayData(n,o,t,e):f(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||g&&c[r]<g[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),g=c);n._sorted=d}a&&wn(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(A(u,a),d),y:s.parse(A(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis],a={keys:gn(n,!0),values:e._stacks[t.axis]};return pn(a,s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=pn(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:gn(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=_n(r);let u,f,p,m;function x(){return p=o[u],f=p[t.axis],m=p[r.axis],!g(f)||h>m||d<m}for(u=0;u<a;++u)if(!x()&&(i.updateRangeFromParsed(c,t,p,l),s))break;if(s)for(u=a-1;u>=0;--u)if(!x()){i.updateRangeFromParsed(c,t,p,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],g(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this,i=e._cachedMeta,n=i.iScale,o=i.vScale,s=e.getParsed(t);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:o?""+o.getLabelForValue(s[o.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=fn(m(e.options.clip,un(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.active?a.push(t):t.draw(e,s)}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=Sn(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=kn(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&R(i);if(r)return Cn(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[t+"Hover","hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(re.elements[t]),g=()=>n.getContext(i,o),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,s[a]=Object.freeze(Cn(p,l))),p}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a="animation-"+e,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new ln(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Dn(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Dn(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Dn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._data,n=e._cachedMeta.data;for(const[r,l,c]of e._syncList)e[r](l,c);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this,n=i._cachedMeta;if(i._parsing){const i=n._parsed.splice(t,e);n._stacked&&Pn(n,i)}n.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}function Tn(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=Be(i.sort((t,e)=>t-e))}return t._cache.$bar}function An(t){const e=Tn(t);let i,n,o,s,a=t._length;const r=()=>{32767!==o&&-32768!==o&&(R(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(s=void 0,i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function Ln(t,e,i,n){const o=i.barThickness;let s,a;return d(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}function Rn(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l,h=Math.abs(r-a)/2*l;return{chunk:h/n,ratio:i.barPercentage,start:c}}function En(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c