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