UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

1 lines • 191 kB
function e(){}var t=function(){let e=0;return function(){return e++}}();function n(e){return e==null}function r(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function i(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}var a=e=>(typeof e==`number`||e instanceof Number)&&isFinite(+e);function o(e,t){return a(e)?e:t}function s(e,t){return e===void 0?t:e}var c=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:e/t,l=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function u(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function d(e,t,n,a){let o,s,c;if(r(e))if(s=e.length,a)for(o=s-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<s;o++)t.call(n,e[o],o);else if(i(e))for(c=Object.keys(e),s=c.length,o=0;o<s;o++)t.call(n,e[c[o]],c[o])}function f(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function p(e){if(r(e))return e.map(p);if(i(e)){let t=Object.create(null),n=Object.keys(e),r=n.length,i=0;for(;i<r;++i)t[n[i]]=p(e[n[i]]);return t}return e}function m(e){return[`__proto__`,`prototype`,`constructor`].indexOf(e)===-1}function h(e,t,n,r){if(!m(e))return;let a=t[e],o=n[e];i(a)&&i(o)?g(a,o,r):t[e]=p(o)}function g(e,t,n){let a=r(t)?t:[t],o=a.length;if(!i(e))return e;n||={};let s=n.merger||h;for(let r=0;r<o;++r){if(t=a[r],!i(t))continue;let o=Object.keys(t);for(let r=0,i=o.length;r<i;++r)s(o[r],e,t,n)}return e}function _(e,t){return g(e,t,{merger:v})}function v(e,t,n){if(!m(e))return;let r=t[e],a=n[e];i(r)&&i(a)?_(r,a):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=p(a))}var y={"":e=>e,x:e=>e.x,y:e=>e.y};function b(e,t){return(y[t]||(y[t]=x(t)))(e)}function x(e){let t=S(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function S(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function C(e){return e.charAt(0).toUpperCase()+e.slice(1)}var w=e=>e!==void 0,T=e=>typeof e==`function`,E=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function D(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var O=Math.PI,k=2*O,ee=k+O,A=1/0,te=O/180,j=O/2,ne=O/4,re=O*2/3,M=Math.log10,N=Math.sign;function ie(e){let t=Math.round(e);e=se(e,t,e/1e3)?t:e;let n=10**Math.floor(M(e)),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ae(e){let t=[],n=Math.sqrt(e),r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((e,t)=>e-t).pop(),t}function oe(e){return!isNaN(parseFloat(e))&&isFinite(e)}function se(e,t,n){return Math.abs(e-t)<n}function ce(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function le(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function P(e){return O/180*e}function ue(e){return 180/O*e}function de(e){if(!a(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function fe(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*O&&(a+=k),{angle:a,distance:i}}function pe(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function me(e,t){return(e-t+ee)%k-O}function F(e){return(e%k+k)%k}function he(e,t,n,r){let i=F(e),a=F(t),o=F(n),s=F(a-i),c=F(o-i),l=F(i-a),u=F(i-o);return i===a||i===o||r&&a===o||s>c&&l<u}function I(e,t,n){return Math.max(t,Math.min(n,e))}function ge(e){return I(e,-32768,32767)}function L(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function _e(e,t,n){n||=(n=>e[n]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var ve=(e,t,n,r)=>_e(e,n,r?r=>e[r][t]<=n:r=>e[r][t]<n),ye=(e,t,n)=>_e(e,n,r=>e[r][t]>=n);function be(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}var xe=[`push`,`pop`,`shift`,`splice`,`unshift`];function Se(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,`_chartjs`,{configurable:!0,enumerable:!1,value:{listeners:[t]}}),xe.forEach(t=>{let n=`_onData`+C(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function Ce(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(xe.forEach(t=>{delete e[t]}),delete e._chartjs)}function we(e){let t=new Set,n,r;for(n=0,r=e.length;n<r;++n)t.add(e[n]);return t.size===r?e:Array.from(t)}var Te=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Ee(e,t,n){let r=n||(e=>Array.prototype.slice.call(e)),i=!1,a=[];return function(...n){a=r(n),i||(i=!0,Te.call(window,()=>{i=!1,e.apply(t,a)}))}}function De(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var Oe=e=>e===`start`?`left`:e===`end`?`right`:`center`,R=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,ke=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function Ae(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,_parsed:s}=e,c=o.axis,{min:l,max:u,minDefined:d,maxDefined:f}=o.getUserBounds();d&&(i=I(Math.min(ve(s,o.axis,l).lo,n?r:ve(t,c,o.getPixelForValue(l)).lo),0,r-1)),a=f?I(Math.max(ve(s,o.axis,u,!0).hi+1,n?0:ve(t,c,o.getPixelForValue(u),!0).hi+1),i,r)-i:r-i}return{start:i,count:a}}function je(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Me=e=>e===0||e===1,Ne=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*k/n)),Pe=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*k/n)+1,Fe={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*j)+1,easeOutSine:e=>Math.sin(e*j),easeInOutSine:e=>-.5*(Math.cos(O*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Me(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Me(e)?e:Ne(e,.075,.3),easeOutElastic:e=>Me(e)?e:Pe(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Me(e)?e:e<.5?.5*Ne(e*2,t,n):.5+.5*Pe(e*2-1,t,n)},easeInBack(e){let t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){let t=1.70158;return--e*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Fe.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?Fe.easeInBounce(e*2)*.5:Fe.easeOutBounce(e*2-1)*.5+.5};function Ie(e){return e+.5|0}var z=(e,t,n)=>Math.max(Math.min(e,n),t);function Le(e){return z(Ie(e*2.55),0,255)}function Re(e){return z(Ie(e*255),0,255)}function B(e){return z(Ie(e/2.55)/100,0,1)}function ze(e){return z(Ie(e*100),0,100)}var V={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},Be=[...`0123456789ABCDEF`],Ve=e=>Be[e&15],He=e=>Be[(e&240)>>4]+Be[e&15],Ue=e=>(e&240)>>4==(e&15),We=e=>Ue(e.r)&&Ue(e.g)&&Ue(e.b)&&Ue(e.a);function Ge(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&V[e[1]]*17,g:255&V[e[2]]*17,b:255&V[e[3]]*17,a:t===5?V[e[4]]*17:255}:(t===7||t===9)&&(n={r:V[e[1]]<<4|V[e[2]],g:V[e[3]]<<4|V[e[4]],b:V[e[5]]<<4|V[e[6]],a:t===9?V[e[7]]<<4|V[e[8]]:255})),n}var Ke=(e,t)=>e<255?t(e):``;function qe(e){var t=We(e)?Ve:He;return e?`#`+t(e.r)+t(e.g)+t(e.b)+Ke(e.a,t):void 0}var Je=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ye(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function Xe(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function Ze(e,t,n){let r=Ye(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Qe(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function $e(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s,c,l;return i!==a&&(l=i-a,c=o>.5?l/(2-i-a):l/(i+a),s=Qe(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function et(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Re)}function tt(e,t,n){return et(Ye,e,t,n)}function nt(e,t,n){return et(Ze,e,t,n)}function rt(e,t,n){return et(Xe,e,t,n)}function it(e){return(e%360+360)%360}function at(e){let t=Je.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Le(+t[5]):Re(+t[5]));let i=it(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?nt(i,a,o):t[1]===`hsv`?rt(i,a,o):tt(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function ot(e,t){var n=$e(e);n[0]=it(n[0]+t),n=tt(n),e.r=n[0],e.g=n[1],e.b=n[2]}function st(e){if(!e)return;let t=$e(e),n=t[0],r=ze(t[1]),i=ze(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${B(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var ct={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`},lt={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 ut(){let e={},t=Object.keys(lt),n=Object.keys(ct),r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,ct[a]);a=parseInt(lt[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}var dt;function ft(e){dt||(dt=ut(),dt.transparent=[0,0,0,0]);let t=dt[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var pt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function mt(e){let t=pt.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?Le(e):z(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?Le(r):z(r,0,255)),i=255&(t[4]?Le(i):z(i,0,255)),a=255&(t[6]?Le(a):z(a,0,255)),{r,g:i,b:a,a:n}}}function ht(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${B(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var gt=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,_t=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function vt(e,t,n){let r=_t(B(e.r)),i=_t(B(e.g)),a=_t(B(e.b));return{r:Re(gt(r+n*(_t(B(t.r))-r))),g:Re(gt(i+n*(_t(B(t.g))-i))),b:Re(gt(a+n*(_t(B(t.b))-a))),a:e.a+n*(t.a-e.a)}}function yt(e,t,n){if(e){let r=$e(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=tt(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function bt(e,t){return e&&Object.assign(t||{},e)}function xt(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Re(e[3]))):(t=bt(e,{r:0,g:0,b:0,a:1}),t.a=Re(t.a)),t}function St(e){return e.charAt(0)===`r`?mt(e):at(e)}var Ct=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=xt(t):n===`string`&&(r=Ge(t)||ft(t)||St(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=bt(this._rgb);return e&&(e.a=B(e.a)),e}set rgb(e){this._rgb=xt(e)}rgbString(){return this._valid?ht(this._rgb):void 0}hexString(){return this._valid?qe(this._rgb):void 0}hslString(){return this._valid?st(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=vt(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=Re(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=Ie(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return yt(this._rgb,2,e),this}darken(e){return yt(this._rgb,2,-e),this}saturate(e){return yt(this._rgb,1,e),this}desaturate(e){return yt(this._rgb,1,-e),this}rotate(e){return ot(this._rgb,e),this}};function wt(e){return new Ct(e)}function Tt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Et(e){return Tt(e)?e:wt(e)}function Dt(e){return Tt(e)?e:wt(e).saturate(.5).darken(.1).hexString()}var Ot=Object.create(null),kt=Object.create(null);function At(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;t<r;++t){let r=n[t];e=e[r]||(e[r]=Object.create(null))}return e}function jt(e,t,n){return typeof t==`string`?g(At(e,t),n):g(At(e,``),t)}var H=new class{constructor(e){this.animation=void 0,this.backgroundColor=`rgba(0,0,0,0.1)`,this.borderColor=`rgba(0,0,0,0.1)`,this.color=`#666`,this.datasets={},this.devicePixelRatio=e=>e.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=(e,t)=>Dt(t.backgroundColor),this.hoverBorderColor=(e,t)=>Dt(t.borderColor),this.hoverColor=(e,t)=>Dt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return jt(this,e,t)}get(e){return At(this,e)}describe(e,t){return jt(kt,e,t)}override(e,t){return jt(Ot,e,t)}route(e,t,n,r){let a=At(this,e),o=At(this,n),c=`_`+t;Object.defineProperties(a,{[c]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[c],t=o[r];return i(e)?Object.assign({},t,e):s(e,t)},set(e){this[c]=e}}})}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}});function Mt(e){return!e||n(e.size)||n(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function Nt(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function Pt(e,t,n,i){i||={};let a=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(a=i.data={},o=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let s=0,c=n.length,l,u,d,f,p;for(l=0;l<c;l++)if(f=n[l],f!=null&&r(f)!==!0)s=Nt(e,a,o,s,f);else if(r(f))for(u=0,d=f.length;u<d;u++)p=f[u],p!=null&&!r(p)&&(s=Nt(e,a,o,s,p));e.restore();let m=o.length/2;if(m>n.length){for(l=0;l<m;l++)delete a[o[l]];o.splice(0,m)}return s}function Ft(e,t,n){let r=e.currentDevicePixelRatio,i=n===0?0:Math.max(n/2,.5);return Math.round((t-i)*r)/r+i}function It(e,t){t||=e.getContext(`2d`),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Lt(e,t,n,r){Rt(e,t,n,r,null)}function Rt(e,t,n,r,i){let a,o,s,c,l,u,d=t.pointStyle,f=t.rotation,p=t.radius,m=(f||0)*te;if(d&&typeof d==`object`&&(a=d.toString(),a===`[object HTMLImageElement]`||a===`[object HTMLCanvasElement]`)){e.save(),e.translate(n,r),e.rotate(m),e.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),d){default:i?e.ellipse(n,r,i/2,p,0,0,k):e.arc(n,r,p,0,k),e.closePath();break;case`triangle`:e.moveTo(n+Math.sin(m)*p,r-Math.cos(m)*p),m+=re,e.lineTo(n+Math.sin(m)*p,r-Math.cos(m)*p),m+=re,e.lineTo(n+Math.sin(m)*p,r-Math.cos(m)*p),e.closePath();break;case`rectRounded`:l=p*.516,c=p-l,o=Math.cos(m+ne)*c,s=Math.sin(m+ne)*c,e.arc(n-o,r-s,l,m-O,m-j),e.arc(n+s,r-o,l,m-j,m),e.arc(n+o,r+s,l,m,m+j),e.arc(n-s,r+o,l,m+j,m+O),e.closePath();break;case`rect`:if(!f){c=Math.SQRT1_2*p,u=i?i/2:c,e.rect(n-u,r-c,2*u,2*c);break}m+=ne;case`rectRot`:o=Math.cos(m)*p,s=Math.sin(m)*p,e.moveTo(n-o,r-s),e.lineTo(n+s,r-o),e.lineTo(n+o,r+s),e.lineTo(n-s,r+o),e.closePath();break;case`crossRot`:m+=ne;case`cross`:o=Math.cos(m)*p,s=Math.sin(m)*p,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s),e.moveTo(n+s,r-o),e.lineTo(n-s,r+o);break;case`star`:o=Math.cos(m)*p,s=Math.sin(m)*p,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s),e.moveTo(n+s,r-o),e.lineTo(n-s,r+o),m+=ne,o=Math.cos(m)*p,s=Math.sin(m)*p,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s),e.moveTo(n+s,r-o),e.lineTo(n-s,r+o);break;case`line`:o=i?i/2:Math.cos(m)*p,s=Math.sin(m)*p,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case`dash`:e.moveTo(n,r),e.lineTo(n+Math.cos(m)*p,r+Math.sin(m)*p);break}e.fill(),t.borderWidth>0&&e.stroke()}}function zt(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Bt(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Vt(e){e.restore()}function Ht(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i===`middle`){let r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else i===`after`==!!r?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(n.x,n.y)}function Ut(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Wt(e,t,i,a,o,s={}){let c=r(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!==``,u,d;for(e.save(),e.font=o.string,Gt(e,s),u=0;u<c.length;++u)d=c[u],l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),n(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,i,a,s.maxWidth)),e.fillText(d,i,a,s.maxWidth),Kt(e,i,a,d,s),a+=o.lineHeight;e.restore()}function Gt(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),n(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Kt(e,t,n,r,i){if(i.strikethrough||i.underline){let a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,l=n+a.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function qt(e,t){let{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,-j,O,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,O,j,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,j,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-j,!0),e.lineTo(n+o.topLeft,r)}var Jt=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Yt=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Xt(e,t){let n=(``+e).match(Jt);if(!n||n[1]===`normal`)return t*1.2;switch(e=+n[2],n[3]){case`px`:return e;case`%`:e/=100;break}return t*e}var Zt=e=>+e||0;function Qt(e,t){let n={},r=i(t),a=r?Object.keys(t):t,o=i(e)?r?n=>s(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of a)n[e]=Zt(o(e));return n}function $t(e){return Qt(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function U(e){return Qt(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function W(e){let t=$t(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function G(e,t){e||={},t||=H.font;let n=s(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=s(e.style,t.style);r&&!(``+r).match(Yt)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=``);let i={family:s(e.family,t.family),lineHeight:Xt(s(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:s(e.weight,t.weight),string:``};return i.string=Mt(i),i}function en(e,t,n,i){let a=!0,o,s,c;for(o=0,s=e.length;o<s;++o)if(c=e[o],c!==void 0&&(t!==void 0&&typeof c==`function`&&(c=c(t),a=!1),n!==void 0&&r(c)&&(c=c[n%c.length],a=!1),c!==void 0))return i&&!a&&(i.cacheable=!1),c}function tn(e,t,n){let{min:r,max:i}=e,a=l(t,(i-r)/2),o=(e,t)=>n&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function nn(e,t){return Object.assign(Object.create(e),t)}function rn(e,t=[``],n=e,r,i=()=>e[0]){return w(r)||(r=bn(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:i=>rn([i,...e],t,n,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return ln(n,r,()=>yn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return xn(e).includes(t)},ownKeys(e){return xn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function an(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:on(e,r),setContext:t=>an(e,t,n,r),override:i=>an(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return ln(e,t,()=>un(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function on(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:T(n)?n:()=>n,isIndexable:T(r)?r:()=>r}}var sn=(e,t)=>e?e+C(t):t,cn=(e,t)=>i(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function ln(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];let r=n();return e[t]=r,r}function un(e,t,n){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=e,c=i[t];return T(c)&&s.isScriptable(t)&&(c=dn(t,c,e,n)),r(c)&&c.length&&(c=fn(t,c,e,s.isIndexable)),cn(t,c)&&(c=an(c,a,o&&o[t],s)),c}function dn(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);return s.add(e),t=t(a,o||r),s.delete(e),cn(e,t)&&(t=gn(i._scopes,i,e,t)),t}function fn(e,t,n,r){let{_proxy:a,_context:o,_subProxy:s,_descriptors:c}=n;if(w(o.index)&&r(e))t=t[o.index%t.length];else if(i(t[0])){let n=t,r=a._scopes.filter(e=>e!==n);t=[];for(let i of n){let n=gn(r,a,e,i);t.push(an(n,o,s&&s[e],c))}}return t}function pn(e,t,n){return T(e)?e(t,n):e}var mn=(e,t)=>e===!0?t:typeof e==`string`?b(t,e):void 0;function hn(e,t,n,r,i){for(let a of t){let t=mn(n,a);if(t){e.add(t);let a=pn(t._fallback,n,i);if(w(a)&&a!==n&&a!==r)return a}else if(t===!1&&w(r)&&n!==r)return null}return!1}function gn(e,t,n,r){let i=t._rootScopes,a=pn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=_n(s,o,n,a||n,r);return c===null||w(a)&&a!==n&&(c=_n(s,o,a,c,r),c===null)?!1:rn(Array.from(s),[``],i,a,()=>vn(t,n,r))}function _n(e,t,n,r,i){for(;n;)n=hn(e,t,n,r,i);return n}function vn(e,t,n){let a=e._getTarget();t in a||(a[t]={});let o=a[t];return r(o)&&i(n)?n:o}function yn(e,t,n,r){let i;for(let a of t)if(i=bn(sn(a,e),n),w(i))return cn(e,i)?gn(n,r,e,i):i}function bn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(w(t))return t}}function xn(e){let t=e._keys;return t||=e._keys=Sn(e._scopes),t}function Sn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Cn(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={r:i.parse(b(u,a),l)};return o}var wn=2**-52||1e-14,Tn=(e,t)=>t<e.length&&!e[t].skip&&e[t],En=e=>e===`x`?`y`:`x`;function Dn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=pe(a,i),c=pe(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function On(e,t,n){let r=e.length,i,a,o,s,c,l=Tn(e,0);for(let u=0;u<r-1;++u)if(c=l,l=Tn(e,u+1),!(!c||!l)){if(se(t[u],0,wn)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],a=n[u+1]/t[u],s=i**2+a**2,!(s<=9)&&(o=3/Math.sqrt(s),n[u]=i*o*t[u],n[u+1]=a*o*t[u])}}function kn(e,t,n=`x`){let r=En(n),i=e.length,a,o,s,c=Tn(e,0);for(let l=0;l<i;++l){if(o=s,s=c,c=Tn(e,l+1),!s)continue;let i=s[n],u=s[r];o&&(a=(i-o[n])/3,s[`cp1${n}`]=i-a,s[`cp1${r}`]=u-a*t[l]),c&&(a=(c[n]-i)/3,s[`cp2${n}`]=i+a,s[`cp2${r}`]=u+a*t[l])}}function An(e,t=`x`){let n=En(t),r=e.length,i=Array(r).fill(0),a=Array(r),o,s,c,l=Tn(e,0);for(o=0;o<r;++o)if(s=c,c=l,l=Tn(e,o+1),c){if(l){let e=l[t]-c[t];i[o]=e===0?0:(l[n]-c[n])/e}a[o]=s?l?N(i[o-1])===N(i[o])?(i[o-1]+i[o])/2:0:i[o-1]:i[o]}On(e,i,a),kn(e,a,t)}function jn(e,t,n){return Math.max(Math.min(e,n),t)}function Mn(e,t){let n,r,i,a,o,s=zt(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&zt(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=jn(i.cp1x,t.left,t.right),i.cp1y=jn(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=jn(i.cp2x,t.left,t.right),i.cp2y=jn(i.cp2y,t.top,t.bottom)))}function Nn(e,t,n,r,i){let a,o,s,c;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),t.cubicInterpolationMode===`monotone`)An(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],c=Dn(n,s,e[Math.min(a+1,o-+!r)%o],t.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}t.capBezierPoints&&Mn(e,n)}function Pn(){return typeof window<`u`&&typeof document<`u`}function Fn(e){let t=e.parentNode;return t&&t.toString()===`[object ShadowRoot]`&&(t=t.host),t}function In(e,t,n){let r;return typeof e==`string`?(r=parseInt(e,10),e.indexOf(`%`)!==-1&&(r=r/100*t.parentNode[n])):r=e,r}var Ln=e=>window.getComputedStyle(e,null);function Rn(e,t){return Ln(e).getPropertyValue(t)}var zn=[`top`,`right`,`bottom`,`left`];function Bn(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=zn[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var Vn=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Hn(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(Vn(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function Un(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=Ln(n),a=i.boxSizing===`border-box`,o=Bn(i,`padding`),s=Bn(i,`border`,`width`),{x:c,y:l,box:u}=Hn(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function Wn(e,t,n){let r,i;if(t===void 0||n===void 0){let a=Fn(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=Ln(a),s=Bn(o,`border`,`width`),c=Bn(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=In(o.maxWidth,a,`clientWidth`),i=In(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||A,maxHeight:i||A}}var Gn=e=>Math.round(e*10)/10;function Kn(e,t,n,r){let i=Ln(e),a=Bn(i,`margin`),o=In(i.maxWidth,e,`clientWidth`)||A,s=In(i.maxHeight,e,`clientHeight`)||A,c=Wn(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=Bn(i,`border`,`width`),t=Bn(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?Math.floor(l/r):u-a.height),l=Gn(Math.min(l,o,c.maxWidth)),u=Gn(Math.min(u,s,c.maxHeight)),l&&!u&&(u=Gn(l/2)),{width:l,height:u}}function qn(e,t,n){let r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=i/r,e.width=a/r;let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var Jn=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t)}catch{}return e}();function Yn(e,t){let n=Rn(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Xn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Zn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function Qn(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=Xn(e,i,n),s=Xn(i,a,n),c=Xn(a,t,n);return Xn(Xn(o,s,n),Xn(s,c,n),n)}var $n=new Map;function er(e,t){t||={};let n=e+JSON.stringify(t),r=$n.get(n);return r||(r=new Intl.NumberFormat(e,t),$n.set(n,r)),r}function tr(e,t,n){return er(t,n).format(e)}var nr=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},rr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ir(e,t,n){return e?nr(t,n):rr()}function ar(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function or(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function sr(e){return e===`angle`?{between:he,compare:me,normalize:F}:{between:L,compare:(e,t)=>e-t,normalize:e=>e}}function cr({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function lr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=sr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;f<p&&o(s(t[l%c][r]),i,a);++f)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:d,style:e.style}}function ur(e,t,n){if(!n)return[e];let{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:c,normalize:l}=sr(r),{start:u,end:d,loop:f,style:p}=lr(e,t,n),m=[],h=!1,g=null,_,v,y,b=()=>c(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(cr({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(cr({start:g,end:d,loop:f,count:o,style:p})),m}function dr(e,t){let n=[],r=e.segments;for(let i=0;i<r.length;i++){let a=ur(r[i],e.points,t);a.length&&n.push(...a)}return n}function fr(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function pr(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function mr(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=fr(n,i,a,r);return r===!0?hr(e,[{start:o,end:s,loop:a}],n,t):hr(e,pr(n,o,s<o?s+i:s,!!e._fullLoop&&o===0&&s===i-1),n,t)}function hr(e,t,n,r){return!r||!r.setContext||!n?t:gr(e,t,n,r)}function gr(e,t,n,r){let i=e._chart.getContext(),a=_r(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,c=n.length,l=[],u=a,d=t[0].start,f=d;function p(e,t,r,i){let a=s?-1:1;if(e!==t){for(e+=c;n[e%c].skip;)e-=a;for(;n[t%c].skip;)t+=a;e%c!==t%c&&(l.push({start:e%c,end:t%c,loop:r,style:i}),u=i,d=t%c)}}for(let e of t){d=s?d:e.start;let t=n[d%c],a;for(f=d+1;f<=e.end;f++){let s=n[f%c];a=_r(r.setContext(nn(i,{type:`segment`,p0:t,p1:s,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:o}))),vr(a,u)&&p(d,f-1,e.loop,u),t=s,u=a}d<f-1&&p(d,f-1,e.loop,u)}return l}function _r(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function vr(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}var K=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let i=t.listeners[r],a=t.duration;i.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Te.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},yr=`transparent`,br={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Et(e||yr),i=r.valid&&Et(t||yr);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},xr=class{constructor(e,t,n,r){let i=t[n];r=en([e.to,r,i,e.from]);let a=en([e.from,i,r]);this._active=!0,this._fn=e.fn||br[e.type||typeof a],this._easing=Fe[e.easing]||Fe.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=en([e.to,t,r,e.from]),this._from=en([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t<n),!this._active){this._target[r]=o,this._notify(!0);return}if(t<0){this._target[r]=i;return}s=t/n%2,s=a&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}},Sr=[`x`,`y`,`borderWidth`,`radius`,`tension`],Cr=[`color`,`borderColor`,`backgroundColor`];H.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});var wr=Object.keys(H.animation);H.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),H.set(`animations`,{colors:{type:`color`,properties:Cr},numbers:{type:`number`,properties:Sr}}),H.describe(`animations`,{_fallback:`animation`}),H.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:e=>e|0}}}});var Tr=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!i(e))return;let t=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{let a=e[n];if(!i(a))return;let o={};for(let e of wr)o[e]=a[e];(r(a.properties)&&a.properties||[n]).forEach(e=>{(e===n||!t.has(e))&&t.set(e,o)})})}_animateOptions(e,t){let n=t.options,r=Dr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Er(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new xr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return K.add(this._chart,n),!0}};function Er(e,t){let n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){let i=e[r[t]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Dr(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Or(e,t){let n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function kr(e,t,n){if(n===!1)return!1;let r=Or(e,n),i=Or(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Ar(e){let t,n,r,a;return i(e)?(t=e.top,n=e.right,r=e.bottom,a=e.left):t=n=r=a=e,{top:t,right:n,bottom:r,left:a,disabled:e===!1}}function jr(e,t){let n=[],r=e._getSortedDatasetMetas(t),i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function Mr(e,t,n,r={}){let i=e.keys,o=r.mode===`single`,s,c,l,u;if(t!==null){for(s=0,c=i.length;s<c;++s){if(l=+i[s],l===n){if(r.all)continue;break}u=e.values[l],a(u)&&(o||t===0||N(t)===N(u))&&(t+=u)}return t}}function Nr(e){let t=Object.keys(e),n=Array(t.length),r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r],n[r]={x:a,y:e[a]};return n}function Pr(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Fr(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Ir(e){let{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:-1/0,max:i?n:1/0}}function Lr(e,t,n){let r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Rr(e,t,n,r){for(let i of t.getMatchingVisibleMetas(r).reverse()){let t=e[i.index];if(n&&t>0||!n&&t<0)return i.index}return null}function zr(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=Fr(a,o,r),d=t.length,f;for(let e=0;e<d;++e){let n=t[e],{[c]:a,[l]:d}=n,p=n._stacks||={};f=p[l]=Lr(i,u,a),f[s]=d,f._top=Rr(f,o,!0,r.type),f._bottom=Rr(f,o,!1,r.type)}}function Br(e,t){let n=e.scales;return Object.keys(n).filter(e=>n[e].axis===t).shift()}function Vr(e,t){return nn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function Hr(e,t,n){return nn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function Ur(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n]}}}var Wr=e=>e===`reset`||e===`none`,Gr=(e,t)=>t?e:Object.assign({},e),Kr=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:jr(n,!0),values:null},q=class{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,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(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Pr(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Ur(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=s(n.xAxisID,Br(e,`x`)),a=t.yAxisID=s(n.yAxisID,Br(e,`y`)),o=t.rAxisID=s(n.rAxisID,Br(e,`r`)),c=t.indexAxis,l=t.iAxisID=r(c,i,a,o),u=t.vAxisID=r(c,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&Ce(this._data,this),e._stacked&&Ur(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(i(t))this._data=Nr(t);else if(n!==t){if(n){Ce(n,this);let e=this._cachedMeta;Ur(e),e._parsed=[]}t&&Object.isExtensible(t)&&Se(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=Pr(t.vScale,t),t.stack!==n.stack&&(r=!0,Ur(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&zr(this,t._parsed)}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:a}=this,{iScale:o,_stacked:s}=n,c=o.axis,l=e===0&&t===a.length?!0:n._sorted,u=e>0&&n._parsed[e-1],d,f,p;if(this._parsing===!1)n._parsed=a,n._sorted=!0,p=a;else{p=r(a[e])?this.parseArrayData(n,a,e,t):i(a[e])?this.parseObjectData(n,a,e,t):this.parsePrimitiveData(n,a,e,t);let o=()=>f[c]===null||u&&f[c]<u[c];for(d=0;d<t;++d)n._parsed[d+e]=f=p[d],l&&(o()&&(l=!1),u=f);n._sorted=l}s&&zr(this,p)}parsePrimitiveData(e,t,n,r){let{iScale:i,vScale:a}=e,o=i.axis,s=a.axis,c=i.getLabels(),l=i===a,u=Array(r),d,f,p;for(d=0,f=r;d<f;++d)p=d+n,u[d]={[o]:l||i.parse(c[p],p),[s]:a.parse(t[p],p)};return u}parseArrayData(e,t,n,r){let{xScale:i,yScale:a}=e,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={x:i.parse(u[0],l),y:a.parse(u[1],l)};return o}parseObjectData(e,t,n,r){let{xScale:i,yScale:a}=e,{xAxisKey:o=`x`,yAxisKey:s=`y`}=this._parsing,c=Array(r),l,u,d,f;for(l=0,u=r;l<u;++l)d=l+n,f=t[d],c[l]={x:i.parse(b(f,o),d),y:a.parse(b(f,s),d)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){let r=this.chart,i=this._cachedMeta,a=t[e.axis];return Mr({keys:jr(r,!0),values:t._stacks[e.axis]},a,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){let i=n[t.axis],a=i===null?NaN:i,o=r&&n._stacks[t.axis];r&&o&&(r.values=o,a=Mr(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){let n=this._cachedMeta,r=n._parsed,i=n._sorted&&e===n.iScale,o=r.length,s=this._getOtherScale(e),c=Kr(t,n,this.chart),l={min:1/0,max:-1/0},{min:u,max:d}=Ir(s),f,p;function m(){p=r[f];let t=p[s.axis];return!a(p[e.axis])||u>t||d<t}for(f=0;f<o&&!(!m()&&(this.updateRangeFromParsed(l,e,p,c),i));++f);if(i){for(f=o-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(l,e,p,c);break}}return l}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r][e.axis],a(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){let t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?``+n.getLabelForValue(i[n.axis]):``,value:r?``+r.getLabelForValue(i[r.axis]):``}}_update(e){let t=this._cachedMeta;this.update(e||`default`),t._clip=Ar(s(this.options.clip,kr(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){let e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],i=t.chartArea,a=[],o=this._drawStart||0,s=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop,l;for(n.dataset&&n.dataset.draw(e,i,o,s),l=o;l<o+s;++l){let t=r[l];t.hidden||(t.active&&c?a.push(t):t.draw(e,i))}for(l=0;l<a.length;++l)a[l].draw(e,i)}getStyle(e,t){let n=t?`active`:`default`;return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){let r=this.getDataset(),i;if(e>=0&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];i=t.$context||=Hr(this.getContext(),e,t),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||=Vr(this.chart.getContext(),this.index),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t=`default`,n){let r=t===`active`,i=this._cachedDataOpts,a=e+`-`+t,o=i[a],s=this.enableOptionSharing&&w(n);if(o)return Gr(o,s);let c=this.chart.config,l=c.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,`hover`,e,``]:[e,``],d=c.getOptionScopes(this.getDataset(),l),f=Object.keys(H.elements[e]),p=c.resolveNamedOptions(d,f,()=>this.getContext(n,r),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(Gr(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new Tr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||Wr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){Wr(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!Wr(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,t,n=!0){let r=this._cachedMeta,i=r.data,a=e+t,o,s=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;o<a;++o)i[o]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(i,e,t,`reset`)}updateElements(e,t,n,r){}_removeElements(e,t){let n=this._cachedMeta;if(this._parsing){let r=n._parsed.splice(e,t);n._stacked&&Ur(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync([`_insertElements`,this.getDataset().data.length-e,e])}_onDataPop(){this._sync([`_removeElements`,this._cachedMeta.data.length-1,1])}_onDataShift(){t