!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}(function(){return function i(a,o,r){function s(n,t){if(!o[n]){if(!a[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(l)return l(n,!0);throw(t=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",t}e=o[n]={exports:{}},a[n][0].call(e.exports,function(t){var e=a[n][1][t];return s(e||t)},e,e.exports,i,a,o,r)}return o[n].exports}for(var l="function"==typeof require&&require,t=0;t>>0,i=0;iOt(t)?(o=t+1,e-Ot(t)):(o=t,e);return{year:o,dayOfYear:n}}function Xt(t,e,n){var i,a,o=Gt(t.year(),e,n),o=Math.floor((t.dayOfYear()-o-1)/7)+1;return o<1?i=o+Jt(a=t.year()-1,e,n):o>Jt(t.year(),e,n)?(i=o-Jt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Jt(t,e,n){var i=Gt(t,e,n),e=Gt(t+1,e,n);return(Ot(t)-i+e)/7}i("w",["ww",2],"wo","week"),i("W",["WW",2],"Wo","isoWeek"),e("week","w"),e("isoWeek","W"),n("week",5),n("isoWeek",5),_("w",b),_("ww",b,y),_("W",b),_("WW",b,y),Dt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=c(t)});i("d",0,"do","day"),i("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),i("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),i("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),i("e",0,0,"weekday"),i("E",0,0,"isoWeekday"),e("day","d"),e("weekday","e"),e("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),_("d",b),_("e",b),_("E",b),_("dd",function(t,e){return e.weekdaysMinRegex(t)}),_("ddd",function(t,e){return e.weekdaysShortRegex(t)}),_("dddd",function(t,e){return e.weekdaysRegex(t)}),Dt(["dd","ddd","dddd"],function(t,e,n,i){i=n._locale.weekdaysParse(t,i,n._strict);null!=i?e.d=i:g(n).invalidWeekday=t}),Dt(["d","e","E"],function(t,e,n,i){e[i]=c(t)});var Kt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $t="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Qt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var te=x;var ee=x;var ne=x;function ie(){function t(t,e){return e.length-t.length}for(var e,n,i,a=[],o=[],r=[],s=[],l=0;l<7;l++)i=u([2e3,1]).day(l),e=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),i=this.weekdays(i,""),a.push(e),o.push(n),r.push(i),s.push(e),s.push(n),s.push(i);for(a.sort(t),o.sort(t),r.sort(t),s.sort(t),l=0;l<7;l++)o[l]=Mt(o[l]),r[l]=Mt(r[l]),s[l]=Mt(s[l]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function ae(){return this.hours()%12||12}function oe(t,e){i(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function re(t,e){return e._meridiemParse}i("H",["HH",2],0,"hour"),i("h",["hh",2],0,ae),i("k",["kk",2],0,function(){return this.hours()||24}),i("hmm",0,0,function(){return""+ae.apply(this)+v(this.minutes(),2)}),i("hmmss",0,0,function(){return""+ae.apply(this)+v(this.minutes(),2)+v(this.seconds(),2)}),i("Hmm",0,0,function(){return""+this.hours()+v(this.minutes(),2)}),i("Hmmss",0,0,function(){return""+this.hours()+v(this.minutes(),2)+v(this.seconds(),2)}),oe("a",!0),oe("A",!1),e("hour","h"),n("hour",13),_("a",re),_("A",re),_("H",b),_("h",b),_("k",b),_("HH",b,y),_("hh",b,y),_("kk",b,y),_("hmm",ft),_("hmmss",gt),_("Hmm",ft),_("Hmmss",gt),k(["H","HH"],D),k(["k","kk"],function(t,e,n){t=c(t);e[D]=24===t?0:t}),k(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),k(["h","hh"],function(t,e,n){e[D]=c(t),g(n).bigHour=!0}),k("hmm",function(t,e,n){var i=t.length-2;e[D]=c(t.substr(0,i)),e[C]=c(t.substr(i)),g(n).bigHour=!0}),k("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[D]=c(t.substr(0,i)),e[C]=c(t.substr(i,2)),e[P]=c(t.substr(a)),g(n).bigHour=!0}),k("Hmm",function(t,e,n){var i=t.length-2;e[D]=c(t.substr(0,i)),e[C]=c(t.substr(i))}),k("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[D]=c(t.substr(0,i)),e[C]=c(t.substr(i,2)),e[P]=c(t.substr(a))});var se,x=Ft("Hours",!0),le={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Nt,monthsShort:zt,week:{dow:0,doy:6},weekdays:Kt,weekdaysMin:Qt,weekdaysShort:$t,meridiemParse:/[ap]\.?m?\.?/i},O={},ue={};function de(t){return t&&t.toLowerCase().replace("_","-")}function he(t){if(!O[t]&&void 0!==_n&&_n&&_n.exports)try{var e=se._abbr;xn("./locale/"+t),ce(e)}catch(t){}return O[t]}function ce(t,e){return(se=t&&(t=o(e)?ge(t):fe(t,e))?t:se)._abbr}function fe(t,e){if(null===e)return delete O[t],null;var n=le;if(e.abbr=t,null!=O[t])K("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=O[t]._config;else if(null!=e.parentLocale){if(null==O[e.parentLocale])return ue[e.parentLocale]||(ue[e.parentLocale]=[]),ue[e.parentLocale].push({name:t,config:e}),null;n=O[e.parentLocale]._config}return O[t]=new Q($(n,e)),ue[t]&&ue[t].forEach(function(t){fe(t.name,t.config)}),ce(t),O[t]}function ge(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return se;if(!l(t)){if(e=he(t))return e;t=[t]}for(var n,i,a,o,r=t,s=0;s=n&&Z(o,i,!0)>=n-1)break;n--}s++}return null}function me(t){var e=t._a;return e&&-2===g(t).overflow&&(e=e[M]<0||11Yt(e[w],e[M])?S:e[D]<0||24Jt(o,l,u)?g(i)._overflowWeeks=!0:null!=d?g(i)._overflowWeekday=!0:(h=Zt(o,r,s,l,u),i._a[w]=h.year,i._dayOfYear=h.dayOfYear)),null!=t._dayOfYear&&(a=pe(t._a[w],n[w]),(t._dayOfYear>Ot(a)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),d=qt(a,0,t._dayOfYear),t._a[M]=d.getUTCMonth(),t._a[S]=d.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=c[e]=n[e];for(;e<7;e++)t._a[e]=c[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[D]&&0===t._a[C]&&0===t._a[P]&&0===t._a[Ct]&&(t._nextDay=!0,t._a[D]=0),t._d=(t._useUTC?qt:Ut).apply(null,c),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[D]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(g(t).weekdayMismatch=!0)}}var ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,be=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xe=/Z|[+-]\d\d(?::?\d\d)?/,_e=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ke=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],we=/^\/?Date\((\-?\d+)/i;function Me(t){var e,n,i,a,o,r,s=t._i,l=ye.exec(s)||be.exec(s);if(l){for(g(t).iso=!0,e=0,n=_e.length;et.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},a.isLocal=function(){return!!this.isValid()&&!this._isUTC},a.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},a.isUtc=Be,a.isUTC=Be,a.zoneAbbr=function(){return this._isUTC?"UTC":""},a.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},a.dates=t("dates accessor is deprecated. Use date instead.",pt),a.months=t("months accessor is deprecated. Use month instead",Vt),a.years=t("years accessor is deprecated. Use year instead",At),a.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?(this.utcOffset(t="string"!=typeof t?-t:t,e),this):-this.utcOffset()}),a.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var t,e;return o(this._isDSTShifted)&&(U(t={},this),(t=Oe(t))._a?(e=(t._isUTC?u:I)(t._a),this._isDSTShifted=this.isValid()&&0'),t.data),n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e],a=a&&a.custom||{},o=y.valueAtIndexOrDefault,r=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor||o(i.backgroundColor,e,r.backgroundColor),strokeStyle:a.borderColor||o(i.borderColor,e,r.borderColor),lineWidth:a.borderWidth||o(i.borderWidth,e,r.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,o=0,r=(a.data.datasets||[]).length;o=Math.PI?-1:h<-Math.PI?1:0))+v,s=Math.cos(h),t=Math.sin(h),e=Math.cos(v),i=Math.sin(v),r=h<=0&&0<=v||h<=2*Math.PI&&2*Math.PI<=v,a=h<=.5*Math.PI&&.5*Math.PI<=v||h<=2.5*Math.PI&&2.5*Math.PI<=v,o=h<=-Math.PI&&-Math.PI<=v||h<=Math.PI&&Math.PI<=v,h=h<=.5*-Math.PI&&.5*-Math.PI<=v||h<=1.5*Math.PI&&1.5*Math.PI<=v,v=p/100,o=o?-1:Math.min(s*(s<0?1:v),e*(e<0?1:v)),h=h?-1:Math.min(t*(t<0?1:v),i*(i<0?1:v)),r=r?1:Math.max(s*(0'),t.data),n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},o=y.valueAtIndexOrDefault,r=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor||o(i.backgroundColor,e,r.backgroundColor),strokeStyle:a.borderColor||o(i.borderColor,e,r.borderColor),lineWidth:a.borderWidth||o(i.borderWidth,e,r.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,o=0,r=(a.data.datasets||[]).length;o=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var r=t(25),h=t(45),i=t(28),a=t(30),s=t(48),l=t(31);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var n=this,i=((i=(a=(a=e)||{}).data=a.data||{}).datasets=i.datasets||[],i.labels=i.labels||[],a.options=h.configMerge(r.global,r[a.type],a.options||{}),e=a,s.acquireContext(t,e)),a=i&&i.canvas,t=a&&a.height,o=a&&a.width;n.id=h.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=t,n.aspectRatio=t?o/t:null,n.options=e.options,n._bufferedRender=!1,(n.chart=n).controller=n,u.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return u.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(h.getMaximumWidth(i))),a=Math.max(0,Math.floor(a?o/a:h.getMaximumHeight(i)));e.width===o&&e.height===a||(i.width=e.width=o,i.height=e.height=a,i.style.width=o+"px",i.style.height=a+"px",h.retinaScale(e,n.devicePixelRatio),t||(l.notify(e,"resize",[i={width:o,height:a}]),e.options.onResize&&e.options.onResize(e,i),e.stop(),e.update(e.options.responsiveAnimationDuration)))},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},t=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var r=this,t=r.options,s=r.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,n=e.id,i=h.valueOrDefault(e.type,t.dtype),a=(d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0,null);if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=r.ctx,a.chart=r;else{var o=u.scaleService.getScaleConstructor(i);if(!o)return;a=new o({id:n,type:i,options:e,ctx:r.ctx,chart:r}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(r.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),r.scales=s,u.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i=this,a=[],o=[];return h.each(i.data.datasets,function(t,e){var n=i.getDatasetMeta(e),t=t.type||i.config.type;if(n.type&&n.type!==t&&(i.destroyDatasetMeta(e),n=i.getDatasetMeta(e)),n.type=t,a.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{t=u.controllers[n.type];if(void 0===t)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new t(i,e),o.push(n.controller)}},i),o},resetElements:function(){var n=this;h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(e=i).options,h.each(e.scales,function(t){a.removeBox(e,t)}),n=h.configMerge(u.defaults.global,u.defaults[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),l._invalidate(i),!1!==l.notify(i,"beforeUpdate")&&(i.tooltip._data=i.data,n=i.buildOrUpdateControllers(),h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&h.each(n,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],l.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t))},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?c.merge(e[t][a],[l.scaleService.getScaleDefaults(o),r]):c.merge(e[t][a],r)}else c._merger(t,e,n,i)}})},c.where=function(t,e){if(c.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return c.each(t,function(t){e(t)&&n.push(t)}),n},c.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},c.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},c.niceNum=function(t,e){var n=Math.floor(c.log10(t)),t=t/Math.pow(10,n),e=e?t<1.5?1:t<3?2:t<7?5:10:t<=1?1:t<=2?2:t<=5?5:10;return e*Math.pow(10,n)},c.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)},c.getRelativePosition=function(t,e){var n=t.originalEvent||t,t=t.currentTarget||t.srcElement,i=t.getBoundingClientRect(),a=n.touches,a=a&&0n.length){for(var l=0;le&&(e=t.length)}),e},c.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},c.getHoverColor=function(t){return t instanceof CanvasPattern?t:c.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function r(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function s(t,e){for(var n,i,a,o=0,r=t.data.datasets.length;ot.maxHeight){o--;break}o++,s=d*r}t.labelRotation=o},afterCalculateTickRotation:function(){N.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){N.callback(this.options.beforeFit,[this])},fit:function(){var t,e=this,n=e.minSize={width:0,height:0},i=f(e._ticks),a=e.options,o=a.ticks,r=a.scaleLabel,s=a.gridLines,l=a.display,u=e.isHorizontal(),d=g(o),h=a.gridLines.tickMarkLength;n.width=u?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:l&&s.drawTicks?h:0,n.height=u?l&&s.drawTicks?h:0:e.maxHeight,r.display&&l&&(s=m(r)+N.options.toPadding(r.padding).height,u?n.height+=s:n.width+=s),o.display&&l&&(h=N.longestText(e.ctx,d.font,i,e.longestTextCache),r=N.numberOfLabelLines(i),s=.5*d.size,l=e.options.ticks.padding,u?(e.longestLabelWidth=h,u=N.toRadians(e.labelRotation),t=Math.cos(u),u=Math.sin(u)*h+d.size*r+s*(r-1)+s,n.height=Math.min(e.maxHeight,n.height+u+l),e.ctx.font=d.font,r=c(e.ctx,i[0],d.font),u=c(e.ctx,i[i.length-1],d.font),0!==e.labelRotation?(e.paddingLeft="bottom"===a.position?t*r+3:t*s+3,e.paddingRight="bottom"===a.position?t*s+3:t*u+3):(e.paddingLeft=r/2+3,e.paddingRight=u/2+3)):(o.mirror?h=0:h+=l+s,n.width=Math.min(e.maxWidth,n.width+h),e.paddingTop=d.size/2,e.paddingBottom=d.size/2)),e.handleMargins(),e.width=n.width,e.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){N.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(N.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:N.noop,getPixelForValue:N.noop,getValueForPixel:N.noop,getPixelForTick:function(t){var e,n,i=this,a=i.options.offset;if(i.isHorizontal())return n=(e=(i.width-(i.paddingLeft+i.paddingRight))/Math.max(i._ticks.length-(a?0:1),1))*t+i.paddingLeft,a&&(n+=e/2),i.left+Math.round(n)+(i.isFullWidth()?i.margins.left:0);a=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(a/(i._ticks.length-1))},getPixelForDecimal:function(t){var e,n=this;return n.isHorizontal()?(e=(n.width-(n.paddingLeft+n.paddingRight))*t+n.paddingLeft,n.left+Math.round(e)+(n.isFullWidth()?n.margins.left:0)):n.top+t*n.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((u+s.autoSkipPadding)*l/(o.width-(o.paddingLeft+o.paddingRight)))),a&&ao.height-i.height&&(l="bottom"),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,r="center"===l?(g=function(t){return t<=u},function(t){return u=o.width-i.width/2}),h=function(t){return t+i.width+a.caretSize+a.caretPadding>o.width},c=function(t){return t-i.width-a.caretSize-a.caretPadding<0},f=function(t){return t<=d?"top":"bottom"},g(a.x)?(s="left",h(a.x)&&(s="center",l=f(a.y))):r(a.x)&&(s="right",c(a.x)&&(s="center",l=f(a.y))),D={xAlign:(g=n._options).xAlign||s,yAlign:g.yAlign||l},h=w,r=P,c=D,f=x._chart,n=h.x,s=h.y,g=h.caretSize,l=h.caretPadding,h=h.cornerRadius,e=c.xAlign,c=c.yAlign,g+=l,h+=l,"right"===e?n-=r.width:"center"===e&&(n=(n-=r.width/2)+r.width>f.width?f.width-r.width:n)<0&&(n=0),"top"===c?s+=g:s-="bottom"===c?r.height+g:r.height/2,"center"===c?"left"===e?n+=g:"right"===e&&(n-=g):"left"===e?n-=h:"right"===e&&(n+=h),C={x:n,y:s}}else w.opacity=0;return w.xAlign=D.xAlign,w.yAlign=D.yAlign,w.x=C.x,w.y=C.y,w.width=P.width,w.height=P.height,w.caretX=k.x,w.caretY=k.y,x._model=w,t&&_.custom&&_.custom.call(x,w),x},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,t=this.getCaretPosition(t,e,i);n.lineTo(t.x1,t.y1),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3)},getCaretPosition:function(t,e,n){var i,a,o,r,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,t=t.y,g=e.width,e=e.height;return"center"===c?(o=t+e/2,r="left"===h?(i=(l=f)-u,s=l,a=o+u,o-u):(i=(l=f+g)+u,s=l,a=o-u,o+u)):(s=(l="left"===h?(i=f+d+u)-u:"right"===h?(i=f+g-d-u)-u:(i=n.caretX)-u,i+u),"top"===c?(o=(a=t)-u,r=a):(o=(a=t+e)+u,r=a,h=s,s=l,l=h)),{x1:l,x2:i,x3:s,y1:a,y2:o,y3:r}},drawTitle:function(t,e,n,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var o,r,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=h(e.titleFontColor,i),n.font=W.fontString(s,e._titleFontStyle,e._titleFontFamily),o=0,r=a.length;o=n.innerRadius&&e<=n.outerRadius;return a<=i&&i<=o&&t}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),d=t(45),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,o=this._chart.ctx,r=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),o.save(),o.lineCap=a.borderCapStyle||l.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||l.borderDash),o.lineDashOffset=a.borderDashOffset||l.borderDashOffset,o.lineJoin=a.borderJoinStyle||l.borderJoinStyle,o.lineWidth=a.borderWidth||l.borderWidth,o.strokeStyle=a.borderColor||h.defaultColor,o.beginPath(),u=-1,t=0;t=(n=a(this)).left&&t<=n.right&&e>=n.top&&e<=n.bottom:i},inLabelRange:function(t,e){if(!this._view)return!1;var n=a(this);return o(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e=this._view,e=o(this)?(t=e.x,(e.y+e.base)/2):(t=(e.x+e.base)/2,e.y);return{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";t=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,o){var r;o?(r=Math.min(o,i/2),o=Math.min(o,a/2),t.moveTo(e+r,n),t.lineTo(e+i-r,n),t.quadraticCurveTo(e+i,n,e+i,n+o),t.lineTo(e+i,n+a-o),t.quadraticCurveTo(e+i,n+a,e+i-r,n+a),t.lineTo(e+r,n+a),t.quadraticCurveTo(e,n+a,e,n+a-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+r,n)):t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var o,r,s,l;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),d=(u=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-u/2,a+d/3),t.lineTo(i+u/2,a+d/3),t.lineTo(i,a-2*d/3),t.closePath(),t.fill();break;case"rect":l=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-l,a-l,2*l,2*l),t.strokeRect(i-l,a-l,2*l,2*l);break;case"rectRounded":var u=n/Math.SQRT2,d=i-u,u=a-u,h=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,d,u,h,h,n/2),t.closePath(),t.fill();break;case"rectRot":l=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-l,a),t.lineTo(i,a+l),t.lineTo(i+l,a),t.lineTo(i,a-l),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),r=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-r,a-s),t.lineTo(i+r,a+s),t.moveTo(i-r,a+s),t.lineTo(i+r,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),r=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-r,a-s),t.lineTo(i+r,a+s),t.moveTo(i-r,a+s),t.lineTo(i+r,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};t.clear=n.clear,t.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,o,r;if(d.isArray(t))if(o=t.length,i)for(a=o-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
',r=a.childNodes[0],s=a.childNodes[1],a._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,s.scrollLeft=1e6,s.scrollTop=1e6},S(r,"scroll",y.bind(r,"expand")),S(s,"scroll",y.bind(s,"shrink")),a);function y(){a._reset(),i()}f=function(){var t;p.resizer&&((t=e.parentNode)&&t!==v.parentNode&&t.insertBefore(v,t.firstChild),v._reset())},g=(c=e)[x]||(c[x]={}),m=g.renderProxy=function(t){t.animationName===w&&f()},b.each(M,function(t){S(c,t,m)}),g.reflow=!!c.offsetParent,c.classList.add(k)}function a(t){var e,n,i=t[x]||{},a=i.resizer;delete i.resizer,i=(e=t)[x]||{},(n=i.renderProxy)&&(b.each(M,function(t){o(e,t,n)}),delete i.renderProxy),e.classList.remove(k),a&&a.parentNode&&a.parentNode.removeChild(a)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n="from{opacity:0.99}to{opacity:1}";n="@-webkit-keyframes "+w+"{"+n+"}@keyframes "+w+"{"+n+"}."+k+"{-webkit-animation:"+w+" 0.001s;animation:"+w+" 0.001s;}",e=(t=this)._style||document.createElement("style"),t._style||(n="/* Chart.js */\n"+n,(t._style=e).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(e)),e.appendChild(document.createTextNode(n))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]);var n,i,a,o,r=(t=t&&t.canvas?t.canvas:t)&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(e=e,i=(t=t).style,a=t.getAttribute("height"),o=t.getAttribute("width"),t[x]={initial:{height:a,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null!==o&&""!==o||void 0!==(n=s(t,"width"))&&(t.width=n),null!==a&&""!==a||(""===t.style.height?t.height=t.width/(e.options.aspectRatio||2):(i=s(t,"height"),void 0!==n&&(t.height=i))),r):null},releaseContext:function(t){var n,i=t.canvas;i[x]&&(n=i[x].initial,["height","width"].forEach(function(t){var e=n[t];b.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),b.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[x])},addEventListener:function(a,t,o){var e=a.canvas;"resize"===t?l(e,o,a):S(e,t,((e=o[x]||(o[x]={})).proxies||(e.proxies={}))[a.id+"_"+t]=function(t){var e,n,i;o((e=a,n=r[(t=t).type]||t.type,i=b.getRelativePosition(t,e),D(n,e,i.x,i.y,t)))})},removeEventListener:function(t,e,n){var i=t.canvas;"resize"===e?a(i):(n=((n[x]||{}).proxies||{})[t.id+"_"+e])&&o(i,e,n)}},b.addEvent=S,b.removeEvent=o},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),t=t(47),t=t._enabled?t:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},t)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var w=t(25),c=t(40),M=t(45),f=(w._set("global",{plugins:{filler:{propagate:!0}}}),{dataset:function(t){var e=t.fill,t=t.chart,n=t.getDatasetMeta(e),i=n&&t.isDatasetVisible(e)&&n.dataset._children||[],a=i.length||0;return a?function(t,e){return e');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var o=i.extend({initialize:function(t){P.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,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:t,beforeBuildLabels:t,buildLabels:function(){var e=this,n=e.options.labels||{},t=P.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n,i,a,o,r,s,l,u=this,t=u.options,d=t.labels,t=t.display,h=u.ctx,e=C.global,c=P.valueOrDefault,f=c(d.fontSize,e.defaultFontSize),g=c(d.fontStyle,e.defaultFontStyle),c=c(d.fontFamily,e.defaultFontFamily),e=P.fontString(f,g,c),m=u.legendHitBoxes=[],p=u.minSize,g=u.isHorizontal();g?(p.width=u.maxWidth,p.height=t?10:0):(p.width=t?10:0,p.height=u.maxHeight),t&&(h.font=e,g?(n=u.lineWidths=[0],i=u.legendItems.length?f+d.padding:0,h.textAlign="left",h.textBaseline="top",P.each(u.legendItems,function(t,e){t=T(d,f)+f/2+h.measureText(t.text).width;n[n.length-1]+t+d.padding>=u.width&&(i+=f+d.padding,n[n.length]=u.left),m[e]={left:0,top:0,width:t,height:f},n[n.length-1]+=t+d.padding}),p.height+=i):(c=d.padding,a=u.columnWidths=[],o=d.padding,s=r=0,l=f+c,P.each(u.legendItems,function(t,e){t=T(d,f)+f/2+h.measureText(t.text).width;s+l>p.height&&(o+=r+d.padding,a.push(r),s=r=0),r=Math.max(r,t),s+=l,m[e]={left:0,top:0,width:t,height:f}}),o+=r,a.push(r),p.width+=o)),u.width=p.width,u.height=p.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c,f,t,g,e,n,m,p,v,y,b,x=this,_=x.options,k=_.labels,w=C.global,M=w.elements.line,S=x.width,D=x.lineWidths;_.display&&(c=x.ctx,t=(f=P.valueOrDefault)(k.fontColor,w.defaultFontColor),g=f(k.fontSize,w.defaultFontSize),n=f(k.fontStyle,w.defaultFontStyle),e=f(k.fontFamily,w.defaultFontFamily),n=P.fontString(g,n,e),c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=t,c.fillStyle=t,c.font=n,m=T(k,g),p=x.legendHitBoxes,v=x.isHorizontal(),y=v?{x:x.left+(S-D[0])/2,y:x.top+k.padding,line:0}:{x:x.left+k.padding,y:x.top+k.padding,line:0},b=g+k.padding,P.each(x.legendItems,function(t,e){var n,i,a,o,r,s,l=c.measureText(t.text).width,u=m+g/2+l,d=y.x,h=y.y;v?S<=d+u&&(h=y.y+=b,y.line++,d=y.x=x.left+(S-D[y.line])/2):h+b>x.bottom&&(d=y.x=d+x.columnWidths[y.line]+k.padding,h=y.y=x.top+k.padding,y.line++),i=d,n=h,a=t,isNaN(m)||m<=0||(c.save(),c.fillStyle=f(a.fillStyle,w.defaultColor),c.lineCap=f(a.lineCap,M.borderCapStyle),c.lineDashOffset=f(a.lineDashOffset,M.borderDashOffset),c.lineJoin=f(a.lineJoin,M.borderJoinStyle),c.lineWidth=f(a.lineWidth,M.borderWidth),c.strokeStyle=f(a.strokeStyle,w.defaultColor),s=0===f(a.lineWidth,M.borderWidth),c.setLineDash&&c.setLineDash(f(a.lineDash,M.borderDash)),_.labels&&_.labels.usePointStyle?(r=(o=g*Math.SQRT2/2)/Math.SQRT2,P.canvas.drawPoint(c,a.pointStyle,o,i+r,n+r)):(s||c.strokeRect(i,n,m,g),c.fillRect(i,n,m,g)),c.restore()),p[e].left=d,p[e].top=h,a=h,o=t,r=l,i=m+(s=g/2)+(i=d),a+=s,c.fillText(o.text,i,a),o.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(i,a),c.lineTo(i+r,a),c.stroke()),v?y.x+=u+k.padding:y.y+=b}))},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function r(t,e){var n=new o({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:o,beforeInit:function(t){var e=t.options.legend;e&&r(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(P.mergeIf(e,C.global.legend),n?(a.configure(t,n,e),n.options=e):r(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){t=t.legend;t&&t.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var y=t(25),i=t(26),b=t(45),a=t(30),t=b.noop,o=(y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),i.extend({initialize:function(t){b.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,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:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=b.valueOrDefault,e=this.options,n=e.display,t=t(e.fontSize,y.global.defaultFontSize),i=this.minSize,a=b.isArray(e.text)?e.text.length:1,t=b.options.toLineHeight(e.lineHeight,t),n=n?a*t+2*e.padding:0;this.isHorizontal()?(i.width=this.maxWidth,i.height=n):(i.width=n,i.height=this.maxHeight),this.width=i.width,this.height=i.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=b.valueOrDefault,n=this.options,i=y.global;if(n.display){var a,o,r,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),l=b.fontString(s,l,u),d=b.options.toLineHeight(n.lineHeight,s),u=d/2+n.padding,s=0,h=this.top,c=this.left,f=this.bottom,g=this.right,m=(t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=l,this.isHorizontal()?(o=c+(g-c)/2,r=h+u,a=g-c):(o="left"===n.position?c+u:g-u,r=h+(f-h)/2,a=f-h,s=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(o,r),t.rotate(s),t.textAlign="center",t.textBaseline="middle",n.text);if(b.isArray(m))for(var p=0,v=0;vr.max)&&(r.max=t))})}),r.min=isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=isFinite(r.max)&&!isNaN(r.max)?r.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;return this.isHorizontal()?Math.min(e.maxTicksLimit||11,Math.ceil(this.width/50)):(t=h.valueOrDefault(e.fontSize,i.global.defaultFontSize),Math.min(e.maxTicksLimit||11,Math.ceil(this.height/(2*t))))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,t=+this.getRightValue(t),n=this.end-e,n=this.isHorizontal()?this.left+this.width/n*(t-e):this.bottom-this.height/n*(t-e);return n},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,e=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*e},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var u=t(45);e.exports=function(e){var t=u.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,n=(e.beginAtZero&&(n=u.sign(t.min),i=u.sign(t.max),n<0&&i<0?t.max=0:0=t.max&&(n?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),n={maxTicks:Math.max(2,n),min:e.min,max:e.max,stepSize:u.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var n,i=[],a=(n=t.stepSize&&0o.max)&&(o.max=t),0!=t&&(null===o.minNotZero||to.r&&(o.r=h.end,r.r=u),d.starto.b&&(o.b=d.end,r.b=u)}t.setReductions(a,o,r)}function i(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.pointLabels,o=(e.lineWidth=i.lineWidth,e.strokeStyle=i.color,t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max)),r=x(t);e.textBaseline="top";for(var s,l=b(t)-1;0<=l;l--)if(i.display&&(u=t.getPointPosition(l,o),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(u.x,u.y),e.stroke(),e.closePath()),a.display){var u=t.getPointPosition(l,o+5),d=_.valueAtIndexOrDefault(a.fontColor,l,y.defaultFontColor),d=(e.font=r.font,e.fillStyle=d,t.getIndexAngle(l)),d=_.toDegrees(d),h=(e.textAlign=0===(g=d)||180===g?"center":g<180?"left":"right",g=d,d=t._pointLabelSizes[l],s=u,90===g||270===g?s.y-=d.h/2:(270>1)-1]||null,o=t[i],!a)return{lo:null,hi:o};if(o[e]n))return{lo:a,hi:o};s=i-1}}return{lo:o,hi:null}}(t,e,n),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],a=a.lo?a.hi||t[t.length-1]:t[1],t=a[e]-o[e],n=t?(n-o[e])/t:0,e=(a[i]-o[i])*n;return o[i]+e}function O(t,e){var n=e.parser,e=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof e?D(t,e):!(t=t instanceof D?t:D(t)).isValid()&&"function"==typeof e?e(t):t}function I(t,e){if(m.isNullOrUndef(t))return null;var n=e.options.time,e=O(e.getRightValue(t),n);return e.isValid()?(n.round&&e.startOf(n.round),e.valueOf()):null}function A(t){for(var e=P.indexOf(t)+1,n=P.length;e=P.indexOf(e);r--)if(a=P[r],C[a].common&&o.as(a)>=t.length)return a;return P[e?P.indexOf(e):0]}(y,p.minUnit,c.min,c.max),c._majorUnit=A(c._unit),c._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];for(var a,o,r,s=[],l=[e],u=0,d=t.length;u