var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
(self.webpackChunkextract_css=self.webpackChunkextract_css||[]).push([["336"],{259049:function(z){"use strict";z.exports={}},564169:function(z){/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 1.0.6
 *
 * Copyright 2015 Nick Downie
 * Released under the MIT license
 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
 */(function(){"use strict";var k=this,m=k.Chart,s=function(t){var i=this;this.canvas=t.canvas,this.ctx=t;var e=function(f,v){return f["offset"+v]?f["offset"+v]:document.defaultView.getComputedStyle(f).getPropertyValue(v)},o=this.width=e(t.canvas,"Width"),u=this.height=e(t.canvas,"Height");t.canvas.width=o,t.canvas.height=u;var o=this.width=t.canvas.width,u=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,c.retinaScale(this),this};s.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},s.types={};var c=s.helpers={},a=c.each=function(t,i,e){var o=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var u;for(u=0;u<t.length;u++)i.apply(e,[t[u],u].concat(o))}else for(var f in t)i.apply(e,[t[f],f].concat(o))},l=c.clone=function(t){var i={};return a(t,function(e,o){t.hasOwnProperty(o)&&(i[o]=e)}),i},n=c.extend=function(t){return a(Array.prototype.slice.call(arguments,1),function(i){a(i,function(e,o){i.hasOwnProperty(o)&&(t[o]=e)})}),t},h=c.merge=function(t,i){var e=Array.prototype.slice.call(arguments,0);return e.unshift({}),n.apply(null,e)},g=c.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},w=c.where=function(t,i){var e=[];return c.each(t,function(o){i(o)&&e.push(o)}),e},d=c.findNextWhere=function(t,i,e){e||(e=-1);for(var o=e+1;o<t.length;o++){var u=t[o];if(i(u))return u}},_=c.findPreviousWhere=function(t,i,e){e||(e=t.length);for(var o=e-1;o>=0;o--){var u=t[o];if(i(u))return u}},S=c.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},o=function(){this.constructor=e};return o.prototype=i.prototype,e.prototype=new o,e.extend=S,t&&n(e.prototype,t),e.__super__=i.prototype,e},M=c.noop=function(){},j=c.uid=function(){var t=0;return function(){return"chart-"+t++}}(),O=c.warn=function(t){window.console&&typeof window.console.warn=="function"&&console.warn(t)},q=c.amd=typeof define=="function"&&define.amd,B=c.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},J=c.max=function(t){return Math.max.apply(Math,t)},Q=c.min=function(t){return Math.min.apply(Math,t)},tt=c.cap=function(t,i,e){if(B(i)){if(t>i)return i}else if(B(e)&&t<e)return e;return t},it=c.getDecimalPlaces=function(t){return t%1!==0&&B(t)?t.toString().split(".")[1].length:0},$=c.radians=function(t){return t*(Math.PI/180)},et=c.getAngleFromPoint=function(t,i){var e=i.x-t.x,o=i.y-t.y,u=Math.sqrt(e*e+o*o),f=Math.PI*2+Math.atan2(o,e);return e<0&&o<0&&(f+=Math.PI*2),{angle:f,distance:u}},Z=c.aliasPixel=function(t){return t%2===0?0:.5},ht=c.splineCurve=function(t,i,e,o){var u=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),f=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),v=o*u/(u+f),x=o*f/(u+f);return{inner:{x:i.x-v*(e.x-t.x),y:i.y-v*(e.y-t.y)},outer:{x:i.x+x*(e.x-t.x),y:i.y+x*(e.y-t.y)}}},ot=c.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)},rt=c.calculateScaleRange=function(t,i,e,o,u){var f=2,v=Math.floor(i/(e*1.5)),x=f>=v,P=J(t),R=Q(t);P===R&&(P+=.5,R>=.5&&!o?R-=.5:P+=.5);for(var A=Math.abs(P-R),F=ot(A),V=Math.ceil(P/(1*Math.pow(10,F)))*Math.pow(10,F),T=o?0:Math.floor(R/(1*Math.pow(10,F)))*Math.pow(10,F),E=V-T,D=Math.pow(10,F),X=Math.round(E/D);(X>v||X*2<v)&&!x;)if(X>v)D*=2,X=Math.round(E/D),X%1!==0&&(x=!0);else if(u&&F>=0)if(D/2%1===0)D/=2,X=Math.round(E/D);else break;else D/=2,X=Math.round(E/D);return x&&(X=f,D=E/X),{steps:X,stepValue:D,min:T,max:T+X*D}},Y=c.template=function(t,i){if(t instanceof Function)return t(i);var e={};function o(u,f){var v=/\W/.test(u)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+u.replace(/[\r\t\n]/g," ").split("<%").join("	").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("	").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):e[u]=e[u];return f?v(f):v}return o(t,i)},ct=c.generateLabels=function(t,i,e,o){var u=new Array(i);return labelTemplateString&&a(u,function(f,v){u[v]=Y(t,{value:e+o*(v+1)})}),u},K=c.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=1/2)<1?1/2*t*t:-1/2*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=1/2)<1?1/2*t*t*t:1/2*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=1/2)<1?1/2*t*t*t*t:-1/2*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=1/2)<1?1/2*t*t*t*t*t:1/2*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-1/2*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return t===0?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return t===1?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return t===0?0:t===1?1:(t/=1/2)<1?1/2*Math.pow(2,10*(t-1)):1/2*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=1/2)<1?-1/2*(Math.sqrt(1-t*t)-1):1/2*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1)==1?1:(e||(e=1*.3),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),-(o*Math.pow(2,10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)))},easeOutElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1)==1?1:(e||(e=1*.3),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),o*Math.pow(2,-10*t)*Math.sin((t*1-i)*(2*Math.PI)/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1/2)==2?1:(e||(e=1*(.3*1.5)),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),t<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)):o*Math.pow(2,-10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=1/2)<1?1/2*(t*t*(((i*=1.525)+1)*t-i)):1/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-K.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<1/2?K.easeInBounce(t*2)*.5:K.easeOutBounce(t*2-1)*.5+1*.5}},st=c.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),r=c.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),C=c.animationLoop=function(t,i,e,o,u,f){var v=0,x=K[e]||K.linear,P=function(){v++;var R=v/i,A=x(R);t.call(f,A,R,v),o.call(f,A,R),v<i?f.animationFrame=st(P):u.apply(f)};st(P)},p=c.getRelativePosition=function(t){var i,e,o=t.originalEvent||t,u=t.currentTarget||t.srcElement,f=u.getBoundingClientRect();return o.touches?(i=o.touches[0].clientX-f.left,e=o.touches[0].clientY-f.top):(i=o.clientX-f.left,e=o.clientY-f.top),{x:i,y:e}},y=c.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e},L=c.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=M},b=c.bindEvents=function(t,i,e){t.events||(t.events={}),a(i,function(o){t.events[o]=function(){e.apply(t,arguments)},y(t.chart.canvas,o,t.events[o])})},W=c.unbindEvents=function(t,i){a(i,function(e,o){L(t.chart.canvas,o,e)})},H=c.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},U=c.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},at=c.getMaximumSize=c.getMaximumWidth,lt=c.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,o=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=o+"px",i.canvas.height=o*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))},I=c.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},N=c.fontString=function(t,i,e){return i+" "+t+"px "+e},nt=c.longestText=function(t,i,e,o){o=o||1/0,t.font=i;var u=0;return a(e,function(f){var v=o<1/0&&f.length>o?f.slice(0,o)+"...":f,x=t.measureText(v).width;u=x>u?x:u}),u},ut=c.drawRoundedRectangle=function(t,i,e,o,u,f){t.beginPath(),t.moveTo(i+f,e),t.lineTo(i+o-f,e),t.quadraticCurveTo(i+o,e,i+o,e+f),t.lineTo(i+o,e+u-f),t.quadraticCurveTo(i+o,e+u,i+o-f,e+u),t.lineTo(i+f,e+u),t.quadraticCurveTo(i,e+u,i,e+u-f),t.lineTo(i,e+f),t.quadraticCurveTo(i,e,i+f,e),t.closePath()};s.instances={},s.Type=function(t,i,e){this.options=i,this.chart=e,this.id=j(),s.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},n(s.Type.prototype,{initialize:function(){return this},clear:function(){return I(this.chart),this},stop:function(){return r(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=H(this.chart.canvas),o=this.options.maintainAspectRatio?e/this.chart.aspectRatio:U(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=o,lt(this.chart),typeof t=="function"&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:M,render:function(t){return t&&this.reflow(),this.options.animation&&!t?c.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return Y(this.options.legendTemplate,this)},destroy:function(){this.clear(),W(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete s.instances[this.id]},showTooltip:function(t,i){typeof this.activeElements=="undefined"&&(this.activeElements=[]);var e=function(R){var A=!1;return R.length!==this.activeElements.length?(A=!0,A):(a(R,function(F,V){F!==this.activeElements[V]&&(A=!0)},this),A)}.call(this,t);if(!(!e&&!i)){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var o,u,f=this.datasets.length-1;f>=0&&(o=this.datasets[f].points||this.datasets[f].bars||this.datasets[f].segments,u=g(o,t[0]),u===-1);f--);var v=[],x=[],P=function(R){var A=[],F,V=[],T=[],E,D,X,ft;return c.each(this.datasets,function(G){F=G.points||G.bars||G.segments,F[u]&&F[u].hasValue()&&A.push(F[u])}),c.each(A,function(G){V.push(G.x),T.push(G.y),v.push(c.template(this.options.multiTooltipTemplate,G)),x.push({fill:G._saved.fillColor||G.fillColor,stroke:G._saved.strokeColor||G.strokeColor})},this),ft=Q(T),D=J(T),X=Q(V),E=J(V),{x:X>this.chart.width/2?X:E,y:(ft+D)/2}}.call(this,u);new s.MultiTooltip({x:P.x,y:P.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:v,legendColors:x,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else a(t,function(R){var A=R.tooltipPosition();new s.Tooltip({x:Math.round(A.x),y:Math.round(A.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:Y(this.options.tooltipTemplate,R),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),s.Type.extend=function(t){var i=this,e=function(){return i.apply(this,arguments)};if(e.prototype=l(i.prototype),n(e.prototype,t),e.extend=s.Type.extend,t.name||i.prototype.name){var o=t.name||i.prototype.name,u=s.defaults[i.prototype.name]?l(s.defaults[i.prototype.name]):{};s.defaults[o]=n(u,t.defaults),s.types[o]=e,s.prototype[o]=function(f,v){var x=h(s.defaults.global,s.defaults[o],v||{});return new e(f,x,this)}}else O("Name not provided for this chart, so it hasn't been registered");return i},s.Element=function(t){n(this,t),this.initialize.apply(this,arguments),this.save()},n(s.Element.prototype,{initialize:function(){},restore:function(t){return t?a(t,function(i){this[i]=this._saved[i]},this):n(this,this._saved),this},save:function(){return this._saved=l(this),delete this._saved._saved,this},update:function(t){return a(t,function(i,e){this._saved[e]=this[e],this[e]=i},this),this},transition:function(t,i){return a(t,function(e,o){this[o]=(e-this._saved[o])*i+this._saved[o]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return B(this.value)}}),s.Element.extend=S,s.Point=s.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,Math.PI*2),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),s.Arc=s.Element.extend({inRange:function(t,i){var e=c.getAngleFromPoint(this,{x:t,y:i}),o=e.angle>=this.startAngle&&e.angle<=this.endAngle,u=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return o&&u},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=t||1,e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),s.Rectangle=s.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,o=this.x+i,u=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(e+=f,o-=f,u+=f),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,u),t.lineTo(o,u),t.lineTo(o,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return this.y<this.base?t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base:t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.base&&i<=this.y}}),s.Tooltip=s.Element.extend({draw:function(){var t=this.chart.ctx;t.font=N(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,o=this.fontSize+2*this.yPadding,u=o+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-u<0&&(this.yAlign="below");var f=this.x-e/2,v=this.y-u;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":v=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill();break}switch(this.xAlign){case"left":f=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":f=this.x-(this.cornerRadius+this.caretHeight);break}ut(t,f,v,e,o,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,f+e/2,v+o/2)}}}),s.MultiTooltip=s.Element.extend({initialize:function(){this.font=N(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=N(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+this.yPadding*2+this.titleFontSize*1.5,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=nt(this.ctx,this.font,this.labels)+this.fontSize+3,e=J([i,t]);this.width=e+this.xPadding*2;var o=this.height/2;this.y-o<0?this.y=o:this.y+o>this.chart.height&&(this.y=this.chart.height-o),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return t===0?i+this.titleFontSize/2:i+(this.fontSize*1.5*e+this.fontSize/2)+this.titleFontSize*1.5},draw:function(){if(this.custom)this.custom(this);else{ut(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,c.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),s.Scale=s.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=it(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(Y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?nt(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-this.fontSize*1.5-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t=this.endPoint-this.startPoint,i;for(this.calculateYRange(t),this.buildYLabels(),this.calculateXLabelRotation();t>this.endPoint-this.startPoint;)t=this.endPoint-this.startPoint,i=this.yLabelWidth,this.calculateYRange(t),this.buildYLabels(),i<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t=this.xLabels[0],i=this.xLabels[this.xLabels.length-1],e=this.ctx.measureText(t).width,o=this.ctx.measureText(i).width,u,f;if(this.xScalePaddingRight=o/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.xLabelLimit=1/0,this.display){var v=nt(this.ctx,this.font,this.xLabels),x=0,P,R;this.xLabelWidth=v;for(var A=Math.floor(this.calculateX(1)-this.calculateX(0))-6,F=this.endPoint-this.startPoint,V=0;this.xLabelWidth>A&&this.xLabelRotation<=90&&this.xLabelRotation>=0;)if(x<F/2||this.LabelLimit<5?(this.xLabelRotation++,P=Math.cos($(this.xLabelRotation)),u=P*e,f=P*o,u+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=u+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2):(this.xLabelLimit<1/0?this.xLabelLimit-=1:this.xLabelLimit=Math.max.apply(null,this.xLabels.map(function(T){return T.length}))-1,v=nt(this.ctx,this.font,this.xLabels,this.xLabelLimit),t.length>this.xLabelLimit&&(e=this.ctx.measureText(t.slice(0,this.xLabelLimit)+"...").width),i.length>this.xLabelLimit&&(o=this.ctx.measureText(i.slice(0,this.xLabelLimit)+"...").width)),x=Math.sin($(this.xLabelRotation))*v+3,this.xLabelWidth=P*v,++V>=1e3){console.warn("Too many iterations!");break}this.xLabelRotation>0&&(this.endPoint-=x)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:M,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=this.xLabelRotation>0,e=this.width-(this.xScalePaddingLeft+this.xScalePaddingRight),o=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),u=o*t+this.xScalePaddingLeft;return this.offsetGridLines&&(u+=o/2),Math.round(u)},update:function(t){c.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,a(this.yLabels,function(o,u){var f=this.endPoint-i*u,v=Math.round(f),x=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(o,e-10,f),u===0&&!x&&(x=!0),x&&t.beginPath(),u>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),v+=c.aliasPixel(t.lineWidth),x&&(t.moveTo(e,v),t.lineTo(this.width,v),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,v),t.lineTo(e,v),t.stroke(),t.closePath()},this),a(this.xLabels,function(o,u){var f=this.calculateX(u)+Z(this.lineWidth),v=this.calculateX(u-(this.offsetGridLines?.5:0))+Z(this.lineWidth),x=this.xLabelRotation>0,P=this.showVerticalLines;u===0&&!P&&(P=!0),P&&t.beginPath(),u>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),P&&(t.moveTo(v,this.endPoint),t.lineTo(v,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(v,this.endPoint),t.lineTo(v,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(f,x?this.endPoint+12:this.endPoint+8),t.rotate($(this.xLabelRotation)*-1),t.font=this.font,t.textAlign=x?"right":"center",t.textBaseline=x?"middle":"top",o.length>this.xLabelLimit?t.fillText(o.slice(0,this.xLabelLimit)+"...",0,0):t.fillText(o,0,0),t.restore()},this))}}),s.RadialScale=s.Element.extend({initialize:function(){this.size=Q([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=it(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(Y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return Math.PI*2/this.valuesCount},setScaleSize:function(){var t=Q([this.height/2-this.pointLabelFontSize-5,this.width/2]),i,e,o,u,f=this.width,v,x,P=0,R,A,F,V,T,E,D;for(this.ctx.font=N(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;e<this.valuesCount;e++)i=this.getPointPosition(e,t),o=this.ctx.measureText(Y(this.templateString,{value:this.labels[e]})).width+5,e===0||e===this.valuesCount/2?(u=o/2,i.x+u>f&&(f=i.x+u,v=e),i.x-u<P&&(P=i.x-u,R=e)):e<this.valuesCount/2?i.x+o>f&&(f=i.x+o,v=e):e>this.valuesCount/2&&i.x-o<P&&(P=i.x-o,R=e);F=P,V=Math.ceil(f-this.width),x=this.getIndexAngle(v),A=this.getIndexAngle(R),T=V/Math.sin(x+Math.PI/2),E=F/Math.sin(A+Math.PI/2),T=B(T)?T:0,E=B(E)?E:0,this.drawingArea=t-(E+T)/2,this.setCenterPoint(E,T)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,o=t+this.drawingArea;this.xCenter=(o+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=Math.PI*2/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(a(this.yLabels,function(R,A){if(A>0){var F=A*(this.drawingArea/this.steps),V=this.yCenter-F,T;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,F,0,Math.PI*2),t.closePath(),t.stroke();else{t.beginPath();for(var E=0;E<this.valuesCount;E++)T=this.getPointPosition(E,this.calculateCenterOffset(this.min+A*this.stepValue)),E===0?t.moveTo(T.x,T.y):t.lineTo(T.x,T.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=N(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var D=t.measureText(R).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-D/2-this.backdropPaddingX,V-this.fontSize/2-this.backdropPaddingY,D+this.backdropPaddingX*2,this.fontSize+this.backdropPaddingY*2)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(R,this.xCenter,V)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var o=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=N(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var u=this.labels.length,f=this.labels.length/2,v=f/2,x=i<v||i>u-v,P=i===v||i===u-v;i===0||i===f?t.textAlign="center":i<f?t.textAlign="left":t.textAlign="right",P?t.textBaseline="middle":x?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[i],o.x,o.y)}}}}}),c.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){a(s.instances,function(i){if(i.options.responsive)try{i.resize(i.render,!0)}catch(e){console.log(e.message)}})},50)}}()),q?define(function(){return s}):z.exports&&(z.exports=s),k.Chart=s,s.noConflict=function(){return k.Chart=m,s}}).call(this),function(){"use strict";var k=this,m=k.Chart,s=m.helpers,c={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Bar",defaults:c,initialize:function(a){var l=this.options;this.ScaleClass=m.Scale.extend({offsetGridLines:!0,calculateBarX:function(n,h,g){var w=this.calculateBaseWidth(),d=this.calculateX(g)-w/2,_=this.calculateBarWidth(n);return d+_*h+h*l.barDatasetSpacing+_/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*l.barValueSpacing},calculateBarWidth:function(n){var h=this.calculateBaseWidth()-(n-1)*l.barDatasetSpacing;return h/n}}),this.datasets=[],this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(n){var h=n.type!=="mouseout"?this.getBarsAtEvent(n):[];this.eachBars(function(g){g.restore(["fillColor","strokeColor"])}),s.each(h,function(g){g.fillColor=g.highlightFill,g.strokeColor=g.highlightStroke}),this.showTooltip(h)}),this.BarClass=m.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),s.each(a.datasets,function(n,h){var g={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,bars:[]};this.datasets.push(g),s.each(n.data,function(w,d){g.bars.push(new this.BarClass({value:w,label:a.labels[d],datasetLabel:n.label,strokeColor:n.strokeColor,fillColor:n.fillColor,highlightFill:n.highlightFill||n.fillColor,highlightStroke:n.highlightStroke||n.strokeColor}))},this)},this),this.buildScale(a.labels),this.BarClass.prototype.base=this.calculateBarBase(),this.eachBars(function(n,h,g){s.extend(n,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,g,h),y:this.calculateBarBase()}),n.save()},this),this.render()},calculateBarBase:function(){var a=function(n){return n>=0?1:-1},l=this.scale.endPoint;return this.scale.beginAtZero||a(this.scale.min)!=a(this.scale.max)?l=this.scale.calculateY(0):a(this.scale.min)<0&&a(this.scale.max)<0&&(l=this.scale.startPoint),l},update:function(){this.scale.update(),s.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachBars(function(a){a.save()}),this.render()},eachBars:function(a){s.each(this.datasets,function(l,n){s.each(l.bars,a,this,n)},this)},getBarsAtEvent:function(a){for(var l=[],n=s.getRelativePosition(a),h=function(d){l.push(d.bars[g])},g,w=0;w<this.datasets.length;w++)for(g=0;g<this.datasets[w].bars.length;g++)if(this.datasets[w].bars[g].inRange(n.x,n.y))return s.each(this.datasets,h),l;return l},buildScale:function(a){var l=this,n=function(){var w=[];return l.eachBars(function(d){w.push(d.value)}),w},h=function(){var w=n().reduce(function(d,_){return d=d.concat(_)},[]);return l.options.scaleBeginAtZero&&Math.min.apply(null,w)>=0},g={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:a.length,beginAtZero:h(),integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(w){var d=s.calculateScaleRange(n(),w,this.fontSize,h(),this.integersOnly);s.extend(this,d)},xLabels:a,font:s.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&s.extend(g,{calculateYRange:s.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(g)},addData:function(a,l){s.each(a,function(n,h){this.datasets[h].bars.push(new this.BarClass({value:n,label:l,x:this.scale.calculateBarX(this.datasets.length,h,this.scale.valuesCount+1),y:this.calculateBarBase(),width:this.scale.calculateBarWidth(this.datasets.length),base:this.calculateBarBase(),strokeColor:this.datasets[h].strokeColor,fillColor:this.datasets[h].fillColor}))},this),this.scale.addXLabel(l),this.update()},removeData:function(){this.scale.removeXLabel(),s.each(this.datasets,function(a){a.bars.shift()},this),this.update()},reflow:function(){s.extend(this.BarClass.prototype,{y:this.calculateBarBase(),base:this.calculateBarBase()});var a=s.extend({height:this.chart.height,width:this.chart.width});this.scale.update(a)},draw:function(a){var l=a||1;this.clear();var n=this.chart.ctx;this.scale.draw(l),s.each(this.datasets,function(h,g){s.each(h.bars,function(w,d){w.hasValue()&&(w.base=this.calculateBarBase(),w.transition({x:this.scale.calculateBarX(this.datasets.length,g,d),y:this.scale.calculateY(w.value),width:this.scale.calculateBarWidth(this.datasets.length)},l).draw())},this)},this)}})}.call(this),function(){"use strict";var k=this,m=k.Chart,s=m.helpers,c={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Doughnut",defaults:c,initialize:function(a){this.segments=[],this.outerRadius=(s.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=m.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getSegmentsAtEvent(l):[];s.each(this.segments,function(h){h.restore(["fillColor"])}),s.each(n,function(h){h.fillColor=h.highlightColor}),this.showTooltip(n)}),this.calculateTotal(a),s.each(a,function(l,n){this.addData(l,n,!0)},this),this.render()},getSegmentsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.segments,function(h){h.inRange(n.x,n.y)&&l.push(h)},this),l},addData:function(a,l,n){var h=l||this.segments.length;this.segments.splice(h,0,new this.SegmentArc({value:a.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:a.color,highlightColor:a.highlight||a.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:Math.PI*1.5,circumference:this.options.animateRotate?0:this.calculateCircumference(a.value),label:a.label})),n||(this.reflow(),this.update())},calculateCircumference:function(a){return Math.PI*2*(Math.abs(a)/this.total)},calculateTotal:function(a){this.total=0,s.each(a,function(l){this.total+=Math.abs(l.value)},this)},update:function(){this.calculateTotal(this.segments),s.each(this.activeElements,function(a){a.restore(["fillColor"])}),s.each(this.segments,function(a){a.save()}),this.render()},removeData:function(a){var l=s.isNumber(a)?a:this.segments.length-1;this.segments.splice(l,1),this.reflow(),this.update()},reflow:function(){s.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(s.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,s.each(this.segments,function(a){a.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(a){var l=a||1;this.clear(),s.each(this.segments,function(n,h){n.transition({circumference:this.calculateCircumference(n.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},l),n.endAngle=n.startAngle+n.circumference,n.draw(),h===0&&(n.startAngle=Math.PI*1.5),h<this.segments.length-1&&(this.segments[h+1].startAngle=n.endAngle)},this)}}),m.types.Doughnut.extend({name:"Pie",defaults:s.merge(c,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var k=this,m=k.Chart,s=m.helpers,c={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Line",defaults:c,initialize:function(a){this.PointClass=m.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(l){return Math.pow(l-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getPointsAtEvent(l):[];this.eachPoints(function(h){h.restore(["fillColor","strokeColor"])}),s.each(n,function(h){h.fillColor=h.highlightFill,h.strokeColor=h.highlightStroke}),this.showTooltip(n)}),s.each(a.datasets,function(l){var n={label:l.label||null,fillColor:l.fillColor,strokeColor:l.strokeColor,pointColor:l.pointColor,pointStrokeColor:l.pointStrokeColor,points:[]};this.datasets.push(n),s.each(l.data,function(h,g){n.points.push(new this.PointClass({value:h,label:a.labels[g],datasetLabel:l.label,strokeColor:l.pointStrokeColor,fillColor:l.pointColor,highlightFill:l.pointHighlightFill||l.pointColor,highlightStroke:l.pointHighlightStroke||l.pointStrokeColor}))},this),this.buildScale(a.labels),this.eachPoints(function(h,g){s.extend(h,{x:this.scale.calculateX(g),y:this.scale.endPoint}),h.save()},this)},this),this.render()},update:function(){this.scale.update(),s.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachPoints(function(a){a.save()}),this.render()},eachPoints:function(a){s.each(this.datasets,function(l){s.each(l.points,a,this)},this)},getPointsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.datasets,function(h){s.each(h.points,function(g){g.inRange(n.x,n.y)&&l.push(g)})},this),l},buildScale:function(a){var l=this,n=function(){var g=[];return l.eachPoints(function(w){g.push(w.value)}),g},h={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:a.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(g){var w=s.calculateScaleRange(n(),g,this.fontSize,this.beginAtZero,this.integersOnly);s.extend(this,w)},xLabels:a,font:s.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&s.extend(h,{calculateYRange:s.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new m.Scale(h)},addData:function(a,l){s.each(a,function(n,h){this.datasets[h].points.push(new this.PointClass({value:n,label:l,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[h].pointStrokeColor,fillColor:this.datasets[h].pointColor}))},this),this.scale.addXLabel(l),this.update()},removeData:function(){this.scale.removeXLabel(),s.each(this.datasets,function(a){a.points.shift()},this),this.update()},reflow:function(){var a=s.extend({height:this.chart.height,width:this.chart.width});this.scale.update(a)},draw:function(a){var l=a||1;this.clear();var n=this.chart.ctx,h=function(d){return d.value!==null},g=function(d,_,S){return s.findNextWhere(_,h,S)||d},w=function(d,_,S){return s.findPreviousWhere(_,h,S)||d};this.scale.draw(l),s.each(this.datasets,function(d){var _=s.where(d.points,h);s.each(d.points,function(S,M){S.hasValue()&&S.transition({y:this.scale.calculateY(S.value),x:this.scale.calculateX(M)},l)},this),this.options.bezierCurve&&s.each(_,function(S,M){var j=M>0&&M<_.length-1?this.options.bezierCurveTension:0;S.controlPoints=s.splineCurve(w(S,_,M),S,g(S,_,M),j),S.controlPoints.outer.y>this.scale.endPoint?S.controlPoints.outer.y=this.scale.endPoint:S.controlPoints.outer.y<this.scale.startPoint&&(S.controlPoints.outer.y=this.scale.startPoint),S.controlPoints.inner.y>this.scale.endPoint?S.controlPoints.inner.y=this.scale.endPoint:S.controlPoints.inner.y<this.scale.startPoint&&(S.controlPoints.inner.y=this.scale.startPoint)},this),n.lineWidth=this.options.datasetStrokeWidth,n.strokeStyle=d.strokeColor,n.beginPath(),s.each(_,function(S,M){if(M===0)n.moveTo(S.x,S.y);else if(this.options.bezierCurve){var j=w(S,_,M);n.bezierCurveTo(j.controlPoints.outer.x,j.controlPoints.outer.y,S.controlPoints.inner.x,S.controlPoints.inner.y,S.x,S.y)}else n.lineTo(S.x,S.y)},this),n.stroke(),this.options.datasetFill&&_.length>0&&(n.lineTo(_[_.length-1].x,this.scale.endPoint),n.lineTo(_[0].x,this.scale.endPoint),n.fillStyle=d.fillColor,n.closePath(),n.fill()),s.each(_,function(S){S.draw()})},this)}})}.call(this),function(){"use strict";var k=this,m=k.Chart,s=m.helpers,c={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"PolarArea",defaults:c,initialize:function(a){this.segments=[],this.SegmentArc=m.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new m.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:a.length}),this.updateScaleRange(a),this.scale.update(),s.each(a,function(l,n){this.addData(l,n,!0)},this),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getSegmentsAtEvent(l):[];s.each(this.segments,function(h){h.restore(["fillColor"])}),s.each(n,function(h){h.fillColor=h.highlightColor}),this.showTooltip(n)}),this.render()},getSegmentsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.segments,function(h){h.inRange(n.x,n.y)&&l.push(h)},this),l},addData:function(a,l,n){var h=l||this.segments.length;this.segments.splice(h,0,new this.SegmentArc({fillColor:a.color,highlightColor:a.highlight||a.color,label:a.label,value:a.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(a.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:Math.PI*1.5})),n||(this.reflow(),this.update())},removeData:function(a){var l=s.isNumber(a)?a:this.segments.length-1;this.segments.splice(l,1),this.reflow(),this.update()},calculateTotal:function(a){this.total=0,s.each(a,function(l){this.total+=l.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(a){var l=[];s.each(a,function(h){l.push(h.value)});var n=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:s.calculateScaleRange(l,s.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);s.extend(this.scale,n,{size:s.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),s.each(this.segments,function(a){a.save()}),this.reflow(),this.render()},reflow:function(){s.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),s.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),s.each(this.segments,function(a){a.update({outerRadius:this.scale.calculateCenterOffset(a.value)})},this)},draw:function(a){var l=a||1;this.clear(),s.each(this.segments,function(n,h){n.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(n.value)},l),n.endAngle=n.startAngle+n.circumference,h===0&&(n.startAngle=Math.PI*1.5),h<this.segments.length-1&&(this.segments[h+1].startAngle=n.endAngle),n.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var k=this,m=k.Chart,s=m.helpers;m.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(c){this.PointClass=m.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(c),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(a){var l=a.type!=="mouseout"?this.getPointsAtEvent(a):[];this.eachPoints(function(n){n.restore(["fillColor","strokeColor"])}),s.each(l,function(n){n.fillColor=n.highlightFill,n.strokeColor=n.highlightStroke}),this.showTooltip(l)}),s.each(c.datasets,function(a){var l={label:a.label||null,fillColor:a.fillColor,strokeColor:a.strokeColor,pointColor:a.pointColor,pointStrokeColor:a.pointStrokeColor,points:[]};this.datasets.push(l),s.each(a.data,function(n,h){var g;this.scale.animation||(g=this.scale.getPointPosition(h,this.scale.calculateCenterOffset(n))),l.points.push(new this.PointClass({value:n,label:c.labels[h],datasetLabel:a.label,x:this.options.animation?this.scale.xCenter:g.x,y:this.options.animation?this.scale.yCenter:g.y,strokeColor:a.pointStrokeColor,fillColor:a.pointColor,highlightFill:a.pointHighlightFill||a.pointColor,highlightStroke:a.pointHighlightStroke||a.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(c){s.each(this.datasets,function(a){s.each(a.points,c,this)},this)},getPointsAtEvent:function(c){var a=s.getRelativePosition(c),l=s.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},a),n=Math.PI*2/this.scale.valuesCount,h=Math.round((l.angle-Math.PI*1.5)/n),g=[];return(h>=this.scale.valuesCount||h<0)&&(h=0),l.distance<=this.scale.drawingArea&&s.each(this.datasets,function(w){g.push(w.points[h])}),g},buildScale:function(c){this.scale=new m.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:c.labels,valuesCount:c.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(c.datasets),this.scale.buildYLabels()},updateScaleRange:function(c){var a=function(){var n=[];return s.each(c,function(h){h.data?n=n.concat(h.data):s.each(h.points,function(g){n.push(g.value)})}),n}(),l=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:s.calculateScaleRange(a,s.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);s.extend(this.scale,l)},addData:function(c,a){this.scale.valuesCount++,s.each(c,function(l,n){var h=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(l));this.datasets[n].points.push(new this.PointClass({value:l,label:a,x:h.x,y:h.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(a),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),s.each(this.datasets,function(c){c.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(c){c.save()}),this.reflow(),this.render()},reflow:function(){s.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:s.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(c){var a=c||1,l=this.chart.ctx;this.clear(),this.scale.draw(),s.each(this.datasets,function(n){s.each(n.points,function(h,g){h.hasValue()&&h.transition(this.scale.getPointPosition(g,this.scale.calculateCenterOffset(h.value)),a)},this),l.lineWidth=this.options.datasetStrokeWidth,l.strokeStyle=n.strokeColor,l.beginPath(),s.each(n.points,function(h,g){g===0?l.moveTo(h.x,h.y):l.lineTo(h.x,h.y)},this),l.closePath(),l.stroke(),l.fillStyle=n.fillColor,l.fill(),s.each(n.points,function(h){h.hasValue()&&h.draw()})},this)}})}.call(this)},889252:function(z,k,m){"use strict";var s=m(805187),c=m.n(s),a=m(860921),l=m.n(a),n=m(714605),h=m(564169),g=m.n(h),w=m(135118);YUI.add("@sqs/layout-engine/chartjs-helpers",function(d){d.namespace("ChartJS");var _=500,S=[],M=d.ChartJS.getDefaultChartData=function(r){switch(parseInt(r,10)){case w.Z.CHART_BAR:return{data:[[150],[250],[150]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"})]};case w.Z.CHART_LINE:return{data:[[150,100],[250,200],[150,350]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("GDP",null,{project:"scripts-v6.layout-engine"})]};case w.Z.CHART_PIE:return{data:[[150],[200],[150]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"})]}}};function j(r){S.push(r)}function O(r){S.remove(r)}function q(){var r=S.map(function(C){return C.node.getDOMNode()===null?C:null});r.filter(function(C){return C}).forEach(function(C){C.destroy()})}function B(r,C,p){var y={default:[[121,121,121],[191,191,191],[229,229,229],[156,156,156],[0,0,0]],Cobblestone:[[41,31,22],[180,158,146],[127,112,105],[76,61,48],[69,45,35]],Italia:[[124,184,200],[2,100,171],[2,155,59],[227,2,27],[202,180,130]],Muted:[[52,43,43],[112,105,100],[156,148,131],[212,207,198],[240,226,208]],Primary:[[240,82,59],[247,180,19],[36,128,196],[144,187,98],[134,95,144]],Warm:[[153,0,0],[226,71,45],[233,148,48],[248,220,171],[251,243,171]],Cool:[[16,44,99],[7,75,230],[81,146,235],[158,173,211],[225,220,252]],"Tea Party":[[115,13,3],[182,125,44],[234,195,148],[231,144,72],[64,2,18]],Highway:[[176,201,217],[166,166,166],[89,72,57],[191,108,59],[230,134,50]],Shops:[[227,227,230],[69,78,89],[95,205,217],[113,153,138],[213,230,69]],Suburbs:[[73,33,48],[227,227,227],[69,84,115],[206,208,159],[236,101,102]],"DB-Nine":[[134,135,136],[168,182,111],[169,143,119],[227,126,94],[100,138,189]],"M-Three":[[98,140,187],[209,191,78],[90,98,105],[13,76,136],[188,199,208]],Thunderbird:[[217,60,73],[103,189,218],[231,231,192],[227,170,179],[177,202,123]]},L={dark:1,medium:.75,light:.5,xlight:.2,off:0};r in y||(r="default");var b=y[r];return"rgba("+b[C%b.length]+","+L[p]+")"}function J(r){return{scaleFontFamily:r.getComputedStyle("font-family"),scaleFontSize:parseInt(r.getComputedStyle("font-size"),10),scaleFontStyle:r.getComputedStyle("font-style"),tooltipFontFamily:r.getComputedStyle("font-family"),tooltipFontSize:parseInt(r.getComputedStyle("font-size"),10)*.8,tooltipFontStyle:r.getComputedStyle("font-style"),tooltipTitleFontFamily:r.getComputedStyle("font-family"),tooltipTitleFontSize:parseInt(r.getComputedStyle("font-size"),10),tooltipTitleFontStyle:"bold",scaleLabel:"<%= '  ' + value%>"}}function Q(r){var C=r;return C.get("tagName")!=="CANVAS"&&(C=C.one("canvas")),C}function tt(r,C){if(C){var p=r.sampleLabels;r.sampleLabels=r.seriesLabels,r.seriesLabels=p,r.data=d.Array(r.data[0]).map(function(W,H){return d.Array(r.data).map(function(U){return U[H]})})}var y=Math.min(r.data.length,r.sampleLabels.length),L=Math.min(r.data[0].length,r.seriesLabels.length);r.sampleLabels=r.sampleLabels.slice(0,y),r.seriesLabels=r.seriesLabels.slice(0,L),r.data=r.data.slice(0,y);for(var b=0;b<r.data.length;b++)r.data[b]=r.data[b].slice(0,L);return r}function it(r,C,p){var y=r.datasets[0][C].length,L=p.sampleLabels.length-y,b=r.datasets.length,W=p.seriesLabels.length-b;return W||L&&W}function $(r,C,p){var y=r.datasets.length,L=p.seriesLabels.length-y,b=0;if(L>0){var W=r.datasets[y-1];for(b=0;b<L;b++)r.datasets.push(d.clone(W))}else L<0&&(r.datasets=r.datasets.slice(0,p.seriesLabels.length));var H=r.datasets[0][C].length,U=p.sampleLabels.length-H;if(U>0){var at=H;for(b=0;b<U;b++){var lt=d.Array(p.seriesLabels).map(function(){return 0});r.addData(lt,p.sampleLabels[at++])}}else if(U<0)for(b=0;b>U;b--)r.removeData();var I=0;for(I=0;I<p.sampleLabels.length;I++)r.scale.xLabels[I]=p.sampleLabels[I];for(I=0;I<r.datasets.length;I++)for(r.datasets[I].label=p.seriesLabels[I],b=0;b<r.datasets[I][C].length;b++){var N=p.data[b][I];(isNaN(N)||N===null||N===void 0)&&(N=0),r.datasets[I][C][b].value=[N],r.datasets[I][C][b].label=p.sampleLabels[b]}r.update()}function et(r,C){return function(p){var y="";y+='<ul class="'+d.Escape.html(p.name.toLowerCase())+'-legend">';for(var L=0;L<p[r].length;L++)y+='<li><span style="background-color:'+p[r][L][C]+'"></span>',p[r][L].label&&(y+=d.Escape.html(p[r][L].label)),y+="</li>";return y+="</ul>",y}}var Z=function(r,C,p,y,L){this.node=r,this._options=L||{},this._canvas=Q(r),this._narrow=!1,this._palette=p,this._flip=y,this._data=tt(d.clone(C,!0),this._flip),this._makeChart(),this.generateLegend(),this.resize(),j(this)};Z.prototype={destroy:function(){this._chart.destroy(),O(this)},resize:function(){var r=this._canvas.getDOMNode();r?r.parentNode.clientWidth>0&&(this._chart.stop(),this._chart.resize(this._chart.render,!0),r.parentNode.clientWidth<_?(this._chart.name==="Bar"&&!this._narrow&&(this._options=d.merge(this._options,{barValueSpacing:5,barDatasetSpacing:1}),this._rebuildChart()),this.node.addClass("narrow-chart"),this._narrow=!0):(this._chart.name==="Bar"&&this._narrow&&(this._options=d.merge(this._options,{barValueSpacing:20,barDatasetSpacing:5}),this._rebuildChart()),this.node.removeClass("narrow-chart"),this._narrow=!1)):q()},generateLegend:function(){this.node.all(".legend-content").each(function(r){r.empty(),r.append(this._chart.generateLegend())},this)},_rebuildChart:function(){this._chart.destroy(),this._makeChart()}};var ht=d.namespace("ChartJS").BarChart=d.extend(function(){Z.apply(this,arguments)},Z,{_makeChart:function(){for(var r=d.merge(J(this.node),{barShowStroke:!0,datasetStrokeWidth:3,animationSteps:25,barValueSpacing:20,barDatasetSpacing:5,legendTemplate:et("datasets","fillColor")},this._options),C={labels:this._data.sampleLabels,datasets:[]},p=0;p<this._data.seriesLabels.length;p++){for(var y=[],L=0;L<this._data.sampleLabels.length;L++)y.push(this._data.data[L][p]);C.datasets.push({label:this._data.seriesLabels[p],data:y,fillColor:B(this._palette,p,"dark"),strokeColor:"rgba(0,0,0,0)",highlightFill:B(this._palette,p,"medium"),highlightStroke:"rgba(0,0,0,0)"})}this._canvas.empty();var b=this._canvas.getDOMNode().getContext("2d");this._chart=new(g())(b).Bar(C,r)},sync:function(r){c()(r)?this._data=M(w.Z.CHART_BAR):this._data=tt(d.clone(r,!0),this._flip),it(this._chart,"bars",this._data)?this._rebuildChart():$(this._chart,"bars",this._data),this.generateLegend(),this.resize()}}),ot=d.ChartJS.LineChart=d.extend(function(){Z.apply(this,arguments)},Z,{_makeChart:function(){for(var r=d.merge(J(this.node),{datasetFill:!1,animationSteps:25,legendTemplate:et("datasets","strokeColor")},this._options),C={labels:this._data.sampleLabels,datasets:[]},p=0;p<this._data.seriesLabels.length;p++){for(var y=[],L=0;L<this._data.sampleLabels.length;L++)y.push(this._data.data[L][p]);C.datasets.push({label:this._data.seriesLabels[p],data:y,fillColor:"rgba(0,0,0,0)",strokeColor:B(this._palette,p,"dark"),pointColor:B(this._palette,p,"dark"),pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:B(this._palette,p,"medium")})}var b=this._canvas.getDOMNode().getContext("2d");this._chart=new(g())(b).Line(C,r)},sync:function(r){c()(r)?this._data=M(w.Z.CHART_LINE):this._data=tt(d.clone(r,!0),this._flip),it(this._chart,"points",this._data)?this._rebuildChart():$(this._chart,"points",this._data),this.generateLegend(),this.resize()}});function rt(r){var C=d.Array(r.data).reduce(function(p,y){return p+(y.length>0?y[0]:0)},0);return C===0&&(r.data=d.Array(r.data).map(function(p){return d.Array(p).map(function(y,L){return L===0?1:y})})),r}var Y=d.ChartJS.PieChart=d.extend(function(){Z.apply(this,arguments)},Z,{_makeChart:function(){for(var r=d.merge(J(this.node),{datasetFill:!1,percentageInnerCutout:60,animationSteps:25,legendTemplate:et("segments","fillColor")},this._options),C=[],p=0;p<this._data.sampleLabels.length;p++)C.push({label:this._data.sampleLabels[p],value:this._data.data[p][0],color:B(this._palette,p,"dark"),highlight:B(this._palette,p,"medium")});var y=this._canvas.getDOMNode().getContext("2d");this._chart=new(g())(y).Pie(C,r)},sync:function(r){var C=0;c()(r)?this._data=M(w.Z.CHART_PIE):this._data=rt(tt(d.clone(r,!0),this._flip));var p=this._chart,y=this._data,L=p.segments.length,b=y.sampleLabels.length-L;if(b>0){var W=L;for(C=0;C<b;C++)p.addData({value:0,label:y.sampleLabels[W],color:B(this._palette,W,"dark"),highlight:B(this._palette,W,"medium")}),W++}else if(b<0)for(C=0;C>b;C--)p.removeData();for(var H=0;H<p.segments.length;H++)p.segments[H].value=y.data[H][0],p.segments[H].label=y.sampleLabels[H];p.update(),this.generateLegend(),this.resize()}});d.ChartJS.createChart=function(r,C,p,y,L){function b(at){switch(at){case w.Z.CHART_BAR:return ht;case w.Z.CHART_LINE:return ot;case w.Z.CHART_PIE:return Y}}var W=parseInt(r,10);(!p||!p.data||p.data.length===0)&&(p=M(W));var H=b(W),U=new H(C,p,y,L);return U};var ct=d.ChartJS.initializeCharts=function(){function r(C){q();var p=S.map(function(W){return W.node}),y=p.indexOf(C)>=0;if(!y){var L=C.getAttribute("data-settings")||"{}";try{var b=JSON.parse(L.replace(/\&quot;/g,'"'));d.ChartJS.createChart(b.chartType,C,b.dataTable,b.palette,b.flip)}catch(W){if(W instanceof SyntaxError)console.error("[layout-engine/chartjs-helpers] Failed to render chart. Parse error.");else throw W}}}d.all(".sqs-block.chart-block .chart-block-container").each(r)},K;function st(){function r(){clearTimeout(K),K=setTimeout(function(){S.forEach(function(C){C.resize()})},50)}d.one(d.config.win).after("resize",r)}d.config.win.Squarespace=d.config.win.Squarespace||{onInitialize:l(),onDestroy:l()},d.config.win.Squarespace.onInitialize(d,function(){ct(),st()}),d.config.win.Squarespace.onDestroy(d,function(){clearTimeout(K),S.forEach(function(r){r.destroy()})})},"1.0",{requires:[]})},384373:function(z,k,m){"use strict";var s=m(259049),c=m.n(s);YUI.add("squarespace-chartjs-helpers",function(a){},"1.0",{requires:["@sqs/layout-engine/chartjs-helpers"]})},133177:function(z,k,m){"use strict";var s=m(384373),c=m(889252)},805187:function(z,k,m){var s=m(560825),c=m(518921),a=m(217186),l=m(195593),n=m(820799),h=m(651023),g=m(605928),w=m(79656),d="[object Map]",_="[object Set]",S=Object.prototype,M=S.hasOwnProperty;function j(O){if(O==null)return!0;if(n(O)&&(l(O)||typeof O=="string"||typeof O.splice=="function"||h(O)||w(O)||a(O)))return!O.length;var q=c(O);if(q==d||q==_)return!O.size;if(g(O))return!s(O).length;for(var B in O)if(M.call(O,B))return!1;return!0}z.exports=j},860921:function(z){function k(){}z.exports=k},135118:function(z,k){"use strict";var m={GALLERY_SLIDESHOW:1e3,GALLERY_CAROUSEL:1002,GALLERY_GRID:1003,GALLERY_STACK:1004,SUMMARY_WALL:1005,SUMMARY_CAROUSEL:1006,SUMMARY_LIST:1007,SUMMARY_GRID:1008,CHART_BAR:1009,CHART_LINE:1010,CHART_PIE:1011,IMAGE_INLINE:1012,IMAGE_POSTER:1013,IMAGE_CARD:1014,IMAGE_OVERLAP:1015,IMAGE_COLLAGE:1016,IMAGE_STACK:1017,TOCK_RESERVATIONS:1018,TOCK_EVENTS:1019};k.Z=m},392338:function(z){"use strict";z.exports=void 0}},function(z){var k=function(s){return z(z.s=s)};z.O(0,["96135","98338"],function(){return k(133177)});var m=z.O()}]);

//# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/49807dd60cbb7373/chartjs-helpers-861ab83be22159a9-min.en-US.js.map
}