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