| Server IP : 72.60.233.178 / Your IP : 216.73.216.91 Web Server : Apache System : Linux srv1210665.hstgr.cloud 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : armaladmin ( 1001) PHP Version : 8.3.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/armaladmin/public_html/pm/property/ |
Upload File : |
!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}(self.webpackChunkmaterial_dashboard_angular=self.webpackChunkmaterial_dashboard_angular||[]).push([[572],{6823:function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e,n={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]},r=(function(t){var e={};for(var r in n)n.hasOwnProperty(r)&&(e[n[r]]=r);var a=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 i in a)if(a.hasOwnProperty(i)){if(!("channels"in a[i]))throw new Error("missing channels property: "+i);if(!("labels"in a[i]))throw new Error("missing channel labels property: "+i);if(a[i].labels.length!==a[i].channels)throw new Error("channel and label counts mismatch: "+i);var o=a[i].channels,s=a[i].labels;delete a[i].channels,delete a[i].labels,Object.defineProperty(a[i],"channels",{value:o}),Object.defineProperty(a[i],"labels",{value:s})}function l(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}a.rgb.hsl=function(t){var e,n,r=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(r,a,i),s=Math.max(r,a,i),l=s-o;return s===o?e=0:r===s?e=(a-i)/l:a===s?e=2+(i-r)/l:i===s&&(e=4+(r-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,r,a,i,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(t){return(u-t)/6/c+.5};return 0===c?a=i=0:(i=c/u,e=d(o),n=d(s),r=d(l),o===u?a=r-n:s===u?a=1/3+e-r:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-r,1-a)))/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var r=e[t];if(r)return r;var a,i=1/0;for(var o in n)if(n.hasOwnProperty(o)){var s=l(t,n[o]);s<i&&(i=s,a=o)}return a},a.keyword.rgb=function(t){return n[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],r=e[1],i=e[2];return r/=100,i/=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-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(t){var e,n,r,a,i,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(r=o+1/3*-(u-1))<0&&r++,r>1&&r--,a[u]=255*(i=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e);return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,a=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=i<=1?i:2-i,[e,100*(0===r?2*a/(i+a):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,a){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(t){var e,n,r,a=t[0],i=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return r=(2-i)*o,n=i*s,[a,100*(n=(n/=(e=(2-i)*s)<=1?e:2-e)||0),100*(r/=2)]},a.hwb.rgb=function(t){var e,n,r,a,i,o,s,l=t[0]/360,u=t[1]/100,c=t[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(r=1-r),a=u+r*((n=1-c)-u),e){default:case 6:case 0:i=n,o=a,s=u;break;case 1:i=a,o=n,s=u;break;case 2:i=u,o=n,s=a;break;case 3:i=u,o=a,s=n;break;case 4:i=a,o=u,s=n;break;case 5:i=n,o=u,s=a}return[255*i,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-r)+r)),255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},a.xyz.rgb=function(t){var e,n,r,a=t[0]/100,i=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*i+.0415*o,r=.0557*a+-.204*i+1.057*o,e=(e=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.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))]},a.lab.xyz=function(t){var e,n,r;e=t[1]/500+(n=(t[0]+16)/116),r=n-t[2]/200;var a=Math.pow(n,3),i=Math.pow(e,3),o=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},a.lab.lch=function(t){var e,n=t[0],r=t[1],a=t[2];return(e=360*Math.atan2(a,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+a*a),e]},a.lch.lab=function(t){var e,n=t[1];return e=t[2]/360*2*Math.PI,[t[0],n*Math.cos(e),n*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.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]},a.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]},a.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},a.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]},a.rgb.hcg=function(t){var e,n=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.max(Math.max(n,r),a),o=Math.min(Math.min(n,r),a),s=i-o;return e=s<=0?0:i===n?(r-a)/s%6:i===r?2+(a-n)/s:4+(n-r)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e,n=t[1]/100,r=t[2]/100,a=0;return(e=r<.5?2*n*r:2*n*(1-r))<1&&(a=(r-.5*e)/(1-e)),[t[0],100*e,100*a]},a.hsv.hcg=function(t){var e=t[2]/100,n=t[1]/100*e,r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},a.hcg.rgb=function(t){var e=t[1]/100,n=t[2]/100;if(0===e)return[255*n,255*n,255*n];var r,a=[0,0,0],i=t[0]/360%1*6,o=i%1,s=1-o;switch(Math.floor(i)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return[255*(e*a[0]+(r=(1-e)*n)),255*(e*a[1]+r),255*(e*a[2]+r)]},a.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]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},a.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)]},a.hwb.hcg=function(t){var e=1-t[2]/100,n=e-t[1]/100,r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.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},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(e={exports:{}}),e.exports);function a(t,e){return function(n){return e(t(n))}}function i(t,e){for(var n=[e[t].parent,t],i=r[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),i=a(r[e[o].parent][o],i),o=e[o].parent;return i.conversion=n,i}var o={};Object.keys(r).forEach(function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:r[t].channels}),Object.defineProperty(o[t],"labels",{value:r[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(r),n=e.length,a=0;a<n;a++)t[e[a]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var a=n.pop(),i=Object.keys(r[a]),o=i.length,s=0;s<o;s++){var l=i[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,n.unshift(l))}return e}(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=i(l,e))}return n}(t);Object.keys(e).forEach(function(n){var r=e[n];o[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,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(r),o[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 s=o,l={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]},u={getRgba:c,getHsla:d,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:h,getAlpha:function(t){var e=c(t);return e||(e=d(t))||(e=h(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+m(t[0])+m(t[1])+m(t[2])+(e>=0&&e<1?m(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:g,hslString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,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 b[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],n=1,r=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(r){a=(r=r[1])[3];for(var i=0;i<e.length;i++)e[i]=parseInt(r[i]+r[i],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(r=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=r[2],r=r[1],i=0;i<e.length;i++)e[i]=parseInt(r.slice(2*i,2*i+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(r=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(r[i+1]);n=parseFloat(r[4])}else if(r=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(r[i+1]));n=parseFloat(r[4])}else if(r=t.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(e=l[r[1]]))return}for(i=0;i<e.length;i++)e[i]=v(e[i],0,255);return n=n||0==n?v(n,0,1):1,e[3]=n,e}}function d(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[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function h(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[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(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 p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function v(t,e,n){return Math.min(Math.max(e,t),n)}function m(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var y in l)b[l[y]]=y;var x=function t(e){return e instanceof t?e:this instanceof t?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(n=u.getRgba(e))?this.setValues("rgb",n):(n=u.getHsla(e))?this.setValues("hsl",n):(n=u.getHwb(e))&&this.setValues("hwb",n):"object"==typeof e&&(void 0!==(n=e).r||void 0!==n.red?this.setValues("rgb",n):void 0!==n.l||void 0!==n.lightness?this.setValues("hsl",n):void 0!==n.v||void 0!==n.value?this.setValues("hsv",n):void 0!==n.w||void 0!==n.whiteness?this.setValues("hwb",n):(void 0!==n.c||void 0!==n.cyan)&&this.setValues("cmyk",n)))):new t(e);var n};(x.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 u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.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=[],n=0;n<t.length;n++){var r=t[n]/255;e[n]=r<=.03928?r/12.92:Math.pow((r+.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=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,r=t,a=void 0===e?.5:e,i=2*a-1,o=n.alpha()-r.alpha(),s=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue()).alpha(n.alpha()*a+r.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new x,r=this.values,a=n.values;for(var i in r)r.hasOwnProperty(i)&&("[object Array]"===(e={}.toString.call(t=r[i]))?a[i]=t.slice(0):"[object Number]"===e?a[i]=t:console.error("unexpected color value:",t));return n}}).spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},x.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},x.prototype.getValues=function(t){for(var e=this.values,n={},r=0;r<t.length;r++)n[t.charAt(r)]=e[t][r];return 1!==e.alpha&&(n.a=e.alpha),n},x.prototype.setValues=function(t,e){var n,r,a=this.values,i=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[i[t][0]]){var u=i[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)r=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(r);for(var c in i)c!==t&&(a[c]=s[t][c](a[t]));return!0},x.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)},x.prototype.setChannel=function(t,e,n){var r=this.values[t];return void 0===n?r[e]:(n===r[e]||(r[e]=n,this.setValues(t,r)),this)},"undefined"!=typeof window&&(window.Color=x);var _=x;function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,M={noop:function(){},uid:(w=0,function(){return w++}),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){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(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 M.valueOrDefault(M.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 a,i,o;if(M.isArray(t))if(i=t.length,r)for(a=i-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<i;a++)e.call(n,t[a],a);else if(M.isObject(t))for(i=(o=Object.keys(t)).length,a=0;a<i;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,r,a,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=e[n],(a=t[n])instanceof Array&&i instanceof Array){if(!M.arrayEquals(a,i))return!1}else if(a!==i)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),r=n.length,a=0;a<r;++a)e[n[a]]=M.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,r){if(k(t)){var a=e[t],i=n[t];M.isObject(a)&&M.isObject(i)?M.merge(a,i,r):e[t]=M.clone(i)}},_mergerIf:function(t,e,n){if(k(t)){var r=e[t],a=n[t];M.isObject(r)&&M.isObject(a)?M.mergeIf(r,a):e.hasOwnProperty(t)||(e[t]=M.clone(a))}},merge:function(t,e,n){var r,a,i,o,s,l=M.isArray(e)?e:[e],u=l.length;if(!M.isObject(t))return t;for(r=(n=n||{}).merger||M._merger,a=0;a<u;++a)if(M.isObject(e=l[a]))for(s=0,o=(i=Object.keys(e)).length;s<o;++s)r(i[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.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=M.inherits,t&&M.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')}},C=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var S={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 e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.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*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},A={effects:S};C.easingEffects=S;var P=Math.PI,D=P/180,O=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,a,i){if(i){var o=Math.min(i,a/2,r/2),s=e+o,l=n+o,u=e+r-o,c=n+a-o;t.moveTo(e,l),s<u&&l<c?(t.arc(s,l,o,-P,-T),t.arc(u,l,o,-T,0),t.arc(u,c,o,0,T),t.arc(s,c,o,T,P)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-T,T),t.arc(s,l,o,T,P+T)):l<c?(t.arc(s,l,o,-P,0),t.arc(s,c,o,0,P)):t.arc(s,l,o,-P,P),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,a)},drawPoint:function(t,e,n,r,a,i){var o,s,l,u,c,d=(i||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(r,a),t.rotate(d),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(r,a,n,0,O),t.closePath();break;case"triangle":t.moveTo(r+Math.sin(d)*n,a-Math.cos(d)*n),d+=F,t.lineTo(r+Math.sin(d)*n,a-Math.cos(d)*n),d+=F,t.lineTo(r+Math.sin(d)*n,a-Math.cos(d)*n),t.closePath();break;case"rectRounded":u=n-(c=.516*n),s=Math.cos(d+I)*u,l=Math.sin(d+I)*u,t.arc(r-s,a-l,c,d-P,d-T),t.arc(r+l,a-s,c,d-T,d),t.arc(r+s,a+l,c,d,d+T),t.arc(r-l,a+s,c,d+T,d+P),t.closePath();break;case"rect":if(!i){u=Math.SQRT1_2*n,t.rect(r-u,a-u,2*u,2*u);break}d+=I;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+l,a-s),t.lineTo(r+s,a+l),t.lineTo(r-l,a+s),t.closePath();break;case"crossRot":d+=I;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s),d+=I,s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l);break;case"dash":t.moveTo(r,a),t.lineTo(r+Math.cos(d)*n,a+Math.sin(d)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,r){var a=n.steppedLine;if(a){if("middle"===a){var i=(e.x+n.x)/2;t.lineTo(i,r?n.y:e.y),t.lineTo(i,r?e.y:n.y)}else"after"===a&&!r||"after"!==a&&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)}},R=L;C.clear=L.clear,C.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var B={_set:function(t,e){return C.merge(this[t]||(this[t]={}),e)}};B._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 j=B,z=C.valueOrDefault,E={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,r,a;return C.isObject(t)?(e=+t.top||0,n=+t.right||0,r=+t.bottom||0,a=+t.left||0):e=n=r=a=+t||0,{top:e,right:n,bottom:r,left:a,height:e+r,width:a+n}},_parseFont:function(t){var e=j.global,n=z(t.fontSize,e.defaultFontSize),r={family:z(t.fontFamily,e.defaultFontFamily),lineHeight:C.options.toLineHeight(z(t.lineHeight,e.defaultLineHeight),n),size:n,style:z(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return r.string=function(t){return!t||C.isNullOrUndef(t.size)||C.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 a,i,o,s=!0;for(a=0,i=t.length;a<i;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&C.isArray(o)&&(o=o[n],s=!1),void 0!==o))return r&&!s&&(r.cacheable=!1),o}},N={_factorize:function(t){var e,n=[],r=Math.sqrt(t);for(e=1;e<r;e++)t%e==0&&(n.push(e),n.push(t/e));return r===(0|r)&&n.push(r),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},W=N;C.log10=N.log10;var V=C,H=R,U=E,q=W;V.easing=A,V.canvas=H,V.options=U,V.math=q,V.rtl={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 n,r;("ltr"===e||"rtl"===e)&&(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};var Y=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(Y.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=V.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,r=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),r||(r=e._start={}),function(t,e,n,r){var a,i,o,s,l,u,c,d,h,f=Object.keys(n);for(a=0,i=f.length;a<i;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(c=typeof u)==typeof(l=t[o]))if("string"===c){if((d=_(l)).valid&&(h=_(u)).valid){e[o]=h.mix(d,r).rgbString();continue}}else if(V.isFinite(l)&&V.isFinite(u)){e[o]=l+(u-l)*r;continue}e[o]=u}}(r,a,n,t),e):(e._view=V.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return V.isNumber(this._model.x)&&V.isNumber(this._model.y)}}),Y.extend=V.inherits;var G=Y,X=G.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),$=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),j._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var K={animations:[],request:null,addAnimation:function(t,e,n,r){var a,i,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,r||(t.animating=!0),a=0,i=o.length;a<i;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=V.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=V.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,r,a=this.animations,i=0;i<a.length;)e=(t=a[i]).chart,n=t.numSteps,r=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(r,n),V.callback(t.render,[e,t],e),V.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(i,1)):++i}},J=V.options.resolve,Z=["push","pop","shift","splice","unshift"];function Q(t,e){var n=t._chartjs;if(n){var r=n.listeners,a=r.indexOf(e);-1!==a&&r.splice(a,1),!(r.length>0)&&(Z.forEach(function(e){delete t[e]}),delete t._chartjs)}}var tt=function(t,e){this.initialize(t,e)};V.extend(tt.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 t=this,e=t.getMeta(),n=t.chart,r=n.scales,a=t.getDataset(),i=n.options.scales;(null===e.xAxisID||!(e.xAxisID in r)||a.xAxisID)&&(e.xAxisID=a.xAxisID||i.xAxes[0].id),(null===e.yAxisID||!(e.yAxisID in r)||a.yAxisID)&&(e.yAxisID=a.yAxisID||i.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&&Q(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,r=n.getMeta(),a=n.getDataset().data||[],i=r.data;for(t=0,e=a.length;t<e;++t)i[t]=i[t]||n.createMetaData(t);r.dataset=r.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,e=t.getDataset(),n=e.data||(e.data=[]);t._data!==n&&(t._data&&Q(t._data,t),n&&Object.isExtensible(n)&&function(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Z.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=r.apply(this,e);return V.each(t._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),a}})}))}(n,t),t._data=n),t.resyncElements()},_configure:function(){var t=this;t._config=V.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&V._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:V.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],r=n.length,a=0;a<r;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,r=0;for(t.dataset&&t.dataset.draw();r<n;++r)e[r].draw()},getStyle:function(t){var e,n=this,r=n.getMeta(),a=r.dataset;return n._configure(),(!1===(e=a&&void 0===t?n._resolveDatasetElementOptions(a||{}):n._resolveDataElementOptions(r.data[t=t||0]||{},t)).fill||null===e.fill)&&(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,r,a,i,o=this,s=o.chart,l=o._config,u=t.custom||{},c=s.options.elements[o.datasetElementType.prototype._type]||{},d=o._datasetElementOptions,h={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,r=d.length;n<r;++n)a=d[n],i=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,h[a]=J([u[i],l[i],c[i]],f);return h},_resolveDataElementOptions:function(t,e){var n=this,r=t&&t.custom,a=n._cachedDataOpts;if(a&&!r)return a;var i,o,s,l,u=n.chart,c=n._config,d=u.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!r};if(r=r||{},V.isArray(h))for(o=0,s=h.length;o<s;++o)f[l=h[o]]=J([r[l],c[l],d[l]],g,e,p);else for(o=0,s=(i=Object.keys(h)).length;o<s;++o)f[l=i[o]]=J([r[l],c[h[l]],c[l],d[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){V.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},a=t._model,i=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=J([r.hoverBackgroundColor,e.hoverBackgroundColor,i(a.backgroundColor)],void 0,n),a.borderColor=J([r.hoverBorderColor,e.hoverBorderColor,i(a.borderColor)],void 0,n),a.borderWidth=J([r.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,r,a,i,o=this.getMeta().dataset,s={};if(o){for(i=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(r=Object.keys(a)).length;t<e;++t)s[n=r[t]]=i[n],i[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,r=e.data.length,a=n.length;a<r?e.data.splice(a,r-a):a>r&&t.insertElements(r,a-r)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},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)}}),tt.extend=V.inherits;var et=tt,nt=2*Math.PI;function rt(t,e){var n=e.startAngle,r=e.endAngle,a=e.pixelMargin,i=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-i,r+i),e.innerRadius>a?t.arc(o,s,e.innerRadius-a,r+(i=a/e.innerRadius),n-i,!0):t.arc(o,s,a,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}j._set("global",{elements:{arc:{backgroundColor:j.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var at=G.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=V.getAngleFromPoint(n,{x:t,y:e}),a=r.angle,i=r.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=nt;for(;a>s;)a-=nt;for(;a<o;)a+=nt;return a>=o&&a<=s&&i>=n.innerRadius&&i<=n.outerRadius}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 t,e=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/nt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+nt,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%nt}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&function(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 a,i=n.endAngle;for(r&&(n.endAngle=n.startAngle+nt,rt(t,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=nt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+nt,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+nt),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,r),r&&rt(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()}(e,n,a),e.restore()}}),it=V.valueOrDefault,ot=j.global.defaultColor;j._set("global",{elements:{line:{tension:.4,backgroundColor:ot,borderWidth:3,borderColor:ot,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var st=G.extend({_type:"line",draw:function(){var t,e,n,r=this,a=r._view,i=r._chart.ctx,o=a.spanGaps,s=r._children.slice(),l=j.global,u=l.elements.line,c=-1,d=r._loop;if(s.length){if(r._loop){for(t=0;t<s.length;++t)if(e=V.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),d=o;break}d&&s.push(s[0])}for(i.save(),i.lineCap=a.borderCapStyle||u.borderCapStyle,i.setLineDash&&i.setLineDash(a.borderDash||u.borderDash),i.lineDashOffset=it(a.borderDashOffset,u.borderDashOffset),i.lineJoin=a.borderJoinStyle||u.borderJoinStyle,i.lineWidth=it(a.borderWidth,u.borderWidth),i.strokeStyle=a.borderColor||l.defaultColor,i.beginPath(),(n=s[0]._view).skip||(i.moveTo(n.x,n.y),c=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===c?V.previousItem(s,t):s[c],n.skip||(c!==t-1&&!o||-1===c?i.moveTo(n.x,n.y):V.canvas.lineTo(i,e._view,n),c=t);d&&i.closePath(),i.stroke(),i.restore()}}}),lt=V.valueOrDefault,ut=j.global.defaultColor;function ct(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}j._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ut,borderColor:ut,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var dt=G.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:ct,inXRange:ct,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,a=e.rotation,i=e.radius,o=e.x,s=e.y,l=j.global,u=l.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=lt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,V.canvas.drawPoint(n,r,i,o,s,a))}}),ht=j.global.defaultColor;function ft(t){return t&&void 0!==t.width}function gt(t){var e,n,r,a,i;return ft(t)?(e=t.x-(i=t.width/2),n=t.x+i,r=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(i=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),r=t.y-i,a=t.y+i),{left:e,top:r,right:n,bottom:a}}function pt(t,e,n){return t===e?n:t===n?e:t}function vt(t,e,n){var r=null===e,a=null===n,i=!(!t||r&&a)&>(t);return i&&(r||e>=i.left&&e<=i.right)&&(a||n>=i.top&&n<=i.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:ht,borderColor:ht,borderSkipped:"bottom",borderWidth:0}}});var mt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=gt(t),n=e.right-e.left,r=e.bottom-e.top,a=function(t,e,n){var r,a,i,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e&&(t.horizontal?t.base>t.x&&(e=pt(e,"left","right")):t.base<t.y&&(e=pt(e,"bottom","top")),n[e]=!0),n}(t);return V.isObject(s)?(r=+s.top||0,a=+s.right||0,i=+s.bottom||0,o=+s.left||0):r=a=i=o=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||a<0?0:a>e?e:a,b:l.bottom||i<0?0:i>n?n:i,l:l.left||o<0?0:o>e?e:o}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b}}}(e),r=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),(r.w!==a.w||r.h!==a.h)&&(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return vt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return ft(n)?vt(n,t,null):vt(n,null,e)},inXRange:function(t){return vt(this._view,t,null)},inYRange:function(t){return vt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return ft(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 ft(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}}}),bt={},yt=st,xt=dt,_t=mt;bt.Arc=at,bt.Line=yt,bt.Point=xt,bt.Rectangle=_t;var kt=V._deprecated,wt=V.valueOrDefault;j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Mt=et.extend({dataElementType:bt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;et.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,kt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),kt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),kt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),kt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),kt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,r=this,a=r.getMeta().data;for(r._ruler=r.getRuler(),e=0,n=a.length;e<n;++e)r.updateElement(a[e],e,t)},updateElement:function(t,e,n){var r=this,a=r.getMeta(),i=r.getDataset(),o=r._resolveDataElementOptions(t,e);t._xScale=r.getScaleForId(a.xAxisID),t._yScale=r.getScaleForId(a.yAxisID),t._datasetIndex=r.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:i.label,label:r.chart.data.labels[e]},V.isArray(i.data[e])&&(t._model.borderSkipped=null),r._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,r){var a=this,i=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),c=a.calculateBarValuePixels(a.index,e,r),d=a.calculateBarIndexPixels(a.index,e,u,r);i.horizontal=l,i.base=n?s:c.base,i.x=l?n?s:c.head:d.center,i.y=l?d.center:n?s:c.head,i.height=l?d.size:void 0,i.width=l?void 0:d.size},_getStacks:function(t){var e,n,r=this._getIndexScale(),a=r._getMatchingVisibleMetas(this._type),i=r.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===i||-1===s.indexOf(n.stack)||void 0===i&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},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 t,e,n=this,r=n._getIndexScale(),a=[];for(t=0,e=n.getMeta().data.length;t<e;++t)a.push(r.getPixelForValue(null,t,n.index));return{pixels:a,start:r._startPixel,end:r._endPixel,stackCount:n.getStackCount(),scale:r}},calculateBarValuePixels:function(t,e,n){var r,a,i,o,s,l,u,c=this,d=c.chart,h=c._getValueScale(),f=h.isHorizontal(),g=d.data.datasets,p=h._getMatchingVisibleMetas(c._type),v=h._parseValue(g[t].data[e]),m=n.minBarLength,b=h.options.stacked,y=c.getMeta().stack,x=void 0===v.start?0:v.max>=0&&v.min>=0?v.min:v.max,_=void 0===v.start?v.end:v.max>=0&&v.min>=0?v.max-v.min:v.min-v.max,k=p.length;if(b||void 0===b&&void 0!==y)for(r=0;r<k&&(a=p[r]).index!==t;++r)a.stack===y&&(i=void 0===(u=h._parseValue(g[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(v.min<0&&i<0||v.max>=0&&i>0)&&(x+=i));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+_))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=_>=0&&!f||_<0&&f?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,r){var a="flex"===r.barThickness?function(t,e,n){var r,a=e.pixels,i=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=i-(null===s?e.end-e.start:s-i)),null===s&&(s=i+i-o),r=i-(i-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:r}}(e,n,r):function(t,e,n){var r,a,i=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(i)?function(t,e){var n,r,a,i,o=t._length;for(a=1,i=e.length;a<i;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,i=t.getTicks().length;a<i;++a)r=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(r-n)):o,n=r;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(i)?(r=l*n.categoryPercentage,a=n.barPercentage):(r=i*o,a=1),{chunk:r/o,ratio:a,start:s-r/2}}(e,n,r),i=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*i+a.chunk/2,s=Math.min(wt(r.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),r=t.getMeta().data,a=t.getDataset(),i=r.length,o=0;for(V.canvas.clipArea(e.ctx,e.chartArea);o<i;++o){var s=n._parseValue(a.data[o]);!isNaN(s.min)&&!isNaN(s.max)&&r[o].draw()}V.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},et.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,r=t._getValueScale().options;return e.barPercentage=wt(n.barPercentage,e.barPercentage),e.barThickness=wt(n.barThickness,e.barThickness),e.categoryPercentage=wt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=wt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=wt(r.minBarLength,e.minBarLength),e}}),Ct=V.valueOrDefault,St=V.options.resolve;j._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,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var At=et.extend({dataElementType:bt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta();V.each(n.data,function(n,r){e.updateElement(n,r,t)})},updateElement:function(t,e,n){var r=this,a=r.getMeta(),i=t.custom||{},o=r.getScaleForId(a.xAxisID),s=r.getScaleForId(a.yAxisID),l=r._resolveDataElementOptions(t,e),u=r.getDataset().data[e],c=r.index,d=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,c),h=n?s.getBasePixel():s.getPixelForValue(u,e,c);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=c,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:i.skip||isNaN(d)||isNaN(h),x:d,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,r=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ct(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Ct(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Ct(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,r=n.chart,a=n.getDataset(),i=t.custom||{},o=a.data[e]||{},s=et.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=V.extend({},s)),s.radius=St([i.radius,o.r,n._config.radius,r.options.elements.point.radius],l,e),s}}),Pt=V.valueOrDefault,Dt=Math.PI,Ot=2*Dt,Tt=Dt/2;j._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,r,a=document.createElement("ul"),i=t.data,o=i.datasets,s=i.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&r.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,r){var a=t.getDatasetMeta(0),i=a.controller.getStyle(r);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[r])||a.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var n,r,a,i=e.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(a=o.getDatasetMeta(n)).data[i]&&(a.data[i].hidden=!a.data[i].hidden);o.update()}},cutoutPercentage:50,rotation:-Tt,circumference:Ot,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],r=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var It=et.extend({dataElementType:bt.Arc,linkScales:V.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,r=this,a=r.chart,i=a.chartArea,o=a.options,s=1,l=1,u=0,c=0,d=r.getMeta(),h=d.data,f=o.cutoutPercentage/100||0,g=o.circumference,p=r._getRingWeight(r.index);if(g<Ot){var v=o.rotation%Ot,m=(v+=v>=Dt?-Ot:v<-Dt?Ot:0)+g,b=Math.cos(v),y=Math.sin(v),x=Math.cos(m),_=Math.sin(m),k=v<=0&&m>=0||m>=Ot,w=v<=Tt&&m>=Tt||m>=Ot+Tt,M=v<=-Tt&&m>=-Tt||m>=Dt+Tt,C=v===-Dt||m>=Dt?-1:Math.min(b,b*f,x,x*f),S=M?-1:Math.min(y,y*f,_,_*f),A=k?1:Math.max(b,b*f,x,x*f),P=w?1:Math.max(y,y*f,_,_*f);s=(A-C)/2,l=(P-S)/2,u=-(A+C)/2,c=-(P+S)/2}for(e=0,n=h.length;e<n;++e)h[e]._options=r._resolveDataElementOptions(h[e],e);for(a.borderWidth=r.getMaxBorderWidth(),a.outerRadius=Math.max(Math.min((i.right-i.left-a.borderWidth)/s,(i.bottom-i.top-a.borderWidth)/l)/2,0),a.innerRadius=Math.max(a.outerRadius*f,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),a.offsetX=u*a.outerRadius,a.offsetY=c*a.outerRadius,d.total=r.calculateTotal(),r.outerRadius=a.outerRadius-a.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-a.radiusLength*p,0),e=0,n=h.length;e<n;++e)r.updateElement(h[e],e,t)},updateElement:function(t,e,n){var r=this,a=r.chart,i=a.chartArea,o=a.options,s=o.animation,l=(i.left+i.right)/2,u=(i.top+i.bottom)/2,c=o.rotation,d=o.rotation,h=r.getDataset(),f=n&&s.animateRotate||t.hidden?0:r.calculateCircumference(h.data[e])*(o.circumference/Ot),g=t._options||{};V.extend(t,{_datasetIndex:r.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:c,endAngle:d,circumference:f,outerRadius:n&&s.animateScale?0:r.outerRadius,innerRadius:n&&s.animateScale?0:r.innerRadius,label:V.valueAtIndexOrDefault(h.label,e,a.data.labels[e])}});var p=t._model;(!n||!s.animateRotate)&&(p.startAngle=0===e?o.rotation:r.getMeta().data[e-1]._model.endAngle,p.endAngle=p.startAngle+p.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),r=0;return V.each(n.data,function(n,a){t=e.data[a],!isNaN(t)&&!n.hidden&&(r+=Math.abs(t))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Ot*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,r,a,i,o,s,l,u=0,c=this.chart;if(!t)for(e=0,n=c.data.datasets.length;e<n;++e)if(c.isDatasetVisible(e)){t=(r=c.getDatasetMeta(e)).data,e!==this.index&&(i=r.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],i?(i._configure(),o=i._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(u=(l=o.hoverBorderWidth)>(u=(s=o.borderWidth)>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,r=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Pt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Pt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Pt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Pt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});j._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"}}),j._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ft=Mt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Lt=V.valueOrDefault,Rt=V.options.resolve,Bt=V.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},r=n.reverse,a=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:r?i:a,end:r?a:i}}function zt(t,e,n){var r=n/2,a=jt(t,r),i=jt(e,r);return{top:i.end,right:a.end,bottom:i.start,left:a.start}}function Et(t){var e,n,r,a;return V.isObject(t)?(e=t.top,n=t.right,r=t.bottom,a=t.left):e=n=r=a=t,{top:e,right:n,bottom:r,left:a}}j._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 Nt=et.extend({datasetElementType:bt.Line,dataElementType:bt.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 e,n,r=this,a=r.getMeta(),i=a.dataset,o=a.data||[],s=r._config,l=r._showLine=Lt(s.showLine,r.chart.options.showLines);for(r._xScale=r.getScaleForId(a.xAxisID),r._yScale=r.getScaleForId(a.yAxisID),l&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=r._yScale,i._datasetIndex=r.index,i._children=o,i._model=r._resolveDatasetElementOptions(i),i.pivot()),e=0,n=o.length;e<n;++e)r.updateElement(o[e],e,t);for(l&&0!==i._model.tension&&r.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var r,a,i=this,o=i.getMeta(),s=t.custom||{},l=i.getDataset(),u=i.index,c=l.data[e],d=i._xScale,h=i._yScale,f=o.dataset._model,g=i._resolveDataElementOptions(t,e);r=d.getPixelForValue("object"==typeof c?c:NaN,e,u),a=n?h.getBasePixel():i.calculatePointY(c,e,u),t._xScale=d,t._yScale=h,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:r,y:a,skip:s.skip||isNaN(r)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Lt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,r=t.custom||{},a=e.chart.options,i=a.elements.line,o=et.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Lt(n.spanGaps,a.spanGaps),o.tension=Lt(n.lineTension,i.tension),o.steppedLine=Rt([r.steppedLine,n.steppedLine,i.stepped]),o.clip=Et(Lt(n.clip,zt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var r,a,i,o,s,l,u=this.chart,c=this._yScale,d=0,h=0;if(c.options.stacked){for(o=+c.getRightValue(t),l=(s=u._getSortedVisibleDatasetMetas()).length,r=0;r<l&&(a=s[r]).index!==n;++r)"line"===a.type&&a.yAxisID===c.id&&((i=+c.getRightValue(u.data.datasets[a.index].data[e]))<0?h+=i||0:d+=i||0);return c.getPixelForValue(o<0?h+o:d+o)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,r,a=this.chart,i=this.getMeta(),o=i.dataset._model,s=a.chartArea,l=i.data||[];function u(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)V.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,r=V.splineCurve(V.previousItem(l,t)._model,n,V.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Bt(n=l[t]._model,s)&&(t>0&&Bt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Bt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,n=e.chart,r=e.getMeta(),a=r.data||[],i=n.chartArea,o=n.canvas,s=0,l=a.length;for(e._showLine&&(V.canvas.clipArea(n.ctx,{left:!1===(t=r.dataset._model.clip).left?0:i.left-t.left,right:!1===t.right?o.width:i.right+t.right,top:!1===t.top?0:i.top-t.top,bottom:!1===t.bottom?o.height:i.bottom+t.bottom}),r.dataset.draw(),V.canvas.unclipArea(n.ctx));s<l;++s)a[s].draw(i)},setHoverStyle:function(t){var e=t._model,n=t._options,r=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Lt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth),e.radius=Lt(n.hoverRadius,n.radius)}}),Wt=V.options.resolve;j._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 e,n,r,a=document.createElement("ul"),i=t.data,o=i.datasets,s=i.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&r.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,r){var a=t.getDatasetMeta(0),i=a.controller.getStyle(r);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[r])||a.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var n,r,a,i=e.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(a=o.getDatasetMeta(n)).data[i].hidden=!a.data[i].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Vt=et.extend({dataElementType:bt.Arc,linkScales:V.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 e,n,r,a=this,i=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],c=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=i.data.length;e<n;e++)l[e]=s,r=a._computeAngle(e),u[e]=r,s+=r;for(e=0,n=c.length;e<n;++e)c[e]._options=a._resolveDataElementOptions(c[e],e),a.updateElement(c[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,r=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/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,a=r.chart,i=r.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,c=l.xCenter,d=l.yCenter,h=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(i.data[e]),g=r._starts[e],p=g+(t.hidden?0:r._angles[e]),v=s.animateScale?0:l.getDistanceFromCenterForValue(i.data[e]),m=t._options||{};V.extend(t,{_datasetIndex:r.index,_index:e,_scale:l,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:c,y:d,innerRadius:0,outerRadius:n?v:f,startAngle:n&&s.animateRotate?h:g,endAngle:n&&s.animateRotate?h:p,label:V.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,function(e,r){!isNaN(t.data[r])&&!e.hidden&&n++}),n},setHoverStyle:function(t){var e=t._model,n=t._options,r=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,r=e.getDataset(),a=e.getMeta();return isNaN(r.data[t])||a.data[t].hidden?0:Wt([e.chart.options.elements.arc.angle,2*Math.PI/n],{chart:e.chart,dataIndex:t,dataset:r,datasetIndex:e.index},t)}});j._set("pie",V.clone(j.doughnut)),j._set("pie",{cutoutPercentage:0});var Ht=It,Ut=V.valueOrDefault;j._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var qt=et.extend({datasetElementType:bt.Line,dataElementType:bt.Point,linkScales:V.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 e,n,r=this,a=r.getMeta(),i=a.dataset,o=a.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),i._scale=s,i._datasetIndex=r.index,i._children=o,i._loop=!0,i._model=r._resolveDatasetElementOptions(i),i.pivot(),e=0,n=o.length;e<n;++e)r.updateElement(o[e],e,t);for(r.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var r=this,a=t.custom||{},i=r.getDataset(),o=r.chart.scale,s=o.getPointPositionForValue(e,i.data[e]),l=r._resolveDataElementOptions(t,e),u=r.getMeta().dataset._model,c=n?o.xCenter:s.x,d=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=r.index,t._index=e,t._model={x:c,y:d,skip:a.skip||isNaN(c)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Ut(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,r=et.prototype._resolveDatasetElementOptions.apply(t,arguments);return r.spanGaps=Ut(e.spanGaps,n.spanGaps),r.tension=Ut(e.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var t,e,n,r,a=this.getMeta(),i=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;++t)n=o[t]._model,r=V.splineCurve(V.previousItem(o,t,!0)._model,n,V.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,i.left,i.right),n.controlPointPreviousY=s(r.previous.y,i.top,i.bottom),n.controlPointNextX=s(r.next.x,i.left,i.right),n.controlPointNextY=s(r.next.y,i.top,i.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,r=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ut(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Ut(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Ut(n.hoverBorderWidth,n.borderWidth),e.radius=Ut(n.hoverRadius,n.radius)}});j._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+")"}}}}),j._set("global",{datasets:{scatter:{showLine:!1}}});var Yt={bar:Mt,bubble:At,doughnut:It,horizontalBar:Ft,line:Nt,polarArea:Vt,pie:Ht,radar:qt,scatter:Nt};function Gt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function Xt(t,e){var n,r,a,i,o,s,l=t._getSortedVisibleDatasetMetas();for(r=0,i=l.length;r<i;++r)for(a=0,o=(n=l[r].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function $t(t,e){var n=[];return Xt(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function Kt(t,e,n,r){var a=Number.POSITIVE_INFINITY,i=[];return Xt(t,function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=r(e,o);s<a?(i=[t],a=s):s===a&&i.push(t)}}),i}function Jt(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){var a=e?Math.abs(t.x-r.x):0,i=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(i,2))}}function Zt(t,e,n){var r=Gt(e,t);n.axis=n.axis||"x";var a=Jt(n.axis),i=n.intersect?$t(t,r):Kt(t,r,!1,a),o=[];return i.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[i[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var Qt={modes:{single:function(t,e){var n=Gt(e,t),r=[];return Xt(t,function(t){if(t.inRange(n.x,n.y))return r.push(t),r}),r.slice(0,1)},label:Zt,index:Zt,dataset:function(t,e,n){var r=Gt(e,t);n.axis=n.axis||"xy";var a=Jt(n.axis),i=n.intersect?$t(t,r):Kt(t,r,!1,a);return i.length>0&&(i=t.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(t,e){return Zt(t,e,{intersect:!1})},point:function(t,e){return $t(t,Gt(e,t))},nearest:function(t,e,n){var r=Gt(e,t);n.axis=n.axis||"xy";var a=Jt(n.axis);return Kt(t,r,n.intersect,a)},x:function(t,e,n){var r=Gt(e,t),a=[],i=!1;return Xt(t,function(t){t.inXRange(r.x)&&a.push(t),t.inRange(r.x,r.y)&&(i=!0)}),n.intersect&&!i&&(a=[]),a},y:function(t,e,n){var r=Gt(e,t),a=[],i=!1;return Xt(t,function(t){t.inYRange(r.y)&&a.push(t),t.inRange(r.x,r.y)&&(i=!0)}),n.intersect&&!i&&(a=[]),a}}},te=V.extend;function ee(t,e){return V.where(t,function(t){return t.pos===e})}function ne(t,e){return t.sort(function(t,n){var r=e?n:t,a=e?t:n;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function re(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function ae(t,e,n){var r,a,i=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?i.height:i.width,t[n.pos]+=n.size,i.getPadding){var s=i.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(r=e.outerWidth-re(o,t,"left","right"),a=e.outerHeight-re(o,t,"top","bottom"),r!==t.w||a!==t.h){t.w=r,t.h=a;var l=n.horizontal?[r,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ie(t,e){var n,r=e.maxPadding;return n={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach(function(t){n[t]=Math.max(e[t],r[t])}),n}function oe(t,e,n){var r,a,i,o,s,l,u=[];for(r=0,a=t.length;r<a;++r)(o=(i=t[r]).box).update(i.width||e.w,i.height||e.h,ie(i.horizontal,e)),ae(e,n,i)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(i);return s&&oe(u,e,n)||l}function se(t,e,n){var r,a,i,o,s=n.padding,l=e.x,u=e.y;for(r=0,a=t.length;r<a;++r)o=(i=t[r]).box,i.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}j._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var le={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,a=["fullWidth","position","weight"],i=a.length,o=0;o<i;++o)n.hasOwnProperty(r=a[o])&&(e[r]=n[r])},update:function(t,e,n){if(t){var r=V.options.toPadding((t.options.layout||{}).padding),a=e-r.width,i=n-r.height,o=function(t){var e=function(t){var e,n,r,a=[];for(e=0,n=(t||[]).length;e<n;++e)a.push({index:e,box:r=t[e],pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return a}(t),n=ne(ee(e,"left"),!0),r=ne(ee(e,"right")),a=ne(ee(e,"top"),!0),i=ne(ee(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:r.concat(i),chartArea:ee(e,"chartArea"),vertical:n.concat(r),horizontal:a.concat(i)}}(t.boxes),s=o.vertical,l=o.horizontal,u=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,vBoxMaxWidth:a/2/s.length,hBoxMaxHeight:i/2}),c=te({maxPadding:te({},r),w:a,h:i,x:r.left,y:r.top},r);(function(t,e){var n,r,a;for(n=0,r=t.length;n<r;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight})(s.concat(l),u),oe(s,c,u),oe(l,c,u)&&oe(s,c,u),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")}(c),se(o.leftAndTop,c,u),c.x+=c.w,c.y+=c.h,se(o.rightAndBottom,c,u),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},V.each(o.chartArea,function(e){var n=e.box;te(n,t.chartArea),n.update(c.w,c.h)})}}},ue=function(t){return t&&t.default||t}(Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"})),ce="$chartjs",de="chartjs-",he=de+"size-monitor",fe=de+"render-monitor",ge=["animationstart","webkitAnimationStart"],pe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ve(t,e){var n=V.getStyle(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function be(t,e,n){t.addEventListener(e,n,me)}function ye(t,e,n){t.removeEventListener(e,n,me)}function xe(t,e,n,r,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function _e(t){var e=document.createElement("div");return e.className=t||"",e}var ke={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[ce]||(t[ce]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(e)),t.appendChild(r)}}(e.host?e:document.head,ue)}},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(t,e){var n=t.style,r=t.getAttribute("height"),a=t.getAttribute("width");if(t[ce]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var i=ve(t,"width");void 0!==i&&(t.width=i)}if(null===r||""===r)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ve(t,"height");void 0!==i&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[ce]){var n=e[ce].initial;["height","width"].forEach(function(t){var r=n[t];V.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)}),V.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[ce]}},addEventListener:function(t,e,n){var r=t.canvas;if("resize"!==e){var a=n[ce]||(n[ce]={});be(r,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=pe[t.type]||t.type,r=V.getRelativePosition(t,e);return xe(n,e,r.x,r.y,t)}(e,t))})}else!function(t,e,n){var r=t[ce]||(t[ce]={}),a=r.resizer=function(t){var e=1e6,n=_e(he),r=_e(he+"-expand"),a=_e(he+"-shrink");r.appendChild(_e()),a.appendChild(_e()),n.appendChild(r),n.appendChild(a),n._reset=function(){r.scrollLeft=e,r.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var i=function(){n._reset(),t()};return be(r,"scroll",i.bind(r,"expand")),be(a,"scroll",i.bind(a,"shrink")),n}(function(t,e){var n=!1,r=[];return function(){r=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,V.requestAnimFrame.call(window,function(){n=!1,t.apply(e,r)}))}}(function(){if(r.resizer){var a=n.options.maintainAspectRatio&&t.parentNode,i=a?a.clientWidth:0;e(xe("resize",n)),a&&a.clientWidth<i&&n.canvas&&e(xe("resize",n))}}));!function(t,e){var n=t[ce]||(t[ce]={}),r=n.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};V.each(ge,function(e){be(t,e,r)}),n.reflow=!!t.offsetParent,t.classList.add(fe)}(t,function(){if(r.resizer){var e=t.parentNode;e&&e!==a.parentNode&&e.insertBefore(a,e.firstChild),a._reset()}})}(r,n,t)},removeEventListener:function(t,e,n){var r=t.canvas;if("resize"!==e){var a=((n[ce]||{}).proxies||{})[t.id+"_"+e];!a||ye(r,e,a)}else!function(t){var e=t[ce]||{},n=e.resizer;delete e.resizer,function(t){var e=t[ce]||{},n=e.renderProxy;n&&(V.each(ge,function(e){ye(t,e,n)}),delete e.renderProxy),t.classList.remove(fe)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}(r)}};V.addEvent=be,V.removeEvent=ye;var we=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},ke._enabled?ke:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});j._set("global",{plugins:{}});var Me={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,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 r,a,i,o,s,l=this.descriptors(t),u=l.length;for(r=0;r<u;++r)if("function"==typeof(s=(i=(a=l[r]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(i,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],r=[],a=t&&t.config||{},i=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,a=i[e];!1!==a&&(!0===a&&(a=V.clone(j.global.plugins[e])),n.push(t),r.push({plugin:t,options:a||{}}))}}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},Ce={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=V.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?V.merge(Object.create(null),[j.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=V.extend(n.defaults[t],e))},addScalesToLayout:function(t){V.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,le.addBox(t,e)})}},Se=V.valueOrDefault,Ae=V.rtl.getRtlAdapter;j._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:V.noop,title:function(t,e){var n="",r=e.labels,a=r?r.length:0;if(t.length>0){var i=t[0];i.label?n=i.label:i.xLabel?n=i.xLabel:a>0&&i.index<a&&(n=r[i.index])}return n},afterTitle:V.noop,beforeBody:V.noop,beforeLabel:V.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),V.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:V.noop,afterBody:V.noop,beforeFooter:V.noop,footer:V.noop,afterFooter:V.noop}}});var Pe={average:function(t){if(!t.length)return!1;var e,n,r=0,a=0,i=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();r+=s.x,a+=s.y,++i}}return{x:r/i,y:a/i}},nearest:function(t,e){var n,r,a,i=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),c=V.distanceBetweenPoints(e,u);c<s&&(s=c,a=l)}}if(a){var d=a.tooltipPosition();i=d.x,o=d.y}return{x:i,y:o}}};function De(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Oe(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Te(t){var e=t._xScale,n=t._yScale||t._scale,r=t._index,a=t._datasetIndex,i=t._chart.getDatasetMeta(a).controller,o=i._getIndexScale(),s=i._getValueScale();return{xLabel:e?e.getLabelForIndex(r,a):"",yLabel:n?n.getLabelForIndex(r,a):"",label:o?""+o.getLabelForIndex(r,a):"",value:s?""+s.getLabelForIndex(r,a):"",index:r,datasetIndex:a,x:t._model.x,y:t._model.y}}function Ie(t){var e=j.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Se(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Se(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Se(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Se(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Se(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Se(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Se(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Se(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Se(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 Fe(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Le(t){return De([],Oe(t))}var Re=G.extend({initialize:function(){this._model=Ie(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),r=e.title.apply(t,arguments),a=e.afterTitle.apply(t,arguments),i=[];return i=De(i,Oe(n)),i=De(i,Oe(r)),De(i,Oe(a))},getBeforeBody:function(){return Le(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,r=n._options.callbacks,a=[];return V.each(t,function(t){var i={before:[],lines:[],after:[]};De(i.before,Oe(r.beforeLabel.call(n,t,e))),De(i.lines,r.label.call(n,t,e)),De(i.after,Oe(r.afterLabel.call(n,t,e))),a.push(i)}),a},getAfterBody:function(){return Le(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),i=[];return i=De(i,Oe(n)),i=De(i,Oe(r)),De(i,Oe(a))},update:function(t){var e,n,r=this,a=r._options,i=r._model,o=r._model=Ie(a),s=r._active,l=r._data,u={xAlign:i.xAlign,yAlign:i.yAlign},c={x:i.x,y:i.y},d={width:i.width,height:i.height},h={x:i.caretX,y:i.caretY};if(s.length){o.opacity=1;var f=[],g=[];h=Pe[a.position].call(r,s,r._eventPosition);var p=[];for(e=0,n=s.length;e<n;++e)p.push(Te(s[e]));a.filter&&(p=p.filter(function(t){return a.filter(t,l)})),a.itemSort&&(p=p.sort(function(t,e){return a.itemSort(t,e,l)})),V.each(p,function(t){f.push(a.callbacks.labelColor.call(r,t,r._chart)),g.push(a.callbacks.labelTextColor.call(r,t,r._chart))}),o.title=r.getTitle(p,l),o.beforeBody=r.getBeforeBody(p,l),o.body=r.getBody(p,l),o.afterBody=r.getAfterBody(p,l),o.footer=r.getFooter(p,l),o.x=h.x,o.y=h.y,o.caretPadding=a.caretPadding,o.labelColors=f,o.labelTextColors=g,o.dataPoints=p,c=function(t,e,n,r){var a=t.x,i=t.y,o=t.caretPadding,s=n.xAlign,l=n.yAlign,u=t.caretSize+o,c=t.cornerRadius+o;return"right"===s?a-=e.width:"center"===s&&((a-=e.width/2)+e.width>r.width&&(a=r.width-e.width),a<0&&(a=0)),"top"===l?i+=u:i-="bottom"===l?e.height+u:e.height/2,"center"===l?"left"===s?a+=u:"right"===s&&(a-=u):"left"===s?a-=c:"right"===s&&(a+=c),{x:a,y:i}}(o,d=function(t,e){var n=t._chart.ctx,r=2*e.yPadding,a=0,i=e.body,o=i.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0),s=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,d=e.footerFontSize;r+=s*u,r+=s?(s-1)*e.titleSpacing:0,r+=s?e.titleMarginBottom:0,r+=(o+=e.beforeBody.length+e.afterBody.length)*c,r+=o?(o-1)*e.bodySpacing:0,r+=l?e.footerMarginTop:0,r+=l*d,r+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,n.measureText(t).width+h)};return n.font=V.fontString(u,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(c,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?c+2:0,V.each(i,function(t){V.each(t.before,f),V.each(t.lines,f),V.each(t.after,f)}),h=0,n.font=V.fontString(d,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:r}}(this,o),u=function(t,e){var n=t._model,r=t._chart,a=t._chart.chartArea,i="center",o="center";n.y<e.height?o="top":n.y>r.height-e.height&&(o="bottom");var s,l,u,c,d,h=(a.left+a.right)/2,f=(a.top+a.bottom)/2;"center"===o?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=r.width-e.width/2}),u=function(t){return t+e.width+n.caretSize+n.caretPadding>r.width},c=function(t){return t-e.width-n.caretSize-n.caretPadding<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",o=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",o=d(n.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:i,yAlign:g.yAlign?g.yAlign:o}}(this,d),r._chart)}else o.opacity=0;return o.xAlign=u.xAlign,o.yAlign=u.yAlign,o.x=c.x,o.y=c.y,o.width=d.width,o.height=d.height,o.caretX=h.x,o.caretY=h.y,r._model=o,t&&a.custom&&a.custom.call(r,o),r},drawCaret:function(t,e){var n=this._chart.ctx,r=this.getCaretPosition(t,e,this._view);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var r,a,i,o,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,v=e.height;if("center"===h)s=g+v/2,"left"===d?(a=(r=f)-u,i=r,o=s+u,l=s-u):(a=(r=f+p)+u,i=r,o=s-u,l=s+u);else if("left"===d?(r=(a=f+c+u)-u,i=a+u):"right"===d?(r=(a=f+p-c-u)-u,i=a+u):(r=(a=n.caretX)-u,i=a+u),"top"===h)s=(o=g)-u,l=o;else{s=(o=g+v)+u,l=o;var m=i;i=r,r=m}return{x1:r,x2:a,x3:i,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var r,a,i,o=e.title,s=o.length;if(s){var l=Ae(e.rtl,e.x,e.width);for(t.x=Fe(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",r=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(r,e._titleFontStyle,e._titleFontFamily),i=0;i<s;++i)n.fillText(o[i],l.x(t.x),t.y+r/2),t.y+=r+a,i+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var r,a,i,o,s,l,u,c,d=e.bodyFontSize,h=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,v=0,m=p?Fe(e,"left"):0,b=Ae(e.rtl,e.x,e.width),y=function(e){n.fillText(e,b.x(t.x+v),t.y+d/2),t.y+=d+h},x=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(d,e._bodyFontStyle,e._bodyFontFamily),t.x=Fe(e,x),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,y),v=p&&"right"!==x?"center"===f?d/2+1:d+2:0,s=0,u=g.length;s<u;++s){for(r=g[s],i=e.labelColors[s],n.fillStyle=a=e.labelTextColors[s],V.each(r.before,y),l=0,c=(o=r.lines).length;l<c;++l){if(p){var _=b.x(m);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,d),t.y,d,d),n.lineWidth=1,n.strokeStyle=i.borderColor,n.strokeRect(b.leftForLtr(_,d),t.y,d,d),n.fillStyle=i.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),d-2),t.y+1,d-2,d-2),n.fillStyle=a}y(o[l])}V.each(r.after,y)}v=0,V.each(e.afterBody,y),t.y-=h},drawFooter:function(t,e,n){var r,a,i=e.footer,o=i.length;if(o){var s=Ae(e.rtl,e.x,e.width);for(t.x=Fe(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",r=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(r,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(i[a],s.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 a=e.xAlign,i=e.yAlign,o=t.x,s=t.y,l=r.width,u=r.height,c=e.cornerRadius;n.beginPath(),n.moveTo(o+c,s),"top"===i&&this.drawCaret(t,r),n.lineTo(o+l-c,s),n.quadraticCurveTo(o+l,s,o+l,s+c),"center"===i&&"right"===a&&this.drawCaret(t,r),n.lineTo(o+l,s+u-c),n.quadraticCurveTo(o+l,s+u,o+l-c,s+u),"bottom"===i&&this.drawCaret(t,r),n.lineTo(o+c,s+u),n.quadraticCurveTo(o,s+u,o,s+u-c),"center"===i&&"left"===a&&this.drawCaret(t,r),n.lineTo(o,s+c),n.quadraticCurveTo(o,s,o+c,s),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},a=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=a,this.drawBackground(r,e,t,n),r.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),V.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=!V.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}});Re.positioners=Pe;var Be=V.valueOrDefault;function je(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){if("xAxes"===t||"yAxes"===t){var a,i,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)i=Be((o=n[t][a]).type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),V.merge(e[t][a],!e[t][a].type||o.type&&o.type!==e[t][a].type?[Ce.getScaleDefaults(i),o]:o)}else V._merger(t,e,n,r)}})}function ze(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){var a=e[t]||Object.create(null),i=n[t];"scales"===t?e[t]=je(a,i):"scale"===t?e[t]=V.merge(a,[Ce.getScaleDefaults(i.type),i]):V._merger(t,e,n,r)}})}function Ee(t){var e=t.options;V.each(t.scales,function(e){le.removeBox(t,e)}),e=ze(j.global,j[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ne(t,e,n){var r,a=function(t){return t.id===r};do{r=e+n++}while(V.findIndex(t,a)>=0);return r}function We(t){return"top"===t||"bottom"===t}function Ve(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}j._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 He=function(t,e){return this.construct(t,e),this};V.extend(He.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=ze(j.global,j[t.type],t.options||{}),t}(e);var r=we.acquireContext(t,e),a=r&&r.canvas,i=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=r,n.canvas=a,n.config=e,n.width=o,n.height=i,n.aspectRatio=i?o/i:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,He.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Me.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Me.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return K.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,r=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,i=Math.max(0,Math.floor(V.getMaximumWidth(r))),o=Math.max(0,Math.floor(a?i/a:V.getMaximumHeight(r)));if((e.width!==i||e.height!==o)&&(r.width=e.width=i,r.height=e.height=o,r.style.width=i+"px",r.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:i,height:o};Me.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,function(t,n){t.id||(t.id=Ne(e.xAxes,"x-axis-",n))}),V.each(e.yAxes,function(t,n){t.id||(t.id=Ne(e.yAxes,"y-axis-",n))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],a=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"}),V.each(r,function(e){var r=e.options,i=r.id,o=Be(r.type,e.dtype);We(r.position)!==We(e.dposition)&&(r.position=e.dposition),a[i]=!0;var s=null;if(i in n&&n[i].type===o)(s=n[i]).options=r,s.ctx=t.ctx,s.chart=t;else{var l=Ce.getScaleConstructor(o);if(!l)return;s=new l({id:i,type:o,options:r,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),V.each(a,function(t,e){t||delete n[e]}),t.scales=n,Ce.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,r=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var i=a[t],o=n.getDatasetMeta(t),s=i.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=i.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Yt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),r.push(o.controller)}}return r},resetElements:function(){var t=this;V.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,r=this;if((!t||"object"!=typeof t)&&(t={duration:t,lazy:arguments[1]}),Ee(r),Me._invalidate(r),!1!==Me.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var a=r.buildOrUpdateControllers();for(e=0,n=r.data.datasets.length;e<n;e++)r.getDatasetMeta(e).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&V.each(a,function(t){t.reset()}),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Me.notify(r,"afterUpdate"),r._layers.sort(Ve("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var t=this;!1!==Me.notify(t,"beforeLayout")&&(le.update(this,this.width,this.height),t._layers=[],V.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}),Me.notify(t,"afterScaleUpdate"),Me.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==Me.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);Me.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),r={meta:n,index:t};!1!==Me.notify(e,"beforeDatasetUpdate",[r])&&(n.controller._update(),Me.notify(e,"afterDatasetUpdate",[r]))},render:function(t){var e=this;(!t||"object"!=typeof t)&&(t={duration:t,lazy:arguments[1]});var n=e.options.animation,r=Be(t.duration,n&&n.duration),a=t.lazy;if(!1!==Me.notify(e,"beforeRender")){var i=function(t){Me.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&r){var o=new $({numSteps:r/16.66,easing:t.easing||n.easing,render:function(t,e){var n=e.currentStep,r=n/e.numSteps;t.draw((0,V.easing.effects[e.easing])(r),r,n)},onAnimationProgress:n.onProgress,onAnimationComplete:i});K.addAnimation(e,o,r,a)}else e.draw(),i(new $({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,r=this;if(r.clear(),V.isNullOrUndef(t)&&(t=1),r.transition(t),!(r.width<=0||r.height<=0)&&!1!==Me.notify(r,"beforeDraw",[t])){for(n=r._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(r.chartArea);for(r.drawDatasets(t);e<n.length;++e)n[e].draw(r.chartArea);r._drawTooltip(t),Me.notify(r,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,r=(e.data.datasets||[]).length;n<r;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,r=this,a=[];for(e=0,n=(r.data.datasets||[]).length;e<n;++e)(!t||r.isDatasetVisible(e))&&a.push(r.getDatasetMeta(e));return a.sort(Ve("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,r=this;if(!1!==Me.notify(r,"beforeDatasetsDraw",[t])){for(n=(e=r._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)r.drawDataset(e[n],t);Me.notify(r,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Me.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Me.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,r={tooltip:n,easingValue:t};!1!==Me.notify(e,"beforeTooltipDraw",[r])&&(n.draw(),Me.notify(e,"afterTooltipDraw",[r]))},getElementAtEvent:function(t){return Qt.modes.single(this,t)},getElementsAtEvent:function(t){return Qt.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Qt.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=Qt.modes[e];return"function"==typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return Qt.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var r=n._meta[e.id];return r||(r=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),r},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.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],r=n._meta&&n._meta[e];r&&(r.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,r=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);r&&(n.unbindEvents(),V.canvas.clear(n),we.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Me.notify(n,"destroy"),delete He.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Re({_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)};V.each(t.options.events,function(r){we.addEventListener(t,r,n),e[r]=n}),t.options.responsive&&(n=function(){t.resize()},we.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;!e||(delete t._listeners,V.each(e,function(e,n){we.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var r,a,i,o=n?"set":"remove";for(a=0,i=t.length;a<i;++a)(r=t[a])&&this.getDatasetMeta(r._datasetIndex).controller[o+"HoverStyle"](r);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Me.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)),Me.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):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||{},a=r.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===t.type?[]:n.getElementsAtEventForMode(t,a.mode,a),V.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,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!V.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),He.instances={};var Ue=He;function qe(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Ye(t){this.options=t||{}}He.Controller=He,He.types={},V.configMerge=ze,V.scaleMerge=je,V.extend(Ye.prototype,{formats:qe,parse:qe,format:qe,add:qe,diff:qe,startOf:qe,endOf:qe,_create:function(t){return t}}),Ye.override=function(t){V.extend(Ye.prototype,t)};var Ge={_date:Ye},Xe={formatters:{values:function(t){return V.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 a=V.log10(Math.abs(r)),i="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),i=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),i=t.toFixed(l)}else i="0";return i},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},$e=V.isArray,Ke=V.isNullOrUndef,Je=V.valueOrDefault,Ze=V.valueAtIndexOrDefault;function Qe(t,e,n){var r,a=t.getTicks().length,i=Math.min(e,a-1),o=t.getPixelForTick(i),s=t._startPixel,l=t._endPixel,u=1e-6;if(!(n&&(r=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(i-1))/2,o+=i<e?r:-r,o<s-u||o>l+u)))return o}function tn(t){return t.drawTicks?t.tickMarkLength:0}function en(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function nn(t,e){return V.extend(V.options._parseFont({fontFamily:Je(e.fontFamily,t.fontFamily),fontSize:Je(e.fontSize,t.fontSize),fontStyle:Je(e.fontStyle,t.fontStyle),lineHeight:Je(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,j.global.defaultFontColor])})}function rn(t){var e=nn(t,t.minor);return{minor:e,major:t.major.enabled?nn(t,t.major):e}}function an(t){var e,n,r,a=[];for(n=0,r=t.length;n<r;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function on(t,e,n,r){var a,i,o,s,l=Je(n,0),u=Math.min(Je(r,t.length),t.length),c=0;for(e=Math.ceil(e),r&&(e=(a=r-n)/Math.floor(a/e)),s=l;s<0;)c++,s=Math.round(l+c*e);for(i=Math.max(l,0);i<u;i++)o=t[i],i===s?(o._index=i,c++,s=Math.round(l+c*e)):delete o.label}j._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:Xe.formatters.values,minor:{},major:{}}});var sn=G.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){V.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var r,a,i,o,s,l=this,u=l.options.ticks,c=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=V.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],r=0,a=l.ticks.length;r<a;++r)o.push({value:l.ticks[r],major:!1});return l._ticks=o,i=l._convertTicksToLabels((s=c<o.length)?function(t,e){for(var n=[],r=t.length/e,a=0,i=t.length;a<i;a+=r)n.push(t[Math.floor(a)]);return n}(o,c):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(i=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=i,l.afterUpdate(),l.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(){V.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){V.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(){V.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){V.callback(this.options.beforeDataLimits,[this])},determineDataLimits:V.noop,afterDataLimits:function(){V.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){V.callback(this.options.beforeBuildTicks,[this])},buildTicks:V.noop,afterBuildTicks:function(t){var e=this;return $e(t)&&t.length?V.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=V.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){V.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){V.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){V.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,r,a,i,o,s=this,l=s.options,u=l.ticks,c=s.getTicks().length,d=u.minRotation||0,h=u.maxRotation,f=d;!s._isVisible()||!u.display||d>=h||c<=1||!s.isHorizontal()?s.labelRotation=d:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/c:r/(c-1))&&(a=r/(c-(l.offset?.5:1)),i=s.maxHeight-tn(l.gridLines)-u.padding-en(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(i/o,1))-Math.asin(n/o))),f=Math.max(d,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,a=r.ticks,i=r.scaleLabel,o=r.gridLines,s=t._isVisible(),l="bottom"===r.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=tn(o)+en(i)),u?s&&(e.height=tn(o)+en(i)):e.height=t.maxHeight,a.display&&s){var c=rn(a),d=t._getLabelSizes(),h=d.first,f=d.last,g=d.widest,p=d.highest,v=.4*c.minor.lineHeight,m=a.padding;if(u){var b=0!==t.labelRotation,y=V.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y);e.height=Math.min(t.maxHeight,e.height+(_*g.width+x*(p.height-(b?p.offset:0))+(b?0:v))+m);var k,w,M=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(k=l?x*h.width+_*h.offset:_*(h.height-h.offset),w=l?_*(f.height-f.offset):x*f.width+_*f.offset):(k=h.width/2,w=f.width/2),t.paddingLeft=Math.max((k-M)*t.width/(t.width-M),0)+3,t.paddingRight=Math.max((w-C)*t.width/(t.width-C),0)+3}else e.width=Math.min(t.maxWidth,e.width+(a.mirror?0:g.width+m+v)),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},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(){V.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(Ke(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,n,r,a=this;for(a.ticks=t.map(function(t){return t.value}),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,r=t.length;n<r;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=function(t,e,n,r){var a,i,o,s,l,u,c,d,h,f,g,p,v,m=n.length,b=[],y=[],x=[],_=0,k=0;for(a=0;a<m;++a){if(s=n[a].label,t.font=u=(l=n[a].major?e.major:e.minor).string,c=r[u]=r[u]||{data:{},gc:[]},d=l.lineHeight,h=f=0,Ke(s)||$e(s)){if($e(s))for(i=0,o=s.length;i<o;++i)!Ke(g=s[i])&&!$e(g)&&(h=V.measureText(t,c.data,c.gc,h,g),f+=d)}else h=V.measureText(t,c.data,c.gc,h,s),f=d;b.push(h),y.push(f),x.push(d/2),_=Math.max(h,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:y[t]||0,offset:x[t]||0}}return function(t,e){V.each(t,function(t){var n,r=t.gc,a=r.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[r[n]];r.splice(0,a)}})}(r,m),p=b.indexOf(_),v=y.indexOf(k),{first:w(0),last:w(m-1),widest:w(p),highest:w(v)}}(t.ctx,rn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,r,a;return $e(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),r=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),r=t,a=t),{min:r,max:a,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:V.noop,getPixelForValue:V.noop,getValueForPixel:V.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,r=e._ticks.length,a=1/Math.max(r-(n?0:1),1);return t<0||t>r-1?null:e.getPixelForDecimal(t*a+(n?a/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,r,a,i=this,o=i.options.ticks,s=i._length,l=o.maxTicksLimit||s/i._tickSize()+1,u=o.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;e<n;e++)t[e].major&&r.push(e);return r}(t):[],c=u.length,d=u[0],h=u[c-1];if(c>l)return function(t,e,n){var r,a,i=0,o=e[0];for(n=Math.ceil(n),r=0;r<t.length;r++)a=t[r],r===o?(a._index=r,o=e[++i*n]):delete a.label}(t,u,c/l),an(t);if(r=function(t,e,n,r){var a,i,o,s,l=function(t){var e,n,r=t.length;if(r<2)return!1;for(n=t[0],e=1;e<r;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/r;if(!l)return Math.max(u,1);for(o=0,s=(a=V.math._factorize(l)).length-1;o<s;o++)if((i=a[o])>u)return i;return Math.max(u,1)}(u,t,0,l),c>0){for(e=0,n=c-1;e<n;e++)on(t,r,u[e],u[e+1]);return on(t,r,V.isNullOrUndef(a=c>1?(h-d)/(c-1):null)?0:d-a,d),on(t,r,h,V.isNullOrUndef(a)?t.length:h+a),an(t)}return on(t,r),an(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=V.toRadians(t.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),i=t._getLabelSizes(),o=e.autoSkipPadding||0,s=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return t.isHorizontal()?l*r>s*a?s/r:l/a:l*a<s*r?l/r:s/a},_isVisible:function(){var t,e,n,r=this,a=r.chart,i=r.options.display;if("auto"!==i)return!!i;for(t=0,e=a.data.datasets.length;t<e;++t)if(a.isDatasetVisible(t)&&((n=a.getDatasetMeta(t)).xAxisID===r.id||n.yAxisID===r.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,r,a,i,o,s,l,u,c,d,h,f,g,p,v,m,b=this,y=b.chart,x=b.options,_=x.gridLines,k=x.position,w=_.offsetGridLines,M=b.isHorizontal(),C=b._ticksToDraw,S=C.length+(w?1:0),A=tn(_),P=[],D=_.drawBorder?Ze(_.lineWidth,0,0):0,O=D/2,T=V._alignPixel,I=function(t){return T(y,t,D)};for("top"===k?(e=I(b.bottom),s=b.bottom-A,u=e-O,d=I(t.top)+O,f=t.bottom):"bottom"===k?(e=I(b.top),d=t.top,f=I(t.bottom)-O,s=e+O,u=b.top+A):"left"===k?(e=I(b.right),o=b.right-A,l=e-O,c=I(t.left)+O,h=t.right):(e=I(b.left),c=t.left,h=I(t.right)-O,o=e+O,l=b.left+A),n=0;n<S;++n)!(Ke((r=C[n]||{}).label)&&n<C.length)&&(n===b.zeroLineIndex&&x.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,v=_.zeroLineBorderDash||[],m=_.zeroLineBorderDashOffset||0):(g=Ze(_.lineWidth,n,1),p=Ze(_.color,n,"rgba(0,0,0,0.1)"),v=_.borderDash||[],m=_.borderDashOffset||0),void 0!==(a=Qe(b,r._index||n,w))&&(i=T(y,a,g),M?o=l=c=h=i:s=u=d=f=i,P.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:c,y1:d,x2:h,y2:f,width:g,color:p,borderDash:v,borderDashOffset:m})));return P.ticksLength=S,P.borderValue=e,P},_computeLabelItems:function(){var t,e,n,r,a,i,o,s,l,u,c,d,h=this,f=h.options,g=f.ticks,p=f.position,v=g.mirror,m=h.isHorizontal(),b=h._ticksToDraw,y=rn(g),x=g.padding,_=tn(f.gridLines),k=-V.toRadians(h.labelRotation),w=[];for("top"===p?(i=h.bottom-_-x,o=k?"left":"center"):"bottom"===p?(i=h.top+_+x,o=k?"right":"center"):"left"===p?(a=h.right-(v?0:_)-x,o=v?"left":"right"):(a=h.left+(v?0:_)+x,o=v?"right":"left"),t=0,e=b.length;t<e;++t)!Ke(r=(n=b[t]).label)&&(s=h.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?y.major:y.minor).lineHeight,c=$e(r)?r.length:1,m?(a=s,d="top"===p?((k?1:.5)-c)*u:(k?0:.5)*u):(i=s,d=(1-c)*u/2),w.push({x:a,y:i,rotation:k,label:r,font:l,textOffset:d,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var r,a,i,o,s,l=e.ctx,u=e.chart,c=V._alignPixel,d=n.drawBorder?Ze(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(i=0,o=h.length;i<o;++i)a=(s=h[i]).color,(r=s.width)&&a&&(l.save(),l.lineWidth=r,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var f,g,p,v,m=d,b=Ze(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;e.isHorizontal()?(f=c(u,e.left,m)-m/2,g=c(u,e.right,b)+b/2,p=v=y):(p=c(u,e.top,m)-m/2,v=c(u,e.bottom,b)+b/2,f=g=y),l.lineWidth=d,l.strokeStyle=Ze(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,v),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,r,a,i,o,s,l,u=t.ctx,c=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,r=c.length;e<r;++e){if(o=(i=c[e]).font,u.save(),u.translate(i.x,i.y),u.rotate(i.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=i.textAlign,l=i.textOffset,$e(s=i.label))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,r=n.scaleLabel;if(r.display){var a,i,o=Je(r.fontColor,j.global.defaultFontColor),s=V.options._parseFont(r),l=V.options.toPadding(r.padding),u=s.lineHeight/2,c=n.position,d=0;if(t.isHorizontal())a=t.left+t.width/2,i="bottom"===c?t.bottom-u-l.bottom:t.top+u+l.top;else{var h="left"===c;a=h?t.left+u+l.top:t.right-u-l.top,i=t.top+t.height/2,d=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,i),e.rotate(d),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(r.labelString,0,0),e.restore()}},draw:function(t){var e=this;!e._isVisible()||(e._drawGrid(t),e._drawTitle(),e._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(r){return(!t||r.type===t)&&(n?r.xAxisID===e.id:r.yAxisID===e.id)})}});sn.prototype._draw=sn.prototype.draw;var ln=sn,un=V.isNullOrUndef,cn=ln.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),r=e.options.ticks,a=r.min,i=r.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==i&&(t=n.indexOf(i))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,r=t.maxIndex;t.ticks=0===n&&r===e.length-1?e:e.slice(n,r+1)},getLabelForIndex:function(t,e){var n=this,r=n.chart;return r.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;ln.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,a,i,o=this;return!un(e)&&!un(n)&&(t=o.chart.data.datasets[n].data[e]),un(t)||(r=o.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(r,t),e=-1!==(i=a.indexOf(t))?i:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._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=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}});cn._defaults={position:"bottom"};var dn=V.isNullOrUndef,hn=ln.extend({getRightValue:function(t){return"string"==typeof t?+t:ln.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),r=V.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,i=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),a!==i&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,r=n.stepSize,a=n.maxTicksLimit;return r?t=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:V.noop,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:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,r,a,i,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,c=t.min,d=t.max,h=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&dn(c)&&dn(d))return[f,g];(i=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(i*p/u/l)*l),s||dn(h)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,h),p=Math.ceil(p*n)/n),r=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!dn(c)&&V.almostWhole(c/p,p/1e3)&&(r=c),!dn(d)&&V.almostWhole(d/p,p/1e3)&&(a=d)),i=V.almostEquals(i=(a-r)/p,Math.round(i),p/1e3)?Math.round(i):Math.ceil(i),r=Math.round(r*n)/n,a=Math.round(a*n)/n,o.push(dn(c)?r:c);for(var v=1;v<i;++v)o.push(Math.round((r+v*p)*n)/n);return o.push(dn(d)?a:d),o}(r,t);t.handleDirectionalChanges(),t.max=V.max(a),t.min=V.min(a),e.reverse?(a.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),ln.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),r=e.min,a=e.max;ln.prototype._configure.call(e),e.options.offset&&n.length&&(r-=t=(a-r)/Math.max(n.length-1,1)/2,a+=t),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),fn={position:"left",ticks:{callback:Xe.formatters.linear}};function gn(t,e,n,r){var a,i,o=t.options,s=function(t,e,n){var r=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[r]&&(t[r]={pos:[],neg:[]}),t[r]}(e,o.stacked,n),l=s.pos,u=s.neg,c=r.length;for(a=0;a<c;++a)i=t._parseValue(r[a]),!(isNaN(i.min)||isNaN(i.max)||n.data[a].hidden)&&(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:i.min<0||i.max<0?u[a]+=i.min:l[a]+=i.max)}function pn(t,e,n){var r,a,i=n.length;for(r=0;r<i;++r)a=t._parseValue(n[r]),!(isNaN(a.min)||isNaN(a.max)||e.data[r].hidden)&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var vn=hn.extend({determineDataLimits:function(){var t,e,n,r,a=this,i=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=i.stacked,u={},c=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<c;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<c;++t)n=o[(e=s[t]).index].data,l?gn(a,u,e,n):pn(a,e,n);V.each(u,function(t){r=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(r)),a.max=Math.max(a.max,V.max(r))}),a.min=V.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=V.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=V.options._parseFont(e.options.ticks),Math.ceil(e.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){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._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])}});vn._defaults=fn;var mn=V.valueOrDefault,bn=V.math.log10,yn={position:"left",ticks:{callback:Xe.formatters.logarithmic}};function xn(t,e){return V.isFinite(t)&&t>=0?t:e}var _n=ln.extend({determineDataLimits:function(){var t,e,n,r,a,i,o=this,s=o.options,l=o.chart,u=l.data.datasets,c=o.isHorizontal();function d(t){return c?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e)&&void 0!==e.stack){h=!0;break}if(s.stacked||h){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&d(e))for(void 0===f[g]&&(f[g]=[]),a=0,i=(r=u[t].data).length;a<i;a++){var p=f[g];n=o._parseValue(r[a]),!(isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0)&&(p[a]=p[a]||0,p[a]+=n.max)}}V.each(f,function(t){if(t.length>0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}})}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e))for(a=0,i=(r=u[t].data).length;a<i;a++)n=o._parseValue(r[a]),!(isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0)&&(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=V.isFinite(o.min)?o.min:null,o.max=V.isFinite(o.max)?o.max:null,o.minNotZero=V.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=xn(e.min,t.min),t.max=xn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(bn(t.min))-1),t.max=Math.pow(10,Math.floor(bn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(bn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(bn(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(bn(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:xn(e.min),max:xn(e.max)},a=t.ticks=function(t,e){var n,r,a=[],i=mn(t.min,Math.pow(10,Math.floor(bn(e.min)))),o=Math.floor(bn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===i?(n=Math.floor(bn(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(i),i=r*Math.pow(10,n)):(n=Math.floor(bn(i)),r=Math.floor(i/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(i),10==++r&&(r=1,l=++n>=0?1:l),i=Math.round(r*Math.pow(10,n)*l)/l}while(n<o||n===o&&r<s);var u=mn(t.max,i);return a.push(u),a}(r,t);t.max=V.max(a),t.min=V.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),ln.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(bn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;ln.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=mn(t.options.ticks.fontSize,j.global.defaultFontSize)/t._length),t._startValue=bn(e),t._valueOffset=n,t._valueRange=(bn(t.max)-bn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(bn(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)}});_n._defaults=yn;var kn=V.valueOrDefault,wn=V.valueAtIndexOrDefault,Mn=V.options.resolve,Cn={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:Xe.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Sn(t){var e=t.ticks;return e.display&&t.display?kn(e.fontSize,j.global.defaultFontSize)+2*e.backdropPaddingY:0}function An(t,e,n){return V.isArray(n)?{w:V.longestText(t,t.font,n),h:n.length*e}:{w:t.measureText(n).width,h:e}}function Pn(t,e,n,r,a){return t===r||t===a?{start:e-n/2,end:e+n/2}:t<r||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Dn(t){return 0===t||180===t?"center":t<180?"left":"right"}function On(t,e,n,r){var a,i,o=n.y+r/2;if(V.isArray(e))for(a=0,i=e.length;a<i;++a)t.fillText(e[a],n.x,o),o+=r;else t.fillText(e,n.x,o)}function Tn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function In(t){return V.isNumber(t)?t:0}var Fn=hn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Sn(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;V.each(e.data.datasets,function(a,i){if(e.isDatasetVisible(i)){var o=e.getDatasetMeta(i);V.each(a.data,function(e,a){var i=+t.getRightValue(e);isNaN(i)||o.data[a].hidden||(n=Math.min(i,n),r=Math.max(i,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/Sn(this.options))},convertTicksToLabels:function(){var t=this;hn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,r,a=V.options._parseFont(t.options.pointLabels),i={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(e=0;e<s;e++){r=t.getPointPosition(e,t.drawingArea+5),n=An(t.ctx,a.lineHeight,t.pointLabels[e]),t._pointLabelSizes[e]=n;var l=t.getIndexAngle(e),u=V.toDegrees(l)%360,c=Pn(u,r.x,n.w,0,180),d=Pn(u,r.y,n.h,90,270);c.start<i.l&&(i.l=c.start,o.l=l),c.end>i.r&&(i.r=c.end,o.r=l),d.start<i.t&&(i.t=d.start,o.t=l),d.end>i.b&&(i.b=d.end,o.b=l)}t.setReductions(t.drawingArea,i,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var r=this,a=e.l/Math.sin(n.l),i=Math.max(e.r-r.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);a=In(a),i=In(i),o=In(o),s=In(s),r.drawingArea=Math.min(Math.floor(t-(a+i)/2),Math.floor(t-(o+s)/2)),r.setCenterPoint(a,i,o,s)},setCenterPoint:function(t,e,n,r){var a=this,i=n+a.drawingArea,o=a.height-a.paddingTop-r-a.drawingArea;a.xCenter=Math.floor((t+a.drawingArea+(a.width-e-a.drawingArea))/2+a.left),a.yCenter=Math.floor((i+o)/2+a.top+a.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(V.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,r=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(r)*e+n.xCenter,y:Math.sin(r)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,r=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&r<0?r:n>0&&r>0?n:0)},_drawGrid:function(){var t,e,n,r=this,a=r.ctx,i=r.options,o=i.gridLines,s=i.angleLines,l=kn(s.lineWidth,o.lineWidth),u=kn(s.color,o.color);if(i.pointLabels.display&&function(t){var e=t.ctx,n=t.options,r=n.pointLabels,a=Sn(n),i=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(r);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=t.getPointPosition(s,i+(0===s?a/2:0)+5),u=wn(r.fontColor,s,j.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(s),d=V.toDegrees(c);e.textAlign=Dn(d),Tn(d,t._pointLabelSizes[s],l),On(e,t.pointLabels[s],l,o.lineHeight)}e.restore()}(r),o.display&&V.each(r.ticks,function(t,n){0!==n&&(e=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(t,e,n,r){var a,i=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=wn(e.color,r-1),u=wn(e.lineWidth,r-1);if((o||s)&&l&&u){if(i.save(),i.strokeStyle=l,i.lineWidth=u,i.setLineDash&&(i.setLineDash(e.borderDash||[]),i.lineDashOffset=e.borderDashOffset||0),i.beginPath(),o)i.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),i.moveTo(a.x,a.y);for(var c=1;c<s;c++)a=t.getPointPosition(c,n),i.lineTo(a.x,a.y)}i.closePath(),i.stroke(),i.restore()}}(r,o,e,n))}),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Mn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Mn([s.borderDashOffset,o.borderDashOffset,0])),t=r.chart.data.labels.length-1;t>=0;t--)e=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),a.beginPath(),a.moveTo(r.xCenter,r.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,a,i=t.getIndexAngle(0),o=V.options._parseFont(n),s=kn(n.fontColor,j.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,function(i,l){0===l&&!n.reverse||(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(i).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-r-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(i,0,-r))}),e.restore()}},_drawTitle:V.noop});Fn._defaults=Cn;var Ln=V._deprecated,Rn=V.options.resolve,Bn=V.valueOrDefault,jn=Number.MIN_SAFE_INTEGER||-9007199254740991,zn=Number.MAX_SAFE_INTEGER||9007199254740991,En={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}},Nn=Object.keys(En);function Wn(t,e){return t-e}function Vn(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function Hn(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function Un(t,e,n,r){var a=function(t,e,n){for(var r,a,i,o=0,s=t.length-1;o>=0&&o<=s;){if(i=t[r=o+s>>1],!(a=t[r-1]||null))return{lo:null,hi:i};if(i[e]<n)o=r+1;else{if(!(a[e]>n))return{lo:a,hi:i};s=r-1}}return{lo:i,hi:null}}(t,e,n),i=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-i[e];return i[r]+(o[r]-i[r])*(s?(n-i[e])/s:0)}function qn(t,e){var n=t._adapter,r=t.options.time,a=r.parser,i=a||r.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null!==o?+o:(!a&&"function"==typeof i&&(o=i(e),V.isFinite(o)||(o=n.parse(o))),o)}function Yn(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,r=qn(t,t.getRightValue(e));return null===r||n.round&&(r=+t._adapter.startOf(r,n.round)),r}function Gn(t,e,n,r){var a,i,o=Nn.length;for(a=Nn.indexOf(t);a<o-1;++a)if((i=En[Nn[a]]).common&&Math.ceil((n-e)/((i.steps?i.steps:zn)*i.size))<=r)return Nn[a];return Nn[o-1]}function Xn(t,e,n){var r,a,i=[],o={},s=e.length;for(r=0;r<s;++r)o[a=e[r]]=r,i.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,r){var a,i,o=t._adapter,s=+o.startOf(e[0].value,r),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,r))(i=n[a])>=0&&(e[i].major=!0);return e}(t,i,o,n):i}var $n=ln.extend({initialize:function(){this.mergeTicksOptions(),ln.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),r=t._adapter=new Ge._date(e.adapters.date);return Ln("time scale",n.format,"time.format","time.parser"),Ln("time scale",n.min,"time.min","ticks.min"),Ln("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,r.formats()),ln.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),ln.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,r,a,i,o,s=this,l=s.chart,u=s._adapter,c=s.options,d=c.time.unit||"day",h=zn,f=jn,g=[],p=[],v=[],m=s._getLabels();for(t=0,n=m.length;t<n;++t)v.push(Yn(s,m[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(V.isObject((a=l.data.datasets[t].data)[0]))for(p[t]=[],e=0,r=a.length;e<r;++e)i=Yn(s,a[e]),g.push(i),p[t][e]=i;else p[t]=v.slice(0),o||(g=g.concat(v),o=!0);else p[t]=[];v.length&&(h=Math.min(h,v[0]),f=Math.max(f,v[v.length-1])),g.length&&(g=n>1?function(t){var e,n,r,a={},i=[];for(e=0,n=t.length;e<n;++e)a[r=t[e]]||(a[r]=!0,i.push(r));return i}(g).sort(Wn):g.sort(Wn),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=Yn(s,Vn(c))||h,f=Yn(s,Hn(c))||f,h=h===zn?+u.startOf(Date.now(),d):h,f=f===jn?+u.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:v}},buildTicks:function(){var t,e,n,r=this,a=r.min,i=r.max,o=r.options,s=o.ticks,l=o.time,u=r._timestamps,c=[],d=r.getLabelCapacity(a),h=s.source,f=o.distribution;for(u="data"===h||"auto"===h&&"series"===f?u.data:"labels"===h?u.labels:function(t,e,n,r){var a,i=t._adapter,o=t.options,s=o.time,l=s.unit||Gn(s.minUnit,e,n,r),u=Rn([s.stepSize,s.unitStepSize,1]),c="week"===l&&s.isoWeekday,d=e,h=[];if(c&&(d=+i.startOf(d,"isoWeek",c)),d=+i.startOf(d,c?"day":l),i.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=d;a<n;a=+i.add(a,u,l))h.push(a);return(a===n||"ticks"===o.bounds)&&h.push(a),h}(r,a,i,d),"ticks"===o.bounds&&u.length&&(a=u[0],i=u[u.length-1]),a=Yn(r,Vn(o))||a,i=Yn(r,Hn(o))||i,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=i&&c.push(n);return r.min=a,r.max=i,r._unit=l.unit||(s.autoSkip?Gn(l.minUnit,r.min,r.max,d):function(t,e,n,r,a){var i,o;for(i=Nn.length-1;i>=Nn.indexOf(n);i--)if(En[o=Nn[i]].common&&t._adapter.diff(a,r,o)>=e-1)return o;return Nn[n?Nn.indexOf(n):0]}(r,c.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(t){for(var e=Nn.indexOf(t)+1,n=Nn.length;e<n;++e)if(En[Nn[e]].common)return Nn[e]}(r._unit):void 0,r._table=function(t,e,n,r){if("linear"===r||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,i,o,s,l,u=[],c=[e];for(a=0,i=t.length;a<i;++a)(s=t[a])>e&&s<n&&c.push(s);for(c.push(n),a=0,i=c.length;a<i;++a)l=c[a+1],s=c[a],(void 0===(o=c[a-1])||void 0===l||Math.round((l+o)/2)!==s)&&u.push({time:s,pos:a/(i-1)});return u}(r._timestamps.data,a,i,f),r._offsets=function(t,e,n,r,a){var i,o,s=0,l=0;return a.offset&&e.length&&(i=Un(t,"time",e[0],"pos"),s=1===e.length?1-i:(Un(t,"time",e[1],"pos")-i)/2,o=Un(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-Un(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,c,0,0,o),s.reverse&&c.reverse(),Xn(r,c,r._majorUnit)},getLabelForIndex:function(t,e){var n=this,r=n._adapter,a=n.chart.data,i=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return V.isObject(s)&&(o=n.getRightValue(s)),i.tooltipFormat?r.format(qn(n,o),i.tooltipFormat):"string"==typeof o?o:r.format(qn(n,o),i.displayFormats.datetime)},tickFormatFunction:function(t,e,n,r){var a=this,i=a.options,o=i.time.displayFormats,s=a._majorUnit,l=o[s],u=n[e],c=i.ticks,d=s&&l&&u&&u.major,h=a._adapter.format(t,r||(d?l:o[a._unit])),f=d?c.major:c.minor,g=Rn([f.callback,f.userCallback,c.callback,c.userCallback]);return g?g(h,e,n):h},convertTicksToLabels:function(t){var e,n,r=[];for(e=0,n=t.length;e<n;++e)r.push(this.tickFormatFunction(t[e].value,e,t));return r},getPixelForOffset:function(t){var e=this,n=e._offsets,r=Un(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+r)*n.factor)},getPixelForValue:function(t,e,n){var r=this,a=null;if(void 0!==e&&void 0!==n&&(a=r._timestamps.datasets[n][e]),null===a&&(a=Yn(r,t)),null!==a)return r.getPixelForOffset(a)},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,n=e._offsets,r=e.getDecimalForPixel(t)/n.factor-n.end,a=Un(e._table,"pos",r,"time");return e._adapter._create(a)},_getLabelSize:function(t){var e=this,n=e.options.ticks,r=e.ctx.measureText(t).width,a=V.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(a),o=Math.sin(a),s=Bn(n.fontSize,j.global.defaultFontSize);return{w:r*i+s*o,h:r*o+s*i}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,i=e.tickFormatFunction(t,0,Xn(e,[t],e._majorUnit),a),o=e._getLabelSize(i),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}});$n._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Kn={category:cn,linear:vn,logarithmic:_n,radialLinear:Fn,time:$n},Jn={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"};Ge._date.override("function"==typeof t?{_id:"moment",formats:function(){return Jn},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,r){return t(e).add(n,r).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(e,n,r){return e=t(e),"isoWeek"===n?e.isoWeekday(r).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var Zn={dataset:function(t){var e=t.fill,n=t.chart,r=n.getDatasetMeta(e),a=r&&n.isDatasetVisible(e)&&r.dataset._children||[],i=a.length||0;return i?function(t,e){return e<i&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,r=e?e.y:null;return V.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===r?t.y:r}}}};function Qn(t,e,n){var r,a=t._model||{},i=a.fill;if(void 0===i&&(i=!!a.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(r=parseFloat(i,10),isFinite(r)&&Math.floor(r)===r)return("-"===i[0]||"+"===i[0])&&(r=e+r),!(r===e||r<0||r>=n)&&r;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function tr(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,r,a,i,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,e=s.ticks.reverse?o.max:o.min),a=0;a<l;++a)i="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(i.cx=r.x,i.cy=r.y,i.angle=o.getIndexAngle(a)-Math.PI/2),c.push(i);return c}(t):function(t){var e,n=t.el._model||{},r=t.el._scale||{},a=t.fill,i=null;if(isFinite(a))return null;if("start"===a?i=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===a?i=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:r.getBasePixel&&(i=r.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if(V.isFinite(i))return{x:(e=r.isHorizontal())?i:null,y:e?null:i}}return null}(t)}function er(t,e,n){var r,a=t[e].fill,i=[e];if(!n)return a;for(;!1!==a&&-1===i.indexOf(a);){if(!isFinite(a))return a;if(!(r=t[a]))return!1;if(r.visible)return a;i.push(a),a=r.fill}return!1}function nr(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),Zn[n](t))}function rr(t){return t&&!t.skip}function ar(t,e,n,r,a){var i,o,s,l;if(r&&a){for(t.moveTo(e[0].x,e[0].y),i=1;i<r;++i)V.canvas.lineTo(t,e[i-1],e[i]);if(void 0!==n[0].angle){for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),i=a-1;i>0;--i)t.arc(o,s,l,n[i].angle,n[i-1].angle,!0);return}for(t.lineTo(n[a-1].x,n[a-1].y),i=a-1;i>0;--i)V.canvas.lineTo(t,n[i],n[i-1],!0)}}function ir(t,e,n,r,a,i){var o,s,l,u,c,d,h,f,g=e.length,p=r.spanGaps,v=[],m=[],b=0,y=0;for(t.beginPath(),o=0,s=g;o<s;++o)c=n(u=e[l=o%g]._view,l,r),d=rr(u),h=rr(c),i&&void 0===f&&d&&(s=g+(f=o+1)),d&&h?(b=v.push(u),y=m.push(c)):b&&y&&(p?(d&&v.push(u),h&&m.push(c)):(ar(t,v,m,b,y),b=y=0,v=[],m=[]));ar(t,v,m,b,y),t.closePath(),t.fillStyle=a,t.fill()}var or={id:"filler",afterDatasetsUpdate:function(t,e){var n,r,a,i,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(r=0;r<o;++r)i=null,(a=(n=t.getDatasetMeta(r)).dataset)&&a._model&&a instanceof bt.Line&&(i={visible:t.isDatasetVisible(r),fill:Qn(a,r,o),chart:t,el:a}),n.$filler=i,l.push(i);for(r=0;r<o;++r)(i=l[r])&&(i.fill=er(l,r,s),i.boundary=tr(i),i.mapper=nr(i))},beforeDatasetsDraw:function(t){var e,n,r,a,i,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(i=(r=e.el)._children||[],s=(a=r._view).backgroundColor||j.global.defaultColor,(o=e.mapper)&&s&&i.length&&(V.canvas.clipArea(u,t.chartArea),ir(u,i,o,a,s,r._loop),V.canvas.unclipArea(u)))}},sr=V.rtl.getRtlAdapter,lr=V.noop,ur=V.valueOrDefault;function cr(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}j._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,a=r.getDatasetMeta(n);a.hidden=null===a.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(n){var a=n.controller.getStyle(r?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(t){var e,n,r,a=document.createElement("ul"),i=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=i.length;e<n;e++)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[e].backgroundColor,i[e].label&&r.appendChild(document.createTextNode(i[e].label));return a.outerHTML}});var dr=G.extend({initialize:function(t){var e=this;V.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:lr,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:lr,beforeSetDimensions:lr,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:lr,beforeBuildLabels:lr,buildLabels:function(){var t=this,e=t.options.labels||{},n=V.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:lr,beforeFit:lr,fit:function(){var t=this,e=t.options,n=e.labels,r=e.display,a=t.ctx,i=V.options._parseFont(n),o=i.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=t.maxHeight),r){if(a.font=i.string,u){var c=t.lineWidths=[0],d=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,function(t,e){var r=cr(n,o)+o/2+a.measureText(t.text).width;(0===e||c[c.length-1]+r+2*n.padding>l.width)&&(d+=o+n.padding,c[c.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:r,height:o},c[c.length-1]+=r+n.padding}),l.height+=d}else{var h=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,v=0,m=0;V.each(t.legendItems,function(t,e){var r=cr(n,o)+o/2+a.measureText(t.text).width;e>0&&m+o+2*h>l.height&&(p+=v+n.padding,f.push(v),g.push(m),v=0,m=0),v=Math.max(v,r),m+=o+h,s[e]={left:0,top:0,width:r,height:o}}),p+=v,f.push(v),g.push(m),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:lr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=j.global,a=r.defaultColor,i=r.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,d=sr(e.rtl,t.left,t.minSize.width),h=t.ctx,f=ur(n.fontColor,r.defaultFontColor),g=V.options._parseFont(n),p=g.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=g.string;var v=cr(n,p),m=t.legendHitBoxes,b=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},y=t.isHorizontal();c=y?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=p+n.padding;V.each(t.legendItems,function(e,r){var f=h.measureText(e.text).width,g=v+p/2+f,_=c.x,k=c.y;d.setWidth(t.minSize.width),y?r>0&&_+g+n.padding>t.left+t.minSize.width&&(k=c.y+=x,c.line++,_=c.x=t.left+b(l,u[c.line])):r>0&&k+x>t.top+t.minSize.height&&(_=c.x=_+t.columnWidths[c.line]+n.padding,c.line++,k=c.y=t.top+b(o,s[c.line]));var w=d.x(_);(function(t,e,r){if(!(isNaN(v)||v<=0)){h.save();var o=ur(r.lineWidth,i.borderWidth);if(h.fillStyle=ur(r.fillStyle,a),h.lineCap=ur(r.lineCap,i.borderCapStyle),h.lineDashOffset=ur(r.lineDashOffset,i.borderDashOffset),h.lineJoin=ur(r.lineJoin,i.borderJoinStyle),h.lineWidth=o,h.strokeStyle=ur(r.strokeStyle,a),h.setLineDash&&h.setLineDash(ur(r.lineDash,i.borderDash)),n&&n.usePointStyle){var s=v*Math.SQRT2/2,l=d.xPlus(t,v/2);V.canvas.drawPoint(h,r.pointStyle,s,l,e+p/2,r.rotation)}else h.fillRect(d.leftForLtr(t,v),e,v,p),0!==o&&h.strokeRect(d.leftForLtr(t,v),e,v,p);h.restore()}})(w,k,e),m[r].left=d.leftForLtr(w,m[r].width),m[r].top=k,function(t,e,n,r){var a=p/2,i=d.xPlus(t,v+a),o=e+a;h.fillText(n.text,i,o),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(i,o),h.lineTo(d.xPlus(i,r),o),h.stroke())}(w,k,e,f),y?c.x+=g+n.padding:c.y+=x}),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,r,a,i=this;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(a=i.legendHitBoxes,n=0;n<a.length;++n)if(t>=(r=a[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return i.legendItems[n];return null},handleEvent:function(t){var e,n=this,r=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?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 hr(t,e){var n=new dr({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.legend=n}var fr={id:"legend",_element:dr,beforeInit:function(t){var e=t.options.legend;e&&hr(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,j.global.legend),n?(le.configure(t,n,e),n.options=e):hr(t,e)):n&&(le.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},gr=V.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var pr=G.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:gr,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:gr,beforeSetDimensions:gr,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:gr,beforeBuildLabels:gr,buildLabels:gr,afterBuildLabels:gr,beforeFit:gr,fit:function(){var t,e=this,n=e.options,r=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=a?e.maxWidth:t,e.height=r.height=a?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:gr,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,a,i,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,c=t.top,d=t.left,h=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,j.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=d+(f-d)/2,i=c+l,r=f-d):(a="left"===n.position?d+l:f-l,i=c+(h-c)/2,r=h-c,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,i),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,v=0;v<g.length;++v)e.fillText(g[v],0,p,r),p+=s;else e.fillText(g,0,0,r);e.restore()}}});function vr(t,e){var n=new pr({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.titleBlock=n}var mr={},br=or,yr=fr,xr={id:"title",_element:pr,beforeInit:function(t){var e=t.options.title;e&&vr(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,j.global.title),n?(le.configure(t,n,e),n.options=e):vr(t,e)):n&&(le.removeBox(t,n),delete t.titleBlock)}};for(var _r in mr.filler=br,mr.legend=yr,mr.title=xr,Ue.helpers=V,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,a){var i=document.defaultView,o=V._getParentNode(n),s=i.getComputedStyle(n)[r],l=i.getComputedStyle(o)[r],u=e(s),c=e(l),d=Number.POSITIVE_INFINITY;return u||c?Math.min(u?t(s,n,a):d,c?t(l,o,a):d):"none"}V.where=function(t,e){if(V.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return V.each(t,function(t){e(t)&&n.push(t)}),n},V.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 r=0,a=t.length;r<a;++r)if(e.call(n,t[r],r,t))return r;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<t.length;r++){var a=t[r];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var r=n-1;r>=0;r--){var a=t[r];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)<n},V.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},V.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,a=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*r)/r+a},V.splineCurve=function(t,e,n,r){var a=t.skip?e:t,i=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=r*(u=isNaN(u)?0:u),h=r*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(o.x-a.x),y:i.y-d*(o.y-a.y)},next:{x:i.x+h*(o.x-a.x),y:i.y+h*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,r,a,i,o,s,l,u,c=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),d=c.length;for(e=0;e<d;++e)if(!(r=c[e]).model.skip){if(n=e>0?c[e-1]:null,(a=e<d-1?c[e+1]:null)&&!a.model.skip){var h=a.model.x-r.model.x;r.deltaK=0!==h?(a.model.y-r.model.y)/h:0}r.mK=!n||n.model.skip?r.deltaK:!a||a.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?0:(n.deltaK+r.deltaK)/2}for(e=0;e<d-1;++e)if(a=c[e+1],!(r=c[e]).model.skip&&!a.model.skip){if(V.almostEquals(r.deltaK,0,this.EPSILON)){r.mK=a.mK=0;continue}i=r.mK/r.deltaK,o=a.mK/r.deltaK,!((l=Math.pow(i,2)+Math.pow(o,2))<=9)&&(s=3/Math.sqrt(l),r.mK=i*s*r.deltaK,a.mK=o*s*r.deltaK)}for(e=0;e<d;++e)!(r=c[e]).model.skip&&(a=e<d-1?c[e+1]:null,(n=e>0?c[e-1]:null)&&!n.model.skip&&(r.model.controlPointPreviousX=r.model.x-(u=(r.model.x-n.model.x)/3),r.model.controlPointPreviousY=r.model.y-u*r.mK),a&&!a.model.skip&&(r.model.controlPointNextX=r.model.x+(u=(a.model.x-r.model.x)/3),r.model.controlPointNextY=r.model.y+u*r.mK))},V.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]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.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)},V.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)},V.getRelativePosition=function(t,e){var n,r,a=t.originalEvent||t,i=t.target||t.srcElement,o=i.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=a.clientX,r=a.clientY);var l=parseFloat(V.getStyle(i,"padding-left")),u=parseFloat(V.getStyle(i,"padding-top")),c=parseFloat(V.getStyle(i,"padding-right")),d=parseFloat(V.getStyle(i,"padding-bottom")),h=o.bottom-o.top-u-d;return{x:n=Math.round((n-o.left-l)/(o.right-o.left-l-c)*i.width/e.currentDevicePixelRatio),y:r=Math.round((r-o.top-u)/h*i.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?r:Math.min(r,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?r:Math.min(r,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=t.canvas,a=t.height,i=t.width;r.height=a*n,r.width=i*n,t.ctx.scale(n,n),!r.style.height&&!r.style.width&&(r.style.height=a+"px",r.style.width=i+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(a=r.data={},i=r.garbageCollect=[],r.font=e),t.font=e;var o,s,l,u,c,d=0,h=n.length;for(o=0;o<h;o++)if(null!=(u=n[o])&&!0!==V.isArray(u))d=V.measureText(t,a,i,d,u);else if(V.isArray(u))for(s=0,l=u.length;s<l;s++)null!=(c=u[s])&&!V.isArray(c)&&(d=V.measureText(t,a,i,d,c));var f=i.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[i[o]];i.splice(0,f)}return d},V.measureText=function(t,e,n,r,a){var i=e[a];return i||(i=e[a]=t.measureText(a).width,n.push(a)),i>r&&(r=i),r},V.numberOfLabelLines=function(t){var e=1;return V.each(t,function(t){V.isArray(t)&&t.length>e&&(e=t.length)}),e},V.color=_?function(t){return t instanceof CanvasGradient&&(t=j.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),Ue._adapters=Ge,Ue.Animation=$,Ue.animationService=K,Ue.controllers=Yt,Ue.DatasetController=et,Ue.defaults=j,Ue.Element=G,Ue.elements=bt,Ue.Interaction=Qt,Ue.layouts=le,Ue.platform=we,Ue.plugins=Me,Ue.Scale=ln,Ue.scaleService=Ce,Ue.Ticks=Xe,Ue.Tooltip=Re,Ue.helpers.each(Kn,function(t,e){Ue.scaleService.registerScaleType(e,t,t._defaults)}),mr)mr.hasOwnProperty(_r)&&Ue.plugins.register(mr[_r]);Ue.platform.initialize();var kr=Ue;return"undefined"!=typeof window&&(window.Chart=Ue),Ue.Chart=Ue,Ue.Legend=mr.legend._element,Ue.Title=mr.title._element,Ue.pluginService=Ue.plugins,Ue.PluginBase=Ue.Element.extend({}),Ue.canvasHelpers=Ue.helpers.canvas,Ue.layoutService=Ue.layouts,Ue.LinearScaleBase=hn,Ue.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Ue[t]=function(e,n){return new Ue(e,Ue.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),kr}(function(){try{return n(16738)}catch(t){}}())},25572:function(e,r,i){"use strict";i.d(r,{jh:function(){return Ie},m9:function(){return Fe}});var o=i(37716),s=i(26215),l=function(t,e){return t===e||t!=t&&e!=e},u=function(t,e){for(var n=t.length;n--;)if(l(t[n][0],e))return n;return-1},c=Array.prototype.splice;function d(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}d.prototype.clear=function(){this.__data__=[],this.size=0},d.prototype.delete=function(t){var e=this.__data__,n=u(e,t);return!(n<0||(n==e.length-1?e.pop():c.call(e,n,1),--this.size,0))},d.prototype.get=function(t){var e=this.__data__,n=u(e,t);return n<0?void 0:e[n][1]},d.prototype.has=function(t){return u(this.__data__,t)>-1},d.prototype.set=function(t,e){var n=this.__data__,r=u(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var h,f=d,g="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,v=g||p||Function("return this")(),m=v.Symbol,b=Object.prototype,y=b.hasOwnProperty,x=b.toString,_=m?m.toStringTag:void 0,k=Object.prototype.toString,w=m?m.toStringTag:void 0,M=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?function(t){var e=y.call(t,_),n=t[_];try{t[_]=void 0;var r=!0}catch(i){}var a=x.call(t);return r&&(e?t[_]=n:delete t[_]),a}(t):function(t){return k.call(t)}(t)},C=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},S=function(t){if(!C(t))return!1;var e=M(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},A=v["__core-js_shared__"],P=(h=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",D=Function.prototype.toString,O=function(t){if(null!=t){try{return D.call(t)}catch(e){}try{return t+""}catch(e){}}return""},T=/^\[object .+?Constructor\]$/,I=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!C(t)||function(t){return!!P&&P in t}(t))&&(S(t)?I:T).test(O(t))}(n)?n:void 0},L=F(v,"Map"),R=F(Object,"create"),B=Object.prototype.hasOwnProperty,j=Object.prototype.hasOwnProperty;function z(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}z.prototype.clear=function(){this.__data__=R?R(null):{},this.size=0},z.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},z.prototype.get=function(t){var e=this.__data__;if(R){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return B.call(e,t)?e[t]:void 0},z.prototype.has=function(t){var e=this.__data__;return R?void 0!==e[t]:j.call(e,t)},z.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=R&&void 0===e?"__lodash_hash_undefined__":e,this};var E=z,N=function(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map};function W(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}W.prototype.clear=function(){this.size=0,this.__data__={hash:new E,map:new(L||f),string:new E}},W.prototype.delete=function(t){var e=N(this,t).delete(t);return this.size-=e?1:0,e},W.prototype.get=function(t){return N(this,t).get(t)},W.prototype.has=function(t){return N(this,t).has(t)},W.prototype.set=function(t,e){var n=N(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var V=W;function H(t){var e=this.__data__=new f(t);this.size=e.size}H.prototype.clear=function(){this.__data__=new f,this.size=0},H.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},H.prototype.get=function(t){return this.__data__.get(t)},H.prototype.has=function(t){return this.__data__.has(t)},H.prototype.set=function(t,e){var n=this.__data__;if(n instanceof f){var r=n.__data__;if(!L||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(t,e),this.size=n.size,this};var U=H,q=function(){try{var t=F(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Y=function(t,e,n){"__proto__"==e&&q?q(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},G=Object.prototype.hasOwnProperty,X=function(t,e,n){var r=t[e];(!G.call(t,e)||!l(r,n)||void 0===n&&!(e in t))&&Y(t,e,n)},$=function(t,e,n,r){var a=!n;n||(n={});for(var i=-1,o=e.length;++i<o;){var s=e[i],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),a?Y(n,s,l):X(n,s,l)}return n},K=function(t){return null!=t&&"object"==typeof t},J=function(t){return K(t)&&"[object Arguments]"==M(t)},Z=Object.prototype,Q=Z.hasOwnProperty,tt=Z.propertyIsEnumerable,et=J(function(){return arguments}())?J:function(t){return K(t)&&Q.call(t,"callee")&&!tt.call(t,"callee")},nt=Array.isArray,rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,at=rt&&"object"==typeof module&&module&&!module.nodeType&&module,it=at&&at.exports===rt?v.Buffer:void 0,ot=(it?it.isBuffer:void 0)||function(){return!1},st=/^(?:0|[1-9]\d*)$/,lt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&st.test(t))&&t>-1&&t%1==0&&t<e},ut=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;var dt=function(t){return function(e){return t(e)}},ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,ft=ht&&"object"==typeof module&&module&&!module.nodeType&&module,gt=ft&&ft.exports===ht&&g.process,pt=function(){try{return ft&&ft.require&&ft.require("util").types||gt&>.binding&>.binding("util")}catch(t){}}(),vt=pt&&pt.isTypedArray,mt=vt?dt(vt):function(t){return K(t)&&ut(t.length)&&!!ct[M(t)]},bt=Object.prototype.hasOwnProperty,yt=function(t,e){var n=nt(t),r=!n&&et(t),a=!n&&!r&&ot(t),i=!n&&!r&&!a&&mt(t),o=n||r||a||i,s=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var u in t)(e||bt.call(t,u))&&(!o||!("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||lt(u,l)))&&s.push(u);return s},xt=Object.prototype,_t=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)},kt=function(t,e){return function(n){return t(e(n))}},wt=kt(Object.keys,Object),Mt=Object.prototype.hasOwnProperty,Ct=function(t){return null!=t&&ut(t.length)&&!S(t)},St=function(t){return Ct(t)?yt(t):function(t){if(!_t(t))return wt(t);var e=[];for(var n in Object(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)},At=Object.prototype.hasOwnProperty,Pt=function(t){return Ct(t)?yt(t,!0):function(t){if(!C(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=_t(t),n=[];for(var r in t)"constructor"==r&&(e||!At.call(t,r))||n.push(r);return n}(t)},Dt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ot=Dt&&"object"==typeof module&&module&&!module.nodeType&&module,Tt=Ot&&Ot.exports===Dt?v.Buffer:void 0,It=Tt?Tt.allocUnsafe:void 0,Ft=function(){return[]},Lt=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Bt=Rt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,a=0,i=[];++n<r;){var o=t[n];e(o)&&(i[a++]=o)}return i}(Rt(t),function(e){return Lt.call(t,e)}))}:Ft,jt=function(t,e){for(var n=-1,r=e.length,a=t.length;++n<r;)t[a+n]=e[n];return t},zt=kt(Object.getPrototypeOf,Object),Et=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)jt(e,Bt(t)),t=zt(t);return e}:Ft,Nt=function(t,e,n){var r=e(t);return nt(t)?r:jt(r,n(t))},Wt=function(t){return Nt(t,St,Bt)},Vt=function(t){return Nt(t,Pt,Et)},Ht=F(v,"DataView"),Ut=F(v,"Promise"),qt=F(v,"Set"),Yt=F(v,"WeakMap"),Gt="[object Map]",Xt="[object Promise]",$t="[object Set]",Kt="[object WeakMap]",Jt="[object DataView]",Zt=O(Ht),Qt=O(L),te=O(Ut),ee=O(qt),ne=O(Yt),re=M;(Ht&&re(new Ht(new ArrayBuffer(1)))!=Jt||L&&re(new L)!=Gt||Ut&&re(Ut.resolve())!=Xt||qt&&re(new qt)!=$t||Yt&&re(new Yt)!=Kt)&&(re=function(t){var e=M(t),n="[object Object]"==e?t.constructor:void 0,r=n?O(n):"";if(r)switch(r){case Zt:return Jt;case Qt:return Gt;case te:return Xt;case ee:return $t;case ne:return Kt}return e});var ae=re,ie=Object.prototype.hasOwnProperty,oe=v.Uint8Array,se=function(t){var e=new t.constructor(t.byteLength);return new oe(e).set(new oe(t)),e},le=/\w*$/,ue=m?m.prototype:void 0,ce=ue?ue.valueOf:void 0,de=Object.create,he=function(){function t(){}return function(e){if(!C(e))return{};if(de)return de(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),fe=pt&&pt.isMap,ge=fe?dt(fe):function(t){return K(t)&&"[object Map]"==ae(t)},pe=pt&&pt.isSet,ve=pe?dt(pe):function(t){return K(t)&&"[object Set]"==ae(t)},me="[object Arguments]",be="[object Function]",ye="[object Object]",xe={};xe[me]=xe["[object Array]"]=xe["[object ArrayBuffer]"]=xe["[object DataView]"]=xe["[object Boolean]"]=xe["[object Date]"]=xe["[object Float32Array]"]=xe["[object Float64Array]"]=xe["[object Int8Array]"]=xe["[object Int16Array]"]=xe["[object Int32Array]"]=xe["[object Map]"]=xe["[object Number]"]=xe[ye]=xe["[object RegExp]"]=xe["[object Set]"]=xe["[object String]"]=xe["[object Symbol]"]=xe["[object Uint8Array]"]=xe["[object Uint8ClampedArray]"]=xe["[object Uint16Array]"]=xe["[object Uint32Array]"]=!0,xe["[object Error]"]=xe[be]=xe["[object WeakMap]"]=!1;var _e=function t(e,n,r,a,i,o){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=i?r(e,a,i,o):r(e)),void 0!==s)return s;if(!C(e))return e;var d=nt(e);if(d){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ie.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(e,s)}else{var h=ae(e),f=h==be||"[object GeneratorFunction]"==h;if(ot(e))return function(t,e){if(e)return t.slice();var n=t.length,r=It?It(n):new t.constructor(n);return t.copy(r),r}(e,l);if(h==ye||h==me||f&&!i){if(s=u||f?{}:function(t){return"function"!=typeof t.constructor||_t(t)?{}:he(zt(t))}(e),!l)return u?function(t,e){return $(t,Et(t),e)}(e,function(t,e){return t&&$(e,Pt(e),t)}(s,e)):function(t,e){return $(t,Bt(t),e)}(e,function(t,e){return t&&$(e,St(e),t)}(s,e))}else{if(!xe[h])return i?e:{};s=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return se(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return function(t,e){var n=e?se(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var n=e?se(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,le.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Set]":return new r;case"[object Symbol]":return function(t){return ce?Object(ce.call(t)):{}}(t)}}(e,h,l)}}o||(o=new U);var g=o.get(e);if(g)return g;o.set(e,s),ve(e)?e.forEach(function(a){s.add(t(a,n,r,a,e,o))}):ge(e)&&e.forEach(function(a,i){s.set(i,t(a,n,r,i,e,o))});var p=d?void 0:(c?u?Vt:Wt:u?Pt:St)(e);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n););}(p||e,function(a,i){p&&(a=e[i=a]),X(s,i,t(a,n,r,i,e,o))}),s},ke=i(6823),we=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]];function Me(t,e){return"rgba("+t.concat(e).join(",")+")"}function Ce(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Se(t){return{backgroundColor:t.map(function(t){return Me(t,.6)}),borderColor:t.map(function(){return"#fff"}),pointBackgroundColor:t.map(function(t){return Me(t,1)}),pointBorderColor:t.map(function(){return"#fff"}),pointHoverBackgroundColor:t.map(function(t){return Me(t,1)}),pointHoverBorderColor:t.map(function(t){return Me(t,1)})}}function Ae(){return[Ce(0,255),Ce(0,255),Ce(0,255)]}function Pe(t){return we[t]||Ae()}function De(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=we[n]||Ae();return e}var Oe=function(){var t=function(){function t(){n(this,t),this.pColorschemesOptions={},this.colorschemesOptions=new s.X({})}return a(t,[{key:"setColorschemesOptions",value:function(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}},{key:"getColorschemesOptions",value:function(){return this.pColorschemesOptions}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,o.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Te={Default:0,Update:1,Refresh:2};Te[Te.Default]="Default",Te[Te.Update]="Update",Te[Te.Refresh]="Refresh";var Ie=function(){var e=function(){function e(t,r){n(this,e),this.element=t,this.themeService=r,this.options={},this.chartClick=new o.vpe,this.chartHover=new o.vpe,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}return a(e,[{key:"ngOnInit",value:function(){var t=this;this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(function(e){return t.themeChanged(e)}))}},{key:"themeChanged",value:function(t){this.refresh()}},{key:"ngDoCheck",value:function(){var t=this;if(this.chart){var e=Te.Default,n=function(t){e=t>e?t:e};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,n(Te.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,n(Te.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,n(Te.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,n(Te.Update)),this.datasets&&this.datasets.filter(function(e,n){return e.data!==t.old.datasetsDataObjects[n]}).length&&(this.old.datasetsDataObjects=this.datasets.map(function(t){return t.data}),n(Te.Update)),this.datasets&&this.datasets.filter(function(e,n){return e.data.length!==t.old.datasetsDataLengths[n]}).length&&(this.old.datasetsDataLengths=this.datasets.map(function(t){return t.data.length}),n(Te.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),n(Te.Update)),this.colors&&this.colors.filter(function(e,n){return!t.colorsEqual(e,t.old.colors[n])}).length&&(this.old.colors=this.colors.map(function(e){return t.copyColor(e)}),this.updateColors(),n(Te.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,n(Te.Update)),this.labels&&this.labels.filter(function(e,n){return!t.labelsEqual(e,t.old.labels[n])}).length&&(this.old.labels=this.labels.map(function(e){return t.copyLabel(e)}),n(Te.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,n(Te.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,n(Te.Refresh)),e){case Te.Default:break;case Te.Update:this.update();break;case Te.Refresh:this.refresh()}}}},{key:"copyLabel",value:function(e){return Array.isArray(e)?t(e):e}},{key:"labelsEqual",value:function(t,e){return Array.isArray(t)===Array.isArray(e)&&(Array.isArray(t)||t===e)&&(!Array.isArray(t)||t.length===e.length)&&(!Array.isArray(t)||0===t.filter(function(t,n){return t!==e[n]}).length)}},{key:"copyColor",value:function(t){return{backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderColor:t.borderColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,pointBorderColor:t.pointBorderColor,pointBackgroundColor:t.pointBackgroundColor,pointBorderWidth:t.pointBorderWidth,pointRadius:t.pointRadius,pointHoverRadius:t.pointHoverRadius,pointHitRadius:t.pointHitRadius,pointHoverBackgroundColor:t.pointHoverBackgroundColor,pointHoverBorderColor:t.pointHoverBorderColor,pointHoverBorderWidth:t.pointHoverBorderWidth,pointStyle:t.pointStyle,hoverBackgroundColor:t.hoverBackgroundColor,hoverBorderColor:t.hoverBorderColor,hoverBorderWidth:t.hoverBorderWidth}}},{key:"colorsEqual",value:function(t,e){return!t==!e&&(!t||t.backgroundColor===e.backgroundColor&&t.borderWidth===e.borderWidth&&t.borderColor===e.borderColor&&t.borderCapStyle===e.borderCapStyle&&t.borderDash===e.borderDash&&t.borderDashOffset===e.borderDashOffset&&t.borderJoinStyle===e.borderJoinStyle&&t.pointBorderColor===e.pointBorderColor&&t.pointBackgroundColor===e.pointBackgroundColor&&t.pointBorderWidth===e.pointBorderWidth&&t.pointRadius===e.pointRadius&&t.pointHoverRadius===e.pointHoverRadius&&t.pointHitRadius===e.pointHitRadius&&t.pointHoverBackgroundColor===e.pointHoverBackgroundColor&&t.pointHoverBorderColor===e.pointHoverBorderColor&&t.pointHoverBorderWidth===e.pointHoverBorderWidth&&t.pointStyle===e.pointStyle&&t.hoverBackgroundColor===e.hoverBackgroundColor&&t.hoverBorderColor===e.hoverBorderColor&&t.hoverBorderWidth===e.hoverBorderWidth)}},{key:"updateColors",value:function(){var t=this;this.datasets.forEach(function(e,n){t.colors&&t.colors[n]?Object.assign(e,t.colors[n]):Object.assign(e,function(t,e,n){if("pie"===t||"doughnut"===t)return Se(De(n));if("polarArea"===t)return function(t){return{backgroundColor:t.map(function(t){return Me(t,.6)}),borderColor:t.map(function(t){return Me(t,1)}),hoverBackgroundColor:t.map(function(t){return Me(t,.8)}),hoverBorderColor:t.map(function(t){return Me(t,1)})}}(De(n));if("line"===t||"radar"===t)return function(t){return{backgroundColor:Me(t,.4),borderColor:Me(t,1),pointBackgroundColor:Me(t,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:Me(t,.8)}}(Pe(e));if("bar"===t||"horizontalBar"===t)return function(t){return{backgroundColor:Me(t,.6),borderColor:Me(t,1),hoverBackgroundColor:Me(t,.8),hoverBorderColor:Me(t,1)}}(Pe(e));if("bubble"===t||"scatter"===t)return Se(De(n));throw new Error("getColors - Unsupported chart type: "+t)}(t.chartType,n,e.data.length),Object.assign({},e))})}},{key:"ngOnChanges",value:function(t){var e=Te.Default,n=function(t){e=t>e?t:e};switch(t.hasOwnProperty("data")&&t.data.currentValue&&(this.propagateDataToDatasets(t.data.currentValue),n(Te.Update)),t.hasOwnProperty("datasets")&&t.datasets.currentValue&&(this.propagateDatasetsToData(t.datasets.currentValue),n(Te.Update)),t.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=t.labels.currentValue),n(Te.Update)),t.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=t.legend.currentValue,this.chart.generateLegend()),n(Te.Update)),t.hasOwnProperty("options")&&n(Te.Refresh),e){case Te.Update:this.update();break;case Te.Refresh:case Te.Default:this.refresh()}}},{key:"ngOnDestroy",value:function(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(function(t){return t.unsubscribe()})}},{key:"update",value:function(t){if(this.chart)return this.chart.update(t)}},{key:"hideDataset",value:function(t,e){this.chart.getDatasetMeta(t).hidden=e,this.chart.update()}},{key:"isDatasetHidden",value:function(t){return this.chart.getDatasetMeta(t).hidden}},{key:"toBase64Image",value:function(){return this.chart.toBase64Image()}},{key:"getChartConfiguration",value:function(){var t=this,e=this.getDatasets(),n=Object.assign({},this.options);!1===this.legend&&(n.legend={display:!1}),n.hover=n.hover||{},n.hover.onHover||(n.hover.onHover=function(e,n){n&&!n.length||t.chartHover.emit({event:e,active:n})}),n.onClick||(n.onClick=function(e,n){t.chartClick.emit({event:e,active:n})});var r=this.smartMerge(n,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:e},plugins:this.plugins,options:r}}},{key:"getChartBuilder",value:function(t){var e=this.getChartConfiguration();return new ke.Chart(t,e)}},{key:"smartMerge",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0===r&&(t=function(t){return _e(t,5)}(t)),Object.keys(e).forEach(function(a){if(Array.isArray(e[a])){var i=t[a];i&&i.forEach(function(t){n.smartMerge(t,e[a][0],r+1)})}else"object"==typeof e[a]?(a in t||(t[a]={}),n.smartMerge(t[a],e[a],r+1)):t[a]=e[a]}),0===r)return t}},{key:"isMultiLineLabel",value:function(t){return Array.isArray(t)}},{key:"joinLabel",value:function(t){return t?this.isMultiLineLabel(t)?t.join(" "):t:null}},{key:"propagateDatasetsToData",value:function(t){this.data=this.datasets.map(function(t){return t.data}),this.chart&&(this.chart.data.datasets=t),this.updateColors()}},{key:"propagateDataToDatasets",value:function(t){var e=this;this.isMultiDataSet(t)?this.datasets&&t.length===this.datasets.length?this.datasets.forEach(function(e,n){e.data=t[n]}):(this.datasets=t.map(function(t,n){return{data:t,label:e.joinLabel(e.labels[n])||"Label ".concat(n)}}),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0]||(this.datasets[0]={}),this.datasets[0].data=t,this.datasets.splice(1)):(this.datasets=[{data:t}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}},{key:"isMultiDataSet",value:function(t){return Array.isArray(t[0])}},{key:"getDatasets",value:function(){if(!this.datasets&&!this.data)throw new Error("ng-charts configuration error, data or datasets field are required to render chart ".concat(this.chartType));return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}},{key:"refresh",value:function(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}],[{key:"registerPlugin",value:function(t){ke.pluginService.register(t)}},{key:"unregisterPlugin",value:function(t){ke.pluginService.unregister(t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(Oe))},e.\u0275dir=o.lG2({type:e,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[o.TTD]}),e}(),Fe=function(){var t=function t(){n(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[]]}),t}()}}])}();