1(self.webpackChunkany_repair_angular=self.webpackChunkany_repair_angular||[]).push([[9903],{62652:function(t,e,a){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]},a=function(t,e){return t(e={exports:{}},e.exports),e.exports}(function(t){var a={};for(var n in e)e.hasOwnProperty(n)&&(a[e[n]]=n);var i=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"]}};
vendor: 8,370 bytes, line 1
1for(var r in i)if(i.hasOwnProperty(r)){if(!("channels"in i[r]))throw new Error("missing channels property: "+r);if(!("labels"in i[r]))throw new Error("missing channel labels property: "+r);if(i[r].labels.length!==i[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=i[r].channels,s=i[r].labels;delete i[r].channels,delete i[r].labels,Object.defineProperty(i[r],"channels",{value:o}),Object.defineProperty(i[r],"labels",{value:s})}function l(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}i.rgb.hsl=function(t){var e,a,n=t[0]/255,i=t[1]/255,r=t[2]/255,o=Math.min(n,i,r),s=Math.max(n,i,r),l=s-o;return s===o?e=0:n===s?e=(i-r)/l:i===s?e=2+(r-n)/l:r===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),a=(o+s)/2,[e,100*(s===o?0:a<=.5?l/(s+o):l/(2-s-o)),100*a]},i.rgb.hsv=function(t){var e,a,n,i,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,d=Math.max(o,s,l),h=d-Math.min(o,s,l),c=function(t){return(d-t)/6/h+.5};return 0===h?i=r=0:(r=h/d,e=c(o),a=c(s),n=c(l),o===d?i=n-a:s===d?i=1/3+e-n:l===d&&(i=2/3+a-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*r,100*d]},i.rgb.hwb=function(t){var e=t[0],a=t[1],n=t[2];return[i.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(a,n))*100,100*(n=1-1/255*Math.max(e,Math.max(a,n)))]},i.rgb.cmyk=function(t){var e,a=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*((1-a-(e=Math.min(1-a,1-n,1-i)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*e]},i.rgb.keyword=function(t){var n=a[t];if(n)return n;var i,r=1/0;for(var o in e)if(e.hasOwnProperty(o)){var s=l(t,e[o]);s<r&&(r=s,i=o)}return i},i.keyword.rgb=function(t){return e[t]},i.rgb.xyz=function(t){var e=t[0]/255,a=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*a+.0722*n),100*(.0193*e+.1192*a+.9505*n)]},i.rgb.lab=function(t){var e=i.rgb.xyz(t),a=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,a=(a/=95.047)>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(a-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.hsl.rgb=function(t){var e,a,n,i,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(a=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var d=0;d<3;d++)(n=o+1/3*-(d-1))<0&&n++,n>1&&n--,i[d]=255*(r=6*n<1?e+6*(a-e)*n:2*n<1?a:3*n<2?e+(a-e)*(2/3-n)*6:e);return i},i.hsl.hsv=function(t){var e=t[0],a=t[1]/100,n=t[2]/100,i=a,r=Math.max(n,.01);return a*=(n*=2)<=1?n:2-n,i*=r<=1?r:2-r,[e,100*(0===n?2*i/(r+i):2*a/(n+a)),(n+a)/2*100]},i.hsv.rgb=function(t){var e=t[0]/60,a=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,r=e-Math.floor(e),o=255*n*(1-a),s=255*n*(1-a*r),l=255*n*(1-a*(1-r));switch(n*=255,i){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}},i.hsv.hsl=function(t){var e,a,n,i=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return n=(2-r)*o,a=r*s,[i,100*(a=(a/=(e=(2-r)*s)<=1?e:2-e)||0),100*(n/=2)]},i.hwb.rgb=function(t){var e,a,n,i,r,o,s,l=t[0]/360,d=t[1]/100,h=t[2]/100,c=d+h;switch(c>1&&(d/=c,h/=c),n=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(n=1-n),i=d+n*((a=1-h)-d),e){default:case 6:case 0:r=a,o=i,s=d;break;case 1:r=i,o=a,s=d;break;case 2:r=d,o=a,s=i;break;case 3:r=d,o=i,s=a;break;case 4:r=i,o=d,s=a;break;case 5:r=a,o=d,s=i}return[255*r,255*o,255*s]},i.cmyk.rgb=function(t){var e=t[1]/100,a=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,a*(1-n)+n))]},i.xyz.rgb=function(t){var e,a,n,i=t[0]/100,r=t[1]/100,o=t[2]/100;return a=-.9689*i+1.8758*r+.0415*o,n=.0557*i+-.204*r+1.057*o,e=(e=3.2406*i+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(a=Math.min(Math.max(0,a),1)),255*(n=Math.min(Math.max(0,n),1))]},i.xyz.lab=function(t){var e=t[0],a=t[1],n=t[2];return a/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(e-a),200*(a-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},i.lab.xyz=function(t){var e,a,n;e=t[1]/500+(a=(t[0]+16)/116),n=a-t[2]/200;var i=Math.pow(a,3),r=Math.pow(e,3),o=Math.pow(n,3);return a=i>.008856?i:(a-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,[e*=95.047,a*=100,n*=108.883]},i.lab.lch=function(t){var e,a=t[0],n=t[1],i=t[2];return(e=360*Math.atan2(i,n)/2/Math.PI)<0&&(e+=360),[a,Math.sqrt(n*n+i*i),e]},i.lch.lab=function(t){var e,a=t[1];return e=t[2]/360*2*Math.PI,[t[0],a*Math.cos(e),a*Math.sin(e)]},i.rgb.ansi16=function(t){var e=t[0],a=t[1],n=t[2],r=1 in arguments?arguments[1]:i.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(a/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){var e=t[0],a=t[1],n=t[2];return e===a&&a===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(a/255*5)+Math.round(n/255*5)},i.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 a=.5*(1+~~(t>50));return[(1&e)*a*255,(e>>1&1)*a*255,(e>>2&1)*a*255]},i.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var a;return t-=16,[Math.floor(t/36)/5*255,Math.floor((a=t%36)/6)/5*255,a%6/5*255]},i.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},i.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 a=e[0];3===e[0].length&&(a=a.split("").map(function(t){return t+t}).join(""));var n=parseInt(a,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(t){var e,a=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.max(Math.max(a,n),i),o=Math.min(Math.min(a,n),i),s=r-o;return e=s<=0?0:r===a?(n-i)/s%6:r===n?2+(i-a)/s:4+(a-n)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},i.hsl.hcg=function(t){var e,a=t[1]/100,n=t[2]/100,i=0;return(e=n<.5?2*a*n:2*a*(1-n))<1&&(i=(n-.5*e)/(1-e)),[t[0],100*e,100*i]},i.hsv.hcg=function(t){var e=t[2]/100,a=t[1]/100*e,n=0;return a<1&&(n=(e-a)/(1-a)),[t[0],100*a,100*n]},i.hcg.rgb=function(t){var e=t[1]/100,a=t[2]/100;if(0===e)return[255*a,255*a,255*a];var n,i=[0,0,0],r=t[0]/360%1*6,o=r%1,s=1-o;switch(Math.floor(r)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return[255*(e*i[0]+(n=(1-e)*a)),255*(e*i[1]+n),255*(e*i[2]+n)]},i.hcg.hsv=function(t){var e=t[1]/100,a=e+t[2]/100*(1-e),n=0;return a>0&&(n=e/a),[t[0],100*n,100*a]},i.hcg.hsl=function(t){var e=t[1]/100,a=t[2]/100*(1-e)+.5*e,n=0;return a>0&&a<.5?n=e/(2*a):a>=.5&&a<1&&(n=e/(2*(1-a))),[t[0],100*n,100*a]},i.hcg.hwb=function(t){var e=t[1]/100,a=e+t[2]/100*(1-e);return[t[0],100*(a-e),100*(1-a)]},i.hwb.hcg=function(t){var e=1-t[2]/100,a=e-t[1]/100,n=0;return a<1&&(n=(e-a)/(1-a)),[t[0],100*a,100*n]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=i.gray.hsv=function(t){return[0,0,t[0]]},i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),a=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(a.length)+a},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});function n(t){var e=function(){for(var t={},e=Object.keys(a),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),r=Object.keys(a[i]),o=r.length,s=0;s<o;s++){var l=r[s],d=e[l];-1===d.distance&&(d.distance=e[i].distance+1,d.parent=i,n.unshift(l))}return e}function i(t,e){return function(a){return e(t(a))}}function r(t,e){for(var n=[e[t].parent,t],r=a[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),r=i(a[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}var o={};
1Object.keys(a).forEach(function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:a[t].channels}),Object.defineProperty(o[t],"labels",{value:a[t].labels});var e=function(t){for(var e=n(t),a={},i=Object.keys(e),o=i.length,s=0;s<o;s++){var l=i[s];null!==e[l].parent&&(a[l]=r(l,e))}return a}(t);Object.keys(e).forEach(function(a){var n=e[a];o[t][a]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var a=t(e);if("object"==typeof a)for(var n=a.length,i=0;i<n;i++)a[i]=Math.round(a[i]);return a};return"conversion"in t&&(e.conversion=t.conversion),e}(n),o[t][a].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}(n)})});var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},d={getRgba:h,getHsla:c,getRgb:function(t){var e=h(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:u,getAlpha:function(t){var e=h(t);return e||(e=c(t))||(e=u(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?g(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}
vendor: 13,944 bytes, line 1
1,rgbaString:g,percentString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:f,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 h(t){if(t){var e=[0,0,0],a=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(n){i=(n=n[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(n[r]+n[r],16);i&&(a=Math.round(parseInt(i+i,16)/255*100)/100)}else if(n=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(i=n[2],n=n[1],r=0;r<e.length;r++)e[r]=parseInt(n.slice(2*r,2*r+2),16);i&&(a=Math.round(parseInt(i,16)/255*100)/100)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(n[r+1]);a=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(n[r+1]));a=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=l[n[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return a=a||0==a?m(a,0,1):1,e[3]=a,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 a=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(a)?1:a,0,1)]}}}function u(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var a=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(a)?1:a,0,1)]}}}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(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 f(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,a){return Math.min(Math.max(e,t),a)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var y in l)b[l[y]]=y;var x=function(t){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=[],a=0;a<t.length;a++){var n=t[a]/255;e[a]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),a=t.luminosity();return e>a?(e+.05)/(a+.05):(a+.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,a=(e[0]+t)%360;return e[0]=a<0?360+a:a,this.setValues("hsl",e),this},mix:function(t,e){var a=this,n=t,i=void 0===e?.5:e,r=2*i-1,o=a.alpha()-n.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*a.red()+l*n.red(),s*a.green()+l*n.green(),s*a.blue()+l*n.blue()).alpha(a.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,a=new x,n=this.values,i=a.values;for(var r in n)n.hasOwnProperty(r)&&("[object Array]"===(e={}.toString.call(t=n[r]))?i[r]=t.slice(0):"[object Number]"===e?i[r]=t:console.error("unexpected color value:",t));return a}},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,a={},n=0;n<t.length;n++)a[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(a.a=e.alpha),a},x.prototype.setValues=function(t,e){var a,n,i=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)i[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(a=0;a<t.length;a++)i[t][a]=e[t.charAt(a)];l=e.a}else if(void 0!==e[r[t][0]]){var d=r[t];for(a=0;a<t.length;a++)i[t][a]=e[d[a]];l=e.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===l?i.alpha:l)),"alpha"===t)return!1;for(a=0;a<t.length;a++)n=Math.max(0,Math.min(o[t][a],i[t][a])),i[t][a]=Math.round(n);for(var h in r)h!==t&&(i[h]=s[t][h](i[t]));return!0},x.prototype.setSpace=function(t,e){var a=e[0];return void 0===a?this.getValues(t):("number"==typeof a&&(a=Array.prototype.slice.call(e)),this.setValues(t,a),this)},x.prototype.setChannel=function(t,e,a){var n=this.values[t];return void 0===a?n[e]:(a===n[e]||(n[e]=a,this.setValues(t,n)),this)},"undefined"!=typeof window&&(window.Color=x);var _=x;function C(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var S,w={noop:function(){},uid:(S=0,function(){return S++}),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,a){return w.valueOrDefault(w.isArray(t)?t[e]:t,a)},callback:function(t,e,a){if(t&&"function"==typeof t.call)return t.apply(a,e)},each:function(t,e,a,n){var i,r,o;if(w.isArray(t))if(r=t.length,n)for(i=r-1;i>=0;i--)e.call(a,t[i],i);else for(i=0;i<r;i++)e.call(a,t[i],i);else if(w.isObject(t))for(r=(o=Object.keys(t)).length,i=0;i<r;i++)e.call(a,t[o[i]],o[i])},arrayEquals:function(t,e){var a,n,i,r;if(!t||!e||t.length!==e.length)return!1;for(a=0,n=t.length;a<n;++a)if(r=e[a],(i=t[a])instanceof Array&&r instanceof Array){if(!w.arrayEquals(i,r))return!1}else if(i!==r)return!1;return!0},clone:function(t){if(w.isArray(t))return t.map(w.clone);if(w.isObject(t)){for(var e=Object.create(t),a=Object.keys(t),n=a.length,i=0;i<n;++i)e[a[i]]=w.clone(t[a[i]]);return e}return t},_merger:function(t,e,a,n){if(C(t)){var i=e[t],r=a[t];w.isObject(i)&&w.isObject(r)?w.merge(i,r,n):e[t]=w.clone(r)}},_mergerIf:function(t,e,a){if(C(t)){var n=e[t],i=a[t];w.isObject(n)&&w.isObject(i)?w.mergeIf(n,i):e.hasOwnProperty(t)||(e[t]=w.clone(i))}},merge:function(t,e,a){var n,i,r,o,s,l=w.isArray(e)?e:[e],d=l.length;if(!w.isObject(t))return t;for(n=(a=a||{}).merger||w._merger,i=0;i<d;++i)if(w.isObject(e=l[i]))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)n(r[s],t,e,a);return t},mergeIf:function(t,e){return w.merge(t,e,{merger:w._mergerIf})},extend:Object.assign||function(t){return w.merge(t,[].slice.call(arguments,1),{merger:function(t,e,a){e[t]=a[t]}})},inherits:function(t){var e=this,a=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=a};return n.prototype=e.prototype,a.prototype=new n,a.extend=w.inherits,t&&w.extend(a.prototype,t),a.__super__=e.prototype,a},_deprecated:function(t,e,a,n){void 0!==e&&console.warn(t+': "'+a+'" is deprecated. Please use "'+n+'" instead')}},k=w;w.callCallback=w.callback,w.indexOf=function(t,e,a){return Array.prototype.indexOf.call(t,e,a)},w.getValueOrDefault=w.valueOrDefault,w.getValueAtIndexOrDefault=w.valueAtIndexOrDefault;var A={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,a=0,n=1;return 0===t?0:1===t?1:(a||(a=.3),n<1?(n=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a))},easeOutElastic:function(t){var e=1.70158,a=0,n=1;return 0===t?0:1===t?1:(a||(a=.3),n<1?(n=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},easeInOutElastic:function(t){var e=1.70158,a=0,n=1;return 0===t?0:2==(t/=.5)?1:(a||(a=.45),n<1?(n=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.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-A.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*A.easeInBounce(2*t):.5*A.easeOutBounce(2*t-1)+.5}},M={effects:A};
vendor: 4,715 bytes, line 1
1k.easingEffects=A;var P=Math.PI,D=P/180,I=2*P,O=P/2,F=P/4,T=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,a,n,i,r){if(r){var o=Math.min(r,i/2,n/2),s=e+o,l=a+o,d=e+n-o,h=a+i-o;t.moveTo(e,l),s<d&&l<h?(t.arc(s,l,o,-P,-O),t.arc(d,l,o,-O,0),t.arc(d,h,o,0,O),t.arc(s,h,o,O,P)):s<d?(t.moveTo(s,a),t.arc(d,l,o,-O,O),t.arc(s,l,o,O,P+O)):l<h?(t.arc(s,l,o,-P,0),t.arc(s,h,o,0,P)):t.arc(s,l,o,-P,P),t.closePath(),t.moveTo(e,a)}else t.rect(e,a,n,i)},drawPoint:function(t,e,a,n,i,r){var o,s,l,d,h,c=(r||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(n,i),t.rotate(c),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(a)||a<=0)){switch(t.beginPath(),e){default:t.arc(n,i,a,0,I),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(c)*a,i-Math.cos(c)*a),c+=T,t.lineTo(n+Math.sin(c)*a,i-Math.cos(c)*a),c+=T,t.lineTo(n+Math.sin(c)*a,i-Math.cos(c)*a),t.closePath();break;case"rectRounded":d=a-(h=.516*a),s=Math.cos(c+F)*d,l=Math.sin(c+F)*d,t.arc(n-s,i-l,h,c-P,c-O),t.arc(n+l,i-s,h,c-O,c),t.arc(n+s,i+l,h,c,c+O),t.arc(n-l,i+s,h,c+O,c+P),t.closePath();break;case"rect":if(!r){d=Math.SQRT1_2*a,t.rect(n-d,i-d,2*d,2*d);break}c+=F;case"rectRot":s=Math.cos(c)*a,l=Math.sin(c)*a,t.moveTo(n-s,i-l),t.lineTo(n+l,i-s),t.lineTo(n+s,i+l),t.lineTo(n-l,i+s),t.closePath();break;case"crossRot":c+=F;case"cross":s=Math.cos(c)*a,l=Math.sin(c)*a,t.moveTo(n-s,i-l),t.lineTo(n+s,i+l),t.moveTo(n+l,i-s),t.lineTo(n-l,i+s);break;case"star":s=Math.cos(c)*a,l=Math.sin(c)*a,t.moveTo(n-s,i-l),t.lineTo(n+s,i+l),t.moveTo(n+l,i-s),t.lineTo(n-l,i+s),c+=F,s=Math.cos(c)*a,l=Math.sin(c)*a,t.moveTo(n-s,i-l),t.lineTo(n+s,i+l),t.moveTo(n+l,i-s),t.lineTo(n-l,i+s);break;case"line":s=Math.cos(c)*a,l=Math.sin(c)*a,t.moveTo(n-s,i-l),t.lineTo(n+s,i+l);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(c)*a,i+Math.sin(c)*a)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var a=1e-6;return t.x>e.left-a&&t.x<e.right+a&&t.y>e.top-a&&t.y<e.bottom+a},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,a,n){var i=a.steppedLine;if(i){if("middle"===i){var r=(e.x+a.x)/2;t.lineTo(r,n?a.y:e.y),t.lineTo(r,n?e.y:a.y)}else"after"===i&&!n||"after"!==i&&n?t.lineTo(e.x,a.y):t.lineTo(a.x,e.y);t.lineTo(a.x,a.y)}else a.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?a.controlPointNextX:a.controlPointPreviousX,n?a.controlPointNextY:a.controlPointPreviousY,a.x,a.y):t.lineTo(a.x,a.y)}},B=L;k.clear=L.clear,k.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var N={_set:function(t,e){return k.merge(this[t]||(this[t]={}),e)}};N._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 E=N,R=k.valueOrDefault;var z={toLineHeight:function(t,e){var a=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!a||"normal"===a[1])return 1.2*e;switch(t=+a[2],a[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,a,n,i;return k.isObject(t)?(e=+t.top||0,a=+t.right||0,n=+t.bottom||0,i=+t.left||0):e=a=n=i=+t||0,{top:e,right:a,bottom:n,left:i,height:e+n,width:i+a}},_parseFont:function(t){var e=E.global,a=R(t.fontSize,e.defaultFontSize),n={family:R(t.fontFamily,e.defaultFontFamily),lineHeight:k.options.toLineHeight(R(t.lineHeight,e.defaultLineHeight),a),size:a,style:R(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return n.string=function(t){return!t||k.isNullOrUndef(t.size)||k.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n},resolve:function(t,e,a,n){var i,r,o,s=!0;for(i=0,r=t.length;i<r;++i)if(void 0!==(o=t[i])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==a&&k.isArray(o)&&(o=o[a],s=!1),void 0!==o))return n&&!s&&(n.cacheable=!1),o}},V={_factorize:function(t){var e,a=[],n=Math.sqrt(t);for(e=1;e<n;e++)t%e==0&&(a.push(e),a.push(t/e));return n===(0|n)&&a.push(n),a.sort(function(t,e){return t-e}).pop(),a},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,a=Math.round(e);return t===Math.pow(10,a)?a:e}},W=V;k.log10=V.log10;var j=k,H=B,U=z,q=W,G={getRtlAdapter:function(t,e,a){return t?function(t,e){return{x:function(a){return t+t+e-a},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}}
vendor: 3,164 bytes, line 1
1}(e,a):{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 a,n;("ltr"===e||"rtl"===e)&&(n=[(a=t.canvas.style).getPropertyValue("direction"),a.getPropertyPriority("direction")],a.setProperty("direction",e,"important"),t.prevTextDirection=n)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};j.easing=M,j.canvas=H,j.options=U,j.math=q,j.rtl=G;var Y=function(t){j.extend(this,t),this.initialize.apply(this,arguments)};j.extend(Y.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=j.extend({},t._model)),t._start={},t},transition:function(t){var e=this,a=e._model,n=e._start,i=e._view;return a&&1!==t?(i||(i=e._view={}),n||(n=e._start={}),function(t,e,a,n){var i,r,o,s,l,d,h,c,u,g=Object.keys(a);for(i=0,r=g.length;i<r;++i)if(d=a[o=g[i]],e.hasOwnProperty(o)||(e[o]=d),(s=e[o])!==d&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(h=typeof d)==typeof(l=t[o]))if("string"===h){if((c=_(l)).valid&&(u=_(d)).valid){e[o]=u.mix(c,n).rgbString();continue}}else if(j.isFinite(l)&&j.isFinite(d)){e[o]=l+(d-l)*n;continue}e[o]=d}}(n,i,a,t),e):(e._view=j.extend({},a),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return j.isNumber(this._model.x)&&j.isNumber(this._model.y)}}),Y.extend=j.inherits;var X=Y,$=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),K=$;Object.defineProperty($.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty($.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),E._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:j.noop,onComplete:j.noop}});var Z={animations:[],request:null,addAnimation:function(t,e,a,n){var i,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=a,n||(t.animating=!0),i=0,r=o.length;i<r;++i)if(o[i].chart===t)return void(o[i]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=j.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=j.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,a,n,i=this.animations,r=0;r<i.length;)e=(t=i[r]).chart,a=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*a)+1,t.currentStep=Math.min(n,a),j.callback(t.render,[e,t],e),j.callback(t.onAnimationProgress,[t],e),t.currentStep>=a?(j.callback(t.onAnimationComplete,[t],e),e.animating=!1,i.splice(r,1)):++r}},J=j.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var a=t._chartjs;if(a){var n=a.listeners,i=n.indexOf(e);-1!==i&&n.splice(i,1),!(n.length>
10)&&(Q.forEach(function(e){delete t[e]}),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};j.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var a=this;a.chart=t,a.index=e,a.linkScales(),a.addElements(),a._type=a.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),a=t.chart,n=a.scales,i=t.getDataset(),r=a.options.scales;(null===e.xAxisID||!(e.xAxisID in n)||i.xAxisID)&&(e.xAxisID=i.xAxisID||r.xAxes[0].id),(null===e.yAxisID||!(e.yAxisID in n)||i.yAxisID)&&(e.yAxisID=i.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(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,a=e.dataElementType;return a&&new a({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,a=this,n=a.getMeta(),i=a.getDataset().data||[],r=n.data;for(t=0,e=i.length;t<e;++t)r[t]=r[t]||a.createMetaData(t);n.dataset=n.dataset||a.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,e=t.getDataset(),a=e.data||(e.data=[]);t._data!==a&&(t._data&&tt(t._data,t),a&&Object.isExtensible(a)&&function(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Q.forEach(function(e){var a="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),i=n.apply(this,e);return j.each(t._chartjs.listeners,function(t){"function"==typeof t[a]&&t[a].apply(t,e)}),i}})}))}(a,t),t._data=a),t.resyncElements()},_configure:function(){var t=this;t._config=j.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,a){"_meta"!==t&&"data"!==t&&j._merger(t,e,a)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:j.noop,transition:function(t){for(var e=this.getMeta(),a=e.data||[],n=a.length,i=0;i<n;++i)a[i].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],a=e.length,n=0;for(t.dataset&&t.dataset.draw();n<a;++n)e[n].draw()},getStyle:function(t){var e,a=this,n=a.getMeta(),i=n.dataset;return a._configure(),(!1===(e=i&&void 0===t?a._resolveDatasetElementOptions(i||{}):a._resolveDataElementOptions(n.data[t=t||0]||{},t)).fill||null===e.fill)&&(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var a,n,i,r,o=this,s=o.chart,l=o._config,d=t.custom||{},h=s.options.elements[o.datasetElementType.prototype._type]||{},c=o._datasetElementOptions,u={},g={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(a=0,n=c.length;a<n;++a)i=c[a],r=e?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,u[i]=J([d[r],l[r],h[r]],g);return u},_resolveDataElementOptions:function(t,e){var a=this,n=t&&t.custom,i=a._cachedDataOpts;if(i&&!n)return i;var r,o,s,l,d=a.chart,h=a._config,c=d.options.elements[a.dataElementType.prototype._type]||{},u=a._dataElementOptions,g={},p={chart:d,dataIndex:e,dataset:a.getDataset(),datasetIndex:a.index},f={cacheable:!n};if(n=n||{},j.isArray(u))for(o=0,s=u.length;o<s;++o)g[l=u[o]]=J([n[l],h[l],c[l]],p,e,f);else for(o=0,s=(r=Object.keys(u)).length;o<s;++o)g[l=r[o]]=J([n[l],h[u[l]],h[l],c[l]],p,e,f);return f.cacheable&&(a._cachedDataOpts=Object.freeze(g)),g},removeHoverStyle:function(t){j.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index,n=t.custom||{},i=t._model,r=j.getHoverColor;t.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth}
vendor: 7,849 bytes, line 1
1,i.backgroundColor=J([n.hoverBackgroundColor,e.hoverBackgroundColor,r(i.backgroundColor)],void 0,a),i.borderColor=J([n.hoverBorderColor,e.hoverBorderColor,r(i.borderColor)],void 0,a),i.borderWidth=J([n.hoverBorderWidth,e.hoverBorderWidth,i.borderWidth],void 0,a)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,a,n,i,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,i=this._resolveDatasetElementOptions(o,!0),t=0,e=(n=Object.keys(i)).length;t<e;++t)s[a=n[t]]=r[a],r[a]=i[a];o.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),a=t.getDataset().data,n=e.data.length,i=a.length;i<n?e.data.splice(i,n-i):i>n&&t.insertElements(n,i-n)},insertElements:function(t,e){for(var a=0;a<e;++a)this.addElementAndReset(t+a)},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)}}),et.extend=j.inherits;var at=et,nt=2*Math.PI;function it(t,e){var a=e.startAngle,n=e.endAngle,i=e.pixelMargin,r=i/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,a-r,n+r),e.innerRadius>i?t.arc(o,s,e.innerRadius-i,n+(r=i/e.innerRadius),a-r,!0):t.arc(o,s,i,n+Math.PI/2,a-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,a){var n="inner"===e.borderAlign;n?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),a.fullCircles&&function(t,e,a,n){var i,r=a.endAngle;for(n&&(a.endAngle=a.startAngle+nt,it(t,a),a.endAngle=r,a.endAngle===a.startAngle&&a.fullCircles&&(a.endAngle+=nt,a.fullCircles--)),t.beginPath(),t.arc(a.x,a.y,a.innerRadius,a.startAngle+nt,a.startAngle,!0),i=0;i<a.fullCircles;++i)t.stroke();for(t.beginPath(),t.arc(a.x,a.y,e.outerRadius,a.startAngle,a.startAngle+nt),i=0;i<a.fullCircles;++i)t.stroke()}(t,e,a,n),n&&it(t,a),t.beginPath(),t.arc(a.x,a.y,e.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),t.stroke()}E._set("global",{elements:{arc:{backgroundColor:E.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ot=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 a=this._view;if(a){for(var n=j.getAngleFromPoint(a,{x:t,y:e}),i=n.angle,r=n.distance,o=a.startAngle,s=a.endAngle;s<o;)s+=nt;for(;i>s;)i-=nt;for(;i<o;)i+=nt;return i>=o&&i<=s&&r>=a.innerRadius&&r<=a.outerRadius}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,a=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},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,a=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},draw:function(){var t,e=this._chart.ctx,a=this._view,n="inner"===a.borderAlign?.33:0,i={x:a.x,y:a.y,innerRadius:a.innerRadius,outerRadius:Math.max(a.outerRadius-n,0),pixelMargin:n,startAngle:a.startAngle,endAngle:a.endAngle,fullCircles:Math.floor(a.circumference/nt)};if(e.save(),e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+nt,e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),t=0;t<i.fullCircles;++t)e.fill();i.endAngle=i.startAngle+a.circumference%nt}e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),e.fill(),a.borderWidth&&rt(e,a,i),e.restore()}}),st=j.valueOrDefault,lt=E.global.defaultColor;E._set("global",{elements:{line:{tension:.4,backgroundColor:lt,borderWidth:3,borderColor:lt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var dt=X.extend({_type:"line",draw:function(){var t,e,a,n=this,i=n._view,r=n._chart.ctx,o=i.spanGaps,s=n._children.slice(),l=E.global,d=l.elements.line,h=-1,c=n._loop;if(s.length){if(n._loop){for(t=0;t<s.length;++t)if(e=j.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),c=o;break}c&&s.push(s[0])}for(r.save(),r.lineCap=i.borderCapStyle||d.borderCapStyle,r.setLineDash&&r.setLineDash(i.borderDash||d.borderDash),r.lineDashOffset=st(i.borderDashOffset,d.borderDashOffset),r.lineJoin=i.borderJoinStyle||d.borderJoinStyle,r.lineWidth=st(i.borderWidth,d.borderWidth),r.strokeStyle=i.borderColor||l.defaultColor,r.beginPath(),(a=s[0]._view).skip||(r.moveTo(a.x,a.y),h=0),t=1;t<s.length;++t)a=s[t]._view,e=-1===h?j.previousItem(s,t):s[h],a.skip||(h!==t-1&&!o||-1===h?r.moveTo(a.x,a.y):j.canvas.lineTo(r,e._view,a),h=t);c&&r.closePath(),r.stroke(),r.restore()}}}),ht=j.valueOrDefault,ct=E.global.defaultColor;function ut(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}E._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=X.extend({_type:"point",inRange:function(t,e){var a=this._view;return!!a&&Math.pow(t-a.x,2)+Math.pow(e-a.y,2)<Math.pow(a.hitRadius+a.radius,2)},inLabelRange:ut,inXRange:ut,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,a=this._chart.ctx,n=e.pointStyle,i=e.rotation,r=e.radius,o=e.x,s=e.y,l=E.global,d=l.defaultColor;e.skip||(void 0===t||j.canvas._isPointInArea(e,t))&&(a.strokeStyle=e.borderColor||d,a.lineWidth=ht(e.borderWidth,l.elements.point.borderWidth),a.fillStyle=e.backgroundColor||d,j.canvas.drawPoint(a,n,r,o,s,i))}}),pt=E.global.defaultColor;function ft(t){return t&&void 0!==t.width}function mt(t){var e,a,n,i,r;return ft(t)?(e=t.x-(r=t.width/2),a=t.x+r,n=Math.min(t.y,t.base),i=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),a=Math.max(t.x,t.base),n=t.y-r,i=t.y+r),{left:e,top:n,right:a,bottom:i}}function vt(t,e,a){return t===e?a:t===a?e:t}function bt(t,e,a){var n,i,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,a={};return e&&(t.horizontal?t.base>t.x&&(e=vt(e,"left","right")):t.base<t.y&&(e=vt(e,"bottom","top")),a[e]=!0),a}(t);return j.isObject(s)?(n=+s.top||0,i=+s.right||0,r=+s.bottom||0,o=+s.left||0):n=i=r=o=+s||0,{t:l.top||n<0?0:n>a?a:n,r:l.right||i<0?0:i>e?e:i,b:l.bottom||r<0?0:r>a?a:r,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,a){var n=null===e,i=null===a,r=!(!t||n&&i)&&mt(t);return r&&(n||e>=r.left&&e<=r.right)&&(i||a>=r.top&&a<=r.bottom)}E._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var xt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,a=function(t){var e=mt(t),a=e.right-e.left,n=e.bottom-e.top,i=bt(t,a/2,n/2);return{outer:{x:e.left,y:e.top,w:a,h:n},inner:{x:e.left+i.l,y:e.top+i.t,w:a-i.l-i.r,h:n-i.t-i.b}}}(e),n=a.outer,i=a.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),(n.w!==i.w||n.h!==i.h)&&(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(i.x,i.y,i.w,i.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)}
vendor: 9,189 bytes, line 1
1,inLabelRange:function(t,e){var a=this._view;return ft(a)?yt(a,t,null):yt(a,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,a=this._view;return ft(a)?(t=a.x,e=(a.y+a.base)/2):(t=(a.x+a.base)/2,e=a.y),{x:t,y:e}},getArea:function(){var t=this._view;return ft(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},Ct=dt,St=gt,wt=xt;_t.Arc=ot,_t.Line=Ct,_t.Point=St,_t.Rectangle=wt;var kt=j._deprecated,At=j.valueOrDefault;function Mt(t,e,a){var n,i,r=a.barThickness,o=e.stackCount,s=e.pixels[t],l=j.isNullOrUndef(r)?function(t,e){var a,n,i,r,o=t._length;for(i=1,r=e.length;i<r;++i)o=Math.min(o,Math.abs(e[i]-e[i-1]));for(i=0,r=t.getTicks().length;i<r;++i)n=t.getPixelForTick(i),o=i>0?Math.min(o,Math.abs(n-a)):o,a=n;return o}(e.scale,e.pixels):-1;return j.isNullOrUndef(r)?(n=l*a.categoryPercentage,i=a.barPercentage):(n=r*o,i=1),{chunk:n/o,ratio:i,start:s-n/2}}E._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),E._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Pt=at.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,a=this;at.prototype.initialize.apply(a,arguments),(t=a.getMeta()).stack=a.getDataset().stack,t.bar=!0,e=a._getIndexScale().options,kt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),kt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),kt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),kt("bar chart",a._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),kt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,a,n=this,i=n.getMeta().data;for(n._ruler=n.getRuler(),e=0,a=i.length;e<a;++e)n.updateElement(i[e],e,t)},updateElement:function(t,e,a){var n=this,i=n.getMeta(),r=n.getDataset(),o=n._resolveDataElementOptions(t,e);t._xScale=n.getScaleForId(i.xAxisID),t._yScale=n.getScaleForId(i.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:n.chart.data.labels[e]},j.isArray(r.data[e])&&(t._model.borderSkipped=null),n._updateElementGeometry(t,e,a,o),t.pivot()},_updateElementGeometry:function(t,e,a,n){var i=this,r=t._model,o=i._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),d=i._ruler||i.getRuler(),h=i.calculateBarValuePixels(i.index,e,n),c=i.calculateBarIndexPixels(i.index,e,d,n);r.horizontal=l,r.base=a?s:h.base,r.x=l?a?s:h.head:c.center,r.y=l?c.center:a?s:h.head,r.height=l?c.size:void 0,r.width=l?void 0:c.size},_getStacks:function(t){var e,a,n=this._getIndexScale(),i=n._getMatchingVisibleMetas(this._type),r=n.options.stacked,o=i.length,s=[];for(e=0;e<o&&(a=i[e],(!1===r||-1===s.indexOf(a.stack)||void 0===r&&void 0===a.stack)&&s.push(a.stack),a.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var a=this._getStacks(t),n=void 0!==e?a.indexOf(e):-1;return-1===n?a.length-1:n},getRuler:function(){var t,e,a=this,n=a._getIndexScale(),i=[];for(t=0,e=a.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,a.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:a.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,a){var n,i,r,o,s,l,d,h=this,c=h.chart,u=h._getValueScale(),g=u.isHorizontal(),p=c.data.datasets,f=u._getMatchingVisibleMetas(h._type),m=u._parseValue(p[t].data[e]),v=a.minBarLength,b=u.options.stacked,y=h.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,C=f.length;if(b||void 0===b&&void 0!==y)for(n=0;n<C&&(i=f[n]).index!==t;++n)i.stack===y&&(r=void 0===(d=u._parseValue(p[i.index].data[e])).start?d.end:d.min>=0&&d.max>=0?d.max:d.min,(m.min<0&&r<0||m.max>=0&&r>0)&&(x+=r));return o=u.getPixelForValue(x),l=(s=u.getPixelForValue(x+_))-o,void 0!==v&&Math.abs(l)<v&&(l=v,s=_>=0&&!g||_<0&&g?o-v:o+v),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,a,n){var i="flex"===n.barThickness?function(t,e,a){var n,i=e.pixels,r=i[t],o=t>0?i[t-1]:null,s=t<i.length-1?i[t+1]:null,l=a.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),n=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:a.barPercentage,start:n}}(e,a,n):Mt(e,a,n),r=this.getStackIndex(t,this.getMeta().stack),o=i.start+i.chunk*r+i.chunk/2,s=Math.min(At(n.maxBarThickness,1/0),i.chunk*i.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this,e=t.chart,a=t._getValueScale(),n=t.getMeta().data,i=t.getDataset(),r=n.length,o=0;for(j.canvas.clipArea(e.ctx,e.chartArea);o<r;++o){var s=a._parseValue(i.data[o]);!isNaN(s.min)&&!isNaN(s.max)&&n[o].draw()}j.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=j.extend({},at.prototype._resolveDataElementOptions.apply(t,arguments)),a=t._getIndexScale().options,n=t._getValueScale().options;return e.barPercentage=At(a.barPercentage,e.barPercentage),e.barThickness=At(a.barThickness,e.barThickness),e.categoryPercentage=At(a.categoryPercentage,e.categoryPercentage),e.maxBarThickness=At(a.maxBarThickness,e.maxBarThickness),e.minBarLength=At(n.minBarLength,e.minBarLength),e}}),Dt=j.valueOrDefault,It=j.options.resolve;E._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var Ot=at.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,a=e.getMeta();j.each(a.data,function(a,n){e.updateElement(a,n,t)})},updateElement:function(t,e,a){var n=this,i=n.getMeta(),r=t.custom||{},o=n.getScaleForId(i.xAxisID),s=n.getScaleForId(i.yAxisID),l=n._resolveDataElementOptions(t,e),d=n.getDataset().data[e],h=n.index,c=a?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof d?d:NaN,e,h),u=a?s.getBasePixel():s.getPixelForValue(d,e,h);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=h,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:a?0:l.radius,skip:r.skip||isNaN(c)||isNaN(u),x:c,y:u},t.pivot()},setHoverStyle:function(t){var e=t._model,a=t._options,n=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Dt(a.hoverBackgroundColor,n(a.backgroundColor)),e.borderColor=Dt(a.hoverBorderColor,n(a.borderColor)),e.borderWidth=Dt(a.hoverBorderWidth,a.borderWidth),e.radius=a.radius+a.hoverRadius},_resolveDataElementOptions:function(t,e){var a=this,n=a.chart,i=a.getDataset(),r=t.custom||{},o=i.data[e]||{},s=at.prototype._resolveDataElementOptions.apply(a,arguments),l={chart:n,dataIndex:e,dataset:i,datasetIndex:a.index};return a._cachedDataOpts===s&&(s=j.extend({},s)),s.radius=It([r.radius,o.r,a._config.radius,n.options.elements.point.radius],l,e),s}}),Ft=j.valueOrDefault,Tt=Math.PI,Lt=2*Tt,Bt=Tt/2;E._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,a,n,i=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(i.setAttribute("class",t.id+"-legend"),o.length)for(e=0,a=o[0].data.length;e<a;++e)(n=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&n.appendChild(document.createTextNode(s[e]));return i.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(a,n){var i=t.getDatasetMeta(0),r=i.controller.getStyle(n);return{text:a,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[n])||i.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var a,n,i,r=e.index,o=this.chart;for(a=0,n=(o.data.datasets||[]).length;a<n;++a)(i=o.getDatasetMeta(a)).data[r]&&(i.data[r].hidden=!i.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Bt,circumference:Lt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var a=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return j.isArray(a)?(a=a.slice())[0]+=n:a+=n,a}}}});
1var Nt=at.extend({dataElementType:_t.Arc,linkScales:j.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,a=0;a<t;++a)this.chart.isDatasetVisible(a)&&++e;return e},update:function(t){var e,a,n=this,i=n.chart,r=i.chartArea,o=i.options,s=1,l=1,d=0,h=0,c=n.getMeta(),u=c.data,g=o.cutoutPercentage/100||0,p=o.circumference,f=n._getRingWeight(n.index);if(p<Lt){var m=o.rotation%Lt,v=(m+=m>=Tt?-Lt:m<-Tt?Lt:0)+p,b=Math.cos(m),y=Math.sin(m),x=Math.cos(v),_=Math.sin(v),C=m<=0&&v>=0||v>=Lt,S=m<=Bt&&v>=Bt||v>=Lt+Bt,w=m<=-Bt&&v>=-Bt||v>=Tt+Bt,k=m===-Tt||v>=Tt?-1:Math.min(b,b*g,x,x*g),A=w?-1:Math.min(y,y*g,_,_*g),M=C?1:Math.max(b,b*g,x,x*g),P=S?1:Math.max(y,y*g,_,_*g);s=(M-k)/2,l=(P-A)/2,d=-(M+k)/2,h=-(P+A)/2}for(e=0,a=u.length;e<a;++e)u[e]._options=n._resolveDataElementOptions(u[e],e);for(i.borderWidth=n.getMaxBorderWidth(),i.outerRadius=Math.max(Math.min((r.right-r.left-i.borderWidth)/s,(r.bottom-r.top-i.borderWidth)/l)/2,0),i.innerRadius=Math.max(i.outerRadius*g,0),i.radiusLength=(i.outerRadius-i.innerRadius)/(n._getVisibleDatasetWeightTotal()||1),i.offsetX=d*i.outerRadius,i.offsetY=h*i.outerRadius,c.total=n.calculateTotal(),n.outerRadius=i.outerRadius-i.radiusLength*n._getRingWeightOffset(n.index),n.innerRadius=Math.max(n.outerRadius-i.radiusLength*f,0),e=0,a=u.length;e<a;++e)n.updateElement(u[e],e,t)},updateElement:function(t,e,a){var n=this,i=n.chart,r=i.chartArea,o=i.options,s=o.animation,l=(r.left+r.right)/2,d=(r.top+r.bottom)/2,h=o.rotation,c=o.rotation,u=n.getDataset(),g=a&&s.animateRotate||t.hidden?0:n.calculateCircumference(u.data[e])*(o.circumference/Lt),p=t._options||{};j.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,borderAlign:p.borderAlign,x:l+i.offsetX,y:d+i.offsetY,startAngle:h,endAngle:c,circumference:g,outerRadius:a&&s.animateScale?0:n.outerRadius,innerRadius:a&&s.animateScale?0:n.innerRadius,label:j.valueAtIndexOrDefault(u.label,e,i.data.labels[e])}});var f=t._model;(!a||!s.animateRotate)&&(f.startAngle=0===e?o.rotation:n.getMeta().data[e-1]._model.endAngle,f.endAngle=f.startAngle+f.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),a=this.getMeta(),n=0;return j.each(a.data,function(a,i){t=e.data[i],!isNaN(t)&&!a.hidden&&(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Lt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,a,n,i,r,o,s,l,d=0,h=this.chart;if(!t)for(e=0,a=h.data.datasets.length;e<a;++e)if(h.isDatasetVisible(e)){t=(n=h.getDatasetMeta(e)).data,e!==this.index&&(r=n.controller);break}if(!t)return 0;for(e=0,a=t.length;e<a;++e)i=t[e],r?(r._configure(),o=r._resolveDataElementOptions(i,e)):o=i._options,"inner"!==o.borderAlign&&(d=(l=o.hoverBorderWidth)>(d=(s=o.borderWidth)>d?s:d)?l:d);return d},setHoverStyle:function(t){var e=t._model,a=t._options,n=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Ft(a.hoverBackgroundColor,n(a.backgroundColor)),e.borderColor=Ft(a.hoverBorderColor,n(a.borderColor)),e.borderWidth=Ft(a.hoverBorderWidth,a.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,a=0;a<t;++a)this.chart.isDatasetVisible(a)&&(e+=this._getRingWeight(a));return e},_getRingWeight:function(t){return Math.max(Ft(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});E._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"}}),E._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Et=Pt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Rt=j.valueOrDefault,zt=j.options.resolve,Vt=j.canvas._isPointInArea;function Wt(t,e){var a=t&&t.options.ticks||{},n=a.reverse,i=void 0===a.min?e:0,r=void 0===a.max?e:0;return{start:n?r:i,end:n?i:r}}function jt(t,e,a){var n=a/2,i=Wt(t,n),r=Wt(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Ht(t){var e,a,n,i;return j.isObject(t)?(e=t.top,a=t.right,n=t.bottom,i=t.left):e=a=n=i=t,{top:e,right:a,bottom:n,left:i}}E._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 Ut=at.extend({datasetElementType:_t.Line,dataElementType:_t.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,a,n=this,i=n.getMeta(),r=i.dataset,o=i.data||[],s=n._config,l=n._showLine=Rt(s.showLine,n.chart.options.showLines);for(n._xScale=n.getScaleForId(i.xAxisID),n._yScale=n.getScaleForId(i.yAxisID),l&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),r._scale=n._yScale,r._datasetIndex=n.index,r._children=o,r._model=n._resolveDatasetElementOptions(r),r.pivot()),e=0,a=o.length;e<a;++e)n.updateElement(o[e],e,t);for(l&&0!==r._model.tension&&n.updateBezierControlPoints(),e=0,a=o.length;e<a;++e)o[e].pivot()},updateElement:function(t,e,a){var n,i,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),d=r.index,h=l.data[e],c=r._xScale,u=r._yScale,g=o.dataset._model,p=r._resolveDataElementOptions(t,e);n=c.getPixelForValue("object"==typeof h?h:NaN,e,d),i=a?u.getBasePixel():r.calculatePointY(h,e,d),t._xScale=c,t._yScale=u,t._options=p,t._datasetIndex=d,t._index=e,t._model={x:n,y:i,skip:s.skip||isNaN(n)||isNaN(i),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Rt(s.tension,g?g.tension:0),steppedLine:!!g&&g.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,a=e._config,n=t.custom||{},i=e.chart.options,r=i.elements.line,o=at.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Rt(a.spanGaps,i.spanGaps),o.tension=Rt(a.lineTension,r.tension),o.steppedLine=zt([n.steppedLine,a.steppedLine,r.stepped]),o.clip=Ht(Rt(a.clip,jt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,a){var n,i,r,o,s,l,d=this.chart,h=this._yScale,c=0,u=0;if(h.options.stacked){for(o=+h.getRightValue(t),l=(s=d._getSortedVisibleDatasetMetas()).length,n=0;n<l&&(i=s[n]).index!==a;++n)"line"===i.type&&i.yAxisID===h.id&&((r=+h.getRightValue(d.data.datasets[i.index].data[e]))<0?u+=r||0:c+=r||0);return h.getPixelForValue(o<0?u+o:c+o)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,a,n,i=this.chart,r=this.getMeta(),o=r.dataset._model,s=i.chartArea,l=r.data||[];function d(t,e,a){return Math.max(Math.min(t,a),e)}if(o.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===o.cubicInterpolationMode)j.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)a=l[t]._model,n=j.splineCurve(j.previousItem(l,t)._model,a,j.nextItem(l,t)._model,o.tension),a.controlPointPreviousX=n.previous.x,a.controlPointPreviousY=n.previous.y,a.controlPointNextX=n.next.x,a.controlPointNextY=n.next.y;if(i.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Vt(a=l[t]._model,s)&&(t>0&&Vt(l[t-1]._model,s)&&(a.controlPointPreviousX=d(a.controlPointPreviousX,s.left,s.right),a.controlPointPreviousY=d(a.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Vt(l[t+1]._model,s)&&(a.controlPointNextX=d(a.controlPointNextX,s.left,s.right),a.controlPointNextY=d(a.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,a=e.chart,n=e.getMeta(),i=n.data||[],r=a.chartArea,o=a.canvas,s=0,l=i.length;for(e._showLine&&(j.canvas.clipArea(a.ctx,{left:!1===(t=n.dataset._model.clip).left?0:r.left-t.left,right:!1===t.right?o.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?o.height:r.bottom+t.bottom}),n.dataset.draw(),j.canvas.unclipArea(a.ctx));s<l;++s)i[s].draw(r)},setHoverStyle:function(t){var e=t._model,a=t._options,n=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Rt(a.hoverBackgroundColor,n(a.backgroundColor)),e.borderColor=Rt(a.hoverBorderColor,n(a.borderColor)),e.borderWidth=Rt(a.hoverBorderWidth,a.borderWidth),e.radius=Rt(a.hoverRadius,a.radius)}}),qt=j.options.resolve;E._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,a,n,i=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(i.setAttribute("class",t.id+"-legend"),o.length)for(e=0,a=o[0].data.length;e<a;++e)(n=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&n.appendChild(document.createTextNode(s[e]));return i.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(a,n){var i=t.getDatasetMeta(0),r=i.controller.getStyle(n);return{text:a,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[n])||i.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var a,n,i,r=e.index,o=this.chart;for(a=0,n=(o.data.datasets||[]).length;a<n;++a)(i=o.getDatasetMeta(a)).data[r].hidden=!i.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});
1var Gt=at.extend({dataElementType:_t.Arc,linkScales:j.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,a,n,i=this,r=i.getDataset(),o=i.getMeta(),s=i.chart.options.startAngle||0,l=i._starts=[],d=i._angles=[],h=o.data;for(i._updateRadius(),o.count=i.countVisibleElements(),e=0,a=r.data.length;e<a;e++)l[e]=s,n=i._computeAngle(e),d[e]=n,s+=n;for(e=0,a=h.length;e<a;++e)h[e]._options=i._resolveDataElementOptions(h[e],e),i.updateElement(h[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,a=e.chartArea,n=e.options,i=Math.min(a.right-a.left,a.bottom-a.top);e.outerRadius=Math.max(i/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.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,a){var n=this,i=n.chart,r=n.getDataset(),o=i.options,s=o.animation,l=i.scale,d=i.data.labels,h=l.xCenter,c=l.yCenter,u=o.startAngle,g=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),p=n._starts[e],f=p+(t.hidden?0:n._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};j.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:h,y:c,innerRadius:0,outerRadius:a?m:g,startAngle:a&&s.animateRotate?u:p,endAngle:a&&s.animateRotate?u:f,label:j.valueAtIndexOrDefault(d,e,d[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),a=0;return j.each(e.data,function(e,n){!isNaN(t.data[n])&&!e.hidden&&a++}),a},setHoverStyle:function(t){var e=t._model,a=t._options,n=j.getHoverColor,i=j.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=i(a.hoverBackgroundColor,n(a.backgroundColor)),e.borderColor=i(a.hoverBorderColor,n(a.borderColor)),e.borderWidth=i(a.hoverBorderWidth,a.borderWidth)},_computeAngle:function(t){var e=this,a=this.getMeta().count,n=e.getDataset(),i=e.getMeta();return isNaN(n.data[t])||i.data[t].hidden?0:qt([e.chart.options.elements.arc.angle,2*Math.PI/a],{chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index},t)}});E._set("pie",j.clone(E.doughnut)),E._set("pie",{cutoutPercentage:0});var Yt=Nt,Xt=j.valueOrDefault;E._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var $t=at.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:j.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,a,n=this,i=n.getMeta(),r=i.dataset,o=i.data||[],s=n.chart.scale,l=n._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=n.index,r._children=o,r._loop=!0,r._model=n._resolveDatasetElementOptions(r),r.pivot(),e=0,a=o.length;e<a;++e)n.updateElement(o[e],e,t);for(n.updateBezierControlPoints(),e=0,a=o.length;e<a;++e)o[e].pivot()},updateElement:function(t,e,a){var n=this,i=t.custom||{},r=n.getDataset(),o=n.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=n._resolveDataElementOptions(t,e),d=n.getMeta().dataset._model,h=a?o.xCenter:s.x,c=a?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=n.index,t._index=e,t._model={x:h,y:c,skip:i.skip||isNaN(h)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Xt(i.tension,d?d.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,a=t.chart.options,n=at.prototype._resolveDatasetElementOptions.apply(t,arguments);return n.spanGaps=Xt(e.spanGaps,a.spanGaps),n.tension=Xt(e.lineTension,a.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,a,n,i=this.getMeta(),r=this.chart.chartArea,o=i.data||[];function s(t,e,a){return Math.max(Math.min(t,a),e)}for(i.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;++t)a=o[t]._model,n=j.splineCurve(j.previousItem(o,t,!0)._model,a,j.nextItem(o,t,!0)._model,a.tension),a.controlPointPreviousX=s(n.previous.x,r.left,r.right),a.controlPointPreviousY=s(n.previous.y,r.top,r.bottom),a.controlPointNextX=s(n.next.x,r.left,r.right),a.controlPointNextY=s(n.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,a=t._options,n=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Xt(a.hoverBackgroundColor,n(a.backgroundColor)),e.borderColor=Xt(a.hoverBorderColor,n(a.borderColor)),e.borderWidth=Xt(a.hoverBorderWidth,a.borderWidth),e.radius=Xt(a.hoverRadius,a.radius)}});E._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+")"}}}}),E._set("global",{datasets:{scatter:{showLine:!1}}});var Kt={bar:Pt,bubble:Ot,doughnut:Nt,horizontalBar:Et,line:Ut,polarArea:Gt,pie:Yt,radar:$t,scatter:Ut};function Zt(t,e){return t.native?{x:t.x,y:t.y}:j.getRelativePosition(t,e)}function Jt(t,e){var a,n,i,r,o,s,l=t._getSortedVisibleDatasetMetas();for(n=0,r=l.length;n<r;++n)for(i=0,o=(a=l[n].data).length;i<o;++i)(s=a[i])._view.skip||e(s)}function Qt(t,e){var a=[];return Jt(t,function(t){t.inRange(e.x,e.y)&&a.push(t)}),a}function te(t,e,a,n){var i=Number.POSITIVE_INFINITY,r=[];return Jt(t,function(t){if(!a||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=n(e,o);s<i?(r=[t],i=s):s===i&&r.push(t)}}),r}function ee(t){var e=-1!==t.indexOf("x"),a=-1!==t.indexOf("y");return function(t,n){var i=e?Math.abs(t.x-n.x):0,r=a?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(r,2))}}function ae(t,e,a){var n=Zt(e,t);a.axis=a.axis||"x";var i=ee(a.axis),r=a.intersect?Qt(t,n):te(t,n,!1,i),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var ne={modes:{single:function(t,e){var a=Zt(e,t),n=[];return Jt(t,function(t){if(t.inRange(a.x,a.y))return n.push(t),n}),n.slice(0,1)},label:ae,index:ae,dataset:function(t,e,a){var n=Zt(e,t);a.axis=a.axis||"xy";var i=ee(a.axis),r=a.intersect?Qt(t,n):te(t,n,!1,i);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ae(t,e,{intersect:!1})},point:function(t,e){return Qt(t,Zt(e,t))},nearest:function(t,e,a){var n=Zt(e,t);a.axis=a.axis||"xy";var i=ee(a.axis);return te(t,n,a.intersect,i)},x:function(t,e,a){var n=Zt(e,t),i=[],r=!1;return Jt(t,function(t){t.inXRange(n.x)&&i.push(t),t.inRange(n.x,n.y)&&(r=!0)}),a.intersect&&!r&&(i=[]),i},y:function(t,e,a){var n=Zt(e,t),i=[],r=!1;return Jt(t,function(t){t.inYRange(n.y)&&i.push(t),t.inRange(n.x,n.y)&&(r=!0)}),a.intersect&&!r&&(i=[]),i}}},ie=j.extend;function re(t,e){return j.where(t,function(t){return t.pos===e})}function oe(t,e){return t.sort(function(t,a){var n=e?a:t,i=e?t:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function se(t,e,a,n){return Math.max(t[a],e[a])+Math.max(t[n],e[n])}function le(t,e,a){var n,i,r=a.box,o=t.maxPadding;
1if(a.size&&(t[a.pos]-=a.size),a.size=a.horizontal?r.height:r.width,t[a.pos]+=a.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(n=e.outerWidth-se(o,t,"left","right"),i=e.outerHeight-se(o,t,"top","bottom"),n!==t.w||i!==t.h){t.w=n,t.h=i;var l=a.horizontal?[n,t.w]:[i,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function de(t,e){var a,n=e.maxPadding;return a={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach(function(t){a[t]=Math.max(e[t],n[t])}),a}function he(t,e,a){var n,i,r,o,s,l,d=[];for(n=0,i=t.length;n<i;++n)(o=(r=t[n]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),le(e,a,r)&&(l=!0,d.length&&(s=!0)),o.fullWidth||d.push(r);return s&&he(d,e,a)||l}function ce(t,e,a){var n,i,r,o,s=a.padding,l=e.x,d=e.y;for(n=0,i=t.length;n<i;++n)o=(r=t[n]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?a.outerWidth-s.right:e.left+e.w,o.top=d,o.bottom=d+o.height,o.width=o.right-o.left,d=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=d}E._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ue={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 a=t.boxes?t.boxes.indexOf(e):-1;-1!==a&&t.boxes.splice(a,1)},configure:function(t,e,a){for(var n,i=["fullWidth","position","weight"],r=i.length,o=0;o<r;++o)a.hasOwnProperty(n=i[o])&&(e[n]=a[n])},update:function(t,e,a){if(t){var n=j.options.toPadding((t.options.layout||{}).padding),i=e-n.width,r=a-n.height,o=function(t){var e=function(t){var e,a,n,i=[];for(e=0,a=(t||[]).length;e<a;++e)i.push({index:e,box:n=t[e],pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return i}(t),a=oe(re(e,"left"),!0),n=oe(re(e,"right")),i=oe(re(e,"top"),!0),r=oe(re(e,"bottom"));return{leftAndTop:a.concat(i),rightAndBottom:n.concat(r),chartArea:re(e,"chartArea"),vertical:a.concat(n),horizontal:i.concat(r)}}(t.boxes),s=o.vertical,l=o.horizontal,d=Object.freeze({outerWidth:e,outerHeight:a,padding:n,availableWidth:i,vBoxMaxWidth:i/2/s.length,hBoxMaxHeight:r/2}),h=ie({maxPadding:ie({},n),w:i,h:r,x:n.left,y:n.top},n);(function(t,e){var a,n,i;for(a=0,n=t.length;a<n;++a)(i=t[a]).width=i.horizontal?i.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,i.height=i.horizontal&&e.hBoxMaxHeight})(s.concat(l),d),he(s,h,d),he(l,h,d)&&he(s,h,d),function(t){var e=t.maxPadding;function a(a){var n=Math.max(e[a]-t[a],0);return t[a]+=n,n}t.y+=a("top"),t.x+=a("left"),a("right"),a("bottom")}(h),ce(o.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ce(o.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},j.each(o.chartArea,function(e){var a=e.box;ie(a,t.chartArea),a.update(h.w,h.h)})}}},ge=function(t){return t&&t.default||t}(Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"})),pe="$chartjs",fe="chartjs-",me=fe+"size-monitor",ve=fe+"render-monitor",be=["animationstart","webkitAnimationStart"],ye={touchstart:"mousedown",touchmove:"mou
1semove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function xe(t,e){var a=j.getStyle(t,e),n=a&&a.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var _e=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(a){}return t}()&&{passive:!0};function Ce(t,e,a){t.addEventListener(e,a,_e)}function Se(t,e,a){t.removeEventListener(e,a,_e)}function we(t,e,a,n,i){return{type:t,chart:e,native:i||null,x:void 0!==a?a:null,y:void 0!==n?n:null}}function ke(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,a){var n=t[pe]||(t[pe]={}),i=n.resizer=function(t){var e=1e6,a=ke(me),n=ke(me+"-expand"),i=ke(me+"-shrink");n.appendChild(ke()),i.appendChild(ke()),a.appendChild(n),a.appendChild(i),a._reset=function(){n.scrollLeft=e,n.scrollTop=e,i.scrollLeft=e,i.scrollTop=e};var r=function(){a._reset(),t()};return Ce(n,"scroll",r.bind(n,"expand")),Ce(i,"scroll",r.bind(i,"shrink")),a}(function(t,e){var a=!1,n=[];return function(){n=Array.prototype.slice.call(arguments),e=e||this,a||(a=!0,j.requestAnimFrame.call(window,function(){a=!1,t.apply(e,n)}))}}(function(){if(n.resizer){var i=a.options.maintainAspectRatio&&t.parentNode,r=i?i.clientWidth:0;e(we("resize",a)),i&&i.clientWidth<r&&a.canvas&&e(we("resize",a))}}));!function(t,e){var a=t[pe]||(t[pe]={}),n=a.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};j.each(be,function(e){Ce(t,e,n)}),a.reflow=!!t.offsetParent,t.classList.add(ve)}(t,function(){if(n.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}})}function Me(t){var e=t[pe]||{},a=e.resizer;delete e.resizer,function(t){var e=t[pe]||{},a=e.renderProxy;a&&(j.each(be,function(e){Se(t,e,a)}),delete e.renderProxy),t.classList.remove(ve)}(t),a&&a.parentNode&&a.parentNode.removeChild(a)}var Pe={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 a=t[pe]||(t[pe]={});if(!a.containsStyles){a.containsStyles=!0,e="/* Chart.js */\n"+e;var n=document.createElement("style");n.setAttribute("type","text/css"),n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(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 a=t&&t.getContext&&t.getContext("2d");return a&&a.canvas===t?(this._ensureLoaded(t),function(t,e){var a=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[pe]={initial:{height:n,width:i,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",null===i||""===i){var r=xe(t,"width");void 0!==r&&(t.width=r)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=xe(t,"height");void 0!==r&&(t.height=o)}}(t,e),a):null},releaseContext:function(t){var e=t.canvas;if(e[pe]){var a=e[pe].initial;["height","width"].forEach(function(t){var n=a[t];j.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),j.each(a.style||{},function(t,a){e.style[a]=t}),e.width=e.width,delete e[pe]}},addEventListener:function(t,e,a){var n=t.canvas;if("resize"!==e){var i=a[pe]||(a[pe]={});Ce(n,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){a(function(t,e){var a=ye[t.type]||t.type,n=j.getRelativePosition(t,e);return we(a,e,n.x,n.y,t)}(e,t))})}else Ae(n,a,t)},removeEventListener:function(t,e,a){var n=t.canvas;if("resize"!==e){var i=((a[pe]||{}).proxies||{})[t.id+"_"+e];!i||Se(n,e,i)}else Me(n)}};j.addEvent=Ce,j.removeEvent=Se;var De=j.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Pe._enabled?Pe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});E._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 a=e.indexOf(t);-1!==a&&e.splice(a,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,a){var n,i,r,o,s,l=this.descriptors(t),d=l.length;for(n=0;n<d;++n)if("function"==typeof(s=(r=(i=l[n]).plugin)[e])&&((o=[t].concat(a||[])).push(i.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var a=[],n=[],i=t&&t.config||{},r=i.options&&i.options.plugins||{};
vendor: 9,774 bytes, line 1
1return this._plugins.concat(i.plugins||[]).forEach(function(t){if(-1===a.indexOf(t)){var e=t.id,i=r[e];!1!==i&&(!0===i&&(i=j.clone(E.global.plugins[e])),a.push(t),n.push({plugin:t,options:i||{}}))}}),e.descriptors=n,e.id=this._cacheId,n},_invalidate:function(t){delete t.$plugins}},Oe={constructors:{},defaults:{},registerScaleType:function(t,e,a){this.constructors[t]=e,this.defaults[t]=j.clone(a)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?j.merge(Object.create(null),[E.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var a=this;a.defaults.hasOwnProperty(t)&&(a.defaults[t]=j.extend(a.defaults[t],e))},addScalesToLayout:function(t){j.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ue.addBox(t,e)})}},Fe=j.valueOrDefault,Te=j.rtl.getRtlAdapter;E._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:j.noop,title:function(t,e){var a="",n=e.labels,i=n?n.length:0;if(t.length>0){var r=t[0];r.label?a=r.label:r.xLabel?a=r.xLabel:i>0&&r.index<i&&(a=n[r.index])}return a},afterTitle:j.noop,beforeBody:j.noop,beforeLabel:j.noop,label:function(t,e){var a=e.datasets[t.datasetIndex].label||"";return a&&(a+=": "),j.isNullOrUndef(t.value)?a+=t.yLabel:a+=t.value,a},labelColor:function(t,e){var a=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:a.borderColor,backgroundColor:a.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:j.noop,afterBody:j.noop,beforeFooter:j.noop,footer:j.noop,afterFooter:j.noop}}});var Le={average:function(t){if(!t.length)return!1;var e,a,n=0,i=0,r=0;for(e=0,a=t.length;e<a;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();n+=s.x,i+=s.y,++r}}return{x:n/r,y:i/r}},nearest:function(t,e){var a,n,i,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(a=0,n=t.length;a<n;++a){var l=t[a];if(l&&l.hasValue()){var d=l.getCenterPoint(),h=j.distanceBetweenPoints(e,d);h<s&&(s=h,i=l)}}if(i){var c=i.tooltipPosition();r=c.x,o=c.y}return{x:r,y:o}}};function Be(t,e){return e&&(j.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ne(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ee(t){var e=t._xScale,a=t._yScale||t._scale,n=t._index,i=t._datasetIndex,r=t._chart.getDatasetMeta(i).controller,o=r._getIndexScale(),s=r._getValueScale();return{xLabel:e?e.getLabelForIndex(n,i):"",yLabel:a?a.getLabelForIndex(n,i):"",label:o?""+o.getLabelForIndex(n,i):"",value:s?""+s.getLabelForIndex(n,i):"",index:n,datasetIndex:i,x:t._model.x,y:t._model.y}}function Re(t){var e=E.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Fe(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Fe(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Fe(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Fe(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Fe(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Fe(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Fe(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Fe(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Fe(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 ze(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 Be([],Ne(t))}var We=X.extend({initialize:function(){this._model=Re(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,a=e.beforeTitle.apply(t,arguments),n=e.title.apply(t,arguments),i=e.afterTitle.apply(t,arguments),r=[];return r=Be(r,Ne(a)),r=Be(r,Ne(n)),Be(r,Ne(i))},getBeforeBody:function(){return Ve(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var a=this,n=a._options.callbacks,i=[];return j.each(t,function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ne(n.beforeLabel.call(a,t,e))),Be(r.lines,n.label.call(a,t,e)),Be(r.after,Ne(n.afterLabel.call(a,t,e))),i.push(r)}),i},getAfterBody:function(){return Ve(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,a=e.beforeFooter.apply(t,arguments),n=e.footer.apply(t,arguments),i=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ne(a)),r=Be(r,Ne(n)),Be(r,Ne(i))},update:function(t){var e,a,n=this,i=n._options,r=n._model,o=n._model=Re(i),s=n._active,l=n._data,d={xAlign:r.xAlign,yAlign:r.yAlign},h={x:r.x,y:r.y},c={width:r.width,height:r.height},u={x:r.caretX,y:r.caretY};if(s.length){o.opacity=1;var g=[],p=[];u=Le[i.position].call(n,s,n._eventPosition);var f=[];for(e=0,a=s.length;e<a;++e)f.push(Ee(s[e]));i.filter&&(f=f.filter(function(t){return i.filter(t,l)})),i.itemSort&&(f=f.sort(function(t,e){return i.itemSort(t,e,l)})),j.each(f,function(t){g.push(i.callbacks.labelColor.call(n,t,n._chart)),p.push(i.callbacks.labelTextColor.call(n,t,n._chart))}),o.title=n.getTitle(f,l),o.beforeBody=n.getBeforeBody(f,l),o.body=n.getBody(f,l),o.afterBody=n.getAfterBody(f,l),o.footer=n.getFooter(f,l),o.x=u.x,o.y=u.y,o.caretPadding=i.caretPadding,o.labelColors=g,o.labelTextColors=p,o.dataPoints=f,h=function(t,e,a,n){var i=t.x,r=t.y,o=t.caretPadding,s=a.xAlign,l=a.yAlign,d=t.caretSize+o,h=t.cornerRadius+o;return"right"===s?i-=e.width:"center"===s&&((i-=e.width/2)+e.width>n.width&&(i=n.width-e.width),i<0&&(i=0)),"top"===l?r+=d:r-="bottom"===l?e.height+d:e.height/2,"center"===l?"left"===s?i+=d:"right"===s&&(i-=d):"left"===s?i-=h:"right"===s&&(i+=h),{x:i,y:r}}(o,c=function(t,e){var a=t._chart.ctx,n=2*e.yPadding,i=0,r=e.body,o=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0),s=e.title.length,l=e.footer.length,d=e.titleFontSize,h=e.bodyFontSize,c=e.footerFontSize;n+=s*d,n+=s?(s-1)*e.titleSpacing:0,n+=s?e.titleMarginBottom:0,n+=(o+=e.beforeBody.length+e.afterBody.length)*h,n+=o?(o-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*c,n+=l?(l-1)*e.footerSpacing:0;var u=0,g=function(t){i=Math.max(i,a.measureText(t).width+u)};return a.font=j.fontString(d,e._titleFontStyle,e._titleFontFamily),j.each(e.title,g),a.font=j.fontString(h,e._bodyFontStyle,e._bodyFontFamily),j.each(e.beforeBody.concat(e.afterBody),g),u=e.displayColors?h+2:0,j.each(r,function(t){j.each(t.before,g),j.each(t.lines,g),j.each(t.after,g)}),u=0,a.font=j.fontString(c,e._footerFontStyle,e._footerFontFamily),j.each(e.footer,g),{width:i+=2*e.xPadding,height:n}}(this,o),d=function(t,e){var a=t._model,n=t._chart,i=t._chart.chartArea,r="center",o="center";a.y<e.height?o="top":a.y>n.height-e.height&&(o="bottom");var s,l,d,h,c,u=(i.left+i.right)/2,g=(i.top+i.bottom)/2;"center"===o?(s=function(t){return t<=u},l=function(t){return t>u}):(s=function(t){return t<=e.width/2},l=function(t){return t>=n.width-e.width/2}),d=function(t){return t+e.width+a.caretSize+a.caretPadding>n.width},h=function(t){return t-e.width-a.caretSize-a.caretPadding<0},c=function(t){return t<=g?"top":"bottom"},s(a.x)?(r="left",d(a.x)&&(r="center",o=c(a.y))):l(a.x)&&(r="right",h(a.x)&&(r="center",o=c(a.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:r,yAlign:p.yAlign?p.yAlign:o}}(this,c),n._chart)}else o.opacity=0;return o.xAlign=d.xAlign,o.yAlign=d.yAlign,o.x=h.x,o.y=h.y,o.width=c.width,o.height=c.height,o.caretX=u.x,o.caretY=u.y,n._model=o,t&&i.custom&&i.custom.call(n,o),n},drawCaret:function(t,e){var a=this._chart.ctx,n=this.getCaretPosition(t,e,this._view);a.lineTo(n.x1,n.y1),a.lineTo(n.x2,n.y2),a.lineTo(n.x3,n.y3)},getCaretPosition:function(t,e,a){var n,i,r,o,s,l,d=a.caretSize,h=a.cornerRadius,c=a.xAlign,u=a.yAlign,g=t.x,p=t.y,f=e.width,m=e.height;if("center"===u)s=p+m/2,"left"===c?(i=(n=g)-d,r=n,o=s+d,l=s-d):(i=(n=g+f)+d,r=n,o=s-d,l=s+d);else if("left"===c?(n=(i=g+h+d)-d,r=i+d):"right"===c?(n=(i=g+f-h-d)-d,r=i+d):(n=(i=a.caretX)-d,r=i+d),"top"===u)s=(o=p)-d,l=o;else{s=(o=p+m)+d,l=o;var v=r;r=n,n=v}return{x1:n,x2:i,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,a){var n,i,r,o=e.title,s=o.length;if(s){var l=Te(e.rtl,e.x,e.width);for(t.x=ze(e,e._titleAlign),a.textAlign=l.textAlign(e._titleAlign),a.textBaseline="middle",n=e.titleFontSize,i=e.titleSpacing,a.fillStyle=e.titleFontColor,a.font=j.fontString(n,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)a.fillText(o[r],l.x(t.x),t.y+n/2),t.y+=n+i,r+1===s&&(t.y+=e.titleMarginBottom-i)}},drawBody:function(t,e,a){var n,i,r,o,s,l,d,h,c=e.bodyFontSize,u=e.bodySpacing,g=e._bodyAlign,p=e.body,f=e.displayColors,m=0,v=f?ze(e,"left"):0,b=Te(e.rtl,e.x,e.width),y=function(e){a.fillText(e,b.x(t.x+m),t.y+c/2),t.y+=c+u},x=b.textAlign(g);for(a.textAlign=g,a.textBaseline="middle",a.font=j.fontString(c,e._bodyFontStyle,e._body
1FontFamily),t.x=ze(e,x),a.fillStyle=e.bodyFontColor,j.each(e.beforeBody,y),m=f&&"right"!==x?"center"===g?c/2+1:c+2:0,s=0,d=p.length;s<d;++s){for(n=p[s],r=e.labelColors[s],a.fillStyle=i=e.labelTextColors[s],j.each(n.before,y),l=0,h=(o=n.lines).length;l<h;++l){if(f){var _=b.x(v);a.fillStyle=e.legendColorBackground,a.fillRect(b.leftForLtr(_,c),t.y,c,c),a.lineWidth=1,a.strokeStyle=r.borderColor,a.strokeRect(b.leftForLtr(_,c),t.y,c,c),a.fillStyle=r.backgroundColor,a.fillRect(b.leftForLtr(b.xPlus(_,1),c-2),t.y+1,c-2,c-2),a.fillStyle=i}y(o[l])}j.each(n.after,y)}m=0,j.each(e.afterBody,y),t.y-=u},drawFooter:function(t,e,a){var n,i,r=e.footer,o=r.length;if(o){var s=Te(e.rtl,e.x,e.width);for(t.x=ze(e,e._footerAlign),t.y+=e.footerMarginTop,a.textAlign=s.textAlign(e._footerAlign),a.textBaseline="middle",n=e.footerFontSize,a.fillStyle=e.footerFontColor,a.font=j.fontString(n,e._footerFontStyle,e._footerFontFamily),i=0;i<o;++i)a.fillText(r[i],s.x(t.x),t.y+n/2),t.y+=n+e.footerSpacing}},drawBackground:function(t,e,a,n){a.fillStyle=e.backgroundColor,a.strokeStyle=e.borderColor,a.lineWidth=e.borderWidth;var i=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=n.width,d=n.height,h=e.cornerRadius;a.beginPath(),a.moveTo(o+h,s),"top"===r&&this.drawCaret(t,n),a.lineTo(o+l-h,s),a.quadraticCurveTo(o+l,s,o+l,s+h),"center"===r&&"right"===i&&this.drawCaret(t,n),a.lineTo(o+l,s+d-h),a.quadraticCurveTo(o+l,s+d,o+l-h,s+d),"bottom"===r&&this.drawCaret(t,n),a.lineTo(o+h,s+d),a.quadraticCurveTo(o,s+d,o,s+d-h),"center"===r&&"left"===i&&this.drawCaret(t,n),a.lineTo(o,s+h),a.quadraticCurveTo(o,s,o+h,s),a.closePath(),a.fill(),e.borderWidth>0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var a={width:e.width,height:e.height},n={x:e.x,y:e.y},i=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=i,this.drawBackground(n,e,t,a),n.y+=e.yPadding,j.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),j.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,a=this,n=a._options;return a._lastActive=a._lastActive||[],"mouseout"===t.type?a._active=[]:(a._active=a._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&a._active.reverse()),(e=!j.arrayEquals(a._active,a._lastActive))&&(a._lastActive=a._active,(n.enabled||n.custom)&&(a._eventPosition={x:t.x,y:t.y},a.update(!0),a.pivot())),e}});We.positioners=Le;var je=j.valueOrDefault;function He(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,a,n){if("xAxes"===t||"yAxes"===t){var i,r,o,s=a[t].length;for(e[t]||(e[t]=[]),i=0;i<s;++i)r=je((o=a[t][i]).type,"xAxes"===t?"category":"linear"),i>=e[t].length&&e[t].push({}),j.merge(e[t][i],!e[t][i].type||o.type&&o.type!==e[t][i].type?[Oe.getScaleDefaults(r),o]:o)}else j._merger(t,e,a,n)}})}function Ue(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,a,n){var i=e[t]||Object.create(null),r=a[t];
vendor: 18,329 bytes, line 1
1"scales"===t?e[t]=He(i,r):"scale"===t?e[t]=j.merge(i,[Oe.getScaleDefaults(r.type),r]):j._merger(t,e,a,n)}})}function qe(t){var e=t.options;j.each(t.scales,function(e){ue.removeBox(t,e)}),e=Ue(E.global,E[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ge(t,e,a){var n,i=function(t){return t.id===n};do{n=e+a++}while(j.findIndex(t,i)>=0);return n}function Ye(t){return"top"===t||"bottom"===t}function Xe(t,e){return function(a,n){return a[t]===n[t]?a[e]-n[e]:a[t]-n[t]}}E._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var $e=function(t,e){return this.construct(t,e),this};j.extend($e.prototype,{construct:function(t,e){var a=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=Ue(E.global,E[t.type],t.options||{}),t}(e);var n=De.acquireContext(t,e),i=n&&n.canvas,r=i&&i.height,o=i&&i.width;a.id=j.uid(),a.ctx=n,a.canvas=i,a.config=e,a.width=o,a.height=r,a.aspectRatio=r?o/r:null,a.options=e.options,a._bufferedRender=!1,a._layers=[],a.chart=a,a.controller=a,$e.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),n&&i?(a.initialize(),a.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"),j.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Ie.notify(t,"afterInit"),t},clear:function(){return j.canvas.clear(this),this},stop:function(){return Z.cancelAnimation(this),this},resize:function(t){var e=this,a=e.options,n=e.canvas,i=a.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(j.getMaximumWidth(n))),o=Math.max(0,Math.floor(i?r/i:j.getMaximumHeight(n)));if((e.width!==r||e.height!==o)&&(n.width=e.width=r,n.height=e.height=o,n.style.width=r+"px",n.style.height=o+"px",j.retinaScale(e,a.devicePixelRatio),!t)){var s={width:r,height:o};Ie.notify(e,"resize",[s]),a.onResize&&a.onResize(e,s),e.stop(),e.update({duration:a.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},a=t.scale;j.each(e.xAxes,function(t,a){t.id||(t.id=Ge(e.xAxes,"x-axis-",a))}),j.each(e.yAxes,function(t,a){t.id||(t.id=Ge(e.yAxes,"y-axis-",a))}),a&&(a.id=a.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,a=t.scales||{},n=[],i=Object.keys(a).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.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&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),j.each(n,function(e){var n=e.options,r=n.id,o=je(n.type,e.dtype);Ye(n.position)!==Ye(e.dposition)&&(n.position=e.dposition),i[r]=!0;var s=null;if(r in a&&a[r].type===o)(s=a[r]).options=n,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:n,ctx:t.ctx,chart:t}),a[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),j.each(i,function(t,e){t||delete a[e]}),t.scales=a,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,a=this,n=[],i=a.data.datasets;for(t=0,e=i.length;t<e;t++){var r=i[t],o=a.getDatasetMeta(t),s=r.type||a.config.type;if(o.type&&o.type!==s&&(a.destroyDatasetMeta(t),o=a.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Kt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(a,t),n.push(o.controller)}}return n},resetElements:function(){var t=this;j.each(t.data.datasets,function(e,a){t.getDatasetMeta(a).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,a,n=this;if((!t||"object"!=typeof t)&&(t={duration:t,lazy:arguments[1]}),qe(n),Ie._invalidate(n),!1!==Ie.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var i=n.buildOrUpdateControllers();for(e=0,a=n.data.datasets.length;e<a;e++)n.getDatasetMeta(e).controller.buildOrUpdateElements();n.updateLayout(),n.options.animation&&n.options.animation.duration&&j.each(i,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Ie.notify(n,"afterUpdate"),n._layers.sort(Xe("z","_idx")),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){var t=this;!1!==Ie.notify(t,"beforeLayout")&&(ue.update(this,this.width,this.height),t._layers=[],j.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,a=t.data.datasets.length;e<a;++e)t.updateDataset(e);Ie.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,a=e.getDatasetMeta(t),n={meta:a,index:t};!1!==Ie.notify(e,"beforeDatasetUpdate",[n])&&(a.controller._update(),Ie.notify(e,"afterDatasetUpdate",[n]))},render:function(t){var e=this;(!t||"object"!=typeof t)&&(t={duration:t,lazy:arguments[1]});var a=e.options.animation,n=je(t.duration,a&&a.duration),i=t.lazy;if(!1!==Ie.notify(e,"beforeRender")){var r=function(t){Ie.notify(e,"afterRender"),j.callback(a&&a.onComplete,[t],e)};if(a&&n){var o=new K({numSteps:n/16.66,easing:t.easing||a.easing,render:function(t,e){var a=e.currentStep,n=a/e.numSteps;t.draw((0,j.easing.effects[e.easing])(n),n,a)},onAnimationProgress:a.onProgress,onAnimationComplete:r});Z.addAnimation(e,o,n,i)}else e.draw(),r(new K({numSteps:0,chart:e}));return e}},draw:function(t){var e,a,n=this;if(n.clear(),j.isNullOrUndef(t)&&(t=1),n.transition(t),!(n.width<=0||n.height<=0)&&!1!==Ie.notify(n,"beforeDraw",[t])){for(a=n._layers,e=0;e<a.length&&a[e].z<=0;++e)a[e].draw(n.chartArea);for(n.drawDatasets(t);e<a.length;++e)a[e].draw(n.chartArea);n._drawTooltip(t),Ie.notify(n,"afterDraw",[t])}},transition:function(t){for(var e=this,a=0,n=(e.data.datasets||[]).length;a<n;++a)e.isDatasetVisible(a)&&e.getDatasetMeta(a).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,a,n=this,i=[];for(e=0,a=(n.data.datasets||[]).length;e<a;++e)(!t||n.isDatasetVisible(e))&&i.push(n.getDatasetMeta(e));return i.sort(Xe("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,a,n=this;if(!1!==Ie.notify(n,"beforeDatasetsDraw",[t])){for(a=(e=n._getSortedVisibleDatasetMetas()).length-1;a>=0;--a)n.drawDataset(e[a],t);Ie.notify(n,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var a={meta:t,index:t.index,easingValue:e};!1!==Ie.notify(this,"beforeDatasetDraw",[a])&&(t.controller.draw(e),Ie.notify(this,"afterDatasetDraw",[a]))},_drawTooltip:function(t){var e=this,a=e.tooltip,n={tooltip:a,easingValue:t};!1!==Ie.notify(e,"beforeTooltipDraw",[n])&&(a.draw(),Ie.notify(e,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ne.modes.single(this,t)},getElementsAtEvent:function(t){return ne.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ne.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,a){var n=ne.modes[e];return"function"==typeof n?n(this,t,a):[]},getDatasetAtEvent:function(t){return ne.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,a=e.data.datasets[t];a._meta||(a._meta={});var n=a._meta[e.id];return n||(n=a._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,a=this.data.datasets.length;e<a;++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,a=this.data.datasets[t],n=a._meta&&a._meta[e];n&&(n.controller.destroy(),delete a._meta[e])},destroy:function(){var t,e,a=this,n=a.canvas;for(a.stop(),t=0,e=a.data.datasets.length;t<e;++t)a.destroyDatasetMeta(t);n&&(a.unbindEvents(),j.canvas.clear(a),De.releaseContext(a.ctx),a.canvas=null,a.ctx=null),Ie.notify(a,"destroy"),delete $e.instances[a.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new We({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},a=function(){t.eventHandler.apply(t,arguments)};j.each(t.options.events,function(n){De.addEventListener(t,n,a),e[n]=a}),t.options.responsive&&(a=function(){t.resize()},De.addEventListener(t,"resize",a),e.resize=a)},unbindEvents:function(){var t=this,e=t._listeners;!e||(delete t._listeners,j.each(e,function(e,a){De.removeEventListener(t,a,e)}))},updateHoverStyle:function(t,e,a){var n,i,r,o=a?"set":"remove";for(i=0,r=t.length;i<r;++i)(n=t[i])&&this.getDatasetMeta(n._datasetIndex).controller[o+"HoverStyle"](n);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,a=e.tooltip;if(!1!==Ie.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);a&&(n=a._start?a.handleEvent(t):n|a.handleEvent(t)),Ie.notify(e,"afterEvent",[t]);var i=e._bufferedRequest;return i?e.render(i):n&&!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,a=this,n=a.options||{},i=n.hover;return a.lastActive=a.lastActive||[],a.active="mouseout"===t.type?[]:a.getElementsAtEventForMode(t,i.mode,i),j.callback(n.onHover||n.hover.onHover,[t.native,a.active],a),("mouseup"===t.type||"click"===t.type)&&n.onClick&&n.onClick.call(a,t.native,a.active),a.lastActive.length&&a.updateHoverStyle(a.lastActive,i.mode,!1),a.active.length&&i.mode&&a.updateHoverStyle(a.active,i.mode,!0),e=!j.arrayEquals(a.active,a.lastActive),a.lastActive=a.active,e}}),$e.instances={};var Ke=$e;$e.Controller=$e,$e.types={},j.configMerge=Ue,j.scaleMerge=He;function Ze(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Je(t){this.options=t||{}}j.extend(Je.prototype,{formats:Ze,parse:Ze,format:Ze,add:Ze,diff:Ze,startOf:Ze,endOf:Ze,_create:function(t){return t}}),Je.override=function(t){j.extend(Je.prototype,t)};var Qe={_date:Je},ta={formatters:{values:function(t){return j.isArray(t)?t:""+t},linear:function(t,e,a){var n=a.length>3?a[2]-a[1]:a[1]-a[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var i=j.log10(Math.abs(n)),r="";if(0!==t)if(Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))<1e-4){var o=j.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(i);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,a){var n=t/Math.pow(10,Math.floor(j.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===a.length-1?t.toExponential():""}}},ea=j.isArray,aa=j.isNullOrUndef,na=j.valueOrDefault,ia=j.valueAtIndexOrDefault;function ra(t,e,a){var n,i=t.getTicks().length,r=Math.min(e,i-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel,d=1e-6;if(!(a&&(n=1===i?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,o+=r<e?n:-n,o<s-d||o>l+d)))return o}function oa(t,e,a,n){var i,r,o,s,l,d,h,c,u,g,p,f,m,v=a.length,b=[],y=[],x=[],_=0,C=0;for(i=0;i<v;++i){if(s=a[i].label,t.font=d=(l=a[i].major?e.major:e.minor).string,h=n[d]=n[d]||{data:{},gc:[]},c=l.lineHeight,u=g=0,aa(s)||ea(s)){if(ea(s))for(r=0,o=s.length;r<o;++r)!aa(p=s[r])&&!ea(p)&&(u=j.measureText(t,h.data,h.gc,u,p),g+=c)}else u=j.measureText(t,h.data,h.gc,u,s),g=c;b.push(u),y.push(g),x.push(c/2),_=Math.max(u,_),C=Math.max(g,C)}function S(t){return{width:b[t]||0,height:y[t]||0,offset:x[t]||0}}return function(t,e){j.each(t,function(t){var a,n=t.gc,i=n.length/2;if(i>e){for(a=0;a<i;++a)delete t.data[n[a]];n.splice(0,i)}})}(n,v),f=b.indexOf(_),m=y.indexOf(C),{first:S(0),last:S(v-1),widest:S(f),highest:S(m)}}function sa(t){return t.drawTicks?t.tickMarkLength:0}function la(t){var e,a;return t.display?(e=j.options._parseFont(t),a=j.options.toPadding(t.padding),e.lineHeight+a.height):0}function da(t,e){return j.extend(j.options._parseFont({fontFamily:na(e.fontFamily,t.fontFamily),fontSize:na(e.fontSize,t.fontSize),fontStyle:na(e.fontStyle,t.fontStyle),lineHeight:na(e.lineHeight,t.lineHeight)}),{color:j.options.resolve([e.fontColor,t.fontColor,E.global.defaultFontColor])})}function ha(t){var e=da(t,t.minor);return{minor:e,major:t.major.enabled?da(t,t.major):e}}function ca(t){var e,a,n,i=[];for(a=0,n=t.length;a<n;++a)void 0!==(e=t[a])._index&&i.push(e);return i}function ua(t,e,a,n){var i,r,o,s,l=na(a,0),d=Math.min(na(n,t.length),t.length),h=0;for(e=Math.ceil(e),n&&(e=(i=n-a)/Math.floor(i/e)),s=l;s<0;)h++,s=Math.round(l+h*e);for(r=Math.max(l,0);r<d;r++)o=t[r],r===s?(o._index=r,h++,s=Math.round(l+h*e)):delete o.label}E._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:ta.formatters.values,minor:{},major:{}}});var ga=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(){j.callback(this.options.beforeUpdate,[this])},update:function(t,e,a){var n,i,r,o,s,l=this,d=l.options.ticks,h=d.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=j.extend({left:0,right:0,top:0,bottom:0},a),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],n=0,i=l.ticks.length;n<i;++n)o.push({value:l.ticks[n],major:!1});return l._ticks=o,r=l._convertTicksToLabels((s=h<o.length)?function(t,e){for(var a=[],n=t.length/e,i=0,r=t.length;i<r;i+=n)a.push(t[Math.floor(i)]);return a}(o,h):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=d.display&&(d.autoSkip||"auto"===d.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,a=this,n=a.options.ticks.reverse;a.isHorizontal()?(t=a.left,e=a.right):(t=a.top,e=a.bottom,n=!n),a._startPixel=t,a._endPixel=e,a._reversePixels=n,a._length=e-t},afterUpdate:function(){j.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){j.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(){j.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){j.callback(this.options.beforeDataLimits,[this])},determineDataLimits:j.noop,afterDataLimits:function(){j.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){j.callback(this.options.beforeBuildTicks,[this])},buildTicks:j.noop,afterBuildTicks:function(t){var e=this;return ea(t)&&t.length?j.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=j.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){j.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(){j.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){j.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,a,n,i,r,o,s=this,l=s.options,d=l.ticks,h=s.getTicks().length,c=d.minRotation||0,u=d.maxRotation,g=c;!s._isVisible()||!d.display||c>=u||h<=1||!s.isHorizontal()?s.labelRotation=c:(e=(t=s._getLabelSizes()).widest.width,a=t.highest.height-t.highest.offset,n=Math.min(s.maxWidth,s.chart.width-e),e+6>(i=l.offset?s.maxWidth/h:n/(h-1))&&(i=n/(h-(l.offset?.5:1)),r=s.maxHeight-sa(l.gridLines)-d.padding-la(l.scaleLabel),o=Math.sqrt(e*e+a*a),g=j.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/i,1)),Math.asin(Math.min(r/o,1))-Math.asin(a/o))),g=Math.max(c,Math.min(u,g))),s.labelRotation=g)},afterCalculateTickRotation:function(){j.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){j.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},a=t.chart,n=t.options,i=n.ticks,r=n.scaleLabel,o=n.gridLines,s=t._isVisible(),l="bottom"===n.position,d=t.isHorizontal();if(d?e.width=t.maxWidth:s&&(e.width=sa(o)+la(r)),d?s&&(e.height=sa(o)+la(r)):e.he
1ight=t.maxHeight,i.display&&s){var h=ha(i),c=t._getLabelSizes(),u=c.first,g=c.last,p=c.widest,f=c.highest,m=.4*h.minor.lineHeight,v=i.padding;if(d){var b=0!==t.labelRotation,y=j.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y);e.height=Math.min(t.maxHeight,e.height+(_*p.width+x*(f.height-(b?f.offset:0))+(b?0:m))+v);var C,S,w=t.getPixelForTick(0)-t.left,k=t.right-t.getPixelForTick(t.getTicks().length-1);b?(C=l?x*u.width+_*u.offset:_*(u.height-u.offset),S=l?_*(g.height-g.offset):x*g.width+_*g.offset):(C=u.width/2,S=g.width/2),t.paddingLeft=Math.max((C-w)*t.width/(t.width-w),0)+3,t.paddingRight=Math.max((S-k)*t.width/(t.width-k),0)+3}else e.width=Math.min(t.maxWidth,e.width+(i.mirror?0:p.width+v+m)),t.paddingTop=u.height/2,t.paddingBottom=g.height/2}t.handleMargins(),d?(t.width=t._length=a.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=a.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(){j.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(aa(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,a,n,i=this;for(i.ticks=t.map(function(t){return t.value}),i.beforeTickToLabelConversion(),e=i.convertTicksToLabels(t)||i.ticks,i.afterTickToLabelConversion(),a=0,n=t.length;a<n;++a)t[a].label=e[a];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=oa(t.ctx,ha(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,a,n,i;return ea(t)?(e=+this.getRightValue(t[0]),a=+this.getRightValue(t[1]),n=Math.min(e,a),i=Math.max(e,a)):(e=void 0,a=t=+this.getRightValue(t),n=t,i=t),{min:n,max:i,start:e,end:a}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:j.noop,getPixelForValue:j.noop,getValueForPixel:j.noop,getPixelForTick:function(t){var e=this,a=e.options.offset,n=e._ticks.length,i=1/Math.max(n-(a?0:1),1);return t<0||t>n-1?null:e.getPixelForDecimal(t*i+(a?i/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,a=t.max;return t.beginAtZero?0:e<0&&a<0?a:e>0&&a>0?e:0},_autoSkip:function(t){var e,a,n,i,r=this,o=r.options.ticks,s=r._length,l=o.maxTicksLimit||s/r._tickSize()+1,d=o.major.enabled?function(t){var e,a,n=[];for(e=0,a=t.length;e<a;e++)t[e].major&&n.push(e);return n}(t):[],h=d.length,c=d[0],u=d[h-1];if(h>l)return function(t,e,a){var n,i,r=0,o=e[0];for(a=Math.ceil(a),n=0;n<t.length;n++)i=t[n],n===o?(i._index=n,o=e[++r*a]):delete i.label}(t,d,h/l),ca(t);if(n=function(t,e,a,n){var i,r,o,s,l=function(t){var e,a,n=t.length;if(n<2)return!1;for(a=t[0],e=1;e<n;++e)if(t[e]-t[e-1]!==a)return!1;return a}(t),d=(e.length-1)/n;if(!l)return Math.max(d,1);for(o=0,s=(i=j.math._factorize(l)).length-1;o<s;o++)if((r=i[o])>d)return r;return Math.max(d,1)}(d,t,0,l),h>0){for(e=0,a=h-1;e<a;e++)ua(t,n,d[e],d[e+1]);return ua(t,n,j.isNullOrUndef(i=h>1?(u-c)/(h-1):null)?0:c-i,c),ua(t,n,u,j.isNullOrUndef(i)?t.length:u+i),ca(t)}return ua(t,n),ca(t)},_tickSize:function(){var t=this,e=t.options.ticks,a=j.toRadians(t.labelRotation),n=Math.abs(Math.cos(a)),i=Math.abs(Math.sin(a)),r=t._getLabelSizes(),o=e.autoSkipPadding||0,s=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return t.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i},_isVisible:function(){var t,e,a,n=this,i=n.chart,r=n.options.display;
1if("auto"!==r)return!!r;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((a=i.getDatasetMeta(t)).xAxisID===n.id||a.yAxisID===n.id))return!0;return!1},_computeGridLineItems:function(t){var e,a,n,i,r,o,s,l,d,h,c,u,g,p,f,m,v,b=this,y=b.chart,x=b.options,_=x.gridLines,C=x.position,S=_.offsetGridLines,w=b.isHorizontal(),k=b._ticksToDraw,A=k.length+(S?1:0),M=sa(_),P=[],D=_.drawBorder?ia(_.lineWidth,0,0):0,I=D/2,O=j._alignPixel,F=function(t){return O(y,t,D)};for("top"===C?(e=F(b.bottom),s=b.bottom-M,d=e-I,c=F(t.top)+I,g=t.bottom):"bottom"===C?(e=F(b.top),c=t.top,g=F(t.bottom)-I,s=e+I,d=b.top+M):"left"===C?(e=F(b.right),o=b.right-M,l=e-I,h=F(t.left)+I,u=t.right):(e=F(b.left),h=t.left,u=F(t.right)-I,o=e+I,l=b.left+M),a=0;a<A;++a)!(aa((n=k[a]||{}).label)&&a<k.length)&&(a===b.zeroLineIndex&&x.offset===S?(p=_.zeroLineWidth,f=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(p=ia(_.lineWidth,a,1),f=ia(_.color,a,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(i=ra(b,n._index||a,S))&&(r=O(y,i,p),w?o=l=h=u=r:s=d=c=g=r,P.push({tx1:o,ty1:s,tx2:l,ty2:d,x1:h,y1:c,x2:u,y2:g,width:p,color:f,borderDash:m,borderDashOffset:v})));return P.ticksLength=A,P.borderValue=e,P},_computeLabelItems:function(){var t,e,a,n,i,r,o,s,l,d,h,c,u=this,g=u.options,p=g.ticks,f=g.position,m=p.mirror,v=u.isHorizontal(),b=u._ticksToDraw,y=ha(p),x=p.padding,_=sa(g.gridLines),C=-j.toRadians(u.labelRotation),S=[];for("top"===f?(r=u.bottom-_-x,o=C?"left":"center"):"bottom"===f?(r=u.top+_+x,o=C?"right":"center"):"left"===f?(i=u.right-(m?0:_)-x,o=m?"left":"right"):(i=u.left+(m?0:_)+x,o=m?"right":"left"),t=0,e=b.length;t<e;++t)!aa(n=(a=b[t]).label)&&(s=u.getPixelForTick(a._index||t)+p.labelOffset,d=(l=a.major?y.major:y.minor).lineHeight,h=ea(n)?n.length:1,v?(i=s,c="top"===f?((C?1:.5)-h)*d:(C?0:.5)*d):(r=s,c=(1-h)*d/2),S.push({x:i,y:r,rotation:C,label:n,font:l,textOffset:c,textAlign:o}));return S},_drawGrid:function(t){var e=this,a=e.options.gridLines;if(a.display){var n,i,r,o,s,l=e.ctx,d=e.chart,h=j._alignPixel,c=a.drawBorder?ia(a.lineWidth,0,0):0,u=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=u.length;r<o;++r)i=(s=u[r]).color,(n=s.width)&&i&&(l.save(),l.lineWidth=n,l.strokeStyle=i,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),a.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),a.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());
vendor: 4,294 bytes, line 1
1if(c){var g,p,f,m,v=c,b=ia(a.lineWidth,u.ticksLength-1,1),y=u.borderValue;e.isHorizontal()?(g=h(d,e.left,v)-v/2,p=h(d,e.right,b)+b/2,f=m=y):(f=h(d,e.top,v)-v/2,m=h(d,e.bottom,b)+b/2,g=p=y),l.lineWidth=c,l.strokeStyle=ia(a.color,0),l.beginPath(),l.moveTo(g,f),l.lineTo(p,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,a,n,i,r,o,s,l,d=t.ctx,h=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,n=h.length;e<n;++e){if(o=(r=h[e]).font,d.save(),d.translate(r.x,r.y),d.rotate(r.rotation),d.font=o.string,d.fillStyle=o.color,d.textBaseline="middle",d.textAlign=r.textAlign,l=r.textOffset,ea(s=r.label))for(a=0,i=s.length;a<i;++a)d.fillText(""+s[a],0,l),l+=o.lineHeight;else d.fillText(s,0,l);d.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,a=t.options,n=a.scaleLabel;if(n.display){var i,r,o=na(n.fontColor,E.global.defaultFontColor),s=j.options._parseFont(n),l=j.options.toPadding(n.padding),d=s.lineHeight/2,h=a.position,c=0;if(t.isHorizontal())i=t.left+t.width/2,r="bottom"===h?t.bottom-d-l.bottom:t.top+d+l.top;else{var u="left"===h;i=u?t.left+d+l.top:t.right-d-l.top,r=t.top+t.height/2,c=u?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(i,r),e.rotate(c),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(n.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,a=e.ticks&&e.ticks.z||0,n=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&a!==n&&t.draw===t._draw?[{z:n,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:a,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:a,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,a=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter(function(n){return(!t||n.type===t)&&(a?n.xAxisID===e.id:n.yAxisID===e.id)})}});ga.prototype._draw=ga.prototype.draw;var pa=ga,fa=j.isNullOrUndef,ma=pa.extend({determineDataLimits:function(){var t,e=this,a=e._getLabels(),n=e.options.ticks,i=n.min,r=n.max,o=0,s=a.length-1;void 0!==i&&(t=a.indexOf(i))>=0&&(o=t),void 0!==r&&(t=a.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=a[o],e.max=a[s]},buildTicks:function(){var t=this,e=t._getLabels(),a=t.minIndex,n=t.maxIndex;t.ticks=0===a&&n===e.length-1?e:e.slice(a,n+1)},getLabelForIndex:function(t,e){var a=this,n=a.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===a.id?a.getRightValue(n.data.datasets[e].data[t]):a._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,a=t.ticks;pa.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),a&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(a.length-(e?0:1),1))},getPixelForValue:function(t,e,a){var n,i,r,o=this;return!fa(e)&&!fa(a)&&(t=o.chart.data.datasets[a].data[e]),fa(t)||(n=o.isHorizontal()?t.x:t.y),(void 0!==n||void 0!==t&&isNaN(e))&&(i=o._getLabels(),t=j.valueOrDefault(n,t),e=-1!==(r=i.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,a=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(a,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}});ma._defaults={position:"bottom"};var va=j.isNullOrUndef;var ba=pa.extend({getRightValue:function(t){return"string"==typeof t?+t:pa.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var a=j.sign(t.min),n=j.sign(t.max);a<0&&n<0?t.max=0:a>0&&n>0&&(t.min=0)}var i=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),i!==r&&t.min>=t.max&&(i?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,a=e.options.ticks,n=a.stepSize,i=a.maxTicksLimit;
1return n?t=Math.ceil(e.max/n)-Math.floor(e.min/n)+1:(t=e._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:j.noop,buildTicks:function(){var t=this,e=t.options.ticks,a=t.getTickLimit(),n={maxTicks:a=Math.max(2,a),min:e.min,max:e.max,precision:e.precision,stepSize:j.valueOrDefault(e.fixedStepSize,e.stepSize)},i=t.ticks=function(t,e){var a,n,i,r,o=[],s=t.stepSize,l=s||1,d=t.maxTicks-1,h=t.min,c=t.max,u=t.precision,g=e.min,p=e.max,f=j.niceNum((p-g)/d/l)*l;if(f<1e-14&&va(h)&&va(c))return[g,p];(r=Math.ceil(p/f)-Math.floor(g/f))>d&&(f=j.niceNum(r*f/d/l)*l),s||va(u)?a=Math.pow(10,j._decimalPlaces(f)):(a=Math.pow(10,u),f=Math.ceil(f*a)/a),n=Math.floor(g/f)*f,i=Math.ceil(p/f)*f,s&&(!va(h)&&j.almostWhole(h/f,f/1e3)&&(n=h),!va(c)&&j.almostWhole(c/f,f/1e3)&&(i=c)),r=j.almostEquals(r=(i-n)/f,Math.round(r),f/1e3)?Math.round(r):Math.ceil(r),n=Math.round(n*a)/a,i=Math.round(i*a)/a,o.push(va(h)?n:h);for(var m=1;m<r;++m)o.push(Math.round((n+m*f)*a)/a);return o.push(va(c)?i:c),o}(n,t);t.handleDirectionalChanges(),t.max=j.max(i),t.min=j.min(i),e.reverse?(i.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),pa.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,a=e.getTicks(),n=e.min,i=e.max;pa.prototype._configure.call(e),e.options.offset&&a.length&&(n-=t=(i-n)/Math.max(a.length-1,1)/2,i+=t),e._startValue=n,e._endValue=i,e._valueRange=i-n}}),ya={position:"left",ticks:{callback:ta.formatters.linear}};function xa(t,e,a,n){var i,r,o=t.options,s=function(t,e,a){var n=[a.type,void 0===e&&void 0===a.stack?a.index:"",a.stack].join(".");return void 0===t[n]&&(t[n]={pos:[],neg:[]}),t[n]}(e,o.stacked,a),l=s.pos,d=s.neg,h=n.length;for(i=0;i<h;++i)r=t._parseValue(n[i]),!(isNaN(r.min)||isNaN(r.max)||a.data[i].hidden)&&(l[i]=l[i]||0,d[i]=d[i]||0,o.relativePoints?l[i]=100:r.min<0||r.max<0?d[i]+=r.min:l[i]+=r.max)}function _a(t,e,a){var n,i,r=a.length;for(n=0;n<r;++n)i=t._parseValue(a[n]),!(isNaN(i.min)||isNaN(i.max)||e.data[n].hidden)&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}var Ca=ba.extend({determineDataLimits:function(){var t,e,a,n,i=this,r=i.options,o=i.chart.data.datasets,s=i._getMatchingVisibleMetas(),l=r.stacked,d={},h=s.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<h;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<h;++t)a=o[(e=s[t]).index].data,l?xa(i,d,e,a):_a(i,e,a);j.each(d,function(t){n=t.pos.concat(t.neg),i.min=Math.min(i.min,j.min(n)),i.max=Math.max(i.max,j.max(n))}),i.min=j.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=j.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=j.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])}});Ca._defaults=ya;var Sa=j.valueOrDefault,wa=j.math.log10;var ka={position:"left",ticks:{callback:ta.formatters.logarithmic}};function Aa(t,e){return j.isFinite(t)&&t>=0?t:e}var Ma=pa.extend({determineDataLimits:function(){var t,e,a,n,i,r,o=this,s=o.options,l=o.chart,d=l.data.datasets,h=o.isHorizontal();function c(t){return h?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var u=s.stacked;if(void 0===u)for(t=0;t<d.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e)&&void 0!==e.stack){u=!0;break}if(s.stacked||u){var g={};for(t=0;t<d.length;t++){var p=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&c(e))for(void 0===g[p]&&(g[p]=[]),i=0,r=(n=d[t].data).length;i<r;i++){var f=g[p];a=o._parseValue(n[i]),!(isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||a.min<0||a.max<0)&&(f[i]=f[i]||0,f[i]+=a.max)}}j.each(g,function(t){if(t.length>0){var e=j.min(t),a=j.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,a)}})}else for(t=0;t<d.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e))for(i=0,r=(n=d[t].data).length;i<r;i++)a=o._parseValue(n[i]),!(isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||a.min<0||a.max<0)&&(o.min=Math.min(a.min,o.min),o.max=Math.max(a.max,o.max),0!==a.min&&(o.minNotZero=Math.min(a.min,o.minNotZero)));o.min=j.isFinite(o.min)?o.min:null,o.max=j.isFinite(o.max)?o.max:null,o.minNotZero=j.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Aa(e.min,t.min),t.max=Aa(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(wa(t.min))-1),t.max=Math.pow(10,Math.floor(wa(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(wa(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(wa(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(wa(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,a=!t.isHorizontal(),n={min:Aa(e.min),max:Aa(e.max)},i=t.ticks=function(t,e){var a,n,i=[],r=Sa(t.min,Math.pow(10,Math.floor(wa(e.min)))),o=Math.floor(wa(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(a=Math.floor(wa(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,a)),i.push(r),r=n*Math.pow(10,a)):(a=Math.floor(wa(r)),n=Math.floor(r/Math.pow(10,a)));
vendor: 5,405 bytes, line 1
1var l=a<0?Math.pow(10,Math.abs(a)):1;do{i.push(r),10==++n&&(n=1,l=++a>=0?1:l),r=Math.round(n*Math.pow(10,a)*l)/l}while(a<o||a===o&&n<s);var d=Sa(t.max,r);return i.push(d),i}(n,t);t.max=j.max(i),t.min=j.min(i),e.reverse?(a=!a,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),a&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),pa.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(wa(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,a=0;pa.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),a=Sa(t.options.ticks.fontSize,E.global.defaultFontSize)/t._length),t._startValue=wa(e),t._valueOffset=a,t._valueRange=(wa(t.max)-wa(e))/(1-a)},getPixelForValue:function(t){var e=this,a=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(a=(wa(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(a)},getValueForPixel:function(t){var e=this,a=e.getDecimalForPixel(t);return 0===a&&0===e.min?0:Math.pow(10,e._startValue+(a-e._valueOffset)*e._valueRange)}});Ma._defaults=ka;var Pa=j.valueOrDefault,Da=j.valueAtIndexOrDefault,Ia=j.options.resolve,Oa={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:ta.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Fa(t){var e=t.ticks;return e.display&&t.display?Pa(e.fontSize,E.global.defaultFontSize)+2*e.backdropPaddingY:0}function Ta(t,e,a){return j.isArray(a)?{w:j.longestText(t,t.font,a),h:a.length*e}:{w:t.measureText(a).width,h:e}}function La(t,e,a,n,i){return t===n||t===i?{start:e-a/2,end:e+a/2}:t<n||t>i?{start:e-a,end:e}:{start:e,end:e+a}}function Ba(t){return 0===t||180===t?"center":t<180?"left":"right"}function Na(t,e,a,n){var i,r,o=a.y+n/2;if(j.isArray(e))for(i=0,r=e.length;i<r;++i)t.fillText(e[i],a.x,o),o+=n;else t.fillText(e,a.x,o)}function Ea(t,e,a){90===t||270===t?a.y-=e.h/2:(t>270||t<90)&&(a.y-=e.h)}function Ra(t){return j.isNumber(t)?t:0}var za=ba.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Fa(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,a=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;j.each(e.data.datasets,function(i,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);j.each(i.data,function(e,i){var r=+t.getRightValue(e);isNaN(r)||o.data[i].hidden||(a=Math.min(r,a),n=Math.max(r,n))})}}),t.min=a===Number.POSITIVE_INFINITY?0:a,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Fa(this.options))},convertTicksToLabels:function(){var t=this;ba.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=j.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,a,n,i=j.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=i.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(e=0;e<s;e++){n=t.getPointPosition(e,t.drawingArea+5),a=Ta(t.ctx,i.lineHeight,t.pointLabels[e]),t._pointLabelSizes[e]=a;var l=t.getIndexAngle(e),d=j.toDegrees(l)%360,h=La(d,n.x,a.w,0,180),c=La(d,n.y,a.h,90,270);h.start<r.l&&(r.l=h.start,o.l=l),h.end>r.r&&(r.r=h.end,o.r=l),c.start<r.t&&(r.t=c.start,o.t=l),c.end>r.b&&(r.b=c.end,o.b=l)}t.setReductions(t.drawingArea,r,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,a){var n=this,i=e.l/Math.sin(a.l),r=Math.max(e.r-n.width,0)/Math.sin(a.r),o=-e.t/Math.cos(a.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(a.b);i=Ra(i),r=Ra(r),o=Ra(o),s=Ra(s),n.drawingArea=Math.min(Math.floor(t-(i+r)/2),Math.floor(t-(o+s)/2)),n.setCenterPoint(i,r,o,s)},setCenterPoint:function(t,e,a,n){var i=this,r=a+i.drawingArea,o=i.height-i.paddingTop-n-i.drawingArea;i.xCenter=Math.floor((t+i.drawingArea+(i.width-e-i.drawingArea))/2+i.left),i.yCenter=Math.floor((r+o)/2+i.top+i.paddingTop)},getIndexAngle:function(t){var e=this.chart,a=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(a<0?a+360:a)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(j.isNullOrUndef(t))return NaN;var a=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*a:(t-e.min)*a},getPointPosition:function(t,e){var a=this,n=a.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+a.xCenter,y:Math.sin(n)*e+a.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,a=e.min,n=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:a<0&&n<0?n:a>0&&n>0?a:0)}
1,_drawGrid:function(){var t,e,a,n=this,i=n.ctx,r=n.options,o=r.gridLines,s=r.angleLines,l=Pa(s.lineWidth,o.lineWidth),d=Pa(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,a=t.options,n=a.pointLabels,i=Fa(a),r=t.getDistanceFromCenterForValue(a.ticks.reverse?t.min:t.max),o=j.options._parseFont(n);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=t.getPointPosition(s,r+(0===s?i/2:0)+5),d=Da(n.fontColor,s,E.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=j.toDegrees(h);e.textAlign=Ba(c),Ea(c,t._pointLabelSizes[s],l),Na(e,t.pointLabels[s],l,o.lineHeight)}e.restore()}(n),o.display&&j.each(n.ticks,function(t,a){0!==a&&(e=n.getDistanceFromCenterForValue(n.ticksAsNumbers[a]),function(t,e,a,n){var i,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Da(e.color,n-1),d=Da(e.lineWidth,n-1);if((o||s)&&l&&d){if(r.save(),r.strokeStyle=l,r.lineWidth=d,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI);else{i=t.getPointPosition(0,a),r.moveTo(i.x,i.y);for(var h=1;h<s;h++)i=t.getPointPosition(h,a),r.lineTo(i.x,i.y)}r.closePath(),r.stroke(),r.restore()}}(n,o,e,a))}),s.display&&l&&d){for(i.save(),i.lineWidth=l,i.strokeStyle=d,i.setLineDash&&(i.setLineDash(Ia([s.borderDash,o.borderDash,[]])),i.lineDashOffset=Ia([s.borderDashOffset,o.borderDashOffset,0])),t=n.chart.data.labels.length-1;t>=0;t--)e=n.getDistanceFromCenterForValue(r.ticks.reverse?n.min:n.max),a=n.getPointPosition(t,e),i.beginPath(),i.moveTo(n.xCenter,n.yCenter),i.lineTo(a.x,a.y),i.stroke();i.restore()}},_drawLabels:function(){var t=this,e=t.ctx,a=t.options.ticks;if(a.display){var n,i,r=t.getIndexAngle(0),o=j.options._parseFont(a),s=Pa(a.fontColor,E.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",j.each(t.ticks,function(r,l){0===l&&!a.reverse||(n=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),a.showLabelBackdrop&&(i=e.measureText(r).width,e.fillStyle=a.backdropColor,e.fillRect(-i/2-a.backdropPaddingX,-n-o.size/2-a.backdropPaddingY,i+2*a.backdropPaddingX,o.size+2*a.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-n))}),e.restore()}},_drawTitle:j.noop});za._defaults=Oa;var Va=j._deprecated,Wa=j.options.resolve,ja=j.valueOrDefault,Ha=Number.MIN_SAFE_INTEGER||-9007199254740991,Ua=Number.MAX_SAFE_INTEGER||9007199254740991,qa={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}},Ga=Object.keys(qa);function Ya(t,e){return t-e}function Xa(t){return j.valueOrDefault(t.time.min,t.ticks.min)}function $a(t){return j.valueOrDefault(t.time.max,t.ticks.max)}function Ka(t,e,a,n){var i=function(t,e,a){for(var n,i,r,o=0,s=t.length-1;o>=0&&o<=s;){if(r=t[n=o+s>>1],!(i=t[n-1]||null))return{lo:null,hi:r};if(r[e]<a)o=n+1;else{if(!(i[e]>a))return{lo:i,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,a),r=i.lo?i.hi?i.lo:t[t.length-2]:t[0],o=i.lo?i.hi?i.hi:t[t.length-1]:t[1],s=o[e]-r[e];return r[n]+(o[n]-r[n])*(s?(a-r[e])/s:0)}function Za(t,e){var a=t._adapter,n=t.options.time,i=n.parser,r=i||n.format,o=e;return"function"==typeof i&&(o=i(o)),j.isFinite(o)||(o="string"==typeof r?a.parse(o,r):a.parse(o)),null!==o?+o:(!i&&"function"==typeof r&&(o=r(e),j.isFinite(o)||(o=a.parse(o))),o)}function Ja(t,e){if(j.isNullOrUndef(e))return null;var a=t.options.time,n=Za(t,t.getRightValue(e));return null===n||a.round&&(n=+t._adapter.startOf(n,a.round)),n}function Qa(t,e,a,n){var i,r,o=Ga.length;for(i=Ga.indexOf(t);i<o-1;++i)if((r=qa[Ga[i]]).common&&Math.ceil((a-e)/((r.steps?r.steps:Ua)*r.size))<=n)return Ga[i];return Ga[o-1]}function tn(t,e,a){var n,i,r=[],o={},s=e.length;for(n=0;n<s;++n)o[i=e[n]]=n,r.push({value:i,major:!1});return 0!==s&&a?function(t,e,a,n){var i,r,o=t._adapter,s=+o.startOf(e[0].value,n),l=e[e.length-1].value;for(i=s;i<=l;i=+o.add(i,1,n))(r=a[i])>=0&&(e[r].major=!0);return e}(t,r,o,a):r}var en=pa.extend({initialize:function(){this.mergeTicksOptions(),pa.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,a=e.time||(e.time={}),n=t._adapter=new Qe._date(e.adapters.date);
1return Va("time scale",a.format,"time.format","time.parser"),Va("time scale",a.min,"time.min","ticks.min"),Va("time scale",a.max,"time.max","ticks.max"),j.mergeIf(a.displayFormats,n.formats()),pa.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),pa.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,a,n,i,r,o,s=this,l=s.chart,d=s._adapter,h=s.options,c=h.time.unit||"day",u=Ua,g=Ha,p=[],f=[],m=[],v=s._getLabels();for(t=0,a=v.length;t<a;++t)m.push(Ja(s,v[t]));for(t=0,a=(l.data.datasets||[]).length;t<a;++t)if(l.isDatasetVisible(t))if(j.isObject((i=l.data.datasets[t].data)[0]))for(f[t]=[],e=0,n=i.length;e<n;++e)r=Ja(s,i[e]),p.push(r),f[t][e]=r;else f[t]=m.slice(0),o||(p=p.concat(m),o=!0);else f[t]=[];m.length&&(u=Math.min(u,m[0]),g=Math.max(g,m[m.length-1])),p.length&&(p=a>1?function(t){var e,a,n,i={},r=[];for(e=0,a=t.length;e<a;++e)i[n=t[e]]||(i[n]=!0,r.push(n));return r}(p).sort(Ya):p.sort(Ya),u=Math.min(u,p[0]),g=Math.max(g,p[p.length-1])),u=Ja(s,Xa(h))||u,g=Ja(s,$a(h))||g,u=u===Ua?+d.startOf(Date.now(),c):u,g=g===Ha?+d.endOf(Date.now(),c)+1:g,s.min=Math.min(u,g),s.max=Math.max(u+1,g),s._table=[],s._timestamps={data:p,datasets:f,labels:m}},buildTicks:function(){var t,e,a,n=this,i=n.min,r=n.max,o=n.options,s=o.ticks,l=o.time,d=n._timestamps,h=[],c=n.getLabelCapacity(i),u=s.source,g=o.distribution;for(d="data"===u||"auto"===u&&"series"===g?d.data:"labels"===u?d.labels:function(t,e,a,n){var i,r=t._adapter,o=t.options,s=o.time,l=s.unit||Qa(s.minUnit,e,a,n),d=Wa([s.stepSize,s.unitStepSize,1]),h="week"===l&&s.isoWeekday,c=e,u=[];if(h&&(c=+r.startOf(c,"isoWeek",h)),c=+r.startOf(c,h?"day":l),r.diff(a,e,l)>1e5*d)throw e+" and "+a+" are too far apart with stepSize of "+d+" "+l;for(i=c;i<a;i=+r.add(i,d,l))u.push(i);return(i===a||"ticks"===o.bounds)&&u.push(i),u}(n,i,r,c),"ticks"===o.bounds&&d.length&&(i=d[0],r=d[d.length-1]),i=Ja(n,Xa(o))||i,r=Ja(n,$a(o))||r,t=0,e=d.length;t<e;++t)(a=d[t])>=i&&a<=r&&h.push(a);return n.min=i,n.max=r,n._unit=l.unit||(s.autoSkip?Qa(l.minUnit,n.min,n.max,c):function(t,e,a,n,i){var r,o;for(r=Ga.length-1;r>=Ga.indexOf(a);r--)if(qa[o=Ga[r]].common&&t._adapter.diff(i,n,o)>=e-1)return o;return Ga[a?Ga.indexOf(a):0]}(n,h.length,l.minUnit,n.min,n.max)),n._majorUnit=s.major.enabled&&"year"!==n._unit?function(t){for(var e=Ga.indexOf(t)+1,a=Ga.length;e<a;++e)if(qa[Ga[e]].common)return Ga[e]}(n._unit):void 0,n._table=function(t,e,a,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:a,pos:1}];var i,r,o,s,l,d=[],h=[e];for(i=0,r=t.length;i<r;++i)(s=t[i])>e&&s<a&&h.push(s);for(h.push(a),i=0,r=h.length;i<r;++i)l=h[i+1],s=h[i],(void 0===(o=h[i-1])||void 0===l||Math.round((l+o)/2)!==s)&&d.push({time:s,pos:i/(r-1)});return d}(n._timestamps.data,i,r,g),n._offsets=function(t,e,a,n,i){var r,o,s=0,l=0;return i.offset&&e.length&&(r=Ka(t,"time",e[0],"pos"),s=1===e.length?1-r:(Ka(t,"time",e[1],"pos")-r)/2,o=Ka(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-Ka(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(n._table,h,0,0,o),s.reverse&&h.reverse(),tn(n,h,n._majorUnit)},getLabelForIndex:function(t,e){var a=this,n=a._adapter,i=a.chart.data,r=a.options.time,o=i.labels&&t<i.labels.length?i.labels[t]:"",s=i.datasets[e].data[t];return j.isObject(s)&&(o=a.getRightValue(s)),r.tooltipFormat?n.format(Za(a,o),r.tooltipFormat):"string"==typeof o?o:n.format(Za(a,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,a,n){var i=this,r=i.options,o=r.time.displayFormats,s=i._majorUnit,l=o[s],d=a[e],h=r.ticks,c=s&&l&&d&&d.major,u=i._adapter.format(t,n||(c?l:o[i._unit])),g=c?h.major:h.minor,p=Wa([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(u,e,a):u},convertTicksToLabels:function(t){var e,a,n=[];for(e=0,a=t.length;e<a;++e)n.push(this.tickFormatFunction(t[e].value,e,t));return n},getPixelForOffset:function(t){var e=this,a=e._offsets,n=Ka(e._table,"time",t,"pos");return e.getPixelForDecimal((a.start+n)*a.factor)},getPixelForValue:function(t,e,a){var n=this,i=null;if(void 0!==e&&void 0!==a&&(i=n._timestamps.datasets[a][e]),null===i&&(i=Ja(n,t)),null!==i)return n.getPixelForOffset(i)},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,a=e._offsets,n=e.getDecimalForPixel(t)/a.factor-a.end,i=Ka(e._table,"pos",n,"time");return e._adapter._create(i)},_getLabelSize:function(t){var e=this,a=e.options.ticks,n=e.ctx.measureText(t).width,i=j.toRadians(e.isHorizontal()?a.maxRotation:a.minRotation),r=Math.cos(i),o=Math.sin(i),s=ja(a.fontSize,E.global.defaultFontSize);return{w:n*r+s*o,h:n*o+s*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,a=e.options.time,n=a.displayFormats,i=n[a.unit]||n.millisecond,r=e.tickFormatFunction(t,0,tn(e,[t],e._majorUnit),i),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}});en._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var an={category:ma,linear:Ca,logarithmic:Ma,radialLinear:za,time:en},nn={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"};Qe._date.override("function"==typeof t?{_id:"moment",formats:function(){return nn},parse:function(e,a){return"string"==typeof e&&"string"==typeof a?e=t(e,a):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,a){return t(e).format(a)},add:function(e,a,n){return t(e).add(a,n).valueOf()},diff:function(e,a,n){return t(e).diff(t(a),n)},startOf:function(e,a,n){return e=t(e),"isoWeek"===a?e.isoWeekday(n).valueOf():e.startOf(a).valueOf()},endOf:function(e,a){return t(e).endOf(a).valueOf()},_create:function(e){return t(e)}}:{}),E._set("global",{plugins:{filler:{propagate:!0}}});
vendor: 11,697 bytes, line 1
1var rn={dataset:function(t){var e=t.fill,a=t.chart,n=a.getDatasetMeta(e),i=n&&a.isDatasetVisible(e)&&n.dataset._children||[],r=i.length||0;return r?function(t,e){return e<r&&i[e]._view||null}:null},boundary:function(t){var e=t.boundary,a=e?e.x:null,n=e?e.y:null;return j.isArray(e)?function(t,a){return e[a]}:function(t){return{x:null===a?t.x:a,y:null===n?t.y:n}}}};function on(t,e,a){var n,i=t._model||{},r=i.fill;if(void 0===r&&(r=!!i.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(n=parseFloat(r,10),isFinite(n)&&Math.floor(n)===n)return("-"===r[0]||"+"===r[0])&&(n=e+n),!(n===e||n<0||n>=a)&&n;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function sn(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,a,n,i,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,d=t.fill,h=[];if(!l)return null;for(a=s.ticks.reverse?o.min:o.max,n=o.getPointPositionForValue(0,e=s.ticks.reverse?o.max:o.min),i=0;i<l;++i)r="start"===d||"end"===d?o.getPointPositionForValue(i,"start"===d?e:a):o.getBasePosition(i),s.gridLines.circular&&(r.cx=n.x,r.cy=n.y,r.angle=o.getIndexAngle(i)-Math.PI/2),h.push(r);return h}(t):function(t){var e,a=t.el._model||{},n=t.el._scale||{},i=t.fill,r=null;if(isFinite(i))return null;if("start"===i?r=void 0===a.scaleBottom?n.bottom:a.scaleBottom:"end"===i?r=void 0===a.scaleTop?n.top:a.scaleTop:void 0!==a.scaleZero?r=a.scaleZero:n.getBasePixel&&(r=n.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(j.isFinite(r))return{x:(e=n.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function ln(t,e,a){var n,i=t[e].fill,r=[e];if(!a)return i;for(;!1!==i&&-1===r.indexOf(i);){if(!isFinite(i))return i;if(!(n=t[i]))return!1;if(n.visible)return i;r.push(i),i=n.fill}return!1}function dn(t){var e=t.fill,a="dataset";return!1===e?null:(isFinite(e)||(a="boundary"),rn[a](t))}function hn(t){return t&&!t.skip}function cn(t,e,a,n,i){var r,o,s,l;if(n&&i){for(t.moveTo(e[0].x,e[0].y),r=1;r<n;++r)j.canvas.lineTo(t,e[r-1],e[r]);if(void 0!==a[0].angle){for(o=a[0].cx,s=a[0].cy,l=Math.sqrt(Math.pow(a[0].x-o,2)+Math.pow(a[0].y-s,2)),r=i-1;r>0;--r)t.arc(o,s,l,a[r].angle,a[r-1].angle,!0);return}for(t.lineTo(a[i-1].x,a[i-1].y),r=i-1;r>0;--r)j.canvas.lineTo(t,a[r],a[r-1],!0)}}function un(t,e,a,n,i,r){var o,s,l,d,h,c,u,g,p=e.length,f=n.spanGaps,m=[],v=[],b=0,y=0;for(t.beginPath(),o=0,s=p;o<s;++o)h=a(d=e[l=o%p]._view,l,n),c=hn(d),u=hn(h),r&&void 0===g&&c&&(s=p+(g=o+1)),c&&u?(b=m.push(d),y=v.push(h)):b&&y&&(f?(c&&m.push(d),u&&v.push(h)):(cn(t,m,v,b,y),b=y=0,m=[],v=[]));cn(t,m,v,b,y),t.closePath(),t.fillStyle=i,t.fill()}var gn={id:"filler",afterDatasetsUpdate:function(t,e){var a,n,i,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;n<o;++n)r=null,(i=(a=t.getDatasetMeta(n)).dataset)&&i._model&&i instanceof _t.Line&&(r={visible:t.isDatasetVisible(n),fill:on(i,n,o),chart:t,el:i}),a.$filler=r,l.push(r);for(n=0;n<o;++n)(r=l[n])&&(r.fill=ln(l,n,s),r.boundary=sn(r),r.mapper=dn(r))},beforeDatasetsDraw:function(t){var e,a,n,i,r,o,s,l=t._getSortedVisibleDatasetMetas(),d=t.ctx;for(a=l.length-1;a>=0;--a)(e=l[a].$filler)&&e.visible&&(r=(n=e.el)._children||[],s=(i=n._view).backgroundColor||E.global.defaultColor,(o=e.mapper)&&s&&r.length&&(j.canvas.clipArea(d,t.chartArea),un(d,r,o,i,s,n._loop),j.canvas.unclipArea(d)))}},pn=j.rtl.getRtlAdapter,fn=j.noop,mn=j.valueOrDefault;function vn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}E._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var a=e.datasetIndex,n=this.chart,i=n.getDatasetMeta(a);i.hidden=null===i.hidden?!n.data.datasets[a].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,a=t.options.legend||{},n=a.labels&&a.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(a){var i=a.controller.getStyle(n?0:void 0);return{text:e[a.index].label,fillStyle:i.backgroundColor,hidden:!t.isDatasetVisible(a.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:a.index}},this)}}},legendCallback:function(t){var e,a,n,i=document.createElement("ul"),r=t.data.datasets;for(i.setAttribute("class",t.id+"-legend"),e=0,a=r.length;e<a;e++)(n=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&n.appendChild(document.createTextNode(r[e].label));return i.outerHTML}});var bn=X.extend({initialize:function(t){var e=this;j.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:fn,update:function(t,e,a){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=a,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:fn,beforeSetDimensions:fn,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:fn,beforeBuildLabels:fn,buildLabels:function(){var t=this,e=t.options.labels||{},a=j.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(a=a.filter(function(a){return e.filter(a,t.chart.data)})),t.options.reverse&&a.reverse(),t.legendItems=a},afterBuildLabels:fn,beforeFit:fn,fit:function(){var t=this,e=t.options,a=e.labels,n=e.display,i=t.ctx,r=j.options._parseFont(a),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n){if(i.font=r.string,d){var h=t.lineWidths=[0],c=0;i.textAlign="left",i.textBaseline="middle",j.each(t.legendItems,function(t,e){var n=vn(a,o)+o/2+i.measureText(t.text).width;(0===e||h[h.length-1]+n+2*a.padding>l.width)&&(c+=o+a.padding,h[h.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:n,height:o},h[h.length-1]+=n+a.padding}),l.height+=c}else{var u=a.padding,g=t.columnWidths=[],p=t.columnHeights=[],f=a.padding,m=0,v=0;j.each(t.legendItems,function(t,e){var n=vn(a,o)+o/2+i.measureText(t.text).width;e>0&&v+o+2*u>l.height&&(f+=m+a.padding,g.push(m),p.push(v),m=0,v=0),m=Math.max(m,n),v+=o+u,s[e]={left:0,top:0,width:n,height:o}}),f+=m,g.push(m),p.push(v),l.width+=f}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:fn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,a=e.labels,n=E.global,i=n.defaultColor,r=n.elements.line,o=t.height,s=t.columnHeights,l=t.width,d=t.lineWidths;if(e.display){var h,c=pn(e.rtl,t.left,t.minSize.width),u=t.ctx,g=mn(a.fontColor,n.defaultFontColor),p=j.options._parseFont(a),f=p.size;u.textAlign=c.textAlign("left"),u.textBaseline="middle",u.lineWidth=.5,u.strokeStyle=g,u.fillStyle=g,u.font=p.string;var m=vn(a,f),v=t.legendHitBoxes,b=function(t,n){switch(e.align){case"start":return a.padding;case"end":return t-n;default:return(t-n+a.padding)/2}},y=t.isHorizontal();h=y?{x:t.left+b(l,d[0]),y:t.top+a.padding,line:0}:{x:t.left+a.padding,y:t.top+b(o,s[0]),line:0},j.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=f+a.padding;j.each(t.legendItems,function(e,n){var g=u.measureText(e.text).width,p=m+f/2+g,_=h.x,C=h.y;c.setWidth(t.minSize.width),y?n>0&&_+p+a.padding>t.left+t.minSize.width&&(C=h.y+=x,h.line++,_=h.x=t.left+b(l,d[h.line])):n>0&&C+x>t.top+t.minSize.height&&(_=h.x=_+t.columnWidths[h.line]+a.padding,h.line++,C=h.y=t.top+b(o,s[h.line]));var S=c.x(_);(function(t,e,n){if(!(isNaN(m)||m<=0)){u.save();var o=mn(n.lineWidth,r.borderWidth);if(u.fillStyle=mn(n.fillStyle,i),u.lineCap=mn(n.lineCap,r.borderCapStyle),u.lineDashOffset=mn(n.lineDashOffset,r.borderDashOffset),u.lineJoin=mn(n.lineJoin,r.borderJoinStyle),u.lineWidth=o,u.strokeStyle=mn(n.strokeStyle,i),u.setLineDash&&u.setLineDash(mn(n.lineDash,r.borderDash)),a&&a.usePointStyle){var s=m*Math.SQRT2/2,l=c.xPlus(t,m/2);j.canvas.drawPoint(u,n.pointStyle,s,l,e+f/2,n.rotation)}else u.fillRect(c.leftForLtr(t,m),e,m,f),0!==o&&u.strokeRect(c.leftForLtr(t,m),e,m,f);u.restore()}})(S,C,e),v[n].left=c.leftForLtr(S,v[n].width),v[n].top=C,function(t,e,a,n){var i=f/2,r=c.xPlus(t,m+i),o=e+i;u.fillText(a.text,r,o),a.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(r,o),u.lineTo(c.xPlus(r,n),o),u.stroke())}(S,C,e,g),y?h.x+=p+a.padding:h.y+=x}),j.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var a,n,i,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(i=r.legendHitBoxes,a=0;a<i.length;++a)if(t>=(n=i[a]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return r.legendItems[a];return null},handleEvent:function(t){var e,a=this,n=a.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!n.onHover&&!n.onLeave)return}else{if("click"!==i)return;if(!n.onClick)return}e=a._getLegendItemAt(t.x,t.y),"click"===i?e&&n.onClick&&n.onClick.call(a,t.native,e):(n.onLeave&&e!==a._hoveredItem&&(a._hoveredItem&&n.onLeave.call(a,t.native,a._hoveredItem),a._hoveredItem=e),n.onHover&&e&&n.onHover.call(a,t.native,e))}});function yn(t,e){var a=new bn({ctx:t.ctx,options:e,chart:t});ue.configure(t,a,e),ue.addBox(t,a),t.legend=a}var xn={id:"legend",_element:bn,beforeInit:function(t){var e=t.options.legend;e&&yn(t,e)},beforeUpdate:function(t){var e=t.options.legend,a=t.legend;e?(j.mergeIf(e,E.global.legend),a?(ue.configure(t,a,e),a.options=e):yn(t,e)):a&&(ue.removeBox(t,a),delete t.legend)},afterEvent:function(t,e){var a=t.legend;a&&a.handleEvent(e)}},_n=j.noop;E._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Cn=X.extend({initialize:function(t){j.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:_n,update:function(t,e,a){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=a,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:_n,beforeSetDimensions:_n,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:_n,beforeBuildLabels:_n,buildLabels:_n,afterBuildLabels:_n,beforeFit:_n,fit:function(){var t,e=this,a=e.options,n=e.minSize={},i=e.isHorizontal();a.display?(t=(j.isArray(a.text)?a.text.length:1)*j.options._parseFont(a).lineHeight+2*a.padding,e.width=n.width=i?e.maxWidth:t,e.height=n.height=i?t:e.maxHeight):e.width=n.width=e.height=n.height=0},afterFit:_n,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,a=t.options;if(a.display){var n,i,r,o=j.options._parseFont(a),s=o.lineHeight,l=s/2+a.padding,d=0,h=t.top,c=t.left,u=t.bottom,g=t.right;e.fillStyle=j.valueOrDefault(a.fontColor,E.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(i=c+(g-c)/2,r=h+l,n=g-c):(i="left"===a.position?c+l:g-l,r=h+(u-h)/2,n=u-h,d=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(i,r),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var p=a.text;if(j.isArray(p))for(var f=0,m=0;m<p.length;++m)e.fillText(p[m],0,f,n),f+=s;else e.fillText(p,0,0,n);
1e.restore()}}});function Sn(t,e){var a=new Cn({ctx:t.ctx,options:e,chart:t});ue.configure(t,a,e),ue.addBox(t,a),t.titleBlock=a}var wn={},kn=gn,An=xn,Mn={id:"title",_element:Cn,beforeInit:function(t){var e=t.options.title;e&&Sn(t,e)},beforeUpdate:function(t){var e=t.options.title,a=t.titleBlock;e?(j.mergeIf(e,E.global.title),a?(ue.configure(t,a,e),a.options=e):Sn(t,e)):a&&(ue.removeBox(t,a),delete t.titleBlock)}};for(var Pn in wn.filler=kn,wn.legend=An,wn.title=Mn,Ke.helpers=j,function(){function t(t,e,a){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[a])):n=t,n}function e(t){return null!=t&&"none"!==t}function a(a,n,i){var r=document.defaultView,o=j._getParentNode(a),s=r.getComputedStyle(a)[n],l=r.getComputedStyle(o)[n],d=e(s),h=e(l),c=Number.POSITIVE_INFINITY;return d||h?Math.min(d?t(s,a,i):c,h?t(l,o,i):c):"none"}j.where=function(t,e){if(j.isArray(t)&&Array.prototype.filter)return t.filter(e);var a=[];return j.each(t,function(t){e(t)&&a.push(t)}),a},j.findIndex=Array.prototype.findIndex?function(t,e,a){return t.findIndex(e,a)}:function(t,e,a){a=void 0===a?t:a;for(var n=0,i=t.length;n<i;++n)if(e.call(a,t[n],n,t))return n;return-1},j.findNextWhere=function(t,e,a){j.isNullOrUndef(a)&&(a=-1);for(var n=a+1;n<t.length;n++){var i=t[n];if(e(i))return i}},j.findPreviousWhere=function(t,e,a){j.isNullOrUndef(a)&&(a=t.length);for(var n=a-1;n>=0;n--){var i=t[n];if(e(i))return i}},j.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},j.almostEquals=function(t,e,a){return Math.abs(t-e)<a},j.almostWhole=function(t,e){var a=Math.round(t);return a-e<=t&&a+e>=t},j.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},j.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},j.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},j.toRadians=function(t){return t*(Math.PI/180)},j.toDegrees=function(t){return t*(180/Math.PI)},j._decimalPlaces=function(t){if(j.isFinite(t)){for(var e=1,a=0;Math.round(t*e)/e!==t;)e*=10,a++;return a}},j.getAngleFromPoint=function(t,e){var a=e.x-t.x,n=e.y-t.y,i=Math.sqrt(a*a+n*n),r=Math.atan2(n,a);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:i}},j.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},j.aliasPixel=function(t){return t%2==0?0:.5},j._alignPixel=function(t,e,a){var n=t.currentDevicePixelRatio,i=a/2;return Math.round((e-i)*n)/n+i},j.splineCurve=function(t,e,a,n){var i=t.skip?e:t,r=e,o=a.skip?e:a,s=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),d=s/(s+l),h=l/(s+l),c=n*(d=isNaN(d)?0:d),u=n*(h=isNaN(h)?0:h);return{previous:{x:r.x-c*(o.x-i.x),y:r.y-c*(o.y-i.y)},next:{x:r.x+u*(o.x-i.x),y:r.y+u*(o.y-i.y)}}},j.EPSILON=Number.EPSILON||1e-14,j.splineCurveMonotone=function(t){var e,a,n,i,r,o,s,l,d,h=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),c=h.length;for(e=0;e<c;++e)if(!(n=h[e]).model.skip){if(a=e>0?h[e-1]:null,(i=e<c-1?h[e+1]:null)&&!i.model.skip){var u=i.model.x-n.model.x;n.deltaK=0!==u?(i.model.y-n.model.y)/u:0}n.mK=!a||a.model.skip?n.deltaK:!i||i.model.skip?a.deltaK:this.sign(a.deltaK)!==this.sign(n.deltaK)?0:(a.deltaK+n.deltaK)/2}for(e=0;e<c-1;++e)if(i=h[e+1],!(n=h[e]).model.skip&&!i.model.skip){if(j.almostEquals(n.deltaK,0,this.EPSILON)){n.mK=i.mK=0;continue}r=n.mK/n.deltaK,o=i.mK/n.deltaK,!((l=Math.pow(r,2)+Math.pow(o,2))<=9)&&(s=3/Math.sqrt(l),n.mK=r*s*n.deltaK,i.mK=o*s*n.deltaK)}for(e=0;e<c;++e)!(n=h[e]).model.skip&&(i=e<c-1?h[e+1]:null,(a=e>0?h[e-1]:null)&&!a.model.skip&&(n.model.controlPointPreviousX=n.model.x-(d=(n.model.x-a.model.x)/3),n.model.controlPointPreviousY=n.model.y-d*n.mK),i&&!i.model.skip&&(n.model.controlPointNextX=n.model.x+(d=(i.model.x-n.model.x)/3),n.model.controlPointNextY=n.model.y+d*n.mK))},j.nextItem=function(t,e,a){return a?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},j.previousItem=function(t,e,a){return a?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},j.niceNum=function(t,e){var a=Math.floor(j.log10(t)),n=t/Math.pow(10,a);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,a)},j.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)},j.getRelativePosition=function(t,e){var a,n,i=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=i.touches;s&&s.length>0?(a=s[0].clientX,n=s[0].clientY):(a=i.clientX,n=i.clientY);var l=parseFloat(j.getStyle(r,"padding-left")),d=parseFloat(j.getStyle(r,"padding-top")),h=parseFloat(j.getStyle(r,"padding-right")),c=parseFloat(j.getStyle(r,"padding-bottom")),u=o.bottom-o.top-d-c;return{x:a=Math.round((a-o.left-l)/(o.right-o.left-l-h)*r.width/e.currentDevicePixelRatio),y:n=Math.round((n-o.top-d)/u*r.height/e.currentDevicePixelRatio)}},j.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},j.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},j._calculatePadding=function(t,e,a){return(e=j.getStyle(t,e)).indexOf("%")>-1?a*parseInt(e,10)/100:parseInt(e,10)},j._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},j.getMaximumWidth=function(t){var e=j._getParentNode(t);if(!e)return t.clientWidth;var a=e.clientWidth,n=a-j._calculatePadding(e,"padding-left",a)-j._calculatePadding(e,"padding-right",a),i=j.getConstraintWidth(t);return isNaN(i)?n:Math.min(n,i)},j.getMaximumHeight=function(t){var e=j._getParentNode(t);if(!e)return t.clientHeight;var a=e.clientHeight,n=a-j._calculatePadding(e,"padding-top",a)-j._calculatePadding(e,"padding-bottom",a),i=j.getConstraintHeight(t);return isNaN(i)?n:Math.min(n,i)},j.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},j.retinaScale=function(t,e){var a=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==a){var n=t.canvas,i=t.height,r=t.width;n.height=i*a,n.width=r*a,t.ctx.scale(a,a),!n.style.height&&!n.style.width&&(n.style.height=i+"px",n.style.width=r+"px")}},j.fontString=function(t,e,a){return e+" "+t+"px "+a},j.longestText=function(t,e,a,n){var i=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var o,s,l,d,h,c=0,u=a.length;for(o=0;o<u;o++)if(null!=(d=a[o])&&!0!==j.isArray(d))c=j.measureText(t,i,r,c,d);else if(j.isArray(d))for(s=0,l=d.length;s<l;s++)null!=(h=d[s])&&!j.isArray(h)&&(c=j.measureText(t,i,r,c,h));var g=r.length/2;if(g>a.length){for(o=0;o<g;o++)delete i[r[o]];r.splice(0,g)}return c},j.measureText=function(t,e,a,n,i){var r=e[i];return r||(r=e[i]=t.measureText(i).width,a.push(i)),r>n&&(n=r),n},j.numberOfLabelLines=function(t){var e=1;return j.each(t,function(t){j.isArray(t)&&t.length>e&&(e=t.length)}),e},j.color=_?function(t){return t instanceof CanvasGradient&&(t=E.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},j.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:j.color(t).saturate(.5).darken(.1).rgbString()}}(),Ke._adapters=Qe,Ke.Animation=K,Ke.animationService=Z,Ke.controllers=Kt,Ke.DatasetController=at,Ke.defaults=E,Ke.Element=X,Ke.elements=_t,Ke.Interaction=ne,Ke.layouts=ue,Ke.platform=De,Ke.plugins=Ie,Ke.Scale=pa,Ke.scaleService=Oe,Ke.Ticks=ta,Ke.Tooltip=We,Ke.helpers.each(an,function(t,e){Ke.scaleService.registerScaleType(e,t,t._defaults)}),wn)wn.hasOwnProperty(Pn)&&Ke.plugins.register(wn[Pn]);Ke.platform.initialize();var Dn=Ke;return"undefined"!=typeof window&&(window.Chart=Ke),Ke.Chart=Ke,Ke.Legend=wn.legend._element,Ke.Title=wn.title._element,Ke.pluginService=Ke.plugins,Ke.PluginBase=Ke.Element.extend({}),Ke.canvasHelpers=Ke.helpers.canvas,Ke.layoutService=Ke.layouts,Ke.LinearScaleBase=ba,Ke.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Ke[t]=function(e,a){return new Ke(e,Ke.helpers.merge(a||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Dn}(function(){try{return a(2281)}catch(t){}}())},33360:function(t,e,a){"use strict";a.d(e,{G:function(){return p}});var n=a(53882),i=a(76491),r=a(45871),o=a(33927),s=a(18293),l=a(92340),d=a(90326),h=a(2316),c=a(83315),u=a(85991);const g=l.N.serverURL;let p=(()=>{class t{constructor(t,e,a,n){this.http=t,this.toastr=e,this._utilityService=a,this.spinner=n,this.editServiceProviderSub=new i.X(null),this._editServiceProviderObservable=this.editServiceProviderSub.asObservable()}setEditServiceProvider(t){this.editServiceProviderSub.next(t)}addServiceProvider(t){return this.http.post(g+"/admin/addServiceProvider",t)}listServiceProvider(t){return this.spinner.show(),this.http.post(g+"/admin/get/serviceproviders",t).pipe((0,o.U)(t=>{var e=[];return 1==t.success?(t.data.forEach((t,a)=>{e.push({_id:null==t?void 0:t._id,companyName:(null==t?void 0:t.companyName)||(null==t?void 0:t.ownerName),totalOngoing:null==t?void 0:t.totalOngoing,avgRating:(null==t?void 0:t.avgRating)?Number(null==t?void 0:t.avgRating).toFixed(2):0,categorieName:this.checkIsArrayOrObject(null==t?void 0:t.catagories),createdAt_Local:this._utilityService.formatDate(t.createdAt_Local),numberWithCode:null==t?void 0:t.numberWithCode,ownerName:null==t?void 0:t.ownerName,isActive:null==t?void 0:t.isActive})}),this.spinner.hide()):(this.spinner.hide(),e=[]),this.spinner.hide(),{data:e,totalCount:t.totalCount}}),(0,s.K)(t=>(this.spinner.hide(),(0,r._)(t))))}checkIsArrayOrObject(t){return Array.isArray(t)?t.map(t=>t.catagorieName):t.catagorieName}getMainCategories(){return this.http.post(g+"/user/getMainCatagories",{}).pipe((0,o.U)(t=>t),(0,s.K)(t=>(0,r._)("Something went wrong!")))}viewServiceProvider(t){return this.spinner.show(),this.http.post(g+"/admin/view-serviceProvider",t).pipe((0,o.U)(t=>(this.spinner.hide(),t)),(0,s.K)(t=>(this.spinner.hide(),(0,r._)(t))))}editServiceProvider(t){return this.http.post(g+"/admin/updateServiceProvider",t)}checkBranchAssignedToStaff(t){return this.http.post(g+"/admin/check-staff-branches",t)}statusToggle(t){return this.http.post(`${g}/admin/status-toggle`,t).pipe((0,o.U)(t=>t),(0,s.K)(t=>(this.spinner.hide(),(0,r._)(t))))}addServicesOnBehalfOfSPA(t){return this.http.post(g+"/admin/on-behalf-of-spa-add-category",t)}viewCategory(t){return this.http.post(g+"/admin/view-category",t)}viewUpdatedCategory(t){return this.http.post(g+"/admin/view-updated-category",t)}addCategorySPA(t){return this.http.post(g+"/serviceProviderAdmin/ad
1d/Services",t)}viewCategorySPA(t){return this.http.post(g+"/serviceProviderAdmin/view-category",t)}editCategorySPA(t){return new n.WM({"Content-Type":"application/x-www-form-urlencoded"}),this.http.post(g+"/serviceProviderAdmin/edit-category",t)}viewSpaCategory(t){return this.http.post(g+"/admin/view-spa-category",t)}getOtherServices(t){return this.http.post(g+"/serviceProviderAdmin/get-other-services",t)}approveDeclineRequest(t){return this.http.post(g+"/admin/approve-decline-service-provider",t)}listServiceProviderFilter(t){return this.http.post(g+"/admin/get/serviceproviders-filter",t).pipe((0,o.U)(t=>{var e=[];return 1==t.success?t.data.forEach((t,a)=>{e.push({_id:null==t?void 0:t._id,companyName:(null==t?void 0:t.companyName)||(null==t?void 0:t.ownerName),totalOngoing:null==t?void 0:t.totalOngoing,avgRating:(null==t?void 0:t.avgRating)?Number(null==t?void 0:t.avgRating).toFixed(2):0,categorieName:this.checkIsArrayOrObject(null==t?void 0:t.catagories),createdAt_Local:this._utilityService.formatDate(t.createdAt_Local),numberWithCode:null==t?void 0:t.numberWithCode,ownerName:null==t?void 0:t.ownerName,isActive:null==t?void 0:t.isActive})}):e=[],{data:e,totalCount:t.totalCount}}))}checkChildCategoryExistValidatorSPA(t){return this.http.post(g+"/serviceProviderAdmin/category-validator",t)}categoryListing(t){return this.http.post(g+"/admin/get-all-category-list",t).pipe((0,o.U)(t=>t),(0,s.K)(t=>(0,r._)("Something went wrong!")))}addServicesSPASignUp(t){return this.http.post(g+"/auth/spa-add-category",t)}spaSignUp(t){return this.http.post(g+"/auth/spa-sign-up",t)}}return t.\u0275fac=function(e){return new(e||t)(h.\u0275\u0275inject(n.eN),h.\u0275\u0275inject(c._W),h.\u0275\u0275inject(d.t),h.\u0275\u0275inject(u.t2))},t.\u0275prov=h.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},29903:function(t,e,a){"use strict";a.r(e),a.d(e,{DashboardModule:function(){return $}});var n=a(54364),i=a(55187),r=a(35209),o=a(72213),s=a(41674),l=a(92340),d=a(33927),h=a(18293),c=a(76491),u=a(45871),g=a(2316),p=a(53882),f=a(85991),m=a(83315);const v=l.N.serverURL;let b=(()=>{class t{constructor(t,e,a){this.http=t,this.spinner=e,this.toastr=a,this._country=new c.X(""),this._getCountry=this._country.asObservable(),this._countryDetails=new c.X({}),this._getCountryDetails=this._countryDetails.asObservable(),this._getSAbarChart=new c.X({}),this._getSAbarLables=new c.X({}),this._getSABarChartObserver=this._getSAbarChart.asObservable(),this._getSABarCharLablesObserver=this._getSAbarLables.asObservable(),this._getSPABarChart=new c.X({}),this._getSPABarChartLabel=new c.X({}),this._getSPABarChartObserver=this._getSPABarChart.asObservable(),this._getSPABarChartLabelObserver=this._getSPABarChartLabel.asObservable(),this._getSPAPolarChart=new c.X({}),this._getSPAPolarChartLabel=new c.X({}),this._getSPAPolarChartObserver=this._getSPAPolarChart.asObservable(),this._getSPAPolarChartLabelObserver=this._getSPAPolarChartLabel.asObservable(),this._getSARevenueSummaryChart=new c.X({}),this._getSARevenueSummaryLables=new c.X({}),this._getSARevenueSummaryChartObserver=this._getSARevenueSummaryChart.asObservable(),this._getSARevenueSummaryCharLablesObserver=this._getSARevenueSummaryLables.asObservable(),this._getSAAdvertisementChart=new c.X({}),this._getSAAdvertisementLables=new c.X({}),this._getSAAdvertisementChartObserver=this._getSAAdvertisementChart.asObservable(),this._getSAAdvertisementCharLablesObserver=this._getSAAdvertisementLables.asObservable(),this._advertisersPolarGraphDetails=new c.X({}),this._getAdvertisersPolarGraphObserver=this._advertisersPolarGraphDetails.asObservable(),this._advertisersPaymentGraphDetailsLables=new c.X({}),this._getAdvertisersPaymentGraphLablesObserver=this._advertisersPaymentGraphDetailsLables.asObservable(),this._advertisersPaymentGraphDetailsChart=new c.X({}),this._getAdvertisersPaymentGraphChartObserver=this._advertisersPaymentGraphDetailsChart.asObservable()}setCountry(t){this._country.next(t)}setCountryDetails(t){this._countryDetails.next(t)}setSAbarData(t,e){this._getSAbarChart.next(t),this._getSAbarLables.next(e)}setSARevenueSummaryData(t,e){this._getSARevenueSummaryChart.next(t),this._getSARevenueSummaryLables.next(e)}setSAAdvertisementData(t){this._getSAAdvertisementChart.next(t)}setSPABarChartData(t,e){this._getSPABarChart.next(t),this._getSPABarChartLabel.next(e)}setSPAPolarChartData(t,e){this._getSPAPolarChart.next(t),this._getSPAPolarChartLabel.next(e)}getSABarCount(t){return this.spinner.show(),this.http.post(`${v}/admin/get-bar-graph-data`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}pageAnalyser(t){return this.spinner.show(),this.http.post(`${v}/admin/dashboard/count`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}revenueSummary(t){return this.spinner.show(),this.http.post(`${v}/admin/dashboard/revenue-details`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}advertisements(t){return this.spinner.show(),this.http.post(`${v}/admin/dashboard/advertisement-details-aggregate`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}getSPABarCount(t){return this.spinner.show(),this.http.post(`${v}/serviceProviderAdmin/get-spa-bar-graph-data`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}getSPAPolarGraphCount(t){return this.spinner.show(),this.http.post(`${v}/serviceProviderAdmin/get-service-request-graph-data`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}spaPageAnalyser(t){return this.spinner.show(),this.http.post(`${v}/serviceProviderAdmin/dashboard/count`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}
1setAdvertiserPolarGraphData(t,e,a){this._advertisersPolarGraphDetails.next({data:t,label:e,color:a})}getAdvertiserPolarGraphCount(t){return this.spinner.show(),this.http.post(`${v}/advertiser/dashboard/advertisement-pie-chart-details`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}setAdvertiserPaymentGraphData(t,e){this._advertisersPaymentGraphDetailsChart.next(t),this._advertisersPaymentGraphDetailsLables.next(e)}getAdvertiserPaymentGraph(t){return this.spinner.show(),this.http.post(`${v}/advertiser/dashboard/advertiser-payment-chart`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}transactionSummary(t){return this.spinner.show(),this.http.post(`${v}/admin/dashboard/get-transaction-summary`,t).pipe((0,d.U)(t=>(this.spinner.hide(),t)),(0,h.K)(t=>(this.spinner.hide(),(0,u._)(t))))}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275inject(p.eN),g.\u0275\u0275inject(f.t2),g.\u0275\u0275inject(m._W))},t.\u0275prov=g.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var y=a(68944),x=a(70325),_=a(10234),C=a(62652),S=a(33360);function w(t,e){if(1&t){const t=g.\u0275\u0275getCurrentView();g.\u0275\u0275elementStart(0,"button",11),g.\u0275\u0275listener("click",function(){const e=g.\u0275\u0275restoreView(t).$implicit;return g.\u0275\u0275nextContext().onFilterValueChange(e)}),g.\u0275\u0275text(1),g.\u0275\u0275elementEnd()}if(2&t){const t=e.$implicit;g.\u0275\u0275advance(1),g.\u0275\u0275textInterpolate1(" ",t.displayName," ")}}function k(t,e){if(1&t){const t=g.\u0275\u0275getCurrentView();g.\u0275\u0275elementStart(0,"button",11),g.\u0275\u0275listener("click",function(){const e=g.\u0275\u0275restoreView(t).$implicit;return g.\u0275\u0275nextContext().onCategoryChange(e)}),g.\u0275\u0275text(1),g.\u0275\u0275elementEnd()}if(2&t){const t=e.$implicit,a=g.\u0275\u0275nextContext();g.\u0275\u0275advance(1),g.\u0275\u0275textInterpolate1(" ","en"===a.language?t.catagorieName:t.arCatagoryName?t.arCatagoryName:t.catagorieName," ")}}let A=(()=>{class t{constructor(t,e,a,n){this.spService=t,this.dashboardService=e,this.translateService=a,this.authService=n,this.datasetip=[{label:"ACTIVE",borderColor:"#42f5ec",backgroundColor:"#42f5ec",lineTension:0,fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]},{label:"EXPIRED",borderColor:"#f54254",lineTension:0,backgroundColor:"#f54254",fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]},{label:"APPROVED",borderColor:"#f59642",lineTension:0,backgroundColor:"#f59642",fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]},{label:"INPROGRESS",borderColor:"#f542ef",backgroundColor:"#f542ef",lineTension:0,fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]}],this.legend=!0,this.chart=null,this.filterValues=[{name:"week",displayName:"Week"},{name:"month",displayName:"1 Month"},{name:"3months",displayName:"3 Months"},{name:"6months",displayName:"6 Months"},{name:"12months",displayName:"12 Months"}],this.selectedFilterValue=this.filterValues[4],this.language=this.authService.getLanguage(),this.setNames(),this.translateService.onLangChange.subscribe(t=>{this.setNames()}),this.dashboardService._getCountryDetails.subscribe(t=>{console.log("dashboardService._getCountry",t),this.countryChanges=t.name.split("(")[0].trim(),this.countryChanges&&this.getAdvertisement()}),this.dashboardService._getSAAdvertisementChartObserver.subscribe(t=>{var e;console.log("========================_getSAAdvertisementChartObserver======================",t.activeAdvertisementCount),this.datasetip[0].data=null==t?void 0:t.activeAdvertisementCount,this.datasetip[1].data=null==t?void 0:t.expiredAdvertisementCount,this.datasetip[2].data=null==t?void 0:t.approvedAdvertisementCount,this.datasetip[3].data=null==t?void 0:t.requestedAdvertisementCount,console.log("datasetip",this.datasetip),this.labelsip=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.labelWithFormat,this.renderChart()})}setNames(){this.datasetip=[{label:this.translateService.instant("page.active"),borderColor:"#42f5ec",backgroundColor:"#42f5ec",lineTension:0,fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]},{label:this.translateService.instant("page.expired"),borderColor:"#f54254",lineTension:0,backgroundColor:"#f54254",fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]}
1,{label:this.translateService.instant("page.approved"),borderColor:"#f59642",lineTension:0,backgroundColor:"#f59642",fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]},{label:this.translateService.instant("page.inprogress"),borderColor:"#f542ef",backgroundColor:"#f542ef",lineTension:0,fill:!1,data:[0,0,0,0,0,0,0,0,0,0,0,0]}]}ngOnInit(){this.filterValues=[{name:"week",displayName:this.translateService.instant("page.week")},{name:"month",displayName:this.translateService.instant("page.onemonth")},{name:"3months",displayName:this.translateService.instant("page.threemonths")},{name:"6months",displayName:this.translateService.instant("page.sixmonths")},{name:"12months",displayName:this.translateService.instant("page.twelvemonths")}],this.selectedFilterValue=this.filterValues[4],this.translateService.onLangChange.subscribe(t=>{this.filterValues=[{name:"week",displayName:this.translateService.instant("page.week")},{name:"month",displayName:this.translateService.instant("page.onemonth")},{name:"3months",displayName:this.translateService.instant("page.threemonths")},{name:"6months",displayName:this.translateService.instant("page.sixmonths")},{name:"12months",displayName:this.translateService.instant("page.twelvemonths")}],this.selectedFilterValue=Object.assign(Object.assign({},this.filterValues[4]),{displayName:this.translateService.instant("page.twelvemonths")})}),this.getAllCategories(),this.getAdvertisement()}renderChart(){this.chart&&this.chart.destroy(),C.defaults.global.animation.duration=3e3,this.chart=new C("line",{type:"line",data:{labels:this.labelsip,datasets:this.datasetip},options:{legend:{display:this.legend,position:"bottom",labels:{usePointStyle:!0}}}})}getAdvertisement(){this.SArevenueSummarySubscription=this.dashboardService.advertisements({roleName:"superadmin",country:this.countryChanges?this.countryChanges:"",filtertype:this.selectedFilterValue?this.selectedFilterValue.name:"",categoryId:this.selectedCategory?this.selectedCategory._id:""}).subscribe(t=>{var e,a,n,i,r;t.success?(this.sendData=null==t?void 0:t.data,this.sendlabels=null==t?void 0:t.data.sendlabels,this.dashboardService.setSAAdvertisementData(this.sendData),this.datasetip[0].data=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.activeAdvertisementCount,this.datasetip[1].data=null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.expiredAdvertisementCount,this.datasetip[2].data=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.approvedAdvertisementCount,this.datasetip[3].data=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.requestedAdvertisementCount,this.labelsip=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.labelWithFormat,this.renderChart()):(this.sendData=[],this.sendlabels=[],this.dashboardService.setSAAdvertisementData(this.sendData))},t=>{this.sendData=[],this.sendlabels=[],this.dashboardService.setSAAdvertisementData(this.sendData)})}getAllCategories(){this.categorySubscription=this.spService.categoryListing().subscribe(t=>{this.categories=t},t=>{})}onFilterValueChange(t){this.selectedFilterValue=t,this.getAdvertisement()}onCategoryChange(t){this.selectedCategory=t,this.getAdvertisement()}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275directiveInject(S.G),g.\u0275\u0275directiveInject(b),g.\u0275\u0275directiveInject(x.sK),g.\u0275\u0275directiveInject(s.e))},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-line-chart"]],inputs:{backgroundColorip:"backgroundColorip",datasetip:"datasetip",labelsip:"labelsip",barChartTitle:"barChartTitle",legend:"legend"},decls:22,vars:9,consts:[[1,"main-container"],[1,"line-title"],[1,"filters"],[1,"col"],["ngbDropdown","",1,"d-inline-block"],["id","dropdownBasic1","ngbDropdownToggle","",1,"btn","btn-custom"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],[3,"hidden"],["id","line","width","900","height","600",1,""],["id","animationProgress","max","1","value","0",2,"width","100%"],[1,"dropdown-item",3,"click"]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275elementStart(2,"span"),g.\u0275\u0275text(3),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(4,"div",2),g.\u0275\u0275elementStart(5,"div",3),g.\u0275\u0275elementStart(6,"div",4),g.\u0275\u0275elementStart(7,"button",5),g.\u0275\u0275text(8),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(9,"div",6),g.\u0275\u0275template(10,w,2,1,"button",7),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(11,"div",3),g.\u0275\u0275elementStart(12,"div",4),g.\u0275\u0275elementStart(13,"button",5),g.\u0275\u0275text(14),g.\u0275\u0275pipe(15,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(16,"div",6),g.\u0275\u0275template(17,k,2,1,"button",7),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(18,"div",8),g.\u0275\u0275elementStart(19,"canvas",9),g.\u0275\u0275text(20),g.\u0275\u0275elementEnd(),g.\u0275\u0275element(21,"progress",10),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t&&(g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate1(" ",e.barChartTitle," "),g.\u0275\u0275advance(5),g.\u0275\u0275textInterpolate1(" ",e.selectedFilterValue?e.selectedFilterValue.displayName:"Filter"," "),g.\u0275\u0275advance(2),g.\u0275\u0275property("ngForOf",e.filterValues),g.\u0275\u0275advance(4),g.\u0275\u0275textInterpolate1(" ",e.selectedCategory?e.selectedCategory.catagorieName:g.\u0275\u0275pipeBind1(15,7,"page.category")," "),g.\u0275\u0275advance(3),g.\u0275\u0275property("ngForOf",e.categories),g.\u0275\u0275advance(1),g.\u0275\u0275property("hidden",!e.chart),g.\u0275\u0275advance(2),g.\u0275\u0275textInterpolate(e.chart))},directives:[_.jt,_.iD,_.Vi,n.sg],pipes:[x.X$],styles:[".main-container[_ngcontent-%COMP%]{height:100%!important;padding:20px!important}.line-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600;display:flex;justify-content:space-between}.line-title[_ngcontent-%COMP%] .filters[_ngcontent-%COMP%]{display:flex}.dropdown-menu[_ngcontent-%COMP%]{width:100%!important;box-shadow:0 1px 2px rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15);max-height:200px;overflow:scroll}.dropdown-item[_ngcontent-%COMP%]{color:#000!important}
1.btn-custom[_ngcontent-%COMP%]{min-width:200px;border:1px solid #2632386b!important}"]}),t})(),M=(()=>{class t{constructor(t,e){this.dashboardService=t,this.authService=e,this.legend=!1,this.chart=null,console.log("lthis.abelsip",this.labelsip),console.log("this.legend",this.legend),console.log("this.barChartTitle",this.barChartTitle),this.role=this.authService.getPersonId(),"1"==this.role&&(this.dashboardService._getSABarChartObserver.subscribe(t=>{this.datasetip=t,this.renderChart()}),this.dashboardService._getSABarCharLablesObserver.subscribe(t=>{this.labelsip=t,this.renderChart()})),"2"==this.role&&(this.dashboardService._getSPABarChartObserver.subscribe(t=>{this.datasetip=t,this.renderChart()}),this.dashboardService._getSPABarChartLabelObserver.subscribe(t=>{this.labelsip=t,this.renderChart(),console.log("this.labelsip",this.labelsip)}))}ngOnInit(){this.renderChart()}renderChart(){this.chart&&this.chart.destroy(),C.Chart.defaults.global.animation.duration=3e3,this.chart=new C.Chart("canvas",{type:"bar",data:{labels:this.labelsip,datasets:this.datasetip},options:{scales:{yAxes:[{ticks:{beginAtZero:!0,callback:function(t,e,a){if(Math.floor(t)===t)return t},autoSkip:!0,maxTicksLimit:6},gridLines:{display:!0,drawBorder:!0}}],xAxes:[{gridLines:{display:!0,drawBorder:!0}}]},legend:{display:this.legend,position:"bottom",labels:{usePointStyle:!0}}}})}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275directiveInject(b),g.\u0275\u0275directiveInject(s.e))},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-bar-chart"]],inputs:{datasetip:"datasetip",labelsip:"labelsip",barChartTitle:"barChartTitle",legend:"legend"},decls:7,vars:3,consts:[[1,"main-container"],[1,"bar-title"],[3,"hidden"],["id","canvas","width","900","height","600",1,""]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275elementStart(2,"span"),g.\u0275\u0275text(3),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(4,"div",2),g.\u0275\u0275elementStart(5,"canvas",3),g.\u0275\u0275text(6),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t&&(g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate1(" ",e.barChartTitle," "),g.\u0275\u0275advance(1),g.\u0275\u0275property("hidden",!e.chart),g.\u0275\u0275advance(2),g.\u0275\u0275textInterpolate(e.chart))},styles:[".main-container[_ngcontent-%COMP%]{height:100%!important;padding:20px!important}.bar-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}"]}),t})();function P(t,e){if(1&t&&(g.\u0275\u0275elementStart(0,"div",3),g.\u0275\u0275elementStart(1,"div",4),g.\u0275\u0275elementStart(2,"div",5),g.\u0275\u0275elementStart(3,"h2",6),g.\u0275\u0275text(4),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(5,"h6",7),g.\u0275\u0275text(6),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t){const t=e.$implicit;g.\u0275\u0275advance(1),g.\u0275\u0275styleProp("background-color",t.color),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(t.value),g.\u0275\u0275advance(2),g.\u0275\u0275textInterpolate(t.title)}}let D=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-pa"]],inputs:{data:"data"},decls:3,vars:1,consts:[[1,"sub-container"],[1,"custom-card"],["class","card radius",4,"ngFor","ngForOf"],[1,"card","radius"],[1,"card-body"],[1,"align-self-center"],[1,"count-props"],[1,"title-props","m-b-0"]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275template(2,P,7,4,"div",2),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t&&(g.\u0275\u0275advance(2),g.\u0275\u0275property("ngForOf",e.data))},directives:[n.sg],styles:[".custom-card[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.card-body[_ngcontent-%COMP%]{border-radius:5px}.radius[_ngcontent-%COMP%]{border-radius:5px;width:20%}.radius[_ngcontent-%COMP%] .color-card1[_ngcontent-%COMP%]{background-color:#2c92df;border-radius:5px}.radius[_ngcontent-%COMP%] .color-card2[_ngcontent-%COMP%]{background-color:#f8993c;border-radius:5px}.radius[_ngcontent-%COMP%] .color-card3[_ngcontent-%COMP%]{background-color:#cc27dc;border-radius:5px}.radius[_ngcontent-%COMP%] .color-card4[_ngcontent-%COMP%]{background-color:#46dc95;border-radius:5px}.radius[_ngcontent-%COMP%] .count-props[_ngcontent-%COMP%]{font-size:30px;font-weight:600;color:#fff;text-align:center}.radius[_ngcontent-%COMP%] .title-props[_ngcontent-%COMP%]{color:#fff;text-align:center}.sub-container[_ngcontent-%COMP%]{background-color:#fff;width:100%}
1.card[_ngcontent-%COMP%]{margin-bottom:0!important;margin-right:10px}"]}),t})(),I=(()=>{class t{constructor(t){this.dashboardService=t,this.chart=null,t._getSARevenueSummaryChartObserver.subscribe(t=>{this.dataip=t,this.renderChart()}),t._getSARevenueSummaryCharLablesObserver.subscribe(t=>{this.labelsip=t,this.renderChart()})}ngOnInit(){}renderChart(){this.chart&&this.chart.destroy(),this.data={labels:this.labelsip,datasets:[{label:"Dataset 1",data:this.dataip,backgroundColor:this.backgroundColorip}]},this.chart=new C.Chart("pie",{type:"pie",data:this.data,options:{responsive:!0,legend:{position:"right",labels:{usePointStyle:!0}}}})}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275directiveInject(b))},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-pie-chart"]],inputs:{backgroundColorip:"backgroundColorip",dataip:"dataip",labelsip:"labelsip"},decls:7,vars:4,consts:[[1,"main-container"],[1,"pie-title"],["id","pie","width","900","height","380",1,"my-4","w-100"]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275elementStart(2,"span"),g.\u0275\u0275text(3),g.\u0275\u0275pipe(4,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(5,"canvas",2),g.\u0275\u0275text(6),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t&&(g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate1(" ",g.\u0275\u0275pipeBind1(4,2,"page.revenuesummary")," "),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(e.chart))},pipes:[x.X$],styles:[".main-container[_ngcontent-%COMP%]{height:100%!important;padding:20px!important}.pie-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}"]}),t})(),O=(()=>{class t{constructor(t,e){this.dashboardService=t,this.authService=e,this.chart=null,this.role=this.authService.getPersonId(),"2"==this.role&&(this.dashboardService._getSPAPolarChartObserver.subscribe(t=>{this.datasetip=t,this.renderChart()}),this.dashboardService._getSPAPolarChartLabelObserver.subscribe(t=>{this.labelsip=t,this.renderChart()})),"3"==this.role&&this.dashboardService._getAdvertisersPolarGraphObserver.subscribe(t=>{this.datasetip=null==t?void 0:t.data,this.labelsip=null==t?void 0:t.label,this.backgroundColorip=null==t?void 0:t.color,this.renderChart()})}ngOnInit(){this.renderChart()}renderChart(){this.data={labels:this.labelsip,datasets:[{label:"Dataset 1",data:this.datasetip,backgroundColor:this.backgroundColorip}]},this.chart&&this.chart.destroy(),C.defaults.global.animation.duration=2e3,this.chart=new C("polarArea",{type:"polarArea",data:this.data,options:{responsive:!0,legend:{position:"right",labels:{usePointStyle:!0}},scale:{display:!1,ticks:{display:!1,maxTicksLimit:1}}}})}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275directiveInject(b),g.\u0275\u0275directiveInject(s.e))},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-polar-area-chart"]],inputs:{backgroundColorip:"backgroundColorip",datasetip:"datasetip",labelsip:"labelsip",polarTitle:"polarTitle"},decls:6,vars:2,consts:[[1,"main-container"],[1,"polar-title"],["id","polarArea","width","900","height","380",1,"my-4","w-100"]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275elementStart(2,"span"),g.\u0275\u0275text(3),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(4,"canvas",2),g.\u0275\u0275text(5),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t&&(g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate1(" ",e.polarTitle," "),g.\u0275\u0275advance(2),g.\u0275\u0275textInterpolate(e.chart))},styles:[".main-container[_ngcontent-%COMP%]{height:100%!important;padding:20px!important}.polar-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}"]}),t})();function F(t,e){1&t&&g.\u0275\u0275elementContainer(0)}function T(t,e){if(1&t){const t=g.\u0275\u0275getCurrentView();g.\u0275\u0275elementStart(0,"div",10),g.\u0275\u0275template(1,F,1,0,"ng-container",9),g.\u0275\u0275elementStart(2,"input",11),g.\u0275\u0275listener("hasError",function(e){return g.\u0275\u0275restoreView(t),g.\u0275\u0275nextContext().hasError(e)})("intlTelInputObject",function(e){return g.\u0275\u0275restoreView(t),g.\u0275\u0275nextContext().telInputObject(e)})("countryChange",function(e){return g.\u0275\u0275restoreView(t),g.\u0275\u0275nextContext().onCountryChange(e)}
1),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()}if(2&t){const t=g.\u0275\u0275nextContext();g.\u0275\u0275advance(1),g.\u0275\u0275property("ngIf",t.initialCountryFlag&&t.selectedCountry),g.\u0275\u0275advance(1),g.\u0275\u0275property("ng2TelInputOptions",t.initialCountryFlag)("value",t.selectedCountry)}}function L(t,e){if(1&t){const t=g.\u0275\u0275getCurrentView();g.\u0275\u0275elementStart(0,"button",12),g.\u0275\u0275listener("click",function(){const e=g.\u0275\u0275restoreView(t).$implicit;return g.\u0275\u0275nextContext().onFilterValueChange(e)}),g.\u0275\u0275text(1),g.\u0275\u0275elementEnd()}if(2&t){const t=e.$implicit;g.\u0275\u0275advance(1),g.\u0275\u0275textInterpolate1(" ",t.displayName," ")}}function B(t,e){if(1&t&&(g.\u0275\u0275elementStart(0,"div",21),g.\u0275\u0275elementStart(1,"div",22),g.\u0275\u0275elementStart(2,"span"),g.\u0275\u0275text(3),g.\u0275\u0275pipe(4,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(5,"div",23),g.\u0275\u0275elementStart(6,"span"),g.\u0275\u0275text(7),g.\u0275\u0275pipe(8,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(9,"span",24),g.\u0275\u0275text(10),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(11,"div",23),g.\u0275\u0275elementStart(12,"span"),g.\u0275\u0275text(13),g.\u0275\u0275pipe(14,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(15,"span",24),g.\u0275\u0275text(16),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(17,"div",23),g.\u0275\u0275elementStart(18,"span"),g.\u0275\u0275text(19),g.\u0275\u0275pipe(20,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(21,"span",24),g.\u0275\u0275text(22),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(g.\u0275\u0275pipeBind1(4,7,"page.transactionsummary")),g.\u0275\u0275advance(4),g.\u0275\u0275textInterpolate(g.\u0275\u0275pipeBind1(8,9,"page.transaction")),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(t.transactionData[0].value),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(g.\u0275\u0275pipeBind1(14,11,"page.paid")),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(t.transactionData[1].value),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(g.\u0275\u0275pipeBind1(20,13,"page.revenue")),g.\u0275\u0275advance(3),g.\u0275\u0275textInterpolate(t.transactionData[2].value)}}function N(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275element(1,"app-bar-chart",25),g.\u0275\u0275pipe(2,"translate"),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("datasetip",t.datasetBarChart)("labelsip",t.labelsBarChart)("legend",!0)("barChartTitle",g.\u0275\u0275pipeBind1(2,4,"page.count"))}}function E(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275element(1,"app-pa",26),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("data",t.pageAnalyserSuperAdmin)}}function R(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275element(1,"app-pie-chart",27),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("backgroundColorip",t.bgColors)("dataip",t.sendData)("labelsip",t.sendlabels)}}function z(t,e){1&t&&g.\u0275\u0275elementContainer(0)}function V(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275elementStart(1,"div",13),g.\u0275\u0275elementStart(2,"div",14),g.\u0275\u0275elementStart(3,"div",15),g.\u0275\u0275template(4,B,23,15,"div",16),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(5,"div",17),g.\u0275\u0275template(6,N,3,6,"ng-container",9),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(7,"div",18),g.\u0275\u0275template(8,E,2,1,"ng-container",9),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(9,"div",13),g.\u0275\u0275elementStart(10,"div",19),g.\u0275\u0275template(11,R,2,3,"ng-container",9),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(12,"div",19),g.\u0275\u0275template(13,z,1,0,"ng-container",9),g.\u0275\u0275element(14,"app-line-chart",20),g.\u0275\u0275pipe(15,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext();g.\u0275\u0275advance(4),g.\u0275\u0275property("ngIf",t.transactionData),g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf",t.labelsBarChart&&t.datasetBarChart),g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf",t.pageAnalyserSuperAdmin),g.\u0275\u0275advance(3),g.\u0275\u0275property("ngIf",t.sendData.length>0),g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf",t.lineChartData),g.\u0275\u0275advance(1),g.\u0275\u0275property("barChartTitle",g.\u0275\u0275pipeBind1(15,9,"page.advertisements"))("backgroundColorip",t.bgColorsPieChart2)("dataip",t.lineChartData)("labelsip",t.lineChartL
1abelsip)}}function W(t,e){if(1&t&&(g.\u0275\u0275elementStart(0,"div",18),g.\u0275\u0275element(1,"app-pa",26),g.\u0275\u0275elementEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("data",t.pageAnalyserSpa)}}function j(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275element(1,"app-bar-chart",25),g.\u0275\u0275pipe(2,"translate"),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("datasetip",t.SPAdatasetBarChart)("labelsip",t.SPAlabelsBarChart)("legend",!1)("barChartTitle",g.\u0275\u0275pipeBind1(2,4,"page.bookings"))}}function H(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275element(1,"app-polar-area-chart",29),g.\u0275\u0275pipe(2,"translate"),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275advance(1),g.\u0275\u0275property("backgroundColorip",t.bgColorsPolar)("dataip",t.sendDataPolar)("labelsip",t.sendlabelsPolar)("polarTitle",g.\u0275\u0275pipeBind1(2,4,"page.servicerequests"))}}function U(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275elementStart(1,"div",15),g.\u0275\u0275template(2,W,2,1,"div",28),g.\u0275\u0275elementStart(3,"div",13),g.\u0275\u0275elementStart(4,"div",19),g.\u0275\u0275template(5,j,3,6,"ng-container",9),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(6,"div",19),g.\u0275\u0275template(7,H,3,6,"ng-container",9),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext();g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf",t.pageAnalyserSpa),g.\u0275\u0275advance(3),g.\u0275\u0275property("ngIf",t.SPAlabelsBarChart&&t.SPAdatasetBarChart),g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf",t.sendDataPolar&&t.sendlabelsPolar)}}function q(t,e){if(1&t&&(g.\u0275\u0275element(0,"app-bar-chart",25),g.\u0275\u0275pipe(1,"translate")),2&t){const t=g.\u0275\u0275nextContext(2);g.\u0275\u0275property("datasetip",t.AdSPAdatasetBarChart)("labelsip",t.AdSPAlabelsBarChart)("legend",!1)("barChartTitle",g.\u0275\u0275pipeBind1(1,4,"page.payments"))}}function G(t,e){if(1&t&&(g.\u0275\u0275elementContainerStart(0),g.\u0275\u0275elementStart(1,"div",30),g.\u0275\u0275elementStart(2,"div",19),g.\u0275\u0275element(3,"app-polar-area-chart",29),g.\u0275\u0275pipe(4,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(5,"div",19),g.\u0275\u0275template(6,q,2,6,"app-bar-chart",31),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementContainerEnd()),2&t){const t=g.\u0275\u0275nextContext();g.\u0275\u0275advance(3),g.\u0275\u0275property("backgroundColorip",t.AdbgColorsPolar)("dataip",t.AdsendDataPolar)("labelsip",t.AdsendlabelsPolar)("polarTitle",g.\u0275\u0275pipeBind1(4,5,"page.advertisements")),g.\u0275\u0275advance(3),g.\u0275\u0275property("ngIf",t.AdSPAlabelsBarChart&&t.AdSPAdatasetBarChart)}}const Y=[{path:"",pathMatch:"full",component:(()=>{class t{constructor(t,e,a,n,i){this.authService=t,this.dashboardService=e,this.messagingService=a,this.router=n,this.translateService=i,this.countryNameFilter="Jordan",this.bgColors=["#FF0000","#FFE5E5","#FFCDCD","#FF8F8F"],this.sendData=[],this.sendlabels=[],this.lineChartData=[],this.pageAnalyserSuperAdmin=[],this.pageAnalyserSpa=[],this.datasetBarChart=[{label:"Users",backgroundColor:"#7C86AA",data:[1,27,34,12,20,32,36,59]},{label:"Advertisers",backgroundColor:"#EB5757",data:[44,23,35,42,20,32,46,29]},{label:"Services",backgroundColor:"#BB6BD9",data:[337,23,64,30,33,32,36,29]},{label:"Service providers",backgroundColor:"#F2994A",data:[67,52,56,59,63,42,36,39]}],this.bgColorsPolar=["#0263FF","#FF7723","#8E30FF","#BC60E5","#8B1573"],this.SPAdatasetBarChart=[{data:[],backgroundColor:["#0263FF","#FF7723","#8E30FF","#8CBB3B"],borderWidth:0,barPercentage:.2,scaleSteps:30}],this.AdbgColorsPolar=["#0263FF","#FF7723","#8E30FF","#BC60E5","#8B1573"],this.AdsendDataPolar=[50,45,40,30,35],this.AdsendlabelsPolar=["Homepage","Cleaning","Plumbing","Electrical","Electronics"],this.AdSPAdatasetBarChart=[{data:[],backgroundColor:[],borderWidth:0,barPercentage:.2,scaleSteps:30}],this.selectedCountry="Country",this.filterValues=[],this.selectedFilterValue=this.filterValues[3],this.countryDetails={areaCodes:null,dialCode:"962",iso2:"jo",name:"Jordan (\u202b\u0627\u0644\u0623\u0631\u062f\u0646\u202c\u200e)",priority:0},this.initialCountryFlag={initialCountry:"jo"},this.userInfo=this.authService.getPersonData(),this.authService.getToken(),this.messagingService.getPermission().subscribe(t=>{console.log("=>(dashboard.component.ts:176) res",t),this.authService.setAlert("denied"!==t&&"granted"!==t)}),this.dashboardService._getCountryDetails.subscribe(t=>{(null==t?void 0:t.name)&&(this.countryDetails=t)})}ngOnInit(){this.filterValues=[{name:"7days",displayName:this.translateService.instant("page.lastsevendays")},{name:"month",displayName:this.translateService.instant("page.lastonemonth")},{name:"6month",displayName:this.translateService.instant("page.lastsixmonths")},{name:"5year",displayName:this.translateService.instant("page.lastfiveyears")}],this.datasetBarChart=[{label:this.translateService.instant("page.users"),backgroundColor:"#7C86AA",data:[1,27,34,12,20,32,36,59]},{label:this.translateService.instant("page.advertisers"),backgroundColor:"#EB5757",data:[44,23,35,42,20,32,46,29]},{label:this.translateService.instant("page.services"),backgroundColor:"#BB6BD9",data:[337,23,64,30,33,32,36,29]},{label:this.translateService.instant("page.serviceproviders"),backgroundColor:"#F2994A",data:[67,52,56,59,63,42,36,39]}],this.selectedFilterValue=this.filterValues[3],this.translateService.onLangChange.subscribe(t=>{this.filterValues=[{name:"7days",displayName:this.translateService.instant("page.lastsevendays")},{name:"month",displayName:this.translateService.instant("page.lastonemonth")},{name:"6month",displayName:this.translateService.instant("page.lastsixmonths")},{name:"5year",displayName:this.translateService.instant("page.lastfiveyears")}],this.datasetBarChart=[{label:this.translateService.instant("page.users"),backgroundColor:"#7C86AA",data:[1,27,34,12,20,32,36,59]},{label:this.translateService.instant("page.advertisers"),backgroundColor:"#EB5757",data:[44,23,35,42,20,32,46,29]},{label:this.translateService.instant("page.services"),backgroundColor:"#BB6BD9",data:[337,23,64,30,33,32,36,29]},{label:this.translateService.instant("page.serviceproviders"),backgroundColor:"#F2994A",data:[67,52,56,59,63,42,36,39]}],this.selectedFilterValue=Object.assign(Object.assign({},this.filterValues[3]),{displayName:this.translateService.instant("page.lastfiveyears")})});const t=this.authService.getToken();if(this.userDetails=this.authService.getPersonData(),this.accessModuleList=this.authService.getAccessModule(),console.log("accessModuleList",this.accessModuleList),this.accessModuleList){const t=this.accessModuleList.some(t=>"dashboard"===t.path);console.log("isDashboard:",t),t||this.router.navigate([`/${this.accessModuleList[0].path}`])}this.loggedInRole=this.authService.getPersonId(),4==this.loggedInRole&&this.router.navigate([`/${this.accessModuleList[0].path?this.accessModuleList[0].path:"dashboard"}`]),t&&this.currentToken&&this.addDeviceDetails(),this.role=this.authService.getPersonId(),this.getAdvertiserPaymentGraph(this.userDetails._id),("1"===this.role||"4"===this.role)&&(this.getSuperAdminBarCount(),this.pageAnalyser(),this.revenueSummary(),this.getTransactionSummary()),("2"===this.role||"5"===this.role)&&(this.getSPAbarCount(),this.get
1SPAPolarGraph(),this.spaPageAnalyser()),"3"===this.role&&this.getAdvertiserPolarGraph(),this.onCountryChange(this.countryDetails)}addDeviceDetails(){const t=this.authService.getToken(),e=this.authService.getPersonData(),a={language:"English",device:"",userType:"superadmin",accessToken:t,fcmTokenKey:this.currentToken,lastLoginDate:Date.now(),countryId:"610a795f460faaed8387d981",timezone:"",utcOffset:"",userId:e.data._id};this.authService.addDeviceDetails(a).subscribe(t=>{})}spaPageAnalyser(){this.SApageAnalyserSubscription=this.dashboardService.spaPageAnalyser({userId:this.userInfo.data._id,roleName:"spa",country:this.countryNameFilter,filtertype:this.selectedFilterValue.name}).subscribe(t=>{this.pageAnalyserSpa=t.data})}getSuperAdminBarCount(){this.SAbarCountSubscription=this.dashboardService.getSABarCount({filtertype:this.selectedFilterValue.name,country:this.countryNameFilter}).subscribe(t=>{const{users:e,advertiser:a,service:n,spa:i,labelWithFormat:r}=t.data;t&&(this.datasetBarChart[0].data=e,this.datasetBarChart[1].data=a,this.datasetBarChart[2].data=n,this.datasetBarChart[3].data=i,this.labelsBarChart=r,this.dashboardService.setSAbarData(this.datasetBarChart,this.labelsBarChart))},t=>{this.datasetBarChart[0].data=[],this.datasetBarChart[1].data=[],this.datasetBarChart[2].data=[],this.datasetBarChart[3].data=[],this.labelsBarChart=[],this.dashboardService.setSAbarData(this.datasetBarChart,this.labelsBarChart)})}pageAnalyser(){this.SApageAnalyserSubscription=this.dashboardService.pageAnalyser({roleName:"superadmin",country:this.countryNameFilter?this.countryNameFilter:"",filtertype:this.selectedFilterValue.name}).subscribe(t=>{this.pageAnalyserSuperAdmin=t.data})}revenueSummary(){this.SArevenueSummarySubscription=this.dashboardService.revenueSummary({roleName:"superadmin",country:this.countryNameFilter,filtertype:this.selectedFilterValue.name}).subscribe(t=>{t.success?(this.sendData=t.data.sendData,this.sendlabels=t.data.sendlabels,this.dashboardService.setSARevenueSummaryData(this.sendData,this.sendlabels)):(this.sendData=[],this.sendlabels=[],this.dashboardService.setSARevenueSummaryData(this.sendData,this.sendlabels))},t=>{this.sendData=[],this.sendlabels=[],this.dashboardService.setSARevenueSummaryData(this.sendData,this.sendlabels)})}getAdvertisement(){this.SArevenueSummarySubscription=this.dashboardService.advertisements({roleName:"superadmin",country:this.countryNameFilter,filtertype:"12months",categoryId:""}).subscribe(t=>{var e,a,n,i,r;t.success?(this.sendData=t.data,this.sendlabels=t.data.sendlabels,this.dashboardService.setSAAdvertisementData(this.sendData),this.lineChartData[0].data=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.activeAdvertisementCount,this.lineChartData[1].data=null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.expiredAdvertisementCount,this.lineChartData[2].data=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.approvedAdvertisementCount,this.lineChartData[0].data=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.requestedAdvertisementCount,this.lineChartLabelsip=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.labelWithFormat):(this.sendData=[],this.sendlabels=[],this.dashboardService.setSAAdvertisementData(this.sendData))},t=>{this.sendData=[],this.sendlabels=[],this.dashboardService.setSAAdvertisementData(this.sendData)})}getSPAbarCount(){this.SPAbarCountSubscription=this.dashboardService.getSPABarCount({userId:this.userInfo.data._id,filtertype:this.selectedFilterValue.name,country:this.countryNameFilter}).subscribe(t=>{this.SPAlabelsBarChart=t.label,this.SPAdatasetBarChart[0].data=t.dataSet,this.dashboardService.setSPABarChartData(this.SPAdatasetBarChart,this.SPAlabelsBarChart)})}getSPAPolarGraph(){this.SPAbarCountSubscription=this.dashboardService.getSPAPolarGraphCount({userId:this.userInfo.data._id,filtertype:this.selectedFilterValue.name,country:this.countryNameFilter}).subscribe(t=>{this.sendDataPolar=t.dataSet,this.sendlabelsPolar=t.label,this.dashboardService.setSPAPolarChartData(this.sendDataPolar,this.sendlabelsPolar)})}onFilterValueChange(t){this.selectedFilterValue=t,"1"===this.role&&(this.getSuperAdminBarCount(),this.pageAnalyser(),this.revenueSummary(),this.getTransactionSummary()),"2"===this.role&&(this.getSPAbarCount(),this.get
1SPAPolarGraph(),this.spaPageAnalyser()),"3"===this.role&&this.getAdvertiserPolarGraph()}hasError(t){}telInputObject(t){}onCountryChange(t){this.selectedCountry=t.name,this.initialCountryFlag={initialCountry:(null==t?void 0:t.iso2)?null==t?void 0:t.iso2:"jo"},this.countryNameFilter=this.selectedCountry.split("(")[0].trim(),this.dashboardService.setCountryDetails(t),"1"===this.role&&(this.getSuperAdminBarCount(),this.pageAnalyser(),this.revenueSummary(),this.getTransactionSummary()),"2"===this.role&&(this.getSPAbarCount(),this.getSPAPolarGraph(),this.spaPageAnalyser()),"3"===this.role&&this.getAdvertiserPolarGraph()}getAdvertiserPolarGraph(){this.AdvertiserCountSubscription=this.dashboardService.getAdvertiserPolarGraphCount({roleName:"advertiser",userId:this.userInfo.data._id,filtertype:this.selectedFilterValue.name,country:this.countryNameFilter}).subscribe(t=>{var e,a,n,i,r,o;t&&t.success?(this.AdbgColorsPolar=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.sendColors,this.AdsendDataPolar=null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.sendData,this.AdsendlabelsPolar=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.sendLabels,this.dashboardService.setAdvertiserPolarGraphData(this.AdsendDataPolar,this.AdsendlabelsPolar,this.AdbgColorsPolar)):(this.AdbgColorsPolar=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.sendColors,this.AdsendDataPolar=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.sendData,this.AdsendlabelsPolar=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.sendLabels,this.dashboardService.setAdvertiserPolarGraphData(this.AdsendDataPolar,this.AdsendlabelsPolar,this.AdbgColorsPolar))})}getAdvertiserPaymentGraph(t){this.dashboardService.getAdvertiserPaymentGraph({}).subscribe(t=>{this.AdSPAlabelsBarChart=t.data.title,this.AdSPAdatasetBarChart[0].data=t.data.value,this.AdSPAdatasetBarChart[0].backgroundColor=t.data.color,this.dashboardService.setAdvertiserPaymentGraphData(this.AdSPAdatasetBarChart,this.AdSPAlabelsBarChart)})}getTransactionSummary(){this.dashboardService.transactionSummary({filtertype:this.selectedFilterValue.name,country:this.countryNameFilter}).subscribe(t=>{this.transactionData=t.data})}}return t.\u0275fac=function(e){return new(e||t)(g.\u0275\u0275directiveInject(s.e),g.\u0275\u0275directiveInject(b),g.\u0275\u0275directiveInject(y.o),g.\u0275\u0275directiveInject(o.F0),g.\u0275\u0275directiveInject(x.sK))},t.\u0275cmp=g.\u0275\u0275defineComponent({type:t,selectors:[["app-dashboard"]],decls:14,vars:8,consts:[[1,"filters"],[1,"country"],["class","country-space",4,"ngIf"],[1,"months"],[1,"col"],["ngbDropdown","",1,"d-inline-block"],["id","dropdownBasic1","ngbDropdownToggle","",1,"btn","btn-custome"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"country-space"],["type","text","ng2TelInput","","onkeydown","return false",1,"country-drop",3,"ng2TelInputOptions","value","hasError","intlTelInputObject","countryChange"],[1,"dropdown-item",3,"click"],[1,"section"],[1,"col-lg-4","col-md-12"],[1,"main-container"],["class","sub-container",4,"ngIf"],[1,"col-lg-8","col-md-12"],[1,"col-lg-12","col-md-12","pa"],[1,"col-lg-6","col-md-12"],[3,"barChartTitle","backgroundColorip","dataip","labelsip"],[1,"sub-container"],[1,"page-title"],[1,"topicwise"],[1,"value"],[3,"datasetip","labelsip","legend","barChartTitle"],[3,"data"],[3,"backgroundColorip","dataip","labelsip"],["class","col-lg-12 col-md-12 pa",4,"ngIf"],[3,"backgroundColorip","dataip","labelsip","polarTitle"],[1,"section","main-container"],[3,"datasetip","labelsip","legend","barChartTitle",4,"ngIf"]],template:function(t,e){1&t&&(g.\u0275\u0275elementStart(0,"div",0),g.\u0275\u0275elementStart(1,"div",1),g.\u0275\u0275template(2,T,3,3,"div",2),g.\u0275\u0275elementStart(3,"div",3),g.\u0275\u0275elementStart(4,"div",4),g.\u0275\u0275elementStart(5,"div",5),g.\u0275\u0275elementStart(6,"button",6),g.\u0275\u0275text(7),g.\u0275\u0275pipe(8,"translate"),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementStart(9,"div",7),g.\u0275\u0275template(10,L,2,1,"button",8),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275elementEnd(),g.\u0275\u0275template(11,V,16,11,"ng-container",9),g.\u0275\u0275template(12,U,8,3,"ng-container",9),g.\u0275\u0275template(13,G,7,7,"ng-container",9)),2&t&&(g.\u0275\u0275advance(2),g.\u0275\u0275property("ngIf","3"!=e.role),g.\u0275\u0275advance(5),g.\u0275\u0275textInterpolate1(" ",e.selectedFilterValue?e.selectedFilterValue.displayName:g.\u0275\u0275pipeBind1(8,6,"page.filter")," "),g.\u0275\u0275advance(3),g.\u0275\u0275property("ngForOf",e.filterValues),g.\u0275\u0275advance(1),g.\u0275\u0275property("ngIf","1"===e.role||"4"===e.role),g.\u0275\u0275advance(1),g.\u0275\u0275property("ngIf","2"===e.role||"5"===e.role),g.\u0275\u0275advance(1),g.\u0275\u0275property("ngIf","3"===e.role))},directives:[n.O5,_.jt,_.iD,_.Vi,n.sg,i._,A,M,D,I,O],pipes:[x.X$],styles:[".section[_ngcontent-%COMP%]{display:flex}.pa[_ngcontent-%COMP%]{padding:10px;margin:30px 0}.filters[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-bottom:10px}.filters[_ngcontent-%COMP%] .country[_ngcontent-%COMP%]{width:100%;background-color:#fff;padding:20px;
1display:flex;justify-content:flex-end}.country-drop[_ngcontent-%COMP%]{border:1px solid #2632386b!important;width:100%;height:100%}.iti--allow-dropdown[_ngcontent-%COMP%]{border:1px solid #2632386b!important}.btn-custom[_ngcontent-%COMP%]{min-width:200px}.dropdown-item[_ngcontent-%COMP%]{color:#000!important}.iti--allow-dropdown[_ngcontent-%COMP%]{width:100%!important;height:100%!important}.sub-container[_ngcontent-%COMP%]{padding:20px 0 0 10px}.sub-container[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700}.sub-container[_ngcontent-%COMP%] .topicwise[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:30px 0 50px}.sub-container[_ngcontent-%COMP%] .topicwise[_ngcontent-%COMP%] .tilte[_ngcontent-%COMP%]{font-size:18px}.sub-container[_ngcontent-%COMP%] .topicwise[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-size:28px}.main-container[_ngcontent-%COMP%]{height:100%!important}"]}),t})(),data:{title:"Dashboard",urls:[]}}];let X=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=g.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=g.\u0275\u0275defineInjector({imports:[[o.Bz.forChild(Y)],o.Bz]}),t})(),$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=g.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=g.\u0275\u0275defineInjector({imports:[[n.ez,X,r.m,i.g,_.IJ,x.aw]]}),t})()}}]); 2//# sourceMappingURL=9903-es2015.cf952168b5e5c2520c2f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.