/*! * Chart.js v2.9.1 * https://www.chartjs.org * (c) 2019 Chart.js Contributors * Released under the MIT License */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n1&&(a-=1)),[360*a,100*r,100*u]},i.rgb.hwb=function(t){var e=t[0],n=t[1],a=t[2];return[i.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]},i.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},i.rgb.keyword=function(t){var n=e[t];if(n)return n;var i,a,r,o=1/0;for(var l in c)if(c.hasOwnProperty(l)){var s=c[l],u=(a=t,r=s,Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)+Math.pow(a[2]-r[2],2));u.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},i.rgb.lab=function(t){var e=i.rgb.xyz(t),n=e[0],a=e[1],r=e[2];return a/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,l=t[1]/100,s=t[2]/100;if(0===l)return[r=255*s,r,r];e=2*s-(n=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},i.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},i.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),l=255*i*(1-n*r),s=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,s,o];case 1:return[l,i,o];case 2:return[o,i,s];case 3:return[o,l,i];case 4:return[s,o,i];case 5:return[i,o,l]}},i.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,l=Math.max(o,.01);return i=(2-r)*o,n=r*l,[a,100*(n=(n/=(e=(2-r)*l)<=1?e:2-e)||0),100*(i/=2)]},i.hwb.rgb=function(t){var e,n,i,a,r,o,l,s=t[0]/360,u=t[1]/100,c=t[2]/100,h=u+c;switch(h>1&&(u/=h,c/=h),i=6*s-(e=Math.floor(6*s)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-c)-u),e){default:case 6:case 0:r=n,o=a,l=u;break;case 1:r=a,o=n,l=u;break;case 2:r=u,o=n,l=a;break;case 3:r=u,o=a,l=n;break;case 4:r=a,o=u,l=n;break;case 5:r=n,o=u,l=a}return[255*r,255*o,255*l]},i.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},i.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},i.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},i.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),l=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},i.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},i.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},i.rgb.ansi16=function(t){var e=t[0],n=t[1],a=t[2],r=1 in arguments?arguments[1]:i.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},i.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},i.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},i.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},i.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),l=r-o;return e=l<=0?0:r===n?(i-a)/l%6:r===i?2+(a-n)/l:4+(n-i)/l+4,e/=6,[360*(e%=1),100*l,100*(l<1?o/(1-l):0)]},i.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},i.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},i.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,l=o%1,s=1-l;switch(Math.floor(o)){case 0:r[0]=1,r[1]=l,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=l;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=l,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},i.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},i.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},i.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},i.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=i.gray.hsv=function(t){return[0,0,t[0]]},i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));h.rgb,h.hsl,h.hsv,h.hwb,h.cmyk,h.xyz,h.lab,h.lch,h.hex,h.keyword,h.ansi16,h.ansi256,h.hcg,h.apple,h.gray;function d(t){var e=function(){for(var t={},e=Object.keys(h),n=e.length,i=0;i1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var v=p,m={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},b={getRgba:y,getHsla:x,getRgb:function(t){var e=y(t);return e&&e.slice(0,3)},getHsl:function(t){var e=x(t);return e&&e.slice(0,3)},getHwb:_,getAlpha:function(t){var e=y(t);if(e)return e[3];if(e=x(t))return e[3];if(e=_(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+C(t[0])+C(t[1])+C(t[2])+(e>=0&&e<1?C(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return k(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:k,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return M(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:M,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return w(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:w,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return P[t.slice(0,3)]}};function y(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,l=1-o;return this.rgb(o*this.red()+l*n.red(),o*this.green()+l*n.green(),o*this.blue()+l*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new D,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},D.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},D.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},D.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;a--)e.call(n,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-L.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*L.easeInBounce(2*t):.5*L.easeOutBounce(2*t-1)+.5}},R={effects:L},z=Math.PI,E=z/180,N=2*z,B=z/2,W=z/4,V=2*z/3,H={_alignPixel:function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},drawPoint:function(t,n,i,a,r,o){var l,s,u,c,h,d=(o||0)*E;if(n&&"object"===e(n)&&("[object HTMLImageElement]"===(l=n.toString())||"[object HTMLCanvasElement]"===l))return t.save(),t.translate(a,r),t.rotate(d),t.drawImage(n,-n.width/2,-n.height/2,n.width,n.height),void t.restore();if(!(isNaN(i)||i<=0)){switch(t.beginPath(),n){default:t.arc(a,r,i,0,N),t.closePath();break;case"triangle":t.moveTo(a+Math.sin(d)*i,r-Math.cos(d)*i),d+=V,t.lineTo(a+Math.sin(d)*i,r-Math.cos(d)*i),d+=V,t.lineTo(a+Math.sin(d)*i,r-Math.cos(d)*i),t.closePath();break;case"rectRounded":c=i-(h=.516*i),s=Math.cos(d+W)*c,u=Math.sin(d+W)*c,t.arc(a-s,r-u,h,d-z,d-B),t.arc(a+u,r-s,h,d-B,d),t.arc(a+s,r+u,h,d,d+B),t.arc(a-u,r+s,h,d+B,d+z),t.closePath();break;case"rect":if(!o){c=Math.SQRT1_2*i,t.rect(a-c,r-c,2*c,2*c);break}d+=W;case"rectRot":s=Math.cos(d)*i,u=Math.sin(d)*i,t.moveTo(a-s,r-u),t.lineTo(a+u,r-s),t.lineTo(a+s,r+u),t.lineTo(a-u,r+s),t.closePath();break;case"crossRot":d+=W;case"cross":s=Math.cos(d)*i,u=Math.sin(d)*i,t.moveTo(a-s,r-u),t.lineTo(a+s,r+u),t.moveTo(a+u,r-s),t.lineTo(a-u,r+s);break;case"star":s=Math.cos(d)*i,u=Math.sin(d)*i,t.moveTo(a-s,r-u),t.lineTo(a+s,r+u),t.moveTo(a+u,r-s),t.lineTo(a-u,r+s),d+=W,s=Math.cos(d)*i,u=Math.sin(d)*i,t.moveTo(a-s,r-u),t.lineTo(a+s,r+u),t.moveTo(a+u,r-s),t.lineTo(a-u,r+s);break;case"line":s=Math.cos(d)*i,u=Math.sin(d)*i,t.moveTo(a-s,r-u),t.lineTo(a+s,r+u);break;case"dash":t.moveTo(a,r),t.lineTo(a+Math.cos(d)*i,r+Math.sin(d)*i)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r=n?(G.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},at=G.options.resolve,rt=["push","pop","shift","splice","unshift"];function ot(t,e){var n=t&&t.options||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function lt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(rt.forEach((function(e){delete t[e]})),delete t._chartjs)}}function st(t,e){var n,i,a=[],r=t._getSortedDatasetMetas(e);for(n=0,i=r.length;n=e.length))return e[t]._parsed},_applyStack:function(t,e){var n=this.chart,i=this._cachedMeta,a=e[t.id];return ut({keys:st(n,!0),values:e._stacks[t.id]},a,i.index)},_getMinMax:function(t,e){var n,i,a,r,o,l,s,u=this.chart,c=this._cachedMeta,h=c.data,d=h.length,f=e&&c._stacked,g=st(u,!0),p=this._getOtherScale(t),v=Number.NEGATIVE_INFINITY,m=function(t){var e=t._getUserBounds(),n=e.min,i=e.max,a=e.minDefined,r=e.maxDefined;return{min:a?n:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(p),b=m.min,y=m.max;for(o=l=Number.POSITIVE_INFINITY,n=0;ns||y0&&(l=Math.min(l,a)));return{min:o,max:v,minPositive:l}},_getAllParsedValues:function(t){var e,n,i,a=this._cachedMeta.data,r=[];for(e=0,n=a.length;ei?e.insertElements(i,a-i):aa?(r=a/e.innerRadius,t.arc(o,l,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,l,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function bt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+vt,mt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=vt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+vt,n.startAngle,!0),a=0;al;)a-=vt;for(;a=o&&a<=l,u=r>=n.innerRadius&&r<=n.outerRadius;return s&&u}return!1}},{key:"getCenterPoint",value:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}}},{key:"tooltipPosition",value:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}}},{key:"draw",value:function(t){var e,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/vt)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+vt,t.beginPath(),t.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),e=0;et.x&&(e=Tt(e,"left","right")):t.basen?n:i,r:s.right||a<0?0:a>e?e:a,b:s.bottom||r<0?0:r>n?n:r,l:s.left||o<0?0:o>e?e:o}}function Ot(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&Dt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}q._set("global",{elements:{rectangle:{backgroundColor:Pt,borderColor:Pt,borderSkipped:"bottom",borderWidth:0}}});var It=function(t){function e(t){return n(this,e),u(this,o(e).call(this,t))}return r(e,t),a(e,[{key:"draw",value:function(t){var e=this._view,n=function(t){var e=Dt(t),n=e.right-e.left,i=e.bottom-e.top,a=Ft(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())}},{key:"inRange",value:function(t,e){return Ot(this._view,t,e)}},{key:"inXRange",value:function(t){return Ot(this._view,t,null)}},{key:"inYRange",value:function(t){return Ot(this._view,null,t)}},{key:"getCenterPoint",value:function(){var t,e,n=this._view;return At(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}}},{key:"tooltipPosition",value:function(){var t=this._view;return{x:t.x,y:t.y}}}]),e}(et);It.prototype._type="rectangle";var Lt={},Rt=xt,zt=Mt,Et=Ct,Nt=It;Lt.Arc=Rt,Lt.Line=zt,Lt.Point=Et,Lt.Rectangle=Nt;var Bt=G.valueOrDefault;function Wt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,l=e.pixels[t],s=G.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return G.isNullOrUndef(r)?(i=s*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:l-i/2}}function Vt(t,e,n,i){var a=n._parse(t[0],i),r=n._parse(t[1],i),o=Math.min(a,r),l=Math.max(a,r),s=o,u=l;Math.abs(o)>Math.abs(l)&&(s=l,u=o),e[n.id]=u,e._custom={barStart:s,barEnd:u,start:a,end:r,min:o,max:l}}function Ht(t,e,n,i){var a,r,o,l,s=t.iScale,u=t.vScale,c=s._getLabels(),h=s===u,d=[];for(a=n,r=n+i;a0?a[t-1]:null,l=t=Gt?-Xt:b<-Gt?Xt:0)+v,x=Math.cos(b),_=Math.sin(b),k=Math.cos(y),M=Math.sin(y),w=b<=0&&y>=0||y>=Xt,S=b<=$t&&y>=$t||y>=Xt+$t,C=b<=-$t&&y>=-$t||y>=Gt+$t,P=b===-Gt||y>=Gt?-1:Math.min(x,x*p,k,k*p),A=C?-1:Math.min(_,_*p,M,M*p),D=w?1:Math.max(x,x*p,k,k*p),T=S?1:Math.max(_,_*p,M,M*p);u=(D-P)/2,c=(T-A)/2,h=-(D+P)/2,d=-(T+A)/2}for(i=0,a=g.length;i0&&!isNaN(t)?Xt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,l,s,u=0,c=this.chart;if(!t)for(e=0,n=c.data.datasets.length;e(u=l>u?l:u)?s:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=G.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&ee(s[t-1]._model,l)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,l.left,l.right),n.controlPointPreviousY=u(n.controlPointPreviousY,l.top,l.bottom)),t=t.length-1?t[0]:t[e+1]}q._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{tension:0}}});var se=pt.extend({datasetElementType:Lt.Line,dataElementType:Lt.Point,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},_getLabelAndValue:function(t){var e=this._cachedMeta.vScale,n=this._getParsed(t);return{label:e._getLabels()[t],value:""+e.getLabelForValue(n[e.id])}},update:function(t){var e,n,i=this,a=i._cachedMeta,r=a.dataset,o=a.data||[],l=i.chart._animationsDisabled;for(r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(),r.pivot(l),i.updateElements(o,0,o.length,t),i.updateBezierControlPoints(),e=0,n=o.length;e0&&(r=[{datasetIndex:r[0].datasetIndex}]),r},point:function(t,e){return de(t,ce(e,t))},nearest:function(t,e,n){var i=ce(e,t);n.axis=n.axis||"xy";var a=ge(n.axis);return fe(t,i,n.intersect,a)},x:function(t,e,n){var i=ce(e,t),a=[],r=!1;return he(t,(function(t,e,n){t.inXRange(i.x)&&a.push({element:t,datasetIndex:e,index:n}),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=ce(e,t),a=[],r=!1;return he(t,(function(t,e,n){t.inYRange(i.y)&&a.push({element:t,datasetIndex:e,index:n}),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},ve=G.extend;function me(t,e){return G.where(t,(function(t){return t.pos===e}))}function be(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ye(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function xe(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var l=r.getPadding();o.top=Math.max(o.top,l.top),o.left=Math.max(o.left,l.left),o.bottom=Math.max(o.bottom,l.bottom),o.right=Math.max(o.right,l.right)}if(i=e.outerWidth-ye(o,t,"left","right"),a=e.outerHeight-ye(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function _e(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function ke(t,e,n){var i,a,r,o,l,s,u=[];for(i=0,a=t.length;idiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&we.default||we,Pe="$chartjs",Ae="chartjs-size-monitor",De="chartjs-render-monitor",Te="chartjs-render-animation",Fe=["animationstart","webkitAnimationStart"],Oe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Ie(t,e){var n=G.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Le=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Re(t,e,n){t.addEventListener(e,n,Le)}function ze(t,e,n){t.removeEventListener(e,n,Le)}function Ee(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Ne(t){var e=document.createElement("div");return e.className=t||"",e}function Be(t,e,n){var i,a,r,o,l=t[Pe]||(t[Pe]={}),s=l.resizer=function(t){var e=Ne(Ae),n=Ne(Ae+"-expand"),i=Ne(Ae+"-shrink");n.appendChild(Ne()),i.appendChild(Ne()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Re(n,"scroll",a.bind(n,"expand")),Re(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(l.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ee("resize",n)),i&&i.clientWidth0){var r=t[0];r.label?n=r.label:a>0&&r.index-1?t.split("\n"):t}function Je(t){var e=q.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ye(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ye(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ye(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ye(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ye(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ye(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ye(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ye(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ye(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Qe(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ze(t){return Xe([],$e(t))}var tn=function(t){function e(t){var i;return n(this,e),(i=u(this,o(e).call(this,t))).initialize(),i}return r(e,t),a(e,[{key:"initialize",value:function(){this._model=Je(this._options),this._view={},this._lastActive=[]}},{key:"transition",value:function(t){var e=this,n=e._options;e._lastEvent&&e._chart.animating&&(e._active=e._chart.getElementsAtEventForMode(e._lastEvent,n.mode,n),e.update(!0),e.pivot(),e._lastActive=e.active),et.prototype.transition.call(e,t)}},{key:"getTitle",value:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Xe(o,$e(i)),o=Xe(o,$e(a)),o=Xe(o,$e(r))}},{key:"getBeforeBody",value:function(){return Ze(this._options.callbacks.beforeBody.apply(this,arguments))}},{key:"getBody",value:function(t,e){var n=this,i=n._options.callbacks,a=[];return G.each(t,(function(t){var r={before:[],lines:[],after:[]};Xe(r.before,$e(i.beforeLabel.call(n,t,e))),Xe(r.lines,i.label.call(n,t,e)),Xe(r.after,$e(i.afterLabel.call(n,t,e))),a.push(r)})),a}},{key:"getAfterBody",value:function(){return Ze(this._options.callbacks.afterBody.apply(this,arguments))}},{key:"getFooter",value:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Xe(r,$e(n)),r=Xe(r,$e(i)),r=Xe(r,$e(a))}},{key:"update",value:function(t){var e,n,i,a,r,o,l,s,u=this,c=u._options,h=u._model,d=u._model=Je(c),f=u._active,g=u._data,p={xAlign:h.xAlign,yAlign:h.yAlign},v={x:h.x,y:h.y},m={width:h.width,height:h.height},b={x:h.caretX,y:h.caretY};if(f.length){d.opacity=1;var y=[],x=[];b=Ge[c.position].call(u,f,u._eventPosition);var _=[];for(e=0,n=f.length;ei.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===c?r+=h:r-="bottom"===c?e.height+h:e.height/2,"center"===c?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=d:"right"===u&&(a+=d),{x:a,y:r}}(d,m,p=function(t,e){var n,i,a,r,o,l=t._model,s=t._chart,u=s.chartArea,c="center",h="center";l.ys.height-e.height&&(h="bottom");var d=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=d},i=function(t){return t>d}):(n=function(t){return t<=e.width/2},i=function(t){return t>=s.width-e.width/2}),a=function(t){return t+e.width+l.caretSize+l.caretPadding>s.width},r=function(t){return t-e.width-l.caretSize-l.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(l.x)?(c="left",a(l.x)&&(c="center",h=o(l.y))):i(l.x)&&(c="right",r(l.x)&&(c="center",h=o(l.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:c,yAlign:g.yAlign?g.yAlign:h}}(this,m),u._chart)}else d.opacity=0;return d.xAlign=p.xAlign,d.yAlign=p.yAlign,d.x=v.x,d.y=v.y,d.width=m.width,d.height=m.height,d.caretX=b.x,d.caretY=b.y,u._model=d,t&&c.custom&&c.custom.call(u,d),u}},{key:"drawCaret",value:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}},{key:"getCaretPosition",value:function(t,e,n){var i,a,r,o,l,s,u=n.caretSize,c=n.cornerRadius,h=n.xAlign,d=n.yAlign,f=t.x,g=t.y,p=e.width,v=e.height;if("center"===d)l=g+v/2,"left"===h?(a=(i=f)-u,r=i,o=l+u,s=l-u):(a=(i=f+p)+u,r=i,o=l-u,s=l+u);else if("left"===h?(i=(a=f+c+u)-u,r=a+u):"right"===h?(i=(a=f+p-c-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===d)l=(o=g)-u,s=o;else{l=(o=g+v)+u,s=o;var m=r;r=i,i=m}return{x1:i,x2:a,x3:r,y1:o,y2:l,y3:s}}},{key:"drawTitle",value:function(t,e,n){var i,a,r,o=e.title,l=o.length;if(l){var s=Ke(e.rtl,e.x,e.width);for(t.x=Qe(e,e._titleAlign),n.textAlign=s.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=G.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r0&&n.stroke()}},{key:"draw",value:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,G.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),G.rtl.restoreTextDirection(t,e.textDirection),t.restore())}}},{key:"handleEvent",value:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?(n._active=[],n._lastEvent=null):(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),"click"!==t.type&&(n._lastEvent="click"===t.type?null:t),i.reverse&&n._active.reverse()),(e=!G._elementsEqual(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}]),e}(et);tn.positioners=Ge;var en=tn,nn=G.valueOrDefault;function an(){return G.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=function(){return G.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,l=n[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?G.merge(e[t][a],[Ue.getScaleDefaults(r),o]):G.merge(e[t][a],o)}else G._merger(t,e,n,i)}})}(a,r):"scale"===t?e[t]=G.merge(a,[Ue.getScaleDefaults(r.type),r]):G._merger(t,e,n,i)}})}function rn(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(G.findIndex(t,a)>=0);return i}function on(t){return"top"===t||"bottom"===t}function ln(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}q._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var sn=function(t,e){return this.construct(t,e),this};G.extend(sn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=an(q.global,q[t.type],t.options||{}),t}(e);var i=je.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=G.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],sn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return qe.notify(t,"beforeInit"),G.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),qe.notify(t,"afterInit"),t},clear:function(){return G.canvas.clear(this),this},stop:function(){return it.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(G.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:G.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",G.retinaScale(e,n.devicePixelRatio),!t)){var l={width:r,height:o};qe.notify(e,"resize",[l]),n.onResize&&n.onResize(e,l),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;G.each(e.xAxes,(function(t,n){t.id||(t.id=rn(e.xAxes,"x-axis-",n))})),G.each(e.yAxes,(function(t,n){t.id||(t.id=rn(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),G.each(i,(function(e){var i=e.options,r=i.id,o=nn(i.type,e.dtype);on(i.position)!==on(e.dposition)&&(i.position=e.dposition),a[r]=!0;var l=null;if(r in n&&n[r].type===o)(l=n[r]).options=i,l.ctx=t.ctx,l.chart=t;else{var s=Ue.getScaleConstructor(o);if(!s)return;l=new s({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[l.id]=l}l._userMin=l._parse(l.options.min),l._userMax=l._parse(l.options.max),e.isDefault&&(t.scale=l)})),G.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Ue.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t=0;--n)this.drawDataset(e[n],t);qe.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.ctx,a=t._clip,r=n.canvas,o=n.chartArea,l={meta:t,index:t.index,easingValue:e};!1!==qe.notify(n,"beforeDatasetDraw",[l])&&(G.canvas.clipArea(i,{left:!1===a.left?0:o.left-a.left,right:!1===a.right?r.width:o.right+a.right,top:!1===a.top?0:o.top-a.top,bottom:!1===a.bottom?r.height:o.bottom+a.bottom}),t.controller.draw(e),G.canvas.unclipArea(i),qe.notify(n,"afterDatasetDraw",[l]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==qe.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),qe.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return pe.modes.nearest(this,t,{intersect:!0})},getElementsAtEvent:function(t){return pe.modes.index(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return pe.modes.index(this,t,{intersect:!1})},getElementsAtEventForMode:function(t,e,n){var i=pe.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return pe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t],n=this._metasets=this._metasets||[],i=n[t];return i||(i=n[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2].value-n[1].value:n[1].value-n[0].value;Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=fn.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value))<1e-4){var o=fn.log10(Math.abs(t)),l=Math.floor(o)-Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toExponential(l)}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(fn.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},pn=G.canvas._alignPixel,vn=G.isArray,mn=G.isFinite,bn=G.isNullOrUndef,yn=G.valueOrDefault,xn=G.options.resolve;function _n(t,e,n){var i,a=t.ticks.length,r=Math.min(e,a-1),o=t.getPixelForTick(r),l=t._startPixel,s=t._endPixel;if(!(n&&(i=1===a?Math.max(o-l,s-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=rs+1e-6)))return o}function kn(t,e,n,i){var a,r,o,l,s,u,c,h,d,f,g,p,v,m=n.length,b=[],y=[],x=[];for(a=0;ae){for(n=0;n=d||c<=1||!l.isHorizontal()?l.labelRotation=h:(e=(t=l._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(l.maxWidth,l.chart.width-e),e+6>(a=s.offset?l.maxWidth/c:i/(c-1))&&(a=i/(c-(s.offset?.5:1)),r=l.maxHeight-Mn(s.gridLines)-u.padding-wn(s.scaleLabel),o=Math.sqrt(e*e+n*n),f=G.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(d,f))),l.labelRotation=f)}},{key:"afterCalculateTickRotation",value:function(){G.callback(this.options.afterCalculateTickRotation,[this])}},{key:"beforeFit",value:function(){G.callback(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,l=t._isVisible(),s="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:l&&(e.width=Mn(o)+wn(r)),u?l&&(e.height=Mn(o)+wn(r)):e.height=t.maxHeight,a.display&&l){var c=Cn(a),h=t._getLabelSizes(),d=h.first,f=h.last,g=h.widest,p=h.highest,v=.4*c.minor.lineHeight,m=a.padding;if(u){var b=0!==t.labelRotation,y=G.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y),k=_*g.width+x*(p.height-(b?p.offset:0))+(b?0:v);e.height=Math.min(t.maxHeight,e.height+k+m);var M,w,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.ticks.length-1);b?(M=s?x*d.width+_*d.offset:_*(d.height-d.offset),w=s?_*(f.height-f.offset):x*f.width+_*f.offset):(M=d.width/2,w=f.width/2),t.paddingLeft=Math.max((M-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((w-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+m+v;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=d.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)}},{key:"handleMargins",value:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))}},{key:"afterFit",value:function(){G.callback(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options.position;return"top"===t||"bottom"===t}},{key:"isFullWidth",value:function(){return this.options.fullWidth}},{key:"_convertTicksToLabels",value:function(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t),this.afterTickToLabelConversion()}},{key:"_getLabelSizes",value:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=kn(t.ctx,Cn(t.options.ticks),t.ticks,t.longestTextCache),t.longestLabelWidth=e.widest.width),e}},{key:"getLabelForValue",value:function(t){return t}},{key:"getPixelForValue",value:function(){}},{key:"getValueForPixel",value:function(){}},{key:"getPixelForTick",value:function(t){var e=this.options.offset,n=this.ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))}},{key:"getPixelForDecimal",value:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0}},{key:"_autoSkip",value:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,l=r.maxTicksLimit||o/this._tickSize()+1,s=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;el)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;iu)return r;return Math.max(u,1)}(s,t,0,l),u>0){for(e=0,n=u-1;e1?(h-c)/(u-1):null,An(t,i,G.isNullOrUndef(a)?0:c-a,c),An(t,i,h,G.isNullOrUndef(a)?t.length:h+a),Pn(t)}return An(t,i),Pn(t)}},{key:"_tickSize",value:function(){var t=this.options.ticks,e=G.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,l=a?a.highest.height+r:0;return this.isHorizontal()?l*n>o*i?o/n:l/i:l*i0}},{key:"_computeGridLineItems",value:function(t){var e,n,i,a,r,o,l,s,u,c,h,d,f=this,g=f.chart,p=f.options,v=p.gridLines,m=p.position,b=v.offsetGridLines,y=f.isHorizontal(),x=f.ticks,_=x.length+(b?1:0),k=Mn(v),M=[],w={scale:f,tick:x[0]},S=v.drawBorder?xn([v.lineWidth,0],w,0):0,C=S/2,P=function(t){return pn(g,t,S)};for("top"===m?(e=P(f.bottom),o=f.bottom-k,s=e-C,c=P(t.top)+C,d=t.bottom):"bottom"===m?(e=P(f.top),c=t.top,d=P(t.bottom)-C,o=e+C,s=f.top+k):"left"===m?(e=P(f.right),r=f.right-k,l=e-C,u=P(t.left)+C,h=t.right):(e=P(f.left),u=t.left,h=P(t.right)-C,r=e+C,l=f.left+k),n=0;n<_;++n){w={scale:f,tick:x[n]||{}};var A=xn([v.lineWidth],w,n),D=xn([v.color],w,n),T=v.borderDash||[],F=xn([v.borderDashOffset],w,n);void 0!==(i=_n(f,n,b))&&(a=pn(g,i,A),y?r=l=u=h=a:o=s=c=d=a,M.push({tx1:r,ty1:o,tx2:l,ty2:s,x1:u,y1:c,x2:h,y2:d,width:A,color:D,borderDash:T,borderDashOffset:F}))}return M.ticksLength=_,M.borderValue=e,M}},{key:"_computeLabelItems",value:function(){var t,e,n,i,a,r,o,l,s,u,c,h,d=this,f=d.options,g=f.ticks,p=f.position,v=g.mirror,m=d.isHorizontal(),b=d.ticks,y=Cn(g),x=g.padding,_=Mn(f.gridLines),k=-G.toRadians(d.labelRotation),M=[];for("top"===p?(r=d.bottom-_-x,o=k?"left":"center"):"bottom"===p?(r=d.top+_+x,o=k?"right":"center"):"left"===p?(a=d.right-(v?0:_)-x,o=v?"left":"right"):(a=d.left+(v?0:_)+x,o=v?"right":"left"),t=0,e=b.length;t=0&&te.length-1?null:this.getPixelForValue(t+this.min)}},{key:"getValueForPixel",value:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)}},{key:"getBasePixel",value:function(){return this.bottom}}]),e}(Tn),On={position:"bottom"};Fn._defaults=On;var In=G.isNullOrUndef;var Ln=function(t){function e(){return n(this,e),u(this,o(e).apply(this,arguments))}return r(e,t),a(e,[{key:"_parse",value:function(t,e){return G.isNullOrUndef(t)?NaN:("number"==typeof t||t instanceof Number)&&!isFinite(t)?NaN:+t}},{key:"handleTickRangeOptions",value:function(){var t=this,e=t.options;if(e.beginAtZero){var n=G.sign(t.min),i=G.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)}},{key:"getTickLimit",value:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}},{key:"_computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"_handleDirectionalChanges",value:function(t){return t}},{key:"buildTicks",value:function(){var t=this,e=t.options,n=e.ticks,i=t.getTickLimit(),a=function(t,e){var n,i,a,r,o=[],l=t.stepSize,s=l||1,u=t.maxTicks-1,c=t.min,h=t.max,d=t.precision,f=e.min,g=e.max,p=G.niceNum((g-f)/u/s)*s;if(p<1e-14&&In(c)&&In(h))return[{value:f},{value:g}];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=G.niceNum(r*p/u/s)*s),l||In(d)?n=Math.pow(10,G._decimalPlaces(p)):(n=Math.pow(10,d),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,l&&(!In(c)&&G.almostWhole(c/p,p/1e3)&&(i=c),!In(h)&&G.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=G.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push({value:In(c)?i:c});for(var v=1;v0&&(t.min=0),t.handleTickRangeOptions()}},{key:"_computeTickLimit",value:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=G.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))}},{key:"_handleDirectionalChanges",value:function(t){return this.isHorizontal()?t:t.reverse()}},{key:"getPixelForValue",value:function(t){return this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},{key:"getPixelForTick",value:function(t){var e=this._tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}]),e}(Ln),En=Rn;zn._defaults=En;var Nn=G.valueOrDefault,Bn=G.math.log10;var Wn={position:"left",ticks:{callback:gn.formatters.logarithmic}},Vn=function(t){function e(){return n(this,e),u(this,o(e).apply(this,arguments))}return r(e,t),a(e,[{key:"_parse",value:function(t,e){var n=Ln.prototype._parse.apply(this,arguments);return G.isFinite(n)&&n>=0?n:void 0}},{key:"determineDataLimits",value:function(){var t=this,e=t._getMinMax(!0),n=e.min,i=e.max,a=e.minPositive;t.min=G.isFinite(n)?Math.max(0,n):null,t.max=G.isFinite(i)?Math.max(0,i):null,t.minNotZero=G.isFinite(a)?a:null,t.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this,e=t.min,n=t.max;e===n&&(0!==e&&null!==e?(e=Math.pow(10,Math.floor(Bn(e))-1),n=Math.pow(10,Math.floor(Bn(n))+1)):(e=1,n=10)),null===e&&(e=Math.pow(10,Math.floor(Bn(n))-1)),null===n&&(n=0!==e?Math.pow(10,Math.floor(Bn(e))+1):10),null===t.minNotZero&&(t.minNotZero=e>0?e:n<1?Math.pow(10,Math.floor(Bn(n))):1),t.min=e,t.max=n}},{key:"buildTicks",value:function(){var t=this,e=t.options,n=!t.isHorizontal(),i=function(t,e){var n,i,a=[],r=Nn(t.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(e.max)),l=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Bn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push({value:r}),r=i*Math.pow(10,n)):(n=Math.floor(Bn(r)),i=Math.floor(r/Math.pow(10,n)));var s=n<0?Math.pow(10,Math.abs(n)):1;do{a.push({value:r}),10===++i&&(i=1,s=++n>=0?1:s),r=Math.round(i*Math.pow(10,n)*s)/s}while(ne.length-1?null:this.getPixelForValue(e[t])}},{key:"_getFirstTickValue",value:function(t){var e=Math.floor(Bn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)}},{key:"_configure",value:function(){var t=this,e=t.min,n=0;Tn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Nn(t.options.ticks.fontSize,q.global.defaultFontSize)/t._length),t._startValue=Bn(e),t._valueOffset=n,t._valueRange=(Bn(t.max)-Bn(e))/(1-n)}},{key:"getPixelForValue",value:function(t){var e=this,n=0;return t>e.min&&t>0&&(n=(Bn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)}},{key:"getValueForPixel",value:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}]),e}(Tn),Hn=Wn;Vn._defaults=Hn;var jn=G.valueOrDefault,qn=G.valueAtIndexOrDefault,Un=G.options.resolve,Yn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:gn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Kn(t){var e=t.ticks;return e.display&&t.display?jn(e.fontSize,q.global.defaultFontSize)+2*e.backdropPaddingY:0}function Gn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:ta?{start:e-n,end:e}:{start:e,end:e+n}}function Xn(t){return 0===t||180===t?"center":t<180?"left":"right"}function $n(t,e,n,i){var a,r,o=n.y+i/2;if(G.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function Qn(t){return G.isNumber(t)?t:0}var Zn=function(t){function e(){return n(this,e),u(this,o(e).apply(this,arguments))}return r(e,t),a(e,[{key:"setDimensions",value:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Kn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}},{key:"determineDataLimits",value:function(){var t=this._getMinMax(!1),e=t.min,n=t.max;this.min=G.isFinite(e)&&!isNaN(e)?e:0,this.max=G.isFinite(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}},{key:"_computeTickLimit",value:function(){return Math.ceil(this.drawingArea/Kn(this.options))}},{key:"generateTickLabels",value:function(t){var e=this;Ln.prototype.generateTickLabels.call(e,t),e.pointLabels=e.chart.data.labels.map((function(){var t=G.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))}},{key:"fit",value:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=G.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var l,s,u,c=t.chart.data.labels.length;for(e=0;er.r&&(r.r=f.end,o.r=h),g.startr.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)}},{key:"setReductions",value:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),l=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Qn(a),r=Qn(r),o=Qn(o),l=Qn(l),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+l)/2)),i.setCenterPoint(a,r,o,l)}},{key:"setCenterPoint",value:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,l=n+a.drawingArea,s=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((l+s)/2+a.top+a.paddingTop)}},{key:"getIndexAngle",value:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360}},{key:"getDistanceFromCenterForValue",value:function(t){var e=this;if(G.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*n:(t-e.min)*n}},{key:"getPointPosition",value:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)}},{key:"_drawGrid",value:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,l=r.angleLines,s=jn(l.lineWidth,o.lineWidth),u=jn(l.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Kn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=G.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var l=t.chart.data.labels.length-1;l>=0;l--){var s=0===l?a/2:0,u=t.getPointPosition(l,r+s+5),c=qn(i.fontColor,l,q.global.defaultFontColor);e.fillStyle=c;var h=t.getIndexAngle(l),d=G.toDegrees(h);e.textAlign=Xn(d),Jn(d,t._pointLabelSizes[l],u),$n(e,t.pointLabels[l],u,o.lineHeight)}e.restore()}(i),o.display&&G.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i._tickValues[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,l=t.chart.data.labels.length,s=qn(e.color,i-1),u=qn(e.lineWidth,i-1);if((o||l)&&s&&u){if(r.save(),r.strokeStyle=s,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var c=1;c=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}}},{key:"_drawLabels",value:function(){var t=this,e=t.ctx,n=t.options,i=n.ticks;if(i.display){var a,r,o=t.getIndexAngle(0),l=G.options._parseFont(i),s=jn(i.fontColor,q.global.defaultFontColor);e.save(),e.font=l.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",G.each(t.ticks,(function(o,u){(0!==u||n.reverse)&&(a=t.getDistanceFromCenterForValue(t._tickValues[u]),i.showLabelBackdrop&&(r=e.measureText(o.label).width,e.fillStyle=i.backdropColor,e.fillRect(-r/2-i.backdropPaddingX,-a-l.size/2-i.backdropPaddingY,r+2*i.backdropPaddingX,l.size+2*i.backdropPaddingY)),e.fillStyle=s,e.fillText(o.label,0,-a))})),e.restore()}}},{key:"_drawTitle",value:function(){}}]),e}(Ln),ti=Yn;Zn._defaults=ti;var ei=G.options.resolve,ni=G.valueOrDefault,ii=Number.MAX_SAFE_INTEGER||9007199254740991,ai={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}},ri=Object.keys(ai);function oi(t,e){return t-e}function li(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e=0&&o<=l;){if(a=t[(i=o+l>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};l=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],l=o[e]-r[e],s=l?(n-r[e])/l:0,u=(o[i]-r[i])*s;return r[i]+u}function ui(t,e){if(G.isNullOrUndef(e))return null;var n=t._adapter,i=t.options.time,a=i.parser,r=e;return"function"==typeof a&&(r=a(r)),G.isFinite(r)||(r="string"==typeof a?n.parse(r,a):n.parse(r)),null===r?r:(i.round&&(r=t._adapter.startOf(r,i.round)),+r)}function ci(t,e,n,i){var a,r,o,l=ri.length;for(a=ri.indexOf(t);a=0&&(e[r].major=!0);return e}(t,r,o,n):r}function di(t){var e,n,i,a=t._cache.labels||[];if(a.length)return a;for(e=0,n=(i=t._getLabels()).length;e1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+s;for(a=h;ai&&t[a]>n;)a--;return a++,i>0||a=ri.indexOf(n);r--)if(o=ri[r],ai[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ri[n?ri.indexOf(n):0]}(i,s.length,r.minUnit,i.min,i.max)),i._majorUnit=o.major.enabled&&"year"!==i._unit?function(t){for(var e=ri.indexOf(t)+1,n=ri.length;ee&&l=0&&t0?l:1}}]),e}(Tn),vi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};pi._defaults=vi;var mi={category:Fn,linear:zn,logarithmic:Vn,radialLinear:Zn,time:pi},bi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};dn._date.override("function"==typeof t?{_id:"moment",formats:function(){return bi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()}}:{}),q._set("global",{plugins:{filler:{propagate:!0}}});var yi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function _i(t){return(t.scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.scale,l=o.options,s=o.chart.data.labels.length,u=t.fill,c=[];if(!s)return null;for(e=l.reverse?o.max:o.min,n=l.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a0;--l)(h=n[l-1]).boundary||!o&&!r?t.lineTo(h.x,h.y):d(t,n[l],h,!0,r);else for(s=n[0].cx,u=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-s,2)+Math.pow(n[0].y-u,2)),l=a-1;l>0;--l)t.arc(s,u,c,n[l].angle,n[l-1].angle,!0)}}function Ci(t,e,n,i){var a,r,o,l,s,u,c,h,d=e.length,f=i._view,g=i._loop,p=f.spanGaps,v=f.steppedLine,m=f.tension,b=[],y=[],x=0,_=0;for(t.beginPath(),a=0,r=d;a=0;--n)(e=o[n].$filler)&&e.visible&&(a=(i=e.el)._children||[],(r=e.mapper)&&a.length&&(G.canvas.clipArea(l,t.chartArea),Ci(l,a,r,i),G.canvas.unclipArea(l)))}},Ai=G.rtl.getRtlAdapter,Di=G.valueOrDefault;function Ti(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}q._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;es.width)&&(h+=o+n.padding,c[c.length-(e>0?0:1)]=0),l[e]={left:0,top:0,width:i,height:o},c[c.length-1]+=i+n.padding})),s.height+=h}else{var d=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,v=0,m=0;G.each(t.legendItems,(function(t,e){var i=Ti(n,o)+o/2+a.measureText(t.text).width;e>0&&m+o+2*d>s.height&&(p+=v+n.padding,f.push(v),g.push(m),v=0,m=0),v=Math.max(v,i),m+=o+d,l[e]={left:0,top:0,width:i,height:o}})),p+=v,f.push(v),g.push(m),s.width+=p}t.width=s.width,t.height=s.height}else t.width=s.width=t.height=s.height=0}},{key:"afterFit",value:function(){}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){var t=this,e=t.options,n=e.labels,i=q.global,a=i.defaultColor,r=i.elements.line,o=t.height,l=t.columnHeights,s=t.width,u=t.lineWidths;if(e.display){var c,h=Ai(e.rtl,t.left,t.minSize.width),d=t.ctx,f=Di(n.fontColor,i.defaultFontColor),g=G.options._parseFont(n),p=g.size;d.textAlign=h.textAlign("left"),d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=g.string;var v=Ti(n,p),m=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},y=t.isHorizontal();c=y?{x:t.left+b(s,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,l[0]),line:0},G.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=p+n.padding;G.each(t.legendItems,(function(e,i){var f=d.measureText(e.text).width,g=v+p/2+f,_=c.x,k=c.y;h.setWidth(t.minSize.width),y?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=c.y+=x,c.line++,_=c.x=t.left+b(s,u[c.line])):i>0&&k+x>t.top+t.minSize.height&&(_=c.x=_+t.columnWidths[c.line]+n.padding,c.line++,k=c.y=t.top+b(o,l[c.line]));var M=h.x(_);!function(t,e,i){if(!(isNaN(v)||v<=0)){d.save();var o=Di(i.lineWidth,r.borderWidth);if(d.fillStyle=Di(i.fillStyle,a),d.lineCap=Di(i.lineCap,r.borderCapStyle),d.lineDashOffset=Di(i.lineDashOffset,r.borderDashOffset),d.lineJoin=Di(i.lineJoin,r.borderJoinStyle),d.lineWidth=o,d.strokeStyle=Di(i.strokeStyle,a),d.setLineDash&&d.setLineDash(Di(i.lineDash,r.borderDash)),n&&n.usePointStyle){var l=v*Math.SQRT2/2,s=h.xPlus(t,v/2),u=e+p/2;G.canvas.drawPoint(d,i.pointStyle,l,s,u,i.rotation)}else d.fillRect(h.leftForLtr(t,v),e,v,p),0!==o&&d.strokeRect(h.leftForLtr(t,v),e,v,p);d.restore()}}(M,k,e),m[i].left=h.leftForLtr(M,m[i].width),m[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,v+a),o=e+a;d.fillText(n.text,r,o),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(r,o),d.lineTo(h.xPlus(r,i),o),d.stroke())}(M,k,e,f),y?c.x+=g+n.padding:c.y+=x})),G.rtl.restoreTextDirection(t.ctx,e.textDirection)}}},{key:"_getLegendItemAt",value:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null}},{key:"handleEvent",value:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}}]),e}(et);function Oi(t,e){var n=new Fi({ctx:t.ctx,options:e,chart:t});Se.configure(t,n,e),Se.addBox(t,n),t.legend=n}var Ii={id:"legend",_element:Fi,beforeInit:function(t){var e=t.options.legend;e&&Oi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(G.mergeIf(e,q.global.legend),n?(Se.configure(t,n,e),n.options=e):Oi(t,e)):n&&(Se.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}};q._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Li=function(t){function e(t){var i;n(this,e);var a=s(i=u(this,o(e).call(this)));return G.extend(a,t),a.legendHitBoxes=[],i}return r(e,t),a(e,[{key:"beforeUpdate",value:function(){}},{key:"update",value:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize}},{key:"afterUpdate",value:function(){}},{key:"beforeSetDimensions",value:function(){}},{key:"setDimensions",value:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}}},{key:"afterSetDimensions",value:function(){}},{key:"beforeBuildLabels",value:function(){}},{key:"buildLabels",value:function(){}},{key:"afterBuildLabels",value:function(){}},{key:"beforeFit",value:function(){}},{key:"fit",value:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(G.isArray(n.text)?n.text.length:1)*G.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0}},{key:"afterFit",value:function(){}},{key:"isHorizontal",value:function(){var t=this.options.position;return"top"===t||"bottom"===t}},{key:"draw",value:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=G.options._parseFont(n),l=o.lineHeight,s=l/2+n.padding,u=0,c=t.top,h=t.left,d=t.bottom,f=t.right;e.fillStyle=G.valueOrDefault(n.fontColor,q.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=c+s,i=f-h):(a="left"===n.position?h+s:f-s,r=c+(d-c)/2,i=d-c,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(G.isArray(g))for(var p=0,v=0;v=0;i--){var a=t[i];if(e(a))return a}},G.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},G.almostEquals=function(t,e,n){return Math.abs(t-e)=t},G._setMinAndMax=function(t,e){var n,i,a;for(n=0,i=t.length;n0?1:-1},G.toRadians=function(t){return t*(Math.PI/180)},G.toDegrees=function(t){return t*(180/Math.PI)},G._decimalPlaces=function(t){if(G.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},G.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},G.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},G.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,l=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=l/(l+s),c=s/(l+s),h=i*(u=isNaN(u)?0:u),d=i*(c=isNaN(c)?0:c);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+d*(o.x-a.x),y:r.y+d*(o.y-a.y)}}},G.EPSILON=Number.EPSILON||1e-14,G.splineCurveMonotone=function(t){var e,n,i,a,r,o,l,s,u,c=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=c.length;for(e=0;e0?c[e-1]:null,(a=e0?c[e-1]:null,a=e0?(n=l[0].clientX,i=l[0].clientY):(n=a.clientX,i=a.clientY);var s=parseFloat(G.getStyle(r,"padding-left")),u=parseFloat(G.getStyle(r,"padding-top")),c=parseFloat(G.getStyle(r,"padding-right")),h=parseFloat(G.getStyle(r,"padding-bottom")),d=o.right-o.left-s-c,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-s)/d*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},G.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},G.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},G._calculatePadding=function(t,e,n){return(e=G.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},G._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},G.getMaximumWidth=function(t){var e=G._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-G._calculatePadding(e,"padding-left",n)-G._calculatePadding(e,"padding-right",n),a=G.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},G.getMaximumHeight=function(t){var e=G._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-G._calculatePadding(e,"padding-top",n)-G._calculatePadding(e,"padding-bottom",n),a=G.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},G.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},G.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},G.fontString=function(t,e,n){return e+" "+t+"px "+n},G.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,l,s,u,c,h=0,d=n.length;for(o=0;on.length){for(o=0;oi&&(i=r),i},G.color=F?function(t){return t instanceof CanvasGradient&&(t=q.global.defaultColor),F(t)}:function(t){return console.error("Color.js not found!"),t},G.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:G.color(t).saturate(.5).darken(.1).rgbString()}}(),un._adapters=dn,un.Animation=nt,un.animationService=it,un.controllers=ue,un.DatasetController=pt,un.defaults=q,un.Element=et,un.elements=Lt,un.Interaction=pe,un.layouts=Se,un.platform=je,un.plugins=qe,un.Scale=Tn,un.scaleService=Ue,un.Ticks=gn,un.Tooltip=en,un.helpers.each(mi,(function(t,e){un.scaleService.registerScaleType(e,t,t._defaults)})),zi)Object.prototype.hasOwnProperty.call(zi,Wi)&&un.plugins.register(zi[Wi]);un.platform.initialize();var Vi=un;return"undefined"!=typeof window&&(window.Chart=un),Vi}));