← Back
Editing: admin-reports-widget.js
(()=>{var t={62477:function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[e[o]]=o);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 r=a[i].channels,l=a[i].labels;delete a[i].channels,delete a[i].labels,Object.defineProperty(a[i],"channels",{value:r}),Object.defineProperty(a[i],"labels",{value:l})}a.rgb.hsl=function(t){var e,n,o=t[0]/255,a=t[1]/255,i=t[2]/255,r=Math.min(o,a,i),l=Math.max(o,a,i),s=l-r;return l===r?e=0:o===l?e=(a-i)/s:a===l?e=2+(i-o)/s:i===l&&(e=4+(o-a)/s),(e=Math.min(60*e,360))<0&&(e+=360),n=(r+l)/2,[e,100*(l===r?0:n<=.5?s/(l+r):s/(2-l-r)),100*n]},a.rgb.hsv=function(t){var e,n,o,a,i,r=t[0]/255,l=t[1]/255,s=t[2]/255,d=Math.max(r,l,s),u=d-Math.min(r,l,s),c=function(t){return(d-t)/6/u+.5};return 0===u?a=i=0:(i=u/d,e=c(r),n=c(l),o=c(s),r===d?a=o-n:l===d?a=1/3+e-o:s===d&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*d]},a.rgb.hwb=function(t){var e=t[0],n=t[1],o=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,o))*100,100*(o=1-1/255*Math.max(e,Math.max(n,o)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,o=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-o,1-a)))/(1-e)||0),100*((1-o-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var o=n[t];if(o)return o;var a,i,r,l=1/0;for(var s in e)if(e.hasOwnProperty(s)){var d=(i=t,r=e[s],Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2)+Math.pow(i[2]-r[2],2));d<l&&(l=d,a=s)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,o=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*(o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92)),100*(.2126*e+.7152*n+.0722*o),100*(.0193*e+.1192*n+.9505*o)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],o=e[1],i=e[2];return o/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116)-16,500*(n-o),200*(o-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(t){var e,n,o,a,i,r=t[0]/360,l=t[1]/100,s=t[2]/100;if(0===l)return[i=255*s,i,i];e=2*s-(n=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var d=0;d<3;d++)(o=r+1/3*-(d-1))<0&&o++,o>1&&o--,i=6*o<1?e+6*(n-e)*o:2*o<1?n:3*o<2?e+(n-e)*(2/3-o)*6:e,a[d]=255*i;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,o=t[2]/100,a=n,i=Math.max(o,.01);return n*=(o*=2)<=1?o:2-o,a*=i<=1?i:2-i,[e,100*(0===o?2*a/(i+a):2*n/(o+n)),(o+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,o=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),r=255*o*(1-n),l=255*o*(1-n*i),s=255*o*(1-n*(1-i));switch(o*=255,a){case 0:return[o,s,r];case 1:return[l,o,r];case 2:return[r,o,s];case 3:return[r,l,o];case 4:return[s,r,o];case 5:return[o,r,l]}},a.hsv.hsl=function(t){var e,n,o,a=t[0],i=t[1]/100,r=t[2]/100,l=Math.max(r,.01);return o=(2-i)*r,n=i*l,[a,100*(n=(n/=(e=(2-i)*l)<=1?e:2-e)||0),100*(o/=2)]},a.hwb.rgb=function(t){var e,n,o,a,i,r,l,s=t[0]/360,d=t[1]/100,u=t[2]/100,c=d+u;switch(c>1&&(d/=c,u/=c),o=6*s-(e=Math.floor(6*s)),1&e&&(o=1-o),a=d+o*((n=1-u)-d),e){default:case 6:case 0:i=n,r=a,l=d;break;case 1:i=a,r=n,l=d;break;case 2:i=d,r=n,l=a;break;case 3:i=d,r=a,l=n;break;case 4:i=a,r=d,l=n;break;case 5:i=n,r=d,l=a}return[255*i,255*r,255*l]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,o=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,o*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,o,a=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*a+1.8758*i+.0415*r,o=.0557*a+-.204*i+1.057*r,e=(e=3.2406*a+-1.5372*i+-.4986*r)>.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,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:12.92*o,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(o=Math.min(Math.max(0,o),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],o=t[2];return n/=100,o/=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-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.lab.xyz=function(t){var e,n,o,a=t[0];e=t[1]/500+(n=(a+16)/116),o=n-t[2]/200;var i=Math.pow(n,3),r=Math.pow(e,3),l=Math.pow(o,3);return n=i>.008856?i:(n-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,[e*=95.047,n*=100,o*=108.883]},a.lab.lch=function(t){var e,n=t[0],o=t[1],a=t[2];return(e=360*Math.atan2(a,o)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(o*o+a*a),e]},a.lch.lab=function(t){var e,n=t[0],o=t[1];return e=t[2]/360*2*Math.PI,[n,o*Math.cos(e),o*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],o=t[2],i=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var r=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===i&&(r+=60),r},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],o=t[2];return e===n&&n===o?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(o/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 o=parseInt(n,16);return[o>>16&255,o>>8&255,255&o]},a.rgb.hcg=function(t){var e,n=t[0]/255,o=t[1]/255,a=t[2]/255,i=Math.max(Math.max(n,o),a),r=Math.min(Math.min(n,o),a),l=i-r;return e=l<=0?0:i===n?(o-a)/l%6:i===o?2+(a-n)/l:4+(n-o)/l+4,e/=6,[360*(e%=1),100*l,100*(l<1?r/(1-l):0)]},a.hsl.hcg=function(t){var e,n=t[1]/100,o=t[2]/100,a=0;return(e=o<.5?2*n*o:2*n*(1-o))<1&&(a=(o-.5*e)/(1-e)),[t[0],100*e,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,o=e*n,a=0;return o<1&&(a=(n-o)/(1-o)),[t[0],100*o,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,o=t[2]/100;if(0===n)return[255*o,255*o,255*o];var a,i=[0,0,0],r=e%1*6,l=r%1,s=1-l;switch(Math.floor(r)){case 0:i[0]=1,i[1]=l,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=l;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=l,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return a=(1-n)*o,[255*(n*i[0]+a),255*(n*i[1]+a),255*(n*i[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),o=0;return n>0&&(o=e/n),[t[0],100*o,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,o=0;return n>0&&n<.5?o=e/(2*n):n>=.5&&n<1&&(o=e/(2*(1-n))),[t[0],100*o,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=t[1]/100,n=1-t[2]/100,o=n-e,a=0;return o<1&&(a=(n-o)/(1-o)),[t[0],100*o,100*a]},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]}}));function o(t){var e=function(){for(var t={},e=Object.keys(n),o=e.length,a=0;a<o;a++)t[e[a]]={distance:-1,parent:null};return t}(),o=[t];for(e[t].distance=0;o.length;)for(var a=o.pop(),i=Object.keys(n[a]),r=i.length,l=0;l<r;l++){var s=i[l],d=e[s];-1===d.distance&&(d.distance=e[a].distance+1,d.parent=a,o.unshift(s))}return e}function a(t,e){return function(n){return e(t(n))}}function i(t,e){for(var o=[e[t].parent,t],i=n[e[t].parent][t],r=e[t].parent;e[r].parent;)o.unshift(e[r].parent),i=a(n[e[r].parent][r],i),r=e[r].parent;return i.conversion=o,i}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var r={};Object.keys(n).forEach((function(t){r[t]={},Object.defineProperty(r[t],"channels",{value:n[t].channels}),Object.defineProperty(r[t],"labels",{value:n[t].labels});var e=function(t){for(var e=o(t),n={},a=Object.keys(e),r=a.length,l=0;l<r;l++){var s=a[l];null!==e[s].parent&&(n[s]=i(s,e))}return n}(t);Object.keys(e).forEach((function(n){var o=e[n];r[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 o=n.length,a=0;a<o;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(o),r[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}(o)}))}));var l=r,s={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]},d={getRgba:u,getHsla:c,getRgb:function(t){var e=u(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:h,getAlpha:function(t){var e=u(t);return e||(e=c(t))||(e=h(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(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 u(t){if(t){var e=[0,0,0],n=1,o=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(o){a=(o=o[1])[3];for(var i=0;i<e.length;i++)e[i]=parseInt(o[i]+o[i],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(o=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=o[2],o=o[1],i=0;i<e.length;i++)e[i]=parseInt(o.slice(2*i,2*i+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(o=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(o[i+1]);n=parseFloat(o[4])}else if(o=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(o[i+1]));n=parseFloat(o[4])}else if(o=t.match(/(\w+)/)){if("transparent"==o[1])return[0,0,0,0];if(!(e=s[o[1]]))return}for(i=0;i<e.length;i++)e[i]=m(e[i],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function c(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[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(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[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(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 m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var y in s)b[s[y]]=y;var x=function(t){return t instanceof x?t:this instanceof x?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=d.getRgba(t))?this.setValues("rgb",e):(e=d.getHsla(t))?this.setValues("hsl",e):(e=d.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new x(t);var e};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 d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.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 o=t[n]/255;e[n]=o<=.03928?o/12.92:Math.pow((o+.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,o=t,a=void 0===e?.5:e,i=2*a-1,r=n.alpha()-o.alpha(),l=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,s=1-l;return this.rgb(l*n.red()+s*o.red(),l*n.green()+s*o.green(),l*n.blue()+s*o.blue()).alpha(n.alpha()*a+o.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new x,o=this.values,a=n.values;for(var i in o)o.hasOwnProperty(i)&&(t=o[i],"[object Array]"===(e={}.toString.call(t))?a[i]=t.slice(0):"[object Number]"===e?a[i]=t:console.error("unexpected color value:",t));return n}},x.prototype.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={},o=0;o<t.length;o++)n[t.charAt(o)]=e[t][o];return 1!==e.alpha&&(n.a=e.alpha),n},x.prototype.setValues=function(t,e){var n,o,a=this.values,i=this.spaces,r=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=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)];s=e.a}else if(void 0!==e[i[t][0]]){var d=i[t];for(n=0;n<t.length;n++)a[t][n]=e[d[n]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)o=Math.max(0,Math.min(r[t][n],a[t][n])),a[t][n]=Math.round(o);for(var u in i)u!==t&&(a[u]=l[t][u](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 o=this.values[t];return void 0===n?o[e]:(n===o[e]||(o[e]=n,this.setValues(t,o)),this)},"undefined"!=typeof window&&(window.Color=x);var _=x;function w(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var M,k={noop:function(){},uid:(M=0,function(){return M++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return k.valueOrDefault(k.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,o){var a,i,r;if(k.isArray(t))if(i=t.length,o)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(k.isObject(t))for(i=(r=Object.keys(t)).length,a=0;a<i;a++)e.call(n,t[r[a]],r[a])},arrayEquals:function(t,e){var n,o,a,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(a=t[n],i=e[n],a instanceof Array&&i instanceof Array){if(!k.arrayEquals(a,i))return!1}else if(a!==i)return!1;return!0},clone:function(t){if(k.isArray(t))return t.map(k.clone);if(k.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),o=n.length,a=0;a<o;++a)e[n[a]]=k.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,o){if(w(t)){var a=e[t],i=n[t];k.isObject(a)&&k.isObject(i)?k.merge(a,i,o):e[t]=k.clone(i)}},_mergerIf:function(t,e,n){if(w(t)){var o=e[t],a=n[t];k.isObject(o)&&k.isObject(a)?k.mergeIf(o,a):e.hasOwnProperty(t)||(e[t]=k.clone(a))}},merge:function(t,e,n){var o,a,i,r,l,s=k.isArray(e)?e:[e],d=s.length;if(!k.isObject(t))return t;for(o=(n=n||{}).merger||k._merger,a=0;a<d;++a)if(e=s[a],k.isObject(e))for(l=0,r=(i=Object.keys(e)).length;l<r;++l)o(i[l],t,e,n);return t},mergeIf:function(t,e){return k.merge(t,e,{merger:k._mergerIf})},extend:Object.assign||function(t){return k.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)},o=function(){this.constructor=n};return o.prototype=e.prototype,n.prototype=new o,n.extend=k.inherits,t&&k.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,o){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+o+'" instead')}},T=k;k.callCallback=k.callback,k.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},k.getValueOrDefault=k.valueOrDefault,k.getValueAtIndexOrDefault=k.valueAtIndexOrDefault;var D={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,o=1;return 0===t?0:1===t?1:(n||(n=.3),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),-o*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,o=1;return 0===t?0:1===t?1:(n||(n=.3),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),o*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,o=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),t<1?o*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:o*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-D.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*D.easeInBounce(2*t):.5*D.easeOutBounce(2*t-1)+.5}},S={effects:D};T.easingEffects=D;var R=Math.PI,F=R/180,A=2*R,C=R/2,P=R/4,I=2*R/3,E={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,o,a,i){if(i){var r=Math.min(i,a/2,o/2),l=e+r,s=n+r,d=e+o-r,u=n+a-r;t.moveTo(e,s),l<d&&s<u?(t.arc(l,s,r,-R,-C),t.arc(d,s,r,-C,0),t.arc(d,u,r,0,C),t.arc(l,u,r,C,R)):l<d?(t.moveTo(l,n),t.arc(d,s,r,-C,C),t.arc(l,s,r,C,R+C)):s<u?(t.arc(l,s,r,-R,0),t.arc(l,u,r,0,R)):t.arc(l,s,r,-R,R),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,o,a)},drawPoint:function(t,e,n,o,a,i){var r,l,s,d,u,c=(i||0)*F;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(r=e.toString())||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(o,a),t.rotate(c),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(o,a,n,0,A),t.closePath();break;case"triangle":t.moveTo(o+Math.sin(c)*n,a-Math.cos(c)*n),c+=I,t.lineTo(o+Math.sin(c)*n,a-Math.cos(c)*n),c+=I,t.lineTo(o+Math.sin(c)*n,a-Math.cos(c)*n),t.closePath();break;case"rectRounded":d=n-(u=.516*n),l=Math.cos(c+P)*d,s=Math.sin(c+P)*d,t.arc(o-l,a-s,u,c-R,c-C),t.arc(o+s,a-l,u,c-C,c),t.arc(o+l,a+s,u,c,c+C),t.arc(o-s,a+l,u,c+C,c+R),t.closePath();break;case"rect":if(!i){d=Math.SQRT1_2*n,t.rect(o-d,a-d,2*d,2*d);break}c+=P;case"rectRot":l=Math.cos(c)*n,s=Math.sin(c)*n,t.moveTo(o-l,a-s),t.lineTo(o+s,a-l),t.lineTo(o+l,a+s),t.lineTo(o-s,a+l),t.closePath();break;case"crossRot":c+=P;case"cross":l=Math.cos(c)*n,s=Math.sin(c)*n,t.moveTo(o-l,a-s),t.lineTo(o+l,a+s),t.moveTo(o+s,a-l),t.lineTo(o-s,a+l);break;case"star":l=Math.cos(c)*n,s=Math.sin(c)*n,t.moveTo(o-l,a-s),t.lineTo(o+l,a+s),t.moveTo(o+s,a-l),t.lineTo(o-s,a+l),c+=P,l=Math.cos(c)*n,s=Math.sin(c)*n,t.moveTo(o-l,a-s),t.lineTo(o+l,a+s),t.moveTo(o+s,a-l),t.lineTo(o-s,a+l);break;case"line":l=Math.cos(c)*n,s=Math.sin(c)*n,t.moveTo(o-l,a-s),t.lineTo(o+l,a+s);break;case"dash":t.moveTo(o,a),t.lineTo(o+Math.cos(c)*n,a+Math.sin(c)*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,o){var a=n.steppedLine;if(a){if("middle"===a){var i=(e.x+n.x)/2;t.lineTo(i,o?n.y:e.y),t.lineTo(i,o?e.y:n.y)}else"after"===a&&!o||"after"!==a&&o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(o?e.controlPointPreviousX:e.controlPointNextX,o?e.controlPointPreviousY:e.controlPointNextY,o?n.controlPointNextX:n.controlPointPreviousX,o?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},L=E;T.clear=E.clear,T.drawRoundedRectangle=function(t){t.beginPath(),E.roundedRect.apply(E,arguments)};var O={_set:function(t,e){return T.merge(this[t]||(this[t]={}),e)}};O._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 N=O,W=T.valueOrDefault;var B={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,o,a;return T.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,a=+t.left||0):e=n=o=a=+t||0,{top:e,right:n,bottom:o,left:a,height:e+o,width:a+n}},_parseFont:function(t){var e=N.global,n=W(t.fontSize,e.defaultFontSize),o={family:W(t.fontFamily,e.defaultFontFamily),lineHeight:T.options.toLineHeight(W(t.lineHeight,e.defaultLineHeight),n),size:n,style:W(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return o.string=function(t){return!t||T.isNullOrUndef(t.size)||T.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o},resolve:function(t,e,n,o){var a,i,r,l=!0;for(a=0,i=t.length;a<i;++a)if(void 0!==(r=t[a])&&(void 0!==e&&"function"==typeof r&&(r=r(e),l=!1),void 0!==n&&T.isArray(r)&&(r=r[n],l=!1),void 0!==r))return o&&!l&&(o.cacheable=!1),r}},z={_factorize:function(t){var e,n=[],o=Math.sqrt(t);for(e=1;e<o;e++)t%e==0&&(n.push(e),n.push(t/e));return o===(0|o)&&n.push(o),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}},$=z;T.log10=z.log10;var V=T,H=S,j=L,q=B,Y=$,U={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,o;"ltr"!==e&&"rtl"!==e||(o=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};V.easing=H,V.canvas=j,V.options=q,V.math=Y,V.rtl=U;var G=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(G.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,o=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),o||(o=e._start={}),function(t,e,n,o){var a,i,r,l,s,d,u,c,h,f=Object.keys(n);for(a=0,i=f.length;a<i;++a)if(d=n[r=f[a]],e.hasOwnProperty(r)||(e[r]=d),(l=e[r])!==d&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=l),(u=typeof d)==typeof(s=t[r]))if("string"===u){if((c=_(s)).valid&&(h=_(d)).valid){e[r]=h.mix(c,o).rgbString();continue}}else if(V.isFinite(s)&&V.isFinite(d)){e[r]=s+(d-s)*o;continue}e[r]=d}}(o,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)}}),G.extend=V.inherits;var X=G,K=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=K;Object.defineProperty(K.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(K.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,o){var a,i,r=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,o||(t.animating=!0),a=0,i=r.length;a<i;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.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,o,a=this.animations,i=0;i<a.length;)e=(t=a[i]).chart,n=t.numSteps,o=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(o,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}},Q=V.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var o=n.listeners,a=o.indexOf(e);-1!==a&&o.splice(a,1),o.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};V.extend(nt.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,o=n.scales,a=t.getDataset(),i=n.options.scales;null!==e.xAxisID&&e.xAxisID in o&&!a.xAxisID||(e.xAxisID=a.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in o&&!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&&et(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,o=n.getMeta(),a=n.getDataset().data||[],i=o.data;for(t=0,e=a.length;t<e;++t)i[t]=i[t]||n.createMetaData(t);o.dataset=o.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,e,n=this,o=n.getDataset(),a=o.data||(o.data=[]);n._data!==a&&(n._data&&et(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=o.apply(this,e);return V.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.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||[],o=n.length,a=0;a<o;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,o=0;for(t.dataset&&t.dataset.draw();o<n;++o)e[o].draw()},getStyle:function(t){var e,n=this,o=n.getMeta(),a=o.dataset;return n._configure(),a&&void 0===t?e=n._resolveDatasetElementOptions(a||{}):(t=t||0,e=n._resolveDataElementOptions(o.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,o,a,i,r=this,l=r.chart,s=r._config,d=t.custom||{},u=l.options.elements[r.datasetElementType.prototype._type]||{},c=r._datasetElementOptions,h={},f={chart:l,dataset:r.getDataset(),datasetIndex:r.index,hover:e};for(n=0,o=c.length;n<o;++n)a=c[n],i=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,h[a]=Q([d[i],s[i],u[i]],f);return h},_resolveDataElementOptions:function(t,e){var n=this,o=t&&t.custom,a=n._cachedDataOpts;if(a&&!o)return a;var i,r,l,s,d=n.chart,u=n._config,c=d.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},g={chart:d,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!o};if(o=o||{},V.isArray(h))for(r=0,l=h.length;r<l;++r)f[s=h[r]]=Q([o[s],u[s],c[s]],g,e,p);else for(r=0,l=(i=Object.keys(h)).length;r<l;++r)f[s=i[r]]=Q([o[s],u[h[s]],u[s],c[s]],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,o=t.custom||{},a=t._model,i=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=Q([o.hoverBackgroundColor,e.hoverBackgroundColor,i(a.backgroundColor)],void 0,n),a.borderColor=Q([o.hoverBorderColor,e.hoverBorderColor,i(a.borderColor)],void 0,n),a.borderWidth=Q([o.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,o,a,i,r=this.getMeta().dataset,l={};if(r){for(i=r._model,a=this._resolveDatasetElementOptions(r,!0),t=0,e=(o=Object.keys(a)).length;t<e;++t)l[n=o[t]]=i[n],i[n]=a[n];r.$previousStyle=l}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,o=e.data.length,a=n.length;a<o?e.data.splice(a,o-a):a>o&&t.insertElements(o,a-o)},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)}}),nt.extend=V.inherits;var ot=nt,at=2*Math.PI;function it(t,e){var n=e.startAngle,o=e.endAngle,a=e.pixelMargin,i=a/e.outerRadius,r=e.x,l=e.y;t.beginPath(),t.arc(r,l,e.outerRadius,n-i,o+i),e.innerRadius>a?(i=a/e.innerRadius,t.arc(r,l,e.innerRadius-a,o+i,n-i,!0)):t.arc(r,l,a,o+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var o="inner"===e.borderAlign;o?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,o){var a,i=n.endAngle;for(o&&(n.endAngle=n.startAngle+at,it(t,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,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+at),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,o),o&&it(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()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var lt=X.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 o=V.getAngleFromPoint(n,{x:t,y:e}),a=o.angle,i=o.distance,r=n.startAngle,l=n.endAngle;l<r;)l+=at;for(;a>l;)a-=at;for(;a<r;)a+=at;var s=a>=r&&a<=l,d=i>=n.innerRadius&&i<=n.outerRadius;return s&&d}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,o="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-o,0),pixelMargin:o,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,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%at}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&&rt(e,n,a),e.restore()}}),st=V.valueOrDefault,dt=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:dt,borderWidth:3,borderColor:dt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ut=X.extend({_type:"line",draw:function(){var t,e,n,o=this,a=o._view,i=o._chart.ctx,r=a.spanGaps,l=o._children.slice(),s=N.global,d=s.elements.line,u=-1,c=o._loop;if(l.length){if(o._loop){for(t=0;t<l.length;++t)if(e=V.previousItem(l,t),!l[t]._view.skip&&e._view.skip){l=l.slice(t).concat(l.slice(0,t)),c=r;break}c&&l.push(l[0])}for(i.save(),i.lineCap=a.borderCapStyle||d.borderCapStyle,i.setLineDash&&i.setLineDash(a.borderDash||d.borderDash),i.lineDashOffset=st(a.borderDashOffset,d.borderDashOffset),i.lineJoin=a.borderJoinStyle||d.borderJoinStyle,i.lineWidth=st(a.borderWidth,d.borderWidth),i.strokeStyle=a.borderColor||s.defaultColor,i.beginPath(),(n=l[0]._view).skip||(i.moveTo(n.x,n.y),u=0),t=1;t<l.length;++t)n=l[t]._view,e=-1===u?V.previousItem(l,t):l[u],n.skip||(u!==t-1&&!r||-1===u?i.moveTo(n.x,n.y):V.canvas.lineTo(i,e._view,n),u=t);c&&i.closePath(),i.stroke(),i.restore()}}}),ct=V.valueOrDefault,ht=N.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=X.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:ft,inXRange:ft,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,o=e.pointStyle,a=e.rotation,i=e.radius,r=e.x,l=e.y,s=N.global,d=s.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||d,n.lineWidth=ct(e.borderWidth,s.elements.point.borderWidth),n.fillStyle=e.backgroundColor||d,V.canvas.drawPoint(n,o,i,r,l,a))}}),pt=N.global.defaultColor;function mt(t){return t&&void 0!==t.width}function vt(t){var e,n,o,a,i;return mt(t)?(i=t.width/2,e=t.x-i,n=t.x+i,o=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),o=t.y-i,a=t.y+i),{left:e,top:o,right:n,bottom:a}}function bt(t,e,n){return t===e?n:t===n?e:t}function yt(t,e,n){var o,a,i,r,l=t.borderWidth,s=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=bt(e,"left","right")):t.base<t.y&&(e=bt(e,"bottom","top")),n[e]=!0,n):n}(t);return V.isObject(l)?(o=+l.top||0,a=+l.right||0,i=+l.bottom||0,r=+l.left||0):o=a=i=r=+l||0,{t:s.top||o<0?0:o>n?n:o,r:s.right||a<0?0:a>e?e:a,b:s.bottom||i<0?0:i>n?n:i,l:s.left||r<0?0:r>e?e:r}}function xt(t,e,n){var o=null===e,a=null===n,i=!(!t||o&&a)&&vt(t);return i&&(o||e>=i.left&&e<=i.right)&&(a||n>=i.top&&n<=i.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var _t=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,o=e.bottom-e.top,a=yt(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:o-a.t-a.b}}}(e),o=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(o.x,o.y,o.w,o.h),o.w===a.w&&o.h===a.h||(t.save(),t.beginPath(),t.rect(o.x,o.y,o.w,o.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 xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(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 mt(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}}}),wt={},Mt=lt,kt=ut,Tt=gt,Dt=_t;wt.Arc=Mt,wt.Line=kt,wt.Point=Tt,wt.Rectangle=Dt;var St=V._deprecated,Rt=V.valueOrDefault;function Ft(t,e,n){var o,a,i=n.barThickness,r=e.stackCount,l=e.pixels[t],s=V.isNullOrUndef(i)?function(t,e){var n,o,a,i,r=t._length;for(a=1,i=e.length;a<i;++a)r=Math.min(r,Math.abs(e[a]-e[a-1]));for(a=0,i=t.getTicks().length;a<i;++a)o=t.getPixelForTick(a),r=a>0?Math.min(r,Math.abs(o-n)):r,n=o;return r}(e.scale,e.pixels):-1;return V.isNullOrUndef(i)?(o=s*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:l-o/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var At=ot.extend({dataElementType:wt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;ot.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,St("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),St("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),St("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),St("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),St("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,o=this,a=o.getMeta().data;for(o._ruler=o.getRuler(),e=0,n=a.length;e<n;++e)o.updateElement(a[e],e,t)},updateElement:function(t,e,n){var o=this,a=o.getMeta(),i=o.getDataset(),r=o._resolveDataElementOptions(t,e);t._xScale=o.getScaleForId(a.xAxisID),t._yScale=o.getScaleForId(a.yAxisID),t._datasetIndex=o.index,t._index=e,t._model={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderSkipped:r.borderSkipped,borderWidth:r.borderWidth,datasetLabel:i.label,label:o.chart.data.labels[e]},V.isArray(i.data[e])&&(t._model.borderSkipped=null),o._updateElementGeometry(t,e,n,r),t.pivot()},_updateElementGeometry:function(t,e,n,o){var a=this,i=t._model,r=a._getValueScale(),l=r.getBasePixel(),s=r.isHorizontal(),d=a._ruler||a.getRuler(),u=a.calculateBarValuePixels(a.index,e,o),c=a.calculateBarIndexPixels(a.index,e,d,o);i.horizontal=s,i.base=n?l:u.base,i.x=s?n?l:u.head:c.center,i.y=s?c.center:n?l:u.head,i.height=s?c.size:void 0,i.width=s?void 0:c.size},_getStacks:function(t){var e,n,o=this._getIndexScale(),a=o._getMatchingVisibleMetas(this._type),i=o.options.stacked,r=a.length,l=[];for(e=0;e<r&&(n=a[e],(!1===i||-1===l.indexOf(n.stack)||void 0===i&&void 0===n.stack)&&l.push(n.stack),n.index!==t);++e);return l},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o},getRuler:function(){var t,e,n=this,o=n._getIndexScale(),a=[];for(t=0,e=n.getMeta().data.length;t<e;++t)a.push(o.getPixelForValue(null,t,n.index));return{pixels:a,start:o._startPixel,end:o._endPixel,stackCount:n.getStackCount(),scale:o}},calculateBarValuePixels:function(t,e,n){var o,a,i,r,l,s,d,u=this,c=u.chart,h=u._getValueScale(),f=h.isHorizontal(),g=c.data.datasets,p=h._getMatchingVisibleMetas(u._type),m=h._parseValue(g[t].data[e]),v=n.minBarLength,b=h.options.stacked,y=u.getMeta().stack,x=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,_=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=p.length;if(b||void 0===b&&void 0!==y)for(o=0;o<w&&(a=p[o]).index!==t;++o)a.stack===y&&(i=void 0===(d=h._parseValue(g[a.index].data[e])).start?d.end:d.min>=0&&d.max>=0?d.max:d.min,(m.min<0&&i<0||m.max>=0&&i>0)&&(x+=i));return r=h.getPixelForValue(x),s=(l=h.getPixelForValue(x+_))-r,void 0!==v&&Math.abs(s)<v&&(s=v,l=_>=0&&!f||_<0&&f?r-v:r+v),{size:s,base:r,head:l,center:l+s/2}},calculateBarIndexPixels:function(t,e,n,o){var a="flex"===o.barThickness?function(t,e,n){var o,a=e.pixels,i=a[t],r=t>0?a[t-1]:null,l=t<a.length-1?a[t+1]:null,s=n.categoryPercentage;return null===r&&(r=i-(null===l?e.end-e.start:l-i)),null===l&&(l=i+i-r),o=i-(i-Math.min(r,l))/2*s,{chunk:Math.abs(l-r)/2*s/e.stackCount,ratio:n.barPercentage,start:o}}(e,n,o):Ft(e,n,o),i=this.getStackIndex(t,this.getMeta().stack),r=a.start+a.chunk*i+a.chunk/2,l=Math.min(Rt(o.maxBarThickness,1/0),a.chunk*a.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),o=t.getMeta().data,a=t.getDataset(),i=o.length,r=0;for(V.canvas.clipArea(e.ctx,e.chartArea);r<i;++r){var l=n._parseValue(a.data[r]);isNaN(l.min)||isNaN(l.max)||o[r].draw()}V.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},ot.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,o=t._getValueScale().options;return e.barPercentage=Rt(n.barPercentage,e.barPercentage),e.barThickness=Rt(n.barThickness,e.barThickness),e.categoryPercentage=Rt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Rt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Rt(o.minBarLength,e.minBarLength),e}}),Ct=V.valueOrDefault,Pt=V.options.resolve;N._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){var n=e.datasets[t.datasetIndex].label||"",o=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+o.r+")"}}}});var It=ot.extend({dataElementType:wt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;V.each(n,(function(n,o){e.updateElement(n,o,t)}))},updateElement:function(t,e,n){var o=this,a=o.getMeta(),i=t.custom||{},r=o.getScaleForId(a.xAxisID),l=o.getScaleForId(a.yAxisID),s=o._resolveDataElementOptions(t,e),d=o.getDataset().data[e],u=o.index,c=n?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof d?d:NaN,e,u),h=n?l.getBasePixel():l.getPixelForValue(d,e,u);t._xScale=r,t._yScale=l,t._options=s,t._datasetIndex=u,t._index=e,t._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:n?0:s.radius,skip:i.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,o=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ct(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Ct(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Ct(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,o=n.chart,a=n.getDataset(),i=t.custom||{},r=a.data[e]||{},l=ot.prototype._resolveDataElementOptions.apply(n,arguments),s={chart:o,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===l&&(l=V.extend({},l)),l.radius=Pt([i.radius,r.r,n._config.radius,o.options.elements.point.radius],s,e),l}}),Et=V.valueOrDefault,Lt=Math.PI,Ot=2*Lt,Nt=Lt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,o,a=document.createElement("ul"),i=t.data,r=i.datasets,l=i.labels;if(a.setAttribute("class",t.id+"-legend"),r.length)for(e=0,n=r[0].data.length;e<n;++e)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[0].backgroundColor[e],l[e]&&o.appendChild(document.createTextNode(l[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,o){var a=t.getDatasetMeta(0),i=a.controller.getStyle(o);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[o])||a.data[o].hidden,index:o}})):[]}},onClick:function(t,e){var n,o,a,i=e.index,r=this.chart;for(n=0,o=(r.data.datasets||[]).length;n<o;++n)(a=r.getDatasetMeta(n)).data[i]&&(a.data[i].hidden=!a.data[i].hidden);r.update()}},cutoutPercentage:50,rotation:-Nt,circumference:Ot,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],o=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=o:n+=o,n}}}});var Wt=ot.extend({dataElementType:wt.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,o,a,i=this,r=i.chart,l=r.chartArea,s=r.options,d=1,u=1,c=0,h=0,f=i.getMeta(),g=f.data,p=s.cutoutPercentage/100||0,m=s.circumference,v=i._getRingWeight(i.index);if(m<Ot){var b=s.rotation%Ot,y=(b+=b>=Lt?-Ot:b<-Lt?Ot:0)+m,x=Math.cos(b),_=Math.sin(b),w=Math.cos(y),M=Math.sin(y),k=b<=0&&y>=0||y>=Ot,T=b<=Nt&&y>=Nt||y>=Ot+Nt,D=b<=-Nt&&y>=-Nt||y>=Lt+Nt,S=b===-Lt||y>=Lt?-1:Math.min(x,x*p,w,w*p),R=D?-1:Math.min(_,_*p,M,M*p),F=k?1:Math.max(x,x*p,w,w*p),A=T?1:Math.max(_,_*p,M,M*p);d=(F-S)/2,u=(A-R)/2,c=-(F+S)/2,h=-(A+R)/2}for(o=0,a=g.length;o<a;++o)g[o]._options=i._resolveDataElementOptions(g[o],o);for(r.borderWidth=i.getMaxBorderWidth(),e=(l.right-l.left-r.borderWidth)/d,n=(l.bottom-l.top-r.borderWidth)/u,r.outerRadius=Math.max(Math.min(e,n)/2,0),r.innerRadius=Math.max(r.outerRadius*p,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),r.offsetX=c*r.outerRadius,r.offsetY=h*r.outerRadius,f.total=i.calculateTotal(),i.outerRadius=r.outerRadius-r.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-r.radiusLength*v,0),o=0,a=g.length;o<a;++o)i.updateElement(g[o],o,t)},updateElement:function(t,e,n){var o=this,a=o.chart,i=a.chartArea,r=a.options,l=r.animation,s=(i.left+i.right)/2,d=(i.top+i.bottom)/2,u=r.rotation,c=r.rotation,h=o.getDataset(),f=n&&l.animateRotate||t.hidden?0:o.calculateCircumference(h.data[e])*(r.circumference/Ot),g=n&&l.animateScale?0:o.innerRadius,p=n&&l.animateScale?0:o.outerRadius,m=t._options||{};V.extend(t,{_datasetIndex:o.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:s+a.offsetX,y:d+a.offsetY,startAngle:u,endAngle:c,circumference:f,outerRadius:p,innerRadius:g,label:V.valueAtIndexOrDefault(h.label,e,a.data.labels[e])}});var v=t._model;n&&l.animateRotate||(v.startAngle=0===e?r.rotation:o.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),o=0;return V.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(o+=Math.abs(t))})),o},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,o,a,i,r,l,s,d=0,u=this.chart;if(!t)for(e=0,n=u.data.datasets.length;e<n;++e)if(u.isDatasetVisible(e)){t=(o=u.getDatasetMeta(e)).data,e!==this.index&&(i=o.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],i?(i._configure(),r=i._resolveDataElementOptions(a,e)):r=a._options,"inner"!==r.borderAlign&&(l=r.borderWidth,d=(s=r.hoverBorderWidth)>(d=l>d?l:d)?s:d);return d},setHoverStyle:function(t){var e=t._model,n=t._options,o=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Et(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Et(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Et(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(Et(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._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"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Bt=At.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),zt=V.valueOrDefault,$t=V.options.resolve,Vt=V.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},o=n.reverse,a=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:o?i:a,end:o?a:i}}N._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 jt=ot.extend({datasetElementType:wt.Line,dataElementType:wt.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,o=this,a=o.getMeta(),i=a.dataset,r=a.data||[],l=o.chart.options,s=o._config,d=o._showLine=zt(s.showLine,l.showLines);for(o._xScale=o.getScaleForId(a.xAxisID),o._yScale=o.getScaleForId(a.yAxisID),d&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=o._yScale,i._datasetIndex=o.index,i._children=r,i._model=o._resolveDatasetElementOptions(i),i.pivot()),e=0,n=r.length;e<n;++e)o.updateElement(r[e],e,t);for(d&&0!==i._model.tension&&o.updateBezierControlPoints(),e=0,n=r.length;e<n;++e)r[e].pivot()},updateElement:function(t,e,n){var o,a,i=this,r=i.getMeta(),l=t.custom||{},s=i.getDataset(),d=i.index,u=s.data[e],c=i._xScale,h=i._yScale,f=r.dataset._model,g=i._resolveDataElementOptions(t,e);o=c.getPixelForValue("object"==typeof u?u:NaN,e,d),a=n?h.getBasePixel():i.calculatePointY(u,e,d),t._xScale=c,t._yScale=h,t._options=g,t._datasetIndex=d,t._index=e,t._model={x:o,y:a,skip:l.skip||isNaN(o)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:zt(l.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e,n,o,a,i,r,l,s,d,u,c,h=this,f=h._config,g=t.custom||{},p=h.chart.options,m=p.elements.line,v=ot.prototype._resolveDatasetElementOptions.apply(h,arguments);return v.spanGaps=zt(f.spanGaps,p.spanGaps),v.tension=zt(f.lineTension,m.tension),v.steppedLine=$t([g.steppedLine,f.steppedLine,m.stepped]),v.clip=(e=zt(f.clip,(r=h._xScale,l=h._yScale,s=v.borderWidth,u=Ht(r,d=s/2),{top:(c=Ht(l,d)).end,right:u.end,bottom:c.start,left:u.start})),V.isObject(e)?(n=e.top,o=e.right,a=e.bottom,i=e.left):n=o=a=i=e,{top:n,right:o,bottom:a,left:i}),v},calculatePointY:function(t,e,n){var o,a,i,r,l,s,d,u=this.chart,c=this._yScale,h=0,f=0;if(c.options.stacked){for(l=+c.getRightValue(t),d=(s=u._getSortedVisibleDatasetMetas()).length,o=0;o<d&&(i=s[o]).index!==n;++o)a=u.data.datasets[i.index],"line"===i.type&&i.yAxisID===c.id&&((r=+c.getRightValue(a.data[e]))<0?f+=r||0:h+=r||0);return l<0?c.getPixelForValue(f+l):c.getPixelForValue(h+l)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,o,a=this.chart,i=this.getMeta(),r=i.dataset._model,l=a.chartArea,s=i.data||[];function d(t,e,n){return Math.max(Math.min(t,n),e)}if(r.spanGaps&&(s=s.filter((function(t){return!t._model.skip}))),"monotone"===r.cubicInterpolationMode)V.splineCurveMonotone(s);else for(t=0,e=s.length;t<e;++t)n=s[t]._model,o=V.splineCurve(V.previousItem(s,t)._model,n,V.nextItem(s,t)._model,r.tension),n.controlPointPreviousX=o.previous.x,n.controlPointPreviousY=o.previous.y,n.controlPointNextX=o.next.x,n.controlPointNextY=o.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=s.length;t<e;++t)n=s[t]._model,Vt(n,l)&&(t>0&&Vt(s[t-1]._model,l)&&(n.controlPointPreviousX=d(n.controlPointPreviousX,l.left,l.right),n.controlPointPreviousY=d(n.controlPointPreviousY,l.top,l.bottom)),t<s.length-1&&Vt(s[t+1]._model,l)&&(n.controlPointNextX=d(n.controlPointNextX,l.left,l.right),n.controlPointNextY=d(n.controlPointNextY,l.top,l.bottom)))},draw:function(){var t,e=this,n=e.chart,o=e.getMeta(),a=o.data||[],i=n.chartArea,r=n.canvas,l=0,s=a.length;for(e._showLine&&(t=o.dataset._model.clip,V.canvas.clipArea(n.ctx,{left:!1===t.left?0:i.left-t.left,right:!1===t.right?r.width:i.right+t.right,top:!1===t.top?0:i.top-t.top,bottom:!1===t.bottom?r.height:i.bottom+t.bottom}),o.dataset.draw(),V.canvas.unclipArea(n.ctx));l<s;++l)a[l].draw(i)},setHoverStyle:function(t){var e=t._model,n=t._options,o=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=zt(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=zt(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=zt(n.hoverBorderWidth,n.borderWidth),e.radius=zt(n.hoverRadius,n.radius)}}),qt=V.options.resolve;N._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,o,a=document.createElement("ul"),i=t.data,r=i.datasets,l=i.labels;if(a.setAttribute("class",t.id+"-legend"),r.length)for(e=0,n=r[0].data.length;e<n;++e)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[0].backgroundColor[e],l[e]&&o.appendChild(document.createTextNode(l[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,o){var a=t.getDatasetMeta(0),i=a.controller.getStyle(o);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[o])||a.data[o].hidden,index:o}})):[]}},onClick:function(t,e){var n,o,a,i=e.index,r=this.chart;for(n=0,o=(r.data.datasets||[]).length;n<o;++n)(a=r.getDatasetMeta(n)).data[i].hidden=!a.data[i].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Yt=ot.extend({dataElementType:wt.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,o,a=this,i=a.getDataset(),r=a.getMeta(),l=a.chart.options.startAngle||0,s=a._starts=[],d=a._angles=[],u=r.data;for(a._updateRadius(),r.count=a.countVisibleElements(),e=0,n=i.data.length;e<n;e++)s[e]=l,o=a._computeAngle(e),d[e]=o,l+=o;for(e=0,n=u.length;e<n;++e)u[e]._options=a._resolveDataElementOptions(u[e],e),a.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,o=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(o.cutoutPercentage?e.outerRadius/100*o.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 o=this,a=o.chart,i=o.getDataset(),r=a.options,l=r.animation,s=a.scale,d=a.data.labels,u=s.xCenter,c=s.yCenter,h=r.startAngle,f=t.hidden?0:s.getDistanceFromCenterForValue(i.data[e]),g=o._starts[e],p=g+(t.hidden?0:o._angles[e]),m=l.animateScale?0:s.getDistanceFromCenterForValue(i.data[e]),v=t._options||{};V.extend(t,{_datasetIndex:o.index,_index:e,_scale:s,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:c,innerRadius:0,outerRadius:n?m:f,startAngle:n&&l.animateRotate?h:g,endAngle:n&&l.animateRotate?h:p,label:V.valueAtIndexOrDefault(d,e,d[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,(function(e,o){isNaN(t.data[o])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,o=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,o=e.getDataset(),a=e.getMeta();if(isNaN(o.data[t])||a.data[t].hidden)return 0;var i={chart:e.chart,dataIndex:t,dataset:o,datasetIndex:e.index};return qt([e.chart.options.elements.arc.angle,2*Math.PI/n],i,t)}});N._set("pie",V.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Ut=Wt,Gt=V.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Xt=ot.extend({datasetElementType:wt.Line,dataElementType:wt.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,o=this,a=o.getMeta(),i=a.dataset,r=a.data||[],l=o.chart.scale,s=o._config;for(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=l,i._datasetIndex=o.index,i._children=r,i._loop=!0,i._model=o._resolveDatasetElementOptions(i),i.pivot(),e=0,n=r.length;e<n;++e)o.updateElement(r[e],e,t);for(o.updateBezierControlPoints(),e=0,n=r.length;e<n;++e)r[e].pivot()},updateElement:function(t,e,n){var o=this,a=t.custom||{},i=o.getDataset(),r=o.chart.scale,l=r.getPointPositionForValue(e,i.data[e]),s=o._resolveDataElementOptions(t,e),d=o.getMeta().dataset._model,u=n?r.xCenter:l.x,c=n?r.yCenter:l.y;t._scale=r,t._options=s,t._datasetIndex=o.index,t._index=e,t._model={x:u,y:c,skip:a.skip||isNaN(u)||isNaN(c),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:Gt(a.tension,d?d.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,o=ot.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=Gt(e.spanGaps,n.spanGaps),o.tension=Gt(e.lineTension,n.elements.line.tension),o},updateBezierControlPoints:function(){var t,e,n,o,a=this.getMeta(),i=this.chart.chartArea,r=a.data||[];function l(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(r=r.filter((function(t){return!t._model.skip}))),t=0,e=r.length;t<e;++t)n=r[t]._model,o=V.splineCurve(V.previousItem(r,t,!0)._model,n,V.nextItem(r,t,!0)._model,n.tension),n.controlPointPreviousX=l(o.previous.x,i.left,i.right),n.controlPointPreviousY=l(o.previous.y,i.top,i.bottom),n.controlPointNextX=l(o.next.x,i.left,i.right),n.controlPointNextY=l(o.next.y,i.top,i.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,o=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Gt(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Gt(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Gt(n.hoverBorderWidth,n.borderWidth),e.radius=Gt(n.hoverRadius,n.radius)}});N._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+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Kt={bar:At,bubble:It,doughnut:Wt,horizontalBar:Bt,line:jt,polarArea:Yt,pie:Ut,radar:Xt,scatter:jt};function Zt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function Jt(t,e){var n,o,a,i,r,l,s=t._getSortedVisibleDatasetMetas();for(o=0,i=s.length;o<i;++o)for(a=0,r=(n=s[o].data).length;a<r;++a)(l=n[a])._view.skip||e(l)}function Qt(t,e){var n=[];return Jt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function te(t,e,n,o){var a=Number.POSITIVE_INFINITY,i=[];return Jt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var r=t.getCenterPoint(),l=o(e,r);l<a?(i=[t],a=l):l===a&&i.push(t)}})),i}function ee(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,o){var a=e?Math.abs(t.x-o.x):0,i=n?Math.abs(t.y-o.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(i,2))}}function ne(t,e,n){var o=Zt(e,t);n.axis=n.axis||"x";var a=ee(n.axis),i=n.intersect?Qt(t,o):te(t,o,!1,a),r=[];return i.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[i[0]._index];e&&!e._view.skip&&r.push(e)})),r):[]}var oe={modes:{single:function(t,e){var n=Zt(e,t),o=[];return Jt(t,(function(t){if(t.inRange(n.x,n.y))return o.push(t),o})),o.slice(0,1)},label:ne,index:ne,dataset:function(t,e,n){var o=Zt(e,t);n.axis=n.axis||"xy";var a=ee(n.axis),i=n.intersect?Qt(t,o):te(t,o,!1,a);return i.length>0&&(i=t.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(t,e){return ne(t,e,{intersect:!1})},point:function(t,e){return Qt(t,Zt(e,t))},nearest:function(t,e,n){var o=Zt(e,t);n.axis=n.axis||"xy";var a=ee(n.axis);return te(t,o,n.intersect,a)},x:function(t,e,n){var o=Zt(e,t),a=[],i=!1;return Jt(t,(function(t){t.inXRange(o.x)&&a.push(t),t.inRange(o.x,o.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a},y:function(t,e,n){var o=Zt(e,t),a=[],i=!1;return Jt(t,(function(t){t.inYRange(o.y)&&a.push(t),t.inRange(o.x,o.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a}}},ae=V.extend;function ie(t,e){return V.where(t,(function(t){return t.pos===e}))}function re(t,e){return t.sort((function(t,n){var o=e?n:t,a=e?t:n;return o.weight===a.weight?o.index-a.index:o.weight-a.weight}))}function le(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function se(t,e,n){var o,a,i=n.box,r=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 l=i.getPadding();r.top=Math.max(r.top,l.top),r.left=Math.max(r.left,l.left),r.bottom=Math.max(r.bottom,l.bottom),r.right=Math.max(r.right,l.right)}if(o=e.outerWidth-le(r,t,"left","right"),a=e.outerHeight-le(r,t,"top","bottom"),o!==t.w||a!==t.h){t.w=o,t.h=a;var s=n.horizontal?[o,t.w]:[a,t.h];return!(s[0]===s[1]||isNaN(s[0])&&isNaN(s[1]))}}function de(t,e){var n,o=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],o[t])})),n}function ue(t,e,n){var o,a,i,r,l,s,d=[];for(o=0,a=t.length;o<a;++o)(r=(i=t[o]).box).update(i.width||e.w,i.height||e.h,de(i.horizontal,e)),se(e,n,i)&&(s=!0,d.length&&(l=!0)),r.fullWidth||d.push(i);return l&&ue(d,e,n)||s}function ce(t,e,n){var o,a,i,r,l=n.padding,s=e.x,d=e.y;for(o=0,a=t.length;o<a;++o)r=(i=t[o]).box,i.horizontal?(r.left=r.fullWidth?l.left:e.left,r.right=r.fullWidth?n.outerWidth-l.right:e.left+e.w,r.top=d,r.bottom=d+r.height,r.width=r.right-r.left,d=r.bottom):(r.left=s,r.right=s+r.width,r.top=e.top,r.bottom=e.top+e.h,r.height=r.bottom-r.top,s=r.right);e.x=s,e.y=d}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var he,fe={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 o,a=["fullWidth","position","weight"],i=a.length,r=0;r<i;++r)o=a[r],n.hasOwnProperty(o)&&(e[o]=n[o])},update:function(t,e,n){if(t){var o=t.options.layout||{},a=V.options.toPadding(o.padding),i=e-a.width,r=n-a.height,l=function(t){var e=function(t){var e,n,o,a=[];for(e=0,n=(t||[]).length;e<n;++e)o=t[e],a.push({index:e,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return a}(t),n=re(ie(e,"left"),!0),o=re(ie(e,"right")),a=re(ie(e,"top"),!0),i=re(ie(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:o.concat(i),chartArea:ie(e,"chartArea"),vertical:n.concat(o),horizontal:a.concat(i)}}(t.boxes),s=l.vertical,d=l.horizontal,u=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:i,vBoxMaxWidth:i/2/s.length,hBoxMaxHeight:r/2}),c=ae({maxPadding:ae({},a),w:i,h:r,x:a.left,y:a.top},a);(function(t,e){var n,o,a;for(n=0,o=t.length;n<o;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight})(s.concat(d),u),ue(s,c,u),ue(d,c,u)&&ue(s,c,u),function(t){var e=t.maxPadding;function n(n){var o=Math.max(e[n]-t[n],0);return t[n]+=o,o}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(c),ce(l.leftAndTop,c,u),c.x+=c.w,c.y+=c.h,ce(l.rightAndBottom,c,u),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},V.each(l.chartArea,(function(e){var n=e.box;ae(n,t.chartArea),n.update(c.w,c.h)}))}}},ge=(he=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"}))&&he.default||he,pe="$chartjs",me="chartjs-",ve=me+"size-monitor",be=me+"render-monitor",ye=me+"render-animation",xe=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var n=V.getStyle(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?Number(o[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(t){}return t}()&&{passive:!0};function ke(t,e,n){t.addEventListener(e,n,Me)}function Te(t,e,n){t.removeEventListener(e,n,Me)}function De(t,e,n,o,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==o?o:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}function Re(t,e,n){var o,a,i,r,l=t[pe]||(t[pe]={}),s=l.resizer=function(t){var e=1e6,n=Se(ve),o=Se(ve+"-expand"),a=Se(ve+"-shrink");o.appendChild(Se()),a.appendChild(Se()),n.appendChild(o),n.appendChild(a),n._reset=function(){o.scrollLeft=e,o.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var i=function(){n._reset(),t()};return ke(o,"scroll",i.bind(o,"expand")),ke(a,"scroll",i.bind(a,"shrink")),n}((o=function(){if(l.resizer){var o=n.options.maintainAspectRatio&&t.parentNode,a=o?o.clientWidth:0;e(De("resize",n)),o&&o.clientWidth<a&&n.canvas&&e(De("resize",n))}},i=!1,r=[],function(){r=Array.prototype.slice.call(arguments),a=a||this,i||(i=!0,V.requestAnimFrame.call(window,(function(){i=!1,o.apply(a,r)})))}));!function(t,e){var n=t[pe]||(t[pe]={}),o=n.renderProxy=function(t){t.animationName===ye&&e()};V.each(xe,(function(e){ke(t,e,o)})),n.reflow=!!t.offsetParent,t.classList.add(be)}(t,(function(){if(l.resizer){var e=t.parentNode;e&&e!==s.parentNode&&e.insertBefore(s,e.firstChild),s._reset()}}))}function Fe(t){var e=t[pe]||{},n=e.resizer;delete e.resizer,function(t){var e=t[pe]||{},n=e.renderProxy;n&&(V.each(xe,(function(e){Te(t,e,n)})),delete e.renderProxy),t.classList.remove(be)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Ae={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[pe]||(t[pe]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var o=document.createElement("style");o.setAttribute("type","text/css"),o.appendChild(document.createTextNode(e)),t.appendChild(o)}}(e.host?e:document.head,ge)}},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,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[pe]={initial:{height:o,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var i=we(t,"width");void 0!==i&&(t.width=i)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var r=we(t,"height");void 0!==i&&(t.height=r)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[pe]){var n=e[pe].initial;["height","width"].forEach((function(t){var o=n[t];V.isNullOrUndef(o)?e.removeAttribute(t):e.setAttribute(t,o)})),V.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[pe]}},addEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=n[pe]||(n[pe]={});ke(o,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=_e[t.type]||t.type,o=V.getRelativePosition(t,e);return De(n,e,o.x,o.y,t)}(e,t))})}else Re(o,n,t)},removeEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=((n[pe]||{}).proxies||{})[t.id+"_"+e];a&&Te(o,e,a)}else Fe(o)}};V.addEvent=ke,V.removeEvent=Te;var Ce=Ae._enabled?Ae:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Pe=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ce);N._set("global",{plugins:{}});var Ie={_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 o,a,i,r,l,s=this.descriptors(t),d=s.length;for(o=0;o<d;++o)if("function"==typeof(l=(i=(a=s[o]).plugin)[e])&&((r=[t].concat(n||[])).push(a.options),!1===l.apply(i,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],o=[],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(N.global.plugins[e])),n.push(t),o.push({plugin:t,options:a||{}}))}})),e.descriptors=o,e.id=this._cacheId,o},_invalidate:function(t){delete t.$plugins}},Ee={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),[N.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,fe.addBox(t,e)}))}},Le=V.valueOrDefault,Oe=V.rtl.getRtlAdapter;N._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="",o=e.labels,a=o?o.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=o[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 Ne={average:function(t){if(!t.length)return!1;var e,n,o=0,a=0,i=0;for(e=0,n=t.length;e<n;++e){var r=t[e];if(r&&r.hasValue()){var l=r.tooltipPosition();o+=l.x,a+=l.y,++i}}return{x:o/i,y:a/i}},nearest:function(t,e){var n,o,a,i=e.x,r=e.y,l=Number.POSITIVE_INFINITY;for(n=0,o=t.length;n<o;++n){var s=t[n];if(s&&s.hasValue()){var d=s.getCenterPoint(),u=V.distanceBetweenPoints(e,d);u<l&&(l=u,a=s)}}if(a){var c=a.tooltipPosition();i=c.x,r=c.y}return{x:i,y:r}}};function We(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Be(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ze(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Le(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Le(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Le(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Le(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Le(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Le(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Le(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Le(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Le(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 $e(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ve(t){return We([],Be(t))}var He=X.extend({initialize:function(){this._model=ze(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),o=e.title.apply(t,arguments),a=e.afterTitle.apply(t,arguments),i=[];return i=We(i,Be(n)),i=We(i,Be(o)),We(i,Be(a))},getBeforeBody:function(){return Ve(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,o=n._options.callbacks,a=[];return V.each(t,(function(t){var i={before:[],lines:[],after:[]};We(i.before,Be(o.beforeLabel.call(n,t,e))),We(i.lines,o.label.call(n,t,e)),We(i.after,Be(o.afterLabel.call(n,t,e))),a.push(i)})),a},getAfterBody:function(){return Ve(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),o=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),i=[];return i=We(i,Be(n)),i=We(i,Be(o)),We(i,Be(a))},update:function(t){var e,n,o,a,i,r,l,s,d,u,c=this,h=c._options,f=c._model,g=c._model=ze(h),p=c._active,m=c._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},y={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],w=[];x=Ne[h.position].call(c,p,c._eventPosition);var M=[];for(e=0,n=p.length;e<n;++e)M.push((o=p[e],a=void 0,i=void 0,r=void 0,l=void 0,s=void 0,d=void 0,u=void 0,a=o._xScale,i=o._yScale||o._scale,r=o._index,l=o._datasetIndex,s=o._chart.getDatasetMeta(l).controller,d=s._getIndexScale(),u=s._getValueScale(),{xLabel:a?a.getLabelForIndex(r,l):"",yLabel:i?i.getLabelForIndex(r,l):"",label:d?""+d.getLabelForIndex(r,l):"",value:u?""+u.getLabelForIndex(r,l):"",index:r,datasetIndex:l,x:o._model.x,y:o._model.y}));h.filter&&(M=M.filter((function(t){return h.filter(t,m)}))),h.itemSort&&(M=M.sort((function(t,e){return h.itemSort(t,e,m)}))),V.each(M,(function(t){_.push(h.callbacks.labelColor.call(c,t,c._chart)),w.push(h.callbacks.labelTextColor.call(c,t,c._chart))})),g.title=c.getTitle(M,m),g.beforeBody=c.getBeforeBody(M,m),g.body=c.getBody(M,m),g.afterBody=c.getAfterBody(M,m),g.footer=c.getFooter(M,m),g.x=x.x,g.y=x.y,g.caretPadding=h.caretPadding,g.labelColors=_,g.labelTextColors=w,g.dataPoints=M,b=function(t,e,n,o){var a=t.x,i=t.y,r=t.caretSize,l=t.caretPadding,s=t.cornerRadius,d=n.xAlign,u=n.yAlign,c=r+l,h=s+l;return"right"===d?a-=e.width:"center"===d&&((a-=e.width/2)+e.width>o.width&&(a=o.width-e.width),a<0&&(a=0)),"top"===u?i+=c:i-="bottom"===u?e.height+c:e.height/2,"center"===u?"left"===d?a+=c:"right"===d&&(a-=c):"left"===d?a-=h:"right"===d&&(a+=h),{x:a,y:i}}(g,y=function(t,e){var n=t._chart.ctx,o=2*e.yPadding,a=0,i=e.body,r=i.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);r+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,s=e.footer.length,d=e.titleFontSize,u=e.bodyFontSize,c=e.footerFontSize;o+=l*d,o+=l?(l-1)*e.titleSpacing:0,o+=l?e.titleMarginBottom:0,o+=r*u,o+=r?(r-1)*e.bodySpacing:0,o+=s?e.footerMarginTop:0,o+=s*c,o+=s?(s-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,n.measureText(t).width+h)};return n.font=V.fontString(d,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(u,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?u+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(c,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:o}}(this,g),v=function(t,e){var n,o,a,i,r,l=t._model,s=t._chart,d=t._chart.chartArea,u="center",c="center";l.y<e.height?c="top":l.y>s.height-e.height&&(c="bottom");var h=(d.left+d.right)/2,f=(d.top+d.bottom)/2;"center"===c?(n=function(t){return t<=h},o=function(t){return t>h}):(n=function(t){return t<=e.width/2},o=function(t){return t>=s.width-e.width/2}),a=function(t){return t+e.width+l.caretSize+l.caretPadding>s.width},i=function(t){return t-e.width-l.caretSize-l.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},n(l.x)?(u="left",a(l.x)&&(u="center",c=r(l.y))):o(l.x)&&(u="right",i(l.x)&&(u="center",c=r(l.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:c}}(this,y),c._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=y.width,g.height=y.height,g.caretX=x.x,g.caretY=x.y,c._model=g,t&&h.custom&&h.custom.call(c,g),c},drawCaret:function(t,e){var n=this._chart.ctx,o=this._view,a=this.getCaretPosition(t,e,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var o,a,i,r,l,s,d=n.caretSize,u=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===h)l=g+m/2,"left"===c?(a=(o=f)-d,i=o,r=l+d,s=l-d):(a=(o=f+p)+d,i=o,r=l-d,s=l+d);else if("left"===c?(o=(a=f+u+d)-d,i=a+d):"right"===c?(o=(a=f+p-u-d)-d,i=a+d):(o=(a=n.caretX)-d,i=a+d),"top"===h)l=(r=g)-d,s=r;else{l=(r=g+m)+d,s=r;var v=i;i=o,o=v}return{x1:o,x2:a,x3:i,y1:r,y2:l,y3:s}},drawTitle:function(t,e,n){var o,a,i,r=e.title,l=r.length;if(l){var s=Oe(e.rtl,e.x,e.width);for(t.x=$e(e,e._titleAlign),n.textAlign=s.textAlign(e._titleAlign),n.textBaseline="middle",o=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(o,e._titleFontStyle,e._titleFontFamily),i=0;i<l;++i)n.fillText(r[i],s.x(t.x),t.y+o/2),t.y+=o+a,i+1===l&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var o,a,i,r,l,s,d,u,c=e.bodyFontSize,h=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?$e(e,"left"):0,b=Oe(e.rtl,e.x,e.width),y=function(e){n.fillText(e,b.x(t.x+m),t.y+c/2),t.y+=c+h},x=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(c,e._bodyFontStyle,e._bodyFontFamily),t.x=$e(e,x),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,y),m=p&&"right"!==x?"center"===f?c/2+1:c+2:0,l=0,d=g.length;l<d;++l){for(o=g[l],a=e.labelTextColors[l],i=e.labelColors[l],n.fillStyle=a,V.each(o.before,y),s=0,u=(r=o.lines).length;s<u;++s){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,c),t.y,c,c),n.lineWidth=1,n.strokeStyle=i.borderColor,n.strokeRect(b.leftForLtr(_,c),t.y,c,c),n.fillStyle=i.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),c-2),t.y+1,c-2,c-2),n.fillStyle=a}y(r[s])}V.each(o.after,y)}m=0,V.each(e.afterBody,y),t.y-=h},drawFooter:function(t,e,n){var o,a,i=e.footer,r=i.length;if(r){var l=Oe(e.rtl,e.x,e.width);for(t.x=$e(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=l.textAlign(e._footerAlign),n.textBaseline="middle",o=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(o,e._footerFontStyle,e._footerFontFamily),a=0;a<r;++a)n.fillText(i[a],l.x(t.x),t.y+o/2),t.y+=o+e.footerSpacing}},drawBackground:function(t,e,n,o){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,i=e.yAlign,r=t.x,l=t.y,s=o.width,d=o.height,u=e.cornerRadius;n.beginPath(),n.moveTo(r+u,l),"top"===i&&this.drawCaret(t,o),n.lineTo(r+s-u,l),n.quadraticCurveTo(r+s,l,r+s,l+u),"center"===i&&"right"===a&&this.drawCaret(t,o),n.lineTo(r+s,l+d-u),n.quadraticCurveTo(r+s,l+d,r+s-u,l+d),"bottom"===i&&this.drawCaret(t,o),n.lineTo(r+u,l+d),n.quadraticCurveTo(r,l+d,r,l+d-u),"center"===i&&"left"===a&&this.drawCaret(t,o),n.lineTo(r,l+u),n.quadraticCurveTo(r,l,r+u,l),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},o={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(t.save(),t.globalAlpha=a,this.drawBackground(o,e,t,n),o.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,o=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,o.mode,o),o.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(o.enabled||o.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),je=Ne,qe=He;qe.positioners=je;var Ye=V.valueOrDefault;function Ue(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,o){if("xAxes"===t||"yAxes"===t){var a,i,r,l=n[t].length;for(e[t]||(e[t]=[]),a=0;a<l;++a)r=n[t][a],i=Ye(r.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?V.merge(e[t][a],[Ee.getScaleDefaults(i),r]):V.merge(e[t][a],r)}else V._merger(t,e,n,o)}})}function Ge(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,o){var a=e[t]||Object.create(null),i=n[t];"scales"===t?e[t]=Ue(a,i):"scale"===t?e[t]=V.merge(a,[Ee.getScaleDefaults(i.type),i]):V._merger(t,e,n,o)}})}function Xe(t,e,n){var o,a=function(t){return t.id===o};do{o=e+n++}while(V.findIndex(t,a)>=0);return o}function Ke(t){return"top"===t||"bottom"===t}function Ze(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}N._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 Je=function(t,e){return this.construct(t,e),this};V.extend(Je.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=Ge(N.global,N[t.type],t.options||{}),t}(e);var o=Pe.acquireContext(t,e),a=o&&o.canvas,i=a&&a.height,r=a&&a.width;n.id=V.uid(),n.ctx=o,n.canvas=a,n.config=e,n.width=r,n.height=i,n.aspectRatio=i?r/i:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Je.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),o&&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 Ie.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Ie.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,o=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,i=Math.max(0,Math.floor(V.getMaximumWidth(o))),r=Math.max(0,Math.floor(a?i/a:V.getMaximumHeight(o)));if((e.width!==i||e.height!==r)&&(o.width=e.width=i,o.height=e.height=r,o.style.width=i+"px",o.style.height=r+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var l={width:i,height:r};Ie.notify(e,"resize",[l]),n.onResize&&n.onResize(e,l),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Xe(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Xe(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},o=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(o=o.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&&o.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(o,(function(e){var o=e.options,i=o.id,r=Ye(o.type,e.dtype);Ke(o.position)!==Ke(e.dposition)&&(o.position=e.dposition),a[i]=!0;var l=null;if(i in n&&n[i].type===r)(l=n[i]).options=o,l.ctx=t.ctx,l.chart=t;else{var s=Ee.getScaleConstructor(r);if(!s)return;l=new s({id:i,type:r,options:o,ctx:t.ctx,chart:t}),n[l.id]=l}l.mergeTicksOptions(),e.isDefault&&(t.scale=l)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Ee.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,o=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var i=a[t],r=n.getDatasetMeta(t),l=i.type||n.config.type;if(r.type&&r.type!==l&&(n.destroyDatasetMeta(t),r=n.getDatasetMeta(t)),r.type=l,r.order=i.order||0,r.index=t,r.controller)r.controller.updateIndex(t),r.controller.linkScales();else{var s=Kt[r.type];if(void 0===s)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new s(n,t),o.push(r.controller)}}return o},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,o,a,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),a=(o=i).options,V.each(o.scales,(function(t){fe.removeBox(o,t)})),a=Ge(N.global,N[o.config.type],a),o.options=o.config.options=a,o.ensureScalesHaveIDs(),o.buildOrUpdateScales(),o.tooltip._options=a.tooltips,o.tooltip.initialize(),Ie._invalidate(i),!1!==Ie.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var r=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&V.each(r,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Ie.notify(i,"afterUpdate"),i._layers.sort(Ze("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Ie.notify(t,"beforeLayout")&&(fe.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})),Ie.notify(t,"afterScaleUpdate"),Ie.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==Ie.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);Ie.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),o={meta:n,index:t};!1!==Ie.notify(e,"beforeDatasetUpdate",[o])&&(n.controller._update(),Ie.notify(e,"afterDatasetUpdate",[o]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,o=Ye(t.duration,n&&n.duration),a=t.lazy;if(!1!==Ie.notify(e,"beforeRender")){var i=function(t){Ie.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&o){var r=new Z({numSteps:o/16.66,easing:t.easing||n.easing,render:function(t,e){var n=V.easing.effects[e.easing],o=e.currentStep,a=o/e.numSteps;t.draw(n(a),a,o)},onAnimationProgress:n.onProgress,onAnimationComplete:i});J.addAnimation(e,r,o,a)}else e.draw(),i(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,o=this;if(o.clear(),V.isNullOrUndef(t)&&(t=1),o.transition(t),!(o.width<=0||o.height<=0)&&!1!==Ie.notify(o,"beforeDraw",[t])){for(n=o._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(o.chartArea);for(o.drawDatasets(t);e<n.length;++e)n[e].draw(o.chartArea);o._drawTooltip(t),Ie.notify(o,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,o=(e.data.datasets||[]).length;n<o;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,o=this,a=[];for(e=0,n=(o.data.datasets||[]).length;e<n;++e)t&&!o.isDatasetVisible(e)||a.push(o.getDatasetMeta(e));return a.sort(Ze("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,o=this;if(!1!==Ie.notify(o,"beforeDatasetsDraw",[t])){for(n=(e=o._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)o.drawDataset(e[n],t);Ie.notify(o,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Ie.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Ie.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,o={tooltip:n,easingValue:t};!1!==Ie.notify(e,"beforeTooltipDraw",[o])&&(n.draw(),Ie.notify(e,"afterTooltipDraw",[o]))},getElementAtEvent:function(t){return oe.modes.single(this,t)},getElementsAtEvent:function(t){return oe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return oe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var o=oe.modes[e];return"function"==typeof o?o(this,t,n):[]},getDatasetAtEvent:function(t){return oe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var o=n._meta[e.id];return o||(o=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),o},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],o=n._meta&&n._meta[e];o&&(o.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,o=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);o&&(n.unbindEvents(),V.canvas.clear(n),Pe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ie.notify(n,"destroy"),delete Je.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new qe({_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(o){Pe.addEventListener(t,o,n),e[o]=n})),t.options.responsive&&(n=function(){t.resize()},Pe.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){Pe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var o,a,i,r=n?"set":"remove";for(a=0,i=t.length;a<i;++a)(o=t[a])&&this.getDatasetMeta(o._datasetIndex).controller[r+"HoverStyle"](o);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+r+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Ie.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var o=e.handleEvent(t);n&&(o=n._start?n.handleEvent(t):o|n.handleEvent(t)),Ie.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):o&&!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,o=n.options||{},a=o.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),V.callback(o.onHover||o.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||o.onClick&&o.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}}),Je.instances={};var Qe=Je;Je.Controller=Je,Je.types={},V.configMerge=Ge,V.scaleMerge=Ue;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function en(t){this.options=t||{}}V.extend(en.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(t){return t}}),en.override=function(t){V.extend(en.prototype,t)};var nn={_date:en},on={formatters:{values:function(t){return V.isArray(t)?t:""+t},linear:function(t,e,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=V.log10(Math.abs(o)),i="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var r=V.log10(Math.abs(t)),l=Math.floor(r)-Math.floor(a);l=Math.max(Math.min(l,20),0),i=t.toExponential(l)}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),i=t.toFixed(s)}else i="0";return i},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}},an=V.isArray,rn=V.isNullOrUndef,ln=V.valueOrDefault,sn=V.valueAtIndexOrDefault;function dn(t,e,n){var o,a=t.getTicks().length,i=Math.min(e,a-1),r=t.getPixelForTick(i),l=t._startPixel,s=t._endPixel,d=1e-6;if(!(n&&(o=1===a?Math.max(r-l,s-r):0===e?(t.getPixelForTick(1)-r)/2:(r-t.getPixelForTick(i-1))/2,(r+=i<e?o:-o)<l-d||r>s+d)))return r}function un(t,e,n,o){var a,i,r,l,s,d,u,c,h,f,g,p,m,v=n.length,b=[],y=[],x=[],_=0,w=0;for(a=0;a<v;++a){if(l=n[a].label,s=n[a].major?e.major:e.minor,t.font=d=s.string,u=o[d]=o[d]||{data:{},gc:[]},c=s.lineHeight,h=f=0,rn(l)||an(l)){if(an(l))for(i=0,r=l.length;i<r;++i)g=l[i],rn(g)||an(g)||(h=V.measureText(t,u.data,u.gc,h,g),f+=c)}else h=V.measureText(t,u.data,u.gc,h,l),f=c;b.push(h),y.push(f),x.push(c/2),_=Math.max(h,_),w=Math.max(f,w)}function M(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,o=t.gc,a=o.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[o[n]];o.splice(0,a)}}))}(o,v),p=b.indexOf(_),m=y.indexOf(w),{first:M(0),last:M(v-1),widest:M(p),highest:M(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function hn(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function fn(t,e){return V.extend(V.options._parseFont({fontFamily:ln(e.fontFamily,t.fontFamily),fontSize:ln(e.fontSize,t.fontSize),fontStyle:ln(e.fontStyle,t.fontStyle),lineHeight:ln(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function gn(t){var e=fn(t,t.minor);return{minor:e,major:t.major.enabled?fn(t,t.major):e}}function pn(t){var e,n,o,a=[];for(n=0,o=t.length;n<o;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function mn(t,e,n,o){var a,i,r,l,s=ln(n,0),d=Math.min(ln(o,t.length),t.length),u=0;for(e=Math.ceil(e),o&&(e=(a=o-n)/Math.floor(a/e)),l=s;l<0;)u++,l=Math.round(s+u*e);for(i=Math.max(s,0);i<d;i++)r=t[i],i===l?(r._index=i,u++,l=Math.round(s+u*e)):delete r.label}N._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:on.formatters.values,minor:{},major:{}}});var vn=X.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 o,a,i,r,l,s=this,d=s.options.ticks,u=d.sampleSize;if(s.beforeUpdate(),s.maxWidth=t,s.maxHeight=e,s.margins=V.extend({left:0,right:0,top:0,bottom:0},n),s._ticks=null,s.ticks=null,s._labelSizes=null,s._maxLabelLines=0,s.longestLabelWidth=0,s.longestTextCache=s.longestTextCache||{},s._gridLineItems=null,s._labelItems=null,s.beforeSetDimensions(),s.setDimensions(),s.afterSetDimensions(),s.beforeDataLimits(),s.determineDataLimits(),s.afterDataLimits(),s.beforeBuildTicks(),r=s.buildTicks()||[],(!(r=s.afterBuildTicks(r)||r)||!r.length)&&s.ticks)for(r=[],o=0,a=s.ticks.length;o<a;++o)r.push({value:s.ticks[o],major:!1});return s._ticks=r,l=u<r.length,i=s._convertTicksToLabels(l?function(t,e){for(var n=[],o=t.length/e,a=0,i=t.length;a<i;a+=o)n.push(t[Math.floor(a)]);return n}(r,u):r),s._configure(),s.beforeCalculateTickRotation(),s.calculateTickRotation(),s.afterCalculateTickRotation(),s.beforeFit(),s.fit(),s.afterFit(),s._ticksToDraw=d.display&&(d.autoSkip||"auto"===d.source)?s._autoSkip(r):r,l&&(i=s._convertTicksToLabels(s._ticksToDraw)),s.ticks=i,s.afterUpdate(),s.minSize},_configure:function(){var t,e,n=this,o=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,o=!o),n._startPixel=t,n._endPixel=e,n._reversePixels=o,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 an(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,o,a,i,r,l=this,s=l.options,d=s.ticks,u=l.getTicks().length,c=d.minRotation||0,h=d.maxRotation,f=c;!l._isVisible()||!d.display||c>=h||u<=1||!l.isHorizontal()?l.labelRotation=c:(e=(t=l._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,o=Math.min(l.maxWidth,l.chart.width-e),e+6>(a=s.offset?l.maxWidth/u:o/(u-1))&&(a=o/(u-(s.offset?.5:1)),i=l.maxHeight-cn(s.gridLines)-d.padding-hn(s.scaleLabel),r=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/r,1))-Math.asin(n/r))),f=Math.max(c,Math.min(h,f))),l.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,o=t.options,a=o.ticks,i=o.scaleLabel,r=o.gridLines,l=t._isVisible(),s="bottom"===o.position,d=t.isHorizontal();if(d?e.width=t.maxWidth:l&&(e.width=cn(r)+hn(i)),d?l&&(e.height=cn(r)+hn(i)):e.height=t.maxHeight,a.display&&l){var u=gn(a),c=t._getLabelSizes(),h=c.first,f=c.last,g=c.widest,p=c.highest,m=.4*u.minor.lineHeight,v=a.padding;if(d){var b=0!==t.labelRotation,y=V.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y),w=_*g.width+x*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+w+v);var M,k,T=t.getPixelForTick(0)-t.left,D=t.right-t.getPixelForTick(t.getTicks().length-1);b?(M=s?x*h.width+_*h.offset:_*(h.height-h.offset),k=s?_*(f.height-f.offset):x*f.width+_*f.offset):(M=h.width/2,k=f.width/2),t.paddingLeft=Math.max((M-T)*t.width/(t.width-T),0)+3,t.paddingRight=Math.max((k-D)*t.width/(t.width-D),0)+3}else{var S=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+S),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),d?(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(rn(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,o,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,o=t.length;n<o;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=un(t.ctx,gn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,o,a;return an(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),o=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),o=t,a=t),{min:o,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,o=e._ticks.length,a=1/Math.max(o-(n?0:1),1);return t<0||t>o-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,o,a,i=this,r=i.options.ticks,l=i._length,s=r.maxTicksLimit||l/i._tickSize()+1,d=r.major.enabled?function(t){var e,n,o=[];for(e=0,n=t.length;e<n;e++)t[e].major&&o.push(e);return o}(t):[],u=d.length,c=d[0],h=d[u-1];if(u>s)return function(t,e,n){var o,a,i=0,r=e[0];for(n=Math.ceil(n),o=0;o<t.length;o++)a=t[o],o===r?(a._index=o,r=e[++i*n]):delete a.label}(t,d,u/s),pn(t);if(o=function(t,e,n,o){var a,i,r,l,s=function(t){var e,n,o=t.length;if(o<2)return!1;for(n=t[0],e=1;e<o;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),d=(e.length-1)/o;if(!s)return Math.max(d,1);for(r=0,l=(a=V.math._factorize(s)).length-1;r<l;r++)if((i=a[r])>d)return i;return Math.max(d,1)}(d,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)mn(t,o,d[e],d[e+1]);return a=u>1?(h-c)/(u-1):null,mn(t,o,V.isNullOrUndef(a)?0:c-a,c),mn(t,o,h,V.isNullOrUndef(a)?t.length:h+a),pn(t)}return mn(t,o),pn(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=V.toRadians(t.labelRotation),o=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),i=t._getLabelSizes(),r=e.autoSkipPadding||0,l=i?i.widest.width+r:0,s=i?i.highest.height+r:0;return t.isHorizontal()?s*o>l*a?l/o:s/a:s*a<l*o?s/o:l/a},_isVisible:function(){var t,e,n,o=this,a=o.chart,i=o.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===o.id||n.yAxisID===o.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,o,a,i,r,l,s,d,u,c,h,f,g,p,m,v,b=this,y=b.chart,x=b.options,_=x.gridLines,w=x.position,M=_.offsetGridLines,k=b.isHorizontal(),T=b._ticksToDraw,D=T.length+(M?1:0),S=cn(_),R=[],F=_.drawBorder?sn(_.lineWidth,0,0):0,A=F/2,C=V._alignPixel,P=function(t){return C(y,t,F)};for("top"===w?(e=P(b.bottom),l=b.bottom-S,d=e-A,c=P(t.top)+A,f=t.bottom):"bottom"===w?(e=P(b.top),c=t.top,f=P(t.bottom)-A,l=e+A,d=b.top+S):"left"===w?(e=P(b.right),r=b.right-S,s=e-A,u=P(t.left)+A,h=t.right):(e=P(b.left),u=t.left,h=P(t.right)-A,r=e+A,s=b.left+S),n=0;n<D;++n)o=T[n]||{},rn(o.label)&&n<T.length||(n===b.zeroLineIndex&&x.offset===M?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=sn(_.lineWidth,n,1),p=sn(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=dn(b,o._index||n,M))&&(i=C(y,a,g),k?r=s=u=h=i:l=d=c=f=i,R.push({tx1:r,ty1:l,tx2:s,ty2:d,x1:u,y1:c,x2:h,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return R.ticksLength=D,R.borderValue=e,R},_computeLabelItems:function(){var t,e,n,o,a,i,r,l,s,d,u,c,h=this,f=h.options,g=f.ticks,p=f.position,m=g.mirror,v=h.isHorizontal(),b=h._ticksToDraw,y=gn(g),x=g.padding,_=cn(f.gridLines),w=-V.toRadians(h.labelRotation),M=[];for("top"===p?(i=h.bottom-_-x,r=w?"left":"center"):"bottom"===p?(i=h.top+_+x,r=w?"right":"center"):"left"===p?(a=h.right-(m?0:_)-x,r=m?"left":"right"):(a=h.left+(m?0:_)+x,r=m?"right":"left"),t=0,e=b.length;t<e;++t)o=(n=b[t]).label,rn(o)||(l=h.getPixelForTick(n._index||t)+g.labelOffset,d=(s=n.major?y.major:y.minor).lineHeight,u=an(o)?o.length:1,v?(a=l,c="top"===p?((w?1:.5)-u)*d:(w?0:.5)*d):(i=l,c=(1-u)*d/2),M.push({x:a,y:i,rotation:w,label:o,font:s,textOffset:c,textAlign:r}));return M},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var o,a,i,r,l,s=e.ctx,d=e.chart,u=V._alignPixel,c=n.drawBorder?sn(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(i=0,r=h.length;i<r;++i)o=(l=h[i]).width,a=l.color,o&&a&&(s.save(),s.lineWidth=o,s.strokeStyle=a,s.setLineDash&&(s.setLineDash(l.borderDash),s.lineDashOffset=l.borderDashOffset),s.beginPath(),n.drawTicks&&(s.moveTo(l.tx1,l.ty1),s.lineTo(l.tx2,l.ty2)),n.drawOnChartArea&&(s.moveTo(l.x1,l.y1),s.lineTo(l.x2,l.y2)),s.stroke(),s.restore());if(c){var f,g,p,m,v=c,b=sn(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;e.isHorizontal()?(f=u(d,e.left,v)-v/2,g=u(d,e.right,b)+b/2,p=m=y):(p=u(d,e.top,v)-v/2,m=u(d,e.bottom,b)+b/2,f=g=y),s.lineWidth=c,s.strokeStyle=sn(n.color,0),s.beginPath(),s.moveTo(f,p),s.lineTo(g,m),s.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,o,a,i,r,l,s,d=t.ctx,u=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,o=u.length;e<o;++e){if(r=(i=u[e]).font,d.save(),d.translate(i.x,i.y),d.rotate(i.rotation),d.font=r.string,d.fillStyle=r.color,d.textBaseline="middle",d.textAlign=i.textAlign,l=i.label,s=i.textOffset,an(l))for(n=0,a=l.length;n<a;++n)d.fillText(""+l[n],0,s),s+=r.lineHeight;else d.fillText(l,0,s);d.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,o=n.scaleLabel;if(o.display){var a,i,r=ln(o.fontColor,N.global.defaultFontColor),l=V.options._parseFont(o),s=V.options.toPadding(o.padding),d=l.lineHeight/2,u=n.position,c=0;if(t.isHorizontal())a=t.left+t.width/2,i="bottom"===u?t.bottom-d-s.bottom:t.top+d+s.top;else{var h="left"===u;a=h?t.left+d+s.top:t.right-d-s.top,i=t.top+t.height/2,c=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,i),e.rotate(c),e.textAlign="center",e.textBaseline="middle",e.fillStyle=r,e.font=l.string,e.fillText(o.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,o=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==o&&t.draw===t._draw?[{z:o,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(o){return(!t||o.type===t)&&(n?o.xAxisID===e.id:o.yAxisID===e.id)}))}});vn.prototype._draw=vn.prototype.draw;var bn=vn,yn=V.isNullOrUndef,xn=bn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),o=e.options.ticks,a=o.min,i=o.max,r=0,l=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(r=t),void 0!==i&&(t=n.indexOf(i))>=0&&(l=t),e.minIndex=r,e.maxIndex=l,e.min=n[r],e.max=n[l]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,o=t.maxIndex;t.ticks=0===n&&o===e.length-1?e:e.slice(n,o+1)},getLabelForIndex:function(t,e){var n=this,o=n.chart;return o.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(o.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;bn.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 o,a,i,r=this;return yn(e)||yn(n)||(t=r.chart.data.datasets[n].data[e]),yn(t)||(o=r.isHorizontal()?t.x:t.y),(void 0!==o||void 0!==t&&isNaN(e))&&(a=r._getLabels(),t=V.valueOrDefault(o,t),e=-1!==(i=a.indexOf(t))?i:e,isNaN(e)&&(e=t)),r.getPixelForDecimal((e-r._startValue)/r._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}}),wn={position:"bottom"};xn._defaults=wn;var Mn=V.noop,kn=V.isNullOrUndef;var Tn=bn.extend({getRightValue:function(t){return"string"==typeof t?+t:bn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),o=V.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>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&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==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,o=n.stepSize,a=n.maxTicksLimit;return o?t=Math.ceil(e.max/o)-Math.floor(e.min/o)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={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,o,a,i,r=[],l=t.stepSize,s=l||1,d=t.maxTicks-1,u=t.min,c=t.max,h=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/d/s)*s;if(p<1e-14&&kn(u)&&kn(c))return[f,g];(i=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=V.niceNum(i*p/d/s)*s),l||kn(h)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,h),p=Math.ceil(p*n)/n),o=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,l&&(!kn(u)&&V.almostWhole(u/p,p/1e3)&&(o=u),!kn(c)&&V.almostWhole(c/p,p/1e3)&&(a=c)),i=(a-o)/p,i=V.almostEquals(i,Math.round(i),p/1e3)?Math.round(i):Math.ceil(i),o=Math.round(o*n)/n,a=Math.round(a*n)/n,r.push(kn(u)?o:u);for(var m=1;m<i;++m)r.push(Math.round((o+m*p)*n)/n);return r.push(kn(c)?a:c),r}(o,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),bn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),o=e.min,a=e.max;bn.prototype._configure.call(e),e.options.offset&&n.length&&(o-=t=(a-o)/Math.max(n.length-1,1)/2,a+=t),e._startValue=o,e._endValue=a,e._valueRange=a-o}}),Dn={position:"left",ticks:{callback:on.formatters.linear}};function Sn(t,e,n,o){var a,i,r=t.options,l=function(t,e,n){var o=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[o]&&(t[o]={pos:[],neg:[]}),t[o]}(e,r.stacked,n),s=l.pos,d=l.neg,u=o.length;for(a=0;a<u;++a)i=t._parseValue(o[a]),isNaN(i.min)||isNaN(i.max)||n.data[a].hidden||(s[a]=s[a]||0,d[a]=d[a]||0,r.relativePoints?s[a]=100:i.min<0||i.max<0?d[a]+=i.min:s[a]+=i.max)}function Rn(t,e,n){var o,a,i=n.length;for(o=0;o<i;++o)a=t._parseValue(n[o]),isNaN(a.min)||isNaN(a.max)||e.data[o].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Fn=Tn.extend({determineDataLimits:function(){var t,e,n,o,a=this,i=a.options,r=a.chart.data.datasets,l=a._getMatchingVisibleMetas(),s=i.stacked,d={},u=l.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===s)for(t=0;!s&&t<u;++t)s=void 0!==(e=l[t]).stack;for(t=0;t<u;++t)n=r[(e=l[t]).index].data,s?Sn(a,d,e,n):Rn(a,e,n);V.each(d,(function(t){o=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(o)),a.max=Math.max(a.max,V.max(o))})),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])}}),An=Dn;Fn._defaults=An;var Cn=V.valueOrDefault,Pn=V.math.log10;var In={position:"left",ticks:{callback:on.formatters.logarithmic}};function En(t,e){return V.isFinite(t)&&t>=0?t:e}var Ln=bn.extend({determineDataLimits:function(){var t,e,n,o,a,i,r=this,l=r.options,s=r.chart,d=s.data.datasets,u=r.isHorizontal();function c(t){return u?t.xAxisID===r.id:t.yAxisID===r.id}r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,r.minNotZero=Number.POSITIVE_INFINITY;var h=l.stacked;if(void 0===h)for(t=0;t<d.length;t++)if(e=s.getDatasetMeta(t),s.isDatasetVisible(t)&&c(e)&&void 0!==e.stack){h=!0;break}if(l.stacked||h){var f={};for(t=0;t<d.length;t++){var g=[(e=s.getDatasetMeta(t)).type,void 0===l.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(s.isDatasetVisible(t)&&c(e))for(void 0===f[g]&&(f[g]=[]),a=0,i=(o=d[t].data).length;a<i;a++){var p=f[g];n=r._parseValue(o[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);r.min=Math.min(r.min,e),r.max=Math.max(r.max,n)}}))}else for(t=0;t<d.length;t++)if(e=s.getDatasetMeta(t),s.isDatasetVisible(t)&&c(e))for(a=0,i=(o=d[t].data).length;a<i;a++)n=r._parseValue(o[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(r.min=Math.min(n.min,r.min),r.max=Math.max(n.max,r.max),0!==n.min&&(r.minNotZero=Math.min(n.min,r.minNotZero)));r.min=V.isFinite(r.min)?r.min:null,r.max=V.isFinite(r.max)?r.max:null,r.minNotZero=V.isFinite(r.minNotZero)?r.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=En(e.min,t.min),t.max=En(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Pn(t.min))-1),t.max=Math.pow(10,Math.floor(Pn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Pn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Pn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Pn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),o={min:En(e.min),max:En(e.max)},a=t.ticks=function(t,e){var n,o,a=[],i=Cn(t.min,Math.pow(10,Math.floor(Pn(e.min)))),r=Math.floor(Pn(e.max)),l=Math.ceil(e.max/Math.pow(10,r));0===i?(n=Math.floor(Pn(e.minNotZero)),o=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(i),i=o*Math.pow(10,n)):(n=Math.floor(Pn(i)),o=Math.floor(i/Math.pow(10,n)));var s=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(i),10==++o&&(o=1,s=++n>=0?1:s),i=Math.round(o*Math.pow(10,n)*s)/s}while(n<r||n===r&&o<l);var d=Cn(t.max,i);return a.push(d),a}(o,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(),bn.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(Pn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;bn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Cn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=Pn(e),t._valueOffset=n,t._valueRange=(Pn(t.max)-Pn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Pn(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)}}),On=In;Ln._defaults=On;var Nn=V.valueOrDefault,Wn=V.valueAtIndexOrDefault,Bn=V.options.resolve,zn={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:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function $n(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function Vn(t,e,n,o,a){return t===o||t===a?{start:e-n/2,end:e+n/2}:t<o||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Hn(t){return 0===t||180===t?"center":t<180?"left":"right"}function jn(t,e,n,o){var a,i,r=n.y+o/2;if(V.isArray(e))for(a=0,i=e.length;a<i;++a)t.fillText(e[a],n.x,r),r+=o;else t.fillText(e,n.x,r)}function qn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Un=Tn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=$n(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,o=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,i){if(e.isDatasetVisible(i)){var r=e.getDatasetMeta(i);V.each(a.data,(function(e,a){var i=+t.getRightValue(e);isNaN(i)||r.data[a].hidden||(n=Math.min(i,n),o=Math.max(i,o))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=o===Number.NEGATIVE_INFINITY?0:o,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/$n(this.options))},convertTicksToLabels:function(){var t=this;Tn.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,o,a=V.options._parseFont(t.options.pointLabels),i={l:0,r:t.width,t:0,b:t.height-t.paddingTop},r={};t.ctx.font=a.string,t._pointLabelSizes=[];var l,s,d,u=t.chart.data.labels.length;for(e=0;e<u;e++){o=t.getPointPosition(e,t.drawingArea+5),l=t.ctx,s=a.lineHeight,d=t.pointLabels[e],n=V.isArray(d)?{w:V.longestText(l,l.font,d),h:d.length*s}:{w:l.measureText(d).width,h:s},t._pointLabelSizes[e]=n;var c=t.getIndexAngle(e),h=V.toDegrees(c)%360,f=Vn(h,o.x,n.w,0,180),g=Vn(h,o.y,n.h,90,270);f.start<i.l&&(i.l=f.start,r.l=c),f.end>i.r&&(i.r=f.end,r.r=c),g.start<i.t&&(i.t=g.start,r.t=c),g.end>i.b&&(i.b=g.end,r.b=c)}t.setReductions(t.drawingArea,i,r)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var o=this,a=e.l/Math.sin(n.l),i=Math.max(e.r-o.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),l=-Math.max(e.b-(o.height-o.paddingTop),0)/Math.cos(n.b);a=Yn(a),i=Yn(i),r=Yn(r),l=Yn(l),o.drawingArea=Math.min(Math.floor(t-(a+i)/2),Math.floor(t-(r+l)/2)),o.setCenterPoint(a,i,r,l)},setCenterPoint:function(t,e,n,o){var a=this,i=a.width-e-a.drawingArea,r=t+a.drawingArea,l=n+a.drawingArea,s=a.height-a.paddingTop-o-a.drawingArea;a.xCenter=Math.floor((r+i)/2+a.left),a.yCenter=Math.floor((l+s)/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,o=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(o)*e+n.xCenter,y:Math.sin(o)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,o=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&o<0?o:n>0&&o>0?n:0)},_drawGrid:function(){var t,e,n,o=this,a=o.ctx,i=o.options,r=i.gridLines,l=i.angleLines,s=Nn(l.lineWidth,r.lineWidth),d=Nn(l.color,r.color);if(i.pointLabels.display&&function(t){var e=t.ctx,n=t.options,o=n.pointLabels,a=$n(n),i=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),r=V.options._parseFont(o);e.save(),e.font=r.string,e.textBaseline="middle";for(var l=t.chart.data.labels.length-1;l>=0;l--){var s=0===l?a/2:0,d=t.getPointPosition(l,i+s+5),u=Wn(o.fontColor,l,N.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(l),h=V.toDegrees(c);e.textAlign=Hn(h),qn(h,t._pointLabelSizes[l],d),jn(e,t.pointLabels[l],d,r.lineHeight)}e.restore()}(o),r.display&&V.each(o.ticks,(function(t,n){0!==n&&(e=o.getDistanceFromCenterForValue(o.ticksAsNumbers[n]),function(t,e,n,o){var a,i=t.ctx,r=e.circular,l=t.chart.data.labels.length,s=Wn(e.color,o-1),d=Wn(e.lineWidth,o-1);if((r||l)&&s&&d){if(i.save(),i.strokeStyle=s,i.lineWidth=d,i.setLineDash&&(i.setLineDash(e.borderDash||[]),i.lineDashOffset=e.borderDashOffset||0),i.beginPath(),r)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 u=1;u<l;u++)a=t.getPointPosition(u,n),i.lineTo(a.x,a.y)}i.closePath(),i.stroke(),i.restore()}}(o,r,e,n))})),l.display&&s&&d){for(a.save(),a.lineWidth=s,a.strokeStyle=d,a.setLineDash&&(a.setLineDash(Bn([l.borderDash,r.borderDash,[]])),a.lineDashOffset=Bn([l.borderDashOffset,r.borderDashOffset,0])),t=o.chart.data.labels.length-1;t>=0;t--)e=o.getDistanceFromCenterForValue(i.ticks.reverse?o.min:o.max),n=o.getPointPosition(t,e),a.beginPath(),a.moveTo(o.xCenter,o.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 o,a,i=t.getIndexAngle(0),r=V.options._parseFont(n),l=Nn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=r.string,e.translate(t.xCenter,t.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(i,s){(0!==s||n.reverse)&&(o=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),n.showLabelBackdrop&&(a=e.measureText(i).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-o-r.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,r.size+2*n.backdropPaddingY)),e.fillStyle=l,e.fillText(i,0,-o))})),e.restore()}},_drawTitle:V.noop}),Gn=zn;Un._defaults=Gn;var Xn=V._deprecated,Kn=V.options.resolve,Zn=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,to={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}},eo=Object.keys(to);function no(t,e){return t-e}function oo(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ao(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function io(t,e,n,o){var a=function(t,e,n){for(var o,a,i,r=0,l=t.length-1;r>=0&&r<=l;){if(a=t[(o=r+l>>1)-1]||null,i=t[o],!a)return{lo:null,hi:i};if(i[e]<n)r=o+1;else{if(!(a[e]>n))return{lo:a,hi:i};l=o-1}}return{lo:i,hi:null}}(t,e,n),i=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],l=r[e]-i[e],s=l?(n-i[e])/l:0,d=(r[o]-i[o])*s;return i[o]+d}function ro(t,e){var n=t._adapter,o=t.options.time,a=o.parser,i=a||o.format,r=e;return"function"==typeof a&&(r=a(r)),V.isFinite(r)||(r="string"==typeof i?n.parse(r,i):n.parse(r)),null!==r?+r:(a||"function"!=typeof i||(r=i(e),V.isFinite(r)||(r=n.parse(r))),r)}function lo(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,o=ro(t,t.getRightValue(e));return null===o||n.round&&(o=+t._adapter.startOf(o,n.round)),o}function so(t,e,n,o){var a,i,r,l=eo.length;for(a=eo.indexOf(t);a<l-1;++a)if(r=(i=to[eo[a]]).steps?i.steps:Qn,i.common&&Math.ceil((n-e)/(r*i.size))<=o)return eo[a];return eo[l-1]}function uo(t,e,n){var o,a,i=[],r={},l=e.length;for(o=0;o<l;++o)r[a=e[o]]=o,i.push({value:a,major:!1});return 0!==l&&n?function(t,e,n,o){var a,i,r=t._adapter,l=+r.startOf(e[0].value,o),s=e[e.length-1].value;for(a=l;a<=s;a=+r.add(a,1,o))(i=n[a])>=0&&(e[i].major=!0);return e}(t,i,r,n):i}var co=bn.extend({initialize:function(){this.mergeTicksOptions(),bn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),o=t._adapter=new nn._date(e.adapters.date);return Xn("time scale",n.format,"time.format","time.parser"),Xn("time scale",n.min,"time.min","ticks.min"),Xn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,o.formats()),bn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),bn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,o,a,i,r,l=this,s=l.chart,d=l._adapter,u=l.options,c=u.time.unit||"day",h=Qn,f=Jn,g=[],p=[],m=[],v=l._getLabels();for(t=0,n=v.length;t<n;++t)m.push(lo(l,v[t]));for(t=0,n=(s.data.datasets||[]).length;t<n;++t)if(s.isDatasetVisible(t))if(a=s.data.datasets[t].data,V.isObject(a[0]))for(p[t]=[],e=0,o=a.length;e<o;++e)i=lo(l,a[e]),g.push(i),p[t][e]=i;else p[t]=m.slice(0),r||(g=g.concat(m),r=!0);else p[t]=[];m.length&&(h=Math.min(h,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,o,a={},i=[];for(e=0,n=t.length;e<n;++e)a[o=t[e]]||(a[o]=!0,i.push(o));return i}(g).sort(no):g.sort(no),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=lo(l,oo(u))||h,f=lo(l,ao(u))||f,h=h===Qn?+d.startOf(Date.now(),c):h,f=f===Jn?+d.endOf(Date.now(),c)+1:f,l.min=Math.min(h,f),l.max=Math.max(h+1,f),l._table=[],l._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,o=this,a=o.min,i=o.max,r=o.options,l=r.ticks,s=r.time,d=o._timestamps,u=[],c=o.getLabelCapacity(a),h=l.source,f=r.distribution;for(d="data"===h||"auto"===h&&"series"===f?d.data:"labels"===h?d.labels:function(t,e,n,o){var a,i=t._adapter,r=t.options,l=r.time,s=l.unit||so(l.minUnit,e,n,o),d=Kn([l.stepSize,l.unitStepSize,1]),u="week"===s&&l.isoWeekday,c=e,h=[];if(u&&(c=+i.startOf(c,"isoWeek",u)),c=+i.startOf(c,u?"day":s),i.diff(n,e,s)>1e5*d)throw e+" and "+n+" are too far apart with stepSize of "+d+" "+s;for(a=c;a<n;a=+i.add(a,d,s))h.push(a);return a!==n&&"ticks"!==r.bounds||h.push(a),h}(o,a,i,c),"ticks"===r.bounds&&d.length&&(a=d[0],i=d[d.length-1]),a=lo(o,oo(r))||a,i=lo(o,ao(r))||i,t=0,e=d.length;t<e;++t)(n=d[t])>=a&&n<=i&&u.push(n);return o.min=a,o.max=i,o._unit=s.unit||(l.autoSkip?so(s.minUnit,o.min,o.max,c):function(t,e,n,o,a){var i,r;for(i=eo.length-1;i>=eo.indexOf(n);i--)if(r=eo[i],to[r].common&&t._adapter.diff(a,o,r)>=e-1)return r;return eo[n?eo.indexOf(n):0]}(o,u.length,s.minUnit,o.min,o.max)),o._majorUnit=l.major.enabled&&"year"!==o._unit?function(t){for(var e=eo.indexOf(t)+1,n=eo.length;e<n;++e)if(to[eo[e]].common)return eo[e]}(o._unit):void 0,o._table=function(t,e,n,o){if("linear"===o||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,i,r,l,s,d=[],u=[e];for(a=0,i=t.length;a<i;++a)(l=t[a])>e&&l<n&&u.push(l);for(u.push(n),a=0,i=u.length;a<i;++a)s=u[a+1],r=u[a-1],l=u[a],void 0!==r&&void 0!==s&&Math.round((s+r)/2)===l||d.push({time:l,pos:a/(i-1)});return d}(o._timestamps.data,a,i,f),o._offsets=function(t,e,n,o,a){var i,r,l=0,s=0;return a.offset&&e.length&&(i=io(t,"time",e[0],"pos"),l=1===e.length?1-i:(io(t,"time",e[1],"pos")-i)/2,r=io(t,"time",e[e.length-1],"pos"),s=1===e.length?r:(r-io(t,"time",e[e.length-2],"pos"))/2),{start:l,end:s,factor:1/(l+1+s)}}(o._table,u,0,0,r),l.reverse&&u.reverse(),uo(o,u,o._majorUnit)},getLabelForIndex:function(t,e){var n=this,o=n._adapter,a=n.chart.data,i=n.options.time,r=a.labels&&t<a.labels.length?a.labels[t]:"",l=a.datasets[e].data[t];return V.isObject(l)&&(r=n.getRightValue(l)),i.tooltipFormat?o.format(ro(n,r),i.tooltipFormat):"string"==typeof r?r:o.format(ro(n,r),i.displayFormats.datetime)},tickFormatFunction:function(t,e,n,o){var a=this,i=a._adapter,r=a.options,l=r.time.displayFormats,s=l[a._unit],d=a._majorUnit,u=l[d],c=n[e],h=r.ticks,f=d&&u&&c&&c.major,g=i.format(t,o||(f?u:s)),p=f?h.major:h.minor,m=Kn([p.callback,p.userCallback,h.callback,h.userCallback]);return m?m(g,e,n):g},convertTicksToLabels:function(t){var e,n,o=[];for(e=0,n=t.length;e<n;++e)o.push(this.tickFormatFunction(t[e].value,e,t));return o},getPixelForOffset:function(t){var e=this,n=e._offsets,o=io(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+o)*n.factor)},getPixelForValue:function(t,e,n){var o=this,a=null;if(void 0!==e&&void 0!==n&&(a=o._timestamps.datasets[n][e]),null===a&&(a=lo(o,t)),null!==a)return o.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,o=e.getDecimalForPixel(t)/n.factor-n.end,a=io(e._table,"pos",o,"time");return e._adapter._create(a)},_getLabelSize:function(t){var e=this,n=e.options.ticks,o=e.ctx.measureText(t).width,a=V.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(a),r=Math.sin(a),l=Zn(n.fontSize,N.global.defaultFontSize);return{w:o*i+l*r,h:o*r+l*i}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,o=n.displayFormats,a=o[n.unit]||o.millisecond,i=e.tickFormatFunction(t,0,uo(e,[t],e._majorUnit),a),r=e._getLabelSize(i),l=Math.floor(e.isHorizontal()?e.width/r.w:e.height/r.h);return e.options.offset&&l--,l>0?l:1}}),ho={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}}};co._defaults=ho;var fo={category:xn,linear:Fn,logarithmic:Ln,radialLinear:Un,time:co},go={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"};nn._date.override("function"==typeof t?{_id:"moment",formats:function(){return go},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,o){return t(e).add(n,o).valueOf()},diff:function(e,n,o){return t(e).diff(t(n),o)},startOf:function(e,n,o){return e=t(e),"isoWeek"===n?e.isoWeekday(o).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var po={dataset:function(t){var e=t.fill,n=t.chart,o=n.getDatasetMeta(e),a=o&&n.isDatasetVisible(e)&&o.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,o=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===o?t.y:o}}}};function mo(t,e,n){var o,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(o=parseFloat(i,10),isFinite(o)&&Math.floor(o)===o)return"-"!==i[0]&&"+"!==i[0]||(o=e+o),!(o===e||o<0||o>=n)&&o;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 vo(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,o,a,i,r=t.el._scale,l=r.options,s=r.chart.data.labels.length,d=t.fill,u=[];if(!s)return null;for(e=l.ticks.reverse?r.max:r.min,n=l.ticks.reverse?r.min:r.max,o=r.getPointPositionForValue(0,e),a=0;a<s;++a)i="start"===d||"end"===d?r.getPointPositionForValue(a,"start"===d?e:n):r.getBasePosition(a),l.gridLines.circular&&(i.cx=o.x,i.cy=o.y,i.angle=r.getIndexAngle(a)-Math.PI/2),u.push(i);return u}(t):function(t){var e,n=t.el._model||{},o=t.el._scale||{},a=t.fill,i=null;if(isFinite(a))return null;if("start"===a?i=void 0===n.scaleBottom?o.bottom:n.scaleBottom:"end"===a?i=void 0===n.scaleTop?o.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:o.getBasePixel&&(i=o.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if(V.isFinite(i))return{x:(e=o.isHorizontal())?i:null,y:e?null:i}}return null}(t)}function bo(t,e,n){var o,a=t[e].fill,i=[e];if(!n)return a;for(;!1!==a&&-1===i.indexOf(a);){if(!isFinite(a))return a;if(!(o=t[a]))return!1;if(o.visible)return a;i.push(a),a=o.fill}return!1}function yo(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),po[n](t))}function xo(t){return t&&!t.skip}function _o(t,e,n,o,a){var i,r,l,s;if(o&&a){for(t.moveTo(e[0].x,e[0].y),i=1;i<o;++i)V.canvas.lineTo(t,e[i-1],e[i]);if(void 0===n[0].angle)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);else for(r=n[0].cx,l=n[0].cy,s=Math.sqrt(Math.pow(n[0].x-r,2)+Math.pow(n[0].y-l,2)),i=a-1;i>0;--i)t.arc(r,l,s,n[i].angle,n[i-1].angle,!0)}}function wo(t,e,n,o,a,i){var r,l,s,d,u,c,h,f,g=e.length,p=o.spanGaps,m=[],v=[],b=0,y=0;for(t.beginPath(),r=0,l=g;r<l;++r)u=n(d=e[s=r%g]._view,s,o),c=xo(d),h=xo(u),i&&void 0===f&&c&&(l=g+(f=r+1)),c&&h?(b=m.push(d),y=v.push(u)):b&&y&&(p?(c&&m.push(d),h&&v.push(u)):(_o(t,m,v,b,y),b=y=0,m=[],v=[]));_o(t,m,v,b,y),t.closePath(),t.fillStyle=a,t.fill()}var Mo={id:"filler",afterDatasetsUpdate:function(t,e){var n,o,a,i,r=(t.data.datasets||[]).length,l=e.propagate,s=[];for(o=0;o<r;++o)i=null,(a=(n=t.getDatasetMeta(o)).dataset)&&a._model&&a instanceof wt.Line&&(i={visible:t.isDatasetVisible(o),fill:mo(a,o,r),chart:t,el:a}),n.$filler=i,s.push(i);for(o=0;o<r;++o)(i=s[o])&&(i.fill=bo(s,o,l),i.boundary=vo(i),i.mapper=yo(i))},beforeDatasetsDraw:function(t){var e,n,o,a,i,r,l,s=t._getSortedVisibleDatasetMetas(),d=t.ctx;for(n=s.length-1;n>=0;--n)(e=s[n].$filler)&&e.visible&&(a=(o=e.el)._view,i=o._children||[],r=e.mapper,l=a.backgroundColor||N.global.defaultColor,r&&l&&i.length&&(V.canvas.clipArea(d,t.chartArea),wo(d,i,r,a,l,o._loop),V.canvas.unclipArea(d)))}},ko=V.rtl.getRtlAdapter,To=V.noop,Do=V.valueOrDefault;function So(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,o=this.chart,a=o.getDatasetMeta(n);a.hidden=null===a.hidden?!o.data.datasets[n].hidden:null,o.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},o=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(o?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,o,a=document.createElement("ul"),i=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=i.length;e<n;e++)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[e].backgroundColor,i[e].label&&o.appendChild(document.createTextNode(i[e].label));return a.outerHTML}});var Ro=X.extend({initialize:function(t){var e=this;V.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:To,update:function(t,e,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=e,o.margins=n,o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeBuildLabels(),o.buildLabels(),o.afterBuildLabels(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:To,beforeSetDimensions:To,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:To,beforeBuildLabels:To,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:To,beforeFit:To,fit:function(){var t=this,e=t.options,n=e.labels,o=e.display,a=t.ctx,i=V.options._parseFont(n),r=i.size,l=t.legendHitBoxes=[],s=t.minSize,d=t.isHorizontal();if(d?(s.width=t.maxWidth,s.height=o?10:0):(s.width=o?10:0,s.height=t.maxHeight),o){if(a.font=i.string,d){var u=t.lineWidths=[0],c=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,(function(t,e){var o=So(n,r)+r/2+a.measureText(t.text).width;(0===e||u[u.length-1]+o+2*n.padding>s.width)&&(c+=r+n.padding,u[u.length-(e>0?0:1)]=0),l[e]={left:0,top:0,width:o,height:r},u[u.length-1]+=o+n.padding})),s.height+=c}else{var h=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var o=So(n,r)+r/2+a.measureText(t.text).width;e>0&&v+r+2*h>s.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,o),v+=r+h,l[e]={left:0,top:0,width:o,height:r}})),p+=m,f.push(m),g.push(v),s.width+=p}t.width=s.width,t.height=s.height}else t.width=s.width=t.height=s.height=0},afterFit:To,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,o=N.global,a=o.defaultColor,i=o.elements.line,r=t.height,l=t.columnHeights,s=t.width,d=t.lineWidths;if(e.display){var u,c=ko(e.rtl,t.left,t.minSize.width),h=t.ctx,f=Do(n.fontColor,o.defaultFontColor),g=V.options._parseFont(n),p=g.size;h.textAlign=c.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=g.string;var m=So(n,p),v=t.legendHitBoxes,b=function(t,o){switch(e.align){case"start":return n.padding;case"end":return t-o;default:return(t-o+n.padding)/2}},y=t.isHorizontal();u=y?{x:t.left+b(s,d[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(r,l[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=p+n.padding;V.each(t.legendItems,(function(e,o){var f=h.measureText(e.text).width,g=m+p/2+f,_=u.x,w=u.y;c.setWidth(t.minSize.width),y?o>0&&_+g+n.padding>t.left+t.minSize.width&&(w=u.y+=x,u.line++,_=u.x=t.left+b(s,d[u.line])):o>0&&w+x>t.top+t.minSize.height&&(_=u.x=_+t.columnWidths[u.line]+n.padding,u.line++,w=u.y=t.top+b(r,l[u.line]));var M=c.x(_);(function(t,e,o){if(!(isNaN(m)||m<=0)){h.save();var r=Do(o.lineWidth,i.borderWidth);if(h.fillStyle=Do(o.fillStyle,a),h.lineCap=Do(o.lineCap,i.borderCapStyle),h.lineDashOffset=Do(o.lineDashOffset,i.borderDashOffset),h.lineJoin=Do(o.lineJoin,i.borderJoinStyle),h.lineWidth=r,h.strokeStyle=Do(o.strokeStyle,a),h.setLineDash&&h.setLineDash(Do(o.lineDash,i.borderDash)),n&&n.usePointStyle){var l=m*Math.SQRT2/2,s=c.xPlus(t,m/2),d=e+p/2;V.canvas.drawPoint(h,o.pointStyle,l,s,d,o.rotation)}else h.fillRect(c.leftForLtr(t,m),e,m,p),0!==r&&h.strokeRect(c.leftForLtr(t,m),e,m,p);h.restore()}})(M,w,e),v[o].left=c.leftForLtr(M,v[o].width),v[o].top=w,function(t,e,n,o){var a=p/2,i=c.xPlus(t,m+a),r=e+a;h.fillText(n.text,i,r),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(i,r),h.lineTo(c.xPlus(i,o),r),h.stroke())}(M,w,e,f),y?u.x+=g+n.padding:u.y+=x})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,o,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>=(o=a[n]).left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null},handleEvent:function(t){var e,n=this,o=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!o.onHover&&!o.onLeave)return}else{if("click"!==a)return;if(!o.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&o.onClick&&o.onClick.call(n,t.native,e):(o.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&o.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),o.onHover&&e&&o.onHover.call(n,t.native,e))}});function Fo(t,e){var n=new Ro({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.legend=n}var Ao={id:"legend",_element:Ro,beforeInit:function(t){var e=t.options.legend;e&&Fo(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,N.global.legend),n?(fe.configure(t,n,e),n.options=e):Fo(t,e)):n&&(fe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Co=V.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Po=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Co,update:function(t,e,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=e,o.margins=n,o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeBuildLabels(),o.buildLabels(),o.afterBuildLabels(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:Co,beforeSetDimensions:Co,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:Co,beforeBuildLabels:Co,buildLabels:Co,afterBuildLabels:Co,beforeFit:Co,fit:function(){var t,e=this,n=e.options,o=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=o.width=a?e.maxWidth:t,e.height=o.height=a?t:e.maxHeight):e.width=o.width=e.height=o.height=0},afterFit:Co,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 o,a,i,r=V.options._parseFont(n),l=r.lineHeight,s=l/2+n.padding,d=0,u=t.top,c=t.left,h=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=r.string,t.isHorizontal()?(a=c+(f-c)/2,i=u+s,o=f-c):(a="left"===n.position?c+s:f-s,i=u+(h-u)/2,o=h-u,d=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,i),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,o),p+=l;else e.fillText(g,0,0,o);e.restore()}}});function Io(t,e){var n=new Po({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.titleBlock=n}var Eo={},Lo=Mo,Oo=Ao,No={id:"title",_element:Po,beforeInit:function(t){var e=t.options.title;e&&Io(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,N.global.title),n?(fe.configure(t,n,e),n.options=e):Io(t,e)):n&&(fe.removeBox(t,n),delete t.titleBlock)}};for(var Wo in Eo.filler=Lo,Eo.legend=Oo,Eo.title=No,Qe.helpers=V,function(){function t(t,e,n){var o;return"string"==typeof t?(o=parseInt(t,10),-1!==t.indexOf("%")&&(o=o/100*e.parentNode[n])):o=t,o}function e(t){return null!=t&&"none"!==t}function n(n,o,a){var i=document.defaultView,r=V._getParentNode(n),l=i.getComputedStyle(n)[o],s=i.getComputedStyle(r)[o],d=e(l),u=e(s),c=Number.POSITIVE_INFINITY;return d||u?Math.min(d?t(l,n,a):c,u?t(s,r,a):c):"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 o=0,a=t.length;o<a;++o)if(e.call(n,t[o],o,t))return o;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var o=n+1;o<t.length;o++){var a=t[o];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var o=n-1;o>=0;o--){var a=t[o];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,o=e.y-t.y,a=Math.sqrt(n*n+o*o),i=Math.atan2(o,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 o=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*o)/o+a},V.splineCurve=function(t,e,n,o){var a=t.skip?e:t,i=e,r=n.skip?e:n,l=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),s=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),d=l/(l+s),u=s/(l+s),c=o*(d=isNaN(d)?0:d),h=o*(u=isNaN(u)?0:u);return{previous:{x:i.x-c*(r.x-a.x),y:i.y-c*(r.y-a.y)},next:{x:i.x+h*(r.x-a.x),y:i.y+h*(r.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,o,a,i,r,l,s,d,u=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),c=u.length;for(e=0;e<c;++e)if(!(o=u[e]).model.skip){if(n=e>0?u[e-1]:null,(a=e<c-1?u[e+1]:null)&&!a.model.skip){var h=a.model.x-o.model.x;o.deltaK=0!==h?(a.model.y-o.model.y)/h:0}!n||n.model.skip?o.mK=o.deltaK:!a||a.model.skip?o.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(o.deltaK)?o.mK=0:o.mK=(n.deltaK+o.deltaK)/2}for(e=0;e<c-1;++e)o=u[e],a=u[e+1],o.model.skip||a.model.skip||(V.almostEquals(o.deltaK,0,this.EPSILON)?o.mK=a.mK=0:(i=o.mK/o.deltaK,r=a.mK/o.deltaK,(s=Math.pow(i,2)+Math.pow(r,2))<=9||(l=3/Math.sqrt(s),o.mK=i*l*o.deltaK,a.mK=r*l*o.deltaK)));for(e=0;e<c;++e)(o=u[e]).model.skip||(n=e>0?u[e-1]:null,a=e<c-1?u[e+1]:null,n&&!n.model.skip&&(d=(o.model.x-n.model.x)/3,o.model.controlPointPreviousX=o.model.x-d,o.model.controlPointPreviousY=o.model.y-d*o.mK),a&&!a.model.skip&&(d=(a.model.x-o.model.x)/3,o.model.controlPointNextX=o.model.x+d,o.model.controlPointNextY=o.model.y+d*o.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)),o=t/Math.pow(10,n);return(e?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=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,o,a=t.originalEvent||t,i=t.target||t.srcElement,r=i.getBoundingClientRect(),l=a.touches;l&&l.length>0?(n=l[0].clientX,o=l[0].clientY):(n=a.clientX,o=a.clientY);var s=parseFloat(V.getStyle(i,"padding-left")),d=parseFloat(V.getStyle(i,"padding-top")),u=parseFloat(V.getStyle(i,"padding-right")),c=parseFloat(V.getStyle(i,"padding-bottom")),h=r.right-r.left-s-u,f=r.bottom-r.top-d-c;return{x:n=Math.round((n-r.left-s)/h*i.width/e.currentDevicePixelRatio),y:o=Math.round((o-r.top-d)/f*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,o=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?o:Math.min(o,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,o=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?o:Math.min(o,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 o=t.canvas,a=t.height,i=t.width;o.height=a*n,o.width=i*n,t.ctx.scale(n,n),o.style.height||o.style.width||(o.style.height=a+"px",o.style.width=i+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,o){var a=(o=o||{}).data=o.data||{},i=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(a=o.data={},i=o.garbageCollect=[],o.font=e),t.font=e;var r,l,s,d,u,c=0,h=n.length;for(r=0;r<h;r++)if(null!=(d=n[r])&&!0!==V.isArray(d))c=V.measureText(t,a,i,c,d);else if(V.isArray(d))for(l=0,s=d.length;l<s;l++)null==(u=d[l])||V.isArray(u)||(c=V.measureText(t,a,i,c,u));var f=i.length/2;if(f>n.length){for(r=0;r<f;r++)delete a[i[r]];i.splice(0,f)}return c},V.measureText=function(t,e,n,o,a){var i=e[a];return i||(i=e[a]=t.measureText(a).width,n.push(a)),i>o&&(o=i),o},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=N.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()}}(),Qe._adapters=nn,Qe.Animation=Z,Qe.animationService=J,Qe.controllers=Kt,Qe.DatasetController=ot,Qe.defaults=N,Qe.Element=X,Qe.elements=wt,Qe.Interaction=oe,Qe.layouts=fe,Qe.platform=Pe,Qe.plugins=Ie,Qe.Scale=bn,Qe.scaleService=Ee,Qe.Ticks=on,Qe.Tooltip=qe,Qe.helpers.each(fo,(function(t,e){Qe.scaleService.registerScaleType(e,t,t._defaults)})),Eo)Eo.hasOwnProperty(Wo)&&Qe.plugins.register(Eo[Wo]);Qe.platform.initialize();var Bo=Qe;return"undefined"!=typeof window&&(window.Chart=Qe),Qe.Chart=Qe,Qe.Legend=Eo.legend._element,Qe.Title=Eo.title._element,Qe.pluginService=Qe.plugins,Qe.PluginBase=Qe.Element.extend({}),Qe.canvasHelpers=Qe.helpers.canvas,Qe.layoutService=Qe.layouts,Qe.LinearScaleBase=Tn,Qe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Qe[t]=function(e,n){return new Qe(e,Qe.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bo}(function(){try{return n(76154)}catch(t){}}())},2694:(t,e,n)=>{"use strict";var o=n(6925);function a(){}function i(){}i.resetWarningCache=a,t.exports=function(){function t(t,e,n,a,i,r){if(r!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},5556:(t,e,n)=>{t.exports=n(2694)()},6925:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338:(t,e,n)=>{"use strict";var o=n(75795);e.H=o.createRoot,o.hydrateRoot},75795:t=>{"use strict";t.exports=window.ReactDOM},76154:t=>{"use strict";t.exports=window.moment}},e={};function n(o){var a=e[o];if(void 0!==a)return a.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.React;var e=n(5338),o=n(76154),a=n.n(o);const i=window.wp.i18n,r=(0,t.createContext)(),l=()=>(0,t.useContext)(r);var s=n(5556),d=n.n(s);const u=({gap:e,visible:n,children:o})=>{const a={display:n?"grid":"none",gridGap:e};return(0,t.createElement)("div",{className:"givewp-grid",style:a},o)};u.propTypes={gap:d().string,visible:d().bool,children:d().node.isRequired},u.defaultProps={gap:"30px",visible:!0,children:null};const c=u,h=({width:e,title:n,children:o})=>(0,t.createElement)("div",{className:"givewp-card",style:{gridColumn:"span "+e}},n&&(0,t.createElement)("div",{className:"title"},n),(0,t.createElement)("div",{className:"content"},o));h.propTypes={width:d().number,title:d().string,children:d().node.isRequired},h.defaultProps={width:4,title:null,children:null};const f=h,g=window.wp.apiFetch;var p=n.n(g);const m=t=>({type:"SET_RANGE",payload:{range:t}}),v=t=>window.giveReportsData[t],b=e=>{const[{period:n,currency:o,testMode:a},i]=l(),[r,s]=(0,t.useState)(null),[d,u]=(0,t.useState)(!1);return(0,t.useEffect)((()=>{if(!n.startDate||!n.endDate)return;const t=new AbortController,r=new URLSearchParams({start:n.startDate.format("YYYY-MM-DD"),end:n.endDate.format("YYYY-MM-DD"),currency:o,testMode:a});return u(!0),p()({path:`/give-api/v2/reports/${e}?${r.toString()}`,signal:t.signal}).then((function(t){const n=t.status;if(i((t=>({type:"SET_GIVE_STATUS",payload:t}))(n)),"no_donations_found"===n){const t=(t=>{switch(t){case"income":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-25 00:00:00",y:223},{x:"2020-02-26 00:00:00",y:5},{x:"2020-02-27 00:00:00",y:376},{x:"2020-02-28 00:00:00",y:25},{x:"2020-02-29 00:00:00",y:0},{x:"2020-03-01 00:00:00",y:250},{x:"2020-03-02 00:00:00",y:41}],tooltips:[{title:"$0",body:"0 Donors",footer:"Monday"},{title:"$223.00",body:"1 Donors",footer:"Tuesday"},{title:"$5.00",body:"1 Donors",footer:"Wednesday"},{title:"$376.00",body:"2 Donors",footer:"Thursday"},{title:"$25.00",body:"1 Donors",footer:"Friday"},{title:"$0",body:"0 Donors",footer:"Saturday"},{title:"$250.00",body:"1 Donors",footer:"Sunday"},{title:"$41.00",body:"1 Donors",footer:"Monday"}]}]};case"total-income":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:223},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:5},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:250},{x:"2020-02-27 15:00:00",y:126},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:25},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:250},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:41},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"$0",body:"Total Revenue",footer:"Sun 9pm - Mon 12am"},{title:"$0",body:"Total Revenue",footer:"Mon 12am - Mon 3am"},{title:"$0",body:"Total Revenue",footer:"Mon 3am - Mon 6am"},{title:"$0",body:"Total Revenue",footer:"Mon 6am - Mon 9am"},{title:"$0",body:"Total Revenue",footer:"Mon 9am - Mon 12pm"},{title:"$0",body:"Total Revenue",footer:"Mon 12pm - Mon 3pm"},{title:"$0",body:"Total Revenue",footer:"Mon 3pm - Mon 6pm"},{title:"$0",body:"Total Revenue",footer:"Mon 6pm - Mon 9pm"},{title:"$0",body:"Total Revenue",footer:"Mon 9pm - Tue 12am"},{title:"$0",body:"Total Revenue",footer:"Tue 12am - Tue 3am"},{title:"$0",body:"Total Revenue",footer:"Tue 3am - Tue 6am"},{title:"$0",body:"Total Revenue",footer:"Tue 6am - Tue 9am"},{title:"$223.00",body:"Total Revenue",footer:"Tue 9am - Tue 12pm"},{title:"$0",body:"Total Revenue",footer:"Tue 12pm - Tue 3pm"},{title:"$0",body:"Total Revenue",footer:"Tue 3pm - Tue 6pm"},{title:"$0",body:"Total Revenue",footer:"Tue 6pm - Tue 9pm"},{title:"$0",body:"Total Revenue",footer:"Tue 9pm - Wed 12am"},{title:"$0",body:"Total Revenue",footer:"Wed 12am - Wed 3am"},{title:"$0",body:"Total Revenue",footer:"Wed 3am - Wed 6am"},{title:"$0",body:"Total Revenue",footer:"Wed 6am - Wed 9am"},{title:"$5.00",body:"Total Revenue",footer:"Wed 9am - Wed 12pm"},{title:"$0",body:"Total Revenue",footer:"Wed 12pm - Wed 3pm"},{title:"$0",body:"Total Revenue",footer:"Wed 3pm - Wed 6pm"},{title:"$0",body:"Total Revenue",footer:"Wed 6pm - Wed 9pm"},{title:"$0",body:"Total Revenue",footer:"Wed 9pm - Thu 12am"},{title:"$0",body:"Total Revenue",footer:"Thu 12am - Thu 3am"},{title:"$0",body:"Total Revenue",footer:"Thu 3am - Thu 6am"},{title:"$0",body:"Total Revenue",footer:"Thu 6am - Thu 9am"},{title:"$250.00",body:"Total Revenue",footer:"Thu 9am - Thu 12pm"},{title:"$126.00",body:"Total Revenue",footer:"Thu 12pm - Thu 3pm"},{title:"$0",body:"Total Revenue",footer:"Thu 3pm - Thu 6pm"},{title:"$0",body:"Total Revenue",footer:"Thu 6pm - Thu 9pm"},{title:"$0",body:"Total Revenue",footer:"Thu 9pm - Fri 12am"},{title:"$0",body:"Total Revenue",footer:"Fri 12am - Fri 3am"},{title:"$0",body:"Total Revenue",footer:"Fri 3am - Fri 6am"},{title:"$0",body:"Total Revenue",footer:"Fri 6am - Fri 9am"},{title:"$25.00",body:"Total Revenue",footer:"Fri 9am - Fri 12pm"},{title:"$0",body:"Total Revenue",footer:"Fri 12pm - Fri 3pm"},{title:"$0",body:"Total Revenue",footer:"Fri 3pm - Fri 6pm"},{title:"$0",body:"Total Revenue",footer:"Fri 6pm - Fri 9pm"},{title:"$0",body:"Total Revenue",footer:"Fri 9pm - Sat 12am"},{title:"$0",body:"Total Revenue",footer:"Sat 12am - Sat 3am"},{title:"$0",body:"Total Revenue",footer:"Sat 3am - Sat 6am"},{title:"$0",body:"Total Revenue",footer:"Sat 6am - Sat 9am"},{title:"$0",body:"Total Revenue",footer:"Sat 9am - Sat 12pm"},{title:"$0",body:"Total Revenue",footer:"Sat 12pm - Sat 3pm"},{title:"$0",body:"Total Revenue",footer:"Sat 3pm - Sat 6pm"},{title:"$0",body:"Total Revenue",footer:"Sat 6pm - Sat 9pm"},{title:"$0",body:"Total Revenue",footer:"Sat 9pm - Sun 12am"},{title:"$0",body:"Total Revenue",footer:"Sun 12am - Sun 3am"},{title:"$0",body:"Total Revenue",footer:"Sun 3am - Sun 6am"},{title:"$0",body:"Total Revenue",footer:"Sun 6am - Sun 9am"},{title:"$250.00",body:"Total Revenue",footer:"Sun 9am - Sun 12pm"},{title:"$0",body:"Total Revenue",footer:"Sun 12pm - Sun 3pm"},{title:"$0",body:"Total Revenue",footer:"Sun 3pm - Sun 6pm"},{title:"$0",body:"Total Revenue",footer:"Sun 6pm - Sun 9pm"},{title:"$0",body:"Total Revenue",footer:"Sun 9pm - Mon 12am"},{title:"$0",body:"Total Revenue",footer:"Mon 12am - Mon 3am"},{title:"$0",body:"Total Revenue",footer:"Mon 3am - Mon 6am"},{title:"$0",body:"Total Revenue",footer:"Mon 6am - Mon 9am"},{title:"$41.00",body:"Total Revenue",footer:"Mon 9am - Mon 12pm"},{title:"$0",body:"Total Revenue",footer:"Mon 12pm - Mon 3pm"},{title:"$0",body:"Total Revenue",footer:"Mon 3pm - Mon 6pm"},{title:"$0",body:"Total Revenue",footer:"Mon 6pm - Mon 9pm"},{title:"$0",body:"Total Revenue",footer:"Mon 9pm - Tue 12am"}],trend:7.1,info:"VS previous 7 days",highlight:"$920.00"}]};case"total-donors":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:1},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:1},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:1},{x:"2020-02-27 15:00:00",y:1},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:1},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:1},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:1},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"0 Donors",body:"Total Donors",footer:"Sun 9pm - Mon 12am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12am - Mon 3am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3am - Mon 6am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6am - Mon 9am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9am - Mon 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12pm - Mon 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3pm - Mon 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6pm - Mon 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9pm - Tue 12am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 12am - Tue 3am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 3am - Tue 6am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 6am - Tue 9am"},{title:"1 Donors",body:"Total Donors",footer:"Tue 9am - Tue 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 12pm - Tue 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 3pm - Tue 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 6pm - Tue 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 9pm - Wed 12am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 12am - Wed 3am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 3am - Wed 6am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 6am - Wed 9am"},{title:"1 Donors",body:"Total Donors",footer:"Wed 9am - Wed 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 12pm - Wed 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 3pm - Wed 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 6pm - Wed 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 9pm - Thu 12am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 12am - Thu 3am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 3am - Thu 6am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 6am - Thu 9am"},{title:"1 Donors",body:"Total Donors",footer:"Thu 9am - Thu 12pm"},{title:"1 Donors",body:"Total Donors",footer:"Thu 12pm - Thu 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 3pm - Thu 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 6pm - Thu 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 9pm - Fri 12am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 12am - Fri 3am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 3am - Fri 6am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 6am - Fri 9am"},{title:"1 Donors",body:"Total Donors",footer:"Fri 9am - Fri 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 12pm - Fri 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 3pm - Fri 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 6pm - Fri 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 9pm - Sat 12am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 12am - Sat 3am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 3am - Sat 6am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 6am - Sat 9am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 9am - Sat 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 12pm - Sat 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 3pm - Sat 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 6pm - Sat 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 9pm - Sun 12am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 12am - Sun 3am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 3am - Sun 6am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 6am - Sun 9am"},{title:"1 Donors",body:"Total Donors",footer:"Sun 9am - Sun 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 12pm - Sun 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 3pm - Sun 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 6pm - Sun 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 9pm - Mon 12am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12am - Mon 3am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3am - Mon 6am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6am - Mon 9am"},{title:"1 Donors",body:"Total Donors",footer:"Mon 9am - Mon 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12pm - Mon 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3pm - Mon 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6pm - Mon 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9pm - Tue 12am"}],trend:-12.5,info:"VS previous 7 days",highlight:7}]};case"average-donation":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:223},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:5},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:250},{x:"2020-02-27 15:00:00",y:126},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:25},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:250},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:41},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"$0",body:"Avg Donation",footer:"Feb 23, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$223.00",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$5.00",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$250.00",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$126.00",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$25.00",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$250.00",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$41.00",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 3, 2020"}],trend:22.4,info:"VS previous 7 days",highlight:"$131.43"}]};case"total-refunds":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:0},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:0},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:0},{x:"2020-02-27 15:00:00",y:0},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:0},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:0},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:0},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9pm - Mon 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12am - Mon 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3am - Mon 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6am - Mon 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9am - Mon 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12pm - Mon 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3pm - Mon 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6pm - Mon 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9pm - Tue 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 12am - Tue 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 3am - Tue 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 6am - Tue 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 9am - Tue 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 12pm - Tue 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 3pm - Tue 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 6pm - Tue 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 9pm - Wed 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 12am - Wed 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 3am - Wed 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 6am - Wed 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 9am - Wed 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 12pm - Wed 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 3pm - Wed 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 6pm - Wed 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 9pm - Thu 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 12am - Thu 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 3am - Thu 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 6am - Thu 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 9am - Thu 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 12pm - Thu 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 3pm - Thu 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 6pm - Thu 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 9pm - Fri 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 12am - Fri 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 3am - Fri 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 6am - Fri 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 9am - Fri 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 12pm - Fri 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 3pm - Fri 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 6pm - Fri 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 9pm - Sat 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 12am - Sat 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 3am - Sat 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 6am - Sat 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 9am - Sat 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 12pm - Sat 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 3pm - Sat 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 6pm - Sat 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 9pm - Sun 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 12am - Sun 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 3am - Sun 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 6am - Sun 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9am - Sun 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 12pm - Sun 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 3pm - Sun 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 6pm - Sun 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9pm - Mon 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12am - Mon 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3am - Mon 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6am - Mon 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9am - Mon 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12pm - Mon 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3pm - Mon 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6pm - Mon 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9pm - Tue 12am"}],trend:0,info:"VS previous 7 days",highlight:0}]};case"payment-methods":return{labels:["Stripe - Credit Card","Offline Donation","PayPal Standard","Test Donation","Stripe - Checkout"],datasets:[{data:[417,255,248,0,0],tooltips:[{title:"$417.00",body:"7 Payments",footer:"Stripe - Credit Card"},{title:"$255.00",body:"7 Payments",footer:"Offline Donation"},{title:"$248.00",body:"7 Payments",footer:"PayPal Standard"},{title:"$0",body:"7 Payments",footer:"Test Donation"},{title:"$0",body:"7 Payments",footer:"Stripe - Checkout"}]}]};case"payment-statuses":return{labels:["Completed","Pending","Refunded","Abandoned"],datasets:[{data:[7,0,0,0],tooltips:[{title:"7 Payments",body:"Completed",footer:""},{title:"0 Payments",body:"Pending",footer:""},{title:"0 Payments",body:"Refunded",footer:""},{title:"0 Payments",body:"Abandoned",footer:""}]}]};case"form-performance":return{forms:null,datasets:[{data:[500,379,41],tooltips:[{title:"$500.00",body:"2 Donations",footer:"Save the Rainforest"},{title:"$379.00",body:"4 Donations",footer:"Homeless Outreach Fund"},{title:"$41.00",body:"1 Donations",footer:"Support the Veterans Choir"}],labels:["Save the Rainforest","Homeless Outreach Fund","Support the Veterans Choir"]}]};case"recent-donations":return[{type:"donation",donation:{ID:2189},status:"completed",amount:"$41.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2189",time:"2020-03-02 11:21:00",donor:{name:"Philippine Ferraraccio",id:"2096"},source:"Support the Veterans Choir"},{type:"donation",donation:{ID:2188},status:"completed",amount:"$250.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2188",time:"2020-03-01 11:21:00",donor:{name:"Sheridan Frowd",id:"2095"},source:"Save the Rainforest"},{type:"donation",donation:{ID:2187},status:"completed",amount:"$25.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2187",time:"2020-02-28 11:21:00",donor:{name:"Loraine Swettenham",id:"2094"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2186},status:"completed",amount:"$126.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2186",time:"2020-02-27 12:21:00",donor:{name:"Les Leddie",id:"2082"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2185},status:"completed",amount:"$250.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2185",time:"2020-02-27 11:21:00",donor:{name:"Flint Cruikshanks",id:"2093"},source:"Save the Rainforest"},{type:"donation",donation:{ID:2184},status:"completed",amount:"$5.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2184",time:"2020-02-26 11:21:00",donor:{name:"Dunn Layman",id:"2092"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2183},status:"completed",amount:"$223.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2183",time:"2020-02-25 11:21:00",donor:{name:"Barrie Hartop",id:"2091"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2182},status:"cancelled",amount:"$25.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2182",time:"2020-02-24 11:21:00",donor:{name:"Teressa Corrado",id:"2090"},source:"Help Feed America"}];case"top-donors":return[{type:"donor",earnings:250,total:"$250.00",donations:1,count:"1 Donation",name:"Sheridan Frowd",email:"sfrowd86@usgs.gov",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1795"},{type:"donor",earnings:250,total:"$250.00",donations:1,count:"1 Donation",name:"Flint Cruikshanks",email:"fcruikshanks84@unesco.org",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1793"},{type:"donor",earnings:223,total:"$223.00",donations:1,count:"1 Donation",name:"Barrie Hartop",email:"bhartop82@goo.ne.jp",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1791"},{type:"donor",earnings:126,total:"$126.00",donations:1,count:"1 Donation",name:"Les Leddie",email:"lleddie7t@zdnet.com",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1782"},{type:"donor",earnings:41,total:"$41.00",donations:1,count:"1 Donation",name:"Philippine Ferraraccio",email:"pferraraccio87@dailymail.co.uk",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1796"},{type:"donor",earnings:25,total:"$25.00",donations:1,count:"1 Donation",name:"Loraine Swettenham",email:"lswettenham85@opera.com",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1794"},{type:"donor",earnings:5,total:"$5.00",donations:1,count:"1 Donation",name:"Dunn Layman",email:"dlayman83@phoca.cz",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1792"}];case"income-breakdown":return[{Date:"February 24, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"February 25, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"February 26, 2020",Donors:1,Donations:"$223.00",Refunds:0,Net:"$223.00"},{Date:"February 27, 2020",Donors:1,Donations:"$5.00",Refunds:0,Net:"$5.00"},{Date:"February 28, 2020",Donors:2,Donations:"$376.00",Refunds:0,Net:"$376.00"},{Date:"February 29, 2020",Donors:1,Donations:"$25.00",Refunds:0,Net:"$25.00"},{Date:"March 1, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"March 2, 2020",Donors:1,Donations:"$250.00",Refunds:0,Net:"$250.00"},{Date:"March 3, 2020",Donors:1,Donations:"$41.00",Refunds:0,Net:"$41.00"}];default:return null}})(e);s(t)}else s(t.data);"income"===e&&i({type:"SET_PAGE_LOADED",payload:!0}),u(!1)})).catch((function(t){"AbortError"!==t?.name&&u(!1)})),()=>t.abort()}),[n,o,a,e]),[r,d]};var y=n(62477),x=n.n(y);const _="#9EA3A8",w=1,M=[5,10],k=!0,T={id:"crosshair",afterInit:function(t){if(0===t.config.options.scales.xAxes.length)return;const e=t.config.options.scales.xAxes[0].type;"linear"!==e&&"time"!==e||(t.crosshair={enabled:!1,x:null})},getXScale:function(t){return t.data.datasets.length?t.scales[t.getDatasetMeta(0).xAxisID]:null},getYScale:function(t){return t.scales[t.getDatasetMeta(0).yAxisID]},afterEvent:function(t,e){if(0===t.config.options.scales.xAxes.length)return;const n=t.config.options.scales.xAxes[0].type;if("linear"!==n&&"time"!==n)return;const o=this.getXScale(t);if(o){if(t.crosshair.enabled="mouseout"!==e.type&&e.x>o.getPixelForValue(o.min)&&e.x<o.getPixelForValue(o.max),!t.crosshair.enabled)return e.x>o.getPixelForValue(o.max)&&t.update(),!0;t.crosshair.x=e.x,t.draw()}},afterDraw:function(t){if(t.crosshair.enabled)return this.drawTracePoints(t),this.drawTraceLine(t),!0;{const t=document.getElementById("givewp-chartjs-tooltip");t&&(t.style.opacity=0,t.style.display="none")}},drawTraceLine:function(t){const e=this.getYScale(t),n=this.getXScale(t);let o=t.crosshair.x;const a=!1===t.config.options.hover.intersect;k&&a&&t.active.length&&(o=t.active[0]._view.x);const i=w,r=_,l=M;t.ctx.beginPath(),t.ctx.setLineDash(l),t.ctx.moveTo(o,e.getPixelForValue(e.max)),t.ctx.lineWidth=i,t.ctx.strokeStyle=r,t.ctx.lineTo(o,e.getPixelForValue(e.min)),t.ctx.stroke(),t.ctx.setLineDash([]),t.ctx.beginPath(),t.ctx.fillStyle="rgba(35, 36, 37, 0.05)";const s=n.getPixelForValue(n.min),d=n.getPixelForValue(n.max);let u,c;o-70<s?(u=s,c=o-s+70):o+70>d?(u=o-70,c=d-o+70):(u=o-70,c=140);const h=e.getPixelForValue(e.max),f=e.getPixelForValue(e.min)-e.getPixelForValue(e.max);t.ctx.rect(u,h,c,f),t.ctx.fill()},drawTracePoints:function(t){for(let e=0;e<t.data.datasets.length;e++){const n=t.data.datasets[e],o=t.getDatasetMeta(e),a=t.scales[o.yAxisID];!o.hidden&&n.interpolate&&(t.ctx.beginPath(),t.ctx.arc(t.crosshair.x,a.getPixelForValue(n.interpolatedValue),3,0,2*Math.PI,!1),t.ctx.fillStyle="white",t.ctx.lineWidth=2,t.ctx.strokeStyle=n.borderColor,t.ctx.fill(),t.ctx.stroke())}}},D=T,S=({data:e,chartRef:n})=>{const o=e.datasets[0].data.length>0?e.datasets[0].data.reduce(((t,e)=>parseInt(t)+parseInt(e))):0,[a,i]=(0,t.useState)([]),r=e.datasets[0].data.map(((r,l)=>{const s=a.includes(l)?" inactive":"",d=function(t){return["#69B868","#556E79","#9EA3A8","#4BB5D7","#F49420","#D75A4B","#914BD7"][t]}(l),u=Math.round(r/o*100),c=isNaN(u)?"0%":u+"%",h=e.datasets[0].tooltips[l];return(0,t.createElement)("div",{className:"item"+s,key:l,onClick:()=>((t,e)=>{const o=a.slice(0);if(n.data.datasets[0].data[t]===e)n.data.datasets[0].data[t]=null,o.push(t),i(o);else{n.data.datasets[0].data[t]=e;const a=o.indexOf(t);o.splice(a,1),i(o)}n.update()})(l,r)},(0,t.createElement)("div",{className:"bar",style:{background:d}}),(0,t.createElement)("p",{className:"label"},h.footer),(0,t.createElement)("p",{className:"data"},h.title),(0,t.createElement)("p",{className:"percent"},c))}));return(0,t.createElement)("div",{className:"givewp-legend"},r)};S.propTypes={data:d().object.isRequired,chartRef:d().object.isRequired},S.defaultProps={data:null,chartRef:null};const R=S,F=({type:e,aspectRatio:n,data:o,showLegend:a})=>{const i=(0,t.createRef)(),r=function(t,e){const n=function(t,e){const n=e.labels?e.labels.slice(0):null,o=e.datasets.map(((e,n)=>{const o=function(t,e,n){const o=["#69B868","#556E79","#9EA3A8","#4BB5D7","#F49420","#D75A4B","#914BD7"],a={backgroundColor:o,borderColor:o,borderWidth:0};switch(t){case"line":a.backgroundColor=[o[n]+"44"],a.borderColor=[o[n]],a.borderWidth=3;break;case"pie":case"doughnut":a.borderColor=["rgb(244, 244, 244)"],a.borderWidth=3}return a}(t,e.data,n);return{data:e.data.slice(0),yAxisID:`y-axis-${n}`,backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth}}));return{labels:n,datasets:o}}(t,e),o="line"!==t&&"bar"!==t,a={type:t,data:n,options:{hover:{intersect:o},legend:{display:!1},layout:{padding:16},scales:{xAxes:[],yAxes:[]},elements:{point:{radius:4,hitRadius:2,hoverRadius:6,backgroundColor:"#69B868"}},tooltips:{enabled:!1,mode:"index",intersect:o,custom:function(t){let n=document.getElementById("givewp-chartjs-tooltip");if(n||(n=document.createElement("div"),n.id="givewp-chartjs-tooltip",n.innerHTML='<div class="givewp-tooltip-header"></div><div class="givewp-tooltip-body"><bold></b><br></div><div class="givewp-tooltip-caret"></div>',document.body.appendChild(n)),0===t.opacity)return n.style.opacity=0,void(n.style.display="none");n.classList.remove("above","below","no-transform"),t.yAlign?n.classList.add(t.yAlign):n.classList.add("no-transform");const o=this._chart.canvas.getBoundingClientRect();n.style.opacity=1,n.style.display="block",n.style.position="absolute",n.style.left=o.left+t.caretX+"px",n.style.top=o.top+window.pageYOffset+t.caretY-(n.offsetHeight+6)+"px",n.style.pointerEvents="none";const a=e.datasets[t.dataPoints[0].datasetIndex].tooltips[t.dataPoints[0].index];n.innerHTML=`<div class="givewp-tooltip-header">${a.title}</div><div class="givewp-tooltip-body"><bold>${a.body}</b><br>${a.footer}</div><div class="givewp-tooltip-caret"></div>`}}}};if("line"===t||"bar"===t){const n=e.datasets.map(((e,n)=>{let o;switch(typeof e.data[0]){case"object":{const n=1.1*Math.max(...e.data.map((t=>t.y)),0);switch(t){case"line":o=n>100?n:100;break;case"bar":o=n>10?n:10}break}default:{const n=1.1*Math.max(...e.data.map((t=>t)),0);switch(t){case"line":o=n>100?n:100;break;case"bar":o=n>10?n:10}break}}return{gridLines:{color:"#D8D8D8"},id:`y-axis-${n}`,ticks:{suggestedMax:o,beginAtZero:!0}}}));if(a.options.scales={yAxes:n,xAxes:[]},"line"===t){const t=e.datasets[0].data.length<16?"data":"auto",n=parseInt(e.datasets[0].data[0].x)===(new Date).getFullYear()?"MMM D":"MMM D, YYYY";a.options.scales.xAxes=[{gridLines:{display:!1},type:"time",time:{displayFormats:{hour:"ddd ha",day:n}},ticks:{maxTicksLimit:10,source:t}}],a.plugins=[D]}}return a}(e,o),l=100*n,[s,d]=(0,t.useState)(null);(0,t.useEffect)((()=>{const e=i.current.getContext("2d"),n=new(x())(e,r);return a&&d((0,t.createElement)(R,{data:o,chartRef:n})),function(){n.destroy()}}),[l,o]);let u="#F4F4F4";return!1===a&&(u="#FFF"),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"givewp-chart-canvas",style:{background:u}},(0,t.createElement)("canvas",{width:100,height:l,ref:i})),s)};F.propTypes={type:d().string,aspectRatio:d().number,data:d().object.isRequired,showLegend:d().bool},F.defaultProps={type:"bar",aspectRatio:.6,data:null,showLegend:!1};const A=F,C=()=>(0,t.createElement)("div",{className:"givewp-spinner"}),P=({title:e,type:n,aspectRatio:o,endpoint:a,showLegend:i,headerElements:r})=>{const[l,s]=b(a);return(0,t.createElement)(t.Fragment,null,e&&(0,t.createElement)("div",{className:"givewp-chart-title"},(0,t.createElement)("span",{className:"givewp-chart-title-text"},e),s&&(0,t.createElement)(C,null),r&&r),l?(0,t.createElement)(A,{type:n,aspectRatio:o,data:l,showLegend:i}):(0,t.createElement)("div",{style:{width:"100%",height:"295px"}}))};P.propTypes={type:d().string.isRequired,aspectRatio:d().number,endpoint:d().string.isRequired,showLegend:d().bool},P.defaultProps={type:null,aspectRatio:.6,endpoint:null,showLegend:!1};const I=P;function E(t){return t.datasets[0].trend}const L=({title:e,body:n,position:o})=>{const a=o?{top:o.y,left:o.x}:null;return(0,t.createElement)("div",{className:"givewp-tooltip",style:a},e&&(0,t.createElement)("div",{className:"givewp-tooltip__header"},e),(0,t.createElement)("div",{className:"givewp-tooltip__body"},n),(0,t.createElement)("div",{className:"givewp-tooltip__footer"}),(0,t.createElement)("div",{className:"givewp-tooltip__caret"}))},O=({title:e,data:n})=>{const o=(0,t.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"#69B868",fillOpacity:"0.3"}),(0,t.createElement)("mask",{id:"maskUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"4",width:"8",height:"5"},(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 4.6665L3.5 8.1665L4.3225 8.989L7 6.31734L9.6775 8.989L10.5 8.1665L7 4.6665Z",fill:"white"})),(0,t.createElement)("g",{mask:"url(#maskUp)"},(0,t.createElement)("rect",{x:"-7.5835",y:"-7.5835",width:"29.1667",height:"29.1667",fill:"#69B868"}))),a=(0,t.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"#D75A4B",fillOpacity:"0.3"}),(0,t.createElement)("mask",{id:"maskDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"5",width:"8",height:"5"},(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.6775 5.01074L7 7.68241L4.3225 5.01074L3.5 5.83324L7 9.33324L10.5 5.83324L9.6775 5.01074Z",fill:"white"})),(0,t.createElement)("g",{mask:"url(#maskDown)"},(0,t.createElement)("rect",{x:"-7.5835",y:"-7.5835",width:"29.1667",height:"29.1667",fill:"#D75A4B"}))),[i,r]=(0,t.useState)(null),[l,s]=(0,t.useState)(null),[d,u]=(0,t.useState)(null),[c,h]=(0,t.useState)(!1),[f,g]=(0,t.useState)(null),[p,m]=(0,t.useState)({x:0,y:0}),[v,b]=(0,t.useState)(!1),y=(0,t.createRef)(),_=function(t){const e=function(t){return{labels:t.labels,datasets:t.datasets.map((t=>({data:t.data,backgroundColor:"#FFFFFF",borderColor:"#DDDDDD"})))}}(t),n={type:"line",data:e,options:{hover:{intersect:!1},plugins:{crosshair:!1},layout:{padding:4},legend:{display:!1},scales:{yAxes:[{display:!1}],xAxes:[{display:!1,type:"time"}]},tooltips:{enabled:!1,mode:"index",intersect:!1,custom:function(e){let n=document.getElementById("givewp-mini-chartjs-tooltip");if(n||(n=document.createElement("div"),n.id="givewp-mini-chartjs-tooltip",n.innerHTML='<div class="givewp-tooltip-header"></div><div class="givewp-tooltip-body"><bold></b><br></div><div class="givewp-tooltip-caret"></div>',document.body.appendChild(n)),0===e.opacity)return n.style.opacity=0,void(n.style.display="none");n.classList.remove("above","below","no-transform"),e.yAlign?n.classList.add(e.yAlign):n.classList.add("no-transform");const o=this._chart.canvas.getBoundingClientRect();n.style.opacity=1,n.style.display="block",n.style.position="absolute",n.style.left=o.left+e.caretX+"px",n.style.top=o.top+window.pageYOffset+e.caretY-(n.offsetHeight+6)+"px",n.style.pointerEvents="none";const a=t.datasets[e.dataPoints[0].datasetIndex].tooltips[e.dataPoints[0].index];n.innerHTML=`<div class="givewp-mini-tooltip-header">${a.title}</div><div class="givewp-mini-tooltip-body"><bold>${a.body}</b><br>${a.footer}</div><div class="givewp-mini-tooltip-caret"></div>`}},elements:{point:{radius:0,hitRadius:3,hoverRadius:4,backgroundColor:"#555555"}}}};return n}(n),w=(0,t.createRef)();return(0,t.useEffect)((()=>{const e=function(t){return t.datasets[0].highlight}(n),i=0===E(n)?0:function(t){const e=Math.floor(t).toString().length;return t.toFixed(Math.max(0,Math.min(2,3-e)))}(E(n)),l=function(t){return t.datasets[0].info}(n);let d;switch(!0){case i<0:d=(0,t.createElement)(t.Fragment,null,a,(0,t.createElement)("span",{style:{color:"#D75A4B"}},`${Math.abs(i)}%`));break;case i>0:d=(0,t.createElement)(t.Fragment,null,o,(0,t.createElement)("span",{style:{color:"#69B868"}},`${Math.abs(i)}%`));break;default:d=(0,t.createElement)(t.Fragment,null,(0,t.createElement)("span",{style:{color:"#82878c"}},`${Math.abs(i)}%`))}r(e),g(l),s(i),u(d);const c=y.current.getContext("2d"),h=new(x())(c,_);return function(){h.destroy()}}),[n]),(0,t.useLayoutEffect)((()=>{function t(){const t=w.current,e=t.getBoundingClientRect(),n=t.closest(".givewp-card").getBoundingClientRect(),o=e.width>.5*n.width;b(o)}return window.addEventListener("resize",t),t(),function(){window.removeEventListener("resize",t)}})),(0,t.createElement)("div",{className:"givewp-mini-chart"},(0,t.createElement)("div",{className:"header"},(0,t.createElement)("div",{className:"title"},e),"NaN"!==l&&(0,t.createElement)("div",{className:"indicator",onMouseEnter:t=>{const e=t.target.classList.contains("indicator")?t.target:t.target.closest(".indicator"),n=e.getBoundingClientRect();m({x:e.offsetLeft+n.width/2,y:e.offsetTop}),h(!0)},onMouseLeave:()=>{h(!1)}},c&&(0,t.createElement)(L,{body:f,position:p}),d)),(0,t.createElement)("div",{className:v?"content stacked":"content"},(0,t.createElement)("div",{className:"amount",ref:w},i&&i),(0,t.createElement)("div",{className:"chart"},(0,t.createElement)("canvas",{width:100,height:40,ref:y}))))};O.propTypes={title:d().string.isRequired,data:d().object.isRequired},O.defaultProps={title:null,data:null};const N=O,W=()=>(0,t.createElement)("div",{className:"givewp-loading-overlay"},(0,t.createElement)(C,null)),B=({title:e,endpoint:n})=>{const[o,a]=b(n);return(0,t.createElement)(t.Fragment,null,a&&(0,t.createElement)(W,null),o?(0,t.createElement)(N,{title:e,data:o}):(0,t.createElement)("div",{style:{width:"100%",height:"95px"}}))};B.propTypes={title:d().string.isRequired,endpoint:d().string.isRequired},B.defaultProps={title:null,endpoint:null};const z=B,$=()=>(0,t.createElement)("div",{className:"givewp-loading-notice"},(0,t.createElement)("div",{className:"givewp-loading-notice__card"},(0,t.createElement)(C,null),(0,t.createElement)("h2",null,(0,i.__)("Loading your latest","give"),(0,t.createElement)("br",null),(0,i.__)("donation activity","give")))),V=()=>{const[{period:e},n]=l();return(0,t.createElement)("div",{className:"givewp-mini-period-selector"},(0,t.createElement)("div",{className:"group"},(0,t.createElement)("button",{className:"day"===e.range?"selected":null,onClick:()=>n(m("day"))},(0,i.__)("Day","give")),(0,t.createElement)("button",{className:"week"===e.range?"selected":null,onClick:()=>n(m("week"))},(0,i.__)("Week","give")),(0,t.createElement)("button",{className:"month"===e.range?"selected":null,onClick:()=>n(m("month"))},(0,i.__)("Month","give"))))};function H(){return window.giveReportsWidget}function j({hideWidgetBanner:e}){const n=H().banner;return(0,t.createElement)("div",{id:`givewp-sale-banner-${n.id}`,className:"givewp-reports-widget-banner"},(0,t.createElement)("div",{className:"givewp-reports-widget-banner__header"},(0,t.createElement)("h1",{className:"givewp-reports-widget-banner__header__main"},(0,i.__)("Make it yours.","give")),(0,t.createElement)("h2",{className:"givewp-reports-widget-banner__header__secondary"},(0,i.__)("Save 40% on all GiveWP products","give"))),(0,t.createElement)("a",{className:"givewp-reports-widget-banner__cta",href:n.actionUrl,target:"_blank",rel:"noopener noreferrer"},n.actionText),(0,t.createElement)("button",{onClick:()=>{e(n.id)},type:"button","aria-label":(0,i.__)("Dismiss","give"),"aria-controls":`givewp-sale-banner-${n.id}`,className:"givewp-reports-widget-banner__dismiss"},(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"14px",viewBox:"0 0 20 19",fill:"none"},(0,t.createElement)("line",{x1:"1.35355",y1:"0.646447",x2:"19.3535",y2:"18.6464",stroke:"#F9FAF9"}),(0,t.createElement)("line",{y1:"-0.5",x2:"25.4558",y2:"-0.5",transform:"matrix(0.707107 -0.707106 0.707107 0.707106 1 19)",stroke:"#F9FAF9"}))))}function q(){const[{assetsUrl:e}]=l();return(0,t.createElement)("div",{className:"givewp-reports-widget-overlay"},(0,t.createElement)("div",{className:"givewp-reports-widget-overlay-content"},(0,t.createElement)("h3",{className:"givewp-reports-widget-overlay-content-title"},(0,i.__)("Get a quick view of your donation activity","give")),(0,t.createElement)("p",null,(0,i.__)("You don't have any donations yet","give")),(0,t.createElement)("p",null,(0,i.__)("Boost your fundraising by over 30% with our improved recurring add-on and start collecting donations effortlessly on your website.","give")),(0,t.createElement)("a",{href:" https://docs.givewp.com/recurring-dash",target:"_blank"},(0,t.createElement)("img",{src:`${e}/images/admin/white-external-icon.svg`,alt:"external link"}),(0,i.__)("Get more donations","give"))))}const Y={period:{startDate:a()().subtract(7,"days"),endDate:a()(),range:"week"},pageLoaded:!1,giveStatus:null,currency:v("currency"),testMode:v("testMode"),assetsUrl:v("assetsUrl")},U=document.getElementById("givewp-reports-widget");U&&(0,e.H)(U).render((0,t.createElement)((({reducer:e,initialState:n,children:o})=>(0,t.createElement)(r.Provider,{value:(0,t.useReducer)(e,n)},o)),{initialState:Y,reducer:(t,e)=>{switch(e.type){case"SET_DATES":return{...t,period:{startDate:a()(e.payload.startDate).hour(0),endDate:a()(e.payload.endDate).hour(23),range:"custom"}};case"SET_RANGE":let n,o=t.period.endDate;switch(e.payload.range){case"day":o=a()(t.period.endDate),n=a()(o).subtract(1,"days");break;case"week":n=a()(t.period.endDate).subtract(7,"days");break;case"month":n=a()(t.period.endDate).subtract(1,"months");break;case"year":n=a()(t.period.endDate).subtract(1,"years");break;case"alltime":const e=v("allTimeStart");n=a()(e),o=a()()}return{...t,period:{...t.period,startDate:n,endDate:o,range:e.payload.range}};case"SET_GIVE_STATUS":return{...t,giveStatus:e.payload};case"SET_PAGE_LOADED":return{...t,pageLoaded:e.payload};case"TOGGLE_SETTINGS_PANEL":return{...t,settingsPanelToggled:!t.settingsPanelToggled};case"SET_CURRENCY":return{...t,currency:e.payload};case"TOGGLE_TEST_MODE":return{...t,testMode:!t.testMode};default:return t}}},(0,t.createElement)((()=>{const[{giveStatus:e,pageLoaded:n,widgetBanner:o}]=l(),{hideWidgetBanner:a,isVisible:r}=(()=>{const e=H(),[n,o]=(0,t.useState)(!1);return(0,t.useEffect)((()=>{o(!!e?.banner)}),[e?.banner]),{isVisible:n,hideWidgetBanner:async t=>{const n=new FormData;n.append("id",t);try{await fetch(`${e.apiRoot}/hide`,{method:"POST",headers:{"X-WP-Nonce":e.apiNonce},body:n}),o(!1)}catch(t){console.error("Error hiding banner:",t)}}}})();return(0,t.createElement)("div",{className:"givewp-reports-widget-container"},r&&(0,t.createElement)(j,{hideWidgetBanner:a}),"no_donations_found"===e&&(0,t.createElement)(q,null),!1===n&&(0,t.createElement)($,null),(0,t.createElement)(c,{gap:"12px",visible:n},(0,t.createElement)(f,{width:12},(0,t.createElement)(I,{title:(0,i.__)("Overview","give"),headerElements:(0,t.createElement)(V,null),type:"line",aspectRatio:.8,endpoint:"income",showLegend:!1})),(0,t.createElement)(f,{width:6},(0,t.createElement)(z,{title:(0,i.__)("Total Revenue","give"),endpoint:"total-income"})),(0,t.createElement)(f,{width:6},(0,t.createElement)(z,{title:(0,i.__)("Avg. Donation","give"),endpoint:"average-donation"})),(0,t.createElement)(f,{width:6},(0,t.createElement)(z,{title:(0,i.__)("Total Donors","give"),endpoint:"total-donors"})),(0,t.createElement)(f,{width:6},(0,t.createElement)(z,{title:(0,i.__)("Total Refunds","give"),endpoint:"total-refunds"}))))}),null)))})()})();
Save File
Cancel