1!function(I,Pe){"object"==typeof exports&&typeof module<"u"?module.exports=Pe(function(){try{return require("moment")}catch{}}()):"function"==typeof define&&define.amd?define(["require"],function(We){return Pe(function(){try{return We("moment")}catch{}}())}):(I=I||self).Chart=Pe(I.moment)}(this,function(I){"use strict";I=I&&I.hasOwnProperty("default")?I.default:I;var ne={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]},F=function Pe(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){var t={};for(var r in ne)ne.hasOwnProperty(r)&&(t[ne[r]]=r);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in a)if(a.hasOwnProperty(n)){if(!("channels"in a[n]))throw new Error("missing channels property: "+n);if(!("labels"in a[n]))throw new Error("missing channel labels property: "+n);if(a[n].labels.length!==a[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=a[n].channels,o=a[n].labels;delete a[n].channels,delete a[n].labels,Object.defineProperty(a[n],"channels",{value:i}),Object.defineProperty(a[n],"labels",{value:o})}function l(s,u){return Math.pow(s[0]-u[0],2)+Math.pow(s[1]-u[1],2)+Math.pow(s[2]-u[2],2)}a.rgb.hsl=function(s){var p,b,u=s[0]/255,d=s[1]/255,f=s[2]/255,c=Math.min(u,d,f),v=Math.max(u,d,f),g=v-c;return v===c?p=0:u===v?p=(d-f)/g:d===v?p=2+(f-u)/g:f===v&&(p=4+(u-d)/g),(p=Math.min(60*p,360))<0&&(p+=360),b=(c+v)/2,[p,100*(v===c?0:b<=.5?g/(v+c):g/(2-v-c)),100*b]},a.rgb.hsv=function(s){var u,d,f,c,v,g=s[0]/255,p=s[1]/255,m=s[2]/255,b=Math.max(g,p,m),x=b-Math.min(g,p,m),y=function(k){return(b-k)/6/x+.5};return 0===x?c=v=0:(v=x/b,u=y(g),d=y(p),f=y(m),g===b?c=f-d:p===b?c=1/3+u-f:m===b&&(c=2/3+d-u),c<0?c+=1:c>1&&(c-=1)),[360*c,100*v,100*b]},a.rgb.hwb=function(s){var u=s[0],d=s[1],f=s[2];return[a.rgb.hsl(s)[0],1/255*Math.min(u,Math.min(d,f))*100,100*(f=1-1/255*Math.max(u,Math.max(d,f)))]},a.rgb.cmyk=function(s){var p,u=s[0]/255,d=s[1]/255,f=s[2]/255;return[100*((1-u-(p=Math.min(1-u,1-d,1-f)))/(1-p)||0),100*((1-d-p)/(1-p)||0),100*((1-f-p)/(1-p)||0),100*p]}
vendor: 6,637 bytes, line 1
1,a.rgb.keyword=function(s){var u=t[s];if(u)return u;var f,d=1/0;for(var c in ne)if(ne.hasOwnProperty(c)){var g=l(s,ne[c]);g<d&&(d=g,f=c)}return f},a.keyword.rgb=function(s){return ne[s]},a.rgb.xyz=function(s){var u=s[0]/255,d=s[1]/255,f=s[2]/255;return[100*(.4124*(u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92)+.3576*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)+.1805*(f=f>.04045?Math.pow((f+.055)/1.055,2.4):f/12.92)),100*(.2126*u+.7152*d+.0722*f),100*(.0193*u+.1192*d+.9505*f)]},a.rgb.lab=function(s){var u=a.rgb.xyz(s),d=u[0],f=u[1],c=u[2];return f/=100,c/=108.883,d=(d/=95.047)>.008856?Math.pow(d,1/3):7.787*d+16/116,[116*(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116)-16,500*(d-f),200*(f-(c=c>.008856?Math.pow(c,1/3):7.787*c+16/116))]},a.hsl.rgb=function(s){var c,v,g,p,m,u=s[0]/360,d=s[1]/100,f=s[2]/100;if(0===d)return[m=255*f,m,m];c=2*f-(v=f<.5?f*(1+d):f+d-f*d),p=[0,0,0];for(var b=0;b<3;b++)(g=u+1/3*-(b-1))<0&&g++,g>1&&g--,p[b]=255*(m=6*g<1?c+6*(v-c)*g:2*g<1?v:3*g<2?c+(v-c)*(2/3-g)*6:c);return p},a.hsl.hsv=function(s){var u=s[0],d=s[1]/100,f=s[2]/100,c=d,v=Math.max(f,.01);return d*=(f*=2)<=1?f:2-f,c*=v<=1?v:2-v,[u,100*(0===f?2*c/(v+c):2*d/(f+d)),(f+d)/2*100]},a.hsv.rgb=function(s){var u=s[0]/60,d=s[1]/100,f=s[2]/100,c=Math.floor(u)%6,v=u-Math.floor(u),g=255*f*(1-d),p=255*f*(1-d*v),m=255*f*(1-d*(1-v));switch(f*=255,c){case 0:return[f,m,g];case 1:return[p,f,g];case 2:return[g,f,m];case 3:return[g,p,f];case 4:return[m,g,f];case 5:return[f,g,p]}},a.hsv.hsl=function(s){var v,g,p,u=s[0],d=s[1]/100,f=s[2]/100,c=Math.max(f,.01);return p=(2-d)*f,g=d*c,[u,100*(g=(g/=(v=(2-d)*c)<=1?v:2-v)||0),100*(p/=2)]},a.hwb.rgb=function(s){var v,g,p,m,b,x,y,u=s[0]/360,d=s[1]/100,f=s[2]/100,c=d+f;switch(c>1&&(d/=c,f/=c),p=6*u-(v=Math.floor(6*u)),1&v&&(p=1-p),m=d+p*((g=1-f)-d),v){default:case 6:case 0:b=g,x=m,y=d;break;case 1:b=m,x=g,y=d;break;case 2:b=d,x=g,y=m;break;case 3:b=d,x=m,y=g;break;case 4:b=m,x=d,y=g;break;case 5:b=g,x=d,y=m}return[255*b,255*x,255*y]},a.cmyk.rgb=function(s){var d=s[1]/100,f=s[2]/100,c=s[3]/100;return[255*(1-Math.min(1,s[0]/100*(1-c)+c)),255*(1-Math.min(1,d*(1-c)+c)),255*(1-Math.min(1,f*(1-c)+c))]},a.xyz.rgb=function(s){var c,v,g,u=s[0]/100,d=s[1]/100,f=s[2]/100;return v=-.9689*u+1.8758*d+.0415*f,g=.0557*u+-.204*d+1.057*f,c=(c=3.2406*u+-1.5372*d+-.4986*f)>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,v=v>.0031308?1.055*Math.pow(v,1/2.4)-.055:12.92*v,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:12.92*g,[255*(c=Math.min(Math.max(0,c),1)),255*(v=Math.min(Math.max(0,v),1)),255*(g=Math.min(Math.max(0,g),1))]},a.xyz.lab=function(s){var u=s[0],d=s[1],f=s[2];return d/=100,f/=108.883,u=(u/=95.047)>.008856?Math.pow(u,1/3):7.787*u+16/116,[116*(d=d>.008856?Math.pow(d,1/3):7.787*d+16/116)-16,500*(u-d),200*(d-(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116))]},a.lab.xyz=function(s){var c,v,g;c=s[1]/500+(v=(s[0]+16)/116),g=v-s[2]/200;var p=Math.pow(v,3),m=Math.pow(c,3),b=Math.pow(g,3);return v=p>.008856?p:(v-16/116)/7.787,c=m>.008856?m:(c-16/116)/7.787,g=b>.008856?b:(g-16/116)/7.787,[c*=95.047,v*=100,g*=108.883]},a.lab.lch=function(s){var v,u=s[0],d=s[1],f=s[2];return(v=360*Math.atan2(f,d)/2/Math.PI)<0&&(v+=360),[u,Math.sqrt(d*d+f*f),v]},a.lch.lab=function(s){var g,d=s[1];return g=s[2]/360*2*Math.PI,[s[0],d*Math.cos(g),d*Math.sin(g)]},a.rgb.ansi16=function(s){var u=s[0],d=s[1],f=s[2],c=1 in arguments?arguments[1]:a.rgb.hsv(s)[2];if(0===(c=Math.round(c/50)))return 30;var v=30+(Math.round(f/255)<<2|Math.round(d/255)<<1|Math.round(u/255));return 2===c&&(v+=60),v},a.hsv.ansi16=function(s){return a.rgb.ansi16(a.hsv.rgb(s),s[2])},a.rgb.ansi256=function(s){var u=s[0],d=s[1],f=s[2];return u===d&&d===f?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(d/255*5)+Math.round(f/255*5)},a.ansi16.rgb=function(s){var u=s%10;if(0===u||7===u)return s>50&&(u+=3.5),[u=u/10.5*255,u,u];var d=.5*(1+~~(s>50));return[(1&u)*d*255,(u>>1&1)*d*255,(u>>2&1)*d*255]},a.ansi256.rgb=function(s){if(s>=232){var u=10*(s-232)+8;return[u,u,u]}var d;return s-=16,[Math.floor(s/36)/5*255,Math.floor((d=s%36)/6)/5*255,d%6/5*255]},a.rgb.hex=function(s){var d=(((255&Math.round(s[0]))<<16)+((255&Math.round(s[1]))<<8)+(255&Math.round(s[2]))).toString(16).toUpperCase();return"000000".substring(d.length)+d},a.hex.rgb=function(s){var u=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];var d=u[0];3===u[0].length&&(d=d.split("").map(function(p){return p+p}).join(""));var f=parseInt(d,16);return[f>>16&255,f>>8&255,255&f]},a.rgb.hcg=function(s){var m,u=s[0]/255,d=s[1]/255,f=s[2]/255,c=Math.max(Math.max(u,d),f),v=Math.min(Math.min(u,d),f),g=c-v;return m=g<=0?0:c===u?(d-f)/g%6:c===d?2+(f-u)/g:4+(u-d)/g+4,m/=6,[360*(m%=1),100*g,100*(g<1?v/(1-g):0)]},a.hsl.hcg=function(s){var f,u=s[1]/100,d=s[2]/100,c=0;return(f=d<.5?2*u*d:2*u*(1-d))<1&&(c=(d-.5*f)/(1-f)),[s[0],100*f,100*c]},a.hsv.hcg=function(s){var d=s[2]/100,f=s[1]/100*d,c=0;return f<1&&(c=(d-f)/(1-f)),[s[0],100*f,100*c]},a.hcg.rgb=function(s){var d=s[1]/100,f=s[2]/100;if(0===d)return[255*f,255*f,255*f];var m,c=[0,0,0],v=s[0]/360%1*6,g=v%1,p=1-g;switch(Math.floor(v)){case 0:c[0]=1,c[1]=g,c[2]=0;break;case 1:c[0]=p,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=g;break;case 3:c[0]=0,c[1]=p,c[2]=1;break;case 4:c[0]=g,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=p}return[255*(d*c[0]+(m=(1-d)*f)),255*(d*c[1]+m),255*(d*c[2]+m)]},a.hcg.hsv=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u),c=0;return f>0&&(c=u/f),[s[0],100*c,100*f]},a.hcg.hsl=function(s){var u=s[1]/100,f=s[2]/100*(1-u)+.5*u,c=0;return f>0&&f<.5?c=u/(2*f):f>=.5&&f<1&&(c=u/(2*(1-f))),[s[0],100*c,100*f]},a.hcg.hwb=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u);return[s[0],100*(f-u),100*(1-f)]},a.hwb.hcg=function(s){var f=1-s[2]/100,c=f-s[1]/100,v=0;return c<1&&(v=(f-c)/(1-c)),[s[0],100*c,100*v]},a.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},a.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},a.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},a.gray.hsl=a.gray.hsv=function(s){return[0,0,s[0]]},a.gray.hwb=function(s){return[0,100,s[0]]},a.gray.cmyk=function(s){return[0,0,0,s[0]]},a.gray.lab=function(s){return[s[0],0,0]},a.gray.hex=function(s){var u=255&Math.round(s[0]/100*255),f=((u<<16)+(u<<8)+u).toString(16).toUpperCase();return"000000".substring(f.length)+f},a.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});function Xr(e,t){return function(r){return t(e(r))}}function Kr(e,t){for(var r=[t[e].parent,e],a=F[t[e].parent][e],n=t[e].parent;t[n].parent;)r.unshift(t[n].parent),a=Xr(F[t[n].parent][n],a),n=t[n].parent;return a.conversion=r,a}var be={};
1Object.keys(F).forEach(function(e){be[e]={},Object.defineProperty(be[e],"channels",{value:F[e].channels}),Object.defineProperty(be[e],"labels",{value:F[e].labels});var t=function(e){for(var t=function Gr(e){var t=function Yr(){for(var e={},t=Object.keys(F),r=t.length,a=0;a<r;a++)e[t[a]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var a=r.pop(),n=Object.keys(F[a]),i=n.length,o=0;o<i;o++){var l=n[o],s=t[l];-1===s.distance&&(s.distance=t[a].distance+1,s.parent=a,r.unshift(l))}return t}(e),r={},a=Object.keys(t),n=a.length,i=0;i<n;i++){var o=a[i];null!==t[o].parent&&(r[o]=Kr(o,t))}return r}(e);Object.keys(t).forEach(function(a){var n=t[a];be[e][a]=function ea(e){var t=function(r){if(null==r)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var a=e(r);if("object"==typeof a)for(var n=a.length,i=0;i<n;i++)a[i]=Math.round(a[i]);return a};return"conversion"in e&&(t.conversion=e.conversion),t}(n),be[e][a].raw=function Qr(e){var t=function(r){return null==r?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});var ta=be,at={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
1],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]},G={getRgba:nt,getHsla:it,getRgb:function ra(e){var t=nt(e);return t&&t.slice(0,3)},getHsl:function aa(e){var t=it(e);return t&&t.slice(0,3)},getHwb:Wt,getAlpha:function na(e){var t=nt(e);return t||(t=it(e))||(t=Wt(e))?t[3]:void 0},hexString:function ia(e,r){return r=void 0!==r&&3===e.length?r:e[3],"#"+He(e[0])+He(e[1])+He(e[2])+(r>=0&&r<1?He(Math.round(255*r)):"")},rgbString:function oa(e,t){return t<1||e[3]&&e[3]<1?Ht(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:Ht,percentString:function sa(e,t){return t<1||e[3]&&e[3]<1?Vt(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:Vt,hslString:function la(e,t){return t<1||e[3]&&e[3]<1?jt(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:jt,hwbString:function ua(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function da(e){return qt[e.slice(0,3)]}};function nt(e){if(e){var o=[0,0,0],l=1,s=e.match(/^#([a-fA-F0-9]{3,4})$/i),u="";if(s){u=(s=s[1])[3];for(var d=0;d<o.length;d++)o[d]=parseInt(s[d]+s[d],16);u&&(l=Math.round(parseInt(u+u,16)/255*100)/100)}else if(s=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(u=s[2],s=s[1],d=0;d<o.length;d++)o[d]=parseInt(s.slice(2*d,2*d+2),16);u&&(l=Math.round(parseInt(u,16)/255*100)/100)}else if(s=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(d=0;d<o.length;d++)o[d]=parseInt(s[d+1]);l=parseFloat(s[4])}else if(s=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(d=0;d<o.length;d++)o[d]=Math.round(2.55*parseFloat(s[d+1]));l=parseFloat(s[4])}else if(s=e.match(/(\w+)/)){if("transparent"==s[1])return[0,0,0,0];if(!(o=at[s[1]]))return}for(d=0;d<o.length;d++)o[d]=X(o[d],0,255);return l=l||0==l?X(l,0,1):1,o[3]=l,o}}function it(e){if(e){var r=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(r){var a=parseFloat(r[4]);return[X(parseInt(r[1]),0,360),X(parseFloat(r[2]),0,100),X(parseFloat(r[3]),0,100),X(isNaN(a)?1:a,0,1)]}}}function Wt(e){if(e){var r=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(r){var a=parseFloat(r[4]);return[X(parseInt(r[1]),0,360),X(parseFloat(r[2]),0,100),X(parseFloat(r[3]),0,100),X(isNaN(a)?1:a,0,1)]}}}function Ht(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function Vt(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function jt(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function X(e,t,r){return Math.min(Math.max(t,e),r)}function He(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var qt={};for(var Ut in at)qt[at[Ut]]=Ut;var j=function(e){return e instanceof j?e:this instanceof j?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=G.getRgba(e))?this.setValues("rgb",t):(t=G.getHsla(e))?this.setValues("hsl",t):(t=G.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):(void 0!==t.c||void 0!==t.cyan)&&this.setValues("cmyk",t)))):new j(e);var t};j.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])}
vendor: 39,868 bytes, line 1
1,alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return G.hexString(this.values.rgb)},rgbString:function(){return G.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return G.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return G.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return G.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return G.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return G.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return G.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],r=0;r<e.length;r++){var a=e[r]/255;t[r]=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360;return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=this,a=e,n=void 0===t?.5:t,i=2*n-1,o=r.alpha()-a.alpha(),l=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-l;return this.rgb(l*r.red()+s*a.red(),l*r.green()+s*a.green(),l*r.blue()+s*a.blue()).alpha(r.alpha()*n+a.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var a,n,e=new j,t=this.values,r=e.values;for(var i in t)t.hasOwnProperty(i)&&("[object Array]"===(n={}.toString.call(a=t[i]))?r[i]=a.slice(0):"[object Number]"===n?r[i]=a:console.error("unexpected color value:",a));return e}},j.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},j.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},j.prototype.getValues=function(e){for(var t=this.values,r={},a=0;a<e.length;a++)r[e.charAt(a)]=t[e][a];return 1!==t.alpha&&(r.a=t.alpha),r},j.prototype.setValues=function(e,t){var o,s,r=this.values,a=this.spaces,n=this.maxes,i=1;if(this.valid=!0,"alpha"===e)i=t;else if(t.length)r[e]=t.slice(0,e.length),i=t[e.length];else if(void 0!==t[e.charAt(0)]){for(o=0;o<e.length;o++)r[e][o]=t[e.charAt(o)];i=t.a}else if(void 0!==t[a[e][0]]){var l=a[e];for(o=0;o<e.length;o++)r[e][o]=t[l[o]];i=t.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===i?r.alpha:i)),"alpha"===e)return!1;for(o=0;o<e.length;o++)s=Math.max(0,Math.min(n[e][o],r[e][o])),r[e][o]=Math.round(s);for(var u in a)u!==e&&(r[u]=ta[e][u](r[e]));return!0},j.prototype.setSpace=function(e,t){var r=t[0];return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r),this)},j.prototype.setChannel=function(e,t,r){var a=this.values[e];return void 0===r?a[t]:(r===a[t]||(a[t]=r,this.setValues(e,a)),this)},typeof window<"u"&&(window.Color=j);var Ve=j;function $t(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var e,S={noop:function(){},uid:(e=0,function(){return e++}),isNullOrUndef:function(e){return null===e||typeof e>"u"},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return typeof e>"u"?t:e},valueAtIndexOrDefault:function(e,t,r){return S.valueOrDefault(S.isArray(e)?e[t]:e,r)},callback:function(e,t,r){if(e&&"function"==typeof e.call)return e.apply(r,t)},each:function(e,t,r,a){var n,i,o;if(S.isArray(e))if(i=e.length,a)for(n=i-1;n>=0;n--)t.call(r,e[n],n);else for(n=0;n<i;n++)t.call(r,e[n],n);else if(S.isObject(e))for(i=(o=Object.keys(e)).length,n=0;n<i;n++)t.call(r,e[o[n]],o[n])},arrayEquals:function(e,t){var r,a,n,i;if(!e||!t||e.length!==t.length)return!1;for(r=0,a=e.length;r<a;++r)if(i=t[r],(n=e[r])instanceof Array&&i instanceof Array){if(!S.arrayEquals(n,i))return!1}else if(n!==i)return!1;return!0},clone:function(e){if(S.isArray(e))return e.map(S.clone);if(S.isObject(e)){for(var t=Object.create(e),r=Object.keys(e),a=r.length,n=0;n<a;++n)t[r[n]]=S.clone(e[r[n]]);return t}return e},_merger:function(e,t,r,a){if($t(e)){var n=t[e],i=r[e];S.isObject(n)&&S.isObject(i)?S.merge(n,i,a):t[e]=S.clone(i)}},_mergerIf:function(e,t,r){if($t(e)){var a=t[e],n=r[e];S.isObject(a)&&S.isObject(n)?S.mergeIf(a,n):t.hasOwnProperty(e)||(t[e]=S.clone(n))}},merge:function(e,t,r){var i,o,l,s,u,a=S.isArray(t)?t:[t],n=a.length;if(!S.isObject(e))return e;for(i=(r=r||{}).merger||S._merger,o=0;o<n;++o)if(S.isObject(t=a[o]))for(u=0,s=(l=Object.keys(t)).length;u<s;++u)i(l[u],e,t,r);return e},mergeIf:function(e,t){return S.merge(e,t,{merger:S._mergerIf})},extend:Object.assign||function(e){return S.merge(e,[].slice.call(arguments,1),{merger:function(t,r,a){r[t]=a[t]}})},inherits:function(e){var t=this,r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},a=function(){this.constructor=r};return a.prototype=t.prototype,r.prototype=new a,r.extend=S.inherits,e&&S.extend(r.prototype,e),r.__super__=t.prototype,r},_deprecated:function(e,t,r,a){void 0!==t&&console.warn(e+': "'+r+'" is deprecated. Please use "'+a+'" instead')}},q=S;S.callCallback=S.callback,S.indexOf=function(e,t,r){return Array.prototype.indexOf.call(e,t,r)},S.getValueOrDefault=S.valueOrDefault,S.getValueAtIndexOrDefault=S.valueAtIndexOrDefault;var De={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:2==(e/=.5)?1:(r||(r=.45),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),e<1?a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:a*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-De.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*De.easeInBounce(2*e):.5*De.easeOutBounce(2*e-1)+.5}},fa={effects:De};q.easingEffects=De;var B=Math.PI,ha=B/180,ca=2*B,U=B/2,Ae=B/4,Yt=2*B/3,je={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,a,n,i){if(i){var o=Math.min(i,n/2,a/2),l=t+o,s=r+o,u=t+a-o,d=r+n-o;e.moveTo(t,s),l<u&&s<d?(e.arc(l,s,o,-B,-U),e.arc(u,s,o,-U,0),e.arc(u,d,o,0,U),e.arc(l,d,o,U,B)):l<u?(e.moveTo(l,r),e.arc(u,s,o,-U,U),e.arc(l,s,o,U,B+U)):s<d?(e.arc(l,s,o,-B,0),e.arc(l,d,o,0,B)):e.arc(l,s,o,-B,B),e.closePath(),e.moveTo(t,r)}else e.rect(t,r,a,n)},drawPoint:function(e,t,r,a,n,i){var o,l,s,u,d,f=(i||0)*ha;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(o=t.toString())||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(a,n),e.rotate(f),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(r)||r<=0)){switch(e.beginPath(),t){default:e.arc(a,n,r,0,ca),e.closePath();break;case"triangle":e.moveTo(a+Math.sin(f)*r,n-Math.cos(f)*r),f+=Yt,e.lineTo(a+Math.sin(f)*r,n-Math.cos(f)*r),f+=Yt,e.lineTo(a+Math.sin(f)*r,n-Math.cos(f)*r),e.closePath();break;case"rectRounded":u=r-(d=.516*r),l=Math.cos(f+Ae)*u,s=Math.sin(f+Ae)*u,e.arc(a-l,n-s,d,f-B,f-U),e.arc(a+s,n-l,d,f-U,f),e.arc(a+l,n+s,d,f,f+U),e.arc(a-s,n+l,d,f+U,f+B),e.closePath();break;case"rect":if(!i){u=Math.SQRT1_2*r,e.rect(a-u,n-u,2*u,2*u);break}f+=Ae;case"rectRot":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+s,n-l),e.lineTo(a+l,n+s),e.lineTo(a-s,n+l),e.closePath();break;case"crossRot":f+=Ae;case"cross":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l);break;case"star":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l),f+=Ae,l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l);break;case"line":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s);break;case"dash":e.moveTo(a,n),e.lineTo(a+Math.cos(f)*r,n+Math.sin(f)*r)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){var r=1e-6;return e.x>t.left-r&&e.x<t.right+r&&e.y>t.top-r&&e.y<t.bottom+r},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,r,a){var n=r.steppedLine;if(n){if("middle"===n){var i=(t.x+r.x)/2;e.lineTo(i,a?r.y:t.y),e.lineTo(i,a?t.y:r.y)}else"after"===n&&!a||"after"!==n&&a?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y);e.lineTo(r.x,r.y)}else r.tension?e.bezierCurveTo(a?t.controlPointPreviousX:t.controlPointNextX,a?t.controlPointPreviousY:t.controlPointNextY,a?r.controlPointNextX:r.controlPointPreviousX,a?r.controlPointNextY:r.controlPointPreviousY,r.x,r.y):e.lineTo(r.x,r.y)}},va=je;q.clear=je.clear,q.drawRoundedRectangle=function(e){e.beginPath(),je.roundedRect.apply(je,arguments)};var Gt={_set:function(e,t){return q.merge(this[e]||(this[e]={}),t)}};Gt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var _=Gt,qe=q.valueOrDefault,pa={toLineHeight:function(e,t){var r=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!r||"normal"===r[1])return 1.2*t;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,r,a,n;return q.isObject(e)?(t=+e.top||0,r=+e.right||0,a=+e.bottom||0,n=+e.left||0):t=r=a=n=+e||0,{top:t,right:r,bottom:a,left:n,height:t+a,width:n+r}},_parseFont:function(e){var t=_.global,r=qe(e.fontSize,t.defaultFontSize),a={family:qe(e.fontFamily,t.defaultFontFamily),lineHeight:q.options.toLineHeight(qe(e.lineHeight,t.defaultLineHeight),r),size:r,style:qe(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return a.string=function ga(e){return!e||q.isNullOrUndef(e.size)||q.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(a),a},resolve:function(e,t,r,a){var i,o,l,n=!0;for(i=0,o=e.length;i<o;++i)if(void 0!==(l=e[i])&&(void 0!==t&&"function"==typeof l&&(l=l(t),n=!1),void 0!==r&&q.isArray(l)&&(l=l[r],n=!1),void 0!==l))return a&&!n&&(a.cacheable=!1),l}},Xt={_factorize:function(e){var a,t=[],r=Math.sqrt(e);for(a=1;a<r;a++)e%a==0&&(t.push(a),t.push(e/a));return r===(0|r)&&t.push(r),t.sort(function(n,i){return n-i}).pop(),t},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,r=Math.round(t);return e===Math.pow(10,r)?r:t}},ma=Xt;q.log10=Xt.log10;var h=q,Sa=va,Ca=pa,Pa=ma,Da={getRtlAdapter:function(e,t,r){return e?function(e,t){return{x:function(r){return e+e+t-r},setWidth:function(r){t=r},textAlign:function(r){return"center"===r?r:"right"===r?"left":"right"},xPlus:function(r,a){return r-a},leftForLtr:function(r,a){return r-a}}}(t,r):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var r,a;("ltr"===t||"rtl"===t)&&(a=[(r=e.canvas.style).getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=a)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};h.easing=fa,h.canvas=Sa,h.options=Ca,h.math=Pa,h.rtl=Da;var ot=function(e){h.extend(this,e),this.initialize.apply(this,arguments)};h.extend(ot.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=h.extend({},e._model)),e._start={},e},transition:function(e){var t=this,r=t._model,a=t._start,n=t._view;return r&&1!==e?(n||(n=t._view={}),a||(a=t._start={}),function Aa(e,t,r,a){var i,o,l,s,u,d,f,c,v,n=Object.keys(r);for(i=0,o=n.length;i<o;++i)if(d=r[l=n[i]],t.hasOwnProperty(l)||(t[l]=d),(s=t[l])!==d&&"_"!==l[0]){if(e.hasOwnProperty(l)||(e[l]=s),(f=typeof d)==typeof(u=e[l]))if("string"===f){if((c=Ve(u)).valid&&(v=Ve(d)).valid){t[l]=v.mix(c,a).rgbString();continue}}else if(h.isFinite(u)&&h.isFinite(d)){t[l]=u+(d-u)*a;continue}t[l]=d}}(a,n,r,e),t):(t._view=h.extend({},r),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return h.isNumber(this._model.x)&&h.isNumber(this._model.y)}}),ot.extend=h.inherits;var K=ot,st=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),lt=st;Object.defineProperty(st.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(st.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),_._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:h.noop,onComplete:h.noop}});var ut={animations:[],request:null,addAnimation:function(e,t,r,a){var i,o,n=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=r,a||(e.animating=!0),i=0,o=n.length;i<o;++i)if(n[i].chart===e)return void(n[i]=t);n.push(t),1===n.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=h.findIndex(this.animations,function(r){return r.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=h.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){var e=this;e.advance(),e.animations.length>0&&e.requestAnimationFrame()},advance:function(){for(var t,r,a,n,e=this.animations,i=0;i<e.length;)r=(t=e[i]).chart,a=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*a)+1,t.currentStep=Math.min(n,a),h.callback(t.render,[r,t],r),h.callback(t.onAnimationProgress,[t],r),t.currentStep>=a?(h.callback(t.onAnimationComplete,[t],r),r.animating=!1,e.splice(i,1)):++i}},xe=h.options.resolve,Kt=["push","pop","shift","splice","unshift"];function Zt(e,t){var r=e._chartjs;if(r){var a=r.listeners,n=a.indexOf(t);-1!==n&&a.splice(n,1),!(a.length>0)&&(Kt.forEach(function(i){delete e[i]}),delete e._chartjs)}}var dt=function(e,t){this.initialize(e,t)};h.extend(dt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this;r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),r=e.chart,a=r.scales,n=e.getDataset(),i=r.options.scales;(null===t.xAxisID||!(t.xAxisID in a)||n.xAxisID)&&(t.xAxisID=n.xAxisID||i.xAxes[0].id),(null===t.yAxisID||!(t.yAxisID in a)||n.yAxisID)&&(t.yAxisID=n.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Zt(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,r=t.dataElementType;return r&&new r({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var n,i,e=this,t=e.getMeta(),r=e.getDataset().data||[],a=t.data;for(n=0,i=r.length;n<i;++n)a[n]=a[n]||e.createMetaData(n);t.dataset=t.dataset||e.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e=this,t=e.getDataset(),r=t.data||(t.data=[]);e._data!==r&&(e._data&&Zt(e._data,e),r&&Object.isExtensible(r)&&function Ta(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Kt.forEach(function(r){var a="onData"+r.charAt(0).toUpperCase()+r.slice(1),n=e[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!1,value:function(){var i=Array.prototype.slice.call(arguments),o=n.apply(this,i);return h.each(e._chartjs.listeners,function(l){"function"==typeof l[a]&&l[a].apply(l,i)}),o}})}))}(r,e),e._data=r),e.resyncElements()},_configure:function(){var e=this;e._config=h.merge(Object.create(null),[e.chart.options.datasets[e._type],e.getDataset()],{merger:function(t,r,a){"_meta"!==t&&"data"!==t&&h._merger(t,r,a)}})},_update:function(e){var t=this;t._configure(),t._cachedDataOpts=null,t.update(e)},update:h.noop,transition:function(e){for(var t=this.getMeta(),r=t.data||[],a=r.length,n=0;n<a;++n)r[n].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],r=t.length,a=0;for(e.dataset&&e.dataset.draw();a<r;++a)t[a].draw()},getStyle:function(e){var n,t=this,r=t.getMeta(),a=r.dataset;return t._configure(),(!1===(n=a&&void 0===e?t._resolveDatasetElementOptions(a||{}):t._resolveDataElementOptions(r.data[e=e||0]||{},e)).fill||null===n.fill)&&(n.backgroundColor=n.borderColor),n},_resolveDatasetElementOptions:function(e,t){var u,d,f,c,r=this,a=r.chart,n=r._config,i=e.custom||{},o=a.options.elements[r.datasetElementType.prototype._type]||{},l=r._datasetElementOptions,s={},v={chart:a,dataset:r.getDataset(),datasetIndex:r.index,hover:t};for(u=0,d=l.length;u<d;++u)f=l[u],c=t?"hover"+f.charAt(0).toUpperCase()+f.slice(1):f,s[f]=xe([i[c],n[c],o[c]],v);return s},_resolveDataElementOptions:function(e,t){var r=this,a=e&&e.custom,n=r._cachedDataOpts;if(n&&!a)return n;var c,v,g,p,i=r.chart,o=r._config,l=i.options.elements[r.dataElementType.prototype._type]||{},s=r._dataElementOptions,u={},d={chart:i,dataIndex:t,dataset:r.getDataset(),datasetIndex:r.index},f={cacheable:!a};if(a=a||{},h.isArray(s))for(v=0,g=s.length;v<g;++v)u[p=s[v]]=xe([a[p],o[p],l[p]],d,t,f);else for(v=0,g=(c=Object.keys(s)).length;v<g;++v)u[p=c[v]]=xe([a[p],o[s[p]],o[p],l[p]],d,t,f);return f.cacheable&&(r._cachedDataOpts=Object.freeze(u)),u},removeHoverStyle:function(e){h.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,a=e.custom||{},n=e._model,i=h.getHoverColor;e.$previousStyle={backgroundColor:n.backgroundColor,borderColor:n.borderColor,borderWidth:n.borderWidth},n.backgroundColor=xe([a.hoverBackgroundColor,t.hoverBackgroundColor,i(n.backgroundColor)],void 0,r),n.borderColor=xe([a.hoverBorderColor,t.hoverBorderColor,i(n.borderColor)],void 0,r),n.borderWidth=xe([a.hoverBorderWidth,t.hoverBorderWidth,n.borderWidth],void 0,r)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var r,a,n,i,o,l,e=this.getMeta().dataset,t={};if(e){for(l=e._model,o=this._resolveDatasetElementOptions(e,!0),r=0,a=(i=Object.keys(o)).length;r<a;++r)t[n=i[r]]=l[n],l[n]=o[n];e.$previousStyle=t}},resyncElements:function(){var e=this,t=e.getMeta(),r=e.getDataset().data,a=t.data.length,n=r.length;n<a?t.data.splice(n,a-n):n>a&&e.insertElements(a,n-a)},insertElements:function(e,t){for(var r=0;r<t;++r)this.addElementAndReset(e+r)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),dt.extend=h.inherits;var $=dt,Z=2*Math.PI;function Jt(e,t){var r=t.startAngle,a=t.endAngle,n=t.pixelMargin,i=n/t.outerRadius,o=t.x,l=t.y;e.beginPath(),e.arc(o,l,t.outerRadius,r-i,a+i),t.innerRadius>n?e.arc(o,l,t.innerRadius-n,a+(i=n/t.innerRadius),r-i,!0):e.arc(o,l,n,a+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}_._set("global",{elements:{arc:{backgroundColor:_.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var Oa=K.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var r=this._view;if(r){for(var a=h.getAngleFromPoint(r,{x:e,y:t}),n=a.angle,i=a.distance,o=r.startAngle,l=r.endAngle;l<o;)l+=Z;for(;n>l;)n-=Z;for(;n<o;)n+=Z;return n>=o&&n<=l&&i>=r.innerRadius&&i<=r.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var n,e=this._chart.ctx,t=this._view,r="inner"===t.borderAlign?.33:0,a={x:t.x,y:t.y,innerRadius:t.innerRadius,outerRadius:Math.max(t.outerRadius-r,0),pixelMargin:r,startAngle:t.startAngle,endAngle:t.endAngle,fullCircles:Math.floor(t.circumference/Z)};if(e.save(),e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+Z,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),n=0;n<a.fullCircles;++n)e.fill();a.endAngle=a.startAngle+t.circumference%Z}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),t.borderWidth&&function Ia(e,t,r){var a="inner"===t.borderAlign;a?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&function Fa(e,t,r,a){var i,n=r.endAngle;for(a&&(r.endAngle=r.startAngle+Z,Jt(e,r),r.endAngle=n,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=Z,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+Z,r.startAngle,!0),i=0;i<r.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(r.x,r.y,t.outerRadius,r.startAngle,r.startAngle+Z),i=0;i<r.fullCircles;++i)e.stroke()}(e,t,r,a),a&&Jt(e,r),e.beginPath(),e.arc(r.x,r.y,t.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.stroke()}(e,t,a),e.restore()}}),Qt=h.valueOrDefault,er=_.global.defaultColor;_._set("global",{elements:{line:{tension:.4,backgroundColor:er,borderWidth:3,borderColor:er,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var La=K.extend({_type:"line",draw:function(){var u,d,f,e=this,t=e._view,r=e._chart.ctx,a=t.spanGaps,n=e._children.slice(),i=_.global,o=i.elements.line,l=-1,s=e._loop;if(n.length){if(e._loop){for(u=0;u<n.length;++u)if(d=h.previousItem(n,u),!n[u]._view.skip&&d._view.skip){n=n.slice(u).concat(n.slice(0,u)),s=a;break}s&&n.push(n[0])}for(r.save(),r.lineCap=t.borderCapStyle||o.borderCapStyle,r.setLineDash&&r.setLineDash(t.borderDash||o.borderDash),r.lineDashOffset=Qt(t.borderDashOffset,o.borderDashOffset),r.lineJoin=t.borderJoinStyle||o.borderJoinStyle,r.lineWidth=Qt(t.borderWidth,o.borderWidth),r.strokeStyle=t.borderColor||i.defaultColor,r.beginPath(),(f=n[0]._view).skip||(r.moveTo(f.x,f.y),l=0),u=1;u<n.length;++u)f=n[u]._view,d=-1===l?h.previousItem(n,u):n[l],f.skip||(l!==u-1&&!a||-1===l?r.moveTo(f.x,f.y):h.canvas.lineTo(r,d._view,f),l=u);s&&r.closePath(),r.stroke(),r.restore()}}}),Ra=h.valueOrDefault,tr=_.global.defaultColor;function rr(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}_._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:tr,borderColor:tr,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var za=K.extend({_type:"point",inRange:function(e,t){var r=this._view;return!!r&&Math.pow(e-r.x,2)+Math.pow(t-r.y,2)<Math.pow(r.hitRadius+r.radius,2)},inLabelRange:rr,inXRange:rr,inYRange:function Na(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,r=this._chart.ctx,a=t.pointStyle,n=t.rotation,i=t.radius,o=t.x,l=t.y,s=_.global,u=s.defaultColor;t.skip||(void 0===e||h.canvas._isPointInArea(t,e))&&(r.strokeStyle=t.borderColor||u,r.lineWidth=Ra(t.borderWidth,s.elements.point.borderWidth),r.fillStyle=t.backgroundColor||u,h.canvas.drawPoint(r,a,i,o,l,n))}}),ar=_.global.defaultColor;function Ue(e){return e&&void 0!==e.width}function nr(e){var t,r,a,n,i;return Ue(e)?(t=e.x-(i=e.width/2),r=e.x+i,a=Math.min(e.y,e.base),n=Math.max(e.y,e.base)):(i=e.height/2,t=Math.min(e.x,e.base),r=Math.max(e.x,e.base),a=e.y-i,n=e.y+i),{left:t,top:a,right:r,bottom:n}}function ir(e,t,r){return e===t?r:e===r?t:e}function Te(e,t,r){var a=null===t,n=null===r,i=!(!e||a&&n)&&nr(e);return i&&(a||t>=i.left&&t<=i.right)&&(n||r>=i.top&&r<=i.bottom)}_._set("global",{elements:{rectangle:{backgroundColor:ar,borderColor:ar,borderSkipped:"bottom",borderWidth:0}}});var Ha=K.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=function Wa(e){var t=nr(e),r=t.right-t.left,a=t.bottom-t.top,n=function Ea(e,t,r){var i,o,l,s,a=e.borderWidth,n=function Ba(e){var t=e.borderSkipped,r={};return t&&(e.horizontal?e.base>e.x&&(t=ir(t,"left","right")):e.base<e.y&&(t=ir(t,"bottom","top")),r[t]=!0),r}(e);return h.isObject(a)?(i=+a.top||0,o=+a.right||0,l=+a.bottom||0,s=+a.left||0):i=o=l=s=+a||0,{t:n.top||i<0?0:i>r?r:i,r:n.right||o<0?0:o>t?t:o,b:n.bottom||l<0?0:l>r?r:l,l:n.left||s<0?0:s>t?t:s}}(e,r/2,a/2);return{outer:{x:t.left,y:t.top,w:r,h:a},inner:{x:t.left+n.l,y:t.top+n.t,w:r-n.l-n.r,h:a-n.t-n.b}}}(t),a=r.outer,n=r.inner;e.fillStyle=t.backgroundColor,e.fillRect(a.x,a.y,a.w,a.h),(a.w!==n.w||a.h!==n.h)&&(e.save(),e.beginPath(),e.rect(a.x,a.y,a.w,a.h),e.clip(),e.fillStyle=t.borderColor,e.rect(n.x,n.y,n.w,n.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Te(this._view,e,t)},inLabelRange:function(e,t){var r=this._view;return Ue(r)?Te(r,e,null):Te(r,null,t)},inXRange:function(e){return Te(this._view,e,null)},inYRange:function(e){return Te(this._view,null,e)},getCenterPoint:function(){var t,r,e=this._view;return Ue(e)?(t=e.x,r=(e.y+e.base)/2):(t=(e.x+e.base)/2,r=e.y),{x:t,y:r}},getArea:function(){var e=this._view;return Ue(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),E={},ja=La,qa=za,Ua=Ha;E.Arc=Oa,E.Line=ja,E.Point=qa,E.Rectangle=Ua;var Fe=h._deprecated,ye=h.valueOrDefault;_._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),_._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var or=$.extend({dataElementType:E.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,r,e=this;$.prototype.initialize.apply(e,arguments),(t=e.getMeta()).stack=e.getDataset().stack,t.bar=!0,r=e._getIndexScale().options,Fe("bar chart",r.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Fe("bar chart",r.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Fe("bar chart",r.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Fe("bar chart",e._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Fe("bar chart",r.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var a,n,t=this,r=t.getMeta().data;for(t._ruler=t.getRuler(),a=0,n=r.length;a<n;++a)t.updateElement(r[a],a,e)},updateElement:function(e,t,r){var a=this,n=a.getMeta(),i=a.getDataset(),o=a._resolveDataElementOptions(e,t);e._xScale=a.getScaleForId(n.xAxisID),e._yScale=a.getScaleForId(n.yAxisID),e._datasetIndex=a.index,e._index=t,e._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:i.label,label:a.chart.data.labels[t]},h.isArray(i.data[t])&&(e._model.borderSkipped=null),a._updateElementGeometry(e,t,r,o),e.pivot()},_updateElementGeometry:function(e,t,r,a){var n=this,i=e._model,o=n._getValueScale(),l=o.getBasePixel(),s=o.isHorizontal(),u=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,t,a),f=n.calculateBarIndexPixels(n.index,t,u,a);i.horizontal=s,i.base=r?l:d.base,i.x=s?r?l:d.head:f.center,i.y=s?f.center:r?l:d.head,i.height=s?f.size:void 0,i.width=s?void 0:f.size},_getStacks:function(e){var l,s,r=this._getIndexScale(),a=r._getMatchingVisibleMetas(this._type),n=r.options.stacked,i=a.length,o=[];for(l=0;l<i&&(s=a[l],(!1===n||-1===o.indexOf(s.stack)||void 0===n&&void 0===s.stack)&&o.push(s.stack),s.index!==e);++l);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var r=this._getStacks(e),a=void 0!==t?r.indexOf(t):-1;return-1===a?r.length-1:a},getRuler:function(){var a,n,e=this,t=e._getIndexScale(),r=[];for(a=0,n=e.getMeta().data.length;a<n;++a)r.push(t.getPixelForValue(null,a,e.index));return{pixels:r,start:t._startPixel,end:t._endPixel,stackCount:e.getStackCount(),scale:t}},calculateBarValuePixels:function(e,t,r){var m,b,x,y,k,w,P,a=this,n=a.chart,i=a._getValueScale(),o=i.isHorizontal(),l=n.data.datasets,s=i._getMatchingVisibleMetas(a._type),u=i._parseValue(l[e].data[t]),d=r.minBarLength,f=i.options.stacked,c=a.getMeta().stack,v=void 0===u.start?0:u.max>=0&&u.min>=0?u.min:u.max,g=void 0===u.start?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max,p=s.length;if(f||void 0===f&&void 0!==c)for(m=0;m<p&&(b=s[m]).index!==e;++m)b.stack===c&&(x=void 0===(P=i._parseValue(l[b.index].data[t])).start?P.end:P.min>=0&&P.max>=0?P.max:P.min,(u.min<0&&x<0||u.max>=0&&x>0)&&(v+=x));return y=i.getPixelForValue(v),w=(k=i.getPixelForValue(v+g))-y,void 0!==d&&Math.abs(w)<d&&(w=d,k=g>=0&&!o||g<0&&o?y-d:y+d),{size:w,base:y,head:k,center:k+w/2}},calculateBarIndexPixels:function(e,t,r,a){var i="flex"===a.barThickness?function Ga(e,t,r){var s,a=t.pixels,n=a[e],i=e>0?a[e-1]:null,o=e<a.length-1?a[e+1]:null,l=r.categoryPercentage;return null===i&&(i=n-(null===o?t.end-t.start:o-n)),null===o&&(o=n+n-i),s=n-(n-Math.min(i,o))/2*l,{chunk:Math.abs(o-i)/2*l/t.stackCount,ratio:r.barPercentage,start:s}}(t,r,a):function Ya(e,t,r){var l,s,a=r.barThickness,n=t.stackCount,i=t.pixels[e],o=h.isNullOrUndef(a)?function $a(e,t){var a,n,i,o,r=e._length;for(i=1,o=t.length;i<o;++i)r=Math.min(r,Math.abs(t[i]-t[i-1]));for(i=0,o=e.getTicks().length;i<o;++i)n=e.getPixelForTick(i),r=i>0?Math.min(r,Math.abs(n-a)):r,a=n;return r}(t.scale,t.pixels):-1;return h.isNullOrUndef(a)?(l=o*r.categoryPercentage,s=r.barPercentage):(l=a*n,s=1),{chunk:l/n,ratio:s,start:i-l/2}}(t,r,a),o=this.getStackIndex(e,this.getMeta().stack),l=i.start+i.chunk*o+i.chunk/2,s=Math.min(ye(a.maxBarThickness,1/0),i.chunk*i.ratio);return{base:l-s/2,head:l+s/2,center:l,size:s}},draw:function(){var e=this,t=e.chart,r=e._getValueScale(),a=e.getMeta().data,n=e.getDataset(),i=a.length,o=0;for(h.canvas.clipArea(t.ctx,t.chartArea);o<i;++o){var l=r._parseValue(n.data[o]);!isNaN(l.min)&&!isNaN(l.max)&&a[o].draw()}h.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var e=this,t=h.extend({},$.prototype._resolveDataElementOptions.apply(e,arguments)),r=e._getIndexScale().options,a=e._getValueScale().options;return t.barPercentage=ye(r.barPercentage,t.barPercentage),t.barThickness=ye(r.barThickness,t.barThickness),t.categoryPercentage=ye(r.categoryPercentage,t.categoryPercentage),t.maxBarThickness=ye(r.maxBarThickness,t.maxBarThickness),t.minBarLength=ye(a.minBarLength,t.minBarLength),t}}),ft=h.valueOrDefault,Xa=h.options.resolve;_._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return(t.datasets[e.datasetIndex].label||"")+": ("+e.xLabel+", "+e.yLabel+", "+t.datasets[e.datasetIndex].data[e.index].r+")"}}}});var Ka=$.extend({dataElementType:E.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,r=t.getMeta();h.each(r.data,function(n,i){t.updateElement(n,i,e)})},updateElement:function(e,t,r){var a=this,n=a.getMeta(),i=e.custom||{},o=a.getScaleForId(n.xAxisID),l=a.getScaleForId(n.yAxisID),s=a._resolveDataElementOptions(e,t),u=a.getDataset().data[t],d=a.index,f=r?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,t,d),c=r?l.getBasePixel():l.getPixelForValue(u,t,d);e._xScale=o,e._yScale=l,e._options=s,e._datasetIndex=d,e._index=t,e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:r?0:s.radius,skip:i.skip||isNaN(f)||isNaN(c),x:f,y:c},e.pivot()},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=ft(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=ft(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=ft(r.hoverBorderWidth,r.borderWidth),t.radius=r.radius+r.hoverRadius},_resolveDataElementOptions:function(e,t){var r=this,a=r.chart,n=r.getDataset(),i=e.custom||{},o=n.data[t]||{},l=$.prototype._resolveDataElementOptions.apply(r,arguments),s={chart:a,dataIndex:t,dataset:n,datasetIndex:r.index};return r._cachedDataOpts===l&&(l=h.extend({},l)),l.radius=Xa([i.radius,o.r,r._config.radius,a.options.elements.point.radius],s,t),l}}),$e=h.valueOrDefault,ue=Math.PI,Q=2*ue,de=ue/2;_._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var i,o,l,t=document.createElement("ul"),r=e.data,a=r.datasets,n=r.labels;if(t.setAttribute("class",e.id+"-legend"),a.length)for(i=0,o=a[0].data.length;i<o;++i)(l=t.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[i],n[i]&&l.appendChild(document.createTextNode(n[i]));return t.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(r,a){var n=e.getDatasetMeta(0),i=n.controller.getStyle(a);return{text:r,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(t.datasets[0].data[a])||n.data[a].hidden,index:a}}):[]}},onClick:function(e,t){var n,i,o,r=t.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)(o=a.getDatasetMeta(n)).data[r]&&(o.data[r].hidden=!o.data[r].hidden);a.update()}},cutoutPercentage:50,rotation:-de,circumference:Q,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var r=t.labels[e.index],a=": "+t.datasets[e.datasetIndex].data[e.index];return h.isArray(r)?(r=r.slice())[0]+=a:r+=a,r}}}});var sr=$.extend({dataElementType:E.Arc,linkScales:h.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
1dColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,r=0;r<e;++r)this.chart.isDatasetVisible(r)&&++t;return t},update:function(e){var m,b,t=this,r=t.chart,a=r.chartArea,n=r.options,i=1,o=1,l=0,s=0,u=t.getMeta(),d=u.data,f=n.cutoutPercentage/100||0,c=n.circumference,v=t._getRingWeight(t.index);if(c<Q){var x=n.rotation%Q,y=(x+=x>=ue?-Q:x<-ue?Q:0)+c,k=Math.cos(x),w=Math.sin(x),P=Math.cos(y),C=Math.sin(y),D=x<=0&&y>=0||y>=Q,T=x<=de&&y>=de||y>=Q+de,L=x<=-de&&y>=-de||y>=ue+de,O=x===-ue||y>=ue?-1:Math.min(k,k*f,P,P*f),N=L?-1:Math.min(w,w*f,C,C*f),Se=D?1:Math.max(k,k*f,P,P*f),Ce=T?1:Math.max(w,w*f,C,C*f);i=(Se-O)/2,o=(Ce-N)/2,l=-(Se+O)/2,s=-(Ce+N)/2}for(m=0,b=d.length;m<b;++m)d[m]._options=t._resolveDataElementOptions(d[m],m);for(r.borderWidth=t.getMaxBorderWidth(),r.outerRadius=Math.max(Math.min((a.right-a.left-r.borderWidth)/i,(a.bottom-a.top-r.borderWidth)/o)/2,0),r.innerRadius=Math.max(r.outerRadius*f,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(t._getVisibleDatasetWeightTotal()||1),r.offsetX=l*r.outerRadius,r.offsetY=s*r.outerRadius,u.total=t.calculateTotal(),t.outerRadius=r.outerRadius-r.radiusLength*t._getRingWeightOffset(t.index),t.innerRadius=Math.max(t.outerRadius-r.radiusLength*v,0),m=0,b=d.length;m<b;++m)t.updateElement(d[m],m,e)},updateElement:function(e,t,r){var a=this,n=a.chart,i=n.chartArea,o=n.options,l=o.animation,s=(i.left+i.right)/2,u=(i.top+i.bottom)/2,d=o.rotation,f=o.rotation,c=a.getDataset(),v=r&&l.animateRotate||e.hidden?0:a.calculateCircumference(c.data[t])*(o.circumference/Q),m=e._options||{};h.extend(e,{_datasetIndex:a.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:s+n.offsetX,y:u+n.offsetY,startAngle:d,endAngle:f,circumference:v,outerRadius:r&&l.animateScale?0:a.outerRadius,innerRadius:r&&l.animateScale?0:a.innerRadius,label:h.valueAtIndexOrDefault(c.label,t,n.data.labels[t])}});var b=e._model;(!r||!l.animateRotate)&&(b.startAngle=0===t?o.rotation:a.getMeta().data[t-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),e.pivot()},calculateTotal:function(){var a,e=this.getDataset(),t=this.getMeta(),r=0;return h.each(t.data,function(n,i){a=e.data[i],!isNaN(a)&&!n.hidden&&(r+=Math.abs(a))}),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Q*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var n,i,o,l,s,u,d,f,r=0,a=this.chart;if(!e)for(n=0,i=a.data.datasets.length;n<i;++n)if(a.isDatasetVisible(n)){e=(o=a.getDatasetMeta(n)).data,n!==this.index&&(s=o.controller);break}if(!e)return 0;for(n=0,i=e.length;n<i;++n)l=e[n],s?(s._configure(),u=s._resolveDataElementOptions(l,n)):u=l._options,"inner"!==u.borderAlign&&(r=(f=u.hoverBorderWidth)>(r=(d=u.borderWidth)>r?d:r)?f:r);return r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=$e(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=$e(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=$e(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t},_getRingWeight:function(e){return Math.max($e(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});_._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),_._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Za=or.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),ee=h.valueOrDefault,Ja=h.options.resolve,ht=h.canvas._isPointInArea;function lr(e,t){var r=e&&e.options.ticks||{},a=r.reverse,n=void 0===r.min?t:0,i=void 0===r.max?t:0;return{start:a?i:n,end:a?n:i}}_._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var ur=$.extend({datasetElementType:E.Line,dataElementType:E.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var s,u,t=this,r=t.getMeta(),a=r.dataset,n=r.data||[],o=t._config,l=t._showLine=ee(o.showLine,t.chart.options.showLines);for(t._xScale=t.getScaleForId(r.xAxisID),t._yScale=t.getScaleForId(r.yAxisID),l&&(void 0!==o.tension&&void 0===o.lineTension&&(o.lineTension=o.tension),a._scale=t._yScale,a._datasetIndex=t.index,a._children=n,a._model=t._resolveDatasetElementOptions(a),a.pivot()),s=0,u=n.length;s<u;++s)t.updateElement(n[s],s,e);for(l&&0!==a._model.tension&&t.updateBezierControlPoints(),s=0,u=n.length;s<u;++s)n[s].pivot()},updateElement:function(e,t,r){var c,v,a=this,n=a.getMeta(),i=e.custom||{},o=a.getDataset(),l=a.index,s=o.data[t],u=a._xScale,d=a._yScale,f=n.dataset._model,g=a._resolveDataElementOptions(e,t);c=u.getPixelForValue("object"==typeof s?s:NaN,t,l),v=r?d.getBasePixel():a.calculatePointY(s,t,l),e._xScale=u,e._yScale=d,e._options=g,e._datasetIndex=l,e._index=t,e._model={x:c,y:v,skip:i.skip||isNaN(c)||isNaN(v),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:ee(i.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,r=t._config,a=e.custom||{},n=t.chart.options,i=n.elements.line,o=$.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=ee(r.spanGaps,n.spanGaps),o.tension=ee(r.lineTension,i.tension),o.steppedLine=Ja([a.steppedLine,r.steppedLine,i.stepped]),o.clip=function en(e){var t,r,a,n;return h.isObject(e)?(t=e.top,r=e.right,a=e.bottom,n=e.left):t=r=a=n=e,{top:t,right:r,bottom:a,left:n}}(ee(r.clip,function Qa(e,t,r){var a=r/2,n=lr(e,a),i=lr(t,a);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}(t._xScale,t._yScale,o.borderWidth))),o},calculatePointY:function(e,t,r){var s,d,f,c,v,g,n=this.chart,i=this._yScale,o=0,l=0;if(i.options.stacked){for(c=+i.getRightValue(e),g=(v=n._getSortedVisibleDatasetMetas()).length,s=0;s<g&&(d=v[s]).index!==r;++s)"line"===d.type&&d.yAxisID===i.id&&((f=+i.getRightValue(n.data.datasets[d.index].data[t]))<0?l+=f||0:o+=f||0);return i.getPixelForValue(c<0?l+c:o+c)}return i.getPixelForValue(e)},updateBezierControlPoints:function(){var o,l,s,u,t=this.chart,r=this.getMeta(),a=r.dataset._model,n=t.chartArea,i=r.data||[];function d(f,c,v){return Math.max(Math.min(f,v),c)}if(a.spanGaps&&(i=i.filter(function(f){return!f._model.skip})),"monotone"===a.cubicInterpolationMode)h.splineCurveMonotone(i);else for(o=0,l=i.length;o<l;++o)s=i[o]._model,u=h.splineCurve(h.previousItem(i,o)._model,s,h.nextItem(i,o)._model,a.tension),s.controlPointPreviousX=u.previous.x,s.controlPointPreviousY=u.previous.y,s.controlPointNextX=u.next.x,s.controlPointNextY=u.next.y;if(t.options.elements.line.capBezierPoints)for(o=0,l=i.length;o<l;++o)ht(s=i[o]._model,n)&&(o>0&&ht(i[o-1]._model,n)&&(s.controlPointPreviousX=d(s.controlPointPreviousX,n.left,n.right),s.controlPointPreviousY=d(s.controlPointPreviousY,n.top,n.bottom)),o<i.length-1&&ht(i[o+1]._model,n)&&(s.controlPointNextX=d(s.controlPointNextX,n.left,n.right),s.controlPointNextY=d(s.controlPointNextY,n.top,n.bottom)))},draw:function(){var s,e=this,t=e.chart,r=e.getMeta(),a=r.data||[],n=t.chartArea,i=t.canvas,o=0,l=a.length;for(e._showLine&&(h.canvas.clipArea(t.ctx,{left:!1===(s=r.dataset._model.clip).left?0:n.left-s.left,right:!1===s.right?i.width:n.right+s.right,top:!1===s.top?0:n.top-s.top,bottom:!1===s.bottom?i.height:n.bottom+s.bottom}),r.dataset.draw(),h.canvas.unclipArea(t.ctx));o<l;++o)a[o].draw(n)},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius}
vendor: 4,456 bytes, line 1
1,t.backgroundColor=ee(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=ee(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=ee(r.hoverBorderWidth,r.borderWidth),t.radius=ee(r.hoverRadius,r.radius)}}),tn=h.options.resolve;_._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var i,o,l,t=document.createElement("ul"),r=e.data,a=r.datasets,n=r.labels;if(t.setAttribute("class",e.id+"-legend"),a.length)for(i=0,o=a[0].data.length;i<o;++i)(l=t.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[i],n[i]&&l.appendChild(document.createTextNode(n[i]));return t.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(r,a){var n=e.getDatasetMeta(0),i=n.controller.getStyle(a);return{text:r,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(t.datasets[0].data[a])||n.data[a].hidden,index:a}}):[]}},onClick:function(e,t){var n,i,o,r=t.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)(o=a.getDatasetMeta(n)).data[r].hidden=!o.data[r].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var rn=$.extend({dataElementType:E.Arc,linkScales:h.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var s,u,d,t=this,r=t.getDataset(),a=t.getMeta(),n=t.chart.options.startAngle||0,i=t._starts=[],o=t._angles=[],l=a.data;for(t._updateRadius(),a.count=t.countVisibleElements(),s=0,u=r.data.length;s<u;s++)i[s]=n,d=t._computeAngle(s),o[s]=d,n+=d;for(s=0,u=l.length;s<u;++s)l[s]._options=t._resolveDataElementOptions(l[s],s),t.updateElement(l[s],s,e)},_updateRadius:function(){var e=this,t=e.chart,r=t.chartArea,a=t.options,n=Math.min(r.right-r.left,r.bottom-r.top);t.outerRadius=Math.max(n/2,0),t.innerRadius=Math.max(a.cutoutPercentage?t.outerRadius/100*a.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,r){var a=this,n=a.chart,i=a.getDataset(),o=n.options,l=o.animation,s=n.scale,u=n.data.labels,d=s.xCenter,f=s.yCenter,c=o.startAngle,v=e.hidden?0:s.getDistanceFromCenterForValue(i.data[t]),g=a._starts[t],p=g+(e.hidden?0:a._angles[t]),m=l.animateScale?0:s.getDistanceFromCenterForValue(i.data[t]),b=e._options||{};h.extend(e,{_datasetIndex:a.index,_index:t,_scale:s,_model:{backgroundColor:b.backgroundColor,borderColor:b.borderColor,borderWidth:b.borderWidth,borderAlign:b.borderAlign,x:d,y:f,innerRadius:0,outerRadius:r?m:v,startAngle:r&&l.animateRotate?c:g,endAngle:r&&l.animateRotate?c:p,label:h.valueAtIndexOrDefault(u,t,u[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),r=0;return h.each(t.data,function(a,n){!isNaN(e.data[n])&&!a.hidden&&r++}),r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor,n=h.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=n(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=n(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=n(r.hoverBorderWidth,r.borderWidth)},_computeAngle:function(e){var t=this,r=this.getMeta().count,a=t.getDataset(),n=t.getMeta();return isNaN(a.data[e])||n.data[e].hidden?0:tn([t.chart.options.elements.arc.angle,2*Math.PI/r],{chart:t.chart,dataIndex:e,dataset:a,datasetIndex:t.index},e)}});_._set("pie",h.clone(_.doughnut)),_._set("pie",{cutoutPercentage:0});var an=sr,fe=h.valueOrDefault;_._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var nn=$.extend({datasetElementType:E.Line,dataElementType:E.Point,linkScales:h.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",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},update:function(e){var l,s,t=this,r=t.getMeta(),a=r.dataset,n=r.data||[],i=t.chart.scale,o=t._config;for(void 0!==o.tension&&void 0===o.lineTension&&(o.lineTension=o.tension),a._scale=i,a._datasetIndex=t.index,a._children=n,a._loop=!0,a._model=t._resolveDatasetElementOptions(a),a.pivot(),l=0,s=n.length;l<s;++l)t.updateElement(n[l],l,e);for(t.updateBezierControlPoints(),l=0,s=n.length;l<s;++l)n[l].pivot()},updateElement:function(e,t,r){var a=this,n=e.custom||{},i=a.getDataset(),o=a.chart.scale,l=o.getPointPositionForValue(t,i.data[t]),s=a._resolveDataElementOptions(e,t),u=a.getMeta().dataset._model,d=r?o.xCenter:l.x,f=r?o.yCenter:l.y;e._scale=o,e._options=s,e._datasetIndex=a.index,e._index=t,e._model={x:d,y:f,skip:n.skip||isNaN(d)||isNaN(f),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:fe(n.tension,u?u.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,r=e.chart.options,a=$.prototype._resolveDatasetElementOptions.apply(e,arguments);return a.spanGaps=fe(t.spanGaps,r.spanGaps),a.tension=fe(t.lineTension,r.elements.line.tension),a},updateBezierControlPoints:function(){var n,i,o,l,t=this.getMeta(),r=this.chart.chartArea,a=t.data||[];function s(u,d,f){return Math.max(Math.min(u,f),d)}for(t.dataset._model.spanGaps&&(a=a.filter(function(u){return!u._model.skip})),n=0,i=a.length;n<i;++n)o=a[n]._model,l=h.splineCurve(h.previousItem(a,n,!0)._model,o,h.nextItem(a,n,!0)._model,o.tension),o.controlPointPreviousX=s(l.previous.x,r.left,r.right),o.controlPointPreviousY=s(l.previous.y,r.top,r.bottom),o.controlPointNextX=s(l.next.x,r.left,r.right),o.controlPointNextY=s(l.next.y,r.top,r.bottom)},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=fe(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=fe(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=fe(r.hoverBorderWidth,r.borderWidth),t.radius=fe(r.hoverRadius,r.radius)}});_._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),_._set("global",{datasets:{scatter:{showLine:!1}}});var dr={bar:or,bubble:Ka,doughnut:sr,horizontalBar:Za,line:ur,polarArea:rn,pie:an,radar:nn,scatter:ur};function he(e,t){return e.native?{x:e.x,y:e.y}:h.getRelativePosition(e,t)}function Ie(e,t){var a,n,i,o,l,s,r=e._getSortedVisibleDatasetMetas();for(n=0,o=r.length;n<o;++n)for(i=0,l=(a=r[n].data).length;i<l;++i)(s=a[i])._view.skip||t(s)}function ct(e,t){var r=[];return Ie(e,function(a){a.inRange(t.x,t.y)&&r.push(a)}),r}function vt(e,t,r,a){var n=Number.POSITIVE_INFINITY,i=[];return Ie(e,function(o){if(!r||o.inRange(t.x,t.y)){var l=o.getCenterPoint(),s=a(t,l);s<n?(i=[o],n=s):s===n&&i.push(o)}}),i}function gt(e){var t=-1!==e.indexOf("x"),r=-1!==e.indexOf("y");return function(a,n){var i=t?Math.abs(a.x-n.x):0,o=r?Math.abs(a.y-n.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function pt(e,t,r){var a=he(t,e);r.axis=r.axis||"x";var n=gt(r.axis),i=r.intersect?ct(e,a):vt(e,a,!1,n),o=[];return i.length?(e._getSortedVisibleDatasetMetas().forEach(function(l){var s=l.data[i[0]._index];s&&!s._view.skip&&o.push(s)}),o):[]}var _e={modes:{single:function(e,t){var r=he(t,e),a=[];return Ie(e,function(n){if(n.inRange(r.x,r.y))return a.push(n),a}),a.slice(0,1)}
1,label:pt,index:pt,dataset:function(e,t,r){var a=he(t,e);r.axis=r.axis||"xy";var n=gt(r.axis),i=r.intersect?ct(e,a):vt(e,a,!1,n);return i.length>0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return pt(e,t,{intersect:!1})},point:function(e,t){return ct(e,he(t,e))},nearest:function(e,t,r){var a=he(t,e);r.axis=r.axis||"xy";var n=gt(r.axis);return vt(e,a,r.intersect,n)},x:function(e,t,r){var a=he(t,e),n=[],i=!1;return Ie(e,function(o){o.inXRange(a.x)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n},y:function(e,t,r){var a=he(t,e),n=[],i=!1;return Ie(e,function(o){o.inYRange(a.y)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n}}},mt=h.extend;function Oe(e,t){return h.where(e,function(r){return r.pos===t})}function Ye(e,t){return e.sort(function(r,a){var n=t?a:r,i=t?r:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function fr(e,t,r,a){return Math.max(e[r],t[r])+Math.max(e[a],t[a])}function dn(e,t,r){var i,o,a=r.box,n=e.maxPadding;if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?a.height:a.width,e[r.pos]+=r.size,a.getPadding){var l=a.getPadding();n.top=Math.max(n.top,l.top),n.left=Math.max(n.left,l.left),n.bottom=Math.max(n.bottom,l.bottom),n.right=Math.max(n.right,l.right)}if(i=t.outerWidth-fr(n,e,"left","right"),o=t.outerHeight-fr(n,e,"top","bottom"),i!==e.w||o!==e.h){e.w=i,e.h=o;var s=r.horizontal?[i,e.w]:[o,e.h];return!(s[0]===s[1]||isNaN(s[0])&&isNaN(s[1]))}}function hn(e,t){var r=t.maxPadding;return function a(n){var i={left:0,top:0,right:0,bottom:0};return n.forEach(function(o){i[o]=Math.max(t[o],r[o])}),i}(e?["left","right"]:["top","bottom"])}function Ge(e,t,r){var n,i,o,l,s,u,a=[];for(n=0,i=e.length;n<i;++n)(l=(o=e[n]).box).update(o.width||t.w,o.height||t.h,hn(o.horizontal,t)),dn(t,r,o)&&(u=!0,a.length&&(s=!0)),l.fullWidth||a.push(o);return s&&Ge(a,t,r)||u}function hr(e,t,r){var o,l,s,u,a=r.padding,n=t.x,i=t.y;for(o=0,l=e.length;o<l;++o)u=(s=e[o]).box,s.horizontal?(u.left=u.fullWidth?a.left:t.left,u.right=u.fullWidth?r.outerWidth-a.right:t.left+t.w,u.top=i,u.bottom=i+u.height,u.width=u.right-u.left,i=u.bottom):(u.left=n,u.right=n+u.width,u.top=t.top,u.bottom=t.top+t.h,u.height=u.bottom-u.top,n=u.right);t.x=n,t.y=i}_._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var Y={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var r=e.boxes?e.boxes.indexOf(t):-1;-1!==r&&e.boxes.splice(r,1)},configure:function(e,t,r){for(var o,a=["fullWidth","position","weight"],n=a.length,i=0;i<n;++i)r.hasOwnProperty(o=a[i])&&(t[o]=r[o])},update:function(e,t,r){if(e){var n=h.options.toPadding((e.options.layout||{}).padding),i=t-n.width,o=r-n.height,l=function un(e){var t=function sn(e){var r,a,n,t=[];for(r=0,a=(e||[]).length;r<a;++r)t.push({index:r,box:n=e[r],pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return t}(e),r=Ye(Oe(t,"left"),!0),a=Ye(Oe(t,"right")),n=Ye(Oe(t,"top"),!0),i=Ye(Oe(t,"bottom"));return{leftAndTop:r.concat(n),rightAndBottom:a.concat(i),chartArea:Oe(t,"chartArea"),vertical:r.concat(a),horizontal:n.concat(i)}}(e.boxes),s=l.vertical,u=l.horizontal,d=Object.freeze({outerWidth:t,outerHeight:r,padding:n,availableWidth:i,vBoxMaxWidth:i/2/s.length,hBoxMaxHeight:o/2}),f=mt({maxPadding:mt({},n),w:i,h:o,x:n.left,y:n.top},n);(function ln(e,t){var r,a,n;for(r=0,a=e.length;r<a;++r)(n=e[r]).width=n.horizontal?n.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,n.height=n.horizontal&&t.hBoxMaxHeight})(s.concat(u),d),Ge(s,f,d),Ge(u,f,d)&&Ge(s,f,d),function fn(e){var t=e.maxPadding;function r(a){var n=Math.max(t[a]-e[a],0);return e[a]+=n,n}e.y+=r("top"),e.x+=r("left"),r("right"),r("bottom")}(f),hr(l.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,hr(l.rightAndBottom,f,d),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h},h.each(l.chartArea,function(c){var v=c.box;mt(v,e.chartArea),v.update(f.w,f.h)})}}},pn=function We(e){return e&&e.default||e}(Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"})),z="$chartjs",bt="chartjs-",xt=bt+"size-monitor",cr=bt+"render-monitor",mn=bt+"render-animation",vr=["animationstart","webkitAnimationStart"],bn={touchstart:"mousedown",touchmove:"mou
1semove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function gr(e,t){var r=h.getStyle(e,t),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}var yn=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch{}return e}(),pr=!!yn&&{passive:!0};function Le(e,t,r){e.addEventListener(t,r,pr)}function yt(e,t,r){e.removeEventListener(t,r,pr)}function _t(e,t,r,a,n){return{type:e,chart:t,native:n||null,x:void 0!==r?r:null,y:void 0!==a?a:null}}function Re(e){var t=document.createElement("div");return t.className=e||"",t}var mr={disableCSSInjection:!1,_enabled:typeof window<"u"&&typeof document<"u",_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function Dn(e,t){var r=e[z]||(e[z]={});if(!r.containsStyles){r.containsStyles=!0,t="/* Chart.js */\n"+t;var a=document.createElement("style");a.setAttribute("type","text/css"),a.appendChild(document.createTextNode(t)),e.appendChild(a)}}(t.host?t:document.head,pn)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(this._ensureLoaded(e),function xn(e,t){var r=e.style,a=e.getAttribute("height"),n=e.getAttribute("width");if(e[z]={initial:{height:a,width:n,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",null===n||""===n){var i=gr(e,"width");void 0!==i&&(e.width=i)}if(null===a||""===a)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=gr(e,"height");void 0!==i&&(e.height=o)}}(e,t),r):null},releaseContext:function(e){var t=e.canvas;if(t[z]){var r=t[z].initial;["height","width"].forEach(function(a){var n=r[a];h.isNullOrUndef(n)?t.removeAttribute(a):t.setAttribute(a,n)}),h.each(r.style||{},function(a,n){t.style[n]=a}),t.width=t.width,delete t[z]}},addEventListener:function(e,t,r){var a=e.canvas;if("resize"!==t){var n=r[z]||(r[z]={}),o=(n.proxies||(n.proxies={}))[e.id+"_"+t]=function(l){r(function _n(e,t){var r=bn[e.type]||e.type,a=h.getRelativePosition(e,t);return _t(r,t,a.x,a.y,e)}(l,e))};Le(a,t,o)}else!function Cn(e,t,r){var a=e[z]||(e[z]={}),n=a.resizer=function kn(e){var t=1e6,r=Re(xt),a=Re(xt+"-expand"),n=Re(xt+"-shrink");a.appendChild(Re()),n.appendChild(Re()),r.appendChild(a),r.appendChild(n),r._reset=function(){a.scrollLeft=t,a.scrollTop=t,n.scrollLeft=t,n.scrollTop=t};var i=function(){r._reset(),e()};return Le(a,"scroll",i.bind(a,"expand")),Le(n,"scroll",i.bind(n,"shrink")),r}(function wn(e,t){var r=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),t=t||this,r||(r=!0,h.requestAnimFrame.call(window,function(){r=!1,e.apply(t,a)}))}}(function(){if(a.resizer){var i=r.options.maintainAspectRatio&&e.parentNode,o=i?i.clientWidth:0;t(_t("resize",r)),i&&i.clientWidth<o&&r.canvas&&t(_t("resize",r))}}));!function Mn(e,t){var r=e[z]||(e[z]={}),a=r.renderProxy=function(n){n.animationName===mn&&t()};h.each(vr,function(n){Le(e,n,a)}),r.reflow=!!e.offsetParent,e.classList.add(cr)}(e,function(){if(a.resizer){var i=e.parentNode;i&&i!==n.parentNode&&i.insertBefore(n,i.firstChild),n._reset()}})}(a,r,e)},removeEventListener:function(e,t,r){var a=e.canvas;if("resize"!==t){var o=((r[z]||{}).proxies||{})[e.id+"_"+t];o&&yt(a,t,o)}else!function Pn(e){var t=e[z]||{},r=t.resizer;delete t.resizer,function Sn(e){var t=e[z]||{},r=t.renderProxy;r&&(h.each(vr,function(a){yt(e,a,r)}),delete t.renderProxy),e.classList.remove(cr)}(e),r&&r.parentNode&&r.parentNode.removeChild(r)}(a)}};h.addEvent=Le,h.removeEvent=yt;var An=mr._enabled?mr:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},we=h.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},An);_._set("global",{plugins:{}});var A={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(r){-1===t.indexOf(r)&&t.push(r)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(r){var a=t.indexOf(r);-1!==a&&t.splice(a,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,r){var i,o,l,s,u,a=this.descriptors(e),n=a.length;for(i=0;i<n;++i)if("function"==typeof(u=(l=(o=a[i]).plugin)[t])&&((s=[e].concat(r||[])).push(o.options),!1===u.apply(l,s)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var r=[],a=[],n=e&&e.config||{},i=n.options&&n.options.plugins||{};
vendor: 30,538 bytes, line 1
1return this._plugins.concat(n.plugins||[]).forEach(function(o){if(-1===r.indexOf(o)){var s=o.id,u=i[s];!1!==u&&(!0===u&&(u=h.clone(_.global.plugins[s])),r.push(o),a.push({plugin:o,options:u||{}}))}}),t.descriptors=a,t.id=this._cacheId,a},_invalidate:function(e){delete e.$plugins}},Ne={constructors:{},defaults:{},registerScaleType:function(e,t,r){this.constructors[e]=t,this.defaults[e]=h.clone(r)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?h.merge(Object.create(null),[_.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){var r=this;r.defaults.hasOwnProperty(e)&&(r.defaults[e]=h.extend(r.defaults[e],t))},addScalesToLayout:function(e){h.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,Y.addBox(e,t)})}},te=h.valueOrDefault,wt=h.rtl.getRtlAdapter;_._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:h.noop,title:function(e,t){var r="",a=t.labels,n=a?a.length:0;if(e.length>0){var i=e[0];i.label?r=i.label:i.xLabel?r=i.xLabel:n>0&&i.index<n&&(r=a[i.index])}return r},afterTitle:h.noop,beforeBody:h.noop,beforeLabel:h.noop,label:function(e,t){var r=t.datasets[e.datasetIndex].label||"";return r&&(r+=": "),h.isNullOrUndef(e.value)?r+=e.yLabel:r+=e.value,r},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:h.noop,afterBody:h.noop,beforeFooter:h.noop,footer:h.noop,afterFooter:h.noop}}});var br={average:function(e){if(!e.length)return!1;var t,r,a=0,n=0,i=0;for(t=0,r=e.length;t<r;++t){var o=e[t];if(o&&o.hasValue()){var l=o.tooltipPosition();a+=l.x,n+=l.y,++i}}return{x:a/i,y:n/i}},nearest:function(e,t){var i,o,l,r=t.x,a=t.y,n=Number.POSITIVE_INFINITY;for(i=0,o=e.length;i<o;++i){var s=e[i];if(s&&s.hasValue()){var u=s.getCenterPoint(),d=h.distanceBetweenPoints(t,u);d<n&&(n=d,l=s)}}if(l){var f=l.tooltipPosition();r=f.x,a=f.y}return{x:r,y:a}}};function J(e,t){return t&&(h.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function re(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Tn(e){var t=e._xScale,r=e._yScale||e._scale,a=e._index,n=e._datasetIndex,i=e._chart.getDatasetMeta(n).controller,o=i._getIndexScale(),l=i._getValueScale();return{xLabel:t?t.getLabelForIndex(a,n):"",yLabel:r?r.getLabelForIndex(a,n):"",label:o?""+o.getLabelForIndex(a,n):"",value:l?""+l.getLabelForIndex(a,n):"",index:a,datasetIndex:n,x:e._model.x,y:e._model.y}}function xr(e){var t=_.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:te(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:te(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:te(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:te(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:te(e.titleFontStyle,t.defaultFontStyle),titleFontSize:te(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:te(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:te(e.footerFontStyle,t.defaultFontStyle),footerFontSize:te(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Xe(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function yr(e){return J([],re(e))}var Ln=K.extend({initialize:function(){this._model=xr(this._options),this._lastActive=[]},getTitle:function(){var e=this,r=e._options.callbacks,a=r.beforeTitle.apply(e,arguments),n=r.title.apply(e,arguments),i=r.afterTitle.apply(e,arguments),o=[];return o=J(o,re(a)),o=J(o,re(n)),J(o,re(i))},getBeforeBody:function(){return yr(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,a=r._options.callbacks,n=[];return h.each(e,function(i){var o={before:[],lines:[],after:[]};J(o.before,re(a.beforeLabel.call(r,i,t))),J(o.lines,a.label.call(r,i,t)),J(o.after,re(a.afterLabel.call(r,i,t))),n.push(o)}),n},getAfterBody:function(){return yr(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),a=t.footer.apply(e,arguments),n=t.afterFooter.apply(e,arguments),i=[];return i=J(i,re(r)),i=J(i,re(a)),J(i,re(n))},update:function(e){var f,c,t=this,r=t._options,a=t._model,n=t._model=xr(r),i=t._active,o=t._data,l={xAlign:a.xAlign,yAlign:a.yAlign},s={x:a.x,y:a.y},u={width:a.width,height:a.height},d={x:a.caretX,y:a.caretY};if(i.length){n.opacity=1;var v=[],g=[];d=br[r.position].call(t,i,t._eventPosition);var p=[];for(f=0,c=i.length;f<c;++f)p.push(Tn(i[f]));r.filter&&(p=p.filter(function(m){return r.filter(m,o)})),r.itemSort&&(p=p.sort(function(m,b){return r.itemSort(m,b,o)})),h.each(p,function(m){v.push(r.callbacks.labelColor.call(t,m,t._chart)),g.push(r.callbacks.labelTextColor.call(t,m,t._chart))}),n.title=t.getTitle(p,o),n.beforeBody=t.getBeforeBody(p,o),n.body=t.getBody(p,o),n.afterBody=t.getAfterBody(p,o),n.footer=t.getFooter(p,o),n.x=d.x,n.y=d.y,n.caretPadding=r.caretPadding,n.labelColors=v,n.labelTextColors=g,n.dataPoints=p,u=function Fn(e,t){var r=e._chart.ctx,a=2*t.yPadding,n=0,i=t.body,o=i.reduce(function(g,p){return g+p.before.length+p.lines.length+p.after.length},0),l=t.title.length,s=t.footer.length,u=t.titleFontSize,d=t.bodyFontSize,f=t.footerFontSize;a+=l*u,a+=l?(l-1)*t.titleSpacing:0,a+=l?t.titleMarginBottom:0,a+=(o+=t.beforeBody.length+t.afterBody.length)*d,a+=o?(o-1)*t.bodySpacing:0,a+=s?t.footerMarginTop:0,a+=s*f,a+=s?(s-1)*t.footerSpacing:0;var c=0,v=function(g){n=Math.max(n,r.measureText(g).width+c)};return r.font=h.fontString(u,t._titleFontStyle,t._titleFontFamily),h.each(t.title,v),r.font=h.fontString(d,t._bodyFontStyle,t._bodyFontFamily),h.each(t.beforeBody.concat(t.afterBody),v),c=t.displayColors?d+2:0,h.each(i,function(g){h.each(g.before,v),h.each(g.lines,v),h.each(g.after,v)}),c=0,r.font=h.fontString(f,t._footerFontStyle,t._footerFontFamily),h.each(t.footer,v),{width:n+=2*t.xPadding,height:a}}(this,n),l=function In(e,t){var r=e._model,a=e._chart,n=e._chart.chartArea,i="center",o="center";r.y<t.height?o="top":r.y>a.height-t.height&&(o="bottom");var l,s,u,d,f,c=(n.left+n.right)/2,v=(n.top+n.bottom)/2;"center"===o?(l=function(p){return p<=c},s=function(p){return p>c}):(l=function(p){return p<=t.width/2},s=function(p){return p>=a.width-t.width/2}),u=function(p){return p+t.width+r.caretSize+r.caretPadding>a.width},d=function(p){return p-t.width-r.caretSize-r.caretPadding<0},f=function(p){return p<=v?"top":"bottom"},l(r.x)?(i="left",u(r.x)&&(i="center",o=f(r.y))):s(r.x)&&(i="right",d(r.x)&&(i="center",o=f(r.y)));var g=e._options;return{xAlign:g.xAlign?g.xAlign:i,yAlign:g.yAlign?g.yAlign:o}}(this,u),s=function On(e,t,r,a){var n=e.x,i=e.y,l=e.caretPadding,u=r.xAlign,d=r.yAlign,f=e.caretSize+l,c=e.cornerRadius+l;return"right"===u?n-=t.width:"center"===u&&((n-=t.width/2)+t.width>a.width&&(n=a.width-t.width),n<0&&(n=0)),"top"===d?i+=f:i-="bottom"===d?t.height+f:t.height/2,"center"===d?"left"===u?n+=f:"right"===u&&(n-=f):"left"===u?n-=c:"right"===u&&(n+=c),{x:n,y:i}}(n,u,l,t._chart)}else n.opacity=0;return n.xAlign=l.xAlign,n.yAlign=l.yAlign,n.x=s.x,n.y=s.y,n.width=u.width,n.height=u.height,n.caretX=d.x,n.caretY=d.y,t._model=n,e&&r.custom&&r.custom.call(t,n),t},drawCaret:function(e,t){var r=this._chart.ctx,n=this.getCaretPosition(e,t,this._view);r.lineTo(n.x1,n.y1),r.lineTo(n.x2,n.y2),r.lineTo(n.x3,n.y3)},getCaretPosition:function(e,t,r){var a,n,i,o,l,s,u=r.caretSize,d=r.cornerRadius,f=r.xAlign,c=r.yAlign,v=e.x,g=e.y,p=t.width,m=t.height;if("center"===c)l=g+m/2,"left"===f?(n=(a=v)-u,i=a,o=l+u,s=l-u):(n=(a=v+p)+u,i=a,o=l-u,s=l+u);else if("left"===f?(a=(n=v+d+u)-u,i=n+u):"right"===f?(a=(n=v+p-d-u)-u,i=n+u):(a=(n=r.caretX)-u,i=n+u),"top"===c)l=(o=g)-u,s=o;else{l=(o=g+m)+u,s=o;var b=i;i=a,a=b}return{x1:a,x2:n,x3:i,y1:o,y2:l,y3:s}},drawTitle:function(e,t,r){var i,o,l,a=t.title,n=a.length;if(n){var s=wt(t.rtl,t.x,t.width);for(e.x=Xe(t,t._titleAlign),r.textAlign=s.textAlign(t._titleAlign),r.textBaseline="middle",i=t.titleFontSize,o=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=h.fontString(i,t._titleFontStyle,t._titleFontFamily),l=0;l<n;++l)r.fillText(a[l],s.x(e.x),e.y+i/2),e.y+=i+o,l+1===n&&(e.y+=t.titleMarginBottom-o)}},drawBody:function(e,t,r){var c,v,g,p,m,b,x,y,a=t.bodyFontSize,n=t.bodySpacing,i=t._bodyAlign,o=t.body,l=t.displayColors,s=0,u=l?Xe(t,"left"):0,d=wt(t.rtl,t.x,t.width),f=function(P){r.fillText(P,d.x(e.x+s),e.y+a/2),e.y+=a+n},k=d.textAlign(i);for(r.textAlign=i,r.textBaseline="middle",r.font=h.fontString(a,t._bodyFontStyle,t._bodyFontFamily),e.x=Xe(t,k),r.fillStyle=t.bodyFontColor,h.each(t.beforeBody,f),s=l&&"right"!==k?"center"===i?a/2+1:a+2:0,m=0,x=o.length;m<x;++m){for(c=o[m],g=t.labelColors[m],r.fillStyle=v=t.labelTextColors[m],h.each(c.before,f),b=0,y=(p=c.lines).length;b<y;++b){if(l){var w=d.x(u);r.fillStyle=t.legendColorBackground,r.fillRect(d.leftForLtr(w,a),e.y,a,a),r.lineWidth=1,r.strokeStyle=g.borderColor,r.strokeRect(d.leftForLtr(w,a),e.y,a,a),r.fillStyle=g.backgroundColor,r.fillRect(d.leftForLtr(d.xPlus(w,1),a-2),e.y+1,a-2,a-2),r.fillStyle=v}f(p[b])}h.each(c.after,f)}s=0,h.each(t.afterBody,f),e.y-=n},drawFooter:function(e,t,r){var i,o,a=t.footer,n=a.length;if(n){var l=wt(t.rtl,t.x,t.width);for(e.x=Xe(t,t._footerAlign),e.y+=t.footerMarginTop,r.textAlign=l.textAlign(t._footerAlign),r.textBaseline="middle",i=t.footerFontSize,r.fillStyle=t.footerFontColor,r.font=h.fontString(i,t._footerFontStyle,t._footerFontFamily),o=0;o<n;++o)r.fillText(a[o],l.x(e.x),e.y+i/2),e.y+=i+t.footerSpacing}},drawBackground:function(e,t,r,a){r.fillStyle=t.backgroundColor,r.strokeStyle=t.borderColor,r.lineWidth=t.borderWidth;var n=t.xAlign,i=t.yAlign,o=e.x,l=e.y,s=a.width,u=a.height,d=t.cornerRadius;r.beginPath(),r.moveTo(o+d,l),"top"===i&&this.drawCaret(e,a),r.lineTo(o+s-d,l),r.quadraticCurveTo(o+s,l,o+s,l+d),"center"===i&&"right"===n&&this.drawCaret(e,a),r.lineTo(o+s,l+u-d),r.quadraticCurveTo(o+s,l+u,o+s-d,l+u),"bottom"===i&&this.drawCaret(e,a),r.lineTo(o+d,l+u),r.quadraticCurveTo(o,l+u,o,l+u-d),"center"===i&&"left"===n&&this.drawCaret(e,a),r.lineTo(o,l+d),r.quadraticCurveTo(o,l,o+d,l),r.closePath(),r.fill(),t.borderWidth>0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var r={width:t.width,height:t.height},a={x:t.x,y:t.y},n=Math.abs(t.opacity<.001)?0:t.opacity;this._options.enabled&&(t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length)&&(e.save(),e.globalAlpha=n,this.drawBackground(a,t,e,r),a.y+=t.yPadding,h.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),h.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var a,t=this,r=t._options;return t._lastActive=t._lastActive||[],"mouseout"===e.type?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&t._active.reverse()),(a=!h.arrayEquals(t._active,t._lastActive))&&(t._lastActive=t._active,(r.enabled||r.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),a}}),kt=Ln;kt.positioners=br;var Mt=h.valueOrDefault;function _r(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){if("xAxes"===e||"yAxes"===e){var i,o,l,n=r[e].length;for(t[e]||(t[e]=[]),i=0;i<n;++i)o=Mt((l=r[e][i]).type,"xAxes"===e?"category":"linear"),i>=t[e].length&&t[e].push({}),h.merge(t[e][i],!t[e][i].type||l.type&&l.type!==t[e][i].type?[Ne.getScaleDefaults(o),l]:l)}else h._merger(e,t,r,a)}})}function St(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){var n=t[e]||Object.create(null),i=r[e];"scales"===e?t[e]=_r(n,i):"scale"===e?t[e]=h.merge(n,[Ne.getScaleDefaults(i.type),i]):h._merger(e,t,r,a)}})}function wr(e,t,r){var a,n=function(i){return i.id===a};do{a=t+r++}while(h.findIndex(e,n)>=0);return a}function kr(e){return"top"===e||"bottom"===e}function Mr(e,t){return function(r,a){return r[e]===a[e]?r[t]-a[t]:r[e]-a[e]}}_._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 ie=function(e,t){return this.construct(e,t),this};h.extend(ie.prototype,{construct:function(e,t){var r=this;t=function Nn(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=St(_.global,_[e.type],e.options||{}),e}(t);var a=we.acquireContext(e,t),n=a&&a.canvas,i=n&&n.height,o=n&&n.width;r.id=h.uid(),r.ctx=a,r.canvas=n,r.config=t,r.width=o,r.height=i,r.aspectRatio=i?o/i:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,ie.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(l){r.config.data=l}}),a&&n?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return A.notify(e,"beforeInit"),h.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),A.notify(e,"afterInit"),e},clear:function(){return h.canvas.clear(this),this},stop:function(){return ut.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,a=t.canvas,n=r.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(h.getMaximumWidth(a))),o=Math.max(0,Math.floor(n?i/n:h.getMaximumHeight(a)));if((t.width!==i||t.height!==o)&&(a.width=t.width=i,a.height=t.height=o,a.style.width=i+"px",a.style.height=o+"px",h.retinaScale(t,r.devicePixelRatio),!e)){var l={width:i,height:o};A.notify(t,"resize",[l]),r.onResize&&r.onResize(t,l),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale;h.each(t.xAxes,function(a,n){a.id||(a.id=wr(t.xAxes,"x-axis-",n))}),h.each(t.yAxes,function(a,n){a.id||(a.id=wr(t.yAxes,"y-axis-",n))}),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},a=[],n=Object.keys(r).reduce(function(i,o){return i[o]=!1,i},{});t.scales&&(a=a.concat((t.scales.xAxes||[]).map(function(i){return{options:i,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(i){return{options:i,dtype:"linear",dposition:"left"}}))),t.scale&&a.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(a,function(i){var o=i.options,l=o.id,s=Mt(o.type,i.dtype);kr(o.position)!==kr(i.dposition)&&(o.position=i.dposition),n[l]=!0;var u=null;if(l in r&&r[l].type===s)(u=r[l]).options=o,u.ctx=e.ctx,u.chart=e;else{var d=Ne.getScaleConstructor(s);if(!d)return;u=new d({id:l,type:s,options:o,ctx:e.ctx,chart:e}),r[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),h.each(n,function(i,o){i||delete r[o]}),e.scales=r,Ne.addScalesToLayout(this)},buildOrUpdateControllers:function(){var a,n,e=this,t=[],r=e.data.datasets;for(a=0,n=r.length;a<n;a++){var i=r[a],o=e.getDatasetMeta(a),l=i.type||e.config.type;if(o.type&&o.type!==l&&(e.destroyDatasetMeta(a),o=e.getDatasetMeta(a)),o.type=l,o.order=i.order||0,o.index=a,o.controller)o.controller.updateIndex(a),o.controller.linkScales();else{var s=dr[o.type];if(void 0===s)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new s(e,a),t.push(o.controller)}}return t},resetElements:function(){var e=this;h.each(e.data.datasets,function(t,r){e.getDatasetMeta(r).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var r,a,t=this;if((!e||"object"!=typeof e)&&(e={duration:e,lazy:arguments[1]}),function zn(e){var t=e.options;h.each(e.scales,function(r){Y.removeBox(e,r)}),t=St(_.global,_[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}(t),A._invalidate(t),!1!==A.notify(t,"beforeUpdate")){t.tooltip._data=t.data;var n=t.buildOrUpdateControllers();for(r=0,a=t.data.datasets.length;r<a;r++)t.getDatasetMeta(r).controller.buildOrUpdateElements();t.updateLayout(),t.options.animation&&t.options.animation.duration&&h.each(n,function(i){i.reset()}),t.updateDatasets(),t.tooltip.initialize(),t.lastActive=[],A.notify(t,"afterUpdate"),t._layers.sort(Mr("z","_idx")),t._bufferedRender?t._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:t.render(e)}},updateLayout:function(){var e=this;!1!==A.notify(e,"beforeLayout")&&(Y.update(this,this.width,this.height),e._layers=[],h.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,r){t._idx=r}),A.notify(e,"afterScaleUpdate"),A.notify(e,"afterLayout"))},updateDatasets:function(){var e=this;if(!1!==A.notify(e,"beforeDatasetsUpdate")){for(var t=0,r=e.data.datasets.length;t<r;++t)e.updateDataset(t);A.notify(e,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this,r=t.getDatasetMeta(e),a={meta:r,index:e};!1!==A.notify(t,"beforeDatasetUpdate",[a])&&(r.controller._update(),A.notify(t,"afterDatasetUpdate",[a]))},render:function(e){var t=this;(!e||"object"!=typeof e)&&(e={duration:e,lazy:arguments[1]});var r=t.options.animation,a=Mt(e.duration,r&&r.duration),n=e.lazy;if(!1!==A.notify(t,"beforeRender")){var i=function(l){A.notify(t,"afterRender"),h.callback(r&&r.onComplete,[l],t)};if(r&&a){var o=new lt({numSteps:a/16.66,easing:e.easing||r.easing,render:function(l,s){var d=s.currentStep,f=d/s.numSteps;l.draw((0,h.easing.effects[s.easing])(f),f,d)},onAnimationProgress:r.onProgress,onAnimationComplete:i});ut.addAnimation(t,o,a,n)}else t.draw(),i(new lt({numSteps:0,chart:t}));return t}},draw:function(e){var r,a,t=this;if(t.clear(),h.isNullOrUndef(e)&&(e=1),t.transition(e),!(t.width<=0||t.height<=0)&&!1!==A.notify(t,"beforeDraw",[e])){for(a=t._layers,r=0;r<a.length&&a[r].z<=0;++r)a[r].draw(t.chartArea);for(t.drawDatasets(e);r<a.length;++r)a[r].draw(t.chartArea);t._drawTooltip(e),A.notify(t,"afterDraw",[e])}},transition:function(e){for(var t=this,r=0,a=(t.data.datasets||[]).length;r<a;++r)t.isDatasetVisible(r)&&t.getDatasetMeta(r).controller.transition(e);t.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var n,i,t=this,a=[];for(n=0,i=(t.data.datasets||[]).length;n<i;++n)(!e||t.isDatasetVisible(n))&&a.push(t.getDatasetMeta(n));return a.sort(Mr("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var r,a,t=this;if(!1!==A.notify(t,"beforeDatasetsDraw",[e])){for(a=(r=t._getSortedVisibleDatasetMetas()).length-1;a>=0;--a)t.drawDataset(r[a],e);A.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var a={meta:e,index:e.index,easingValue:t};!1!==A.notify(this,"beforeDatasetDraw",[a])&&(e.controller.draw(t),A.notify(this,"afterDatasetDraw",[a]))},_drawTooltip:function(e){var t=this,r=t.tooltip,a={tooltip:r,easingValue:e};!1!==A.notify(t,"beforeTooltipDraw",[a])&&(r.draw(),A.notify(t,"afterTooltipDraw",[a]))},getElementAtEvent:function(e){return _e.modes.single(this,e)},getElementsAtEvent:function(e){return _e.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return _e.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var a=_e.modes[t];return"function"==typeof a?a(this,e,r):[]},getDatasetAtEvent:function(e){return _e.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,r=t.data.datasets[e];r._meta||(r._meta={});var a=r._meta[t.id];return a||(a=r._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r.order||0,index:e}),a},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t<r;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,r=this.data.datasets[e],a=r._meta&&r._meta[t];a&&(a.controller.destroy(),delete r._meta[t])},destroy:function(){var r,a,e=this,t=e.canvas;for(e.stop(),r=0,a=e.data.datasets.length;r<a;++r)e.destroyDatasetMeta(r);t&&(e.unbindEvents(),h.canvas.clear(e),we.releaseContext(e.ctx),e.canvas=null,e.ctx=null),A.notify(e,"destroy"),delete ie.instances[e.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new kt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},r=function(){e.eventHandler.apply(e,arguments)};h.each(e.options.events,function(a){we.addEventListener(e,a,r),t[a]=r}),e.options.responsive&&(r=function(){e.resize()},we.addEventListener(e,"resize",r),t.resize=r)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,h.each(t,function(r,a){we.removeEventListener(e,a,r)}))},updateHoverStyle:function(e,t,r){var n,i,o,a=r?"set":"remove";for(i=0,o=e.length;i<o;++i)(n=e[i])&&this.getDatasetMeta(n._datasetIndex).controller[a+"HoverStyle"](n);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,r=t.tooltip;if(!1!==A.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var a=t.handleEvent(e);r&&(a=r._start?r.handleEvent(e):a|r.handleEvent(e)),A.notify(t,"afterEvent",[e]);var n=t._bufferedRequest;return n?t.render(n):a&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var n,t=this,r=t.options||{},a=r.hover;return t.lastActive=t.lastActive||[],t.active="mouseout"===e.type?[]:t.getElementsAtEventForMode(e,a.mode,a),h.callback(r.onHover||r.hover.onHover,[e.native,t.active],t),("mouseup"===e.type||"click"===e.type)&&r.onClick&&r.onClick.call(t,e.native,t.active),t.lastActive.length&&t.updateHoverStyle(t.lastActive,a.mode,!1),t.active.length&&a.mode&&t.updateHoverStyle(t.active,a.mode,!0),n=!h.arrayEquals(t.active,t.lastActive),t.lastActive=t.active,n}}),ie.instances={};var M=ie;function ce(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Ke(e){this.options=e||{}}ie.Controller=ie,ie.types={},h.configMerge=St,h.scaleMerge=_r,h.extend(Ke.prototype,{formats:ce,parse:ce,format:ce,add:ce,diff:ce,startOf:ce,endOf:ce,_create:function(e){return e}}),Ke.override=function(e){h.extend(Ke.prototype,e)};var Ct={_date:Ke},ze={formatters:{values:function(e){return h.isArray(e)?e:""+e},linear:function(e,t,r){var a=r.length>3?r[2]-r[1]:r[1]-r[0];Math.abs(a)>1&&e!==Math.floor(e)&&(a=e-Math.floor(e));var n=h.log10(Math.abs(a)),i="";if(0!==e)if(Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]))<1e-4){var l=h.log10(Math.abs(e)),s=Math.floor(l)-Math.floor(n);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var u=-1*Math.floor(n);u=Math.max(Math.min(u,20),0),i=e.toFixed(u)}else i="0";return i},logarithmic:function(e,t,r){var a=e/Math.pow(10,Math.floor(h.log10(e)));return 0===e?"0":1===a||2===a||5===a||0===t||t===r.length-1?e.toExponential():""}}},ve=h.isArray,Be=h.isNullOrUndef,ge=h.valueOrDefault,ke=h.valueAtIndexOrDefault;function Hn(e,t,r){var u,a=e.getTicks().length,n=Math.min(t,a-1),i=e.getPixelForTick(n),o=e._startPixel,l=e._endPixel,s=1e-6;if(!(r&&(u=1===a?Math.max(i-o,l-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(n-1))/2,i+=n<t?u:-u,i<o-s||i>l+s)))return i}function Ee(e){return e.drawTicks?e.tickMarkLength:0}function Pt(e){var t,r;return e.display?(t=h.options._parseFont(e),r=h.options.toPadding(e.padding),t.lineHeight+r.height):0}function Sr(e,t){return h.extend(h.options._parseFont({fontFamily:ge(t.fontFamily,e.fontFamily),fontSize:ge(t.fontSize,e.fontSize),fontStyle:ge(t.fontStyle,e.fontStyle),lineHeight:ge(t.lineHeight,e.lineHeight)}),{color:h.options.resolve([t.fontColor,e.fontColor,_.global.defaultFontColor])})}function Dt(e){var t=Sr(e,e.minor);return{minor:t,major:e.major.enabled?Sr(e,e.major):t}}function At(e){var r,a,n,t=[];for(a=0,n=e.length;a<n;++a)typeof(r=e[a])._index<"u"&&t.push(r);return t}function Ze(e,t,r,a){var l,s,u,d,n=ge(r,0),i=Math.min(ge(a,e.length),e.length),o=0;for(t=Math.ceil(t),a&&(t=(l=a-r)/Math.floor(l/t)),d=n;d<0;)o++,d=Math.round(n+o*t);for(s=Math.max(n,0);s<i;s++)u=e[s],s===d?(u._index=s,o++,d=Math.round(n+o*t)):delete u.label}_._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:ze.formatters.values,minor:{},major:{}}});var Tt=K.extend({zeroLineIndex:0,getPadding:function(){var e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){h.callback(this.options.beforeUpdate,[this])},update:function(e,t,r){var o,l,s,u,d,a=this,n=a.options.ticks,i=n.sampleSize;if(a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=h.extend({left:0,right:0,top:0,bottom:0},r),a._ticks=null,a.ticks=null,a._labelSizes=null,a._maxLabelLines=0,a.longestLabelWidth=0,a.longestTextCache=a.longestTextCache||{},a._gridLineItems=null,a._labelItems=null,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a.beforeBuildTicks(),u=a.buildTicks()||[],(!(u=a.afterBuildTicks(u)||u)||!u.length)&&a.ticks)for(u=[],o=0,l=a.ticks.length;o<l;++o)u.push({value:a.ticks[o],major:!1});return a._ticks=u,s=a._convertTicksToLabels((d=i<u.length)?function Wn(e,t){for(var r=[],a=e.length/t,n=0,i=e.length;n<i;n+=a)r.push(e[Math.floor(n)]);return r}(u,i):u),a._configure(),a.beforeCalculateTickRotation(),a.calculateTickRotation(),a.afterCalculateTickRotation(),a.beforeFit(),a.fit(),a.afterFit(),a._ticksToDraw=n.display&&(n.autoSkip||"auto"===n.source)?a._autoSkip(u):u,d&&(s=a._convertTicksToLabels(a._ticksToDraw)),a.ticks=s,a.afterUpdate(),a.minSize},_configure:function(){var r,a,e=this,t=e.options.ticks.reverse;e.isHorizontal()?(r=e.left,a=e.right):(r=e.top,a=e.bottom,t=!t),e._startPixel=r,e._endPixel=a,e._reversePixels=t,e._length=a-r},afterUpdate:function(){h.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){h.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){h.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){h.callback(this.options.beforeDataLimits,[this])},determineDataLimits:h.noop,afterDataLimits:function(){h.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){h.callback(this.options.beforeBuildTicks,[this])},buildTicks:h.noop,afterBuildTicks:function(e){var t=this;return ve(e)&&e.length?h.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=h.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){h.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this,t=e.options.ticks;e.ticks=e.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){h.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){h.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var l,s,u,d,f,c,v,e=this,t=e.options,r=t.ticks,a=e.getTicks().length,n=r.minRotation||0,i=r.maxRotation,o=n;!e._isVisible()||!r.display||n>=i||a<=1||!e.isHorizontal()?e.labelRotation=n:(s=(l=e._getLabelSizes()).widest.width,u=l.highest.height-l.highest.offset,d=Math.min(e.maxWidth,e.chart.width-s),s+6>(f=t.offset?e.maxWidth/a:d/(a-1))&&(f=d/(a-(t.offset?.5:1)),c=e.maxHeight-Ee(t.gridLines)-r.padding-Pt(t.scaleLabel),v=Math.sqrt(s*s+u*u),o=h.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/f,1)),Math.asin(Math.min(c/v,1))-Math.asin(u/v))),o=Math.max(n,Math.min(i,o))),e.labelRotation=o)},afterCalculateTickRotation:function(){h.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){h.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,a=e.options,n=a.ticks,i=a.scaleLabel,o=a.gridLines,l=e._isVisible(),s="bottom"===a.position,u=e.isHorizontal();if(u?t.width=e.maxWidth:l&&(t.width=Ee(o)+Pt(i)),u?l&&(t.height=Ee(o)+Pt(i)):t.height=e.maxHeight,n.display&&l){var d=Dt(n),f=e._getLabelSizes(),c=f.first,v=f.last,g
1=f.widest,p=f.highest,m=.4*d.minor.lineHeight,b=n.padding;if(u){var x=0!==e.labelRotation,y=h.toRadians(e.labelRotation),k=Math.cos(y),w=Math.sin(y);t.height=Math.min(e.maxHeight,t.height+(w*g.width+k*(p.height-(x?p.offset:0))+(x?0:m))+b);var T,R,C=e.getPixelForTick(0)-e.left,D=e.right-e.getPixelForTick(e.getTicks().length-1);x?(T=s?k*c.width+w*c.offset:w*(c.height-c.offset),R=s?w*(v.height-v.offset):k*v.width+w*v.offset):(T=c.width/2,R=v.width/2),e.paddingLeft=Math.max((T-C)*e.width/(e.width-C),0)+3,e.paddingRight=Math.max((R-D)*e.width/(e.width-D),0)+3}else t.width=Math.min(e.maxWidth,t.width+(n.mirror?0:g.width+b+m)),e.paddingTop=c.height/2,e.paddingBottom=v.height/2}e.handleMargins(),u?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){h.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Be(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var r,a,n,t=this;for(t.ticks=e.map(function(i){return i.value}),t.beforeTickToLabelConversion(),r=t.convertTicksToLabels(e)||t.ticks,t.afterTickToLabelConversion(),a=0,n=e.length;a<n;++a)e[a].label=r[a];return r},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=function jn(e,t,r,a){var d,f,c,v,g,p,m,b,x,y,k,w,P,n=r.length,i=[],o=[],l=[],s=0,u=0;for(d=0;d<n;++d){if(v=r[d].label,e.font=p=(g=r[d].major?t.major:t.minor).string,m=a[p]=a[p]||{data:{},gc:[]},b=g.lineHeight,x=y=0,Be(v)||ve(v)){if(ve(v))for(f=0,c=v.length;f<c;++f)!Be(k=v[f])&&!ve(k)&&(x=h.measureText(e,m.data,m.gc,x,k),y+=b)}else x=h.measureText(e,m.data,m.gc,x,v),y=b;i.push(x),o.push(y),l.push(b/2),s=Math.max(x,s),u=Math.max(y,u)}function C(D){return{width:i[D]||0,height:o[D]||0,offset:l[D]||0}}return function Vn(e,t){h.each(e,function(r){var i,a=r.gc,n=a.length/2;if(n>t){for(i=0;i<n;++i)delete r.data[a[i]];a.splice(0,n)}})}(a,n),w=i.indexOf(s),P=o.indexOf(u),{first:C(0),last:C(n-1),widest:C(w),highest:C(P)}}(e.ctx,Dt(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,r,a,n;return ve(e)?(t=+this.getRightValue(e[0]),r=+this.getRightValue(e[1]),a=Math.min(t,r),n=Math.max(t,r)):(t=void 0,r=e=+this.getRightValue(e),a=e,n=e),{min:a,max:n,start:t,end:r}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:h.noop,getPixelForValue:h.noop,getValueForPixel:h.noop,getPixelForTick:function(e){var t=this,r=t.options.offset,a=t._ticks.length,n=1/Math.max(a-(r?0:1),1);return e<0||e>a-1?null:t.getPixelForDecimal(e*n+(r?n/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,r=e.max;return e.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0},_autoSkip:function(e){var u,d,f,c,t=this,r=t.options.ticks,n=r.maxTicksLimit||t._length/t._tickSize()+1,i=r.major.enabled?function $n(e){var r,a,t=[];for(r=0,a=e.length;r<a;r++)e[r].major&&t.push(r);return t}(e):[],o=i.length,l=i[0],s=i[o-1];if(o>n)return function Yn(e,t,r){var i,o,a=0,n=t[0];for(r=Math.ceil(r),i=0;i<e.length;i++)o=e[i],i===n?(o._index=i,n=t[++a*r]):delete o.label}(e,i,o/n),At(e);if(f=function Un(e,t,r,a){var o,l,s,u,n=function qn(e){var r,a,t=e.length;if(t<2)return!1;for(a=e[0],r=1;r<t;++r)if(e[r]-e[r-1]!==a)return!1;return a}(e),i=(t.length-1)/a;if(!n)return Math.max(i,1);for(s=0,u=(o=h.math._factorize(n)).length-1;s<u;s++)if((l=o[s])>i)return l;return Math.max(i,1)}(i,e,0,n),o>0){for(u=0,d=o-1;u<d;u++)Ze(e,f,i[u],i[u+1]);return Ze(e,f,h.isNullOrUndef(c=o>1?(s-l)/(o-1):null)?0:l-c,l),Ze(e,f,s,h.isNullOrUndef(c)?e.length:s+c),At(e)}return Ze(e,f),At(e)},_tickSize:function(){var e=this,t=e.options.ticks,r=h.toRadians(e.labelRotation),a=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=e._getLabelSizes(),o=t.autoSkipPadding||0,l=i?i.widest.width+o:0,s=i?i.highe
vendor: 18,917 bytes, line 1
1st.height+o:0;return e.isHorizontal()?s*a>l*n?l/a:s/n:s*n<l*a?s/a:l/n},_isVisible:function(){var a,n,i,e=this,t=e.chart,r=e.options.display;if("auto"!==r)return!!r;for(a=0,n=t.data.datasets.length;a<n;++a)if(t.isDatasetVisible(a)&&((i=t.getDatasetMeta(a)).xAxisID===e.id||i.yAxisID===e.id))return!0;return!1},_computeGridLineItems:function(e){var m,b,x,y,k,w,P,C,D,T,R,L,O,N,Se,Ce,Et,t=this,r=t.chart,a=t.options,n=a.gridLines,i=a.position,o=n.offsetGridLines,l=t.isHorizontal(),s=t._ticksToDraw,u=s.length+(o?1:0),d=Ee(n),f=[],c=n.drawBorder?ke(n.lineWidth,0,0):0,v=c/2,g=h._alignPixel,p=function($i){return g(r,$i,c)};for("top"===i?(m=p(t.bottom),P=t.bottom-d,D=m-v,R=p(e.top)+v,O=e.bottom):"bottom"===i?(m=p(t.top),R=e.top,O=p(e.bottom)-v,P=m+v,D=t.top+d):"left"===i?(m=p(t.right),w=t.right-d,C=m-v,T=p(e.left)+v,L=e.right):(m=p(t.left),T=e.left,L=p(e.right)-v,w=m+v,C=t.left+d),b=0;b<u;++b)!(Be((x=s[b]||{}).label)&&b<s.length)&&(b===t.zeroLineIndex&&a.offset===o?(N=n.zeroLineWidth,Se=n.zeroLineColor,Ce=n.zeroLineBorderDash||[],Et=n.zeroLineBorderDashOffset||0):(N=ke(n.lineWidth,b,1),Se=ke(n.color,b,"rgba(0,0,0,0.1)"),Ce=n.borderDash||[],Et=n.borderDashOffset||0),void 0!==(y=Hn(t,x._index||b,o))&&(k=g(r,y,N),l?w=C=T=L=k:P=D=R=O=k,f.push({tx1:w,ty1:P,tx2:C,ty2:D,x1:T,y1:R,x2:L,y2:O,width:N,color:Se,borderDash:Ce,borderDashOffset:Et})));return f.ticksLength=u,f.borderValue=m,f},_computeLabelItems:function(){var c,v,g,p,m,b,x,y,k,w,P,C,e=this,t=e.options,r=t.ticks,a=t.position,n=r.mirror,i=e.isHorizontal(),o=e._ticksToDraw,l=Dt(r),s=r.padding,u=Ee(t.gridLines),d=-h.toRadians(e.labelRotation),f=[];for("top"===a?(b=e.bottom-u-s,x=d?"left":"center"):"bottom"===a?(b=e.top+u+s,x=d?"right":"center"):"left"===a?(m=e.right-(n?0:u)-s,x=n?"left":"right"):(m=e.left+(n?0:u)+s,x=n?"right":"left"),c=0,v=o.length;c<v;++c)!Be(p=(g=o[c]).label)&&(y=e.getPixelForTick(g._index||c)+r.labelOffset,w=(k=g.major?l.major:l.minor).lineHeight,P=ve(p)?p.length:1,i?(m=y,C="top"===a?((d?1:.5)-P)*w:(d?0:.5)*w):(b=y,C=(1-P)*w/2),f.push({x:m,y:b,rotation:d,label:p,font:k,textOffset:C,textAlign:x}));return f},_drawGrid:function(e){var t=this,r=t.options.gridLines;if(r.display){var s,u,d,f,c,a=t.ctx,n=t.chart,i=h._alignPixel,o=r.drawBorder?ke(r.lineWidth,0,0):0,l=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(d=0,f=l.length;d<f;++d)u=(c=l[d]).color,(s=c.width)&&u&&(a.save(),a.lineWidth=s,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(c.borderDash),a.lineDashOffset=c.borderDashOffset),a.beginPath(),r.drawTicks&&(a.moveTo(c.tx1,c.ty1),a.lineTo(c.tx2,c.ty2)),r.drawOnChartArea&&(a.moveTo(c.x1,c.y1),a.lineTo(c.x2,c.y2)),a.stroke(),a.restore());if(o){var m,b,x,y,v=o,g=ke(r.lineWidth,l.ticksLength-1,1),p=l.borderValue;t.isHorizontal()?(m=i(n,t.left,v)-v/2,b=i(n,t.right,g)+g/2,x=y=p):(x=i(n,t.top,v)-v/2,y=i(n,t.bottom,g)+g/2,m=b=p),a.lineWidth=o,a.strokeStyle=ke(r.color,0),a.beginPath(),a.moveTo(m,x),a.lineTo(b,y),a.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var n,i,o,l,s,u,d,f,r=e.ctx,a=e._labelItems||(e._labelItems=e._computeLabelItems());for(n=0,o=a.length;n<o;++n){if(u=(s=a[n]).font,r.save(),r.translate(s.x,s.y),r.rotate(s.rotation),r.font=u.string,r.fillStyle=u.color,r.textBaseline="middle",r.textAlign=s.textAlign,f=s.textOffset,ve(d=s.label))for(i=0,l=d.length;i<l;++i)r.fillText(""+d[i],0,f),f+=u.lineHeight;else r.fillText(d,0,f);r.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,r=e.options,a=r.scaleLabel;if(a.display){var d,f,n=ge(a.fontColor,_.global.defaultFontColor),i=h.options._parseFont(a),o=h.options.toPadding(a.padding),l=i.lineHeight/2,s=r.position,u=0;if(e.isHorizontal())d=e.left+e.width/2,f="bottom"===s?e.bottom-l-o.bottom:e.top+l+o.top;else{var c="left"===s;d=c?e.left+l+o.top:e.right-l-o.top,f=e.top+e.height/2,u=c?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(d,f),t.rotate(u),t.textAlign="center",t.textBaseline="middle",t.fillStyle=n,t.font=i.string,t.fillText(a.labelString,0,0),t.restore()}},draw:function(e){var t=this;t._isVisible()&&(t._drawGrid(e),t._drawTitle(),t._drawLabels())},_layers:function(){var e=this,t=e.options,r=t.ticks&&t.ticks.z||0,a=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&r!==a&&e.draw===e._draw?[{z:a,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:r,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:r,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,r=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter(function(a){return(!e||a.type===e)&&(r?a.xAxisID===t.id:a.yAxisID===t.id)})}});Tt.prototype._draw=Tt.prototype.draw;var W=Tt,Ft=h.isNullOrUndef,Cr=W.extend({determineDataLimits:function(){var l,e=this,t=e._getLabels(),r=e.options.ticks,a=r.min,n=r.max,i=0,o=t.length-1;void 0!==a&&(l=t.indexOf(a))>=0&&(i=l),void 0!==n&&(l=t.indexOf(n))>=0&&(o=l),e.minIndex=i,e.maxIndex=o,e.min=t[i],e.max=t[o]},buildTicks:function(){var e=this,t=e._getLabels(),r=e.minIndex,a=e.maxIndex;e.ticks=0===r&&a===t.length-1?t:t.slice(r,a+1)},getLabelForIndex:function(e,t){var r=this,a=r.chart;return a.getDatasetMeta(t).controller._getValueScaleId()===r.id?r.getRightValue(a.data.datasets[t].data[e]):r._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks;W.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var n,i,o,a=this;return!Ft(t)&&!Ft(r)&&(e=a.chart.data.datasets[r].data[t]),Ft(e)||(n=a.isHorizontal()?e.x:e.y),(void 0!==n||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=h.valueOrDefault(n,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,r=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(r,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}});Cr._defaults={position:"bottom"};var pe=h.isNullOrUndef,Je=W.extend({getRightValue:function(e){return"string"==typeof e?+e:W.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,r=e.options.ticks;if(r.beginAtZero){var a=h.sign(e.min),n=h.sign(e.max);a<0&&n<0?e.max=0:a>0&&n>0&&(e.min=0)}var i=void 0!==r.min||void 0!==r.suggestedMin,o=void 0!==r.max||void 0!==r.suggestedMax;void 0!==r.min?e.min=r.min:void 0!==r.suggestedMin&&(e.min=null===e.min?r.suggestedMin:Math.min(e.min,r.suggestedMin)),void 0!==r.max?e.max=r.max:void 0!==r.suggestedMax&&(e.max=null===e.max?r.suggestedMax:Math.max(e.max,r.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,r.beginAtZero||e.min--)},getTickLimit:function(){var n,e=this,t=e.options.ticks,r=t.stepSize,a=t.maxTicksLimit;return r?n=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(n=e._computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:h.noop,buildTicks:function(){var e=this,r=e.options.ticks,a=e.getTickLimit(),n={maxTicks:a=Math.max(2,a),min:r.min,max:r.max,precision:r.precision,stepSize:h.valueOrDefault(r.fixedStepSize,r.stepSize)},i=e.ticks=function Zn(e,t){var v,g,p,m,r=[],n=e.stepSize,i=n||1,o=e.maxTicks-1,l=e.min,s=e.max,u=e.precision,d=t.min,f=t.max,c=h.niceNum((f-d)/o/i)*i;if(c<1e-14&&pe(l)&&pe(s))return[d,f];(m=Math.ceil(f/c)-Math.floor(d/c))>o&&(c=h.niceNum(m*c/o/i)*i),n||pe(u)?v=Math.pow(10,h._decimalPlaces(c)):(v=Math.pow(10,u),c=Math.ceil(c*v)/v),g=Math.floor(d/c)*c,p=Math.ceil(f/c)*c,n&&(!pe(l)&&h.almostWhole(l/c,c/1e3)&&(g=l),!pe(s)&&h.almostWhole(s/c,c/1e3)&&(p=s)),m=h.almostEquals(m=(p-g)/c,Math.round(m),c/1e3)?Math.round(m):Math.ceil(m),g=Math.round(g*v)/v,p=Math.round(p*v)/v,r.push(pe(l)?g:l);for(var b=1;b<m;++b)r.push(Math.round((g+b*c)*v)/v);return r.push(pe(s)?p:s),r}(n,e);e.handleDirectionalChanges(),e.max=h.max(i),e.min=h.min(i),r.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),W.prototype.convertTicksToLabels.call(e)},_configure:function(){var n,e=this,t=e.getTicks(),r=e.min,a=e.max;W.prototype._configure.call(e),e.options.offset&&t.length&&(r-=n=(a-r)/Math.max(t.length-1,1)/2,a+=n),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),Jn={position:"left",ticks:{callback:ze.formatters.linear}};function ri(e,t,r,a){var d,f,n=e.options,o=function ti(e,t,r){var a=[r.type,void 0===t&&void 0===r.stack?r.index:"",r.stack].join(".");return void 0===e[a]&&(e[a]={pos:[],neg:[]}),e[a]}(t,n.stacked,r),l=o.pos,s=o.neg,u=a.length;for(d=0;d<u;++d)f=e._parseValue(a[d]),!(isNaN(f.min)||isNaN(f.max)||r.data[d].hidden)&&(l[d]=l[d]||0,s[d]=s[d]||0,n.relativePoints?l[d]=100:f.min<0||f.max<0?s[d]+=f.min:l[d]+=f.max)}function ai(e,t,r){var n,i,a=r.length;for(n=0;n<a;++n)i=e._parseValue(r[n]),!(isNaN(i.min)||isNaN(i.max)||t.data[n].hidden)&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var Pr=Je.extend({determineDataLimits:function(){var s,u,d,f,e=this,t=e.options,a=e.chart.data.datasets,n=e._getMatchingVisibleMetas(),i=t.stacked,o={},l=n.length;if(e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,void 0===i)for(s=0;!i&&s<l;++s)i=void 0!==(u=n[s]).stack;for(s=0;s<l;++s)d=a[(u=n[s]).index].data,i?ri(e,o,u,d):ai(e,u,d);h.each(o,function(c){f=c.pos.concat(c.neg),e.min=Math.min(e.min,h.min(f)),e.max=Math.max(e.max,h.max(f))}),e.min=h.isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=h.isFinite(e.max)&&!isNaN(e.max)?e.max:1,e.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=h.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this;return t.getPixelForDecimal((+t.getRightValue(e)-t._startValue)/t._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}});Pr._defaults=Jn;var It=h.valueOrDefault,H=h.math.log10,oi={position:"left",ticks:{callback:ze.formatters.logarithmic}};function Qe(e,t){return h.isFinite(e)&&e>=0?e:t}var Dr=W.extend({determineDataLimits:function(){var o,l,s,u,d,f,e=this,t=e.options,r=e.chart,a=r.data.datasets,n=e.isHorizontal();function i(m){return n?m.xAxisID===e.id:m.yAxisID===e.id}e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,e.minNotZero=Number.POSITIVE_INFINITY;var c=t.stacked;if(void 0===c)for(o=0;o<a.length;o++)if(l=r.getDatasetMeta(o),r.isDatasetVisible(o)&&i(l)&&void 0!==l.stack){c=!0;break}if(t.stacked||c){var v={};for(o=0;o<a.length;o++){var g=[(l=r.getDatasetMeta(o)).type,void 0===t.stacked&&void 0===l.stack?o:"",l.stack].join(".");if(r.isDatasetVisible(o)&&i(l))for(void 0===v[g]&&(v[g]=[]),d=0,f=(u=a[o].data).length;d<f;d++){var p=v[g];s=e._parseValue(u[d]),!(isNaN(s.min)||isNaN(s.max)||l.data[d].hidden||s.min<0||s.max<0)&&(p[d]=p[d]||0,p[d]+=s.max)}}h.each(v,function(m){if(m.length>0){var b=h.min(m),x=h.max(m);e.min=Math.min(e.min,b),e.max=Math.max(e.max,x)}})}else for(o=0;o<a.length;o++)if(l=r.getDatasetMeta(o),r.isDatasetVisible(o)&&i(l))for(d=0,f=(u=a[o].data).length;d<f;d++)s=e._parseValue(u[d]),!(isNaN(s.min)||isNaN(s.max)||l.data[d].hidden||s.min<0||s.max<0)&&(e.min=Math.min(s.min,e.min),e.max=Math.max(s.max,e.max),0!==s.min&&(e.minNotZero=Math.min(s.min,e.minNotZero)));e.min=h.isFinite(e.min)?e.min:null,e.max=h.isFinite(e.max)?e.max:null,e.minNotZero=h.isFinite(e.minNotZero)?e.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=Qe(t.min,e.min),e.max=Qe(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(H(e.min))-1),e.max=Math.pow(10,Math.floor(H(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(H(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(H(e.min))+1):10),null===e.minNotZero&&(e.minNotZero=e.min>0?e.min:e.max<1?Math.pow(10,Math.floor(H(e.max))):1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),a={min:Qe(t.min),max:Qe(t.max)},n=e.ticks=function ii(e,t){var o,l,r=[],a=It(e.min,Math.pow(10,Math.floor(H(t.min)))),n=Math.floor(H(t.max)),i=Math.ceil(t.max/Math.pow(10,n));0===a?(o=Math.floor(H(t.minNotZero)),l=Math.floor(t.minNotZero/Math.pow(10,o)),r.push(a),a=l*Math.pow(10,o)):(o=Math.floor(H(a)),l=Math.floor(a/Math.pow(10,o)));var s=o<0?Math.pow(10,Math.abs(o)):1;do{r.push(a),10==++l&&(l=1,s=++o>=0?1:s),a=Math.round(l*Math.pow(10,o)*s)/s}while(o<n||o===n&&l<i);var u=It(e.max,a);return r.push(u),r}(a,e);e.max=h.max(n),e.min=h.min(n),t.reverse?(r=!r,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),r&&n.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),W.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(H(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0;W.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),r=It(e.options.ticks.fontSize,_.global.defaultFontSize)/e._length),e._startValue=H(t),e._valueOffset=r,e._valueRange=(H(e.max)-H(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(r=(H(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e);return 0===r&&0===t.min?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}});Dr._defaults=oi;var et=h.valueOrDefault,Ot=h.valueAtIndexOrDefault,Ar=h.options.resolve,li={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:ze.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Lt(e){var t=e.ticks;return t.display&&e.display?et(t.fontSize,_.global.defaultFontSize)+2*t.backdropPaddingY:0}function ui(e,t,r){return h.isArray(r)?{w:h.longestText(e,e.font,r),h:r.length*t}:{w:e.measureText(r).width,h:t}}function Tr(e,t,r,a,n){return e===a||e===n?{start:t-r/2,end:t+r/2}:e<a||e>n?{start:t-r,end:t}:{start:t,end:t+r}}function fi(e){return 0===e||180===e?"center":e<180?"left":"right"}function hi(e,t,r,a){var i,o,n=r.y+a/2;if(h.isArray(t))for(i=0,o=t.length;i<o;++i)e.fillText(t[i],r.x,n),n+=a;else e.fillText(t,r.x,n)}function ci(e,t,r){90===e||270===e?r.y-=t.h/2:(e>270||e<90)&&(r.y-=t.h)}function tt(e){return h.isNumber(e)?e:0}var Fr=Je.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Lt(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;h.each(t.data.datasets,function(n,i){if(t.isDatasetVisible(i)){var o=t.getDatasetMeta(i);h.each(n.data,function(l,s){var u=+e.getRightValue(l);isNaN(u)||o.data[s].hidden||(r=Math.min(u,r),a=Math.max(u,a))})}}),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=a===Number.NEGATIVE_INFINITY?0:a,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Lt(this.options))},convertTicksToLabels:function(){var e=this;Je.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=h.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?function di(e){var n,i,o,t=h.options._parseFont(e.options.pointLabels),r={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=t.string,e._pointLabelSizes=[];var l=e.chart.data.labels.length;for(n=0;n<l;n++){o=e.getPointPosition(n,e.drawingArea+5),i=ui(e.ctx,t.lineHeight,e.pointLabels[n]),e._pointLabelSizes[n]=i;var s=e.getIndexAngle(n),u=h.toDegrees(s)%360,d=Tr(u,o.x,i.w,0,180),f=Tr(u,o.y,i.h,90,270);d.start<r.l&&(r.l=d.start,a.l=s),d.end>r.r&&(r.r=d.end,a.r=s),f.start<r.t&&(r.t=f.start,a.t=s),f.end>r.b&&(r.b=f.end,a.b=s)}e.setReductions(e.drawingArea,r,a)}(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var a=this,n=t.l/Math.sin(r.l),i=Math.max(t.r-a.width,0)/Math.sin(r.r),o=-t.t/Math.cos(r.t),l=-Math.max(t.b-(a.height-a.paddingTop),0)/Math.cos(r.b);n=tt(n),i=tt(i),o=tt(o),l=tt(l),a.drawingArea=Math.min(Math.floor(e-(n+i)/2),Math.floor(e-(o+l)/2)),a.setCenterPoint(n,i,o,l)},setCenterPoint:function(e,t,r,a){var n=this,l=r+n.drawingArea,s=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((e+n.drawingArea+(n.width-t-n.drawingArea))/2+n.left),n.yCenter=Math.floor((l+s)/2+n.top+n.paddingTop)},getIndexAngle:function(e){var t=this.chart,i=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(h.isNullOrUndef(e))return NaN;var r=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this,a=r.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(a)*t+r.xCenter,y:Math.sin(a)*t+r.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this,r=t.min,a=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:r<0&&a<0?a:r>0&&a>0?r:0)},_drawGrid:function(){var l,s,u,e=this,t=e.ctx,r=e.options,a=r.gridLines,n=r.angleLines,i=et(n.lineWidth,a.lineWidth),o=et(n.color,a.color);if(r.pointLabels.display&&function vi(e){var t=e.ctx,r=e.options,a=r.pointLabels,n=Lt(r),i=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),o=h.options._parseFont(a);t.save(),t.font=o.string,t.textBaseline="middle";for(var l=e.chart.data.labels.length-1;l>=0;l--){var u=e.getPointPosition(l,i+(0===l?n/2:0)+5),d=Ot(a.fontColor,l,_.global.defaultFontColor);t.fillStyle=d;var f=e.getIndexAngle(l),c=h.toDegrees(f);t.textAlign=fi(c),ci(c,e._pointLabelSizes[l],u),hi(t,e.pointLabels[l],u,o.lineHeight)}
1t.restore()}(e),a.display&&h.each(e.ticks,function(d,f){0!==f&&(s=e.getDistanceFromCenterForValue(e.ticksAsNumbers[f]),function gi(e,t,r,a){var u,n=e.ctx,i=t.circular,o=e.chart.data.labels.length,l=Ot(t.color,a-1),s=Ot(t.lineWidth,a-1);if((i||o)&&l&&s){if(n.save(),n.strokeStyle=l,n.lineWidth=s,n.setLineDash&&(n.setLineDash(t.borderDash||[]),n.lineDashOffset=t.borderDashOffset||0),n.beginPath(),i)n.arc(e.xCenter,e.yCenter,r,0,2*Math.PI);else{u=e.getPointPosition(0,r),n.moveTo(u.x,u.y);for(var d=1;d<o;d++)u=e.getPointPosition(d,r),n.lineTo(u.x,u.y)}n.closePath(),n.stroke(),n.restore()}}(e,a,s,f))}),n.display&&i&&o){for(t.save(),t.lineWidth=i,t.strokeStyle=o,t.setLineDash&&(t.setLineDash(Ar([n.borderDash,a.borderDash,[]])),t.lineDashOffset=Ar([n.borderDashOffset,a.borderDashOffset,0])),l=e.chart.data.labels.length-1;l>=0;l--)s=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),u=e.getPointPosition(l,s),t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(u.x,u.y),t.stroke();t.restore()}},_drawLabels:function(){var e=this,t=e.ctx,a=e.options.ticks;if(a.display){var l,s,n=e.getIndexAngle(0),i=h.options._parseFont(a),o=et(a.fontColor,_.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",h.each(e.ticks,function(u,d){0===d&&!a.reverse||(l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[d]),a.showLabelBackdrop&&(s=t.measureText(u).width,t.fillStyle=a.backdropColor,t.fillRect(-s/2-a.backdropPaddingX,-l-i.size/2-a.backdropPaddingY,s+2*a.backdropPaddingX,i.size+2*a.backdropPaddingY)),t.fillStyle=o,t.fillText(u,0,-l))}),t.restore()}},_drawTitle:h.noop});Fr._defaults=li;var Rt=h._deprecated,Ir=h.options.resolve,mi=h.valueOrDefault,Or=Number.MIN_SAFE_INTEGER||-9007199254740991,Nt=Number.MAX_SAFE_INTEGER||9007199254740991,rt={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}},V=Object.keys(rt);function Lr(e,t){return e-t}function Rr(e){return h.valueOrDefault(e.time.min,e.ticks.min)}function Nr(e){return h.valueOrDefault(e.time.max,e.ticks.max)}function Me(e,t,r,a){var n=function yi(e,t,r){for(var i,o,l,a=0,n=e.length-1;a>=0&&a<=n;){if(l=e[i=a+n>>1],!(o=e[i-1]||null))return{lo:null,hi:l};if(l[t]<r)a=i+1;else{if(!(o[t]>r))return{lo:o,hi:l};n=i-1}}return{lo:l,hi:null}}(e,t,r),i=n.lo?n.hi?n.lo:e[e.length-2]:e[0],o=n.lo?n.hi?n.hi:e[e.length-1]:e[1],l=o[t]-i[t];return i[a]+(o[a]-i[a])*(l?(r-i[t])/l:0)}function zt(e,t){var r=e._adapter,a=e.options.time,n=a.parser,i=n||a.format,o=t;return"function"==typeof n&&(o=n(o)),h.isFinite(o)||(o="string"==typeof i?r.parse(o,i):r.parse(o)),null!==o?+o:(!n&&"function"==typeof i&&(o=i(t),h.isFinite(o)||(o=r.parse(o))),o)}function me(e,t){if(h.isNullOrUndef(t))return null;var r=e.options.time,a=zt(e,e.getRightValue(t));return null===a||r.round&&(a=+e._adapter.startOf(a,r.round)),a}function zr(e,t,r,a){var i,o,n=V.length;for(i=V.indexOf(e);i<n-1;++i)if((o=rt[V[i]]).common&&Math.ceil((r-t)/((o.steps?o.steps:Nt)*o.size))<=a)return V[i];return V[n-1]}function Br(e,t,r){var o,l,a=[],n={},i=t.length;for(o=0;o<i;++o)n[l=t[o]]=o,a.push({value:l,major:!1});return 0!==i&&r?function Si(e,t,r,a){var l,s,n=e._adapter,i=+n.startOf(t[0].value,a),o=t[t.length-1].value;for(l=i;l<=o;l=+n.add(l,1,a))(s=r[l])>=0&&(t[s].major=!0);return t}(e,a,n,r):a}var Er=W.extend({initialize:function(){this.mergeTicksOptions(),W.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),a=e._adapter=new Ct._date(t.adapters.date);return Rt("time scale",r.format,"time.format","time.parser"),Rt("time scale",r.min,"time.min","ticks.min"),Rt("time scale",r.max,"time.max","ticks.max"),h.mergeIf(r.displayFormats,a.formats()),W.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),W.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var d,f,c,v,g,p,m,e=this,t=e.chart,r=e._adapter,a=e.options,n=a.time.unit||"day",i=Nt,o=Or,l=[],s=[],u=[],b=e._getLabels();for(d=0,c=b.length;d<c;++d)u.push(me(e,b[d]));for(d=0,c=(t.data.datasets||[]).length;d<c;++d)if(t.isDatasetVisible(d))if(h.isObject((g=t.data.datasets[d].data)[0]))for(s[d]=[],f=0,v=g.length;f<v;++f)p=me(e,g[f]),l.push(p),s[d][f]=p;else s[d]=u.slice(0),m||(l=l.concat(u),m=!0);else s[d]=[];u.length&&(i=Math.min(i,u[0]),o=Math.max(o,u[u.length-1])),l.length&&(l=c>1?function bi(e){var a,n,i,t={},r=[];for(a=0,n=e.length;a<n;++a)t[i=e[a]]||(t[i]=!0,r.push(i));return r}(l).sort(Lr):l.sort(Lr),i=Math.min(i,l[0]),o=Math.max(o,l[l.length-1])),i=me(e,Rr(a))||i,o=me(e,Nr(
vendor: 18,786 bytes, line 1
1a))||o,i=i===Nt?+r.startOf(Date.now(),n):i,o=o===Or?+r.endOf(Date.now(),n)+1:o,e.min=Math.min(i,o),e.max=Math.max(i+1,o),e._table=[],e._timestamps={data:l,datasets:s,labels:u}},buildTicks:function(){var f,c,v,e=this,t=e.min,r=e.max,a=e.options,n=a.ticks,i=a.time,o=e._timestamps,l=[],s=e.getLabelCapacity(t),u=n.source,d=a.distribution;for(o="data"===u||"auto"===u&&"series"===d?o.data:"labels"===u?o.labels:function ki(e,t,r,a){var c,n=e._adapter,i=e.options,o=i.time,l=o.unit||zr(o.minUnit,t,r,a),s=Ir([o.stepSize,o.unitStepSize,1]),u="week"===l&&o.isoWeekday,d=t,f=[];if(u&&(d=+n.startOf(d,"isoWeek",u)),d=+n.startOf(d,u?"day":l),n.diff(r,t,l)>1e5*s)throw t+" and "+r+" are too far apart with stepSize of "+s+" "+l;for(c=d;c<r;c=+n.add(c,s,l))f.push(c);return(c===r||"ticks"===i.bounds)&&f.push(c),f}(e,t,r,s),"ticks"===a.bounds&&o.length&&(t=o[0],r=o[o.length-1]),t=me(e,Rr(a))||t,r=me(e,Nr(a))||r,f=0,c=o.length;f<c;++f)(v=o[f])>=t&&v<=r&&l.push(v);return e.min=t,e.max=r,e._unit=i.unit||(n.autoSkip?zr(i.minUnit,e.min,e.max,s):function _i(e,t,r,a,n){var i,o;for(i=V.length-1;i>=V.indexOf(r);i--)if(rt[o=V[i]].common&&e._adapter.diff(n,a,o)>=t-1)return o;return V[r?V.indexOf(r):0]}(e,l.length,i.minUnit,e.min,e.max)),e._majorUnit=n.major.enabled&&"year"!==e._unit?function wi(e){for(var t=V.indexOf(e)+1,r=V.length;t<r;++t)if(rt[V[t]].common)return V[t]}(e._unit):void 0,e._table=function xi(e,t,r,a){if("linear"===a||!e.length)return[{time:t,pos:0},{time:r,pos:1}];var o,l,s,u,d,n=[],i=[t];for(o=0,l=e.length;o<l;++o)(u=e[o])>t&&u<r&&i.push(u);for(i.push(r),o=0,l=i.length;o<l;++o)d=i[o+1],u=i[o],(void 0===(s=i[o-1])||void 0===d||Math.round((d+s)/2)!==u)&&n.push({time:u,pos:o/(l-1)});return n}(e._timestamps.data,t,r,d),e._offsets=function Mi(e,t,r,a,n){var l,s,i=0,o=0;return n.offset&&t.length&&(l=Me(e,"time",t[0],"pos"),i=1===t.length?1-l:(Me(e,"time",t[1],"pos")-l)/2,s=Me(e,"time",t[t.length-1],"pos"),o=1===t.length?s:(s-Me(e,"time",t[t.length-2],"pos"))/2),{start:i,end:o,factor:1/(i+1+o)}}(e._table,l,0,0,a),n.reverse&&l.reverse(),Br(e,l,e._majorUnit)},getLabelForIndex:function(e,t){var r=this,a=r._adapter,n=r.chart.data,i=r.options.time,o=n.labels&&e<n.labels.length?n.labels[e]:"",l=n.datasets[t].data[e];return h.isObject(l)&&(o=r.getRightValue(l)),i.tooltipFormat?a.format(zt(r,o),i.tooltipFormat):"string"==typeof o?o:a.format(zt(r,o),i.displayFormats.datetime)},tickFormatFunction:function(e,t,r,a){var n=this,o=n.options,l=o.time.displayFormats,u=n._majorUnit,d=l[u],f=r[t],c=o.ticks,v=u&&d&&f&&f.major,g=n._adapter.format(e,a||(v?d:l[n._unit])),p=v?c.major:c.minor,m=Ir([p.callback,p.userCallback,c.callback,c.userCallback]);return m?m(g,t,r):g},convertTicksToLabels:function(e){var r,a,t=[];for(r=0,a=e.length;r<a;++r)t.push(this.tickFormatFunction(e[r].value,r,e));return t},getPixelForOffset:function(e){var t=this,r=t._offsets,a=Me(t._table,"time",e,"pos");return t.getPixelForDecimal((r.start+a)*r.factor)},getPixelForValue:function(e,t,r){var a=this,n=null;if(void 0!==t&&void 0!==r&&(n=a._timestamps.datasets[r][t]),null===n&&(n=me(a,e)),null!==n)return a.getPixelForOffset(n)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,r=t._offsets,a=t.getDecimalForPixel(e)/r.factor-r.end,n=Me(t._table,"pos",a,"time");return t._adapter._create(n)},_getLabelSize:function(e){var t=this,r=t.options.ticks,a=t.ctx.measureText(e).width,n=h.toRadians(t.isHorizontal()?r.maxRotation:r.minRotation),i=Math.cos(n),o=Math.sin(n),l=mi(r.fontSize,_.global.defaultFontSize);return{w:a*i+l*o,h:a*o+l*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,r=t.options.time,a=r.displayFormats,n=a[r.unit]||a.millisecond,i=t.tickFormatFunction(e,0,Br(t,[e],t._majorUnit),n),o=t._getLabelSize(i),l=Math.floor(t.isHorizontal()?t.width/o.w:t.height/o.h);return t.options.offset&&l--,l>0?l:1}});Er._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Di={category:Cr,linear:Pr,logarithmic:Dr,radialLinear:Fr,time:Er},Ai={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"};Ct._date.override("function"==typeof I?{_id:"moment",formats:function(){return Ai},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=I(e,t):e instanceof I||(e=I(e)),e.isValid()?e.valueOf():null},format:function(e,t){return I(e).format(t)},add:function(e,t,r){return I(e).add(t,r).valueOf()},diff:function(e,t,r){return I(e).diff(I(t),r)},startOf:function(e,t,r){return e=I(e),"isoWeek"===t?e.isoWeekday(r).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return I(e).endOf(t).valueOf()},_create:function(e){return I(e)}}:{}),_._set("global",{plugins:{filler:{propagate:!0}}});var Ti={dataset:function(e){var t=e.fill,r=e.chart,a=r.getDatasetMeta(t),i=a&&r.isDatasetVisible(t)&&a.dataset._children||[],o=i.length||0;return o?function(l,s){return s<o&&i[s]._view||null}:null},boundary:function(e){var t=e.boundary,r=t?t.x:null,a=t?t.y:null;return h.isArray(t)?function(n,i){return t[i]}:function(n){return{x:null===r?n.x:r,y:null===a?n.y:a}}}};function Fi(e,t,r){var i,a=e._model||{},n=a.fill;if(void 0===n&&(n=!!a.backgroundColor),!1===n||null===n)return!1;if(!0===n)return"origin";if(i=parseFloat(n,10),isFinite(i)&&Math.floor(i)===i)return("-"===n[0]||"+"===n[0])&&(i=t+i),!(i===t||i<0||i>=r)&&i;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function Li(e){return(e.el._scale||{}).getPointPositionForValue?function Oi(e){var o,l,s,u,d,t=e.el._scale,r=t.options,a=t.chart.data.labels.length,n=e.fill,i=[];if(!a)return null;for(l=r.ticks.reverse?t.min:t.max,s=t.getPointPositionForValue(0,o=r.ticks.reverse?t.max:t.min),u=0;u<a;++u)d="start"===n||"end"===n?t.getPointPositionForValue(u,"start"===n?o:l):t.getBasePosition(u),r.gridLines.circular&&(d.cx=s.x,d.cy=s.y,d.angle=t.getIndexAngle(u)-Math.PI/2),i.push(d);return i}(e):function Ii(e){var i,t=e.el._model||{},r=e.el._scale||{},a=e.fill,n=null;if(isFinite(a))return null;if("start"===a?n=void 0===t.scaleBottom?r.bottom:t.scaleBottom:"end"===a?n=void 0===t.scaleTop?r.top:t.scaleTop:void 0!==t.scaleZero?n=t.scaleZero:r.getBasePixel&&(n=r.getBasePixel()),null!=n){if(void 0!==n.x&&void 0!==n.y)return n;if(h.isFinite(n))return{x:(i=r.isHorizontal())?n:null,y:i?null:n}}return null}(e)}function Ri(e,t,r){var o,n=e[t].fill,i=[t];if(!r)return n;for(;!1!==n&&-1===i.indexOf(n);){if(!isFinite(n))return n;if(!(o=e[n]))return!1;if(o.visible)return n;i.push(n),n=o.fill}return!1}function Ni(e){var t=e.fill,r="dataset";return!1===t?null:(isFinite(t)||(r="boundary"),Ti[r](e))}function Wr(e){return e&&!e.skip}function Hr(e,t,r,a,n){var i,o,l,s;if(a&&n){for(e.moveTo(t[0].x,t[0].y),i=1;i<a;++i)h.canvas.lineTo(e,t[i-1],t[i]);if(void 0!==r[0].angle){for(o=r[0].cx,l=r[0].cy,s=Math.sqrt(Math.pow(r[0].x-o,2)+Math.pow(r[0].y-l,2)),i=n-1;i>0;--i)e.arc(o,l,s,r[i].angle,r[i-1].angle,!0);return}for(e.lineTo(r[n-1].x,r[n-1].y),i=n-1;i>0;--i)h.canvas.lineTo(e,r[i],r[i-1],!0)}}function zi(e,t,r,a,n,i){var c,v,g,p,m,b,x,y,o=t.length,l=a.spanGaps,s=[],u=[],d=0,f=0;for(e.beginPath(),c=0,v=o;c<v;++c)m=r(p=t[g=c%o]._view,g,a),b=Wr(p),x=Wr(m),i&&void 0===y&&b&&(v=o+(y=c+1)),b&&x?(d=s.push(p),f=u.push(m)):d&&f&&(l?(b&&s.push(p),x&&u.push(m)):(Hr(e,s,u,d,f),d=f=0,s=[],u=[]));Hr(e,s,u,d,f),e.closePath(),e.fillStyle=n,e.fill()}var Bi={id:"filler",afterDatasetsUpdate:function(e,t){var i,o,l,s,r=(e.data.datasets||[]).length,a=t.propagate,n=[];for(o=0;o<r;++o)s=null,(l=(i=e.getDatasetMeta(o)).dataset)&&l._model&&l instanceof E.Line&&(s={visible:e.isDatasetVisible(o),fill:Fi(l,o,r),chart:e,el:l}),i.$filler=s,n.push(s);for(o=0;o<r;++o)(s=n[o])&&(s.fill=Ri(n,o,a),s.boundary=Li(s),s.mapper=Ni(s))},beforeDatasetsDraw:function(e){var a,n,i,o,l,s,u,t=e._getSortedVisibleDatasetMetas(),r=e.ctx;for(n=t.length-1;n>=0;--n)(a=t[n].$filler)&&a.visible&&(l=(i=a.el)._children||[],u=(o=i._view).backgroundColor||_.global.defaultColor,(s=a.mapper)&&u&&l.length&&(h.canvas.clipArea(r,e.chartArea),zi(r,l,s,o,u,i._loop),h.canvas.unclipArea(r)))}},Ei=h.rtl.getRtlAdapter,oe=h.noop,se=h.valueOrDefault;function Bt(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}_._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,a=this.chart,n=a.getDatasetMeta(r);n.hidden=null===n.hidden?!a.data.datasets[r].hidden:null,a.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},a=r.labels&&r.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(n){var i=n.controller.getStyle(a?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(e){var a,n,i,t=document.createElement("ul"),r=e.data.datasets;for(t.setAttribute("class",e.id+"-legend"),a=0,n=r.length;a<n;a++)(i=t.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[a].backgroundColor,r[a].label&&i.appendChild(document.createTextNode(r[a].label));return t.outerHTML}});var Vr=K.extend({initialize:function(e){var t=this;h.extend(t,e),t.legendHitBoxes=[],t._hoveredItem=null,t.doughnutMode=!1},beforeUpdate:oe,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:oe,beforeSetDimensions:oe,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:oe,beforeBuildLabels:oe,buildLabels:function(){var e=this,t=e.options.labels||{},r=h.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(r=r.filter(function(a){return t.filter(a,e.chart.data)})),e.options.reverse&&r.reverse(),e.legendItems=r},afterBuildLabels:oe,beforeFit:oe,fit:function(){var e=this,t=e.options,r=t.labels,a=t.display,n=e.ctx,i=h.options._parseFont(r),o=i.size,l=e.legendHitBoxes=[],s=e.minSize,u=e.isHorizontal();if(u?(s.width=e.maxWidth,s.height=a?10:0):(s.width=a?10:0,s.height=e.maxHeight),a){if(n.font=i.string,u){var d=e.lineWidths=[0],f=0;n.textAlign="left",n.textBaseline="middle",h.each(e.legendItems,function(x,y){var w=Bt(r,o)+o/2+n.measureText(x.text).width;(0===y||d[d.length-1]+w+2*r.padding>s.width)&&(f+=o+r.padding,d[d.length-(y>0?0:1)]=0),l[y]={left:0,top:0,width:w,height:o},d[d.length-1]+=w+r.padding}),s.height+=f}else{var c=r.padding,v=e.columnWidths=[],g=e.columnHeights=[],p=r.padding,m=0,b=0;h.each(e.legendItems,function(x,y){var w=Bt(r,o)+o/2+n.measureText(x.text).width;y>0&&b+o+2*c>s.height&&(p+=m+r.padding,v.push(m),g.push(b),m=0,b=0),m=Math.max(m,w),b+=o+c,l[y]={left:0,top:0,width:w,height:o}}),p+=m,v.push(m),g.push(b),s.width+=p}e.width=s.width,e.height=s.height}else e.width=s.width=e.height=s.height=0},afterFit:oe,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,a=_.global,n=a.defaultColor,i=a.elements.line,o=e.height,l=e.columnHeights,s=e.width,u=e.lineWidths;if(t.display){var p,d=Ei(t.rtl,e.left,e.minSize.width),f=e.ctx,c=se(r.fontColor,a.defaultFontColor),v=h.options._parseFont(r),g=v.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=c,f.fillStyle=c,f.font=v.string;var m=Bt(r,g),b=e.legendHitBoxes,k=function(C,D){switch(t.align){case"start":return r.padding;case"end":return C-D;default:return(C-D+r.padding)/2}},w=e.isHorizontal();p=w?{x:e.left+k(s,u[0]),y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+k(o,l[0]),line:0},h.rtl.overrideTextDirection(e.ctx,t.textDirection);var P=g+r.padding;h.each(e.legendItems,function(C,D){var T=f.measureText(C.text).width,R=m+g/2+T,L=p.x,O=p.y;d.setWidth(e.minSize.width),w?D>0&&L+R+r.padding>e.left+e.minSize.width&&(O=p.y+=P,p.line++,L=p.x=e.left+k(s,u[p.line])):D>0&&O+P>e.top+e.minSize.height&&(L=p.x=L+e.columnWidths[p.line]+r.padding,p.line++,O=p.y=e.top+k(o,l[p.line]));var N=d.x(L);(function(C,D,T){if(!(isNaN(m)||m<=0)){f.save();var R=se(T.lineWidth,i.borderWidth);if(f.fillStyle=se(T.fillStyle,n),f.lineCap=se(T.lineCap,i.borderCapStyle),f.lineDashOffset=se(T.lineDashOffset,i.borderDashOffset),f.lineJoin=se(T.lineJoin,i.borderJoinStyle),f.lineWidth=R,f.strokeStyle=se(T.strokeStyle,n),f.setLineDash&&f.setLineDash(se(T.lineDash,i.borderDash)),r&&r.usePointStyle){var L=m*Math.SQRT2/2,O=d.xPlus(C,m/2);h.canvas.drawPoint(f,T.pointStyle,L,O,D+g/2,T.rotation)}else f.fillRect(d.leftForLtr(C,m),D,m,g),0!==R&&f.strokeRect(d.leftForLtr(C,m),D,m,g);f.restore()}})(N,O,C),b[D].left=d.leftForLtr(N,b[D].width),b[D].top=O,function(C,D,T,R){var L=g/2,O=d.xPlus(C,m+L),N=D+L;f.fillText(T.text,O,N),T.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(O,N),f.lineTo(d.xPlus(O,R),N),f.stroke())}(N,O,C,T),w?p.x+=R+r.padding:p.y+=P}),h.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var a,n,i,r=this;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)for(i=r.legendHitBoxes,a=0;a<i.length;++a)if(e>=(n=i[a]).left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return r.legendItems[a];return null},handleEvent:function(e){var n,t=this,r=t.options,a="mouseup"===e.type?"click":e.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}n=t._getLegendItemAt(e.x,e.y),"click"===a?n&&r.onClick&&r.onClick.call(t,e.native,n):(r.onLeave&&n!==t._hoveredItem&&(t._hoveredItem&&r.onLeave.call(t,e.native,t._hoveredItem),t._hoveredItem=n),r.onHover&&n&&r.onHover.call(t,e.native,n))}});function jr(e,t){var r=new Vr({ctx:e.ctx,options:t,chart:e});Y.configure(e,r,t),Y.addBox(e,r),e.legend=r}var Wi={id:"legend",_element:Vr,beforeInit:function(e){var t=e.options.legend;t&&jr(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend;t?(h.mergeIf(t,_.global.legend),r?(Y.configure(e,r,t),r.options=t):jr(e,t)):r&&(Y.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend;r&&r.handleEvent(t)}},ae=h.noop;_._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var qr=K.extend({initialize:function(e){h.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:ae,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:ae,beforeSetDimensions:ae,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:ae,beforeBuildLabels:ae,buildLabels:ae,afterBuildLabels:ae,beforeFit:ae,fit:function(){var i,e=this,t=e.options,r=e.minSize={},a=e.isHorizontal();t.display?(i=(h.isArray(t.text)?t.text.length:1)*h.options._parseFont(t).lineHeight+2*t.padding,e.width=r.width=a?e.maxWidth:i,e.height=r.height=a?i:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:ae,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=e.options;if(r.display){var f,c,v,a=h.options._parseFont(r),n=a.lineHeight,i=n/2+r.padding,o=0,l=e.top,s=e.left,u=e.bottom,d=e.right;t.fillStyle=h.valueOrDefault(r.fontColor,_.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(c=s+(d-s)/2,v=l+i,f=d-s):(c="left"===r.position?s+i:d-i,v=l+(u-l)/2,f=u-l,o=Math.PI*("left"===r.position?-.5:.5)),t.save(),t.translate(c,v),t.rotate(o),t.textAlign="center",t.textBaseline="middle";var g=r.text;if(h.isArray(g))for(var p=0,m=0;m<g.length;++m)t.fillText(g[m],0,p,f),p+=n;else t.fillText(g,0,0,f);t.restore()}}});function Ur(e,t){var r=new qr({ctx:e.ctx,options:t,chart:e});Y.configure(e,r,t),Y.addBox(e,r),e.titleBlock=r}var Hi={id:"title",_element:qr,beforeInit:function(e){var t=e.options.title;t&&Ur(e,t)},beforeUpdate:function(e){var t=e.options.title,r=e.titleBlock;t?(h.mergeIf(t,_.global.title),r?(Y.configure(e,r,t),r.options=t):Ur(e,t)):r&&(Y.removeBox(e,r),delete e.titleBlock)}},le={},Vi=Bi,ji=Wi,qi=Hi;for(var $r in le.filler=Vi,le.legend=ji,le.title=qi,M.helpers=h,function(){function e(a,n,i){var o;return"string"==typeof a?(o=parseInt(a,10),-1!==a.indexOf("%")&&(o=o/100*n.parentNode[i])):o=a,o}function t(a){return null!=a&&"none"!==a}function r(a,n,i){var o=document.defaultView,l=h._getParentNode(a),s=o.getComputedStyle(a)[n],u=o.getComputedStyle(l)[n],d=t(s),f=t(u),c=Number.POSITIVE_INFINITY;return d||f?Math.min(d?e(s,a,i):c,f?e(u,l,i):c):"none"}h.where=function(a,n){if(h.isArray(a)&&Array.prototype.filter)return a.filter(n);var i=[];return h.each(a,function(o){n(o)&&i.push(o)}),i},h.findIndex=Array.prototype.findIndex?function(a,n,i){return a.findIndex(n,i)}:function(a,n,i){i=void 0===i?a:i;for(var o=0,l=a.length;o<l;++o)if(n.call(i,a[o],o,a))return o;return-1},h.findNextWhere=function(a,n,i){h.isNullOrUndef(i)&&(i=-1);for(var o=i+1;o<a.length;o++){var l=a[o];if(n(l))return l}},h.findPreviousWhere=function(a,n,i){h.isNullOrUndef(i)&&(i=a.length);for(var o=i-1;o>=0;o--){var l=a[o];if(n(l))return l}},h.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},h.almostEquals=function(a,n,i){return Math.abs(a-n)<i},h.almostWhole=function(a,n){var i=Math.round(a);return i-n<=a&&i+n>=a},h.max=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.max(n,i)},Number.NEGATIVE_INFINITY)},h.min=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.min(n,i)},Number.POSITIVE_INFINITY)},h.sign=Math.sign?function(a){return Math.sign(a)}:function(a){return 0==(a=+a)||isNaN(a)?a:a>0?1:-1},h.toRadians=function(a){return a*(Math.PI/180)},h.toDegrees=function(a){return a*(180/Math.PI)}
1,h._decimalPlaces=function(a){if(h.isFinite(a)){for(var n=1,i=0;Math.round(a*n)/n!==a;)n*=10,i++;return i}},h.getAngleFromPoint=function(a,n){var i=n.x-a.x,o=n.y-a.y,l=Math.sqrt(i*i+o*o),s=Math.atan2(o,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:l}},h.distanceBetweenPoints=function(a,n){return Math.sqrt(Math.pow(n.x-a.x,2)+Math.pow(n.y-a.y,2))},h.aliasPixel=function(a){return a%2==0?0:.5},h._alignPixel=function(a,n,i){var o=a.currentDevicePixelRatio,l=i/2;return Math.round((n-l)*o)/o+l},h.splineCurve=function(a,n,i,o){var l=a.skip?n:a,s=n,u=i.skip?n:i,d=Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2)),f=Math.sqrt(Math.pow(u.x-s.x,2)+Math.pow(u.y-s.y,2)),c=d/(d+f),v=f/(d+f),g=o*(c=isNaN(c)?0:c),p=o*(v=isNaN(v)?0:v);return{previous:{x:s.x-g*(u.x-l.x),y:s.y-g*(u.y-l.y)},next:{x:s.x+p*(u.x-l.x),y:s.y+p*(u.y-l.y)}}},h.EPSILON=Number.EPSILON||1e-14,h.splineCurveMonotone=function(a){var o,l,s,u,f,c,v,g,p,n=(a||[]).map(function(m){return{model:m._model,deltaK:0,mK:0}}),i=n.length;for(o=0;o<i;++o)if(!(s=n[o]).model.skip){if(l=o>0?n[o-1]:null,(u=o<i-1?n[o+1]:null)&&!u.model.skip){var d=u.model.x-s.model.x;s.deltaK=0!==d?(u.model.y-s.model.y)/d:0}s.mK=!l||l.model.skip?s.deltaK:!u||u.model.skip?l.deltaK:this.sign(l.deltaK)!==this.sign(s.deltaK)?0:(l.deltaK+s.deltaK)/2}for(o=0;o<i-1;++o)if(u=n[o+1],!(s=n[o]).model.skip&&!u.model.skip){if(h.almostEquals(s.deltaK,0,this.EPSILON)){s.mK=u.mK=0;continue}f=s.mK/s.deltaK,c=u.mK/s.deltaK,!((g=Math.pow(f,2)+Math.pow(c,2))<=9)&&(v=3/Math.sqrt(g),s.mK=f*v*s.deltaK,u.mK=c*v*s.deltaK)}for(o=0;o<i;++o)!(s=n[o]).model.skip&&(u=o<i-1?n[o+1]:null,(l=o>0?n[o-1]:null)&&!l.model.skip&&(s.model.controlPointPreviousX=s.model.x-(p=(s.model.x-l.model.x)/3),s.model.controlPointPreviousY=s.model.y-p*s.mK),u&&!u.model.skip&&(s.model.controlPointNextX=s.model.x+(p=(u.model.x-s.model.x)/3),s.model.controlPointNextY=s.model.y+p*s.mK))},h.nextItem=function(a,n,i){return i?n>=a.length-1?a[0]:a[n+1]:n>=a.length-1?a[a.length-1]:a[n+1]},h.previousItem=function(a,n,i){return i?n<=0?a[a.length-1]:a[n-1]:n<=0?a[0]:a[n-1]},h.niceNum=function(a,n){var i=Math.floor(h.log10(a)),o=a/Math.pow(10,i);return(n?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=5?5:10)*Math.pow(10,i)},h.requestAnimFrame=typeof window>"u"?function(a){a()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)},h.getRelativePosition=function(a,n){var i,o,l=a.originalEvent||a,s=a.target||a.srcElement,u=s.getBoundingClientRect(),d=l.touches;d&&d.length>0?(i=d[0].clientX,o=d[0].clientY):(i=l.clientX,o=l.clientY);var f=parseFloat(h.getStyle(s,"padding-left")),c=parseFloat(h.getStyle(s,"padding-top")),v=parseFloat(h.getStyle(s,"padding-right")),g=parseFloat(h.getStyle(s,"padding-bottom")),m=u.bottom-u.top-c-g;return{x:i=Math.round((i-u.left-f)/(u.right-u.left-f-v)*s.width/n.currentDevicePixelRatio),y:o=Math.round((o-u.top-c)/m*s.height/n.currentDevicePixelRatio)}},h.getConstraintWidth=function(a){return r(a,"max-width","clientWidth")},h.getConstraintHeight=function(a){return r(a,"max-height","clientHeight")},h._calculatePadding=function(a,n,i){return(n=h.getStyle(a,n)).indexOf("%")>-1?i*parseInt(n,10)/100:parseInt(n,10)},h._getParentNode=function(a){var n=a.parentNode;return n&&"[object ShadowRoot]"===n.toString()&&(n=n.host),n},h.getMaximumWidth=function(a){var n=h._getParentNode(a);if(!n)return a.clientWidth;var i=n.clientWidth,s=i-h._calculatePadding(n,"padding-left",i)-h._calculatePadding(n,"padding-right",i),u=h.getConstraintWidth(a);return isNaN(u)?s:Math.min(s,u)},h.getMaximumHeight=function(a){var n=h._getParentNode(a);if(!n)return a.clientHeight;var i=n.clientHeight,s=i-h._calculatePadding(n,"padding-top",i)-h._calculatePadding(n,"padding-bottom",i),u=h.getConstraintHeight(a);return isNaN(u)?s:Math.min(s,u)},h.getStyle=function(a,n){return a.currentStyle?a.currentStyle[n]:document.defaultView.getComputedStyle(a,null).getPropertyValue(n)},h.retinaScale=function(a,n){var i=a.currentDevicePixelRatio=n||typeof window<"u"&&window.devicePixelRatio||1;if(1!==i){var o=a.canvas,l=a.height,s=a.width;o.height=l*i,o.width=s*i,a.ctx.scale(i,i),!o.style.height&&!o.style.width&&(o.style.height=l+"px",o.style.width=s+"px")}},h.fontString=function(a,n,i){return n+" "+a+"px "+i},h.longestText=function(a,n,i,o){var l=(o=o||{}).data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==n&&(l=o.data={},s=o.garbageCollect=[],o.font=n),a.font=n;var f,c,v,g,p,u=0,d=i.length;for(f=0;f<d;f++)if(null!=(g=i[f])&&!0!==h.isArray(g))u=h.measureText(a,l,s,u,g);else if(h.isArray(g))for(c=0,v=g.length;c<v;c++)null!=(p=g[c])&&!h.isArray(p)&&(u=h.measureText(a,l,s,u,p));var m=s.length/2;if(m>i.length){for(f=0;f<m;f++)delete l[s[f]];s.splice(0,m)}return u},h.measureText=function(a,n,i,o,l){var s=n[l];return s||(s=n[l]=a.measureText(l).width,i.push(l)),s>o&&(o=s),o},h.numberOfLabelLines=function(a){var n=1;return h.each(a,function(i){h.isArray(i)&&i.length>n&&(n=i.length)}),n},h.color=Ve?function(a){return a instanceof CanvasGradient&&(a=_.global.defaultColor),Ve(a)}:function(a){return console.error("Color.js not found!"),a},h.getHoverColor=function(a){return a instanceof CanvasPattern||a instanceof CanvasGradient?a:h.color(a).saturate(.5).darken(.1).rgbString()}}(),M._adapters=Ct,M.Animation=lt,M.animationService=ut,M.controllers=dr,M.DatasetController=$,M.defaults=_,M.Element=K,M.elements=E,M.Interaction=_e,M.layouts=Y,M.platform=we,M.plugins=A,M.Scale=W,M.scaleService=Ne,M.Ticks=ze,M.Tooltip=kt,M.helpers.each(Di,function(e,t){M.scaleService.registerScaleType(t,e,e._defaults)}),le)le.hasOwnProperty($r)&&M.plugins.register(le[$r]);M.platform.initialize();var Ui=M;return typeof window<"u"&&(window.Chart=M),M.Chart=M,M.Legend=le.legend._element,M.Title=le.title._element,M.pluginService=M.plugins,M.PluginBase=M.Element.extend({}),M.canvasHelpers=M.helpers.canvas,M.layoutService=M.layouts,M.LinearScaleBase=Je,M.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){M[e]=function(t,r){return new M(t,M.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Ui});
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.