PageSourceSearch

https://www.inventory.ae/public/build/assets/Dashboard-DSHR6Rsu.js

js inventory.ae collected 2026-10-07 23:08:01 UTC 228,126 bytes, 18 lines download raw bytes

1import{c as k,I as Ui,G as Xi,H as X,b5 as Yo,a2 as At,J as Ki,aL as Uo,b6 as _s,b7 as ne,b8 as ys,b9 as Xo,_ as Rt,r as Y,o as T,h as Q,N as ti,d as ei,Q as Ko,z as qo,w,L as W,f as N,t as O,e as tt,F as nt,i as bt,am as Go,l as qi,p as Gi,ba as Nn,aD as Qo,ap as Vn,v as jn,T as Hn,Y as Zo,g as Jo,bb as ta,ao as ea,bc as ia,S as sa,bd as na,K as oa,s as $n,M as aa,E as ra,ar as la,a1 as ca,at as ha,be as da,b2 as Ae,aj as ua,j as fa,C as pa}from"./app-B2Y0-4Oe.js";import{S as ga}from"./StateWidget-DXimW15h.js";import{C as Yn}from"./CloudDownloadOutlined-DoaoHItC.js";import{O as ma}from"./OrderTable-DOM9A3DD.js";import{U as ba}from"./UserInfo-CQfsfzfr.js";import{D as _a}from"./DateRangePicker-Y2_EBI8a.js";import{A as ya}from"./AdminPageHeader-D4ZmExHN.js";import{A as xa,a as va}from"./ArrowUpOutlined-D7OkhYA2.js";import{B as ka}from"./BankOutlined-B9W3jG2l.js";import{S as wa}from"./ShoppingOutlined-WLYEzsac.js";import"./index-D-LizC8X.js";import"./fields-DbY6p1IM.js";import"./datatable-S-x8bdRa.js";import"./filter-D8gtdSsr.js";import"./PaymentStatus-ptCUI0xc.js";import"./OrderDetails--N7PegNf.js";import"./cart-B6RPniZA.js";import"./apiAdmin-D0yFZeTH.js";import"./AddButton-B3cfjTJJ.js";import"./AddEdit-Rio7WQQ5.js";import"./SaveOutlined-q68O2Itt.js";import"./Invoice-DsZaqEh0.js";import"./BarcodeGenerator-HmUKNoLg.js";import"./PrinterOutlined-CozDeDGc.js";import"./SendOutlined-DCqepGJ6.js";import"./View-BVuxNstC.js";import"./WalletOutlined-CGTeby8z.js";import"./ShoppingCartOutlined-DAp38IT1.js";import"./DollarCircleOutlined-CGYgCNTn.js";var Sa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-upload",theme:"outlined"};function xs(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},s=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.forEach(function(n){Ma(i,n,e[n])})}return i}function Ma(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Qi=function(t,e){var s=xs({},t,e.attrs);return k(Ui,xs({},s,{icon:Sa}),null)};Qi.displayName="CloudUploadOutlined";Qi.inheritAttrs=!1;var Ca={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"};function vs(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},s=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.forEach(function(n){Da(i,n,e[n])})}return i}function Da(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Zi=function(t,e){var s=vs({},t,e.attrs);return k(Ui,vs({},s,{icon:Ca}),null)};Zi.displayName="LineChartOutlined";Zi.inheritAttrs=!1;var Pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]},name:"tag",theme:"outlined"};function ks(i){for(var t=1;t<arguments.length;
vendor: 4,980 bytes, lines 1-6
1t++){var e=arguments[t]!=null?Object(arguments[t]):{},s=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.forEach(function(n){Oa(i,n,e[n])})}return i}function Oa(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Ji=function(t,e){var s=ks({},t,e.attrs);return k(Ui,ks({},s,{icon:Pa}),null)};Ji.displayName="TagOutlined";Ji.inheritAttrs=!1;/*!
2 * Chart.js v3.9.1
3 * https://www.chartjs.org
4 * (c) 2022 Chart.js Contributors
5 * Released under the MIT License
6 */function xt(){}const Aa=function(){let i=0;return function(){return i++}}();function B(i){return i===null||typeof i>"u"}function $(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function F(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}const Z=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function ht(i,t){return Z(i)?i:t}function L(i,t){return typeof i>"u"?t:i}const Ta=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,Un=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function H(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function V(i,t,e,s){let n,o,a;if($(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(F(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function $e(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Ye(i){if($(i))return i.map(Ye);if(F(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=Ye(i[e[n]]);return t}return i}function Xn(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function La(i,t,e,s){if(!Xn(i))return;const n=t[i],o=e[i];F(n)&&F(o)?ye(n,o,s):t[i]=Ye(o)}function ye(i,t,e){const s=$(t)?t:[t],n=s.length;if(!F(i))return i;e=e||{};const o=e.merger||La;for(let a=0;a<n;++a){if(t=s[a],!F(t))continue;const r=Object.keys(t);for(let l=0,c=r.length;l<c;++l)o(r[l],i,t,e)}return i}function pe(i,t){return ye(i,t,{merger:Ra})}function Ra(i,t,e){if(!Xn(i))return;const s=t[i],n=e[i];F(s)&&F(n)?pe(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Ye(n))}const ws={"":i=>i,x:i=>i.x,y:i=>i.y};function Tt(i,t){return(ws[t]||(ws[t]=Ea(t)))(i)}function Ea(i){const t=Ia(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Ia(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function ts(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ut=i=>typeof i<"u",Lt=i=>typeof i=="function",Ss=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Fa(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const U=Math.PI,j=2*U,za=j+U,Ue=Number.POSITIVE_INFINITY,Ba=U/180,q=U/2,oe=U/4,Ms=U*2/3,dt=Math.log10,yt=Math.sign;function Cs(i){const t=Math.round(i);i=ge(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(dt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Wa(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function Jt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function ge(i,t,e){return Math.abs(i-t)<e}function Na(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Kn(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ft(i){return i*(U/180)}function es(i){return i*(180/U)}function Ds(i){if(!Z(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function qn(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*U&&(o+=j),{angle:o,distance:n}}function Ei(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Va(i,t){return(i-t+za)%j-U}function lt(i){return(i%j+j)%j}function xe(i,t,e,s){const n=lt(i),o=lt(t),a=lt(e),r=lt(o-n),l=lt(a-n),c=lt(n-o),h=lt(n-a);return n===o||n===a||s&&o===a||r>l&&c<h}function it(i,t,e){return Math.max(t,Math.min(e,i))}function ja(i){return it(i,-32768,32767)}function St(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function is(i,t,e){e=e||(a=>i[a]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const Mt=(i,t,e,s)=>is(i,e,s?n=>i[n][t]<=e:n=>i[n][t]<e),Ha=(i,t,e)=>is(i,e,s=>i[s][t]>=e);function $a(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Gn=["push","pop","shift","splice","unshift"];function Ya(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}
vendor: 5,280 bytes, lines 6-11
6),Gn.forEach(e=>{const s="_onData"+ts(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ps(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Gn.forEach(o=>{delete i[o]}),delete i._chartjs)}function Qn(i){const t=new Set;let e,s;for(e=0,s=i.length;e<s;++e)t.add(i[e]);return t.size===s?i:Array.from(t)}const Zn=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Jn(i,t,e){const s=e||(a=>Array.prototype.slice.call(a));let n=!1,o=[];return function(...a){o=s(a),n||(n=!0,Zn.call(window,()=>{n=!1,i.apply(t,o)}))}}function Ua(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const ss=i=>i==="start"?"left":i==="end"?"right":"center",st=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Xa=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function to(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=it(Math.min(Mt(r,a.axis,c).lo,e?s:Mt(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=it(Math.max(Mt(r,a.axis,h,!0).hi+1,e?0:Mt(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function eo(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const Te=i=>i===0||i===1,Os=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*j/e)),As=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*j/e)+1,me={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*q)+1,easeOutSine:i=>Math.sin(i*q),easeInOutSine:i=>-.5*(Math.cos(U*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Te(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Te(i)?i:Os(i,.075,.3),easeOutElastic:i=>Te(i)?i:As(i,.075,.3),easeInOutElastic(i){return Te(i)?i:i<.5?.5*Os(i*2,.1125,.45):.5+.5*As(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-me.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?me.easeInBounce(i*2)*.5:me.easeOutBounce(i*2-1)*.5+.5};/*!
7 * @kurkle/color v0.2.1
8 * https://github.com/kurkle/color#readme
9 * (c) 2022 Jukka Kurkela
10 * Released under the MIT License
11 */function Se(i){return i+.5|0}const Dt=(i,t,e)=>Math.max(Math.min(i,e),t);function de(i){return Dt(Se(i*2.55),0,255)}function Ot(i){return Dt(Se(i*255),0,255)}function wt(i){return Dt(Se(i/2.55)/100,0,1)}function Ts(i){return Dt(Se(i*100),0,100)}const ct={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},Ii=[..."0123456789ABCDEF"],Ka=i=>Ii[i&15],qa=i=>Ii[(i&240)>>4]+Ii[i&15],Le=i=>(i&240)>>4===(i&15),Ga=i=>Le(i.r)&&Le(i.g)&&Le(i.b)&&Le(i.a);function Qa(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&ct[i[1]]*17,g:255&ct[i[2]]*17,b:255&ct[i[3]]*17,a:t===5?ct[i[4]]*17:255}:(t===7||t===9)&&(e={r:ct[i[1]]<<4|ct[i[2]],g:ct[i[3]]<<4|ct[i[4]],b:ct[i[5]]<<4|ct[i[6]],a:t===9?ct[i[7]]<<4|ct[i[8]]:255})),e}const Za=(i,t)=>i<255?t(i):"";function Ja(i){var t=Ga(i)?Ka:qa;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Za(i.a,t):void 0}const tr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function io(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function er(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function ir(i,t,e){const s=io(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function sr(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function ns(i){const e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),a=Math.min(e,s,n),r=(o+a)/2;let l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=sr(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function os(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(Ot)}function as(i,t,e){return os(io,i,t,e)}function nr(i,t,e){return os(ir,i,t,e)}function or(i,t,e){return os(er,i,t,e)}
vendor: 7,214 bytes, line 11
11function so(i){return(i%360+360)%360}function ar(i){const t=tr.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?de(+t[5]):Ot(+t[5]));const n=so(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=nr(n,o,a):t[1]==="hsv"?s=or(n,o,a):s=as(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function rr(i,t){var e=ns(i);e[0]=so(e[0]+t),e=as(e),i.r=e[0],i.g=e[1],i.b=e[2]}function lr(i){if(!i)return;const t=ns(i),e=t[0],s=Ts(t[1]),n=Ts(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${wt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Ls={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"},Rs={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 cr(){const i={},t=Object.keys(Rs),e=Object.keys(Ls);let s,n,o,a,r;for(s=0;s<t.length;s++){for(a=r=t[s],n=0;n<e.length;n++)o=e[n],r=r.replace(o,Ls[o]);o=parseInt(Rs[a],16),i[r]=[o>>16&255,o>>8&255,o&255]}return i}let Re;function hr(i){Re||(Re=cr(),Re.transparent=[0,0,0,0]);const t=Re[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const dr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ur(i){const t=dr.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?de(a):Dt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?de(s):Dt(s,0,255)),n=255&(t[4]?de(n):Dt(n,0,255)),o=255&(t[6]?de(o):Dt(o,0,255)),{r:s,g:n,b:o,a:e}}}function fr(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${wt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const vi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Gt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function pr(i,t,e){const s=Gt(wt(i.r)),n=Gt(wt(i.g)),o=Gt(wt(i.b));return{r:Ot(vi(s+e*(Gt(wt(t.r))-s))),g:Ot(vi(n+e*(Gt(wt(t.g))-n))),b:Ot(vi(o+e*(Gt(wt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ee(i,t,e){if(i){let s=ns(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=as(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function no(i,t){return i&&Object.assign(t||{},i)}function Es(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Ot(i[3]))):(t=no(i,{r:0,g:0,b:0,a:1}),t.a=Ot(t.a)),t}function gr(i){return i.charAt(0)==="r"?ur(i):ar(i)}class Xe{constructor(t){if(t instanceof Xe)return t;const e=typeof t;let s;e==="object"?s=Es(t):e==="string"&&(s=Qa(t)||hr(t)||gr(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=no(this._rgb);return t&&(t.a=wt(t.a)),t}set rgb(t){this._rgb=Es(t)}rgbString(){return this._valid?fr(this._rgb):void 0}hexString(){return this._valid?Ja(this._rgb):void 0}hslString(){return this._valid?lr(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=pr(this._rgb,t._rgb,e)),this}clone(){return new Xe(this.rgb)}alpha(t){return this._rgb.a=Ot(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Se(t.r*.3+t.g*.59+t.b*.11);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 Ee(this._rgb,2,t),this}darken(t){return Ee(this._rgb,2,-t),this}saturate(t){return Ee(this._rgb,1,t),this}desaturate(t){return Ee(this._rgb,1,-t),this}rotate(t){return rr(this._rgb,t),this}}function oo(i){return new Xe(i)}function ao(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Is(i){return ao(i)?i:oo(i)}function ki(i){return ao(i)?i:oo(i).saturate(.5).darken(.1).hexString()}const $t=Object.create(null),Fi=Object.create(null);function be(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function wi(i,t,e){return typeof t=="string"?ye(be(i,t),e):ye(be(i,""),t)}class mr{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=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,s)=>ki(s.backgroundColor),this.hoverBorderColor=(e,s)=>ki(s.borderColor),this.hoverColor=(e,s)=>ki(s.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={}
vendor: 10,947 bytes, line 11
11,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return wi(this,t,e)}get(t){return be(this,t)}describe(t,e){return wi(Fi,t,e)}override(t,e){return wi($t,t,e)}route(t,e,s,n){const o=be(this,t),a=be(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return F(l)?Object.assign({},c,l):L(l,c)},set(l){this[r]=l}}})}}var z=new mr({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function br(i){return!i||B(i.size)||B(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ke(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function _r(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=e[l],d!=null&&$(d)!==!0)a=Ke(i,n,o,a,d);else if($(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!$(u)&&(a=Ke(i,n,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return a}function Bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Fs(i,t){t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function zi(i,t,e,s){ro(i,t,e,s,null)}function ro(i,t,e,s,n){let o,a,r,l,c,h;const d=t.pointStyle,u=t.rotation,f=t.radius;let p=(u||0)*Ba;if(d&&typeof d=="object"&&(o=d.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(p),i.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),i.restore();return}if(!(isNaN(f)||f<=0)){switch(i.beginPath(),d){default:n?i.ellipse(e,s,n/2,f,0,0,j):i.arc(e,s,f,0,j),i.closePath();break;case"triangle":i.moveTo(e+Math.sin(p)*f,s-Math.cos(p)*f),p+=Ms,i.lineTo(e+Math.sin(p)*f,s-Math.cos(p)*f),p+=Ms,i.lineTo(e+Math.sin(p)*f,s-Math.cos(p)*f),i.closePath();break;case"rectRounded":c=f*.516,l=f-c,a=Math.cos(p+oe)*l,r=Math.sin(p+oe)*l,i.arc(e-a,s-r,c,p-U,p-q),i.arc(e+r,s-a,c,p-q,p),i.arc(e+a,s+r,c,p,p+q),i.arc(e-r,s+a,c,p+q,p+U),i.closePath();break;case"rect":if(!u){l=Math.SQRT1_2*f,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}p+=oe;case"rectRot":a=Math.cos(p)*f,r=Math.sin(p)*f,i.moveTo(e-a,s-r),i.lineTo(e+r,s-a),i.lineTo(e+a,s+r),i.lineTo(e-r,s+a),i.closePath();break;case"crossRot":p+=oe;case"cross":a=Math.cos(p)*f,r=Math.sin(p)*f,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r),i.moveTo(e+r,s-a),i.lineTo(e-r,s+a);break;case"star":a=Math.cos(p)*f,r=Math.sin(p)*f,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r),i.moveTo(e+r,s-a),i.lineTo(e-r,s+a),p+=oe,a=Math.cos(p)*f,r=Math.sin(p)*f,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r),i.moveTo(e+r,s-a),i.lineTo(e-r,s+a);break;case"line":a=n?n/2:Math.cos(p)*f,r=Math.sin(p)*f,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(p)*f,s+Math.sin(p)*f);break}i.fill(),t.borderWidth>0&&i.stroke()}}function ve(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function ii(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function si(i){i.restore()}function yr(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function xr(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Yt(i,t,e,s,n,o={}){const a=$(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,vr(i,o),l=0;l<a.length;++l)c=a[l],r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),B(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),kr(i,e,s,c,o),s+=n.lineHeight;i.restore()}function vr(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),B(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function kr(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function ke(i,t){const{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,-q,U,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,U,q,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,q,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-q,!0),i.lineTo(e+a.topLeft,s)}const wr=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Sr=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Mr(i,t){const e=(""+i).match(wr);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Cr=i=>+i||0;function rs(i,t){const e={},s=F(t),n=s?Object.keys(t):t,o=F(i)?s?a=>L(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=Cr(o(a));return e}function lo(i){return rs(i,{top:"y",right:"x",bottom:"y",left:"x"})}function jt(i){return rs(i,["topLeft","topRight","bottomLeft","bottomRight"])}function at(i){const t=lo(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function et(i,t){i=i||{},t=t||z.font;let e=L(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=L(i.style,t.style);s&&!(""+s).match(Sr)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:L(i.family,t.family),lineHeight:Mr(L(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:L(i.weight,t.weight),string:""};return n.string=br(n),n}function ue(i,t,e,s){let n,o,a;for(n=0,o=i.length;n<o;++n)if(a=i[n],a!==void 0&&a!==void 0)return a}function Dr(i,t,e){const{min:s,max:n}=i,o=Un(t,(n-s)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Et(i,t){return Object.assign(Object.create(i),t)}function ls(i,t=[""],e=i,s,n=()=>i[0]){ut(s)||(s=fo("_fallback",i));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:a=>ls([a,...i],t,e,s)};return new Proxy(o,{deleteProperty(a,r){return delete a[r],delete a._keys,delete i[0][r],!0},get(a,r){return ho(a,r,()=>Ir(r,t,i,a))},getOwnPropertyDescriptor(a,r){return Reflect.getOwnPropertyDescriptor(a._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,r){return Bs(a).includes(r)},ownKeys(a){return Bs(a)},set(a,r,l){const c=a._storage||(a._storage=n());return a[r]=c[r]=l,delete a._keys,!0}})}function te(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:co(i,s),setContext:o=>te(i,o,e,s),override:o=>te(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return ho(o,a,()=>Or(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function co(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:Lt(e)?e:()=>e,isIndexable:Lt(s)?s:()=>s}}const Pr=(i,t)=>i?i+ts(t):t,cs=(i,t)=>F(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function ho(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Or(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return Lt(r)&&a.isScriptable(t)&&(r=Ar(t,r,i,e)),$(r)&&r.length&&(r=Tr(t,r,i,a.isIndexable)),cs(t,r)&&(r=te(r,n,o&&o[t],a)),r}function Ar(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);return r.add(i),t=t(o,a||s),r.delete(i),cs(i,t)&&(t=hs(n._scopes,n,i,t)),t}function Tr(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(ut(o.index)&&s(i))t=t[o.index%t.length];else if(F(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=hs(c,n,i,h);t.push(te(d,o,a&&a[i],r))}}return t}function uo(i,t,e){return Lt(i)?i(t,e):i}const Lr=(i,t)=>i===!0?t:typeof i=="string"?Tt(t,i):void 0;function Rr(i,t,e,s,n){for(const o of t){const a=Lr(e,o);if(a){i.add(a);const r=uo(a._fallback,e,n);if(ut(r)&&r!==e&&r!==s)return r}else if(a===!1&&ut(s)&&e!==s)return null}return!1}function hs(i,t,e,s){const n=t._rootScopes,o=uo(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=zs(r,a,e,o||e,s);return l===null||ut(o)&&o!==e&&(l=zs(r,a,o,l,s),l===null)?!1:ls(Array.from(r),[""],n,o,()=>Er(t,e,s))}function zs(i,t,e,s,n){for(;e;)e=Rr(i,t,e,s,n);return e}function Er(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return $(n)&&F(e)?e:n}function Ir(i,t,e,s){let n;for(const o of t)if(n=fo(Pr(o,i),e),ut(n))return cs(i,n)?hs(e,s,i,n):n}function fo(i,t){for(const e of t){if(!e)continue;const s=e[i];if(ut(s))return s}}function Bs(i){let t=i._keys;return t||(t=i._keys=Fr(i._scopes)),t}function Fr(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function po(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s);let r,l,c,h;for(r=0,l=s;r<l;++r)c=r+e,h=t[c],a[r]={r:n.parse(Tt(h,o),c)};return a}const zr=Number.EPSILON||1e-14,ee=(i,t)=>t<i.length&&!i[t].skip&&i[t],go=i=>i==="x"?"y":"x";function Br(i,t,e,s){const n=i.skip?t:i,o=t,a=e.skip?t:e,r=Ei(o,n),l=Ei(a,o);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Wr(i,t,e){const s=i.length;let n,o,a,r,l,c=ee(i,0);for(let h=0;h<s-1;++h)if(l=c,c=ee(i,h+1),!(!l||!c)){if(ge(t[h],0,zr)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(n,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=n*a*t[h],e[h+1]=o*a*t[h])}}function Nr(i,t,e="x"){const s=go(e),n=i.length;let o,a,r,l=ee(i,0);for(let c=0;c<n;++c){if(a=r,r=l,l=ee(i,c+1),!r)continue;const h=r[e],d=r[s];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${s}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${s}`]=d+o*t[c])}}function Vr(i,t="x"){const e=go(t),s=i.length,n=Array(s).fill(0),o=Array(s);let a,r,l,c=ee(i,0);for(a=0;a<s;++a)if(r=l,l=c,c=ee(i,a+1),!!l){if(c){const h=c[t]-l[t];n[a]=h!==0?(c[e]-l[e])/h:0}
vendor: 9,247 bytes, lines 11-16
11o[a]=r?c?yt(n[a-1])!==yt(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}Wr(i,n,o),Nr(i,o,t)}function Ie(i,t,e){return Math.max(Math.min(i,e),t)}function jr(i,t){let e,s,n,o,a,r=ve(i[0],t);for(e=0,s=i.length;e<s;++e)a=o,o=r,r=e<s-1&&ve(i[e+1],t),o&&(n=i[e],a&&(n.cp1x=Ie(n.cp1x,t.left,t.right),n.cp1y=Ie(n.cp1y,t.top,t.bottom)),r&&(n.cp2x=Ie(n.cp2x,t.left,t.right),n.cp2y=Ie(n.cp2y,t.top,t.bottom)))}function Hr(i,t,e,s,n){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Vr(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=Br(c,r,i[Math.min(o+1,a-(s?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}t.capBezierPoints&&jr(i,e)}function mo(){return typeof window<"u"&&typeof document<"u"}function ds(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function qe(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const ni=i=>window.getComputedStyle(i,null);function $r(i,t){return ni(i).getPropertyValue(t)}const Yr=["top","right","bottom","left"];function Ht(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Yr[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Ur=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Xr(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(Ur(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Nt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=ni(e),o=n.boxSizing==="border-box",a=Ht(n,"padding"),r=Ht(n,"border","width"),{x:l,y:c,box:h}=Xr(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:p}=t;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function Kr(i,t,e){let s,n;if(t===void 0||e===void 0){const o=ds(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=ni(o),l=Ht(r,"border","width"),c=Ht(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=qe(r.maxWidth,o,"clientWidth"),n=qe(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Ue,maxHeight:n||Ue}}const Si=i=>Math.round(i*10)/10;function qr(i,t,e,s){const n=ni(i),o=Ht(n,"margin"),a=qe(n.maxWidth,i,"clientWidth")||Ue,r=qe(n.maxHeight,i,"clientHeight")||Ue,l=Kr(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const d=Ht(n,"border","width"),u=Ht(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?Math.floor(c/s):h-o.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 Ws(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Gr=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Ns(i,t){const e=$r(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Vt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Qr(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Zr(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Vt(i,n,e),r=Vt(n,o,e),l=Vt(o,t,e),c=Vt(a,r,e),h=Vt(r,l,e);return Vt(c,h,e)}const Vs=new Map;function Jr(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Vs.get(e);return s||(s=new Intl.NumberFormat(i,t),Vs.set(e,s)),s}function Me(i,t,e){return Jr(t,e).format(i)}const tl=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},el=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Zt(i,t,e){return i?tl(t,e):el()}function bo(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function _o(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function yo(i){return i==="angle"?{between:xe,compare:Va,normalize:lt}:{between:St,compare:(t,e)=>t-e,normalize:t=>t}}function js({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function il(i,t,e){const{property:s,start:n,end:o}=e,{between:a,normalize:r}=yo(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&a(r(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function xo(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=yo(s),{start:h,end:d,loop:u,style:f}=il(i,t,e),p=[];let g=!1,m=null,b,_,x;const v=()=>l(n,x,b)&&r(n,x)!==0,y=()=>r(o,b)===0||l(o,x,b),S=()=>g||v(),M=()=>!g||y();for(let D=h,C=h;D<=d;++D)_=t[D%a],!_.skip&&(b=c(_[s]),b!==x&&(g=l(b,n,o),m===null&&S()&&(m=r(b,n)===0?D:C),m!==null&&M()&&(p.push(js({start:m,end:D,loop:u,count:a,style:f})),m=null),C=D,x=b));return m!==null&&p.push(js({start:m,end:d,loop:u,count:a,style:f})),p}function vo(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=xo(s[n],i.points,t);o.length&&e.push(...o)}return e}function sl(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function nl(i,t,e,s){const n=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function ol(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:a,end:r}=sl(e,n,o,s);if(s===!0)return Hs(i,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+n:r,c=!!i._fullLoop&&a===0&&r===n-1;return Hs(i,nl(e,a,l,c),e,t)}function Hs(i,t,e,s){return!s||!s.setContext||!e?t:al(i,t,e,s)}function al(i,t,e,s){const n=i._chart.getContext(),o=$s(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,b){const _=r?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,d=g%l)}}for(const p of t){d=r?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=$s(s.setContext(Et(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),rl(m,h)&&f(d,u-1,p.loop,h),g=b,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function $s(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function rl(i,t){return t&&JSON.stringify(i)!==JSON.stringify(t)}/*!
12 * Chart.js v3.9.1
13 * https://www.chartjs.org
14 * (c) 2022 Chart.js Contributors
15 * Released under the MIT License
16 */class ll{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Zn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}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((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var vt=new ll;const Ys="transparent",cl={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Is(i||Ys),n=s.valid&&Is(t||Ys);
vendor: 5,597 bytes, line 16
16return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class hl{constructor(t,e,s,n){const o=e[s];n=ue([t.to,n,o,t.from]);const a=ue([t.from,o,n]);this._active=!0,this._fn=t.fn||cl[t.type||typeof a],this._easing=me[t.easing]||me.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=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ue([t.to,e,n,t.from]),this._from=ue([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<s),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}const dl=["x","y","borderWidth","radius","tension"],ul=["color","borderColor","backgroundColor"];z.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 fl=Object.keys(z.animation);z.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"});z.set("animations",{colors:{type:"color",properties:ul},numbers:{type:"number",properties:dl}});z.describe("animations",{_fallback:"animation"});z.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:i=>i|0}}}});class ko{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(s=>{const n=t[s];if(!F(n))return;const o={};for(const a of fl)o[a]=n[a];($(n.properties)&&n.properties||[s]).forEach(a=>{(a===s||!e.has(a))&&e.set(a,o)})})}_animateOptions(t,e){const s=e.options,n=gl(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&pl(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new hl(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return vt.add(this._chart,s),!0}}function pl(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function gl(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Us(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function ml(i,t,e){if(e===!1)return!1;const s=Us(i,e),n=Us(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function bl(i){let t,e,s,n;return F(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function wo(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Xs(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let a,r,l,c;if(t!==null){for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(s.all)continue;break}c=i.values[l],Z(c)&&(o||t===0||yt(t)===yt(c))&&(t+=c)}return t}}function _l(i){const t=Object.keys(i),e=new Array(t.length);let s,n,o;for(s=0,n=t.length;s<n;++s)o=t[s],e[s]={x:o,y:i[o]};return e}function Ks(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function yl(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function xl(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function vl(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function qs(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Gs(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=yl(o,a,s),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=vl(n,h,g),u[r]=m,u._top=qs(u,a,!0,s.type),u._bottom=qs(u,a,!1,s.type)}}function Mi(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function kl(i,t){return Et(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function wl(i,t,e){return Et(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ae(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;
vendor: 20,358 bytes, line 16
16if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e]}}}const Ci=i=>i==="reset"||i==="none",Qs=(i,t)=>t?i:Object.assign({},i),Sl=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:wo(e,!0),values:null};class pt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ks(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ae(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=L(s.xAxisID,Mi(t,"x")),a=e.yAxisID=L(s.yAxisID,Mi(t,"y")),r=e.rAxisID=L(s.rAxisID,Mi(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ps(this._data,this),t._stacked&&ae(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(F(e))this._data=_l(e);else if(s!==e){if(s){Ps(s,this);const n=this._cachedMeta;ae(n),n._parsed=[]}e&&Object.isExtensible(e)&&Ya(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ks(e.vScale,e),e.stack!==s.stack&&(n=!0,ae(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Gs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{$(n[t])?u=this.parseArrayData(s,n,t,e):F(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}a&&Gs(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+s,d[u]={[r]:h||o.parse(c[p],p),[l]:a.parse(e[p],p)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,s,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(Tt(f,r),u),y:a.parse(Tt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:wo(n,!0),values:e._stacks[t.axis]};return Xs(r,a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let a=o===null?NaN:o;const r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=Xs(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=Sl(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=xl(r);let u,f;function p(){f=n[u];const g=f[r.axis];return!Z(f[t.axis])||h>g||d<g}for(u=0;u<a&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],Z(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=bl(L(this.options.clip,ml(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=n[h];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=wl(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=kl(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&ut(s);if(r)return Qs(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(z.elements[t]),p=()=>this.getContext(s,n),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(Qs(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new ko(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ci(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){Ci(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ci(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,a=t+e;let r;const l=c=>{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&ae(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}pt.defaults={};pt.prototype.datasetElementType=null;pt.prototype.dataElementType=null;function Ml(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=Qn(s.sort((n,o)=>n-o))}return i._cache.$bar}function Cl(i){const t=i.iScale,e=Ml(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(ut(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return s}function Dl(i,t,e,s){const n=e.barThickness;let o,a;return B(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*s,a=1),{chunk:o/s,ratio:a,start:t.pixels[i]-o/2}}function Pl(i,t,e,s){const n=t.pixels,o=n[i];let a=i>0?n[i-1]:null,r=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/s,ratio:e.barPercentage,start:c}}function Ol(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),a=Math.min(n,o),r=Math.max(n,o);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function So(i,t,e,s){return $(i)?Ol(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Zs(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=r||n.parse(a[c],c),l.push(So(u,d,o,c));return l}function Di(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Al(i,t,e){return i!==0?yt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Tl(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function Ll(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:h}=Tl(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Js(h,a,r,l)]=!0,n=c)),o[Js(n,a,r,l)]=!0,i.borderSkipped=o}function Js(i,t,e,s){return s?(i=Rl(i,t,e),i=tn(i,e,t)):i=tn(i,t,e),i}function Rl(i,t,e){return i===t?e:i===e?t:i}function tn(i,t,e){return i==="start"?t:i==="end"?e:i}function El(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class oi extends pt{parsePrimitiveData(t,e,s,n){return Zs(t,e,s,n)}parseArrayData(t,e,s,n){return Zs(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,h=a.axis==="x"?r:l,d=[];let u,f,p,g;for(u=s,f=s+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(Tt(g,c),u),d.push(So(Tt(g,h),p,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=Di(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const p=this.getParsed(f),g=o||B(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[r.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Di(p._custom)||a===b._top||a===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const x=_.options||t[f].options;Ll(_,x,b,a),El(_,x,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(B(h)||isNaN(h))return!0};for(const l of n)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const r=t.barThickness;return{min:r||Cl(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s},options:{base:n,minBarLength:o}}=this,a=n||0,r=this.getParsed(t),l=r._custom,c=Di(l);let h=r[e.axis],d=0,u=s?this.applyStack(e,r,s):h,f,p;u!==h&&(d=u-h,u=h),c&&(h=l.barStart,u=l.barEnd-l.barStart,h!==0&&yt(h)!==yt(l.barEnd)&&(d=0),d+=h);const g=!B(n)&&!c?n:d;let m=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?f=e.getPixelForValue(d+u):f=m,p=f-m,Math.abs(p)<o){p=Al(p,e,a)*o,h===a&&(m-=p/2);const b=e.getPixelForDecimal(0),_=e.getPixelForDecimal(1),x=Math.min(b,_),v=Math.max(b,_);m=Math.max(Math.min(m,v),x),f=m+p}if(m===e.getPixelForValue(a)){const b=yt(p)*e.getLineWidthForValue(a)/2;m+=b,p-=b}return{size:p,base:m,head:f,center:f+p/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=L(n.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=n.barThickness==="flex"?Pl(t,e,n,c):Dl(t,e,n,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*d+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&s[o].draw(this._ctx)}}oi.id="bar";oi.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};oi.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class ai extends pt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,n){const o=super.parsePrimitiveData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+s).radius;return o}parseArrayData(t,e,s,n){const o=super.parseArrayData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=L(r[2],this.resolveDataElementOptions(a+s).radius)}return o}parseObjectData(t,e,s,n){const o=super.parseObjectData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=L(r&&r.r&&+r.r,this.resolveDataElementOptions(a+s).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e.label,value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;u<e+s;u++){const f=t[u],p=!o&&this.getParsed(u),g={},m=g[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[h]),b=g[d]=o?r.getBasePixel():r.getPixelForValue(p[d]);g.skip=isNaN(m)||isNaN(b),c&&(g.options=l||this.resolveDataElementOptions(u,f.active?"active":n),o&&(g.options.radius=0)),this.updateElement(f,u,g,n)}}resolveDataElementOptions(t,e){const s=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return e!=="active"&&(n.radius=0),n.radius+=L(s&&s._custom,o),n}}ai.id="bubble";ai.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};ai.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Il(i,t,e){let s=1,n=1,o=0,a=0;if(t<j){const r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(x,v,y)=>xe(x,r,l,!0)?1:Math.max(v,v*e,y,y*e),p=(x,v,y)=>xe(x,r,l,!0)?-1:Math.min(v,v*e,y,y*e),g=f(0,c,d),m=f(q,h,u),b=p(U,c,d),_=p(U+q,h,u);s=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,a=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}class ie extends pt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(F(s[t])){const{key:l="value"}=this._parsing;o=c=>+Tt(s[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)n._parsed[a]=o(a)}}_getRotation(){return ft(this.options.rotation-90)}_getCircumference(){return ft(this.options.circumference)}_getRotationExtents(){let t=j,e=-j;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),a=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-a)/2,0),l=Math.min(Ta(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=Il(d,h,l),m=(s.width-a)/u,b=(s.height-a)/f,_=Math.max(Math.min(m,b)/2,0),x=Un(this.options.radius,_),v=Math.max(x*l,0),y=(x-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=g*x,n.total=this.calculateTotal(),this.outerRadius=x-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/j)}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+s;
16++_){const x=this._circumference(_,o),v=t[_],y={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+x,circumference:x,outerRadius:p,innerRadius:f};m&&(y.options=g||this.resolveDataElementOptions(_,v.active?"active":n)),b+=x,this.updateElement(v,_,y,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?j*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Me(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){a=s.getDatasetMeta(n),t=a.data,r=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(L(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ie.id="doughnut";ie.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};ie.descriptors={_scriptable:i=>i!=="spacing",_indexable:i=>i!=="spacing"};ie.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{const a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label;const e=": "+i.formattedValue;return $(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};class ri extends pt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=to(e,n,a);this._drawStart=r,this._drawCount=l,eo(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=Jt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none";let _=e>0&&this.getParsed(e-1);for(let x=e;x<e+s;++x){const v=t[x],y=this.getParsed(x),S=b?v:{},M=B(y[f]),D=S[u]=a.getPixelForValue(y[u],x),C=S[f]=o||M?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,y,l):y[f],x);S.skip=isNaN(D)||isNaN(C)||M,S.stop=x>0&&Math.abs(y[u]-_[u])>m,g&&(S.parsed=y,S.raw=c.data[x]),d&&(S.options=h||this.resolveDataElementOptions(x,v.active?"active":n)),b||this.updateElement(v,x,S,n),_=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ri.id="line";ri.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};ri.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class li extends pt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Me(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return po.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*U;let f=u,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)f+=this._computeAngle(p,n,g);for(p=e;p<e+s;p++){const m=t[p];let b=f,_=f+this._computeAngle(p,n,g),x=a.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=_,o&&(l.animateScale&&(x=0),l.animateRotate&&(b=_=u));const v={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:b,endAngle:_,options:this.resolveDataElementOptions(p,m.active?"active":n)};this.updateElement(m,p,v,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((s,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?ft(this.resolveDataElementOptions(t,e).angle||s):0}}li.id="polarArea";li.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};li.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{const a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update(
16)}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class us extends ie{}us.id="pie";us.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ci extends pt{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return po.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r<e+s;r++){const l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":n),h=o.getPointPositionForValue(r,this.getParsed(r).r),d=a?o.xCenter:h.x,u=a?o.yCenter:h.y,f={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,r,f,n)}}}ci.id="radar";ci.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};ci.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class gt{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Jt(this.x)&&Jt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}gt.defaults={};gt.defaultRoutes=void 0;const Mo={values(i){return $(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Fl(i,e)}const a=dt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Me(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=i/Math.pow(10,Math.floor(dt(i)));return s===1||s===2||s===5?Mo.numeric.call(this,i,t,e):""}};function Fl(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var hi={formatters:Mo};z.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:hi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});z.route("scale.ticks","color","","color");z.route("scale.grid","color","","borderColor");z.route("scale.grid","borderColor","","borderColor");z.route("scale.title","color","","color");z.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});z.describe("scales",{_fallback:"scale"});z.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function zl(i,t){const e=i.options.ticks,s=e.maxTicksLimit||Bl(i),n=e.major.enabled?Nl(t):[],o=n.length,a=n[0],r=n[o-1],l=[];if(o>s)return Vl(t,l,n,o/s),l;const c=Wl(n,t,s);if(o>0){let h,d;const u=o>1?Math.round((r-a)/(o-1)):null;for(Fe(t,l,c,B(u)?0:a-u,a),h=0,d=o-1;h<d;h++)Fe(t,l,c,n[h],n[h+1]);return Fe(t,l,c,r,B(u)?t.length:r+u),l}return Fe(t,l,c),l}function Bl(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function Wl(i,t,e){const s=jl(i),n=t.length/e;if(!s)return Math.max(n,1);const o=Wa(s);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>n)return l}return Math.max(n,1)}function Nl(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function Vl(i,t,e,s){let n=0,o=e[0],a;for(s=Math.ceil(s),a=0;a<i.length;a++)a===o&&(t.push(i[a]),n++,o=e[n*s])}function Fe(i,t,e,s,n){const o=L(s,0),a=Math.min(L(n,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(c=Math.max(o,0);c<a;c++)c===h&&(t.push(i[c]),r++,h=Math.round(o+r*e))}function jl(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Hl=i=>
vendor: 20,631 bytes, line 16
16i==="left"?"right":i==="right"?"left":i,en=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function sn(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function $l(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-r||l>a+r)))return l}function Yl(i,t){V(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function re(i){return i.drawTicks?i.tickLength:0}function nn(i,t){if(!i.display)return 0;const e=et(i.font,t),s=at(i.padding);return($(i.text)?i.text.length:1)*e.lineHeight+s.height}function Ul(i,t){return Et(i,{scale:t,type:"scale"})}function Xl(i,t,e){return Et(i,{tick:e,index:t,type:"tick"})}function Kl(i,t,e){let s=ss(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Hl(s)),s}function ql(i,t,e,s){const{top:n,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=a-n,m=r-o;if(i.isHorizontal()){if(f=st(s,o,r),F(e)){const b=Object.keys(e)[0],_=e[b];p=h[b].getPixelForValue(_)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=en(i,e,t);u=r-o}else{if(F(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=en(i,e,t);p=st(s,a,n),d=e==="left"?-q:q}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Ut extends gt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=ht(t,Number.POSITIVE_INFINITY),e=ht(e,Number.NEGATIVE_INFINITY),s=ht(s,Number.POSITIVE_INFINITY),n=ht(n,Number.NEGATIVE_INFINITY),{min:ht(t,s),max:ht(e,n),minDefined:Z(t),maxDefined:Z(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:s};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(s=Math.max(s,a.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:ht(e,ht(s,e)),max:ht(s,ht(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){H(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dr(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?sn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=zl(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){H(this.options.afterUpdate,[this])}beforeSetDimensions(){H(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){H(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),H(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){H(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=H(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){H(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){H(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=this.ticks.length,n=e.minRotation||0,o=e.maxRotation;let a=n,r,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=it(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-re(t.grid)-e.padding-nn(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=es(Math.min(Math.asin(it((h.highest.height+6)/r,-1,1)),Math.asin(it(l/c,-1,1))-Math.asin(it(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){H(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){H(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=nn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=re(o)+l):(t.height=this.maxHeight,t.width=re(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=ft(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){const b=s.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){H(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)B(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=sn(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length)}return t}_computeLabelSizes(t,e){const{ctx:s,_longestTextCache:n}=this,o=[],a=[];let r=0,l=0,c,h,d,u,f,p,g,m,b,_,x;for(c=0;c<e;++c){if(u=t[c].label,f=this._resolveTickFontOptions(c),s.font=p=f.string,g=n[p]=n[p]||{data:{},gc:[]},m=f.lineHeight,b=_=0,!B(u)&&!$(u))b=Ke(s,g.data,g.gc,b,u),_=m;else if($(u))for(h=0,d=u.length;h<d;++h)x=u[h],!B(x)&&!$(x)&&(b=Ke(s,g.data,g.gc,b,x),_+=m);o.push(b),a.push(_),r=Math.max(b,r),l=Math.max(_,l)}Yl(n,e);const v=o.indexOf(r),y=a.indexOf(l),S=M=>({width:o[M]||0,height:a[M]||0});return{first:S(0),last:S(e-1),widest:S(v),highest:S(y),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ja(this._alignToPixels?Bt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=Xl(this.getContext(),t,s))}return this.$context||(this.$context=Ul(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ft(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),d=re(o),u=[],f=o.setContext(this.getContext()),p=f.drawBorder?f.borderWidth:0,g=p/2,m=function(P){return Bt(s,P,p)};let b,_,x,v,y,S,M,D,C,A,I,R;if(a==="top")b=m(this.bottom),S=this.bottom-d,D=b-g,A=m(t.top)+g,R=t.bottom;else if(a==="bottom")b=m(this.top),A=t.top,R=m(t.bottom)-g,S=b+g,D=this.top+d;else if(a==="left")b=m(this.right),y=this.right-d,M=b-g,C=m(t.left)+g,I=t.right;else if(a==="right")b=m(this.left),C=t.left,I=m(t.right)-g,y=b+g,M=this.left+d;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(F(a)){const P=Object.keys(a)[0],J=a[P];b=m(this.chart.scales[P].getPixelForValue(J))}A=t.top,R=t.bottom,S=b+g,D=S+d}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(F(a)){const P=Object.keys(a)[0],J=a[P];b=m(this.chart.scales[P].getPixelForValue(J))}y=b-g,M=y-d,C=t.left,I=t.right}const K=L(n.ticks.maxTicksLimit,h),E=Math.max(1,Math.ceil(h/K));for(_=0;_<h;_+=E){const P=o.setContext(this.getContext(_)),J=P.lineWidth,G=P.color,zt=P.borderDash||[],bi=P.borderDashOffset,Kt=P.tickWidth,Oe=P.tickColor,qt=P.tickBorderDash||[],se=P.tickBorderDashOffset;x=$l(this,_,r),x!==void 0&&(v=Bt(s,x,J),l?y=M=C=I=v:S=D=A=R=v,u.push({tx1:y,ty1:S,tx2:M,ty2:D,x1:C,y1:A,x2:I,y2:R,width:J,color:G,borderDash:zt,borderDashOffset:bi,tickWidth:Kt,tickColor:Oe,tickBorderDash:qt,tickBorderDashOffset:se}))}return this._ticksLength=h,this._borderValue=b,u}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=re(s.grid),f=u+h,p=d?-h:f,g=-ft(this.labelRotation),m=[];let b,_,x,v,y,S,M,D,C,A,I,R,K="middle";if(n==="top")S=this.bottom-p,M=this._getXAxisLabelAlignment();else if(n==="bottom")S=this.top+p,M=this._getXAxisLabelAlignment();else if(n==="left"){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,y=P.x}else if(n==="right"){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,y=P.x}else if(e==="x"){if(n==="center")S=(t.top+t.bottom)/2+f;else if(F(n)){const P=Object.keys(n)[0],J=n[P];S=this.chart.scales[P].getPixelForValue(J)+f}M=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")y=(t.left+t.right)/2-f;else if(F(n)){const P=Object.keys(n)[0],J=n[P];y=this.chart.scales[P].getPixelForValue(J)}M=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?K="top":l==="end"&&(K="bottom"));const E=this._getLabelSizes();for(b=0,_=r.length;b<_;++b){x=r[b],v=x.label;const P=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,C=this._resolveTickFontOptions(b),A=C.lineHeight,I=$(v)?v.length:1;const J=I/2,G=P.color,zt=P.textStrokeColor,bi=P.textStrokeWidth;let Kt=M;a?(y=D,M==="inner"&&(b===_-1?Kt=this.options.reverse?"left":"right":b===0?Kt=this.options.reverse?"right":"left":Kt="center"),n==="top"?c==="near"||g!==0?R=-I*A+A/2:c==="center"?R=-E.highest.height/2-J*A+A:R=-E.highest.height+A/2:c==="near"||g!==0?R=A/2:c==="center"?R=E.highest.height/2-J*A:R=E.highest.height-I*A,d&&(R*=-1)):(S=D,R=(1-I)*A/2);let Oe;if(P.showLabelBackdrop){const qt=at(P.backdropPadding),se=E.heights[b],_i=E.widths[b];let yi=S+R-qt.top,xi=y-qt.left;switch(K){case"middle":yi-=se/2;break;case"bottom":yi-=se;break}switch(M){case"center":xi-=_i/2;break;case"right":xi-=_i;break}Oe={left:xi,top:yi,width:_i+qt.width,height:se+qt.height,color:P.backdropColor}}m.push({rotation:g,label:v,font:C,color:G,strokeColor:zt,strokeWidth:bi,textOffset:R,textAlign:Kt,textBaseline:K,translation:[y,S],backdrop:Oe})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ft(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:s}}=this,n=s.setContext(this.getContext()),o=s.drawBorder?n.borderWidth:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,h,d;this.isHorizontal()?(l=Bt(t,this.left,o)-o/2,c=Bt(t,this.right,a)+a/2,h=d=r):(h=Bt(t,this.top,o)-o/2,d=Bt(t,this.bottom,a)+a/2,l=c=r),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(l,h),e.lineTo(c,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&ii(s,n);const o=this._labelItems||(this._labelItems=this._computeLabelItems(t));let a,r;for(a=0,r=o.length;a<r;++a){const l=o[a],c=l.font,h=l.label;l.backdrop&&(s.fillStyle=l.backdrop.color,s.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let d=l.textOffset;Yt(s,h,0,d,c,l)}n&&si(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=et(s.font),a=at(s.padding),r=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||F(e)?(l+=a.bottom,$(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=ql(this,l,e,r);Yt(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:Kl(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=L(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==Ut.prototype.draw?[{z:e,draw:n=>{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[s]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return et(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ze{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;Zl(e)&&(s=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Gl(t,a,s),this.override&&z.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in z[n]&&(delete z[n][s],this.override&&delete $t[s])}}function Gl(i,t,e){const s=ye(Object.create(null),[e?z.get(e):{},z.get(t),i.defaults]);z.set(t,s),i.defaultRoutes&&Ql(t,i.defaultRoutes),i.descriptors&&z.describe(t,i.descriptors)}function Ql(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");z.route(o,n,l,r)})}function Zl(i){return"id"in i&&"defaults"in i}class Jl{constructor(){this.controllers=new ze(pt,"datasets",!0),this.elements=new ze(gt,"elements"),this.plugins=new ze(Object,"plugins"),this.scales=new ze(Ut,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}
16removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):V(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=ts(t);H(s["before"+n],[],s),e[t](s),H(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var _t=new Jl;class di extends pt{update(t){const e=this._cachedMeta,{data:s=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=to(e,s,n);if(this._drawStart=o,this._drawCount=a,eo(e)&&(o=0,a=s.length),this.options.showLine){const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=s;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:c},t)}this.updateElements(s,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=_t.getElement("line")),super.addElements()}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(h),u=this.includeOptions(n,d),f=a.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,b=Jt(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||n==="none";let x=e>0&&this.getParsed(e-1);for(let v=e;v<e+s;++v){const y=t[v],S=this.getParsed(v),M=_?y:{},D=B(S[p]),C=M[f]=a.getPixelForValue(S[f],v),A=M[p]=o||D?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,S,l):S[p],v);M.skip=isNaN(C)||isNaN(A)||D,M.stop=v>0&&Math.abs(S[f]-x[f])>b,m&&(M.parsed=S,M.raw=c.data[v]),u&&(M.options=d||this.resolveDataElementOptions(v,y.active?"active":n)),_||this.updateElement(y,v,M,n),x=S}this.updateSharedOptions(d,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}di.id="scatter";di.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};di.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var tc=Object.freeze({__proto__:null,BarController:oi,BubbleController:ai,DoughnutController:ie,LineController:ri,PolarAreaController:li,PieController:us,RadarController:ci,ScatterController:di});function Wt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Bi{constructor(t){this.options=t||{}}init(t){}formats(){return Wt()}parse(t,e){return Wt()}format(t,e){return Wt()}add(t,e,s){return Wt()}diff(t,e,s){return Wt()}startOf(t,e,s){return Wt()}endOf(t,e){return Wt()}}Bi.override=function(i){Object.assign(Bi.prototype,i)};var ec={_date:Bi};function ic(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?Ha:Mt;if(s){if(n._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Ce(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:c,data:h}=o[r],{lo:d,hi:u}=ic(o[r],t,a,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function sc(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,a=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Pi(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Ce(i,e,t,function(r,l,c){!n&&!ve(r,i.chartArea,0)||r.inRange(t.x,t.y,s)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function nc(i,t,e,s){let n=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],s),{angle:d}=qn(a,{x:t.x,y:t.y});xe(d,c,h)&&n.push({element:a,datasetIndex:r,index:l})}return Ce(i,e,t,o),n}function oc(i,t,e,s,n,o){let a=[];const r=sc(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=r(t,p);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return Ce(i,e,t,c),a}function Oi(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?nc(i,t,e,n):oc(i,t,e,s,n,o)}function on(i,t,e,s,n){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return Ce(i,e,t,(l,c,h)=>{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}
vendor: 5,602 bytes, line 16
16),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var ac={evaluateInteractionItems:Ce,modes:{index(i,t,e,s){const n=Nt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Pi(i,n,o,s,a):Oi(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=Nt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Pi(i,n,o,s,a):Oi(i,n,o,!1,s,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(i,t,e,s){const n=Nt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return Pi(i,n,o,s,a)},nearest(i,t,e,s){const n=Nt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return Oi(i,n,o,e.intersect,s,a)},x(i,t,e,s){const n=Nt(t,i);return on(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=Nt(t,i);return on(i,n,"y",e.intersect,s)}}};const Co=["left","top","right","bottom"];function le(i,t){return i.filter(e=>e.pos===t)}function an(i,t){return i.filter(e=>Co.indexOf(e.pos)===-1&&e.box.axis===t)}function ce(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function rc(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function lc(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!Co.includes(n))continue;const a=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function cc(i,t){const e=lc(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];const{fullSize:l}=r.box,c=e[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:l&&t.availableHeight)}return e}function hc(i){const t=rc(i),e=ce(t.filter(c=>c.box.fullSize),!0),s=ce(le(t,"left"),!0),n=ce(le(t,"right")),o=ce(le(t,"top"),!0),a=ce(le(t,"bottom")),r=an(t,"x"),l=an(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:le(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function rn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function Do(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function dc(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!F(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&Do(a,o.getPadding());const r=Math.max(0,t.outerWidth-rn(a,i,"left","right")),l=Math.max(0,t.outerHeight-rn(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function uc(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function fc(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function fe(i,t,e,s){const n=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,fc(r.horizontal,t));const{same:d,other:u}=dc(t,e,r,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(r)}return c&&fe(n,t,e,s)||h}function Be(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function ln(i,t,e,s){const n=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=s[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){const d=t.w*h,u=c.size||l.height;ut(c.start)&&(a=c.start),l.fullSize?Be(l,n.left,a,e.outerWidth-n.right-n.left,u):Be(l,t.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*h,u=c.size||l.width;ut(c.start)&&(o=c.start),l.fullSize?Be(l,o,n.top,u,e.outerHeight-n.bottom-n.top):Be(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}z.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ot={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=at(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=hc(i.boxes),l=r.vertical,c=r.horizontal;V(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);Do(u,at(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=cc(l.concat(c),d);fe(r.fullSize,f,d,p),fe(l,f,d,p),fe(c,f,d,p)&&fe(l,f,d,p),uc(f),ln(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,ln(r.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},V(r.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Po{acquireContext(t,e){}releaseContext(t){return!1}
vendor: 8,726 bytes, line 16
16addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class pc extends Po{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const He="$chartjs",gc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cn=i=>i===null||i==="";function mc(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[He]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",cn(n)){const o=Ns(i,"width");o!==void 0&&(i.width=o)}if(cn(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Ns(i,"height");o!==void 0&&(i.height=o)}return i}const Oo=Gr?{passive:!0}:!1;function bc(i,t,e){i.addEventListener(t,e,Oo)}function _c(i,t,e){i.canvas.removeEventListener(t,e,Oo)}function yc(i,t){const e=gc[i.type]||i.type,{x:s,y:n}=Nt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Ge(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function xc(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ge(r.addedNodes,s),a=a&&!Ge(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function vc(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ge(r.removedNodes,s),a=a&&!Ge(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const we=new Map;let hn=0;function Ao(){const i=window.devicePixelRatio;i!==hn&&(hn=i,we.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function kc(i,t){we.size||window.addEventListener("resize",Ao),we.set(i,t)}function wc(i){we.delete(i),we.size||window.removeEventListener("resize",Ao)}function Sc(i,t,e){const s=i.canvas,n=s&&ds(s);if(!n)return;const o=Jn((r,l)=>{const c=n.clientWidth;e(r,l),c<n.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),kc(i,o),a}function Ai(i,t,e){e&&e.disconnect(),t==="resize"&&wc(i)}function Mc(i,t,e){const s=i.canvas,n=Jn(o=>{i.ctx!==null&&e(yc(o,i))},i,o=>{const a=o[0];return[a,a.offsetX,a.offsetY]});return bc(s,t,n),n}class Cc extends Po{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(mc(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[He])return!1;const s=e[He].initial;["height","width"].forEach(o=>{const a=s[o];B(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[He],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:xc,detach:vc,resize:Sc}[e]||Mc;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Ai,detach:Ai,resize:Ai}[e]||_c)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return qr(t,e,s,n)}isAttached(t){const e=ds(t);return!!(e&&e.isConnected)}}function Dc(i){return!mo()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?pc:Cc}class Pc{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(const o of t){const a=o.plugin,r=a[s],l=[e,n,o.options];if(H(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){B(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=L(s.options&&s.options.plugins,{}),o=Oc(s);return n===!1&&!e?[]:Tc(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Oc(i){const t={},e=[],s=Object.keys(_t.plugins.items);for(let o=0;o<s.length;o++)e.push(_t.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function Ac(i,t){return!t&&i===!1?null:i===!0?{}:i}function Tc(i,{plugins:t,localIds:e},s,n){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=Ac(s[l],n);c!==null&&o.push({plugin:r,options:Lc(i.config,{plugin:r,local:e[l]},c,a)})}return o}function Lc(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wi(i,t){const e=z.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Rc(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Ec(i,t){return i===t?"_index_":"_value_"}function Ic(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ni(i,t){return i==="x"||i==="y"?i:t.axis||Ic(t.position)||i.charAt(0).toLowerCase()}function Fc(i,t){const e=$t[i.type]||{scales:{}},s=t.scales||{},n=Wi(i.type,t),o=Object.create(null),a=Object.create(null);return Object.keys(s).forEach(r=>{const l=s[r];if(!F(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=Ni(r,l),h=Ec(c,n),d=e.scales||{};o[c]=o[c]||r,a[r]=pe(Object.create(null),[{axis:c},l,d[c],d[h]])}),i.data.datasets.forEach(r=>{const l=r.type||i.type,c=r.indexAxis||Wi(l,t),d=($t[l]||{}).scales||{};Object.keys(d).forEach(u=>{const f=Rc(u,c),p=r[f+"AxisID"]||o[f]||f;a[p]=a[p]||Object.create(null),pe(a[p],[{axis:f},s[p],d[u]])})}),Object.keys(a).forEach(r=>{const l=a[r];pe(l,[z.scales[l.type],z.scale])}),a}function To(i){const t=i.options||(i.options={});t.plugins=L(t.plugins,{}),t.scales=Fc(i,t)}function Lo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function zc(i){return i=i||{},i.data=Lo(i.data),To(i),i}const dn=new Map,Ro=new Set;function We(i,t){let e=dn.get(i);return e||(e=t(),dn.set(i,e),Ro.add(e)),e}const he=(i,t,e)=>{const s=Tt(t,e);s!==void 0&&i.add(s)};class Bc{constructor(t){this._config=zc(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Lo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),To(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return We(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return We(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return We(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return We(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>he(l,t,d))),h.forEach(d=>he(l,n,d)),h.forEach(d=>he(l,$t[o]||{},d)),h.forEach(d=>he(l,z,d)),h.forEach(d=>he(l,Fi,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ro.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,$t[e]||{},z.datasets[e]||{},{type:e},z,Fi]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=un(this._resolverCache,t,n);let l=a;if(Nc(a,e)){o.$shared=!1,s=Lt(s)?s():s;const c=this.createResolver(t,s,r);l=te(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=un(this._resolverCache,t,s);return F(e)?te(o,e,void 0,n):o}}function un(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);
vendor: 14,163 bytes, line 16
16return o||(o={resolver:ls(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const Wc=i=>F(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Lt(i[e]),!1);function Nc(i,t){const{isScriptable:e,isIndexable:s}=co(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(Lt(r)||Wc(r))||a&&$(r))return!0}return!1}var Vc="3.9.1";const jc=["top","bottom","left","right","chartArea"];function fn(i,t){return i==="top"||i==="bottom"||jc.indexOf(i)===-1&&t==="x"}function pn(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function gn(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),H(e&&e.onComplete,[i],t)}function Hc(i){const t=i.chart,e=t.options.animation;H(e&&e.onProgress,[i],t)}function Eo(i){return mo()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Qe={},Io=i=>{const t=Eo(i);return Object.values(Qe).filter(e=>e.canvas===t).pop()};function $c(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function Yc(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}class Xt{constructor(t,e){const s=this.config=new Bc(e),n=Eo(t),o=Io(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Dc(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Aa(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Pc,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ua(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Qe[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}vt.listen(this,"complete",gn),vt.listen(this,"progress",Hc),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return B(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ws(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Fs(this.canvas,this.ctx),this}stop(){return vt.stop(this),this}resize(t,e){vt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ws(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),H(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};V(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Ni(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),V(o,a=>{const r=a.options,l=r.id,c=Ni(l,r),h=L(r.type,a.dtype);(r.position===void 0||fn(r.position,c)!==fn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=_t.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),V(n,(a,r)=>{a||delete s[r]}),V(s,a=>{ot.configure(this,a,a.options),ot.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(pn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let a=this.getDatasetMeta(s);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||Wi(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{const l=_t.getController(r),{datasetElementType:c,dataElementType:h}=z.datasets[r];Object.assign(l.prototype,{dataElementType:_t.getElement(h),datasetElementType:c&&_t.getElement(c)}),a.controller=new l(this,s),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){V(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||V(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(pn("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){V(this.scales,t=>{ot.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Ss(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;$c(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!Ss(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ot.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],V(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(vt.has(this)?this.attached&&!vt.running(this)&&vt.start(this):(this.draw(),gn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resize(s,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&s.push(a)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,n=!s.disabled,o=this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&ii(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&si(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return ve(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=ac.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Et(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);ut(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),vt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Fs(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Qe[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};V(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){V(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},V(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!$e(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Fa(t),c=Yc(t,this._lastEvent,s,l);s&&(this._lastEvent=null,H(o.onHover,[t,r,this],this),l&&H(o.onClick,[t,r,this],this));const h=!$e(r,n);
vendor: 4,303 bytes, line 16
16return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}const mn=()=>V(Xt.instances,i=>i._plugins.invalidate()),Ct=!0;Object.defineProperties(Xt,{defaults:{enumerable:Ct,value:z},instances:{enumerable:Ct,value:Qe},overrides:{enumerable:Ct,value:$t},registry:{enumerable:Ct,value:_t},version:{enumerable:Ct,value:Vc},getChart:{enumerable:Ct,value:Io},register:{enumerable:Ct,value:(...i)=>{_t.add(...i),mn()}},unregister:{enumerable:Ct,value:(...i)=>{_t.remove(...i),mn()}}});function Fo(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+q,s-q),i.closePath(),i.clip()}function Uc(i){return rs(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Xc(i,t,e,s){const n=Uc(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{const c=(e-Math.min(o,l))*s/2;return it(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:it(n.innerStart,0,a),innerEnd:it(n.innerEnd,0,a)}}function Qt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Vi(i,t,e,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const p=n-l;if(s){const P=h>0?h-s:0,J=d>0?d-s:0,G=(P+J)/2,zt=G!==0?p*G/(G+s):p;f=(p-zt)/2}const g=Math.max(.001,p*d-e/U)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:x,outerEnd:v,innerStart:y,innerEnd:S}=Xc(t,u,d,_-b),M=d-x,D=d-v,C=b+x/M,A=_-v/D,I=u+y,R=u+S,K=b+y/I,E=_-S/R;if(i.beginPath(),o){if(i.arc(a,r,d,C,A),v>0){const G=Qt(D,A,a,r);i.arc(G.x,G.y,v,A,_+q)}const P=Qt(R,_,a,r);if(i.lineTo(P.x,P.y),S>0){const G=Qt(R,E,a,r);i.arc(G.x,G.y,S,_+q,E+Math.PI)}if(i.arc(a,r,u,_-S/u,b+y/u,!0),y>0){const G=Qt(I,K,a,r);i.arc(G.x,G.y,y,K+Math.PI,b-q)}const J=Qt(M,b,a,r);if(i.lineTo(J.x,J.y),x>0){const G=Qt(M,C,a,r);i.arc(G.x,G.y,x,b-q,C)}}else{i.moveTo(a,r);const P=Math.cos(C)*d+a,J=Math.sin(C)*d+r;i.lineTo(P,J);const G=Math.cos(A)*d+a,zt=Math.sin(A)*d+r;i.lineTo(G,zt)}i.closePath()}function Kc(i,t,e,s,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){Vi(i,t,e,s,a+j,n);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+r%j,r%j===0&&(l+=j))}return Vi(i,t,e,s,l,n),i.fill(),l}function qc(i,t,e){const{x:s,y:n,startAngle:o,pixelMargin:a,fullCircles:r}=t,l=Math.max(t.outerRadius-a,0),c=t.innerRadius+a;let h;for(e&&Fo(i,t,o+j),i.beginPath(),i.arc(s,n,c,o+j,o,!0),h=0;h<r;++h)i.stroke();for(i.beginPath(),i.arc(s,n,l,o,o+j),h=0;h<r;++h)i.stroke()}function Gc(i,t,e,s,n,o){const{options:a}=t,{borderWidth:r,borderJoinStyle:l}=a,c=a.borderAlign==="inner";r&&(c?(i.lineWidth=r*2,i.lineJoin=l||"round"):(i.lineWidth=r,i.lineJoin=l||"bevel"),t.fullCircles&&qc(i,t,c),c&&Fo(i,t,n),Vi(i,t,e,s,n,o),i.stroke())}class ui extends gt{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:a}=qn(n,{x:t,y:e}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=this.options.spacing/2,p=L(d,l-r)>=j||xe(o,r,l),g=St(a,c+u,h+u);return p&&g}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>j?Math.floor(s/j):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;const c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*r,Math.sin(c)*r),this.circumference>=U&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const l=Kc(t,this,r,o,a);
vendor: 4,511 bytes, line 16
16Gc(t,this,r,o,l,a),t.restore()}}ui.id="arc";ui.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};ui.defaultRoutes={backgroundColor:"backgroundColor"};function zo(i,t,e=t){i.lineCap=L(e.borderCapStyle,t.borderCapStyle),i.setLineDash(L(e.borderDash,t.borderDash)),i.lineDashOffset=L(e.borderDashOffset,t.borderDashOffset),i.lineJoin=L(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=L(e.borderWidth,t.borderWidth),i.strokeStyle=L(e.borderColor,t.borderColor)}function Qc(i,t,e){i.lineTo(e.x,e.y)}function Zc(i){return i.stepped?yr:i.tension||i.cubicInterpolationMode==="monotone"?xr:Qc}function Bo(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=n<a&&o<a||n>r&&o>r;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function Jc(i,t,e,s){const{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Bo(n,e,s),h=Zc(o);let{move:d=!0,reverse:u}=s||{},f,p,g;for(f=0;f<=c;++f)p=n[(r+(u?c-f:f))%a],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=n[(r+(u?c:0))%a],h(i,g,p,u,o.stepped)),!!l}function th(i,t,e,s){const n=t.points,{count:o,start:a,ilen:r}=Bo(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,p,g,m,b;const _=v=>(a+(c?r-v:v))%o,x=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;const v=f.x,y=f.y,S=v|0;S===p?(y<g?g=y:y>m&&(m=y),h=(d*h+v)/++d):(x(),i.lineTo(v,y),p=S,d=0,g=m=y),b=y}x()}function ji(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?th:Jc}function eh(i){return i.stepped?Qr:i.tension||i.cubicInterpolationMode==="monotone"?Zr:Vt}function ih(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),zo(i,t.options),i.stroke(n)}function sh(i,t,e,s){const{segments:n,options:o}=t,a=ji(t);for(const r of n)zo(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const nh=typeof Path2D=="function";function oh(i,t,e,s){nh&&!t.options.segment?ih(i,t,e,s):sh(i,t,e,s)}class It extends gt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Hr(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ol(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,a=vo(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=eh(s);let c,h;for(c=0,h=a.length;c<h;++c){const{start:d,end:u}=a[c],f=o[d],p=o[u];if(f===p){r.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,s.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,s){return ji(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=ji(this);let a=this._loop;e=e||0,s=s||this.points.length-e;for(const r of n)a&=o(t,this,r,{start:e,end:e+s-1});return!!a}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),oh(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}It.id="line";It.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};It.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};It.descriptors={_scriptable:!0,_indexable:i=>i!=="borderDash"&&i!=="fill"};function bn(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class fi extends gt{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:a}=this.getProps(["x","y"],s);
vendor: 39,843 bytes, lines 16-18
16return Math.pow(t-o,2)+Math.pow(e-a,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return bn(this,t,"x",e)}inYRange(t,e){return bn(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){const s=this.options;this.skip||s.radius<.1||!ve(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,zi(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}fi.id="point";fi.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};fi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Wo(i,t){const{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function Pt(i,t,e,s){return i?0:it(t,e,s)}function ah(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=lo(s);return{t:Pt(n.top,o.top,0,e),r:Pt(n.right,o.right,0,t),b:Pt(n.bottom,o.bottom,0,e),l:Pt(n.left,o.left,0,t)}}function rh(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=jt(n),a=Math.min(t,e),r=i.borderSkipped,l=s||F(n);return{topLeft:Pt(!l||r.top||r.left,o.topLeft,0,a),topRight:Pt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Pt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Pt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function lh(i){const t=Wo(i),e=t.right-t.left,s=t.bottom-t.top,n=ah(i,e/2,s/2),o=rh(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Ti(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&Wo(i,s);return r&&(n||St(t,r.left,r.right))&&(o||St(e,r.top,r.bottom))}function ch(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function hh(i,t){i.rect(t.x,t.y,t.w,t.h)}function Li(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class pi extends gt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=lh(this),r=ch(a.radius)?ke:hh;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Li(a,e,o)),t.clip(),r(t,Li(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,Li(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Ti(this,t,e,s)}inXRange(t,e){return Ti(this,t,null,e)}inYRange(t,e){return Ti(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}pi.id="bar";pi.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};pi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var dh=Object.freeze({__proto__:null,ArcElement:ui,LineElement:It,PointElement:fi,BarElement:pi});function uh(i,t,e,s,n){const o=n.samples||s;if(o>=e)return i.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,d,u,f,p,g;for(a[l++]=i[h],d=0;d<o-2;d++){let m=0,b=0,_;const x=Math.floor((d+1)*r)+1+t,v=Math.min(Math.floor((d+2)*r)+1,e)+t,y=v-x;for(_=x;_<v;_++)m+=i[_].x,b+=i[_].y;m/=y,b/=y;const S=Math.floor(d*r)+1+t,M=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:D,y:C}=i[h];for(f=p=-1,_=S;_<M;_++)p=.5*Math.abs((D-m)*(i[_].y-C)-(D-i[_].x)*(b-C)),p>f&&(f=p,u=i[_],g=_);a[l++]=u,h=g}return a[l++]=i[c],a}function fh(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,p,g;const m=[],b=t+e-1,_=i[t].x,v=i[b].x-_;for(a=t;a<t+e;++a){r=i[a],l=(r.x-_)/v*s,c=r.y;const y=l|0;if(y===h)c<p?(p=c,d=a):c>g&&(g=c,u=a),n=(o*n+r.x)/++o;else{const S=a-1;if(!B(d)&&!B(u)){const M=Math.min(d,u),D=Math.max(d,u);M!==f&&M!==S&&m.push({...i[M],x:n}),D!==f&&D!==S&&m.push({...i[D],x:n})}a>0&&S!==f&&m.push(i[S]),m.push(r),h=y,o=0,p=g=c,d=u=f=a}}return m}function No(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function _n(i){i.data.datasets.forEach(t=>{No(t)})}function ph(i,t){const e=t.length;let s=0,n;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=it(Mt(t,o.axis,a).lo,0,e-1)),c?n=it(Mt(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var gh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){_n(i);return}const s=i.width;i.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(ue([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=ph(l,c);const f=e.threshold||4*s;if(u<=f){No(n);return}B(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=uh(c,d,u,s,e);break;case"min-max":p=fh(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=p})},destroy(i){_n(i)}};function mh(i,t,e){const s=i.segments,n=i.points,o=t.points,a=[];for(const r of s){let{start:l,end:c}=r;c=fs(l,c,n);const h=Hi(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}const d=vo(t,h);for(const u of d){const f=Hi(e,o[u.start],o[u.end],u.loop),p=xo(r,n,f);for(const g of p)a.push({source:g,target:u,start:{[e]:yn(h,f,"start",Math.max)},end:{[e]:yn(h,f,"end",Math.min)}})}}return a}function Hi(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=lt(n),o=lt(o)),{property:i,start:n,end:o}}function bh(i,t){const{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=fs(a,r,n);const l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function fs(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function yn(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Vo(i,t){let e=[],s=!1;return $(i)?(s=!0,e=i):e=bh(i,t),e.length?new It({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function xn(i){return i&&i.fill!==!1}function _h(i,t,e){let n=i[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!Z(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function yh(i,t,e){const s=wh(i);if(F(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return Z(n)&&Math.floor(n)===n?xh(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function xh(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function vh(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:F(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function kh(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:F(i)?s=i.value:s=t.getBaseValue(),s}function wh(i){const t=i.options,e=t.fill;let s=L(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Sh(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=Mh(t,e);r.push(Vo({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Ch(n,a[h],r)}return new It({points:n,options:{}})}function Mh(i,t){const e=[],s=i.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const o=s[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Ch(i,t,e){const s=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:r,point:l}=Dh(o,t,"x");if(!(!l||a&&r)){if(a)s.unshift(l);else if(i.push(l),!r)break}}i.push(...s)}function Dh(i,t,e){const s=i.interpolate(t,e);if(!s)return{};const n=s[e],o=i.segments,a=i.points;let r=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=a[h.start][e],u=a[h.end][e];if(St(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:s}}class jo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,s){const{x:n,y:o,radius:a}=this;return e=e||{start:0,end:j},t.arc(n,o,a,e.end,e.start,!0),!s.bounds}interpolate(t){const{x:e,y:s,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function Ph(i){const{chart:t,fill:e,line:s}=i;if(Z(e))return Oh(t,e);if(e==="stack")return Sh(i);if(e==="shape")return!0;const n=Ah(i);return n instanceof jo?n:Vo(n,s)}function Oh(i,t){const e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function Ah(i){return(i.scale||{}).getPointPositionForValue?Lh(i):Th(i)}function Th(i){const{scale:t={},fill:e}=i,s=vh(e,t);if(Z(s)){const n=t.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function Lh(i){const{scale:t,fill:e}=i,s=t.options,n=t.getLabels().length,o=s.reverse?t.max:t.min,a=kh(e,t,o),r=[];if(s.grid.circular){const l=t.getPointPositionForValue(0,o);return new jo({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<n;++l)r.push(t.getPointPositionForValue(l,a));return r}function Ri(i,t,e){const s=Ph(t),{line:n,scale:o,axis:a}=t,r=n.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};s&&n.points.length&&(ii(i,e),Rh(i,{line:n,target:s,above:h,below:d,area:e,scale:o,axis:a}),si(i))}function Rh(i,t){const{line:e,target:s,above:n,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==n&&(vn(i,s,a.top),kn(i,{line:e,target:s,color:n,scale:r,property:l}),i.restore(),i.save(),vn(i,s,a.bottom)),kn(i,{line:e,target:s,color:o,scale:r,property:l}),i.restore()}function vn(i,t,e){const{segments:s,points:n}=t;let o=!0,a=!1;i.beginPath();for(const r of s){const{start:l,end:c}=r,h=n[l],d=n[fs(l,c,n)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,e),i.lineTo(h.x,h.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(d.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function kn(i,t){const{line:e,target:s,property:n,color:o,scale:a}=t,r=mh(e,s,n);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=s!==!0;i.save(),i.fillStyle=u,Eh(i,a,f&&Hi(n,h,d)),i.beginPath();const p=!!e.pathSegment(i,l);let g;if(f){p?i.closePath():wn(i,s,d,n);const m=!!s.pathSegment(i,c,{move:p,reverse:!0});g=p&&m,g||wn(i,s,h,n)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function Eh(i,t,e){const{top:s,bottom:n}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(i.beginPath(),i.rect(a,s,r-a,n-s),i.clip())}function wn(i,t,e,s){const n=t.interpolate(e,s);n&&i.lineTo(n.x,n.y)}var Ih={id:"filler",afterDatasetsUpdate(i,t,e){const s=(i.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<s;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof It&&(l={visible:i.isDatasetVisible(a),index:a,fill:yh(r,a,s),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=_h(n,a,e.propagate))},beforeDraw(i,t,e){const s=e.drawTime==="beforeDraw",n=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=n.length-1;a>=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&Ri(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;xn(o)&&Ri(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!xn(s)||e.drawTime!=="beforeDatasetDraw"||Ri(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Sn=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Fh=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Mn extends gt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=H(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=et(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Sn(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,o,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const _=s+e/2+o.measureText(m.text).width;b>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:n},u=Math.max(u,_),f+=n+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Zt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=st(s,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=st(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=st(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=st(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ii(t,this),this._draw(),si(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=z.color,l=Zt(t.rtl,this.left,this.width),c=et(a.font),{color:h,padding:d}=a,u=c.size,f=u/2;let p;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:b}=Sn(a,u),_=function(M,D,C){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;n.save();const A=L(C.lineWidth,1);if(n.fillStyle=L(C.fillStyle,r),n.lineCap=L(C.lineCap,"butt"),n.lineDashOffset=L(C.lineDashOffset,0),n.lineJoin=L(C.lineJoin,"miter"),n.lineWidth=A,n.strokeStyle=L(C.strokeStyle,r),n.setLineDash(L(C.lineDash,[])),a.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:A},R=l.xPlus(M,g/2),K=D+f;ro(n,I,R,K,a.pointStyleWidth&&g)}else{const I=D+Math.max((u-m)/2,0),R=l.leftForLtr(M,g),K=jt(C.borderRadius);n.beginPath(),Object.values(K).some(E=>E!==0)?ke(n,{x:R,y:I,w:g,h:m,radius:K}):n.rect(R,I,g,m),n.fill(),A!==0&&n.stroke()}n.restore()},x=function(M,D,C){Yt(n,C.text,M,D+b/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();v?p={x:st(o,this.left+d,this.right-s[0]),y:this.top+d+y,line:0}:p={x:this.left+d,y:st(o,this.top+y+d,this.bottom-e[0].height),line:0},bo(this.ctx,t.textDirection);const S=b+d;this.legendItems.forEach((M,D)=>{n.strokeStyle=M.fontColor||h,n.fillStyle=M.fontColor||h;const C=n.measureText(M.text).width,A=l.textAlign(M.textAlign||(M.textAlign=a.textAlign)),I=g+f+C;let R=p.x,K=p.y;l.setWidth(this.width),v?D>0&&R+I+d>this.right&&(K=p.y+=S,p.line++,R=p.x=st(o,this.left+d,this.right-s[p.line])):D>0&&K+S>this.bottom&&(R=p.x=R+e[p.line].width+d,p.line++,K=p.y=st(o,this.top+y+d,this.bottom-e[p.line].height));const E=l.x(R);_(E,K,M),R=Xa(A,R+g+f,v?R+I:this.right,t.rtl),x(l.x(R),K,M),v?p.x+=I+d:p.y+=S}),_o(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=et(e.font),n=at(e.padding);if(!e.display)return;const o=Zt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=st(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+st(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=st(r,d,d+u);a.textAlign=o.textAlign(ss(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Yt(a,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=et(t.font),s=at(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(St(t,this.left,this.right)&&St(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],St(t,n.left,n.left+n.width)&&St(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!zh(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=Fh(n,s);n&&!o&&H(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&H(e.onHover,[t,s,this],this)}else s&&H(e.onClick,[t,s,this],this)}}function zh(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Bh={id:"legend",_element:Mn,start(i,t,e){const s=i.legend=new Mn({ctx:i.ctx,options:e,chart:i});ot.configure(i,s,e),ot.addBox(i,s)},stop(i){ot.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;ot.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(a=>{const r=a.controller.getStyle(e?0:void 0),l=at(r.borderWidth);return{text:t[a.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:r.borderColor,pointStyle:s||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class ps extends gt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=$(s.text)?s.text.length:1;this._padding=at(s.padding);const o=n*et(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=st(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=st(r,n,e),l=U*-.5):(h=o-t,d=st(r,e,n),l=U*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=et(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Yt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:ss(e.align),textBaseline:"middle",translation:[a,r]})}}function Wh(i,t){const e=new ps({ctx:i.ctx,options:t,chart:i});ot.configure(i,e,t),ot.addBox(i,e),i.titleBlock=e}var Nh={id:"title",_element:ps,start(i,t,e){Wh(i,e)},stop(i){const t=i.titleBlock;ot.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ne=new WeakMap;var Vh={id:"subtitle",start(i,t,e){const s=new ps({ctx:i.ctx,options:e,chart:i});ot.configure(i,s,e),ot.addBox(i,s),Ne.set(i,s)},stop(i){ot.removeBox(i,Ne.get(i)),Ne.delete(i)},beforeUpdate(i,t,e){const s=Ne.get(i);ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _e={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();s+=r.x,n+=r.y,++o}}return{x:s/o,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o<a;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ei(t,c);h<n&&(n=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function mt(i,t){return t&&($(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function kt(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
17`)>-1?i.split(`
18`):i}function jh(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Cn(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=et(t.bodyFont),c=et(t.titleFont),h=et(t.footerFont),d=o.length,u=n.length,f=s.length,p=at(t.padding);let g=p.height,m=0,b=s.reduce((v,y)=>v+y.before.length+y.lines.length+y.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const x=function(v){m=Math.max(m,e.measureText(v).width+_)};return e.save(),e.font=c.string,V(i.title,x),e.font=l.string,V(i.beforeBody.concat(i.afterBody),x),_=t.displayColors?a+2+t.boxPadding:0,V(s,v=>{V(v.before,x),V(v.lines,x),V(v.after,x)}),_=0,e.font=h.string,V(i.footer,x),e.restore(),m+=p.width,{width:m,height:g}}function Hh(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function $h(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function Yh(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),$h(c,i,t,e)&&(c="center"),c}function Dn(i,t,e){const s=e.yAlign||t.yAlign||Hh(i,e);return{xAlign:e.xAlign||t.xAlign||Yh(i,t,e,s),yAlign:s}}function Uh(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Xh(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Pn(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=jt(a);let p=Uh(t,r);const g=Xh(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,u)+n:r==="right"&&(p+=Math.max(d,f)+n),{x:it(p,0,s.width-t.width),y:it(g,0,s.height-t.height)}}function Ve(i,t,e){const s=at(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function On(i){return mt([],kt(i))}function Kh(i,t,e){return Et(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function An(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}class $i extends gt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ko(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Kh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]);let r=[];return r=mt(r,kt(n)),r=mt(r,kt(o)),r=mt(r,kt(a)),r}getBeforeBody(t,e){return On(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:s}=e,n=[];return V(t,o=>{const a={before:[],lines:[],after:[]},r=An(s,o);mt(a.before,kt(r.beforeLabel.call(this,o))),mt(a.lines,r.label.call(this,o)),mt(a.after,kt(r.afterLabel.call(this,o))),n.push(a)}),n}getAfterBody(t,e){return On(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]);let r=[];return r=mt(r,kt(n)),r=mt(r,kt(o)),r=mt(r,kt(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(jh(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),V(r,h=>{const d=An(t.callbacks,h);n.push(d.labelColor.call(this,h)),o.push(d.labelPointStyle.call(this,h)),a.push(d.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=_e[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=Cn(this,s),c=Object.assign({},r,l),h=Dn(this.chart,s,c),d=Pn(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=jt(r),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,x,v,y;return o==="center"?(v=f+g/2,n==="left"?(m=u,b=m-a,x=v+a,y=v-a):(m=u+p,b=m+a,x=v-a,y=v+a),_=m):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+p-Math.max(c,d)-a:b=this.caretX,o==="top"?(x=f,v=x-a,m=b-a,_=b+a):(x=f+g,v=x+a,m=b+a,_=b-a),y=x),{x1:m,x2:b,x3:_,y1:x,y2:v,y3:y}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=Zt(s.rtl,this.x,this.width);for(t.x=Ve(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=et(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){const a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:c,boxPadding:h}=o,d=et(o.bodyFont),u=Ve(this,"left",o),f=n.x(u),p=l<d.lineHeight?(d.lineHeight-l)/2:0,g=e.y+p;if(o.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},b=n.leftForLtr(f,c)+c/2,_=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,zi(t,m,b,_),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,zi(t,m,b,_)}else{t.lineWidth=F(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const m=n.leftForLtr(f,c-h),b=n.leftForLtr(n.xPlus(f,1),c-h-2),_=jt(a.borderRadius);Object.values(_).some(x=>x!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ke(t,{x:m,y:g,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ke(t,{x:b,y:g+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=et(s.bodyFont);let u=d.lineHeight,f=0;const p=Zt(s.rtl,this.x,this.width),g=function(D){e.fillText(D,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(a);let b,_,x,v,y,S,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Ve(this,m,s),e.fillStyle=s.bodyColor,V(this.beforeBody,g),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,v=0,S=n.length;v<S;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,V(b.before,g),x=b.lines,r&&x.length&&(this._drawColorBox(e,t,v,p,s),u=Math.max(d.lineHeight,l)),y=0,M=x.length;y<M;++y)g(x[y]),u=d.lineHeight;V(b.after,g)}f=0,u=d.lineHeight,V(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let a,r;if(o){const l=Zt(s.rtl,this.x,this.width);for(t.x=Ve(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=et(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=jt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,s,n),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(r+c,l+h-p),e.quadraticCurveTo(r+c,l+h,r+c-p,l+h),a==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=_e[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Cn(this,t),l=Object.assign({},a,this._size),c=Dn(e,t,l),h=Pn(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=at(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),bo(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),_o(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!$e(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!$e(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=_e[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}$i.positioners=_e;var qh={id:"tooltip",_element:$i,positioners:_e,afterInit(i,t,e){e&&(i.tooltip=new $i({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:xt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:xt,beforeBody:xt,beforeLabel:xt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return B(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:xt,afterBody:xt,beforeFooter:xt,footer:xt,afterFooter:xt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Gh=Object.freeze({__proto__:null,Decimation:gh,Filler:Ih,Legend:Bh,SubTitle:Vh,Title:Nh,Tooltip:qh});const Qh=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Zh(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Qh(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Jh=(i,t)=>i===null?null:it(Math.round(i),0,t);class Ze extends Ut{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(B(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Zh(s,t,L(e,t),this._addedLabels),Jh(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ze.id="category";Ze.defaults={ticks:{callback:Ze.prototype.getLabelForValue}};function td(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!B(a),_=!B(r),x=!B(c),v=(m-g)/(d+1);let y=Cs((m-g)/p/f)*f,S,M,D,C;if(y<1e-14&&!b&&!_)return[{value:g},{value:m}];C=Math.ceil(m/y)-Math.floor(g/y),C>p&&(y=Cs(C*y/p/f)*f),B(l)||(S=Math.pow(10,l),y=Math.ceil(y*S)/S),n==="ticks"?(M=Math.floor(g/y)*y,D=Math.ceil(m/y)*y):(M=g,D=m),b&&_&&o&&Na((r-a)/o,y/1e3)?(C=Math.round(Math.min((r-a)
18/y,h)),y=(r-a)/C,M=a,D=r):x?(M=b?a:M,D=_?r:D,C=c-1,y=(D-M)/C):(C=(D-M)/y,ge(C,Math.round(C),y/1e3)?C=Math.round(C):C=Math.ceil(C));const A=Math.max(Ds(y),Ds(M));S=Math.pow(10,B(l)?A:l),M=Math.round(M*S)/S,D=Math.round(D*S)/S;let I=0;for(b&&(u&&M!==a?(e.push({value:a}),M<a&&I++,ge(Math.round((M+I*y)*S)/S,a,Tn(a,v,i))&&I++):M<a&&I++);I<C;++I)e.push({value:Math.round((M+I*y)*S)/S});return _&&u&&D!==r?e.length&&ge(e[e.length-1].value,r,Tn(r,v,i))?e[e.length-1].value=r:e.push({value:r}):(!_||D===r)&&e.push({value:D}),e}function Tn(i,t,{horizontal:e,minRotation:s}){const n=ft(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Je extends Ut{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return B(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=yt(n),c=yt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=td(n,o);return t.bounds==="ticks"&&Kn(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Me(t,this.chart.options.locale,this.options.ticks.format)}}class gs extends Je{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?t:0,this.max=Z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=ft(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}gs.id="linear";gs.defaults={ticks:{callback:hi.formatters.numeric}};function Ln(i){return i/Math.pow(10,Math.floor(dt(i)))===1}function ed(i,t){const e=Math.floor(dt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[];let o=ht(i.min,Math.pow(10,Math.floor(dt(t.min)))),a=Math.floor(dt(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do n.push({value:o,major:Ln(o)}),++r,r===10&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l;while(a<e||a===e&&r<s);const c=ht(i.max,o);return n.push({value:c,major:Ln(o)}),n}class ms extends Ut{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Je.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return Z(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?Math.max(0,t):null,this.max=Z(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=l=>s=t?s:l,a=l=>n=e?n:l,r=(l,c)=>Math.pow(10,Math.floor(dt(l))+c);s===n&&(s<=0?(o(1),a(10)):(o(r(s,-1)),a(r(n,1)))),s<=0&&o(r(n,-1)),n<=0&&a(r(s,1)),this._zero&&this.min!==this._suggestedMin&&s===r(this.min,0)&&o(r(s,-1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=ed(e,this);return t.bounds==="ticks"&&Kn(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Me(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=dt(t),this._valueRange=dt(this.max)-dt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(dt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}ms.id="logarithmic";ms.defaults={ticks:{callback:hi.formatters.logarithmic,major:{enabled:!0}}};function Yi(i){const t=i.ticks;if(t.display&&i.display){const e=at(t.backdropPadding);return L(t.font&&t.font.size,z.font.size)+e.height}return 0}function id(i,t,e){return e=$(e)?e:[e],{w:_r(i,t.string,e),h:e.length*t.lineHeight}}function Rn(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:i<s||i>n?{start:t-e,end:t}:{start:t,end:t+e}}function sd(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?U/o:0;for(let l=0;l<o;l++){const c=a.setContext(i.getPointLabelContext(l));n[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+n[l],r),d=et(c.font),u=id(i.ctx,d,i._pointLabels[l]);s[l]=u;const f=lt(i.getIndexAngle(l)+r),p=Math.round(es(f)),g=Rn(p,h.x,u.w,0,180),m=Rn(p,h.y,u.h,90,270);nd(e,t,f,g,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=od(i,s,n)}
vendor: 14,876 bytes, line 18
18function nd(i,t,e,s,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;s.start<t.l?(r=(t.l-s.start)/o,i.l=Math.min(i.l,t.l-r)):s.end>t.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,i.t=Math.min(i.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function od(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,a=Yi(o)/2,r=i.drawingArea,l=o.pointLabels.centerPointLabels?U/n:0;for(let c=0;c<n;c++){const h=i.getPointPosition(c,r+a+e[c],l),d=Math.round(es(lt(h.angle+q))),u=t[c],f=ld(h.y,u.h,d),p=ad(d),g=rd(h.x,u.w,p);s.push({x:h.x,y:f,textAlign:p,left:g,top:f,right:g+u.w,bottom:f+u.h})}return s}function ad(i){return i===0||i===180?"center":i<180?"left":"right"}function rd(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function ld(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function cd(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=s.setContext(i.getPointLabelContext(n)),a=et(o.font),{x:r,y:l,textAlign:c,left:h,top:d,right:u,bottom:f}=i._pointLabelItems[n],{backdropColor:p}=o;if(!B(p)){const g=jt(o.borderRadius),m=at(o.backdropPadding);e.fillStyle=p;const b=h-m.left,_=d-m.top,x=u-h+m.width,v=f-d+m.height;Object.values(g).some(y=>y!==0)?(e.beginPath(),ke(e,{x:b,y:_,w:x,h:v,radius:g}),e.fill()):e.fillRect(b,_,x,v)}Yt(e,i._pointLabels[n],r,l+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Ho(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,j);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<s;a++)o=i.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function hd(i,t,e,s){const n=i.ctx,o=t.circular,{color:a,lineWidth:r}=t;!o&&!s||!a||!r||e<0||(n.save(),n.strokeStyle=a,n.lineWidth=r,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.beginPath(),Ho(i,e,o,s),n.closePath(),n.stroke(),n.restore())}function dd(i,t,e){return Et(i,{label:e,index:t,type:"pointLabel"})}class De extends Je{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=at(Yi(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Z(t)&&!isNaN(t)?t:0,this.max=Z(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Yi(this.options))}generateTickLabels(t){Je.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{const n=H(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?sd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=j/(this._pointLabels.length||1),s=this.options.startAngle||0;return lt(t*e+ft(s))}getDistanceFromCenterForValue(t){if(B(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(B(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const s=e[t];return dd(this.getContext(),t,s)}}getPointPosition(t,e,s=0){const n=this.getIndexAngle(t)-q+s;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:s,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:s,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),Ho(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:s,grid:n}=e,o=this._pointLabels.length;let a,r,l;if(e.pointLabels.display&&cd(this,o),n.display&&this.ticks.forEach((c,h)=>{if(h!==0){r=this.getDistanceFromCenterForValue(c.value);const d=n.setContext(this.getContext(h-1));hd(this,d,r,o)}}),s.display){for(t.save(),a=o-1;a>=0;a--){const c=s.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=c;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=s.setContext(this.getContext(l)),h=et(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const d=at(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Yt(t,r.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}}De.id="radialLinear";De.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};De.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};De.descriptors={angleLines:{_fallback:"grid"}};const gi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},rt=Object.keys(gi);function ud(i,t){return i-t}function En(i,t){if(B(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),Z(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Jt(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function In(i,t,e,s){const n=rt.length;for(let o=rt.indexOf(i);o<n-1;++o){const a=gi[rt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return rt[o]}return rt[n-1]}function fd(i,t,e,s,n){for(let o=rt.length-1;o>=rt.indexOf(e);o--){const a=rt[o];if(gi[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return rt[e?rt.indexOf(e):0]}function pd(i){for(let t=rt.indexOf(i)+1,e=rt.length;t<e;++t)if(gi[rt[t]].common)return rt[t]}function Fn(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=is(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function gd(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function zn(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return o===0||!e?s:gd(i,s,n,e)}class Pe extends Ut{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const s=t.time||(t.time={}),n=this._adapter=new ec._date(t.adapters.date);n.init(e),pe(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:En(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=Z(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=Z(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=$a(n,o,a);return this._unit=e.unit||(s.autoSkip?In(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):fd(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:pd(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),zn(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=it(e,0,a),s=it(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||In(o.minUnit,e,s,this._getLabelCapacity(e)),r=L(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Jt(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,r,a),f++)Fn(h,u,p);return(u===s||n.bounds==="ticks"||f===1)&&Fn(h,u,p),Object.keys(h).sort((g,m)=>g-m).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&a[r],h=l&&a[l],d=s[e],u=l&&h&&d&&d.major,f=this._adapter.format(t,n||(u?h:c)),p=o.ticks.callback;return p?H(p,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=ft(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,zn(this,[t],this._majorUnit),n),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(En(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Qn(t.sort(ud))}}Pe.id="time";Pe.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function je(i,t,e){let s=0,n=i.length-1,o,a,r,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Mt(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Mt(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class bs extends Pe{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=je(e,this.min),this._tableRange=je(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)h=n[a+1],l=n[a-1],c=n[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(je(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return je(this._table,s*this._tableRange+this._minPos,!0)}}bs.id="timeseries";bs.defaults=Pe.defaults;var md=Object.freeze({__proto__:null,CategoryScale:Ze,LinearScale:gs,LogarithmicScale:ms,RadialLinearScale:De,TimeScale:Pe,TimeSeriesScale:bs});const mi=[tc,dh,Gh,md];var bd=Object.defineProperty,_d=Object.defineProperties,yd=Object.getOwnPropertyDescriptors,Bn=Object.getOwnPropertySymbols,xd=Object.prototype.hasOwnProperty,vd=Object.prototype.propertyIsEnumerable,Wn=(i,t,e)=>t in i?bd(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,kd=(i,t)=>{for(var e in t||(t={}))xd.call(t,e)&&Wn(i,e,t[e]);if(Bn)for(var e of Bn(t))vd.call(t,e)&&Wn(i,e,t[e]);return i},wd=(i,t)=>_d(i,yd(t));function Sd(i){return(i.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var Ft=(i,t)=>{const e={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:i,type:String},width:{default:400,type:Number},height:{default:400,type:Number}
18,cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},s=Sd(i);return Xi({name:s,props:e,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:o,expose:a}){const r=X(null),l=`${n.chartId}`;let c=Yo(null);At(()=>n.chartData,h,{deep:!0}),At(()=>n.options,m=>{c.value&&m&&(c.value.options=ne(m),p())},{deep:!0});function h(m){if(c.value){let b=c.value;ys(m.labels,c.value.data.labels)||(b.data.labels=m.labels,u()),ys(m.datasets,c.value.data.datasets)||m.datasets.forEach((_,x)=>{var v,y;if(Xo(_))b.data.datasets=[];else{const S=ne(b.data),M=Object.keys((y=(v=S.datasets)==null?void 0:v[x])!=null?y:{}),D=Object.keys(_);M.filter(A=>A!=="_meta"&&D.indexOf(A)===-1).forEach(A=>{b.data.datasets[x]&&delete b.data.datasets[x][A]});for(const A in _){const I=ne(_[A]);b.data.datasets[x]||(b.data.datasets[x]={}),_.hasOwnProperty(A)&&I!=null&&b&&(b.data.datasets[x][A]=I)}}}),p()}else c.value&&g(),d()}function d(){r.value?(c.value=new Xt(r.value,{data:ne(n.chartData),type:t,options:ne(n.options),plugins:n.plugins}),f()):console.error(`Error on component ${s}, canvas cannot be rendered. Check if the render appends server-side`)}function u(){o("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function f(){c.value&&(o("chart:render",c.value),n.onChartRender&&n.onChartRender(c.value))}function p(){c.value&&(c.value.update(),o("chart:update",c.value),n.onChartUpdate&&n.onChartUpdate(c.value))}function g(){c.value&&c.value.destroy(),o("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return Ki(d),Uo(()=>{c.value&&c.value.destroy()}),a({canvasRef:r,renderChart:d,chartInstance:c,canvasId:l,update:p}),()=>_s("div",{style:wd(kd({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[_s("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:n.width,height:n.height,ref:r})])}})},Md=Ft("bar-chart","bar"),$o=Ft("doughnut-chart","doughnut"),Cd=Ft("line-chart","line");Ft("pie-chart","pie");Ft("polar-chart","polarArea");Ft("radar-chart","radar");Ft("bubble-chart","bubble");Ft("scatter-chart","scatter");Xt.register(...mi);const Dd={props:["data"],components:{DoughnutChart:$o},setup(i){const t=X(),e=X({responsive:!0,plugins:{legend:{position:"bottom"},title:{display:!1,text:"Chart.js Doughnut Chart"}}}),s=X({});return At(i,(n,o)=>{s.value={labels:n.data.topSellingProducts?n.data.topSellingProducts.labels:[],datasets:[{data:n.data.topSellingProducts?n.data.topSellingProducts.values:[],backgroundColor:n.data.topSellingProducts?n.data.topSellingProducts.colors:[]}]}}),{chartRef:t,testData:s,options:e}}};function Pd(i,t,e,s,n,o){const a=Y("DoughnutChart");return T(),Q(a,{ref:"chartRef",chartData:s.testData,options:s.options},null,8,["chartData","options"])}const Od=Rt(Dd,[["render",Pd]]);Xt.register(...mi);const Ad={props:["data"],components:{BarChart:Md},setup(i){const t=X(),{t:e}=ti(),s=X({responsive:!0,plugins:{legend:{position:"bottom"},title:{display:!1,text:"Chart.js Doughnut Chart"}}}),n=X({});return At(i,(o,a)=>{n.value={labels:o.data.purchaseSales.dates?o.data.purchaseSales.dates:[],datasets:[{label:e("menu.purchases"),data:o.data.purchaseSales.purchases?o.data.purchaseSales.purchases:[],backgroundColor:"#20C997"},{label:e("menu.sales"),data:o.data.purchaseSales.sales?o.data.purchaseSales.sales:[],backgroundColor:"#FFCD56"}]}}
18),{chartRef:t,testData:n,options:s}}};function Td(i,t,e,s,n,o){const a=Y("BarChart");return T(),Q(a,{ref:"chartRef",chartData:s.testData,options:s.options},null,8,["chartData","options"])}const Ld=Rt(Ad,[["render",Td]]);Xt.register(...mi);const Rd={props:["data"],components:{LineChart:Cd},setup(i){const t=X(),{t:e}=ti(),s=X({responsive:!0,plugins:{legend:{position:"bottom"},title:{display:!1,text:""}}}),n=X({});return At(i,(o,a)=>{n.value={labels:o.data.paymentChartData?o.data.paymentChartData.dates:[],datasets:[{label:e("dashboard.payment_sent"),data:o.data.paymentChartData.sent?o.data.paymentChartData.sent:[],borderColor:"#20C997",backgroundColor:"#20C997"},{label:e("dashboard.payment_received"),data:o.data.paymentChartData.received?o.data.paymentChartData.received:[],borderColor:"#FFCD56",backgroundColor:"#FFCD56"}]}}),{chartRef:t,testData:n,options:s}}};function Ed(i,t,e,s,n,o){const a=Y("LineChart");return T(),Q(a,{ref:"chartRef",chartData:s.testData,options:s.options},null,8,["chartData","options"])}const Id=Rt(Rd,[["render",Ed]]);Xt.register(...mi);const Fd={props:["data","title"],components:{DoughnutChart:$o},setup(i){const t=X(),e=X({responsive:!0,plugins:{legend:{position:"bottom"},title:{display:i.title!="",text:i.title}}}),s=X({labels:i.data.labels,datasets:[{data:i.data.values,backgroundColor:i.data.colors}]});return At(i,(n,o)=>{s.value={labels:n.data.labels,datasets:[{data:n.data.values,backgroundColor:n.data.colors}]}}),{chartRef:t,testData:s,options:e}}};function zd(i,t,e,s,n,o){const a=Y("DoughnutChart");return T(),Q(a,{ref:"chartRef",chartData:s.testData,options:s.options},null,8,["chartData","options"])}const Bd=Rt(Fd,[["render",zd]]),Wd=Xi({props:["itemDetails","visible"],components:{Doughnut:Bd},setup(i,{emit:t}
18){const{formatAmountCurrency:e,getOrderTypeFromstring:s,formatDate:n,formatDateTime:o}=ei();ti();const a=X("product_orders"),r=X({}),l=Ko(()=>i.itemDetails.warehouse_stocks.filter(d=>d.stock_quantity<i.itemDetails.stock_quantitiy_alert));return At(i,(h,d)=>{if(a.value="product_orders",h.itemDetails.warehouse_stocks){var u=[],f=[],p=["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)"];qo(h.itemDetails.warehouse_stocks,(g,m)=>{u.push(g.warehouse.name),f.push(g.stock_quantity)}),r.value={labels:u,values:f,colors:p}}else r.value={labels:[],values:[],colors:[]}}),{onClose:()=>{t("closed")},formatDate:n,formatDateTime:o,formatAmountCurrency:e,warehouseStockColumns,stockHistoryColumns,productOrderColumns,warehouseStockChartData:r,activeKey:a,getOrderTypeFromstring:s,drawerWidth:window.innerWidth<=991?"90%":"60%",outOfStockWarehouses:l}}}),Nd=bt("hr",{style:{height:"1px",border:"none",color:"#f0f0f0","background-color":"#f0f0f0"},class:"mt-10 mb-10"},null,-1);function Vd(i,t,e,s,n,o){const a=Go,r=qi,l=Gi,c=Nn,h=Qo,d=Y("Doughnut"),u=Vn,f=jn,p=Hn,g=Zo;return T(),Q(g,{title:i.itemDetails.name,width:i.drawerWidth,open:i.visible,"body-style":{paddingBottom:"80px"},maskClosable:!1,onClose:i.onClose},{default:w(()=>[k(l,null,{default:w(()=>[i.itemDetails.product_type=="single"?(T(),Q(r,{key:0,xs:24,sm:24,md:8,lg:6},{default:w(()=>[k(a,{width:150,src:i.itemDetails.image_url},null,8,["src"])]),_:1})):W("",!0),k(r,{xs:24,sm:24,md:8,lg:18},{default:w(()=>[i.itemDetails.description?(T(),Q(l,{key:0,class:"mb-10 mt-10"},{default:w(()=>[k(r,{xs:24,sm:24,md:24,lg:24},{default:w(()=>[N(O(i.itemDetails.description),1)]),_:1})]),_:1})):W("",!0),k(l,{class:"mb-10 mt-10"},{default:w(()=>[k(r,{xs:24,sm:24,md:8,lg:8},{default:w(()=>
18[k(c,{title:i.$t("product.mrp"),value:i.formatAmountCurrency(i.itemDetails.mrp),style:{"margin-right":"50px"}},null,8,["title","value"])]),_:1}),k(r,{xs:24,sm:24,md:8,lg:8},{default:w(()=>[k(c,{title:i.$t("product.purchase_price"),value:i.formatAmountCurrency(i.itemDetails.purchase_price),style:{"margin-right":"50px"}},null,8,["title","value"])]),_:1}),k(r,{xs:24,sm:24,md:8,lg:8},{default:w(()=>[k(c,{title:i.$t("product.sales_price"),value:i.formatAmountCurrency(i.itemDetails.sales_price)},null,8,["title","value"])]),_:1})]),_:1}),Nd,k(l,null,{default:w(()=>[k(r,{xs:24,sm:24,md:12,lg:12},{default:w(()=>[k(h,{level:5},{default:w(()=>[N(O(i.$t("product.stocks")),1)]),_:1}),k(d,{data:i.warehouseStockChartData,style:{height:"200px"}},null,8,["data"])]),_:1}),k(r,{xs:24,sm:24,md:12,lg:12},{default:w(()=>[k(u,{columns:i.warehouseStockColumns,"row-key":m=>m.id,"data-source":i.itemDetails.warehouse_stocks,pagination:!1,class:"mt-30"},{bodyCell:w(({column:m,record:b})=>{var _;return[m.dataIndex==="warehouse_id"?(T(),tt(nt,{key:0},[N(O(b.warehouse.name),1)],64)):W("",!0),m.dataIndex==="stock_quantity"?(T(),tt(nt,{key:1}
18,[N(O(b.stock_quantity)+" "+O((_=i.itemDetails.unit)==null?void 0:_.short_name),1)],64)):W("",!0)]}),_:1},8,["columns","row-key","data-source"])]),_:1})]),_:1})]),_:1})]),_:1}),k(l,{class:"mt-10"},{default:w(()=>[k(r,{xs:24,sm:24,md:24,lg:24},{default:w(()=>[k(p,{activeKey:i.activeKey,"onUpdate:activeKey":t[0]||(t[0]=m=>i.activeKey=m)},{default:w(()=>[k(f,{key:"product_orders",tab:i.$t("product.product_orders")},{default:w(()=>[k(u,{columns:i.productOrderColumns,"row-key":m=>m.id,"data-source":i.itemDetails.items,pagination:!1},{bodyCell:w(({column:m,record:b})=>[m.dataIndex==="order_type"?(T(),tt(nt,{key:0},[N(O(i.getOrderTypeFromstring(b.order.order_type)),1)],64)):W("",!0),m.dataIndex==="order_date"?(T(),tt(nt,{key:1},[N(O(i.formatDateTime(b.order.order_date)),1)],64)):W("",!0),m.dataIndex==="single_unit_price"?(T(),tt(nt,{key:2},[N(O(i.formatAmountCurrency(b.single_unit_price)),1)],64)):W("",!0),m.dataIndex==="total_discount"?(T(),tt(nt,{key:3},[N(O(i.formatAmountCurrency(b.total_discount))+" ("+O(b.discount_rate)+"%) ",1)],64)):W("",!0),m.dataIndex==="total_tax"?(T(),tt(nt,{key:4}
18,[N(O(i.formatAmountCurrency(b.total_tax))+" ("+O(b.tax_rate)+"%) ",1)],64)):W("",!0),m.dataIndex==="subtotal"?(T(),tt(nt,{key:5},[N(O(i.formatAmountCurrency(b.subtotal)),1)],64)):W("",!0)]),_:1},8,["columns","row-key","data-source"])]),_:1},8,["tab"]),k(f,{key:"stock_history",tab:i.$t("product.stock_history")},{default:w(()=>[k(u,{columns:i.stockHistoryColumns,"row-key":m=>m.id,"data-source":i.itemDetails.stock_history,pagination:!1},{bodyCell:w(({column:m,record:b})=>[m.dataIndex==="created_at"?(T(),tt(nt,{key:0},[N(O(i.formatDateTime(b.created_at)),1)],64)):W("",!0),m.dataIndex==="order_type"?(T(),tt(nt,{key:1},[N(O(i.getOrderTypeFromstring(b.order_type)),1)],64)):W("",!0)]),_:1},8,["columns","row-key","data-source"])]),_:1},8,["tab"])]),_:1},8,["activeKey"])]),_:1})]),_:1})]),_:1},8,["title","width","open","onClose"])}const jd=Rt(Wd,[["render",Vd]]),Hd={props:["data"],components:{CloudDownloadOutlined:Yn,CloudUploadOutlined:Qi,Details:jd},setup(i){const{formatDateTime:t}=ei(),e=X(!1),s=X({});return{formatDateTime:t,viewData:s,detailsVisible:e,viewItem:o=>{s.value=o,e.value=!0}}}};function $d(i,t,e,s,n,o){const a=Y("Details"),r=Y("CloudDownloadOutlined"),l=Y("CloudUploadOutlined"),c=ea,h=ia,d=ta;return T(),tt(nt,null,[k(a,{visible:s.detailsVisible,onClosed:t[0]||(t[0]=u=>s.detailsVisible=!1),itemDetails:s.viewData},null,8,["visible","itemDetails"]),k(d,null,{default:w(()=>[(T(!0),tt(nt,null,Jo(e.data,u=>(T(),Q(h,{key:u.id},{dot:w(()=>[u.stock_type=="out"?(T(),Q(r,{key:0,style:{"font-size":"20px"}})):(T(),Q(l,{key:1,style:{"font-size":"20px"}}))]),default:w(()=>[bt("span",null,[k(c,{onClick:f=>s.viewItem(u.product)},{default:w(()=>[N(O(u.product.name),1)]),_:2},1032,["onClick"]),N(" with "),bt("strong",null,O(u.quantity)+" "+O(u.product.unit.short_name),1),N(" "+O(u.order_type)+" on "+O(s.formatDateTime(u.created_at)),1)])]),_:2},1024))),128))]),_:1})],64)}const Yd=Rt(Hd,[["render",$d]]),Ud=Xi({components:{SyncOutlined:sa,CloudDownloadOutlined:Yn},setup(){const{appSetting:i,appType:t}=ei(),e=window.config.app_version,s=X("fetching"),n=X([]);return Ki(()=>{i.value.update_app_notification&&t=="non-saas"&&axiosAdmin(na("update-app")).then(o=>{oa.post("https://envato.codeifly.com/product",{verified_name:window.config.product_name,domain:window.location.host}).then(a=>{n.value=a.data,n.value.product.version!=e?s.value="update_available":s.value="success"})})}),{appSetting:i,productStatus:s,product:n,appType:t}}});function Xd(i,t,e,s,n,o){const a=Y("CloudDownloadOutlined"),r=$n,l=aa,c=qi,h=Gi;return i.appSetting.update_app_notification&&i.productStatus=="update_available"&&i.appType=="non-saas"?(T(),Q(h,{key:0,class:"mt-20"},{default:w(()=>[k(c,{span:24},{default:w(()=>[i.productStatus=="update_available"?(T(),Q(l,{key:0,type:"success",message:i.$t("update_app.update_available"),showIcon:"",onClose:t[0]||(t[0]=()=>i.$router.push({name:"admin.settings.update_app.index"}))},{description:w(()=>[N(O(i.$t("messages.new_app_version_avaialbe",[i.product.product.version])),1)]),closeText:w(()=>[k(r,{type:"primary"},{icon:w(()=>[k(a)]),default:w(()=>[N(" "+O(i.$t("update_app.update_now")),1)]),_:1})]),_:1},8,["message"])):W("",!0)]),_:1})]),_:1})):W("",!0)}const Kd=Rt(Ud,[["render",Xd]]),qd={components:{EyeOutlined:ra,ArrowUpOutlined:xa,ArrowDownOutlined:va,DoubleRightOutlined:la,StateWidget:ga,TopProducts:Od,PurchaseSales:Ld,PaymentsChart:Id,OrderTable:ma,UserInfo:ba,Tiimeline:Yd,LineChartOutlined:Zi,BankOutlined:ka,ShoppingOutlined:wa,TagOutlined:Ji,DateRangePicker:_a,UpdateAppAlert:Kd,AdminPageHeader:ya},setup(){const{t:i}=ti(),{formatQuantity:t,formatAmountCurrency:e,appSetting:s,user:n,permsArray:o,selectedWarehouse:a,dayjs:r}=ei(),l=X(""),c=ca({dates:[]}),h=X([]),d=ha(),u=X(""),f=X(null),p=[{title:i("product.product"),dataIndex:"product_name"},{title:i("product.quantity"),dataIndex:"current_stock"},{title:i("product.quantitiy_alert"),dataIndex:"stock_quantitiy_alert"}],g=[{title:i("stock.customer"),dataIndex:"customer_id"},{title:i("payments.total_amount"),dataIndex:"total_amount"}];Ki(()=>{const b=axiosAdmin.post("dashboard",c);o.value.includes("purchases_view")?l.value="purchases":o.value.includes("purchase_returns_view")?l.value="purchase-returns":o.value.includes("sales_returns_view")?l.value="sales-returns":l.value="sales",d.params&&d.params.success&&da.success({message:i("common.welcome_back",[n.value.name]),description:i("messages.login_success_dashboard"),placement:"topRight"}),Promise.all([b]).then(([_])=>{h.value=_.data})});const m=b=>{b==u.value?(u.value="",f.value.setDatePicker([])):(u.value=b,b=="today"?f.value.setDatePicker([r(),r()]):b=="yesterday"?f.value.setDatePicker([r().add(-1,"d").startOf("day"),r().add(-1,"d").endOf("day")]):b=="week"?f.value.setDatePicker([r().add(-7,"d"),r()]):b=="month"?f.value.setDatePicker([r().startOf("month"),r()]):b=="year"&&f.value.setDatePicker([r().startOf("year"),r()]))};return At([c,a],(b,_)=>{axiosAdmin.post("dashboard",c).then(x=>{h.value=x.data})}),{filters:c,activeOrderType:l,responseData:h,stockQuantityColumns:p,topCustomerColumns:g,formatQuantity:t,formatAmou
18ntCurrency:e,permsArray:o,appSetting:s,serachDateRangePicker:f,activeDateSelector:u,dateSelectorClicked:m}}},Gd={class:"dashboard-page-content-container"},Qd={class:"mt-30 mb-20"},Zd={key:0},Jd={key:0},tu={key:0},eu={key:0},iu=bt("br",null,null,-1);function su(i,t,e,s,n,o){const a=fa,r=Y("AdminPageHeader"),l=Y("UpdateAppAlert"),c=Y("DateRangePicker"),h=qi,d=$n,u=Y("a-flex"),f=Gi,p=Y("LineChartOutlined"),g=Y("StateWidget"),m=Y("ShoppingOutlined"),b=Y("TagOutlined"),_=Y("BankOutlined"),x=Y("TopProducts"),v=pa,y=Y("PurchaseSales"),S=Y("DoubleRightOutlined"),M=jn,D=Hn,C=Nn,A=Y("OrderTable"),I=Y("PaymentsChart"),R=Vn,K=Y("user-info");return T(),tt(nt,null,[k(r,null,{header:w(()=>[k(a,{title:i.$t("menu.dashboard"),style:{padding:"0px"}},null,8,["title"])]),_:1}),bt("div",Gd,[k(l),k(f,{gutter:[8,8],class:"mt-30 mb-10"},{default:w(()=>[k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(c,{ref:"serachDateRangePicker",onDateTimeChanged:t[0]||(t[0]=E=>s.filters.dates=E),showPreset:!1},null,512)]),_:1}),k(h,{xs:24,sm:24,md:12,lg:18,xl:18,style:{textAlign:"right"}},{default:w(()=>[k(u,{justify:"flex-end",wrap:"wrap",gap:"small"},{default:w(()=>[k(d,{type:s.activeDateSelector=="today"?"primary":"default",onClick:t[1]||(t[1]=E=>s.dateSelectorClicked("today"))},{default:w(()=>[N(O(i.$t("dashboard.today")),1)]),_:1},8,["type"]),k(d,{type:s.activeDateSelector=="yesterday"?"primary":"default",onClick:t[2]||(t[2]=E=>s.dateSelectorClicked("yesterday"))},{default:w(()=>[N(O(i.$t("dashboard.yesterday")),1)]),_:1},8,["type"]),k(d,{type:s.activeDateSelector=="week"?"primary":"default",onClick:t[3]||(t[3]=E=>s.dateSelectorClicked("week"))},{default:w(()=>[N(O(i.$t("dashboard.last_7_days")),1)]),_:1},8,["type"]),k(d,{type:s.activeDateSelector=="month"?"primary":"default",onClick:t[4]||(t[4]=E=>s.dateSelectorClicked("month"))},{default:w(()=>[N(O(i.$t("dashboard.this_month")),1)]),_:1},8,["type"]),k(d,{type:s.activeDateSelector=="year"?"primary":"default",onClick:t[5]||(t[5]=E=>s.dateSelectorClicked("year"))},{default:w(()=>[N(O(i.$t("dashboard.this_year")),1)]),_:1},8,["type"])]),_:1})]),_:1})]),_:1}),bt("div",Qd,[k(f,{gutter:[15,15]},{default:w(()=>[k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(g,null,{image:w(()=>[k(p,{style:{color:"#fff","font-size":"24px"}})]),description:w(()=>
18[s.responseData.stateData?(T(),tt("h2",Zd,O(s.formatAmountCurrency(s.responseData.stateData.totalSales)),1)):W("",!0),bt("p",null,O(i.$t("dashboard.total_sales")),1)]),_:1})]),_:1}),k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(g,null,{image:w(()=>[k(m,{style:{color:"#fff","font-size":"24px"}})]),description:w(()=>[s.responseData.stateData?(T(),tt("h2",Jd,O(s.formatAmountCurrency(s.responseData.stateData.totalExpenses)),1)):W("",!0),bt("p",null,O(i.$t("dashboard.total_expenses")),1)]),_:1})]),_:1}),k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(g,null,{image:w(()=>[k(b,{style:{color:"#fff","font-size":"24px"}})]),description:w(()=>[s.responseData.stateData?(T(),tt("h2",tu,O(s.formatAmountCurrency(s.responseData.stateData.paymentSent)),1)):W("",!0),bt("p",null,O(i.$t("dashboard.payment_sent")),1)]),_:1})]),_:1}),k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(g,null,{image:w(()=>[k(_,{style:{color:"#fff","font-size":"24px"}})]),description:w(()=>[s.responseData.stateData?(T(),tt("h2",eu,O(s.formatAmountCurrency(s.responseData.stateData.paymentReceived)),1)):W("",!0),bt("p",null,O(i.$t("dashboard.payment_received")),1)]),_:1})]),_:1})]),_:1})]),k(f,{gutter:[18,18],class:"mt-30 mb-20"},{default:w(()=>[k(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:w(()=>[k(v,{title:i.$t("dashboard.top_selling_product")},{default:w(()=>[k(x,{data:s.responseData},null,8,["data"])]),_:1},8,["title"])]),_:1}),k(h,{xs:24,sm:24,md:12,lg:18,xl:18},{default:w(()=>[k(v,{title:i.$t("dashboard.sales_purchases")},Ae({default:w(()=>[k(y,{data:s.responseData},null,8,["data"])]),_:2},[s.permsArray.includes("sales_view")||s.permsArray.includes("admin")?{name:"extra",fn:w(()=>[k(d,{class:"mt-10",type:"link",onClick:t[6]||(t[6]=E=>i.$router.push({name:"admin.stock.sales.index"}))},{default:w(()=>[N(O(i.$t("common.view_all"))+" ",1),k(S)]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1})]),_:1}),(s.permsArray.includes("purchases_view")||s.permsArray.includes("sales_view")||s.permsArray.includes("purchase_returns_view")||s.permsArray.includes("sales_returns_view")||s.permsArray.includes("admin"))&&s.activeOrderType!=""?(T(),Q(f,{key:0,class:"mt-30 mb-20"},{default:w(()=>[k(h,{span:24},{default:w(()=>[k(v,{title:i.$t("dashboard.recent_stock_history"),bodyStyle:{paddingTop:"0px"}},{extra:w(()=>[k(D,{activeKey:s.activeOrderType,"onUpdate:activeKey":t[7]||(t[7]=E=>s.activeOrderType=E)},{default:w(()=>[s.permsArray.includes("sales_view")||s.permsArray.includes("admin")?(T(),Q(M,{key:"sales",tab:i.$t("menu.sales")},null,8,["tab"])):W("",!0),s.permsArray.includes("purchases_view")||s.permsArray.includes("admin")?(T(),Q(M,{key:"purchases",tab:i.$t("menu.purchases")},null,8,["tab"])):W("",!0),s.permsArray.includes("purchase_returns_view")||s.permsArray.includes("admin")?(T(),Q(M,{key:"purchase-returns",tab:i.$t("menu.purchase_returns")},null,8,["tab"])):W("",!0),s.permsArray.includes("sales_returns_view")||s.permsArray.includes("admin")?(T(),Q(M,{key:"sales-returns",tab:i.$t("menu.sales_returns")},null,8,["tab"])):W("",!0)]),_:1},8,["activeKey"])]),default:w(()=>[k(f,null,{default:w(()=>[k(h,{xs:24,sm:24,md:12,lg:6,xl:6,class:"col-border-right pt-30"},{default:w(()=>[s.responseData.stockHistoryStatsData?(T(),Q(f,{key:0,style:ua(s.appSetting.rtl?{marginLeft:"24px"}:{marginRight:"24px"}),class:"stock-history-stats"},{default:w(()=>[k(h,{span:24,class:"sales mb-20"},{default:w(()=>[k(C,{title:i.$t("dashboard.total_sales_items"),value:s.formatQuantity(s.responseData.stockHistoryStatsData.totalSales)},null,8,["title","value"])]),_:1}),k(h,{span:24,class:"sales-returns mb-20"},{default:w(()=>[k(C,{title:i.$t("dashboard.total_sales_returns_items"),value:s.formatQuantity(s.responseData.stockHistoryStatsData.totalSalesReturn)},null,8,["title","value"])]),_:1}),k(h,{span:24,class:"purchases mb-20"},{default:w(()=>[k(C,{title:i.$t("dashboard.total_purchases_items"),value:s.formatQuantity(s.responseData.stockHistoryStatsData.totalPurchases)},null,8,["title","value"])]),_:1}),k(h,{span:24,class:"purchase-returns mb-20"},{default:w(()=>[k(C,{title:i.$t("dashboard.total_purchase_returns_items"),value:s.formatQuantity(s.responseData.stockHistoryStatsData.totalPurchaseReturn)},null,8,["title","value"])]),_:1})]),_:1},8,["style"])):W("",!0)]),_:1}),k(h,{xs:24,sm:24,md:12,lg:18,xl:18},{default:w(()=>
18[k(A,{orderType:s.activeOrderType,filters:s.filters,perPageItems:5},null,8,["orderType","filters"])]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})):W("",!0),k(f,{gutter:[18,18],class:"mt-30 mb-20"},{default:w(()=>[k(h,{xs:24,sm:24,md:24,lg:24,xl:24},{default:w(()=>[k(v,{title:i.$t("payments.payments")},Ae({default:w(()=>[k(I,{data:s.responseData},null,8,["data"])]),_:2},[s.permsArray.includes("order_payments_view")||s.permsArray.includes("admin")?{name:"extra",fn:w(()=>[k(d,{class:"mt-10",type:"link",onClick:t[8]||(t[8]=E=>i.$router.push({name:"admin.reports.payments.index"}))},{default:w(()=>[N(O(i.$t("common.view_all"))+" ",1),k(S)]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1})]),_:1}),k(f,{gutter:[18,18],class:"mt-30 mb-20"},{default:w(()=>[k(h,{xs:24,sm:24,md:12,lg:16,xl:16},{default:w(()=>[s.responseData&&s.responseData.stockAlerts?(T(),Q(v,{key:0,title:i.$t("menu.stock_alert"),bodyStyle:{padding:"0px"}},Ae({default:w(()=>[k(R,{columns:s.stockQuantityColumns,"row-key":E=>E.xid,"data-source":s.responseData.stockAlerts,pagination:!1},{bodyCell:w(({column:E,record:P})=>[E.dataIndex==="current_stock"?(T(),tt(nt,{key:0},[N(O(`${P.current_stock} ${P.short_name}`),1)],64)):W("",!0),E.dataIndex==="stock_quantitiy_alert"?(T(),tt(nt,{key:1}
18,[N(O(`${P.stock_quantitiy_alert} ${P.short_name}`),1)],64)):W("",!0)]),_:1},8,["columns","row-key","data-source"])]),_:2},[s.permsArray.includes("warehouses_view")||s.permsArray.includes("admin")?{name:"extra",fn:w(()=>[k(d,{class:"mt-10",type:"link",onClick:t[9]||(t[9]=E=>i.$router.push({name:"admin.reports.stock.index"}))},{default:w(()=>[N(O(i.$t("common.view_all"))+" ",1),k(S)]),_:1})]),key:"0"}:void 0]),1032,["title"])):W("",!0)]),_:1}),k(h,{xs:24,sm:24,md:12,lg:8,xl:8},{default:w(()=>[s.responseData&&s.responseData.topCustomers?(T(),Q(v,{key:0,title:i.$t("dashboard.top_customers"),bodyStyle:{padding:"0px"}},Ae({default:w(()=>[k(R,{columns:s.topCustomerColumns,"row-key":E=>E.customer_id,"data-source":s.responseData.topCustomers,pagination:!1},{bodyCell:w(({column:E,record:P})=>[E.dataIndex=="customer_id"?(T(),Q(K,{key:0,user:P.customer},null,8,["user"])):W("",!0),E.dataIndex=="total_amount"?(T(),tt(nt,{key:1},[N(O(s.formatAmountCurrency(P.total_amount))+" ",1),iu,N(" "+O(i.$t("dashboard.total_sales"))+" : "+O(P.total_sales),1)],64)):W("",!0)]),_:1},8,["columns","row-key","data-source"])]),_:2},[s.permsArray.includes("users_view")||s.permsArray.includes("admin")?{name:"extra",fn:w(()=>[k(d,{class:"mt-10",type:"link",onClick:t[10]||(t[10]=E=>i.$router.push({name:"admin.reports.users.index"}))},{default:w(()=>[N(O(i.$t("common.view_all"))+" ",1),k(S)]),_:1})]),key:"0"}:void 0]),1032,["title"])):W("",!0)]),_:1})]),_:1})])],64)}const Ru=Rt(qd,[["render",su]]);export{Ru as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.