text: /**!
   * easyPieChart
   * Lightweight plugin to render simple, animated and retina optimized pie charts
   *
   * @license 
   * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
   * @version 2.1.6
   **/
  !function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={"barColor":"#ef1e25","trackColor":"#f9f9f9","scaleColor":"#dfe0e0","scaleLength":5,"lineCap":"round","lineWidth":3,"trackWidth":void 0,"size":110,"rotate":0,"animate":{"duration":1e3,"enabled":!0},"easing":function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},"onStart":function(a,b){},"onStep":function(a,b,c){},"onStop":function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={"duration":e.animate,"enabled":!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={"duration":1e3,"enabled":e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
  $.blue="#2e7bcc",$.green="#3FB618",$.red="#FF0039",$.yellow="#FFA500",$.orange="#FF7518",$.pink="#E671B8",$.purple="#9954BB",$.black="#333333",function(a,b,c){!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.sparkline&&a(jQuery)}(function(d){"use strict";var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K={},L=0;e=function(){return{"common":{"type":"line","lineColor":"#00f","fillColor":"#cdf","defaultPixelsPerValue":3,"width":"auto","height":"auto","composite":!1,"tagValuesAttribute":"values","tagOptionsPrefix":"spark","enableTagOptions":!1,"enableHighlight":!0,"highlightLighten":1.4,"tooltipSkipNull":!0,"tooltipPrefix":"","tooltipSuffix":"","disableHiddenCheck":!1,"numberFormatter":!1,"numberDigitGroupCount":3,"numberDigitGroupSep":",","numberDecimalMark":".","disableTooltips":!1,"disableInteraction":!1},"line":{"spotColor":"#f80","highlightSpotColor":"#5f5","highlightLineColor":"#f22","spotRadius":1.5,"minSpotColor":"#f80","maxSpotColor":"#f80","lineWidth":1,"normalRangeMin":c,"normalRangeMax":c,"normalRangeColor":"#ccc","drawNormalOnTop":!1,"chartRangeMin":c,"chartRangeMax":c,"chartRangeMinX":c,"chartRangeMaxX":c,"tooltipFormat":new g('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},"bar":{"barColor":d.blue,"negBarColor":"#f44","stackedBarColor":[d.blue,d.red,d.yellow,d.green,"#66aa00",d.pink,"#0099c6",d.purple],"zeroColor":c,"nullColor":c,"zeroAxis":!0,"barWidth":4,"barSpacing":1,"chartRangeMax":c,"chartRangeMin":c,"chartRangeClip":!1,"colorMap":c,"tooltipFormat":new g('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},"tristate":{"barWidth":4,"barSpacing":1,"posBarColor":"#6f6","negBarColor":"#f44","zeroBarColor":"#999","colorMap":{},"tooltipFormat":new g('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),"tooltipValueLookups":{"map":{"-1":"Loss","0":"Draw","1":"Win"}}},"discrete":{"lineHeight":"auto","thresholdColor":c,"thresholdValue":0,"chartRangeMax":c,"chartRangeMin":c,"chartRangeClip":!1,"tooltipFormat":new g("{{prefix}}{{value}}{{suffix}}")},"bullet":{"targetColor":"#f33","targetWidth":3,"performanceColor":"#33f","rangeColors":["#d3dafe","#a8b6ff","#7f94ff"],"base":c,"tooltipFormat":new g("{{fieldkey:fields}} - {{value}}"),"tooltipValueLookups":{"fields":{"r":"Range","p":"Performance","t":"Target"}}},"pie":{"offset":0,"sliceColors":[d.blue,d.red,d.yellow,d.green,"#66aa00",d.pink,"#0099c6",d.purple],"borderWidth":0,"borderColor":"#000","tooltipFormat":new g('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},"box":{"raw":!1,"boxLineColor":"#000","boxFillColor":"#cdf","whiskerColor":"#000","outlierLineColor":"#333","outlierFillColor":"#fff","medianColor":"#f00","showOutliers":!0,"outlierIQR":1.5,"spotRadius":1.5,"target":c,"targetColor":"#4a2","chartRangeMax":c,"chartRangeMin":c,"tooltipFormat":new g("{{field:fields}}: {{value}}"),"tooltipFormatFieldlistKey":"field","tooltipValueLookups":{"fields":{"lq":"Lower Quartile","med":"Median","uq":"Upper Quartile","lo":"Left Outlier","ro":"Right Outlier","lw":"Left Whisker","rw":"Right Whisker"}}}}},D='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',f=function(){var a,b;return a=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(a.prototype=d.extend(new arguments[0],arguments[arguments.length-1]),a._super=arguments[0].prototype):a.prototype=arguments[arguments.length-1],arguments.length>2&&(b=Array.prototype.slice.call(arguments,1,-1),b.unshift(a.prototype),d.extend.apply(d,b))):a.prototype=arguments[0],a.prototype.cls=a,a},d.SPFormatClass=g=f({"fre":/\{\{([\w.]+?)(:(.+?))?\}\}/g,"precre":/(\w+)\.(\d+)/,"init":function(a,b){this.format=a,this.fclass=b},"render":function(a,b,d){var e,f,g,h,i,j=this,k=a;return this.format.replace(this.fre,function(){var a;return f=arguments[1],g=arguments[3],e=j.precre.exec(f),e?(i=e[2],f=e[1]):i=!1,h=k[f],h===c?"":g&&b&&b[g]?(a=b[g],a.get?b[g].get(h)||h:b[g][h]||h):(m(h)&&(h=d.get("numberFormatter")?d.get("numberFormatter")(h):r(h,i,d.get("numberDigitGroupCount"),d.get("numberDigitGroupSep"),d.get("numberDecimalMark"))),h)})}}),d.spformat=function(a,b){return new g(a,b)},h=function(a,b,c){return b>a?b:a>c?c:a},i=function(a,c){var d;return 2===c?(d=b.floor(a.length/2),a.length%2?a[d]:(a[d-1]+a[d])/2):a.length%2?(d=(a.length*c+c)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1]):(d=(a.length*c+2)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1])},j=function(a){var b;switch(a){case"undefined":a=c;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},k=function(a){var b,c=[];for(b=a.length;b--;)c[b]=j(a[b]);return c},l=function(a,b){var c,d,e=[];for(c=0,d=a.length;d>c;c++)a[c]!==b&&e.push(a[c]);return e},m=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},r=function(a,b,c,e,f){var g,h;for(a=(b===!1?parseFloat(a).toString():a.toFixed(b)).split(""),g=(g=d.inArray(".",a))<0?a.length:g,g<a.length&&(a[g]=f),h=g-c;h>0;h-=c)a.splice(h,0,e);return a.join("")},n=function(a,b,c){var d;for(d=b.length;d--;)if((!c||null!==b[d])&&b[d]!==a)return!1;return!0},o=function(a){var b,c=0;for(b=a.length;b--;)c+="number"==typeof a[b]?a[b]:0;return c},q=function(a){return d.isArray(a)?a:[a]},p=function(b){var c;a.createStyleSheet?a.createStyleSheet().cssText=b:(c=a.createElement("style"),c.type="text/css",a.getElementsByTagName("head")[0].appendChild(c),c["string"==typeof a.body.style.WebkitAppearance?"innerText":"innerHTML"]=b)},d.fn.simpledraw=function(b,e,f,g){var h,i;if(f&&(h=this.data("_jqs_vcanvas")))return h;if(d.fn.sparkline.canvas===!1)return!1;if(d.fn.sparkline.canvas===c){var j=a.createElement("canvas");if(j.getContext&&j.getContext("2d"))d.fn.sparkline.canvas=function(a,b,c,d){return new H(a,b,c,d)};else{if(!a.namespaces||a.namespaces.v)return d.fn.sparkline.canvas=!1,!1;a.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),d.fn.sparkline.canvas=function(a,b,c,d){return new I(a,b,c)}}}return b===c&&(b=d(this).innerWidth()),e===c&&(e=d(this).innerHeight()),h=d.fn.sparkline.canvas(b,e,this,g),i=d(this).data("_jqs_mhandler"),i&&i.registerCanvas(h),h},d.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},d.RangeMapClass=s=f({"init":function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&"string"==typeof b&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=0===c[0].length?-(1/0):parseFloat(c[0]),c[1]=0===c[1].length?1/0:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},"get":function(a){var b,d,e,f=this.rangelist;if((e=this.map[a])!==c)return e;if(f)for(b=f.length;b--;)if(d=f[b],d[0]<=a&&d[1]>=a)return d[2];return c}}),d.range_map=function(a){return new s(a)},t=f({"init":function(a,b){var c=d(a);this.$el=c,this.options=b,this.currentPageX=0,this.currentPageY=0,this.el=a,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!b.get("disableTooltips"),this.highlightEnabled=!b.get("disableHighlight")},"registerSparkline":function(a){this.splist.push(a),this.over&&this.updateDisplay()},"registerCanvas":function(a){var b=d(a.canvas);this.canvas=a,this.$canvas=b,b.mouseenter(d.proxy(this.mouseenter,this)),b.mouseleave(d.proxy(this.mouseleave,this)),b.click(d.proxy(this.mouseclick,this))},"reset":function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=c)},"mouseclick":function(a){var b=d.Event("sparklineClick");b.originalEvent=a,b.sparklines=this.splist,this.$el.trigger(b)},"mouseenter":function(b){d(a.body).unbind("mousemove.jqs"),d(a.body).bind("mousemove.jqs",d.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new u(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},"mouseleave":function(){d(a.body).unbind("mousemove.jqs");var b,c,e=this.splist,f=e.length,g=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),c=0;f>c;c++)b=e[c],b.clearRegionHighlight()&&(g=!0);g&&this.canvas.render()},"mousemove":function(a){this.currentPageX=a.pageX,this.currentPageY=a.pageY,this.currentEl=a.target,this.tooltip&&this.tooltip.updatePosition(a.pageX,a.pageY),this.updateDisplay()},"updateDisplay":function(){var a,b,c,e,f,g=this.splist,h=g.length,i=!1,j=this.$canvas.offset(),k=this.currentPageX-j.left,l=this.currentPageY-j.top;if(this.over){for(c=0;h>c;c++)b=g[c],e=b.setRegionHighlight(this.currentEl,k,l),e&&(i=!0);if(i){if(f=d.Event("sparklineRegionChange"),f.sparklines=this.splist,this.$el.trigger(f),this.tooltip){for(a="",c=0;h>c;c++)b=g[c],a+=b.getCurrentRegionTooltip();this.tooltip.setContent(a)}this.disableHighlight||this.canvas.render()}null===e&&this.mouseleave()}}}),u=f({"sizeStyle":"position: static !important;display: block !important;visibility: hidden !important;float: left !important;","init":function(b){var c,e=b.get("tooltipClassname","jqstooltip"),f=this.sizeStyle;this.container=b.get("tooltipContainer")||a.body,this.tooltipOffsetX=b.get("tooltipOffsetX",10),this.tooltipOffsetY=b.get("tooltipOffsetY",12),d("#jqssizetip").remove(),d("#jqstooltip").remove(),this.sizetip=d("<div/>",{"id":"jqssizetip","style":f,"class":e}),this.tooltip=d("<div/>",{"id":"jqstooltip","class":e}).appendTo(this.container),c=this.tooltip.offset(),this.offsetLeft=c.left,this.offsetTop=c.top,this.hidden=!0,d(window).unbind("resize.jqs scroll.jqs"),d(window).bind("resize.jqs scroll.jqs",d.proxy(this.updateWindowDims,this)),this.updateWindowDims()},"updateWindowDims":function(){this.scrollTop=d(window).scrollTop(),this.scrollLeft=d(window).scrollLeft(),this.scrollRight=this.scrollLeft+d(window).width(),this.updatePosition()},"getSize":function(a){this.sizetip.html(a).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},"setContent":function(a){return a?(this.getSize(a),this.tooltip.html(a).css({"width":this.width,"height":this.height,"visibility":"visible"}),void(this.hidden&&(this.hidden=!1,this.updatePosition()))):(this.tooltip.css("visibility","hidden"),void(this.hidden=!0))},"updatePosition":function(a,b){if(a===c){if(this.mousex===c)return;a=this.mousex-this.offsetLeft,b=this.mousey-this.offsetTop}else this.mousex=a-=this.offsetLeft,this.mousey=b-=this.offsetTop;this.height&&this.width&&!this.hidden&&(b-=this.height+this.tooltipOffsetY,a+=this.tooltipOffsetX,b<this.scrollTop&&(b=this.scrollTop),a<this.scrollLeft?a=this.scrollLeft:a+this.width>this.scrollRight&&(a=this.scrollRight-this.width),this.tooltip.css({"left":a,"top":b}))},"remove":function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=c,d(window).unbind("resize.jqs scroll.jqs")}}),E=function(){p(D)},d(E),J=[],d.fn.sparkline=function(b,e){return this.each(function(){var f,g,h=new d.fn.sparkline.options(this,e),i=d(this);if(f=function(){var e,f,g,j,k,l,m;return"html"===b||b===c?(m=this.getAttribute(h.get("tagValuesAttribute")),(m===c||null===m)&&(m=i.html()),e=m.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):e=b,f="auto"===h.get("width")?e.length*h.get("defaultPixelsPerValue"):h.get("width"),"auto"===h.get("height")?h.get("composite")&&d.data(this,"_jqs_vcanvas")||(j=a.createElement("span"),j.innerHTML="a",i.html(j),g=d(j).innerHeight()||d(j).height(),d(j).remove(),j=null):g=h.get("height"),h.get("disableInteraction")?k=!1:(k=d.data(this,"_jqs_mhandler"),k?h.get("composite")||k.reset():(k=new t(this,h),d.data(this,"_jqs_mhandler",k))),h.get("composite")&&!d.data(this,"_jqs_vcanvas")?void(d.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),d.data(this,"_jqs_errnotify",!0))):(l=new(d.fn.sparkline[h.get("type")])(this,e,h,f,g),l.render(),void(k&&k.registerSparkline(l)))},d(this).html()&&!h.get("disableHiddenCheck")&&d(this).is(":hidden")||!d(this).parents("body").length){if(!h.get("composite")&&d.data(this,"_jqs_pending"))for(g=J.length;g;g--)J[g-1][0]==this&&J.splice(g-1,1);J.push([this,f]),d.data(this,"_jqs_pending",!0)}else f.call(this)})},d.fn.sparkline.defaults=e(),d.sparkline_display_visible=function(){var a,b,c,e=[];for(b=0,c=J.length;c>b;b++)a=J[b][0],d(a).is(":visible")&&!d(a).parents().is(":hidden")?(J[b][1].call(a),d.data(J[b][0],"_jqs_pending",!1),e.push(b)):d(a).closest("html").length||d.data(a,"_jqs_pending")||(d.data(J[b][0],"_jqs_pending",!1),e.push(b));for(b=e.length;b;b--)J.splice(e[b-1],1)},d.fn.sparkline.options=f({"init":function(a,b){var c,e,f,g;this.userOptions=b=b||{},this.tag=a,this.tagValCache={},e=d.fn.sparkline.defaults,f=e.common,this.tagOptionsPrefix=b.enableTagOptions&&(b.tagOptionsPrefix||f.tagOptionsPrefix),g=this.getTagSetting("type"),c=g===K?e[b.type||f.type]:e[g],this.mergedOptions=d.extend({},f,c,b)},"getTagSetting":function(a){var b,d,e,f,g=this.tagOptionsPrefix;if(g===!1||g===c)return K;if(this.tagValCache.hasOwnProperty(a))b=this.tagValCache.key;else{if(b=this.tag.getAttribute(g+a),b===c||null===b)b=K;else if("["===b.substr(0,1))for(b=b.substr(1,b.length-2).split(","),d=b.length;d--;)b[d]=j(b[d].replace(/(^\s*)|(\s*$)/g,""));else if("{"===b.substr(0,1))for(e=b.substr(1,b.length-2).split(","),b={},d=e.length;d--;)f=e[d].split(":",2),b[f[0].replace(/(^\s*)|(\s*$)/g,"")]=j(f[1].replace(/(^\s*)|(\s*$)/g,""));else b=j(b);this.tagValCache.key=b}return b},"get":function(a,b){var d,e=this.getTagSetting(a);return e!==K?e:(d=this.mergedOptions[a])===c?b:d}}),d.fn.sparkline._base=f({"disabled":!1,"init":function(a,b,e,f,g){this.el=a,this.$el=d(a),this.values=b,this.options=e,this.width=f,this.height=g,this.currentRegion=c},"initTarget":function(){var a=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),a))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},"render":function(){return this.disabled?(this.el.innerHTML="",!1):!0},"getRegion":function(a,b){},"setRegionHighlight":function(a,b,d){var e,f=this.currentRegion,g=!this.options.get("disableHighlight");return b>this.canvasWidth||d>this.canvasHeight||0>b||0>d?null:(e=this.getRegion(a,b,d),f!==e?(f!==c&&g&&this.removeHighlight(),this.currentRegion=e,e!==c&&g&&this.renderHighlight(),!0):!1)},"clearRegionHighlight":function(){return this.currentRegion!==c?(this.removeHighlight(),this.currentRegion=c,!0):!1},"renderHighlight":function(){this.changeHighlight(!0)},"removeHighlight":function(){this.changeHighlight(!1)},"changeHighlight":function(a){},"getCurrentRegionTooltip":function(){var a,b,e,f,h,i,j,k,l,m,n,o,p,q,r=this.options,s="",t=[];if(this.currentRegion===c)return"";if(a=this.getCurrentRegionFields(),n=r.get("tooltipFormatter"))return n(this,r,a);if(r.get("tooltipChartTitle")&&(s+='<div class="jqs jqstitle">'+r.get("tooltipChartTitle")+"</div>\n"),b=this.options.get("tooltipFormat"),!b)return"";if(d.isArray(b)||(b=[b]),d.isArray(a)||(a=[a]),j=this.options.get("tooltipFormatFieldlist"),k=this.options.get("tooltipFormatFieldlistKey"),j&&k){for(l=[],i=a.length;i--;)m=a[i][k],-1!=(q=d.inArray(m,j))&&(l[q]=a[i]);a=l}for(e=b.length,p=a.length,i=0;e>i;i++)for(o=b[i],"string"==typeof o&&(o=new g(o)),f=o.fclass||"jqsfield",q=0;p>q;q++)a[q].isNull&&r.get("tooltipSkipNull")||(d.extend(a[q],{"prefix":r.get("tooltipPrefix"),"suffix":r.get("tooltipSuffix")}),h=o.render(a[q],r.get("tooltipValueLookups"),r),t.push('<div class="'+f+'">'+h+"</div>"));return t.length?s+t.join("\n"):""},"getCurrentRegionFields":function(){},"calcHighlightColor":function(a,c){var d,e,f,g,i=c.get("highlightColor"),j=c.get("highlightLighten");if(i)return i;if(j&&(d=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(a))){for(f=[],e=4===a.length?16:1,g=0;3>g;g++)f[g]=h(b.round(parseInt(d[g+1],16)*e*j),0,255);return"rgb("+f.join(",")+")"}return a}}),v={"changeHighlight":function(a){var b,c=this.currentRegion,e=this.target,f=this.regionShapes[c];f&&(b=this.renderRegion(c,a),d.isArray(b)||d.isArray(f)?(e.replaceWithShapes(f,b),this.regionShapes[c]=d.map(b,function(a){return a.id})):(e.replaceWithShape(f,b),this.regionShapes[c]=b.id))},"render":function(){var a,b,c,e,f=this.values,g=this.target,h=this.regionShapes;if(this.cls._super.render.call(this)){for(c=f.length;c--;)if(a=this.renderRegion(c))if(d.isArray(a)){for(b=[],e=a.length;e--;)a[e].append(),b.push(a[e].id);h[c]=b}else a.append(),h[c]=a.id;else h[c]=null;g.render()}}},d.fn.sparkline.line=w=f(d.fn.sparkline._base,{"type":"line","init":function(a,b,c,d,e){w._super.init.call(this,a,b,c,d,e),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},"getRegion":function(a,b,d){var e,f=this.regionMap;for(e=f.length;e--;)if(null!==f[e]&&b>=f[e][0]&&b<=f[e][1])return f[e][2];return c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":null===this.yvalues[a],"x":this.xvalues[a],"y":this.yvalues[a],"color":this.options.get("lineColor"),"fillColor":this.options.get("fillColor"),"offset":a}},"renderHighlight":function(){var a,b,d=this.currentRegion,e=this.target,f=this.vertices[d],g=this.options,h=g.get("spotRadius"),i=g.get("highlightSpotColor"),j=g.get("highlightLineColor");f&&(h&&i&&(a=e.drawCircle(f[0],f[1],h,c,i),this.highlightSpotId=a.id,e.insertAfterShape(this.lastShapeId,a)),j&&(b=e.drawLine(f[0],this.canvasTop,f[0],this.canvasTop+this.canvasHeight,j),this.highlightLineId=b.id,e.insertAfterShape(this.lastShapeId,b)))},"removeHighlight":function(){var a=this.target;this.highlightSpotId&&(a.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(a.removeShapeId(this.highlightLineId),this.highlightLineId=null)},"scanValues":function(){var a,c,d,e,f,g=this.values,h=g.length,i=this.xvalues,j=this.yvalues,k=this.yminmax;for(a=0;h>a;a++)c=g[a],d="string"==typeof g[a],e="object"==typeof g[a]&&g[a]instanceof Array,f=d&&g[a].split(":"),d&&2===f.length?(i.push(Number(f[0])),j.push(Number(f[1])),k.push(Number(f[1]))):e?(i.push(c[0]),j.push(c[1]),k.push(c[1])):(i.push(a),null===g[a]||"null"===g[a]?j.push(null):(j.push(Number(c)),k.push(Number(c))));this.options.get("xvalues")&&(i=this.options.get("xvalues")),this.maxy=this.maxyorg=b.max.apply(b,k),this.miny=this.minyorg=b.min.apply(b,k),this.maxx=b.max.apply(b,i),this.minx=b.min.apply(b,i),this.xvalues=i,this.yvalues=j,this.yminmax=k},"processRangeOptions":function(){var a=this.options,b=a.get("normalRangeMin"),d=a.get("normalRangeMax");b!==c&&(b<this.miny&&(this.miny=b),d>this.maxy&&(this.maxy=d)),a.get("chartRangeMin")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMin")<this.miny)&&(this.miny=a.get("chartRangeMin")),a.get("chartRangeMax")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMax")>this.maxy)&&(this.maxy=a.get("chartRangeMax")),a.get("chartRangeMinX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMinX")<this.minx)&&(this.minx=a.get("chartRangeMinX")),a.get("chartRangeMaxX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMaxX")>this.maxx)&&(this.maxx=a.get("chartRangeMaxX"))},"drawNormalRange":function(a,d,e,f,g){var h=this.options.get("normalRangeMin"),i=this.options.get("normalRangeMax"),j=d+b.round(e-e*((i-this.miny)/g)),k=b.round(e*(i-h)/g);this.target.drawRect(a,j,f,k,c,this.options.get("normalRangeColor")).append()},"render":function(){var a,e,f,g,h,i,j,k,l,m,n,o,p,q,r,t,u,v,x,y,z,A,B,C,D,E=this.options,F=this.target,G=this.canvasWidth,H=this.canvasHeight,I=this.vertices,J=E.get("spotRadius"),K=this.regionMap;if(w._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),B=this.xvalues,C=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(g=h=0,a=this.maxx-this.minx===0?1:this.maxx-this.minx,e=this.maxy-this.miny===0?1:this.maxy-this.miny,f=this.yvalues.length-1,J&&(4*J>G||4*J>H)&&(J=0),J&&(z=E.get("highlightSpotColor")&&!E.get("disableInteraction"),(z||E.get("minSpotColor")||E.get("spotColor")&&C[f]===this.miny)&&(H-=b.ceil(J)),(z||E.get("maxSpotColor")||E.get("spotColor")&&C[f]===this.maxy)&&(H-=b.ceil(J),g+=b.ceil(J)),(z||(E.get("minSpotColor")||E.get("maxSpotColor"))&&(C[0]===this.miny||C[0]===this.maxy))&&(h+=b.ceil(J),G-=b.ceil(J)),(z||E.get("spotColor")||E.get("minSpotColor")||E.get("maxSpotColor")&&(C[f]===this.miny||C[f]===this.maxy))&&(G-=b.ceil(J))),H--,E.get("normalRangeMin")===c||E.get("drawNormalOnTop")||this.drawNormalRange(h,g,H,G,e),j=[],k=[j],q=r=null,t=C.length,D=0;t>D;D++)l=B[D],n=B[D+1],m=C[D],o=h+b.round((l-this.minx)*(G/a)),p=t-1>D?h+b.round((n-this.minx)*(G/a)):G,r=o+(p-o)/2,K[D]=[q||0,r,D],q=r,null===m?D&&(null!==C[D-1]&&(j=[],k.push(j)),I.push(null)):(m<this.miny&&(m=this.miny),m>this.maxy&&(m=this.maxy),j.length||j.push([o,g+H]),i=[o,g+b.round(H-H*((m-this.miny)/e))],j.push(i),I.push(i));for(u=[],v=[],x=k.length,D=0;x>D;D++)j=k[D],j.length&&(E.get("fillColor")&&(j.push([j[j.length-1][0],g+H]),v.push(j.slice(0)),j.pop()),j.length>2&&(j[0]=[j[0][0],j[1][1]]),u.push(j));for(x=v.length,D=0;x>D;D++)F.drawShape(v[D],E.get("fillColor"),E.get("fillColor")).append();for(E.get("normalRangeMin")!==c&&E.get("drawNormalOnTop")&&this.drawNormalRange(h,g,H,G,e),x=u.length,D=0;x>D;D++)F.drawShape(u[D],E.get("lineColor"),c,E.get("lineWidth")).append();if(J&&E.get("valueSpots"))for(y=E.get("valueSpots"),y.get===c&&(y=new s(y)),D=0;t>D;D++)A=y.get(C[D]),A&&F.drawCircle(h+b.round((B[D]-this.minx)*(G/a)),g+b.round(H-H*((C[D]-this.miny)/e)),J,c,A).append();J&&E.get("spotColor")&&null!==C[f]&&F.drawCircle(h+b.round((B[B.length-1]-this.minx)*(G/a)),g+b.round(H-H*((C[f]-this.miny)/e)),J,c,E.get("spotColor")).append(),this.maxy!==this.minyorg&&(J&&E.get("minSpotColor")&&(l=B[d.inArray(this.minyorg,C)],F.drawCircle(h+b.round((l-this.minx)*(G/a)),g+b.round(H-H*((this.minyorg-this.miny)/e)),J,c,E.get("minSpotColor")).append()),J&&E.get("maxSpotColor")&&(l=B[d.inArray(this.maxyorg,C)],F.drawCircle(h+b.round((l-this.minx)*(G/a)),g+b.round(H-H*((this.maxyorg-this.miny)/e)),J,c,E.get("maxSpotColor")).append())),this.lastShapeId=F.getLastShapeId(),this.canvasTop=g,F.render()}}}),d.fn.sparkline.bar=x=f(d.fn.sparkline._base,v,{"type":"bar","init":function(a,e,f,g,i){var m,n,o,p,q,r,t,u,v,w,y,z,A,B,C,D,E,F,G,H,I,J,K=parseInt(f.get("barWidth"),10),L=parseInt(f.get("barSpacing"),10),M=f.get("chartRangeMin"),N=f.get("chartRangeMax"),O=f.get("chartRangeClip"),P=1/0,Q=-(1/0);for(x._super.init.call(this,a,e,f,g,i),r=0,t=e.length;t>r;r++)H=e[r],m="string"==typeof H&&H.indexOf(":")>-1,(m||d.isArray(H))&&(C=!0,m&&(H=e[r]=k(H.split(":"))),H=l(H,null),n=b.min.apply(b,H),o=b.max.apply(b,H),P>n&&(P=n),o>Q&&(Q=o));this.stacked=C,this.regionShapes={},this.barWidth=K,this.barSpacing=L,this.totalBarWidth=K+L,this.width=g=e.length*K+(e.length-1)*L,this.initTarget(),O&&(A=M===c?-(1/0):M,B=N===c?1/0:N),q=[],p=C?[]:q;var R=[],S=[];for(r=0,t=e.length;t>r;r++)if(C)for(D=e[r],e[r]=G=[],R[r]=0,p[r]=S[r]=0,E=0,F=D.length;F>E;E++)H=G[E]=O?h(D[E],A,B):D[E],null!==H&&(H>0&&(R[r]+=H),0>P&&Q>0?0>H?S[r]+=b.abs(H):p[r]+=H:p[r]+=b.abs(H-(0>H?Q:P)),q.push(H));else H=O?h(e[r],A,B):e[r],H=e[r]=j(H),null!==H&&q.push(H);this.max=z=b.max.apply(b,q),this.min=y=b.min.apply(b,q),this.stackMax=Q=C?b.max.apply(b,R):z,this.stackMin=P=C?b.min.apply(b,q):y,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<y)&&(y=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>z)&&(z=f.get("chartRangeMax")),this.zeroAxis=v=f.get("zeroAxis",!0),w=0>=y&&z>=0&&v?0:0==v?y:y>0?y:z,this.xaxisOffset=w,u=C?b.max.apply(b,p)+b.max.apply(b,S):z-y,this.canvasHeightEf=v&&0>y?this.canvasHeight-2:this.canvasHeight-1,w>y?(J=C&&z>=0?Q:z,I=(J-w)/u*this.canvasHeight,I!==b.ceil(I)&&(this.canvasHeightEf-=2,I=b.ceil(I))):I=this.canvasHeight,this.yoffset=I,d.isArray(f.get("colorMap"))?(this.colorMapByIndex=f.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=f.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new s(this.colorMapByValue))),this.range=u},"getRegion":function(a,d,e){var f=b.floor(d/this.totalBarWidth);return 0>f||f>=this.values.length?c:f},"getCurrentRegionFields":function(){var a,b,c=this.currentRegion,d=q(this.values[c]),e=[];for(b=d.length;b--;)a=d[b],e.push({"isNull":null===a,"value":a,"color":this.calcColor(b,a,c),"offset":c});return e},"calcColor":function(a,b,e){var f,g,h=this.colorMapByIndex,i=this.colorMapByValue,j=this.options;return f=this.stacked?j.get("stackedBarColor"):0>b?j.get("negBarColor"):j.get("barColor"),0===b&&j.get("zeroColor")!==c&&(f=j.get("zeroColor")),i&&(g=i.get(b))?f=g:h&&h.length>e&&(f=h[e]),d.isArray(f)?f[a%f.length]:f},"renderRegion":function(a,e){var f,g,h,i,j,k,l,m,o,p,q=this.values[a],r=this.options,s=this.xaxisOffset,t=[],u=this.range,v=this.stacked,w=this.target,x=a*this.totalBarWidth,y=this.canvasHeightEf,z=this.yoffset;if(q=d.isArray(q)?q:[q],l=q.length,m=q[0],i=n(null,q),p=n(s,q,!0),i)return r.get("nullColor")?(h=e?r.get("nullColor"):this.calcHighlightColor(r.get("nullColor"),r),f=z>0?z-1:z,w.drawRect(x,f,this.barWidth-1,0,h,h)):c;for(j=z,k=0;l>k;k++){if(m=q[k],v&&m===s){if(!p||o)continue;o=!0}g=u>0?b.floor(y*(b.abs(m-s)/u))+1:1,s>m||m===s&&0===z?(f=j,j+=g):(f=z-g,z-=g),h=this.calcColor(k,m,a),e&&(h=this.calcHighlightColor(h,r)),t.push(w.drawRect(x,f,this.barWidth-1,g-1,h,h))}return 1===t.length?t[0]:t}}),d.fn.sparkline.tristate=y=f(d.fn.sparkline._base,v,{"type":"tristate","init":function(a,b,e,f,g){var h=parseInt(e.get("barWidth"),10),i=parseInt(e.get("barSpacing"),10);y._super.init.call(this,a,b,e,f,g),this.regionShapes={},this.barWidth=h,this.barSpacing=i,this.totalBarWidth=h+i,this.values=d.map(b,Number),this.width=f=b.length*h+(b.length-1)*i,d.isArray(e.get("colorMap"))?(this.colorMapByIndex=e.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=e.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new s(this.colorMapByValue))),this.initTarget()},"getRegion":function(a,c,d){return b.floor(c/this.totalBarWidth)},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"color":this.calcColor(this.values[a],a),"offset":a}},"calcColor":function(a,b){var c,d,e=this.values,f=this.options,g=this.colorMapByIndex,h=this.colorMapByValue;return c=h&&(d=h.get(a))?d:g&&g.length>b?g[b]:e[b]<0?f.get("negBarColor"):e[b]>0?f.get("posBarColor"):f.get("zeroBarColor")},"renderRegion":function(a,c){var d,e,f,g,h,i,j=this.values,k=this.options,l=this.target;return d=l.pixelHeight,f=b.round(d/2),g=a*this.totalBarWidth,j[a]<0?(h=f,e=f-1):j[a]>0?(h=0,e=f-1):(h=f-1,e=2),i=this.calcColor(j[a],a),null!==i?(c&&(i=this.calcHighlightColor(i,k)),l.drawRect(g,h,this.barWidth-1,e-1,i,i)):void 0}}),d.fn.sparkline.discrete=z=f(d.fn.sparkline._base,v,{"type":"discrete","init":function(a,e,f,g,h){z._super.init.call(this,a,e,f,g,h),this.regionShapes={},this.values=e=d.map(e,Number),this.min=b.min.apply(b,e),this.max=b.max.apply(b,e),this.range=this.max-this.min,this.width=g="auto"===f.get("width")?2*e.length:this.width,this.interval=b.floor(g/e.length),this.itemWidth=g/e.length,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<this.min)&&(this.min=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>this.max)&&(this.max=f.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===f.get("lineHeight")?b.round(.3*this.canvasHeight):f.get("lineHeight"))},"getRegion":function(a,c,d){return b.floor(c/this.itemWidth)},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"offset":a}},"renderRegion":function(a,c){var d,e,f,g,i=this.values,j=this.options,k=this.min,l=this.max,m=this.range,n=this.interval,o=this.target,p=this.canvasHeight,q=this.lineHeight,r=p-q;return e=h(i[a],k,l),g=a*n,d=b.round(r-r*((e-k)/m)),f=j.get("thresholdColor")&&e<j.get("thresholdValue")?j.get("thresholdColor"):j.get("lineColor"),c&&(f=this.calcHighlightColor(f,j)),o.drawLine(g,d,g,d+q,f)}}),d.fn.sparkline.bullet=A=f(d.fn.sparkline._base,{"type":"bullet","init":function(a,d,e,f,g){var h,i,j;A._super.init.call(this,a,d,e,f,g),this.values=d=k(d),j=d.slice(),j[0]=null===j[0]?j[2]:j[0],j[1]=null===d[1]?j[2]:j[1],h=b.min.apply(b,d),i=b.max.apply(b,d),h=e.get("base")===c?0>h?h:0:e.get("base"),this.min=h,this.max=i,this.range=i-h,this.shapes={},this.valueShapes={},this.regiondata={},this.width=f="auto"===e.get("width")?"4.0em":f,this.target=this.$el.simpledraw(f,g,e.get("composite")),d.length||(this.disabled=!0),this.initTarget()},"getRegion":function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"fieldkey":a.substr(0,1),"value":this.values[a.substr(1)],"region":a}},"changeHighlight":function(a){var b,c=this.currentRegion,d=this.valueShapes[c];switch(delete this.shapes[d],c.substr(0,1)){case"r":b=this.renderRange(c.substr(1),a);break;case"p":b=this.renderPerformance(a);break;case"t":b=this.renderTarget(a)}this.valueShapes[c]=b.id,this.shapes[b.id]=c,this.target.replaceWithShape(d,b)},"renderRange":function(a,c){var d=this.values[a],e=b.round(this.canvasWidth*((d-this.min)/this.range)),f=this.options.get("rangeColors")[a-2];return c&&(f=this.calcHighlightColor(f,this.options)),this.target.drawRect(0,0,e-1,this.canvasHeight-1,f,f)},"renderPerformance":function(a){var c=this.values[1],d=b.round(this.canvasWidth*((c-this.min)/this.range)),e=this.options.get("performanceColor");return a&&(e=this.calcHighlightColor(e,this.options)),this.target.drawRect(0,b.round(.3*this.canvasHeight),d-1,b.round(.4*this.canvasHeight)-1,e,e)},"renderTarget":function(a){var c=this.values[0],d=b.round(this.canvasWidth*((c-this.min)/this.range)-this.options.get("targetWidth")/2),e=b.round(.1*this.canvasHeight),f=this.canvasHeight-2*e,g=this.options.get("targetColor");return a&&(g=this.calcHighlightColor(g,this.options)),this.target.drawRect(d,e,this.options.get("targetWidth")-1,f-1,g,g)},"render":function(){var a,b,c=this.values.length,d=this.target;if(A._super.render.call(this)){for(a=2;c>a;a++)b=this.renderRange(a).append(),this.shapes[b.id]="r"+a,this.valueShapes["r"+a]=b.id;null!==this.values[1]&&(b=this.renderPerformance().append(),this.shapes[b.id]="p1",this.valueShapes.p1=b.id),null!==this.values[0]&&(b=this.renderTarget().append(),this.shapes[b.id]="t0",this.valueShapes.t0=b.id),d.render()}}}),d.fn.sparkline.pie=B=f(d.fn.sparkline._base,{"type":"pie","init":function(a,c,e,f,g){var h,i=0;if(B._super.init.call(this,a,c,e,f,g),this.shapes={},this.valueShapes={},this.values=c=d.map(c,Number),"auto"===e.get("width")&&(this.width=this.height),c.length>0)for(h=c.length;h--;)i+=c[h];this.total=i,this.initTarget(),this.radius=b.floor(b.min(this.canvasWidth,this.canvasHeight)/2)},"getRegion":function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"percent":this.values[a]/this.total*100,"color":this.options.get("sliceColors")[a%this.options.get("sliceColors").length],"offset":a}},"changeHighlight":function(a){var b=this.currentRegion,c=this.renderSlice(b,a),d=this.valueShapes[b];
  delete this.shapes[d],this.target.replaceWithShape(d,c),this.valueShapes[b]=c.id,this.shapes[c.id]=b},"renderSlice":function(a,d){var e,f,g,h,i,j=this.target,k=this.options,l=this.radius,m=k.get("borderWidth"),n=k.get("offset"),o=2*b.PI,p=this.values,q=this.total,r=n?2*b.PI*(n/360):0;for(h=p.length,g=0;h>g;g++){if(e=r,f=r,q>0&&(f=r+o*(p[g]/q)),a===g)return i=k.get("sliceColors")[g%k.get("sliceColors").length],d&&(i=this.calcHighlightColor(i,k)),j.drawPieSlice(l,l,l-m,e,f,c,i);r=f}},"render":function(){var a,d,e=this.target,f=this.values,g=this.options,h=this.radius,i=g.get("borderWidth");if(B._super.render.call(this)){for(i&&e.drawCircle(h,h,b.floor(h-i/2),g.get("borderColor"),c,i).append(),d=f.length;d--;)f[d]&&(a=this.renderSlice(d).append(),this.valueShapes[d]=a.id,this.shapes[a.id]=d);e.render()}}}),d.fn.sparkline.box=C=f(d.fn.sparkline._base,{"type":"box","init":function(a,b,c,e,f){C._super.init.call(this,a,b,c,e,f),this.values=d.map(b,Number),this.width="auto"===c.get("width")?"4.0em":e,this.initTarget(),this.values.length||(this.disabled=1)},"getRegion":function(){return 1},"getCurrentRegionFields":function(){var a=[{"field":"lq","value":this.quartiles[0]},{"field":"med","value":this.quartiles[1]},{"field":"uq","value":this.quartiles[2]}];return this.loutlier!==c&&a.push({"field":"lo","value":this.loutlier}),this.routlier!==c&&a.push({"field":"ro","value":this.routlier}),this.lwhisker!==c&&a.push({"field":"lw","value":this.lwhisker}),this.rwhisker!==c&&a.push({"field":"rw","value":this.rwhisker}),a},"render":function(){var a,d,e,f,g,h,j,k,l,m,n,o=this.target,p=this.values,q=p.length,r=this.options,s=this.canvasWidth,t=this.canvasHeight,u=r.get("chartRangeMin")===c?b.min.apply(b,p):r.get("chartRangeMin"),v=r.get("chartRangeMax")===c?b.max.apply(b,p):r.get("chartRangeMax"),w=0;if(C._super.render.call(this)){if(r.get("raw"))r.get("showOutliers")&&p.length>5?(d=p[0],a=p[1],f=p[2],g=p[3],h=p[4],j=p[5],k=p[6]):(a=p[0],f=p[1],g=p[2],h=p[3],j=p[4]);else if(p.sort(function(a,b){return a-b}),f=i(p,1),g=i(p,2),h=i(p,3),e=h-f,r.get("showOutliers")){for(a=j=c,l=0;q>l;l++)a===c&&p[l]>f-e*r.get("outlierIQR")&&(a=p[l]),p[l]<h+e*r.get("outlierIQR")&&(j=p[l]);d=p[0],k=p[q-1]}else a=p[0],j=p[q-1];this.quartiles=[f,g,h],this.lwhisker=a,this.rwhisker=j,this.loutlier=d,this.routlier=k,n=s/(v-u+1),r.get("showOutliers")&&(w=b.ceil(r.get("spotRadius")),s-=2*b.ceil(r.get("spotRadius")),n=s/(v-u+1),a>d&&o.drawCircle((d-u)*n+w,t/2,r.get("spotRadius"),r.get("outlierLineColor"),r.get("outlierFillColor")).append(),k>j&&o.drawCircle((k-u)*n+w,t/2,r.get("spotRadius"),r.get("outlierLineColor"),r.get("outlierFillColor")).append()),o.drawRect(b.round((f-u)*n+w),b.round(.1*t),b.round((h-f)*n),b.round(.8*t),r.get("boxLineColor"),r.get("boxFillColor")).append(),o.drawLine(b.round((a-u)*n+w),b.round(t/2),b.round((f-u)*n+w),b.round(t/2),r.get("lineColor")).append(),o.drawLine(b.round((a-u)*n+w),b.round(t/4),b.round((a-u)*n+w),b.round(t-t/4),r.get("whiskerColor")).append(),o.drawLine(b.round((j-u)*n+w),b.round(t/2),b.round((h-u)*n+w),b.round(t/2),r.get("lineColor")).append(),o.drawLine(b.round((j-u)*n+w),b.round(t/4),b.round((j-u)*n+w),b.round(t-t/4),r.get("whiskerColor")).append(),o.drawLine(b.round((g-u)*n+w),b.round(.1*t),b.round((g-u)*n+w),b.round(.9*t),r.get("medianColor")).append(),r.get("target")&&(m=b.ceil(r.get("spotRadius")),o.drawLine(b.round((r.get("target")-u)*n+w),b.round(t/2-m),b.round((r.get("target")-u)*n+w),b.round(t/2+m),r.get("targetColor")).append(),o.drawLine(b.round((r.get("target")-u)*n+w-m),b.round(t/2),b.round((r.get("target")-u)*n+w+m),b.round(t/2),r.get("targetColor")).append()),o.render()}}}),F=f({"init":function(a,b,c,d){this.target=a,this.id=b,this.type=c,this.args=d},"append":function(){return this.target.appendShape(this),this}}),G=f({"_pxregex":/(\d+)(px)?\s*$/i,"init":function(a,b,c){a&&(this.width=a,this.height=b,this.target=c,this.lastShapeId=null,c[0]&&(c=c[0]),d.data(c,"_jqs_vcanvas",this))},"drawLine":function(a,b,c,d,e,f){return this.drawShape([[a,b],[c,d]],e,f)},"drawShape":function(a,b,c,d){return this._genShape("Shape",[a,b,c,d])},"drawCircle":function(a,b,c,d,e,f){return this._genShape("Circle",[a,b,c,d,e,f])},"drawPieSlice":function(a,b,c,d,e,f,g){return this._genShape("PieSlice",[a,b,c,d,e,f,g])},"drawRect":function(a,b,c,d,e,f){return this._genShape("Rect",[a,b,c,d,e,f])},"getElement":function(){return this.canvas},"getLastShapeId":function(){return this.lastShapeId},"reset":function(){alert("reset not implemented")},"_insert":function(a,b){d(b).html(a)},"_calculatePixelDims":function(a,b,c){var e;e=this._pxregex.exec(b),e?this.pixelHeight=e[1]:this.pixelHeight=d(c).height(),e=this._pxregex.exec(a),e?this.pixelWidth=e[1]:this.pixelWidth=d(c).width()},"_genShape":function(a,b){var c=L++;return b.unshift(c),new F(this,c,a,b)},"appendShape":function(a){alert("appendShape not implemented")},"replaceWithShape":function(a,b){alert("replaceWithShape not implemented")},"insertAfterShape":function(a,b){alert("insertAfterShape not implemented")},"removeShapeId":function(a){alert("removeShapeId not implemented")},"getShapeAt":function(a,b,c){alert("getShapeAt not implemented")},"render":function(){alert("render not implemented")}}),H=f(G,{"init":function(b,e,f,g){H._super.init.call(this,b,e,f),this.canvas=a.createElement("canvas"),f[0]&&(f=f[0]),d.data(f,"_jqs_vcanvas",this),d(this.canvas).css({"display":"inline-block","width":b,"height":e,"verticalAlign":"top"}),this._insert(this.canvas,f),this._calculatePixelDims(b,e,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=g,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c,d(this.canvas).css({"width":this.pixelWidth,"height":this.pixelHeight})},"_getContext":function(a,b,d){var e=this.canvas.getContext("2d");return a!==c&&(e.strokeStyle=a),e.lineWidth=d===c?1:d,b!==c&&(e.fillStyle=b),e},"reset":function(){var a=this._getContext();a.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c},"_drawShape":function(a,b,d,e,f){var g,h,i=this._getContext(d,e,f);for(i.beginPath(),i.moveTo(b[0][0]+.5,b[0][1]+.5),g=1,h=b.length;h>g;g++)i.lineTo(b[g][0]+.5,b[g][1]+.5);d!==c&&i.stroke(),e!==c&&i.fill(),this.targetX!==c&&this.targetY!==c&&i.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},"_drawCircle":function(a,d,e,f,g,h,i){var j=this._getContext(g,h,i);j.beginPath(),j.arc(d,e,f,0,2*b.PI,!1),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a),g!==c&&j.stroke(),h!==c&&j.fill()},"_drawPieSlice":function(a,b,d,e,f,g,h,i){var j=this._getContext(h,i);j.beginPath(),j.moveTo(b,d),j.arc(b,d,e,f,g,!1),j.lineTo(b,d),j.closePath(),h!==c&&j.stroke(),i&&j.fill(),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},"_drawRect":function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b+d,c],[b+d,c+e],[b,c+e],[b,c]],f,g)},"appendShape":function(a){return this.shapes[a.id]=a,this.shapeseq.push(a.id),this.lastShapeId=a.id,a.id},"replaceWithShape":function(a,b){var c,d=this.shapeseq;for(this.shapes[b.id]=b,c=d.length;c--;)d[c]==a&&(d[c]=b.id);delete this.shapes[a]},"replaceWithShapes":function(a,b){var c,d,e,f=this.shapeseq,g={};for(d=a.length;d--;)g[a[d]]=!0;for(d=f.length;d--;)c=f[d],g[c]&&(f.splice(d,1),delete this.shapes[c],e=d);for(d=b.length;d--;)f.splice(e,0,b[d].id),this.shapes[b[d].id]=b[d]},"insertAfterShape":function(a,b){var c,d=this.shapeseq;for(c=d.length;c--;)if(d[c]===a)return d.splice(c+1,0,b.id),void(this.shapes[b.id]=b)},"removeShapeId":function(a){var b,c=this.shapeseq;for(b=c.length;b--;)if(c[b]===a){c.splice(b,1);break}delete this.shapes[a]},"getShapeAt":function(a,b,c){return this.targetX=b,this.targetY=c,this.render(),this.currentTargetShapeId},"render":function(){var a,b,c,d=this.shapeseq,e=this.shapes,f=d.length,g=this._getContext();for(g.clearRect(0,0,this.pixelWidth,this.pixelHeight),c=0;f>c;c++)a=d[c],b=e[a],this["_draw"+b.type].apply(this,b.args);this.interact||(this.shapes={},this.shapeseq=[])}}),I=f(G,{"init":function(b,c,e){var f;I._super.init.call(this,b,c,e),e[0]&&(e=e[0]),d.data(e,"_jqs_vcanvas",this),this.canvas=a.createElement("span"),d(this.canvas).css({"display":"inline-block","position":"relative","overflow":"hidden","width":b,"height":c,"margin":"0px","padding":"0px","verticalAlign":"top"}),this._insert(this.canvas,e),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,f='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",f),this.group=d(this.canvas).children()[0],this.rendered=!1,this.prerender=""},"_drawShape":function(a,b,d,e,f){var g,h,i,j,k,l,m,n=[];for(m=0,l=b.length;l>m;m++)n[m]=""+b[m][0]+","+b[m][1];return g=n.splice(0,1),f=f===c?1:f,h=d===c?' stroked="false" ':' strokeWeight="'+f+'px" strokeColor="'+d+'" ',i=e===c?' filled="false"':' fillColor="'+e+'" filled="true" ',j=n[0]===n[n.length-1]?"x ":"",k='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+a+'" '+h+i+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+g+" l "+n.join(", ")+" "+j+'e"> </v:shape>'},"_drawCircle":function(a,b,d,e,f,g,h){var i,j,k;return b-=e,d-=e,i=f===c?' stroked="false" ':' strokeWeight="'+h+'px" strokeColor="'+f+'" ',j=g===c?' filled="false"':' fillColor="'+g+'" filled="true" ',k='<v:oval  id="jqsshape'+a+'" '+i+j+' style="position:absolute;top:'+d+"px; left:"+b+"px; width:"+2*e+"px; height:"+2*e+'px"></v:oval>'},"_drawPieSlice":function(a,d,e,f,g,h,i,j){var k,l,m,n,o,p,q,r;if(g===h)return"";if(h-g===2*b.PI&&(g=0,h=2*b.PI),l=d+b.round(b.cos(g)*f),m=e+b.round(b.sin(g)*f),n=d+b.round(b.cos(h)*f),o=e+b.round(b.sin(h)*f),l===n&&m===o){if(h-g<b.PI)return"";l=n=d+f,m=o=e}return l===n&&m===o&&h-g<b.PI?"":(k=[d-f,e-f,d+f,e+f,l,m,n,o],p=i===c?' stroked="false" ':' strokeWeight="1px" strokeColor="'+i+'" ',q=j===c?' filled="false"':' fillColor="'+j+'" filled="true" ',r='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+a+'" '+p+q+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+d+","+e+" wa "+k.join(", ")+' x e"> </v:shape>')},"_drawRect":function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b,c+e],[b+d,c+e],[b+d,c],[b,c]],f,g)},"reset":function(){this.group.innerHTML=""},"appendShape":function(a){var b=this["_draw"+a.type].apply(this,a.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",b):this.prerender+=b,this.lastShapeId=a.id,a.id},"replaceWithShape":function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].outerHTML=e},"replaceWithShapes":function(a,b){var c,e=d("#jqsshape"+a[0]),f="",g=b.length;for(c=0;g>c;c++)f+=this["_draw"+b[c].type].apply(this,b[c].args);for(e[0].outerHTML=f,c=1;c<a.length;c++)d("#jqsshape"+a[c]).remove()},"insertAfterShape":function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].insertAdjacentHTML("afterEnd",e)},"removeShapeId":function(a){var b=d("#jqsshape"+a);this.group.removeChild(b[0])},"getShapeAt":function(a,b,c){var d=a.id.substr(8);return d},"render":function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math);
  (function(){var a,b,c,d,e=[].slice,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},h=function(a,b){return function(){return a.apply(b,arguments)}},i=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=window.Morris={},a=jQuery,b.EventEmitter=function(){function a(){}return a.prototype.on=function(a,b){return null==this.handlers&&(this.handlers={}),null==this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b)},a.prototype.fire=function(){var a,b,c,d,f,g,h;if(c=arguments[0],a=2<=arguments.length?e.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[c]){for(g=this.handlers[c],h=[],d=0,f=g.length;f>d;d++)b=g[d],h.push(b.apply(null,a));return h}},a}(),b.commas=function(a){var b,c,d,e;return null!=a?(d=0>a?"-":"",b=Math.abs(a),c=Math.floor(b).toFixed(0),d+=c.replace(/(?=(?:\d{3})+$)(?!^)/g,","),e=b.toString(),e.length>c.length&&(d+=e.slice(c.length)),d):"-"},b.pad2=function(a){return(10>a?"0":"")+a},b.Grid=function(c){function d(b){var c=this;if("string"==typeof b.element?this.el=a(document.getElementById(b.element)):this.el=a(b.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=a.extend({},this.gridDefaults,this.defaults||{},b),"string"==typeof this.options.units&&(this.options.postUnits=b.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(a){var b;return b=c.el.offset(),c.fire("hovermove",a.pageX-b.left,a.pageY-b.top)}),this.el.bind("mouseout",function(a){return c.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(a){var b,d;return d=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0],b=c.el.offset(),c.fire("hover",d.pageX-b.left,d.pageY-b.top),d}),this.postInit&&this.postInit()}return g(d,c),d.prototype.gridDefaults={"dateFormat":null,"axes":!0,"grid":!0,"gridLineColor":"#aaa","gridStrokeWidth":.5,"gridTextColor":"#888","gridTextSize":12,"hideHover":!1,"yLabelFormat":null,"numLines":5,"padding":25,"parseTime":!0,"postUnits":"","preUnits":"","ymax":"auto","ymin":"auto 0","goals":[],"goalStrokeWidth":1,"goalLineColors":["#666633","#999966","#cc6666","#663333"],"events":[],"eventStrokeWidth":1,"eventLineColors":["#005a04","#ccffbb","#3a5f0b","#005502"]},d.prototype.setData=function(a,c){var d,e,f,g,h,i,j,k,l,m,n,o;return null==c&&(c=!0),null==a||0===a.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(m=this.cumulative?0:null,n=this.cumulative?0:null,this.options.goals.length>0&&(h=Math.min.apply(null,this.options.goals),g=Math.max.apply(null,this.options.goals),n=null!=n?Math.min(n,h):h,m=null!=m?Math.max(m,g):g),this.data=function(){var c,d,g;for(g=[],f=c=0,d=a.length;d>c;f=++c)j=a[f],i={},i.label=j[this.options.xkey],this.options.parseTime?(i.x=b.parseDate(i.label),this.options.dateFormat?i.label=this.options.dateFormat(i.x):"number"==typeof i.label&&(i.label=new Date(i.label).toString())):i.x=f,k=0,i.y=function(){var a,b,c,d;for(c=this.options.ykeys,d=[],e=a=0,b=c.length;b>a;e=++a)l=c[e],o=j[l],"string"==typeof o&&(o=parseFloat(o)),null!=o&&"number"!=typeof o&&(o=null),null!=o&&(this.cumulative?k+=o:null!=m?(m=Math.max(o,m),n=Math.min(o,n)):m=n=o),this.cumulative&&null!=k&&(m=Math.max(k,m),n=Math.min(k,n)),d.push(o);return d}.call(this),g.push(i);return g}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(a,b){return(a.x>b.x)-(b.x>a.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){var a,c,e,f;for(e=this.options.events,f=[],a=0,c=e.length;c>a;a++)d=e[a],f.push(b.parseDate(d));return f}.call(this),this.xmax=Math.max(this.xmax,Math.max.apply(null,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(null,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",n),this.ymax=this.yboundary("max",m),this.ymin===this.ymax&&(n&&(this.ymin-=1),this.ymax+=1),this.yInterval=(this.ymax-this.ymin)/(this.options.numLines-1),this.yInterval>0&&this.yInterval<1?this.precision=-Math.floor(Math.log(this.yInterval)/Math.log(10)):this.precision=0,this.dirty=!0,c?this.redraw():void 0)},d.prototype.yboundary=function(a,b){var c,d;return c=this.options["y"+a],"string"==typeof c?"auto"===c.slice(0,4)?c.length>5?(d=parseInt(c.slice(5),10),null==b?d:Math[a](b,d)):null!=b?b:0:parseInt(c,10):c},d.prototype._calc=function(){var a,b,c;return c=this.el.width(),a=this.el.height(),(this.elementWidth!==c||this.elementHeight!==a||this.dirty)&&(this.elementWidth=c,this.elementHeight=a,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,this.options.axes&&(b=Math.max(this.measureText(this.yAxisFormat(this.ymin),this.options.gridTextSize).width,this.measureText(this.yAxisFormat(this.ymax),this.options.gridTextSize).width),this.left+=b,this.bottom-=1.5*this.options.gridTextSize),this.width=this.right-this.left,this.height=this.bottom-this.top,this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},d.prototype.transY=function(a){return this.bottom-(a-this.ymin)*this.dy},d.prototype.transX=function(a){return 1===this.data.length?(this.left+this.right)/2:this.left+(a-this.xmin)*this.dx},d.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},d.prototype.measureText=function(a,b){var c,d;return null==b&&(b=12),d=this.raphael.text(100,100,a).attr("font-size",b),c=d.getBBox(),d.remove(),c},d.prototype.yAxisFormat=function(a){return this.yLabelFormat(a)},d.prototype.yLabelFormat=function(a){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(a):""+this.options.preUnits+b.commas(a)+this.options.postUnits},d.prototype.updateHover=function(a,b){var c,d;return c=this.hitTest(a,b),null!=c?(d=this.hover).update.apply(d,c):void 0},d.prototype.drawGrid=function(){var a,b,c,d,e,f,g,h;if(this.options.grid!==!1||this.options.axes!==!1){for(a=this.ymin,b=this.ymax,h=[],c=f=a,g=this.yInterval;b>=a?b>=f:f>=b;c=f+=g)d=parseFloat(c.toFixed(this.precision)),e=this.transY(d),this.options.axes&&this.drawYAxisLabel(this.left-this.options.padding/2,e,this.yAxisFormat(d)),this.options.grid?h.push(this.drawGridLine("M"+this.left+","+e+"H"+(this.left+this.width))):h.push(void 0);return h}},d.prototype.drawGoals=function(){var a,b,c,d,e,f,g;for(f=this.options.goals,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.goalLineColors[c%this.options.goalLineColors.length],g.push(this.drawGoal(b,a));return g},d.prototype.drawEvents=function(){var a,b,c,d,e,f,g;for(f=this.events,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.eventLineColors[c%this.options.eventLineColors.length],g.push(this.drawEvent(b,a));return g},d.prototype.drawGoal=function(a,b){return this.raphael.path("M"+this.left+","+this.transY(a)+"H"+this.right).attr("stroke",b).attr("stroke-width",this.options.goalStrokeWidth)},d.prototype.drawEvent=function(a,b){return this.raphael.path("M"+this.transX(a)+","+this.bottom+"V"+this.top).attr("stroke",b).attr("stroke-width",this.options.eventStrokeWidth)},d.prototype.drawYAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},d.prototype.drawGridLine=function(a){return this.raphael.path(a).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},d}(b.EventEmitter),b.parseDate=function(a){var b,c,d,e,f,g,h,i,j,k,l;return"number"==typeof a?a:(c=a.match(/^(\d+) Q(\d)$/),e=a.match(/^(\d+)-(\d+)$/),f=a.match(/^(\d+)-(\d+)-(\d+)$/),h=a.match(/^(\d+) W(\d+)$/),i=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),j=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),c?new Date(parseInt(c[1],10),3*parseInt(c[2],10)-1,1).getTime():e?new Date(parseInt(e[1],10),parseInt(e[2],10)-1,1).getTime():f?new Date(parseInt(f[1],10),parseInt(f[2],10)-1,parseInt(f[3],10)).getTime():h?(k=new Date(parseInt(h[1],10),0,1),4!==k.getDay()&&k.setMonth(0,1+(4-k.getDay()+7)%7),k.getTime()+6048e5*parseInt(h[2],10)):i?i[6]?(g=0,"Z"!==i[6]&&(g=60*parseInt(i[8],10)+parseInt(i[9],10),"+"===i[7]&&(g=0-g)),Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)+g)):new Date(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)).getTime():j?(l=parseFloat(j[6]),b=Math.floor(l),d=Math.round(1e3*(l-b)),j[8]?(g=0,"Z"!==j[8]&&(g=60*parseInt(j[10],10)+parseInt(j[11],10),"+"===j[9]&&(g=0-g)),Date.UTC(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10)+g,b,d)):new Date(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10),b,d).getTime()):new Date(parseInt(a,10),0,1).getTime())},b.Hover=function(){function c(c){null==c&&(c={}),this.options=a.extend({},b.Hover.defaults,c),this.el=a("<div class='"+this.options["class"]+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return c.defaults={"class":"morris-hover morris-default-style"},c.prototype.update=function(a,b,c){return this.html(a),this.show(),this.moveTo(b,c)},c.prototype.html=function(a){return this.el.html(a)},c.prototype.moveTo=function(a,b){var c,d,e,f,g,h;return g=this.options.parent.innerWidth(),f=this.options.parent.innerHeight(),d=this.el.outerWidth(),c=this.el.outerHeight(),e=Math.min(Math.max(0,a-d/2),g-d),null!=b?(h=b-c-10,0>h&&(h=b+10,h+c>f&&(h=f/2-c/2))):h=f/2-c/2,this.el.css({"left":e+"px","top":h+"px"})},c.prototype.show=function(){return this.el.show()},c.prototype.hide=function(){return this.el.hide()},c}(),b.Line=function(a){function c(a){return this.hilight=h(this.hilight,this),this.onHoverOut=h(this.onHoverOut,this),this.onHoverMove=h(this.onHoverMove,this),this instanceof b.Line?void c.__super__.constructor.call(this,a):new b.Line(a)}return g(c,a),c.prototype.init=function(){return this.pointGrow=Raphael.animation({"r":this.options.pointSize+3},25,"linear"),this.pointShrink=Raphael.animation({"r":this.options.pointSize},25,"linear"),"always"!==this.options.hideHover?(this.hover=new b.Hover({"parent":this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut)):void 0},c.prototype.defaults={"lineWidth":3,"pointSize":4,"lineColors":["#57889c","#71843f","#92a2a8","#afd8f8","#edc240","#cb4b4b","#9440ed"],"pointWidths":[1],"pointStrokeColors":["#ffffff"],"pointFillColors":[],"smooth":!0,"xLabels":"auto","xLabelFormat":null,"xLabelMargin":50,"continuousLine":!0,"hideHover":!1},c.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},c.prototype.calcPoints=function(){var a,b,c,d,e,f;for(e=this.data,f=[],c=0,d=e.length;d>c;c++)a=e[c],a._x=this.transX(a.x),a._y=function(){var c,d,e,f;for(e=a.y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b?f.push(this.transY(b)):f.push(b);return f}.call(this),f.push(a._ymax=Math.min.apply(null,[this.bottom].concat(function(){var c,d,e,f;for(e=a._y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b&&f.push(b);return f}())));return f},c.prototype.hitTest=function(a,b){var c,d,e,f,g;if(0===this.data.length)return null;for(g=this.data.slice(1),c=e=0,f=g.length;f>e&&(d=g[c],!(a<(d._x+this.data[c]._x)/2));c=++e);return c},c.prototype.onHoverMove=function(a,b){var c;return c=this.hitTest(a,b),this.displayHoverForRow(c)},c.prototype.onHoverOut=function(){return"auto"===this.options.hideHover?this.displayHoverForRow(null):void 0},c.prototype.displayHoverForRow=function(a){var b;return null!=a?((b=this.hover).update.apply(b,this.hoverContentForRow(a)),this.hilight(a)):(this.hover.hide(),this.hilight())},c.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h;if(d=this.data[a],"function"==typeof this.options.hoverCallback)b=this.options.hoverCallback(a,this.options);else for(b="<div class='morris-hover-row-label'>"+d.label+"</div>",h=d.y,c=f=0,g=h.length;g>f;c=++f)e=h[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n  "+this.options.labels[c]+":\n  "+this.yLabelFormat(e)+"\n</div>";return[b,d._x,d._ymax]},c.prototype.generatePaths=function(){var a,c,d,e,f;return this.paths=function(){var g,h,j,k;for(k=[],d=g=0,h=this.options.ykeys.length;h>=0?h>g:g>h;d=h>=0?++g:--g)f=this.options.smooth===!0||(j=this.options.ykeys[d],i.call(this.options.smooth,j)>=0),c=function(){var a,b,c,f;for(c=this.data,f=[],a=0,b=c.length;b>a;a++)e=c[a],void 0!==e._y[d]&&f.push({"x":e._x,"y":e._y[d]});return f}.call(this),this.options.continuousLine&&(c=function(){var b,d,e;for(e=[],b=0,d=c.length;d>b;b++)a=c[b],null!==a.y&&e.push(a);return e}()),c.length>1?k.push(b.Line.createPath(c,f,this.bottom)):k.push(null);return k}.call(this)},c.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},c.prototype.drawXAxis=function(){var a,c,d,e,f,g,h,i,j,k=this;for(g=this.bottom+1.25*this.options.gridTextSize,e=null,a=function(a,b){var c,d;return c=k.drawXAxisLabel(k.transX(b),g,a),d=c.getBBox(),(null==e||e>=d.x+d.width)&&d.x>=0&&d.x+d.width<k.el.width()?e=d.x-k.options.xLabelMargin:c.remove()},d=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:b.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var a,b,c,d;for(c=this.data,d=[],a=0,b=c.length;b>a;a++)f=c[a],d.push([f.label,f.x]);return d}.call(this),d.reverse(),j=[],h=0,i=d.length;i>h;h++)c=d[h],j.push(a(c[0],c[1]));return j},c.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h,i;for(b=e=g=this.options.ykeys.length-1;0>=g?0>=e:e>=0;b=0>=g?++e:--e)c=this.paths[b],null!==c&&this.drawLinePath(c,this.colorFor(d,b,"line"));for(this.seriesPoints=function(){var a,c,d;for(d=[],b=a=0,c=this.options.ykeys.length;c>=0?c>a:a>c;b=c>=0?++a:--a)d.push([]);return d}.call(this),i=[],b=f=h=this.options.ykeys.length-1;0>=h?0>=f:f>=0;b=0>=h?++f:--f)i.push(function(){var c,e,f,g;for(f=this.data,g=[],c=0,e=f.length;e>c;c++)d=f[c],a=null!=d._y[b]?this.drawLinePoint(d._x,d._y[b],this.options.pointSize,this.colorFor(d,b,"point"),b):null,g.push(this.seriesPoints[b].push(a));return g}.call(this));return i},c.createPath=function(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;for(k="",c&&(g=b.Line.gradients(a)),l={"y":null},h=q=0,r=a.length;r>q;h=++q)e=a[h],null!=e.y&&(null!=l.y?c?(f=g[h],j=g[h-1],i=(e.x-l.x)/4,m=l.x+i,o=Math.min(d,l.y+i*j),n=e.x-i,p=Math.min(d,e.y-i*f),k+="C"+m+","+o+","+n+","+p+","+e.x+","+e.y):k+="L"+e.x+","+e.y:c&&null==g[h]||(k+="M"+e.x+","+e.y)),l=e;return k},c.gradients=function(a){var b,c,d,e,f,g,h,i;for(c=function(a,b){return(a.y-b.y)/(a.x-b.x)},i=[],d=g=0,h=a.length;h>g;d=++g)b=a[d],null!=b.y?(e=a[d+1]||{"y":null},f=a[d-1]||{"y":null},null!=f.y&&null!=e.y?i.push(c(f,e)):null!=f.y?i.push(c(f,b)):null!=e.y?i.push(c(b,e)):i.push(null)):i.push(null);return i},c.prototype.hilight=function(a){var b,c,d,e,f;if(null!==this.prevHilight&&this.prevHilight!==a)for(b=c=0,e=this.seriesPoints.length-1;e>=0?e>=c:c>=e;b=e>=0?++c:--c)this.seriesPoints[b][this.prevHilight]&&this.seriesPoints[b][this.prevHilight].animate(this.pointShrink);if(null!==a&&this.prevHilight!==a)for(b=d=0,f=this.seriesPoints.length-1;f>=0?f>=d:d>=f;b=f>=0?++d:--d)this.seriesPoints[b][a]&&this.seriesPoints[b][a].animate(this.pointGrow);return this.prevHilight=a},c.prototype.colorFor=function(a,b,c){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,a,b,c):"point"===c?this.options.pointFillColors[b%this.options.pointFillColors.length]||this.options.lineColors[b%this.options.lineColors.length]:this.options.lineColors[b%this.options.lineColors.length]},c.prototype.drawXAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor)},c.prototype.drawLinePath=function(a,b){return this.raphael.path(a).attr("stroke",b).attr("stroke-width",this.options.lineWidth)},c.prototype.drawLinePoint=function(a,b,c,d,e){return this.raphael.circle(a,b,c).attr("fill",d).attr("stroke-width",this.strokeWidthForSeries(e)).attr("stroke",this.strokeForSeries(e))},c.prototype.strokeWidthForSeries=function(a){return this.options.pointWidths[a%this.options.pointWidths.length]},c.prototype.strokeForSeries=function(a){return this.options.pointStrokeColors[a%this.options.pointStrokeColors.length]},c}(b.Grid),b.labelSeries=function(c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r;if(j=200*(d-c)/e,i=new Date(c),n=b.LABEL_SPECS[f],void 0===n)for(r=b.AUTO_LABEL_ORDER,p=0,q=r.length;q>p;p++)if(k=r[p],m=b.LABEL_SPECS[k],j>=m.span){n=m;break}for(void 0===n&&(n=b.LABEL_SPECS.second),g&&(n=a.extend({},n,{"fmt":g})),h=n.start(i),l=[];(o=h.getTime())<=d;)o>=c&&l.push([n.fmt(h),o]),n.incr(h);return l},c=function(a){return{"span":60*a*1e3,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours())},"fmt":function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())},"incr":function(b){return b.setMinutes(b.getMinutes()+a)}}},d=function(a){return{"span":1e3*a,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes())},"fmt":function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())+":"+b.pad2(a.getSeconds())},"incr":function(b){return b.setSeconds(b.getSeconds()+a)}}},b.LABEL_SPECS={"decade":{"span":1728e8,"start":function(a){return new Date(a.getFullYear()-a.getFullYear()%10,0,1)},"fmt":function(a){return""+a.getFullYear()},"incr":function(a){return a.setFullYear(a.getFullYear()+10)}},"year":{"span":1728e7,"start":function(a){return new Date(a.getFullYear(),0,1)},"fmt":function(a){return""+a.getFullYear()},"incr":function(a){return a.setFullYear(a.getFullYear()+1)}},"month":{"span":24192e5,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),1)},"fmt":function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)},"incr":function(a){return a.setMonth(a.getMonth()+1)}},"day":{"span":864e5,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},"fmt":function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)+"-"+b.pad2(a.getDate())},"incr":function(a){return a.setDate(a.getDate()+1)}},"hour":c(60),"30min":c(30),"15min":c(15),"10min":c(10),"5min":c(5),"minute":c(1),"30sec":d(30),"15sec":d(15),"10sec":d(10),"5sec":d(5),"second":d(1)},b.AUTO_LABEL_ORDER=["decade","year","month","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],b.Area=function(a){function c(a){return this instanceof b.Area?(this.cumulative=!0,void c.__super__.constructor.call(this,a)):new b.Area(a)}return g(c,a),c.prototype.calcPoints=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],d=0,e=f.length;e>d;d++)a=f[d],a._x=this.transX(a.x),b=0,a._y=function(){var d,e,f,g;for(f=a.y,g=[],d=0,e=f.length;e>d;d++)c=f[d],b+=c||0,g.push(this.transY(b));return g}.call(this),g.push(a._ymax=a._y[a._y.length-1]);return g},c.prototype.drawSeries=function(){var a,b,d,e;for(a=d=e=this.options.ykeys.length-1;0>=e?0>=d:d>=0;a=0>=e?++d:--d)b=this.paths[a],null!==b&&(b+="L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(b,this.fillForSeries(a)));return c.__super__.drawSeries.call(this)},c.prototype.fillForSeries=function(a){var b;return b=Raphael.rgb2hsl(this.colorFor(this.data[a],a,"line")),Raphael.hsl(b.h,Math.min(255,.75*b.s),Math.min(255,1.25*b.l))},c.prototype.drawFilledPath=function(a,b){return this.raphael.path(a).attr("fill",b).attr("stroke-width",0)},c}(b.Line),b.Bar=function(c){function d(c){return this.onHoverOut=h(this.onHoverOut,this),this.onHoverMove=h(this.onHoverMove,this),this instanceof b.Bar?void d.__super__.constructor.call(this,a.extend({},c,{"parseTime":!1})):new b.Bar(c)}return g(d,c),d.prototype.init=function(){return this.cumulative=this.options.stacked,"always"!==this.options.hideHover?(this.hover=new b.Hover({"parent":this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut)):void 0},d.prototype.defaults={"barSizeRatio":.75,"barGap":3,"barColors":["#57889c","#71843f","#92a2a8","#afd8f8","#edc240","#cb4b4b","#9440ed"],"xLabelMargin":50},d.prototype.calc=function(){var a;return this.calcBars(),this.options.hideHover===!1?(a=this.hover).update.apply(a,this.hoverContentForRow(this.data.length-1)):void 0},d.prototype.calcBars=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],a=d=0,e=f.length;e>d;a=++d)b=f[a],b._x=this.left+this.width*(a+.5)/this.data.length,g.push(b._y=function(){var a,d,e,f;for(e=b.y,f=[],a=0,d=e.length;d>a;a++)c=e[a],null!=c?f.push(this.transY(c)):f.push(null);return f}.call(this));return g},d.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries()},d.prototype.drawXAxis=function(){var a,b,c,d,e,f,g,h,i;for(f=this.bottom+1.25*this.options.gridTextSize,d=null,i=[],a=g=0,h=this.data.length;h>=0?h>g:g>h;a=h>=0?++g:--g)e=this.data[this.data.length-1-a],b=this.drawXAxisLabel(e._x,f,e.label),c=b.getBBox(),(null==d||d>=c.x+c.width)&&c.x>=0&&c.x+c.width<this.el.width()?i.push(d=c.x-this.options.xLabelMargin):i.push(b.remove());return i},d.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;return c=this.width/this.options.data.length,h=null!=this.options.stacked?1:this.options.ykeys.length,a=(c*this.options.barSizeRatio-this.options.barGap*(h-1))/h,g=c*(1-this.options.barSizeRatio)/2,n=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var h,o,p,q;for(p=this.data,q=[],d=h=0,o=p.length;o>h;d=++h)i=p[d],e=0,q.push(function(){var h,o,p,q;for(p=i._y,q=[],j=h=0,o=p.length;o>h;j=++h)m=p[j],null!==m?(n?(l=Math.min(m,n),b=Math.max(m,n)):(l=m,b=this.bottom),f=this.left+d*c+g,this.options.stacked||(f+=j*(a+this.options.barGap)),k=b-l,this.options.stacked&&(l-=e),this.drawBar(f,l,a,k,this.colorFor(i,j,"bar")),q.push(e+=k)):q.push(null);return q}.call(this));return q}.call(this)},d.prototype.colorFor=function(a,b,c){var d,e;return"function"==typeof this.options.barColors?(d={"x":a.x,"y":a.y[b],"label":a.label},e={"index":b,"key":this.options.ykeys[b],"label":this.options.labels[b]},this.options.barColors.call(this,d,e,c)):this.options.barColors[b%this.options.barColors.length]},d.prototype.hitTest=function(a,b){return 0===this.data.length?null:(a=Math.max(Math.min(a,this.right),this.left),Math.min(this.data.length-1,Math.floor((a-this.left)/(this.width/this.data.length))))},d.prototype.onHoverMove=function(a,b){var c,d;return c=this.hitTest(a,b),(d=this.hover).update.apply(d,this.hoverContentForRow(c))},d.prototype.onHoverOut=function(){return"auto"===this.options.hideHover?this.hover.hide():void 0},d.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h,i;if("function"==typeof this.options.hoverCallback)b=this.options.hoverCallback(a,this.options);else for(d=this.data[a],b="<div class='morris-hover-row-label'>"+d.label+"</div>",i=d.y,c=g=0,h=i.length;h>g;c=++g)f=i[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n  "+this.options.labels[c]+":\n  "+this.yLabelFormat(f)+"\n</div>";return e=this.left+(a+.5)*this.width/this.data.length,[b,e]},d.prototype.drawXAxisLabel=function(a,b,c){var d;return d=this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor)},d.prototype.drawBar=function(a,b,c,d,e){return this.raphael.rect(a,b,c,d).attr("fill",e).attr("stroke-width",0)},d}(b.Grid),b.Donut=function(){function c(c){if(this.select=h(this.select,this),!(this instanceof b.Donut))return new b.Donut(c);if("string"==typeof c.element?this.el=a(document.getElementById(c.element)):this.el=a(c.element),this.options=a.extend({},this.defaults,c),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==c.data&&0!==c.data.length&&(this.data=c.data,this.redraw())}return c.prototype.defaults={"colors":["#57889c","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],"backgroundColor":"#FFFFFF","labelColor":"#000000","formatter":b.commas},c.prototype.redraw=function(){var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;for(this.el.empty(),this.raphael=new Raphael(this.el[0]),c=this.el.width()/2,d=this.el.height()/2,m=(Math.min(c,d)-10)/3,l=0,u=this.data,o=0,r=u.length;r>o;o++)n=u[o],l+=n.value;for(i=5/(2*m),a=1.9999*Math.PI-i*this.data.length,g=0,f=0,this.segments=[],v=this.data,p=0,s=v.length;s>p;p++)e=v[p],j=g+i+a*(e.value/l),k=new b.DonutSegment(c,d,2*m,m,g,j,this.options.colors[f%this.options.colors.length],this.options.backgroundColor,e,this.raphael),k.render(),this.segments.push(k),k.on("hover",this.select),g=j,f+=1;for(this.text1=this.drawEmptyDonutLabel(c,d-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(c,d+10,this.options.labelColor,14),h=Math.max.apply(null,function(){var a,b,c,d;for(c=this.data,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.value);return d}.call(this)),f=0,w=this.data,x=[],q=0,t=w.length;t>q;q++){if(e=w[q],e.value===h){this.select(f);break}x.push(f+=1)}return x},c.prototype.select=function(a){var b,c,d,e,f;for(f=this.segments,d=0,e=f.length;e>d;d++)b=f[d],b.deselect();return c="number"==typeof a?this.segments[a]:a,c.select(),this.setLabels(c.data.label,this.options.formatter(c.data.value,c.data))},c.prototype.setLabels=function(a,b){var c,d,e,f,g,h,i,j;return c=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,f=1.8*c,e=c/2,d=c/3,this.text1.attr({"text":a,"transform":""}),g=this.text1.getBBox(),h=Math.min(f/g.width,e/g.height),this.text1.attr({"transform":"S"+h+","+h+","+(g.x+g.width/2)+","+(g.y+g.height)}),this.text2.attr({"text":b,"transform":""}),i=this.text2.getBBox(),j=Math.min(f/i.width,d/i.height),this.text2.attr({"transform":"S"+j+","+j+","+(i.x+i.width/2)+","+i.y})},c.prototype.drawEmptyDonutLabel=function(a,b,c,d,e){var f;return f=this.raphael.text(a,b,"").attr("font-size",d).attr("fill",c),null!=e&&f.attr("font-weight",e),f},c}(),b.DonutSegment=function(a){function b(a,b,c,d,e,f,g,i,j,k){this.cx=a,this.cy=b,this.inner=c,this.outer=d,this.color=g,this.backgroundColor=i,this.data=j,this.raphael=k,this.deselect=h(this.deselect,this),this.select=h(this.select,this),this.sin_p0=Math.sin(e),this.cos_p0=Math.cos(e),this.sin_p1=Math.sin(f),this.cos_p1=Math.cos(f),this.is_long=f-e>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return g(b,a),b.prototype.calcArcPoints=function(a){return[this.cx+a*this.sin_p0,this.cy+a*this.cos_p0,this.cx+a*this.sin_p1,this.cy+a*this.cos_p1]},b.prototype.calcSegment=function(a,b){var c,d,e,f,g,h,i,j,k,l;return k=this.calcArcPoints(a),c=k[0],e=k[1],d=k[2],f=k[3],l=this.calcArcPoints(b),g=l[0],i=l[1],h=l[2],j=l[3],"M"+c+","+e+("A"+a+","+a+",0,"+this.is_long+",0,"+d+","+f)+("L"+h+","+j)+("A"+b+","+b+",0,"+this.is_long+",1,"+g+","+i)+"Z"},b.prototype.calcArc=function(a){var b,c,d,e,f;return f=this.calcArcPoints(a),b=f[0],d=f[1],c=f[2],e=f[3],"M"+b+","+d+("A"+a+","+a+",0,"+this.is_long+",0,"+c+","+e)},b.prototype.render=function(){var a=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return a.fire("hover",a)})},b.prototype.drawDonutArc=function(a,b){return this.raphael.path(a).attr({"stroke":b,"stroke-width":2,"opacity":0})},b.prototype.drawDonutSegment=function(a,b,c,d){return this.raphael.path(a).attr({"fill":b,"stroke":c,"stroke-width":3}).hover(d)},b.prototype.select=function(){return this.selected?void 0:(this.seg.animate({"path":this.selectedPath},150,"<>"),this.arc.animate({"opacity":1},150,"<>"),this.selected=!0)},b.prototype.deselect=function(){return this.selected?(this.seg.animate({"path":this.path},150,"<>"),this.arc.animate({"opacity":0},150,"<>"),this.selected=!1):void 0},b}(b.EventEmitter)}).call(this);
  !function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={"n":{}},k=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=k.listeners(a),j=0,l=[],m={},n=[],o=b;b=a,c=0;for(var p=0,q=h.length;q>p;p++)"zIndex"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],"zIndex"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k._events=j,k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={"n":{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){if(!a)return void(k._events=j={"n":{}});var c,d,h,i,l,m,n,o=a.split(f),p=[j];for(i=0,l=o.length;l>i;i++)for(m=0;m<p.length;m+=h.length-2){if(h=[m,1],c=p[m].n,o[i]!=g)c[o[i]]&&h.push(c[o[i]]);else for(d in c)c[e](d)&&h.push(c[d]);p.splice.apply(p,h)}for(i=0,l=p.length;l>i;i++)for(c=p[i];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;n>m;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var q=c.n[d].f;for(m=0,n=q.length;n>m;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(window||this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){if(c.is(a,"function"))return u?a():b.on("raphael.DOMload",a);if(c.is(a,V))return c._engine.create[D](c,a.splice(0,3+c.is(a[0],T))).add(a);var d=Array.prototype.slice.call(arguments,0);if(c.is(d[d.length-1],"function")){var e=d.pop();return u?e.call(c._engine.create[D](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[D](c,d))})}return c._engine.create[D](c,arguments)}function d(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[z](c)&&(b[c]=d(a[c]));return b}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function f(a,b,c){function d(){var f=Array.prototype.slice.call(arguments,0),g=f.join("\u2400"),h=d.cache=d.cache||{},i=d.count=d.count||[];return h[z](g)?(e(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[D](b,f),c?c(h[g]):h[g])}return d}function g(){return this.hex}function h(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{"x":+a[d-2],"y":+a[d-1]},{"x":+a[d],"y":+a[d+1]},{"x":+a[d+2],"y":+a[d+3]},{"x":+a[d+4],"y":+a[d+5]}];b?d?e-4==d?f[3]={"x":+a[0],"y":+a[1]}:e-2==d&&(f[2]={"x":+a[0],"y":+a[1]},f[3]={"x":+a[2],"y":+a[3]}):f[0]={"x":+a[e-2],"y":+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={"x":+a[d],"y":+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function i(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function j(a,b,c,d,e,f,g,h,j){null==j&&(j=1),j=j>1?1:0>j?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;l>p;p++){var q=k*m[p]+k,r=i(q,a,c,e,g),s=i(q,b,d,f,h),t=r*r+s*s;o+=n[p]*N.sqrt(t)}return k*o}function k(a,b,c,d,e,f,g,h,i){if(!(0>i||j(a,b,c,d,e,f,g,h)<i)){var k,l=1,m=l/2,n=l-m,o=.01;for(k=j(a,b,c,d,e,f,g,h,n);Q(k-i)>o;)m/=2,n+=(i>k?1:-1)*m,k=j(a,b,c,d,e,f,g,h,n);return n}}function l(a,b,c,d,e,f,g,h){if(!(O(a,c)<P(e,g)||P(a,c)>O(e,g)||O(b,d)<P(f,h)||P(b,d)>O(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+P(a,c).toFixed(2)||n>+O(a,c).toFixed(2)||n<+P(e,g).toFixed(2)||n>+O(e,g).toFixed(2)||o<+P(b,d).toFixed(2)||o>+O(b,d).toFixed(2)||o<+P(f,h).toFixed(2)||o>+O(f,h).toFixed(2)))return{"x":l,"y":m}}}}function m(a,b,d){var e=c.bezierBBox(a),f=c.bezierBBox(b);if(!c.isBBoxIntersect(e,f))return d?0:[];for(var g=j.apply(0,a),h=j.apply(0,b),i=O(~~(g/5),1),k=O(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;i+1>q;q++){var r=c.findDotsAtSegment.apply(c,a.concat(q/i));m.push({"x":r.x,"y":r.y,"t":q/i})}for(q=0;k+1>q;q++)r=c.findDotsAtSegment.apply(c,b.concat(q/k)),n.push({"x":r.x,"y":r.y,"t":q/k});for(q=0;i>q;q++)for(var s=0;k>s;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=Q(u.x-t.x)<.001?"y":"x",y=Q(w.x-v.x)<.001?"y":"x",z=l(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+Q((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+Q((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&1.001>=A&&B>=0&&1.001>=B&&(d?p++:p.push({"x":z.x,"y":z.y,"t1":P(A,1),"t2":P(B,1)}))}}return p}function n(a,b,d){a=c._path2curve(a),b=c._path2curve(b);for(var e,f,g,h,i,j,k,l,n,o,p=d?0:[],q=0,r=a.length;r>q;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=b.length;u>t;t++){var v=b[t];if("M"==v[0])g=k=v[1],h=l=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,l,k,l],g=k,h=l);var w=m(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function o(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function p(){return this.x+H+this.y+H+this.width+" \xd7 "+this.height}function q(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;8>i;i++){if(f=g(e)-a,Q(f)<b)return e;if(h=(3*l*e+2*k)*e+j,Q(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,c>e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),Q(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function r(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[z](e)&&(d[_(e)]=a[e],c.push(_(e)));c.sort(la)}this.anim=d,this.top=c[c.length-1],this.percents=c}function s(a,d,e,f,g,h){e=_(e);var i,j,k,l,m,n,p=a.ms,r={},s={},t={};if(f)for(v=0,x=ib.length;x>v;v++){var u=ib[v];if(u.el.id==d.id&&u.anim==a){u.percent!=e?(ib.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var v=0,x=a.percents.length;x>v;v++){if(a.percents[v]==e||a.percents[v]>f*a.top){e=a.percents[v],m=a.percents[v-1]||0,p=p/a.top*(e-m),l=a.percents[v+1],i=a.anim[e];break}f&&d.attr(a.anim[a.percents[v]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var y in i)if(i[z](y)&&(da[z](y)||d.paper.customAttributes[z](y)))switch(r[y]=d.attr(y),null==r[y]&&(r[y]=ca[y]),s[y]=i[y],da[y]){case T:t[y]=(s[y]-r[y])/p;break;case"colour":r[y]=c.getRGB(r[y]);var A=c.getRGB(s[y]);t[y]={"r":(A.r-r[y].r)/p,"g":(A.g-r[y].g)/p,"b":(A.b-r[y].b)/p};break;case"path":var B=Ka(r[y],s[y]),C=B[1];for(r[y]=B[0],t[y]=[],v=0,x=r[y].length;x>v;v++){t[y][v]=[0];for(var D=1,F=r[y][v].length;F>D;D++)t[y][v][D]=(C[v][D]-r[y][v][D])/p}break;case"transform":var G=d._,H=Pa(G[y],s[y]);if(H)for(r[y]=H.from,s[y]=H.to,t[y]=[],t[y].real=!0,v=0,x=r[y].length;x>v;v++)for(t[y][v]=[r[y][v][0]],D=1,F=r[y][v].length;F>D;D++)t[y][v][D]=(s[y][v][D]-r[y][v][D])/p;else{var K=d.matrix||new o,L={"_":{"transform":G.transform},"getBBox":function(){return d.getBBox(1)}};r[y]=[K.a,K.b,K.c,K.d,K.e,K.f],Na(L,s[y]),s[y]=L._.transform,t[y]=[(L.matrix.a-K.a)/p,(L.matrix.b-K.b)/p,(L.matrix.c-K.c)/p,(L.matrix.d-K.d)/p,(L.matrix.e-K.e)/p,(L.matrix.f-K.f)/p]}break;case"csv":var M=I(i[y])[J](w),N=I(r[y])[J](w);if("clip-rect"==y)for(r[y]=N,t[y]=[],v=N.length;v--;)t[y][v]=(M[v]-r[y][v])/p;s[y]=M;break;default:for(M=[][E](i[y]),N=[][E](r[y]),t[y]=[],v=d.paper.customAttributes[y].length;v--;)t[y][v]=((M[v]||0)-(N[v]||0))/p}var O=i.easing,P=c.easing_formulas[O];if(!P)if(P=I(O).match(Z),P&&5==P.length){var Q=P;P=function(a){return q(a,+Q[1],+Q[2],+Q[3],+Q[4],p)}}else P=na;if(n=i.start||a.start||+new Date,u={"anim":a,"percent":e,"timestamp":n,"start":n+(a.del||0),"status":0,"initstatus":f||0,"stop":!1,"ms":p,"easing":P,"from":r,"diff":t,"to":s,"el":d,"callback":i.callback,"prev":m,"next":l,"repeat":h||a.times,"origin":d.attr(),"totalOrigin":g},ib.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-p*f,1==ib.length))return kb();k&&(u.start=new Date-u.ms*f),1==ib.length&&jb(kb)}b("raphael.anim.start."+d.id,d,a)}}function t(a){for(var b=0;b<ib.length;b++)ib[b].el.paper==a&&ib.splice(b--,1)}c.version="2.1.2",c.eve=b;var u,v,w=/[, ]+/,x={"circle":1,"rect":1,"path":1,"ellipse":1,"text":1,"image":1},y=/\{(\d+)\}/g,z="hasOwnProperty",A={"doc":document,"win":a},B={"was":Object.prototype[z].call(A.win,"Raphael"),"is":A.win.Raphael},C=function(){this.ca=this.customAttributes={}},D="apply",E="concat",F="ontouchstart"in A.win||A.win.DocumentTouch&&A.doc instanceof DocumentTouch,G="",H=" ",I=String,J="split",K="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[J](H),L={"mousedown":"touchstart","mousemove":"touchmove","mouseup":"touchend"},M=I.prototype.toLowerCase,N=Math,O=N.max,P=N.min,Q=N.abs,R=N.pow,S=N.PI,T="number",U="string",V="array",W=Object.prototype.toString,X=(c._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),Y={"NaN":1,"Infinity":1,"-Infinity":1},Z=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,$=N.round,_=parseFloat,aa=parseInt,ba=I.prototype.toUpperCase,ca=c._availableAttrs={"arrow-end":"none","arrow-start":"none","blur":0,"clip-rect":"0 0 1e9 1e9","cursor":"default","cx":0,"cy":0,"fill":"#fff","fill-opacity":1,"font":'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,"gradient":0,"height":0,"href":"http://raphaeljs.com/","letter-spacing":0,"opacity":1,"path":"M0,0","r":0,"rx":0,"ry":0,"src":"","stroke":"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,"target":"_blank","text-anchor":"middle","title":"Raphael","transform":"","width":0,"x":0,"y":0},da=c._availableAnimAttrs={"blur":T,"clip-rect":"csv","cx":T,"cy":T,"fill":"colour","fill-opacity":T,"font-size":T,"height":T,"opacity":T,"path":"path","r":T,"rx":T,"ry":T,"stroke":"colour","stroke-opacity":T,"stroke-width":T,"transform":"transform","width":T,"x":T,"y":T},ea=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,fa={"hs":1,"rg":1},ga=/,?([achlmqrstvxz]),?/gi,ha=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ia=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ja=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ka=(c._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),la=function(a,b){return _(a)-_(b)},ma=function(){},na=function(a){return a},oa=c._rectPath=function(a,b,c,d,e){return e?[["M",a+e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]]:[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},pa=function(a,b,c,d){return null==d&&(d=c),[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},qa=c._getPath={"path":function(a){return a.attr("path")},"circle":function(a){var b=a.attrs;return pa(b.cx,b.cy,b.r)},"ellipse":function(a){var b=a.attrs;return pa(b.cx,b.cy,b.rx,b.ry)},"rect":function(a){var b=a.attrs;return oa(b.x,b.y,b.width,b.height,b.r)},"image":function(a){var b=a.attrs;return oa(b.x,b.y,b.width,b.height)},"text":function(a){var b=a._getBBox();return oa(b.x,b.y,b.width,b.height)},"set":function(a){var b=a._getBBox();return oa(b.x,b.y,b.width,b.height)}},ra=c.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=Ka(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(c._g=A,c.type=A.win.SVGAngle||A.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==c.type){var sa,ta=A.doc.createElement("div");if(ta.innerHTML='<v:shape adj="1"/>',sa=ta.firstChild,sa.style.behavior="url(#default#VML)",!sa||"object"!=typeof sa.adj)return c.type=G;ta=null}c.svg=!(c.vml="VML"==c.type),c._Paper=C,c.fn=v=C.prototype=c.prototype,c._id=0,c._oid=0,c.is=function(a,b){return b=M.call(b),"finite"==b?!Y[z](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||W.call(a).slice(8,-1).toLowerCase()==b},c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+180*N.atan2(-i,-h)/S+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*S/180},c.deg=function(a){return 180*a/S%360},c.snapTo=function(a,b,d){if(d=c.is(d,"finite")?d:10,c.is(a,V)){for(var e=a.length;e--;)if(Q(a[e]-b)<=d)return a[e]}else{a=+a;var f=b%a;if(d>f)return b-f;if(f>a-d)return b-f+a}return b};c.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*N.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});c.setWindow=function(a){b("raphael.setWindow",c,A.win,a),A.win=a,A.doc=A.win.document,c._engine.initWin&&c._engine.initWin(A.win)};var ua=function(a){if(c.vml){var b,d=/^\s+|\s+$/g;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),b=e.body}catch(g){b=createPopup().document.body}var h=b.createTextRange();ua=f(function(a){try{b.style.color=I(a).replace(d,G);var c=h.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=A.doc.createElement("i");i.title="Rapha\xebl Colour Picker",i.style.display="none",A.doc.body.appendChild(i),ua=f(function(a){return i.style.color=a,A.doc.defaultView.getComputedStyle(i,G).getPropertyValue("color")})}return ua(a)},va=function(){return"hsb("+[this.h,this.s,this.b]+")"},wa=function(){return"hsl("+[this.h,this.s,this.l]+")"},xa=function(){return this.hex},ya=function(a,b,d){if(null==b&&c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&c.is(a,U)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},za=function(a,b,d,e){a*=255,b*=255,d*=255;var f={"r":a,"g":b,"b":d,"hex":c.rgb(a,b,d),"toString":xa};return c.is(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={"hex":"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=xa,a},c.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Q(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],za(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-Q(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],za(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=ya(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=O(a,b,c),g=f-P(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{"h":d,"s":e,"b":f,"toString":va}},c.rgb2hsl=function(a,b,c){c=ya(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=O(a,b,c),h=P(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{"h":d,"s":e,"l":f,"toString":wa}},c._path2string=function(){return this.join(",").replace(ga,"$1")};c._preload=function(a,b){var c=A.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,A.doc.body.removeChild(this)},c.onerror=function(){A.doc.body.removeChild(this)},A.doc.body.appendChild(c),c.src=a};c.getRGB=f(function(a){if(!a||(a=I(a)).indexOf("-")+1)return{"r":-1,"g":-1,"b":-1,"hex":"none","error":1,"toString":g};if("none"==a)return{"r":-1,"g":-1,"b":-1,"hex":"none","toString":g};!(fa[z](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=ua(a));var b,d,e,f,h,i,j=a.match(X);return j?(j[2]&&(e=aa(j[2].substring(5),16),d=aa(j[2].substring(3,5),16),b=aa(j[2].substring(1,3),16)),j[3]&&(e=aa((h=j[3].charAt(3))+h,16),d=aa((h=j[3].charAt(2))+h,16),b=aa((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100)),j[5]?(i=j[5][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsb2rgb(b,d,e,f)):j[6]?(i=j[6][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsl2rgb(b,d,e,f)):(j={"r":b,"g":d,"b":e,"toString":g},j.hex="#"+(16777216|e|d<<8|b<<16).toString(16).slice(1),c.is(f,"finite")&&(j.opacity=f),j)):{"r":-1,"g":-1,"b":-1,"hex":"none","error":1,"toString":g}},c),c.hsb=f(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=f(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=f(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{"h":0,"s":1,"b":a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={"h":0,"s":1,"b":b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){if(!a)return null;var b=Aa(a);if(b.arr)return Ca(b.arr);var d={"a":7,"c":6,"h":1,"l":2,"m":2,"r":4,"q":4,"s":4,"t":2,"v":1,"z":0},e=[];return c.is(a,V)&&c.is(a[0],V)&&(e=Ca(a)),e.length||I(a).replace(ha,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ja,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][E](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][E](f));else for(;f.length>=d[g]&&(e.push([b][E](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=Ca(e),e},c.parseTransformString=f(function(a){if(!a)return null;var b=[];return c.is(a,V)&&c.is(a[0],V)&&(b=Ca(a)),b.length||I(a).replace(ia,function(a,c,d){var e=[];M.call(c);d.replace(ja,function(a,b){b&&e.push(+b)}),b.push([c][E](e))}),b.toString=c._path2string,b});var Aa=function(a){var b=Aa.ps=Aa.ps||{};return b[a]?b[a].sleep=100:b[a]={"sleep":100},setTimeout(function(){for(var c in b)b[z](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=R(j,3),l=R(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*N.atan2(q-s,r-t)/S;return(q>s||t>r)&&(y+=180),{"x":o,"y":p,"m":{"x":q,"y":r},"n":{"x":s,"y":t},"start":{"x":u,"y":v},"end":{"x":w,"y":x},"alpha":y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=Ja.apply(null,a);return{"x":j.min.x,"y":j.min.y,"x2":j.max.x,"y2":j.max.y,"width":j.max.x-j.min.x,"height":j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.x<b.x2&&a.x>b.x||b.x<a.x2&&b.x>a.x)&&(a.y<b.y2&&a.y>b.y||b.y<a.y2&&b.y>a.y)},c.pathIntersection=function(a,b){return n(a,b)},c.pathIntersectionNumber=function(a,b){return n(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&n(a,[["M",b,d],["H",e.x2+10]],1)%2==1},c._removedFactory=function(a){return function(){b("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+a+"\u201d of removed object",a)}};var Ba=c.pathBBox=function(a){var b=Aa(a);if(b.bbox)return d(b.bbox);if(!a)return{"x":0,"y":0,"width":0,"height":0,"x2":0,"y2":0};a=Ka(a);for(var c,e=0,f=0,g=[],h=[],i=0,j=a.length;j>i;i++)if(c=a[i],"M"==c[0])e=c[1],f=c[2],g.push(e),h.push(f);else{var k=Ja(e,f,c[1],c[2],c[3],c[4],c[5],c[6]);g=g[E](k.min.x,k.max.x),h=h[E](k.min.y,k.max.y),e=c[5],f=c[6]}var l=P[D](0,g),m=P[D](0,h),n=O[D](0,g),o=O[D](0,h),p=n-l,q=o-m,r={"x":l,"y":m,"x2":n,"y2":o,"width":p,"height":q,"cx":l+p/2,"cy":m+q/2};return b.bbox=d(r),r},Ca=function(a){var b=d(a);return b.toString=c._path2string,b},Da=c._pathToRelative=function(a){var b=Aa(a);if(b.rel)return Ca(b.rel);c.is(a,V)&&c.is(a&&a[0],V)||(a=c.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;k>j;j++){var l=d[j]=[],m=a[j];if(m[0]!=M.call(m[0]))switch(l[0]=M.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;o>n;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;q>p;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=c._path2string,b.rel=Ca(d),d},Ea=c._pathToAbsolute=function(a){var b=Aa(a);if(b.abs)return Ca(b.abs);if(c.is(a,V)&&c.is(a&&a[0],V)||(a=c.parsePathString(a)),!a||!a.length)return[["M",0,0]];var d=[],e=0,f=0,g=0,i=0,j=0;"M"==a[0][0]&&(e=+a[0][1],f=+a[0][2],g=e,i=f,j++,d[0]=["M",e,f]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;o>n;n++){if(d.push(k=[]),l=a[n],l[0]!=ba.call(l[0]))switch(k[0]=ba.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,f][E](l.slice(1)),q=2,r=p.length;r>q;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[E](h(p,m));break;case"M":g=+l[1]+e,i=+l[2]+f;default:for(q=1,r=l.length;r>q;q++)k[q]=+l[q]+(q%2?e:f)}else if("R"==l[0])p=[e,f][E](l.slice(1)),d.pop(),d=d[E](h(p,m)),k=["R"][E](l.slice(-2));else for(var s=0,t=l.length;t>s;s++)k[s]=l[s];switch(k[0]){case"Z":e=g,f=i;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":g=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}return d.toString=c._path2string,b.abs=Ca(d),d},Fa=function(a,b,c,d){return[a,b,c,d,c,d]},Ga=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Ha=function(a,b,c,d,e,g,h,i,j,k){var l,m=120*S/180,n=S/180*(+e||0),o=[],p=f(function(a,b,c){var d=a*N.cos(c)-b*N.sin(c),e=a*N.sin(c)+b*N.cos(c);return{"x":d,"y":e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(a,b,-n),a=l.x,b=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(N.cos(S/180*e),N.sin(S/180*e),(a-i)/2),r=(b-j)/2,s=q*q/(c*c)+r*r/(d*d);s>1&&(s=N.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*N.sqrt(Q((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=N.asin(((b-x)/d).toFixed(9)),z=N.asin(((j-x)/d).toFixed(9));y=w>a?S-y:y,z=w>i?S-z:z,0>y&&(y=2*S+y),0>z&&(z=2*S+z),h&&y>z&&(y-=2*S),!h&&z>y&&(z-=2*S)}var A=z-y;if(Q(A)>m){var B=z,C=i,D=j;z=y+m*(h&&z>y?1:-1),i=w+c*N.cos(z),j=x+d*N.sin(z),o=Ha(i,j,c,d,e,0,h,C,D,[z,B,w,x])}A=z-y;var F=N.cos(y),G=N.sin(y),H=N.cos(z),I=N.sin(z),K=N.tan(A/4),L=4/3*c*K,M=4/3*d*K,O=[a,b],P=[a+L*G,b-M*F],R=[i+L*I,j-M*H],T=[i,j];if(P[0]=2*O[0]-P[0],P[1]=2*O[1]-P[1],k)return[P,R,T][E](o);o=[P,R,T][E](o).join()[J](",");for(var U=[],V=0,W=o.length;W>V;V++)U[V]=V%2?p(o[V-1],o[V],n).y:p(o[V],o[V+1],n).x;return U},Ia=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{"x":R(j,3)*a+3*R(j,2)*i*c+3*j*i*i*e+R(i,3)*g,"y":R(j,3)*b+3*R(j,2)*i*d+3*j*i*i*f+R(i,3)*h}},Ja=f(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+N.sqrt(k*k-4*j*l))/2/j,n=(-k-N.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return Q(m)>"1e12"&&(m=.5),Q(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Ia(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Ia(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+N.sqrt(k*k-4*j*l))/2/j,n=(-k-N.sqrt(k*k-4*j*l))/2/j,Q(m)>"1e12"&&(m=.5),Q(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Ia(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Ia(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{"min":{"x":P[D](0,p),"y":P[D](0,o)},"max":{"x":O[D](0,p),"y":O[D](0,o)}}}),Ka=c._path2curve=f(function(a,b){var c=!b&&Aa(a);if(!b&&c.curve)return Ca(c.curve);for(var d=Ea(a),e=b&&Ea(b),f={"x":0,"y":0,"bx":0,"by":0,"X":0,"Y":0,"qx":null,"qy":null},g={"x":0,"y":0,"bx":0,"by":0,"X":0,"Y":0,"qx":null,"qy":null},h=(function(a,b,c){var d,e,f={"T":1,"Q":1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][E](Ha[D](0,[b.x,b.y][E](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][E](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][E](Ga(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][E](Ga(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][E](Fa(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][E](Fa(b.x,b.y,a[1],b.y));break;case"V":a=["C"][E](Fa(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][E](Fa(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][E](c.splice(0,6)));a.splice(b,1),l=O(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=O(d.length,e&&e.length||0))},k=0,l=O(d.length,e&&e.length||0);l>k;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var m=d[k],n=e&&e[k],o=m.length,p=e&&n.length;f.x=m[o-2],f.y=m[o-1],f.bx=_(m[o-4])||f.x,f.by=_(m[o-3])||f.y,g.bx=e&&(_(n[p-4])||g.x),g.by=e&&(_(n[p-3])||g.y),g.x=e&&n[p-2],g.y=e&&n[p-1]}return e||(c.curve=Ca(d)),e?[d,e]:d},null,Ca),La=(c._parseDots=f(function(a){for(var b=[],d=0,e=a.length;e>d;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=c.getRGB(g[1]),f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),b.push(f)}for(d=1,e=b.length-1;e>d;d++)if(!b[d].offset){for(var h=_(b[d-1].offset||0),i=0,j=d+1;e>j;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=e),i=_(i);for(var k=(i-h)/(j-d+1);j>d;d++)h+=k,b[d].offset=h+"%"}return b}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Ma=(c._tofront=function(a,b){b.top!==a&&(La(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},c._toback=function(a,b){b.bottom!==a&&(La(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},c._insertafter=function(a,b,c){La(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},c._insertbefore=function(a,b,c){La(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=Ba(a),d={"_":{"transform":G},"getBBox":function(){return c}};return Na(d,b),d.matrix}),Na=(c.transformPath=function(a,b){return ra(a,Ma(a,b))},c._extractTransform=function(a,b){if(null==b)return a._.transform;b=I(b).replace(/\.{3}|\u2026/g,a._.transform||G);var d=c.parseTransformString(b),e=0,f=0,g=0,h=1,i=1,j=a._,k=new o;if(j.transform=d||[],d)for(var l=0,m=d.length;m>l;l++){var n,p,q,r,s,t=d[l],u=t.length,v=I(t[0]).toLowerCase(),w=t[0]!=v,x=w?k.invert():0;"t"==v&&3==u?w?(n=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),k.translate(q-n,r-p)):k.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),k.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==v&&7==u&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),Oa=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":
  return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Pa=c._equaliseTransform=function(a,b){b=I(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=O(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||Oa(b[k]),g=b[k]||Oa(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=O(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{"from":i,"to":j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,"object")?a:A.doc.getElementById(a),null!=f?f.tagName?null==b?{"container":f,"width":f.style.pixelWidth||f.offsetWidth,"height":f.style.pixelHeight||f.offsetHeight}:{"container":f,"width":b,"height":d}:{"container":1,"x":a,"y":b,"width":d,"height":e}:void 0},c.pathToRelative=Da,c._engine={},c.path2curve=Ka,c.matrix=function(a,b,c,d,e,f){return new o(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=N.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof o&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new o(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+N.cos(a).toFixed(9),f=+N.sin(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[I.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=N.sqrt(b(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=N.sqrt(b(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return 0>g?(a.rotate=c.deg(N.acos(g)),0>f&&(a.rotate=360-a.rotate)):a.rotate=c.deg(N.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[J]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:G)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:G)+(b.rotate?"r"+[b.rotate,0,0]:G)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(o.prototype);var Qa=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(Qa&&Qa[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Qa&&Qa[1]<8?v.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({"stroke":"none"});setTimeout(function(){a.remove()})}:v.safari=ma;for(var Ra=function(){this.returnValue=!1},Sa=function(){return this.originalEvent.preventDefault()},Ta=function(){this.cancelBubble=!0},Ua=function(){return this.originalEvent.stopPropagation()},Va=function(a){var b=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,c=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;return{"x":a.clientX+c,"y":a.clientY+b}},Wa=function(){return A.doc.addEventListener?function(a,b,c,d){var e=function(a){var b=Va(a);return c.call(d,a,b.x,b.y)};if(a.addEventListener(b,e,!1),F&&L[b]){var f=function(b){for(var e=Va(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;h>g;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=Sa,b.stopPropagation=Ua;break}return c.call(d,b,e.x,e.y)};a.addEventListener(L[b],f,!1)}return function(){return a.removeEventListener(b,e,!1),F&&L[b]&&a.removeEventListener(L[b],e,!1),!0}}:A.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||A.win.event;var b=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,e=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||Ra,a.stopPropagation=a.stopPropagation||Ta,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),Xa=[],Ya=function(a){for(var c,d=a.clientX,e=a.clientY,f=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,g=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,h=Xa.length;h--;){if(c=Xa[h],F&&a.touches){for(var i,j=a.touches.length;j--;)if(i=a.touches[j],i.identifier==c.el._drag.id){d=i.clientX,e=i.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;A.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(d,e),l.style.display=o,A.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&b("raphael.drag.over."+c.el.id,c.el,k),d+=g,e+=f,b("raphael.drag.move."+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,a)}},Za=function(a){c.unmousemove(Ya).unmouseup(Za);for(var d,e=Xa.length;e--;)d=Xa[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);Xa=[]},$a=c.el={},_a=K.length;_a--;)!function(a){c[a]=$a[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({"name":a,"f":b,"unbind":Wa(this.shape||this.node||A.doc,a,b,d||this)})),this},c["un"+a]=$a["un"+a]=function(b){for(var d=this.events||[],e=d.length;e--;)d[e].name!=a||!c.is(b,"undefined")&&d[e].f!=b||(d[e].unbind(),d.splice(e,1),!d.length&&delete this.events);return this}}(K[_a]);$a.data=function(a,d){var e=ka[this.id]=ka[this.id]||{};if(0==arguments.length)return e;if(1==arguments.length){if(c.is(a,"object")){for(var f in a)a[z](f)&&this.data(f,a[f]);return this}return b("raphael.data.get."+this.id,this,e[a],a),e[a]}return e[a]=d,b("raphael.data.set."+this.id,this,d,a),this},$a.removeData=function(a){return null==a?ka[this.id]={}:ka[this.id]&&delete ka[this.id][a],this},$a.getData=function(){return d(ka[this.id]||{})},$a.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},$a.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var ab=[];$a.drag=function(a,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=i.clientX,k=i.clientY,l=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,m=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;if(this._drag.id=i.identifier,F&&i.touches)for(var n,o=i.touches.length;o--;)if(n=i.touches[o],this._drag.id=n.identifier,n.identifier==this._drag.id){j=n.clientX,k=n.clientY;break}this._drag.x=j+m,this._drag.y=k+l,!Xa.length&&c.mousemove(Ya).mouseup(Za),Xa.push({"el":this,"move_scope":f,"start_scope":g,"end_scope":h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+m,i.clientY+l,i)}return this._drag={},ab.push({"el":this,"start":i}),this.mousedown(i),this},$a.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},$a.undrag=function(){for(var a=ab.length;a--;)ab[a].el==this&&(this.unmousedown(ab[a].start),ab.splice(a,1),b.unbind("raphael.drag.*."+this.id));!ab.length&&c.unmousemove(Ya).unmouseup(Za),Xa=[]},v.circle=function(a,b,d){var e=c._engine.circle(this,a||0,b||0,d||0);return this.__set__&&this.__set__.push(e),e},v.rect=function(a,b,d,e,f){var g=c._engine.rect(this,a||0,b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},v.ellipse=function(a,b,d,e){var f=c._engine.ellipse(this,a||0,b||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},v.path=function(a){a&&!c.is(a,U)&&!c.is(a[0],V)&&(a+=G);var b=c._engine.path(c.format[D](c,arguments),this);return this.__set__&&this.__set__.push(b),b},v.image=function(a,b,d,e,f){var g=c._engine.image(this,a||"about:blank",b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},v.text=function(a,b,d){var e=c._engine.text(this,a||0,b||0,I(d));return this.__set__&&this.__set__.push(e),e},v.set=function(a){!c.is(a,"array")&&(a=Array.prototype.splice.call(arguments,0,arguments.length));var b=new mb(a);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},v.setStart=function(a){this.__set__=a||this.set()},v.setFinish=function(a){var b=this.__set__;return delete this.__set__,b},v.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},v.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},v.top=v.bottom=null,v.raphael=c;var bb=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(A.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(A.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{"y":h,"x":i}};v.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=A.doc.elementFromPoint(a,b);if(A.win.opera&&"svg"==e.tagName){var f=bb(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},v.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},v.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},v.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},v.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},$a.isPointInside=function(a,b){var d=this.realPath=qa[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=c.transformPath(d,this.attr("transform"))),c.isPointInsidePath(d,a,b)},$a.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=qa[this.type](this),b.bboxwt=Ba(this.realPath),b.bboxwt.toString=p,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=qa[this.type](this)),b.bbox=Ba(ra(this.realPath,this.matrix)),b.bbox.toString=p,b.dirty=b.dirtyT=0),b.bbox)},$a.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},$a.glow=function(a){if("text"==this.type)return null;a=a||{};var b={"width":(a.width||10)+(+this.attr("stroke-width")||1),"fill":a.fill||!1,"opacity":a.opacity||.5,"offsetx":a.offsetx||0,"offsety":a.offsety||0,"color":a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||qa[this.type](this);f=this.matrix?ra(f,this.matrix):f;for(var g=1;c+1>g;g++)e.push(d.path(f).attr({"stroke":b.color,"fill":b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),"opacity":+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cb=function(a,b,d,e,f,g,h,i,l){return null==l?j(a,b,d,e,f,g,h,i):c.findDotsAtSegment(a,b,d,e,f,g,h,i,k(a,b,d,e,f,g,h,i,l))},db=function(a,b){return function(d,e,f){d=Ka(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;p>o;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(b&&!m.start){if(k=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return k=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{"x":k.x,"y":k.y,"alpha":k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:b?m:c.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={"x":k.x,"y":k.y,"alpha":k.alpha}),k}},eb=db(1),fb=db(),gb=db(0,1);c.getTotalLength=eb,c.getPointAtLength=fb,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return gb(a,b).end;var d=gb(a,c,1);return b?gb(d,b).end:d},$a.getTotalLength=function(){var a=this.getPath();if(a)return this.node.getTotalLength?this.node.getTotalLength():eb(a)},$a.getPointAtLength=function(a){var b=this.getPath();if(b)return fb(b,a)},$a.getPath=function(){var a,b=c._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return b&&(a=b(this)),a},$a.getSubpath=function(a,b){var d=this.getPath();if(d)return c.getSubpath(d,a,b)};var hb=c.easing_formulas={"linear":function(a){return a},"<":function(a){return R(a,1.7)},">":function(a){return R(a,.48)},"<>":function(a){var b=.48-a/1.04,c=N.sqrt(.1734+b*b),d=c-b,e=R(Q(d),1/3)*(0>d?-1:1),f=-c-b,g=R(Q(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},"backIn":function(a){var b=1.70158;return a*a*((b+1)*a-b)},"backOut":function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},"elastic":function(a){return a==!!a?a:R(2,-10*a)*N.sin((a-.075)*(2*S)/.3)+1},"bounce":function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};hb.easeIn=hb["ease-in"]=hb["<"],hb.easeOut=hb["ease-out"]=hb[">"],hb.easeInOut=hb["ease-in-out"]=hb["<>"],hb["back-in"]=hb.backIn,hb["back-out"]=hb.backOut;var ib=[],jb=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},kb=function(){for(var a=+new Date,d=0;d<ib.length;d++){var e=ib[d];if(!e.el.removed&&!e.paused){var f,g,h=a-e.start,i=e.ms,j=e.easing,k=e.from,l=e.diff,m=e.to,n=(e.t,e.el),o={},p={};if(e.initstatus?(h=(e.initstatus*e.anim.top-e.prev)/(e.percent-e.prev)*i,e.status=e.initstatus,delete e.initstatus,e.stop&&ib.splice(d--,1)):e.status=(e.prev+(e.percent-e.prev)*(h/i))/e.anim.top,!(0>h))if(i>h){var q=j(h/i);for(var r in k)if(k[z](r)){switch(da[r]){case T:f=+k[r]+q*i*l[r];break;case"colour":f="rgb("+[lb($(k[r].r+q*i*l[r].r)),lb($(k[r].g+q*i*l[r].g)),lb($(k[r].b+q*i*l[r].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[r].length;u>t;t++){f[t]=[k[r][t][0]];for(var v=1,w=k[r][t].length;w>v;v++)f[t][v]=+k[r][t][v]+q*i*l[r][t][v];f[t]=f[t].join(H)}f=f.join(H);break;case"transform":if(l[r].real)for(f=[],t=0,u=k[r].length;u>t;t++)for(f[t]=[k[r][t][0]],v=1,w=k[r][t].length;w>v;v++)f[t][v]=k[r][t][v]+q*i*l[r][t][v];else{var x=function(a){return+k[r][a]+q*i*l[r][a]};f=[["m",x(0),x(1),x(2),x(3),x(4),x(5)]]}break;case"csv":if("clip-rect"==r)for(f=[],t=4;t--;)f[t]=+k[r][t]+q*i*l[r][t];break;default:var y=[][E](k[r]);for(f=[],t=n.paper.customAttributes[r].length;t--;)f[t]=+y[t]+q*i*l[r][t]}o[r]=f}n.attr(o),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(n.id,n,e.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(e.callback,n,e.anim),n.attr(m),ib.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[z](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),s(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&s(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}c.svg&&n&&n.paper&&n.paper.safari(),ib.length&&jb(kb)},lb=function(a){return a>255?255:0>a?0:a};$a.animateWith=function(a,b,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof r?d:c.animation(d,e,f,g);s(i,h,i.percents[0],null,h.attr());for(var j=0,k=ib.length;k>j;j++)if(ib[j].anim==b&&ib[j].el==a){ib[k-1].start=ib[j].start;break}return h},$a.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},r.prototype.delay=function(a){var b=new r(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},r.prototype.repeat=function(a){var b=new r(this.anim,this.ms);return b.del=this.del,b.times=N.floor(O(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof r)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g,h={};for(g in a)a[z](g)&&_(g)!=g&&_(g)+"%"!=g&&(f=!0,h[g]=a[g]);return f?(d&&(h.easing=d),e&&(h.callback=e),new r({"100":h},b)):new r(a,b)},$a.animate=function(a,b,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof r?a:c.animation(a,b,d,e);return s(g,f,g.percents[0],null,f.attr()),f},$a.setTime=function(a,b){return a&&null!=b&&this.status(a,P(b,a.ms)/a.ms),this},$a.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return s(a,this,-1,P(b,1)),this;for(c=ib.length;c>f;f++)if(d=ib[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({"anim":d.anim,"status":d.status})}return a?0:e},$a.pause=function(a){for(var c=0;c<ib.length;c++)ib[c].el.id!=this.id||a&&ib[c].anim!=a||b("raphael.anim.pause."+this.id,this,ib[c].anim)!==!1&&(ib[c].paused=!0);return this},$a.resume=function(a){for(var c=0;c<ib.length;c++)if(ib[c].el.id==this.id&&(!a||ib[c].anim==a)){var d=ib[c];b("raphael.anim.resume."+this.id,this,d.anim)!==!1&&(delete d.paused,this.status(d.anim,d.status))}return this},$a.stop=function(a){for(var c=0;c<ib.length;c++)ib[c].el.id!=this.id||a&&ib[c].anim!=a||b("raphael.anim.stop."+this.id,this,ib[c].anim)!==!1&&ib.splice(c--,1);return this},b.on("raphael.remove",t),b.on("raphael.clear",t),$a.toString=function(){return"Rapha\xebl\u2019s object"};var mb=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)!a[b]||a[b].constructor!=$a.constructor&&a[b].constructor!=mb||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},nb=mb.prototype;nb.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],!a||a.constructor!=$a.constructor&&a.constructor!=mb||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},nb.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},nb.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var ob in $a)$a[z](ob)&&(nb[ob]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][D](c,b)})}}(ob));return nb.attr=function(a,b){if(a&&c.is(a,V)&&c.is(a[0],"object"))for(var d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},nb.clear=function(){for(;this.length;)this.pop()},nb.splice=function(a,b,c){a=0>a?O(this.length+a,0):a,b=O(0,P(this.length-a,b));var d,e=[],f=[],g=[];for(d=2;d<arguments.length;d++)g.push(arguments[d]);for(d=0;b>d;d++)f.push(this[a+d]);for(;d<this.length-a;d++)e.push(this[a+d]);var h=g.length;for(d=0;d<h+e.length;d++)this.items[a+d]=this[a+d]=h>d?g[d]:e[d-h];for(d=this.items.length=this.length-=b-h;this[d];)delete this[d++];return new mb(f)},nb.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},nb.animate=function(a,b,d,e){(c.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=c.is(d,U)?d:g;var k=c.animation(a,b,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k),this.items[i]&&!this.items[i].removed||h--;return this},nb.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},nb.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=P[D](0,a),b=P[D](0,b),c=O[D](0,c),d=O[D](0,d),{"x":a,"y":b,"x2":c,"y2":d,"width":c-a,"height":d-b}},nb.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},nb.toString=function(){return"Rapha\xebl\u2018s set"},nb.glow=function(a){var b=this.paper.set();return this.forEach(function(c,d){var e=c.glow(a);null!=e&&e.forEach(function(a,c){b.push(a)})}),b},nb.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){return d.isPointInside(a,b)?(c=!0,!1):void 0}),c},c.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={"w":a.w,"face":{},"glyphs":{}},c=a.face["font-family"];for(var d in a.face)a.face[z](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=aa(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[z](e)){var f=a.glyphs[e];if(b.glyphs[e]={"w":f.w,"k":{},"d":f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{"l":"L","c":"C","x":"z","t":"m","r":"l","v":"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[z](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},v.getFont=function(a,b,d,e){if(e=e||"normal",d=d||"normal",b=+b||{"normal":400,"bold":700,"lighter":300,"bolder":800}[b]||400,c.fonts){var f=c.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,G)+"(\\s|$)","i");for(var h in c.fonts)if(c.fonts[z](h)&&g.test(h)){f=c.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},v.print=function(a,b,d,e,f,g,h,i){g=g||"middle",h=O(P(h||0,1),-1),i=O(P(i||1,3),1);var j,k=I(d)[J](G),l=0,m=0,n=G;if(c.is(e,"string")&&(e=this.getFont(e)),e){j=(f||16)/e.face["units-per-em"];for(var o=e.face.bbox[J](w),p=+o[0],q=o[3]-o[1],r=0,s=+o[1]+("baseline"==g?q+ +e.face.descent:q/2),t=0,u=k.length;u>t;t++){if("\n"==k[t])l=0,x=0,m=0,r+=q*i;else{var v=m&&e.glyphs[k[t-1]]||{},x=e.glyphs[k[t]];l+=m?(v.w||e.w)+(v.k&&v.k[k[t]]||0)+e.w*h:0,m=1}x&&x.d&&(n+=c.transformPath(x.d,["t",l*j,r*j,"s",j,j,p,s,"t",(a-p)/j,(b-s)/j]))}}return this.path(n).attr({"fill":"#000","stroke":"none"})},v.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},x[z](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,V)?[0][E](b):arguments;return a&&c.is(a,U)&&d.length-1&&(a=a.replace(y,function(a,b){return null==d[++b]?G:d[b]})),a||G},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return B.was?A.win.Raphael=B.is:delete Raphael,c},c.st=nb,function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){u=!0}),function(){if(c.svg){var a="hasOwnProperty",b=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=c.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={"block":"M5,0 0,2.5 5,5z","classic":"M5,0 0,2.5 5,5 3.5,3 3.5,2z","diamond":"M2.5,0 5,2.5 2.5,5 0,2.5z","open":"M6,1 1,3.5 6,6","oval":"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};c.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var q=function(d,e){if(e){"string"==typeof d&&(d=q(d));for(var f in e)e[a](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(n,f.substring(6),b(e[f])):d.setAttribute(f,b(e[f])))}else d=c._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(a,e){var j="linear",k=a.id+e,m=.5,n=.5,o=a.node,p=a.paper,r=o.style,s=c._g.doc.getElementById(k);if(!s){if(e=b(e).replace(c._radial_gradient,function(a,b,c){if(j="radial",b&&c){m=d(b),n=d(c);var e=2*(n>.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(c.rad(t)),f.sin(c.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=c._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),a.gradient&&k!=a.gradient.id&&(p.defs.removeChild(a.gradient),delete a.gradient),!a.gradient){s=q(j+"Gradient",{"id":k}),a.gradient=s,q(s,"radial"==j?{"fx":m,"fy":n}:{"x1":u[0],"y1":u[1],"x2":u[2],"y2":u[3],"gradientTransform":a.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;y>x;x++)s.appendChild(q("stop",{"offset":w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}return q(o,{"fill":"url(#"+k+")","opacity":1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1,1},s=function(a){var b=a.getBBox(1);q(a.pattern,{"patternTransform":a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,m=b(e).toLowerCase().split("-"),n=d.paper,r=f?"end":"start",s=d.node,t=d.attrs,u=t["stroke-width"],v=m.length,w="classic",x=3,y=3,z=5;v--;)switch(m[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=m[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={"fill":"none","stroke":t.stroke}):(j=i=x/2,k={"fill":t.stroke,"stroke":"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+r+w+x+y;c._g.doc.getElementById(A)?p[A]++:(n.defs.appendChild(q(q("path"),{"stroke-linecap":"round","d":o[w],"id":A})),p[A]=1);var C,D=c._g.doc.getElementById(B);D?(p[B]++,C=D.getElementsByTagName("use")[0]):(D=q(q("marker"),{"id":B,"markerHeight":y,"markerWidth":x,"orient":"auto","refX":j,"refY":y/2}),C=q(q("use"),{"xlink:href":"#"+A,"transform":(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),n.defs.appendChild(D),p[B]=1),q(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(t.path)-E*u):(g=E*u,h=c.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+r]="url(#"+B+")",(h||g)&&(k.d=c.getSubpath(t.path,g,h)),q(s,k),d._.arrows[r+"Path"]=A,d._.arrows[r+"Marker"]=B,d._.arrows[r+"dx"]=E,d._.arrows[r+"Type"]=w,d._.arrows[r+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(t.path)-g):(g=0,h=c.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),d._.arrows[r+"Path"]&&q(s,{"d":c.getSubpath(t.path,g,h)}),delete d._.arrows[r+"Path"],delete d._.arrows[r+"Marker"],delete d._.arrows[r+"dx"],delete d._.arrows[r+"Type"],delete d._.arrows[r+"String"];for(k in p)if(p[a](k)&&!p[k]){var F=c._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},u={"":[0],"none":[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,c,d){if(c=u[b(c).toLowerCase()]){for(var e=a.attrs["stroke-width"]||"1",f={"round":e,"square":e,"butt":0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=c.length;h--;)g[h]=c[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[a](o)){if(!c._availableAttrs[a](o))continue;var p=f[o];switch(k[o]=p,o){case"blur":d.blur(p);break;case"title":var u=i.getElementsByTagName("title");if(u.length&&(u=u[0]))u.firstChild.nodeValue=p;else{u=q("title");var w=c._g.doc.createTextNode(p);u.appendChild(w),i.appendChild(u)}break;case"href":case"target":var x=i.parentNode;if("a"!=x.tagName.toLowerCase()){var z=q("a");x.insertBefore(z,i),z.appendChild(i),x=z}"target"==o?x.setAttributeNS(n,"show","blank"==p?"new":p):x.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var A=b(p).split(j);if(4==A.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var B=q("clipPath"),C=q("rect");B.id=c.createUUID(),q(C,{"x":A[0],"y":A[1],"width":A[2],"height":A[3]}),B.appendChild(C),d.paper.defs.appendChild(B),q(i,{"clip-path":"url(#"+B.id+")"}),d.clip=C}if(!p){var D=i.getAttribute("clip-path");if(D){var E=c._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g,l));E&&E.parentNode.removeChild(E),q(i,{"clip-path":l}),delete d.clip}}break;case"path":"path"==d.type&&(q(i,{"d":p?k.path=c._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(o,p),d._.dirty=1,!k.fx)break;o="x",p=k.x;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if("rx"==o&&"rect"==d.type)break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":if(i.setAttribute(o,p),d._.dirty=1,!k.fy)break;o="y",p=k.y;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if("ry"==o&&"rect"==d.type)break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":"rect"==d.type?q(i,{"rx":p,"ry":p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(n,"href",p);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(p/=g(h(d._.sx),h(d._.sy))||1),d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var F=b(p).match(c._ISURL);if(F){B=q("pattern");var G=q("image");B.id=c.createUUID(),q(B,{"x":0,"y":0,"patternUnits":"userSpaceOnUse","height":1,"width":1}),q(G,{"x":0,"y":0,"xlink:href":F[1]}),B.appendChild(G),function(a){c._preload(F[1],function(){var b=this.offsetWidth,c=this.offsetHeight;q(a,{"width":b,"height":c}),q(G,{"width":b,"height":c}),d.paper.safari()})}(B),d.paper.defs.appendChild(B),q(i,{"fill":"url(#"+B.id+")"}),d.pattern=B,d.pattern&&s(d);break}var H=c.getRGB(p);if(H.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=b(p).charAt())&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var I=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(I){var J=I.getElementsByTagName("stop");q(J[J.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}}else delete f.gradient,delete k.gradient,!c.is(k.opacity,"undefined")&&c.is(f.opacity,"undefined")&&q(i,{"opacity":k.opacity}),!c.is(k["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});H[a]("opacity")&&q(i,{"fill-opacity":H.opacity>1?H.opacity/100:H.opacity});case"stroke":
  H=c.getRGB(p),i.setAttribute(o,H.hex),"stroke"==o&&H[a]("opacity")&&q(i,{"stroke-opacity":H.opacity>1?H.opacity/100:H.opacity}),"stroke"==o&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=b(p).charAt())&&r(d,p);break;case"opacity":k.gradient&&!k[a]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){I=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),I&&(J=I.getElementsByTagName("stop"),q(J[J.length-1],{"stop-opacity":p}));break}default:"font-size"==o&&(p=e(p,10)+"px");var K=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[K]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if("text"==d.type&&(f[a]("text")||f[a]("font")||f[a]("font-size")||f[a]("x")||f[a]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(c._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[a]("text")){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var j,k=b(f.text).split("\n"),m=[],n=0,o=k.length;o>n;n++)j=q("tspan"),n&&q(j,{"dy":i*x,"x":g.x}),j.appendChild(c._g.doc.createTextNode(k[n])),h.appendChild(j),m[n]=j}else for(m=h.getElementsByTagName("tspan"),n=0,o=m.length;o>n;n++)n?q(m[n],{"dy":i*x,"x":g.x}):q(m[0],{"dy":0});q(h,{"x":g.x,"y":g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&c.is(r,"finite")&&q(m[0],{"dy":r})}},z=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.matrix=c.matrix(),this.realPath=null,this.paper=b,this.attrs=this.attrs||{},this._={"transform":[],"sx":1,"sy":1,"deg":0,"dx":0,"dy":0,"dirty":1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},A=c.el;z.prototype=A,A.constructor=z,c._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);return d.type="path",w(d,{"fill":"none","stroke":"#000","path":a}),d},A.rotate=function(a,c,e){if(this.removed)return this;if(a=b(a).split(j),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this.transform(this._.transform.concat([["r",a,c,e]])),this},A.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(j),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this},A.translate=function(a,c){return this.removed?this:(a=b(a).split(j),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this.transform(this._.transform.concat([["t",a,c]])),this)},A.transform=function(b){var d=this._;if(null==b)return d.transform;if(c._extractTransform(this,b),this.clip&&q(this.clip,{"transform":this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{"transform":this.matrix}),1!=d.sx||1!=d.sy){var e=this.attrs[a]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},A.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},A.remove=function(){if(!this.removed&&this.node.parentNode){var a=this.paper;a.__set__&&a.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&a.defs.removeChild(this.gradient),c._tear(this,a),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var b in this)this[b]="function"==typeof this[b]?c._removedFactory(b):null;this.removed=!0}},A._getBBox=function(){if("none"==this.node.style.display){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}return a&&this.hide(),b},A.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&c.is(b,"string")){if("fill"==b&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==b)return this._.transform;for(var g=b.split(j),h={},i=0,l=g.length;l>i;i++)b=g[i],b in this.attrs?h[b]=this.attrs[b]:c.is(this.paper.customAttributes[b],"function")?h[b]=this.paper.customAttributes[b].def:h[b]=c._availableAttrs[b];return l-1?h:h[g[0]]}if(null==d&&c.is(b,"array")){for(h={},i=0,l=b.length;l>i;i++)h[b[i]]=this.attr(b[i]);return h}if(null!=d){var m={};m[b]=d}else null!=b&&c.is(b,"object")&&(m=b);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[a](n)&&m[a](n)&&c.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[a](p)&&(m[p]=o[p])}return w(this,m),this},A.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var a=this.paper;return a.top!=this&&c._tofront(this,a),this},A.toBack=function(){if(this.removed)return this;var a=this.node.parentNode;"a"==a.tagName.toLowerCase()?a.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):a.firstChild!=this.node&&a.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper);this.paper;return this},A.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this},A.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;return b.parentNode.insertBefore(this.node,b),c._insertbefore(this,a,this.paper),this},A.blur=function(a){var b=this;if(0!==+a){var d=q("filter"),e=q("feGaussianBlur");b.attrs.blur=a,d.id=c.createUUID(),q(e,{"stdDeviation":+a||1.5}),d.appendChild(e),b.paper.defs.appendChild(d),b._blur=d,q(b.node,{"filter":"url(#"+d.id+")"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter");return b},c._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);return f.attrs={"cx":b,"cy":c,"r":d,"fill":"none","stroke":"#000"},f.type="circle",q(e,f.attrs),f},c._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={"x":b,"y":c,"width":d,"height":e,"r":f||0,"rx":f||0,"ry":f||0,"fill":"none","stroke":"#000"},h.type="rect",q(g,h.attrs),h},c._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);return g.attrs={"cx":b,"cy":c,"rx":d,"ry":e,"fill":"none","stroke":"#000"},g.type="ellipse",q(f,g.attrs),g},c._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{"x":c,"y":d,"width":e,"height":f,"preserveAspectRatio":"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={"x":c,"y":d,"width":e,"height":f,"src":b},h.type="image",h},c._engine.text=function(a,b,d,e){var f=q("text");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);return g.attrs={"x":b,"y":d,"text-anchor":"middle","text":e,"font":c._availableAttrs.font,"stroke":"none","fill":"#000"},g.type="text",w(g,g.attrs),g},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a&&a.container,d=a.x,e=a.y,f=a.width,g=a.height;if(!b)throw new Error("SVG container not found.");var h,i=q("svg"),j="overflow:hidden;";return d=d||0,e=e||0,f=f||512,g=g||342,q(i,{"height":g,"version":1.1,"width":f,"xmlns":"http://www.w3.org/2000/svg"}),1==b?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",c._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i)),b=new c._Paper,b.width=f,b.height=g,b.canvas=i,b.clear(),b._left=b._top=0,h&&(b.renderfix=function(){}),b.renderfix(),b},c._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=g(c/this.width,d/this.height),j=this.top,l=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(i=1),delete this._vbSize,f="0 0 "+this.width+m+this.height):(this._vbSize=i,f=a+m+b+m+c+m+d),q(this.canvas,{"viewBox":f,"preserveAspectRatio":l});i&&j;)h="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":h}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},c.prototype.clear=function(){c.eve("raphael.clear",this);for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(c._g.doc.createTextNode("Created with Rapha\xebl "+c.version)),a.appendChild(this.desc),a.appendChild(this.defs=q("defs"))},c.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null};var B=c.st;for(var C in A)A[a](C)&&!B[a](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}}(),function(){if(c.vml){var a="hasOwnProperty",b=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=c.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={"M":"m","L":"l","C":"c","Z":"x","m":"t","l":"r","c":"v","z":"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={"path":1,"rect":1,"image":1},w={"circle":1,"ellipse":1},x=function(a){var d=/[ahqstv]/gi,e=c._pathToAbsolute;if(b(a).match(d)&&(e=c._path2curve),d=/[clmz]/g,e==c._pathToAbsolute&&!b(a).match(d)){var g=b(a).replace(q,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=p[b];return c.replace(s,function(a){e&&2==d.length&&(g+=d+p["m"==b?"l":"L"],d=[]),d.push(f(a*u))}),g+d});return g}var h,i,j=e(a);g=[];for(var k=0,l=j.length;l>k;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,r=h.length;r>m;m++)i+=f(h[m]*u)+(m!=r-1?",":o);g.push(i)}return g.join(n)},y=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{"dx":e.x(b,d),"dy":e.y(b,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q=u/b,r=u/c;if(m.visibility="hidden",b&&c){if(l.coordsize=i(q)+n+i(r),m.rotation=f*(0>b*c?-1:1),f){var s=y(f,d,e);d=s.dx,e=s.dy}if(0>b&&(p+="x"),0>c&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-q+n+e*-r,k||g.fillsize){var t=l.getElementsByTagName(j);t=t&&t[0],l.removeChild(t),k&&(s=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),t.position=s.dx*o+n+s.dy*o),g.fillsize&&(t.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(t)}m.visibility="visible"}};c.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var A=function(a,c,d){for(var e=b(c).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s=e;for(var t in i)i[a](t)&&(m[t]=i[t]);if(q&&(m.path=c._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(l.path=x(~b(m.path).toLowerCase().indexOf("r")?c._pathToAbsolute(m.path):m.path),"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),r){var y=+m.cx,B=+m.cy,D=+m.rx||+m.r||0,E=+m.ry||+m.r||0;l.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-D)*u),f((B-E)*u),f((y+D)*u),f((B+E)*u),f(y*u)),e._.dirty=1}if("clip-rect"in i){var G=b(i["clip-rect"]).split(k);if(4==G.length){G[2]=+G[2]+ +G[0],G[3]=+G[3]+ +G[1];var H=l.clipRect||c._g.doc.createElement("div"),I=H.style;I.clip=c.format("rect({1}px {2}px {3}px {0}px)",G),l.clipRect||(I.position="absolute",I.top=0,I.left=0,I.width=e.paper.width+"px",I.height=e.paper.height+"px",l.parentNode.insertBefore(H,l),H.appendChild(l),l.clipRect=H)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var J=e.textpath.style;i.font&&(J.font=i.font),i["font-family"]&&(J.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(J.fontSize=i["font-size"]),i["font-weight"]&&(J.fontWeight=i["font-weight"]),i["font-style"]&&(J.fontStyle=i["font-style"])}if("arrow-start"in i&&A(s,i["arrow-start"]),"arrow-end"in i&&A(s,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var K=l.getElementsByTagName(j),L=!1;if(K=K&&K[0],!K&&(L=K=F(j)),"image"==e.type&&i.src&&(K.src=i.src),i.fill&&(K.on=!0),(null==K.on||"none"==i.fill||null===i.fill)&&(K.on=!1),K.on&&i.fill){var M=b(i.fill).match(c._ISURL);if(M){K.parentNode==l&&l.removeChild(K),K.rotate=!0,K.src=M[1],K.type="tile";var N=e.getBBox(1);K.position=N.x+n+N.y,e._.fillpos=[N.x,N.y],c._preload(M[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else K.color=c.getRGB(i.fill).hex,K.src=o,K.type="solid",c.getRGB(i.fill).error&&(s.type in{"circle":1,"ellipse":1}||"r"!=b(i.fill).charAt())&&C(s,i.fill,K)&&(m.fill="none",m.gradient=i.fill,K.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var O=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+c.getRGB(i.fill).o+1||2)-1);O=h(g(O,0),1),K.opacity=O,K.src&&(K.color="none")}l.appendChild(K);var P=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],Q=!1;!P&&(Q=P=F("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(P.on=!0),("none"==i.stroke||null===i.stroke||null==P.on||0==i.stroke||0==i["stroke-width"])&&(P.on=!1);var R=c.getRGB(i.stroke);P.on&&i.stroke&&(P.color=R.hex),O=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+R.o+1||2)-1);var S=.75*(d(i["stroke-width"])||1);if(O=h(g(O,0),1),null==i["stroke-width"]&&(S=m["stroke-width"]),i["stroke-width"]&&(P.weight=S),S&&1>S&&(O*=S)&&(P.weight=1),P.opacity=O,i["stroke-linejoin"]&&(P.joinstyle=i["stroke-linejoin"]||"miter"),P.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(P.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),"stroke-dasharray"in i){var T={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};P.dashstyle=T[a](i["stroke-dasharray"])?T[i["stroke-dasharray"]]:o}Q&&l.appendChild(P)}if("text"==s.type){s.paper.canvas.style.display=o;var U=s.paper.span,V=100,W=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=U.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),W=d(m["font-size"]||W&&W[0])||10,p.fontSize=W*V+"px",s.textpath.string&&(U.innerHTML=b(s.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();s.W=m.w=(X.right-X.left)/V,s.H=m.h=(X.bottom-X.top)/V,s.X=m.x,s.Y=m.y+s.H/2,("x"in i||"y"in i)&&(s.path.v=c.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));for(var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,$=Y.length;$>Z;Z++)if(Y[Z]in i){s._.dirty=1;break}switch(m["text-anchor"]){case"start":s.textpath.style["v-text-align"]="left",s.bbx=s.W/2;break;case"end":s.textpath.style["v-text-align"]="right",s.bbx=-s.W/2;break;default:s.textpath.style["v-text-align"]="center",s.bbx=0}s.textpath.style["v-text-kern"]=!0}},C=function(a,f,g){a.attrs=a.attrs||{};var h=(a.attrs,Math.pow),i="linear",j=".5 .5";if(a.attrs.gradient=f,f=b(f).replace(c._radial_gradient,function(a,b,c){return i="radial",b&&c&&(b=d(b),c=d(c),h(b-.5,2)+h(c-.5,2)>.25&&(c=e.sqrt(.25-h(b-.5,2))*(2*(c>.5)-1)+.5),j=b+n+c),o}),f=f.split(/\s*\-\s*/),"linear"==i){var k=f.shift();if(k=-d(k),isNaN(k))return null}var l=c._parseDots(f);if(!l)return null;if(a=a.shape||a.node,l.length){a.removeChild(g),g.on=!0,g.method="none",g.color=l[0].color,g.color2=l[l.length-1].color;for(var m=[],p=0,q=l.length;q>p;p++)l[p].offset&&m.push(l[p].offset+n+l[p].color);g.colors=m.length?m.join():"0% "+g.color,"radial"==i?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=j,g.angle=0):(g.type="gradient",g.angle=(270-k)%360),a.appendChild(g)}return 1},D=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=c.matrix(),this._={"transform":[],"sx":1,"sy":1,"dx":0,"dy":0,"deg":0,"dirty":1,"dirtyT":1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},E=c.el;D.prototype=E,E.constructor=D,E.transform=function(a){if(null==a)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:o;e&&(d=a=b(a).replace(/\.{3}|\u2026/g,this._.transform||o)),c._extractTransform(this,f+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~b(this.attrs.fill).indexOf("-"),l=!b(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;j.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else j.style.filter=o,z(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=o,i.matrix=b(h),i.offset=h.offset();return d&&(this._.transform=d),this},E.rotate=function(a,c,e){if(this.removed)return this;if(null!=a){if(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,e]])),this}},E.translate=function(a,c){return this.removed?this:(a=b(a).split(k),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]])),this)},E.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=o),this},E._getBBox=function(){return this.removed?{}:{"x":this.X+(this.bbx||0)-this.W/2,"y":this.Y-this.H,"width":this.W,"height":this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),c.eve.unbind("raphael.*.*."+this.id),c._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0}},E.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&c.is(b,"string")){if(b==j&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var g=b.split(k),h={},i=0,m=g.length;m>i;i++)b=g[i],b in this.attrs?h[b]=this.attrs[b]:c.is(this.paper.customAttributes[b],"function")?h[b]=this.paper.customAttributes[b].def:h[b]=c._availableAttrs[b];return m-1?h:h[g[0]]}if(this.attrs&&null==d&&c.is(b,"array")){for(h={},i=0,m=b.length;m>i;i++)h[b[i]]=this.attr(b[i]);return h}var n;null!=d&&(n={},n[b]=d),null==d&&c.is(b,"object")&&(n=b);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[a](o)&&n[a](o)&&c.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[a](q)&&(n[q]=p[q])}n.text&&"text"==this.type&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&c._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper)),this)},E.insertAfter=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this)},E.insertBefore=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),c._insertbefore(this,a,this.paper),this)},E.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(r,o),0!==+a?(this.attrs.blur=a,b.filter=d+n+m+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",f(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this},c._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={"fill":"none","stroke":"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");return f.on=!0,c.appendChild(f),d.skew=f,d.transform(o),d},c._engine.rect=function(a,b,d,e,f,g){var h=c._rectPath(b,d,e,f,g),i=a.path(h),j=i.attrs;return i.X=j.x=b,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},c._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",B(f,{"cx":b,"cy":c,"rx":d,"ry":e}),f},c._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",B(e,{"cx":b,"cy":c,"r":d}),e},c._engine.image=function(a,b,d,e,f,g){var h=c._rectPath(d,e,f,g),i=a.path(h).attr({"stroke":"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];return k.src=b,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=b,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0),i},c._engine.text=function(a,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=c.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=b(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,a),l={"fill":"#000","stroke":"none","font":c._availableAttrs.font,"text":g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=b(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),a.canvas.appendChild(h);var m=F("skew");return m.on=!0,h.appendChild(m),k.skew=m,k.transform(o),k},c._engine.setSize=function(a,b){var d=this.canvas.style;return this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),d.width=a,d.height=b,d.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox),this},c._engine.setViewBox=function(a,b,d,e,f){c.eve("raphael.setViewBox",this,this._viewBox,[a,b,d,e,f]);var h,i,j=this.width,k=this.height,l=1/g(d/j,e/k);return f&&(h=k/e,i=j/d,j>d*h&&(a-=(j-d*h)/2/h),k>e*i&&(b-=(k-e*i)/2/i)),this._viewBox=[a,b,d,e,!!f],this._viewBoxShift={"dx":-a,"dy":-b,"scale":l},this.forEach(function(a){a.transform("...")}),this};var F;c._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},c._engine.initWin(c._g.win),c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,d=a.height,e=a.width,f=a.x,g=a.y;if(!b)throw new Error("VML container not found.");var h=new c._Paper,i=h.canvas=c._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*u+n+1e3*u,h.coordorigin="0 0",h.span=c._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==b?(c._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i),h.renderfix=function(){},h},c.prototype.clear=function(){c.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=c._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},c.prototype.remove=function(){c.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0};var G=c.st;for(var H in E)E[a](H)&&!G[a](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}}(),B.was?A.win.Raphael=c:Raphael=c,c});
  !function(a){a.color={},a.color.make=function(b,c,d,e){var f={};return f.r=b||0,f.g=c||0,f.b=d||0,f.a=null!=e?e:1,f.add=function(a,b){for(var c=0;c<a.length;++c)f[a.charAt(c)]+=b;return f.normalize()},f.scale=function(a,b){for(var c=0;c<a.length;++c)f[a.charAt(c)]*=b;return f.normalize()},f.toString=function(){return f.a>=1?"rgb("+[f.r,f.g,f.b].join(",")+")":"rgba("+[f.r,f.g,f.b,f.a].join(",")+")"},f.normalize=function(){function a(a,b,c){return a>b?a:b>c?c:b}return f.r=a(0,parseInt(f.r),255),f.g=a(0,parseInt(f.g),255),f.b=a(0,parseInt(f.b),255),f.a=a(0,f.a,1),f},f.clone=function(){return a.color.make(f.r,f.b,f.g,f.a)},f.normalize()},a.color.extract=function(b,c){var d;do{if(d=b.css(c).toLowerCase(),""!=d&&"transparent"!=d)break;b=b.parent()}while(b.length&&!a.nodeName(b.get(0),"body"));return"rgba(0, 0, 0, 0)"==d&&(d="transparent"),a.color.parse(d)},a.color.parse=function(c){var d,e=a.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return e(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10));if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c))return e(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]));if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return e(2.55*parseFloat(d[1]),2.55*parseFloat(d[2]),2.55*parseFloat(d[3]));if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c))return e(2.55*parseFloat(d[1]),2.55*parseFloat(d[2]),2.55*parseFloat(d[3]),parseFloat(d[4]));if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return e(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16));if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return e(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16));var f=a.trim(c).toLowerCase();return"transparent"==f?e(255,255,255,0):(d=b[f]||[0,0,0],e(d[0],d[1],d[2]))};var b={"aqua":[0,255,255],"azure":[240,255,255],"beige":[245,245,220],"black":[0,0,0],"blue":[0,0,255],"brown":[165,42,42],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgrey":[169,169,169],"darkgreen":[0,100,0],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkviolet":[148,0,211],"fuchsia":[255,0,255],"gold":[255,215,0],"green":[0,128,0],"indigo":[75,0,130],"khaki":[240,230,140],"lightblue":[173,216,230],"lightcyan":[224,255,255],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightyellow":[255,255,224],"lime":[0,255,0],"magenta":[255,0,255],"maroon":[128,0,0],"navy":[0,0,128],"olive":[128,128,0],"orange":[255,165,0],"pink":[255,192,203],"purple":[128,0,128],"violet":[128,0,128],"red":[255,0,0],"silver":[192,192,192],"white":[255,255,255],"yellow":[255,255,0]}}(jQuery),function(a){function b(b,c){var d=c.children("."+b)[0];if(null==d&&(d=document.createElement("canvas"),d.className=b,a(d).css({"direction":"ltr","position":"absolute","left":0,"top":0}).appendTo(c),!d.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");d=window.G_vmlCanvasManager.initElement(d)}this.element=d;var e=this.context=d.getContext("2d"),f=window.devicePixelRatio||1,g=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;this.pixelRatio=f/g,this.resize(c.width(),c.height()),this.textContainer=null,this.text={},this._textCache={}}function c(c,e,f,g){function h(a,b){b=[qa].concat(b);for(var c=0;c<a.length;++c)a[c].apply(this,b)}function i(){for(var c={"Canvas":b},d=0;d<g.length;++d){var e=g[d];e.init(qa,c),e.options&&a.extend(!0,ea,e.options)}}function j(b){a.extend(!0,ea,b),b&&b.colors&&(ea.colors=b.colors),null==ea.xaxis.color&&(ea.xaxis.color=a.color.parse(ea.grid.color).scale("a",.22).toString()),null==ea.yaxis.color&&(ea.yaxis.color=a.color.parse(ea.grid.color).scale("a",.22).toString()),null==ea.xaxis.tickColor&&(ea.xaxis.tickColor=ea.grid.tickColor||ea.xaxis.color),null==ea.yaxis.tickColor&&(ea.yaxis.tickColor=ea.grid.tickColor||ea.yaxis.color),null==ea.grid.borderColor&&(ea.grid.borderColor=ea.grid.color),null==ea.grid.tickColor&&(ea.grid.tickColor=a.color.parse(ea.grid.color).scale("a",.22).toString());var d,e,f,g=c.css("font-size"),i=g?+g.replace("px",""):13,j={"style":c.css("font-style"),"size":Math.round(.8*i),"variant":c.css("font-variant"),"weight":c.css("font-weight"),"family":c.css("font-family")};for(f=ea.xaxes.length||1,d=0;f>d;++d)e=ea.xaxes[d],e&&!e.tickColor&&(e.tickColor=e.color),e=a.extend(!0,{},ea.xaxis,e),ea.xaxes[d]=e,e.font&&(e.font=a.extend({},j,e.font),e.font.color||(e.font.color=e.color),e.font.lineHeight||(e.font.lineHeight=Math.round(1.15*e.font.size)));for(f=ea.yaxes.length||1,d=0;f>d;++d)e=ea.yaxes[d],e&&!e.tickColor&&(e.tickColor=e.color),e=a.extend(!0,{},ea.yaxis,e),ea.yaxes[d]=e,e.font&&(e.font=a.extend({},j,e.font),e.font.color||(e.font.color=e.color),e.font.lineHeight||(e.font.lineHeight=Math.round(1.15*e.font.size)));for(ea.xaxis.noTicks&&null==ea.xaxis.ticks&&(ea.xaxis.ticks=ea.xaxis.noTicks),ea.yaxis.noTicks&&null==ea.yaxis.ticks&&(ea.yaxis.ticks=ea.yaxis.noTicks),ea.x2axis&&(ea.xaxes[1]=a.extend(!0,{},ea.xaxis,ea.x2axis),ea.xaxes[1].position="top",null==ea.x2axis.min&&(ea.xaxes[1].min=null),null==ea.x2axis.max&&(ea.xaxes[1].max=null)),ea.y2axis&&(ea.yaxes[1]=a.extend(!0,{},ea.yaxis,ea.y2axis),ea.yaxes[1].position="right",null==ea.y2axis.min&&(ea.yaxes[1].min=null),null==ea.y2axis.max&&(ea.yaxes[1].max=null)),ea.grid.coloredAreas&&(ea.grid.markings=ea.grid.coloredAreas),ea.grid.coloredAreasColor&&(ea.grid.markingsColor=ea.grid.coloredAreasColor),ea.lines&&a.extend(!0,ea.series.lines,ea.lines),ea.points&&a.extend(!0,ea.series.points,ea.points),ea.bars&&a.extend(!0,ea.series.bars,ea.bars),null!=ea.shadowSize&&(ea.series.shadowSize=ea.shadowSize),null!=ea.highlightColor&&(ea.series.highlightColor=ea.highlightColor),d=0;d<ea.xaxes.length;++d)q(ka,d+1).options=ea.xaxes[d];for(d=0;d<ea.yaxes.length;++d)q(la,d+1).options=ea.yaxes[d];for(var k in pa)ea.hooks[k]&&ea.hooks[k].length&&(pa[k]=pa[k].concat(ea.hooks[k]));h(pa.processOptions,[ea])}function k(a){da=l(a),r(),s()}function l(b){for(var c=[],d=0;d<b.length;++d){var e=a.extend(!0,{},ea.series);null!=b[d].data?(e.data=b[d].data,delete b[d].data,a.extend(!0,e,b[d]),b[d].data=e.data):e.data=b[d],c.push(e)}return c}function m(a,b){var c=a[b+"axis"];return"object"==typeof c&&(c=c.n),"number"!=typeof c&&(c=1),c}function n(){return a.grep(ka.concat(la),function(a){return a})}function o(a){var b,c,d={};for(b=0;b<ka.length;++b)c=ka[b],c&&c.used&&(d["x"+c.n]=c.c2p(a.left));for(b=0;b<la.length;++b)c=la[b],c&&c.used&&(d["y"+c.n]=c.c2p(a.top));return void 0!==d.x1&&(d.x=d.x1),void 0!==d.y1&&(d.y=d.y1),d}function p(a){var b,c,d,e={};for(b=0;b<ka.length;++b)if(c=ka[b],c&&c.used&&(d="x"+c.n,null==a[d]&&1==c.n&&(d="x"),null!=a[d])){e.left=c.p2c(a[d]);break}for(b=0;b<la.length;++b)if(c=la[b],c&&c.used&&(d="y"+c.n,null==a[d]&&1==c.n&&(d="y"),null!=a[d])){e.top=c.p2c(a[d]);break}return e}function q(b,c){return b[c-1]||(b[c-1]={"n":c,"direction":b==ka?"x":"y","options":a.extend(!0,{},b==ka?ea.xaxis:ea.yaxis)}),b[c-1]}function r(){var b,c=da.length,d=-1;for(b=0;b<da.length;++b){var e=da[b].color;null!=e&&(c--,"number"==typeof e&&e>d&&(d=e))}d>=c&&(c=d+1);var f,g=[],h=ea.colors,i=h.length,j=0;for(b=0;c>b;b++)f=a.color.parse(h[b%i]||"#666"),b%i==0&&b&&(j=j>=0?.5>j?-j-.2:0:-j),g[b]=f.scale("rgb",1+j);var k,l=0;for(b=0;b<da.length;++b){if(k=da[b],null==k.color?(k.color=g[l].toString(),++l):"number"==typeof k.color&&(k.color=g[k.color].toString()),null==k.lines.show){var n,o=!0;for(n in k)if(k[n]&&k[n].show){o=!1;break}o&&(k.lines.show=!0)}null==k.lines.zero&&(k.lines.zero=!!k.lines.fill),k.xaxis=q(ka,m(k,"x")),k.yaxis=q(la,m(k,"y"))}}function s(){function b(a,b,c){b<a.datamin&&b!=-s&&(a.datamin=b),c>a.datamax&&c!=s&&(a.datamax=c)}var c,d,e,f,g,i,j,k,l,m,o,p,q=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.MAX_VALUE;for(a.each(n(),function(a,b){b.datamin=q,b.datamax=r,b.used=!1}),c=0;c<da.length;++c)g=da[c],g.datapoints={"points":[]},h(pa.processRawData,[g,g.data,g.datapoints]);for(c=0;c<da.length;++c){if(g=da[c],o=g.data,p=g.datapoints.format,!p){if(p=[],p.push({"x":!0,"number":!0,"required":!0}),p.push({"y":!0,"number":!0,"required":!0}),g.bars.show||g.lines.show&&g.lines.fill){var t=!!(g.bars.show&&g.bars.zero||g.lines.show&&g.lines.zero);p.push({"y":!0,"number":!0,"required":!1,"defaultValue":0,"autoscale":t}),g.bars.horizontal&&(delete p[p.length-1].y,p[p.length-1].x=!0)}g.datapoints.format=p}if(null==g.datapoints.pointsize){g.datapoints.pointsize=p.length,j=g.datapoints.pointsize,i=g.datapoints.points;var u=g.lines.show&&g.lines.steps;for(g.xaxis.used=g.yaxis.used=!0,d=e=0;d<o.length;++d,e+=j){m=o[d];var v=null==m;if(!v)for(f=0;j>f;++f)k=m[f],l=p[f],l&&(l.number&&null!=k&&(k=+k,isNaN(k)?k=null:k==1/0?k=s:k==-(1/0)&&(k=-s)),null==k&&(l.required&&(v=!0),null!=l.defaultValue&&(k=l.defaultValue))),i[e+f]=k;if(v)for(f=0;j>f;++f)k=i[e+f],null!=k&&(l=p[f],l.autoscale!==!1&&(l.x&&b(g.xaxis,k,k),l.y&&b(g.yaxis,k,k))),i[e+f]=null;else if(u&&e>0&&null!=i[e-j]&&i[e-j]!=i[e]&&i[e-j+1]!=i[e+1]){for(f=0;j>f;++f)i[e+j+f]=i[e+f];i[e+1]=i[e-j+1],e+=j}}}}for(c=0;c<da.length;++c)g=da[c],h(pa.processDatapoints,[g,g.datapoints]);for(c=0;c<da.length;++c){g=da[c],i=g.datapoints.points,j=g.datapoints.pointsize,p=g.datapoints.format;var w=q,x=q,y=r,z=r;for(d=0;d<i.length;d+=j)if(null!=i[d])for(f=0;j>f;++f)k=i[d+f],l=p[f],l&&l.autoscale!==!1&&k!=s&&k!=-s&&(l.x&&(w>k&&(w=k),k>y&&(y=k)),l.y&&(x>k&&(x=k),k>z&&(z=k)));if(g.bars.show){var A;switch(g.bars.align){case"left":A=0;break;case"right":A=-g.bars.barWidth;break;default:A=-g.bars.barWidth/2}g.bars.horizontal?(x+=A,z+=A+g.bars.barWidth):(w+=A,y+=A+g.bars.barWidth)}b(g.xaxis,w,y),b(g.yaxis,x,z)}a.each(n(),function(a,b){b.datamin==q&&(b.datamin=null),b.datamax==r&&(b.datamax=null)})}function t(){c.css("padding",0).children().filter(function(){return!a(this).hasClass("flot-overlay")&&!a(this).hasClass("flot-base")}).remove(),"static"==c.css("position")&&c.css("position","relative"),fa=new b("flot-base",c),ga=new b("flot-overlay",c),ia=fa.context,ja=ga.context,ha=a(ga.element).unbind();var d=c.data("plot");d&&(d.shutdown(),ga.clear()),c.data("plot",qa)}function u(){ea.grid.hoverable&&(ha.mousemove(T),ha.bind("mouseleave",U)),ea.grid.clickable&&ha.click(V),h(pa.bindEvents,[ha])}function v(){sa&&clearTimeout(sa),ha.unbind("mousemove",T),ha.unbind("mouseleave",U),ha.unbind("click",V),h(pa.shutdown,[ha])}function w(a){function b(a){return a}var c,d,e=a.options.transform||b,f=a.options.inverseTransform;"x"==a.direction?(c=a.scale=na/Math.abs(e(a.max)-e(a.min)),d=Math.min(e(a.max),e(a.min))):(c=a.scale=oa/Math.abs(e(a.max)-e(a.min)),c=-c,d=Math.max(e(a.max),e(a.min))),e==b?a.p2c=function(a){return(a-d)*c}:a.p2c=function(a){return(e(a)-d)*c},f?a.c2p=function(a){return f(d+a/c)}:a.c2p=function(a){return d+a/c}}function x(a){for(var b=a.options,c=a.ticks||[],d=b.labelWidth||0,e=b.labelHeight||0,f=d||("x"==a.direction?Math.floor(fa.width/(c.length||1)):null),g=a.direction+"Axis "+a.direction+a.n+"Axis",h="flot-"+a.direction+"-axis flot-"+a.direction+a.n+"-axis "+g,i=b.font||"flot-tick-label tickLabel",j=0;j<c.length;++j){var k=c[j];if(k.label){var l=fa.getTextInfo(h,k.label,i,null,f);d=Math.max(d,l.width),e=Math.max(e,l.height)}}a.labelWidth=b.labelWidth||d,a.labelHeight=b.labelHeight||e}function y(b){var c=b.labelWidth,d=b.labelHeight,e=b.options.position,f="x"===b.direction,g=b.options.tickLength,h=ea.grid.axisMargin,i=ea.grid.labelMargin,j=!0,k=!0,l=!0,m=!1;a.each(f?ka:la,function(a,c){c&&(c.show||c.reserveSpace)&&(c===b?m=!0:c.options.position===e&&(m?k=!1:j=!1),m||(l=!1))}),k&&(h=0),null==g&&(g=l?"full":5),isNaN(+g)||(i+=+g),f?(d+=i,"bottom"==e?(ma.bottom+=d+h,b.box={"top":fa.height-ma.bottom,"height":d}):(b.box={"top":ma.top+h,"height":d},ma.top+=d+h)):(c+=i,"left"==e?(b.box={"left":ma.left+h,"width":c},ma.left+=c+h):(ma.right+=c+h,b.box={"left":fa.width-ma.right,"width":c})),b.position=e,b.tickLength=g,b.box.padding=i,b.innermost=j}function z(a){"x"==a.direction?(a.box.left=ma.left-a.labelWidth/2,a.box.width=fa.width-ma.left-ma.right+a.labelWidth):(a.box.top=ma.top-a.labelHeight/2,a.box.height=fa.height-ma.bottom-ma.top+a.labelHeight)}function A(){var b,c=ea.grid.minBorderMargin;if(null==c)for(c=0,b=0;b<da.length;++b)c=Math.max(c,2*(da[b].points.radius+da[b].points.lineWidth/2));var d={"left":c,"right":c,"top":c,"bottom":c};a.each(n(),function(a,b){b.reserveSpace&&b.ticks&&b.ticks.length&&("x"===b.direction?(d.left=Math.max(d.left,b.labelWidth/2),d.right=Math.max(d.right,b.labelWidth/2)):(d.bottom=Math.max(d.bottom,b.labelHeight/2),d.top=Math.max(d.top,b.labelHeight/2)))}),ma.left=Math.ceil(Math.max(d.left,ma.left)),ma.right=Math.ceil(Math.max(d.right,ma.right)),ma.top=Math.ceil(Math.max(d.top,ma.top)),ma.bottom=Math.ceil(Math.max(d.bottom,ma.bottom))}function B(){var b,c=n(),d=ea.grid.show;for(var e in ma){var f=ea.grid.margin||0;ma[e]="number"==typeof f?f:f[e]||0}h(pa.processOffset,[ma]);for(var e in ma)"object"==typeof ea.grid.borderWidth?ma[e]+=d?ea.grid.borderWidth[e]:0:ma[e]+=d?ea.grid.borderWidth:0;if(a.each(c,function(a,b){var c=b.options;b.show=null==c.show?b.used:c.show,b.reserveSpace=null==c.reserveSpace?b.show:c.reserveSpace,C(b)}),d){var g=a.grep(c,function(a){return a.show||a.reserveSpace});for(a.each(g,function(a,b){D(b),E(b),F(b,b.ticks),x(b)}),b=g.length-1;b>=0;--b)y(g[b]);A(),a.each(g,function(a,b){z(b)})}na=fa.width-ma.left-ma.right,oa=fa.height-ma.bottom-ma.top,a.each(c,function(a,b){w(b)}),d&&K(),R()}function C(a){var b=a.options,c=+(null!=b.min?b.min:a.datamin),d=+(null!=b.max?b.max:a.datamax),e=d-c;if(0==e){var f=0==d?1:.01;null==b.min&&(c-=f),(null==b.max||null!=b.min)&&(d+=f)}else{var g=b.autoscaleMargin;null!=g&&(null==b.min&&(c-=e*g,0>c&&null!=a.datamin&&a.datamin>=0&&(c=0)),null==b.max&&(d+=e*g,d>0&&null!=a.datamax&&a.datamax<=0&&(d=0)))}a.min=c,a.max=d}function D(b){var c,e=b.options;c="number"==typeof e.ticks&&e.ticks>0?e.ticks:.3*Math.sqrt("x"==b.direction?fa.width:fa.height);var f=(b.max-b.min)/c,g=-Math.floor(Math.log(f)/Math.LN10),h=e.tickDecimals;null!=h&&g>h&&(g=h);var i,j=Math.pow(10,-g),k=f/j;if(1.5>k?i=1:3>k?(i=2,k>2.25&&(null==h||h>=g+1)&&(i=2.5,++g)):i=7.5>k?5:10,i*=j,null!=e.minTickSize&&i<e.minTickSize&&(i=e.minTickSize),b.delta=f,b.tickDecimals=Math.max(0,null!=h?h:g),b.tickSize=e.tickSize||i,"time"==e.mode&&!b.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(b.tickGenerator||(b.tickGenerator=function(a){var b,c=[],e=d(a.min,a.tickSize),f=0,g=Number.NaN;do b=g,g=e+f*a.tickSize,c.push(g),++f;while(g<a.max&&g!=b);return c},b.tickFormatter=function(a,b){var c=b.tickDecimals?Math.pow(10,b.tickDecimals):1,d=""+Math.round(a*c)/c;if(null!=b.tickDecimals){var e=d.indexOf("."),f=-1==e?0:d.length-e-1;if(f<b.tickDecimals)return(f?d:d+".")+(""+c).substr(1,b.tickDecimals-f)}return d}),a.isFunction(e.tickFormatter)&&(b.tickFormatter=function(a,b){return""+e.tickFormatter(a,b)}),null!=e.alignTicksWithAxis){var l=("x"==b.direction?ka:la)[e.alignTicksWithAxis-1];if(l&&l.used&&l!=b){var m=b.tickGenerator(b);if(m.length>0&&(null==e.min&&(b.min=Math.min(b.min,m[0])),null==e.max&&m.length>1&&(b.max=Math.max(b.max,m[m.length-1]))),b.tickGenerator=function(a){var b,c,d=[];for(c=0;c<l.ticks.length;++c)b=(l.ticks[c].v-l.min)/(l.max-l.min),b=a.min+b*(a.max-a.min),d.push(b);return d},!b.mode&&null==e.tickDecimals){var n=Math.max(0,-Math.floor(Math.log(b.delta)/Math.LN10)+1),o=b.tickGenerator(b);o.length>1&&/\..*0$/.test((o[1]-o[0]).toFixed(n))||(b.tickDecimals=n)}}}}function E(b){var c=b.options.ticks,d=[];null==c||"number"==typeof c&&c>0?d=b.tickGenerator(b):c&&(d=a.isFunction(c)?c(b):c);var e,f;for(b.ticks=[],e=0;e<d.length;++e){var g=null,h=d[e];"object"==typeof h?(f=+h[0],h.length>1&&(g=h[1])):f=+h,null==g&&(g=b.tickFormatter(f,b)),isNaN(f)||b.ticks.push({"v":f,"label":g})}}function F(a,b){a.options.autoscaleMargin&&b.length>0&&(null==a.options.min&&(a.min=Math.min(a.min,b[0].v)),null==a.options.max&&b.length>1&&(a.max=Math.max(a.max,b[b.length-1].v)))}function G(){fa.clear(),h(pa.drawBackground,[ia]);var a=ea.grid;a.show&&a.backgroundColor&&I(),a.show&&!a.aboveData&&J();for(var b=0;b<da.length;++b)h(pa.drawSeries,[ia,da[b]]),L(da[b]);h(pa.draw,[ia]),a.show&&a.aboveData&&J(),fa.render(),X()}function H(a,b){for(var c,d,e,f,g=n(),h=0;h<g.length;++h)if(c=g[h],c.direction==b&&(f=b+c.n+"axis",a[f]||1!=c.n||(f=b+"axis"),a[f])){d=a[f].from,e=a[f].to;break}if(a[f]||(c="x"==b?ka[0]:la[0],d=a[b+"1"],e=a[b+"2"]),null!=d&&null!=e&&d>e){var i=d;d=e,e=i}return{"from":d,"to":e,"axis":c}}function I(){ia.save(),ia.translate(ma.left,ma.top),ia.fillStyle=ca(ea.grid.backgroundColor,oa,0,"rgba(255, 255, 255, 0)"),ia.fillRect(0,0,na,oa),ia.restore()}function J(){var b,c,d,e;ia.save(),ia.translate(ma.left,ma.top);var f=ea.grid.markings;if(f)for(a.isFunction(f)&&(c=qa.getAxes(),c.xmin=c.xaxis.min,c.xmax=c.xaxis.max,c.ymin=c.yaxis.min,c.ymax=c.yaxis.max,f=f(c)),b=0;b<f.length;++b){var g=f[b],h=H(g,"x"),i=H(g,"y");if(null==h.from&&(h.from=h.axis.min),null==h.to&&(h.to=h.axis.max),null==i.from&&(i.from=i.axis.min),null==i.to&&(i.to=i.axis.max),!(h.to<h.axis.min||h.from>h.axis.max||i.to<i.axis.min||i.from>i.axis.max)){h.from=Math.max(h.from,h.axis.min),h.to=Math.min(h.to,h.axis.max),i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max);var j=h.from===h.to,k=i.from===i.to;if(!j||!k)if(h.from=Math.floor(h.axis.p2c(h.from)),h.to=Math.floor(h.axis.p2c(h.to)),i.from=Math.floor(i.axis.p2c(i.from)),i.to=Math.floor(i.axis.p2c(i.to)),j||k){var l=g.lineWidth||ea.grid.markingsLineWidth,m=l%2?.5:0;ia.beginPath(),ia.strokeStyle=g.color||ea.grid.markingsColor,ia.lineWidth=l,j?(ia.moveTo(h.to+m,i.from),ia.lineTo(h.to+m,i.to)):(ia.moveTo(h.from,i.to+m),ia.lineTo(h.to,i.to+m)),ia.stroke()}else ia.fillStyle=g.color||ea.grid.markingsColor,ia.fillRect(h.from,i.to,h.to-h.from,i.from-i.to)}}c=n(),d=ea.grid.borderWidth;for(var o=0;o<c.length;++o){var p,q,r,s,t=c[o],u=t.box,v=t.tickLength;if(t.show&&0!=t.ticks.length){for(ia.lineWidth=1,"x"==t.direction?(p=0,q="full"==v?"top"==t.position?0:oa:u.top-ma.top+("top"==t.position?u.height:0)):(q=0,p="full"==v?"left"==t.position?0:na:u.left-ma.left+("left"==t.position?u.width:0)),t.innermost||(ia.strokeStyle=t.options.color,ia.beginPath(),r=s=0,"x"==t.direction?r=na+1:s=oa+1,1==ia.lineWidth&&("x"==t.direction?q=Math.floor(q)+.5:p=Math.floor(p)+.5),ia.moveTo(p,q),ia.lineTo(p+r,q+s),ia.stroke()),ia.strokeStyle=t.options.tickColor,ia.beginPath(),b=0;b<t.ticks.length;++b){var w=t.ticks[b].v;r=s=0,isNaN(w)||w<t.min||w>t.max||"full"==v&&("object"==typeof d&&d[t.position]>0||d>0)&&(w==t.min||w==t.max)||("x"==t.direction?(p=t.p2c(w),s="full"==v?-oa:v,"top"==t.position&&(s=-s)):(q=t.p2c(w),r="full"==v?-na:v,"left"==t.position&&(r=-r)),1==ia.lineWidth&&("x"==t.direction?p=Math.floor(p)+.5:q=Math.floor(q)+.5),ia.moveTo(p,q),ia.lineTo(p+r,q+s))}ia.stroke()}}d&&(e=ea.grid.borderColor,"object"==typeof d||"object"==typeof e?("object"!=typeof d&&(d={"top":d,"right":d,"bottom":d,"left":d}),"object"!=typeof e&&(e={"top":e,"right":e,"bottom":e,"left":e}),d.top>0&&(ia.strokeStyle=e.top,ia.lineWidth=d.top,ia.beginPath(),ia.moveTo(0-d.left,0-d.top/2),ia.lineTo(na,0-d.top/2),ia.stroke()),d.right>0&&(ia.strokeStyle=e.right,ia.lineWidth=d.right,ia.beginPath(),ia.moveTo(na+d.right/2,0-d.top),ia.lineTo(na+d.right/2,oa),ia.stroke()),d.bottom>0&&(ia.strokeStyle=e.bottom,ia.lineWidth=d.bottom,ia.beginPath(),ia.moveTo(na+d.right,oa+d.bottom/2),ia.lineTo(0,oa+d.bottom/2),ia.stroke()),d.left>0&&(ia.strokeStyle=e.left,ia.lineWidth=d.left,ia.beginPath(),ia.moveTo(0-d.left/2,oa+d.bottom),ia.lineTo(0-d.left/2,0),ia.stroke())):(ia.lineWidth=d,ia.strokeStyle=ea.grid.borderColor,ia.strokeRect(-d/2,-d/2,na+d,oa+d))),ia.restore()}function K(){a.each(n(),function(a,b){var c,d,e,f,g,h=b.box,i=b.direction+"Axis "+b.direction+b.n+"Axis",j="flot-"+b.direction+"-axis flot-"+b.direction+b.n+"-axis "+i,k=b.options.font||"flot-tick-label tickLabel";if(fa.removeText(j),b.show&&0!=b.ticks.length)for(var l=0;l<b.ticks.length;++l)c=b.ticks[l],!c.label||c.v<b.min||c.v>b.max||("x"==b.direction?(f="center",d=ma.left+b.p2c(c.v),"bottom"==b.position?e=h.top+h.padding:(e=h.top+h.height-h.padding,g="bottom")):(g="middle",e=ma.top+b.p2c(c.v),"left"==b.position?(d=h.left+h.width-h.padding,f="right"):d=h.left+h.padding),fa.addText(j,d,e,c.label,k,null,null,f,g))})}function L(a){a.lines.show&&M(a),a.bars.show&&P(a),a.points.show&&N(a)}function M(a){function b(a,b,c,d,e){var f=a.points,g=a.pointsize,h=null,i=null;ia.beginPath();for(var j=g;j<f.length;j+=g){var k=f[j-g],l=f[j-g+1],m=f[j],n=f[j+1];if(null!=k&&null!=m){if(n>=l&&l<e.min){if(n<e.min)continue;k=(e.min-l)/(n-l)*(m-k)+k,l=e.min}else if(l>=n&&n<e.min){if(l<e.min)continue;m=(e.min-l)/(n-l)*(m-k)+k,n=e.min}if(l>=n&&l>e.max){if(n>e.max)continue;k=(e.max-l)/(n-l)*(m-k)+k,l=e.max}else if(n>=l&&n>e.max){if(l>e.max)continue;m=(e.max-l)/(n-l)*(m-k)+k,n=e.max}if(m>=k&&k<d.min){if(m<d.min)continue;l=(d.min-k)/(m-k)*(n-l)+l,k=d.min}else if(k>=m&&m<d.min){if(k<d.min)continue;n=(d.min-k)/(m-k)*(n-l)+l,m=d.min}if(k>=m&&k>d.max){if(m>d.max)continue;l=(d.max-k)/(m-k)*(n-l)+l,k=d.max}else if(m>=k&&m>d.max){if(k>d.max)continue;n=(d.max-k)/(m-k)*(n-l)+l,m=d.max}(k!=h||l!=i)&&ia.moveTo(d.p2c(k)+b,e.p2c(l)+c),h=m,i=n,ia.lineTo(d.p2c(m)+b,e.p2c(n)+c)}}ia.stroke()}function c(a,b,c){for(var d=a.points,e=a.pointsize,f=Math.min(Math.max(0,c.min),c.max),g=0,h=!1,i=1,j=0,k=0;;){if(e>0&&g>d.length+e)break;g+=e;var l=d[g-e],m=d[g-e+i],n=d[g],o=d[g+i];if(h){if(e>0&&null!=l&&null==n){k=g,e=-e,i=2;continue}if(0>e&&g==j+e){ia.fill(),h=!1,e=-e,i=1,g=j=k+e;continue}}if(null!=l&&null!=n){if(n>=l&&l<b.min){if(n<b.min)continue;m=(b.min-l)/(n-l)*(o-m)+m,l=b.min}else if(l>=n&&n<b.min){if(l<b.min)continue;o=(b.min-l)/(n-l)*(o-m)+m,n=b.min}if(l>=n&&l>b.max){if(n>b.max)continue;m=(b.max-l)/(n-l)*(o-m)+m,l=b.max}else if(n>=l&&n>b.max){if(l>b.max)continue;o=(b.max-l)/(n-l)*(o-m)+m,n=b.max}if(h||(ia.beginPath(),ia.moveTo(b.p2c(l),c.p2c(f)),h=!0),m>=c.max&&o>=c.max)ia.lineTo(b.p2c(l),c.p2c(c.max)),ia.lineTo(b.p2c(n),c.p2c(c.max));else if(m<=c.min&&o<=c.min)ia.lineTo(b.p2c(l),c.p2c(c.min)),ia.lineTo(b.p2c(n),c.p2c(c.min));else{var p=l,q=n;o>=m&&m<c.min&&o>=c.min?(l=(c.min-m)/(o-m)*(n-l)+l,m=c.min):m>=o&&o<c.min&&m>=c.min&&(n=(c.min-m)/(o-m)*(n-l)+l,o=c.min),m>=o&&m>c.max&&o<=c.max?(l=(c.max-m)/(o-m)*(n-l)+l,m=c.max):o>=m&&o>c.max&&m<=c.max&&(n=(c.max-m)/(o-m)*(n-l)+l,o=c.max),l!=p&&ia.lineTo(b.p2c(p),c.p2c(m)),ia.lineTo(b.p2c(l),c.p2c(m)),ia.lineTo(b.p2c(n),c.p2c(o)),n!=q&&(ia.lineTo(b.p2c(n),c.p2c(o)),ia.lineTo(b.p2c(q),c.p2c(o)))}}}}ia.save(),ia.translate(ma.left,ma.top),ia.lineJoin="round";var d=a.lines.lineWidth,e=a.shadowSize;if(d>0&&e>0){ia.lineWidth=e,ia.strokeStyle="rgba(0,0,0,0.1)";var f=Math.PI/18;b(a.datapoints,Math.sin(f)*(d/2+e/2),Math.cos(f)*(d/2+e/2),a.xaxis,a.yaxis),ia.lineWidth=e/2,b(a.datapoints,Math.sin(f)*(d/2+e/4),Math.cos(f)*(d/2+e/4),a.xaxis,a.yaxis)}ia.lineWidth=d,ia.strokeStyle=a.color;var g=Q(a.lines,a.color,0,oa);g&&(ia.fillStyle=g,c(a.datapoints,a.xaxis,a.yaxis)),d>0&&b(a.datapoints,0,0,a.xaxis,a.yaxis),ia.restore()}function N(a){function b(a,b,c,d,e,f,g,h){for(var i=a.points,j=a.pointsize,k=0;k<i.length;k+=j){var l=i[k],m=i[k+1];null==l||l<f.min||l>f.max||m<g.min||m>g.max||(ia.beginPath(),l=f.p2c(l),m=g.p2c(m)+d,"circle"==h?ia.arc(l,m,b,0,e?Math.PI:2*Math.PI,!1):h(ia,l,m,b,e),ia.closePath(),c&&(ia.fillStyle=c,ia.fill()),ia.stroke())}}ia.save(),ia.translate(ma.left,ma.top);var c=a.points.lineWidth,d=a.shadowSize,e=a.points.radius,f=a.points.symbol;if(0==c&&(c=1e-4),c>0&&d>0){var g=d/2;ia.lineWidth=g,ia.strokeStyle="rgba(0,0,0,0.1)",b(a.datapoints,e,null,g+g/2,!0,a.xaxis,a.yaxis,f),ia.strokeStyle="rgba(0,0,0,0.2)",b(a.datapoints,e,null,g/2,!0,a.xaxis,a.yaxis,f)}ia.lineWidth=c,ia.strokeStyle=a.color,b(a.datapoints,e,Q(a.points,a.color),0,!1,a.xaxis,a.yaxis,f),ia.restore()}function O(a,b,c,d,e,f,g,h,i,j,k){var l,m,n,o,p,q,r,s,t;j?(s=q=r=!0,p=!1,l=c,m=a,o=b+d,n=b+e,l>m&&(t=m,m=l,l=t,p=!0,q=!1)):(p=q=r=!0,s=!1,l=a+d,m=a+e,n=c,o=b,n>o&&(t=o,o=n,n=t,s=!0,r=!1)),m<g.min||l>g.max||o<h.min||n>h.max||(l<g.min&&(l=g.min,p=!1),m>g.max&&(m=g.max,q=!1),n<h.min&&(n=h.min,s=!1),o>h.max&&(o=h.max,r=!1),l=g.p2c(l),n=h.p2c(n),m=g.p2c(m),o=h.p2c(o),f&&(i.fillStyle=f(n,o),i.fillRect(l,o,m-l,n-o)),k>0&&(p||q||r||s)&&(i.beginPath(),i.moveTo(l,n),p?i.lineTo(l,o):i.moveTo(l,o),r?i.lineTo(m,o):i.moveTo(m,o),q?i.lineTo(m,n):i.moveTo(m,n),s?i.lineTo(l,n):i.moveTo(l,n),i.stroke()))}function P(a){function b(b,c,d,e,f,g){for(var h=b.points,i=b.pointsize,j=0;j<h.length;j+=i)null!=h[j]&&O(h[j],h[j+1],h[j+2],c,d,e,f,g,ia,a.bars.horizontal,a.bars.lineWidth)}ia.save(),ia.translate(ma.left,ma.top),ia.lineWidth=a.bars.lineWidth,ia.strokeStyle=a.color;var c;switch(a.bars.align){case"left":c=0;break;case"right":c=-a.bars.barWidth;break;default:c=-a.bars.barWidth/2}var d=a.bars.fill?function(b,c){return Q(a.bars,a.color,b,c)}:null;b(a.datapoints,c,c+a.bars.barWidth,d,a.xaxis,a.yaxis),ia.restore()}function Q(b,c,d,e){var f=b.fill;if(!f)return null;if(b.fillColor)return ca(b.fillColor,d,e,c);var g=a.color.parse(c);return g.a="number"==typeof f?f:.4,g.normalize(),g.toString()}function R(){if(null!=ea.legend.container?a(ea.legend.container).html(""):c.find(".legend").remove(),ea.legend.show){for(var b,d,e=[],f=[],g=!1,h=ea.legend.labelFormatter,i=0;i<da.length;++i)b=da[i],b.label&&(d=h?h(b.label,b):b.label,d&&f.push({"label":d,"color":b.color}));if(ea.legend.sorted)if(a.isFunction(ea.legend.sorted))f.sort(ea.legend.sorted);else if("reverse"==ea.legend.sorted)f.reverse();else{var j="descending"!=ea.legend.sorted;f.sort(function(a,b){return a.label==b.label?0:a.label<b.label!=j?1:-1})}for(var i=0;i<f.length;++i){var k=f[i];i%ea.legend.noColumns==0&&(g&&e.push("</tr>"),e.push("<tr>"),g=!0),e.push('<td class="legendColorBox"><div style="'+ea.legend.labelBoxBorderColor+'"><div style="border:2px solid '+k.color+';overflow:hidden"></div></div></td><td class="legendLabel"><span>'+k.label+"</span></td>")}if(g&&e.push("</tr>"),0!=e.length){var l='<table style="font-size:smaller;color:'+ea.grid.color+'">'+e.join("")+"</table>";if(null!=ea.legend.container)a(ea.legend.container).html(l);else{var m="",n=ea.legend.position,o=ea.legend.margin;null==o[0]&&(o=[o,o]),"n"==n.charAt(0)?m+="top:"+(o[1]+ma.top)+"px;":"s"==n.charAt(0)&&(m+="bottom:"+(o[1]+ma.bottom)+"px;"),"e"==n.charAt(1)?m+="right:"+(o[0]+ma.right)+"px;":"w"==n.charAt(1)&&(m+="left:"+(o[0]+ma.left)+"px;");var p=a('<div class="legend">'+l.replace('style="','style="position:absolute;'+m+";")+"</div>").appendTo(c);if(0!=ea.legend.backgroundOpacity){var q=ea.legend.backgroundColor;null==q&&(q=ea.grid.backgroundColor,q=q&&"string"==typeof q?a.color.parse(q):a.color.extract(p,"background-color"),q.a=1,q=q.toString());var r=p.children();a('<div style="position:absolute;width:'+r.width()+"px;height:"+r.height()+"px;"+m+"background-color:"+q+';"> </div>').prependTo(p).css("opacity",ea.legend.backgroundOpacity)}}}}}function S(a,b,c){var d,e,f,g=ea.grid.mouseActiveRadius,h=g*g+1,i=null;for(d=da.length-1;d>=0;--d)if(c(da[d])){var j=da[d],k=j.xaxis,l=j.yaxis,m=j.datapoints.points,n=k.c2p(a),o=l.c2p(b),p=g/k.scale,q=g/l.scale;if(f=j.datapoints.pointsize,k.options.inverseTransform&&(p=Number.MAX_VALUE),l.options.inverseTransform&&(q=Number.MAX_VALUE),j.lines.show||j.points.show)for(e=0;e<m.length;e+=f){var r=m[e],s=m[e+1];if(null!=r&&!(r-n>p||-p>r-n||s-o>q||-q>s-o)){var t=Math.abs(k.p2c(r)-a),u=Math.abs(l.p2c(s)-b),v=t*t+u*u;h>v&&(h=v,i=[d,e/f])}}if(j.bars.show&&!i){var w,x;switch(j.bars.align){case"left":w=0;break;case"right":w=-j.bars.barWidth;break;default:w=-j.bars.barWidth/2}for(x=w+j.bars.barWidth,e=0;e<m.length;e+=f){var r=m[e],s=m[e+1],y=m[e+2];null!=r&&(da[d].bars.horizontal?n<=Math.max(y,r)&&n>=Math.min(y,r)&&o>=s+w&&s+x>=o:n>=r+w&&r+x>=n&&o>=Math.min(y,s)&&o<=Math.max(y,s))&&(i=[d,e/f])}}}return i?(d=i[0],e=i[1],f=da[d].datapoints.pointsize,{"datapoint":da[d].datapoints.points.slice(e*f,(e+1)*f),"dataIndex":e,"series":da[d],"seriesIndex":d}):null}function T(a){ea.grid.hoverable&&W("plothover",a,function(a){return 0!=a.hoverable})}function U(a){ea.grid.hoverable&&W("plothover",a,function(a){return!1})}function V(a){W("plotclick",a,function(a){return 0!=a.clickable})}function W(a,b,d){var e=ha.offset(),f=b.pageX-e.left-ma.left,g=b.pageY-e.top-ma.top,h=o({"left":f,"top":g});h.pageX=b.pageX,h.pageY=b.pageY;var i=S(f,g,d);if(i&&(i.pageX=parseInt(i.series.xaxis.p2c(i.datapoint[0])+e.left+ma.left,10),i.pageY=parseInt(i.series.yaxis.p2c(i.datapoint[1])+e.top+ma.top,10)),ea.grid.autoHighlight){for(var j=0;j<ra.length;++j){var k=ra[j];k.auto!=a||i&&k.series==i.series&&k.point[0]==i.datapoint[0]&&k.point[1]==i.datapoint[1]||$(k.series,k.point)}i&&Z(i.series,i.datapoint,a)}c.trigger(a,[h,i])}function X(){var a=ea.interaction.redrawOverlayInterval;return-1==a?void Y():void(sa||(sa=setTimeout(Y,a)))}function Y(){sa=null,ja.save(),ga.clear(),ja.translate(ma.left,ma.top);var a,b;for(a=0;a<ra.length;++a)b=ra[a],b.series.bars.show?ba(b.series,b.point):aa(b.series,b.point);ja.restore(),h(pa.drawOverlay,[ja])}function Z(a,b,c){if("number"==typeof a&&(a=da[a]),"number"==typeof b){var d=a.datapoints.pointsize;b=a.datapoints.points.slice(d*b,d*(b+1))}var e=_(a,b);-1==e?(ra.push({"series":a,"point":b,"auto":c}),X()):c||(ra[e].auto=!1)}function $(a,b){if(null==a&&null==b)return ra=[],void X();if("number"==typeof a&&(a=da[a]),"number"==typeof b){var c=a.datapoints.pointsize;b=a.datapoints.points.slice(c*b,c*(b+1))}var d=_(a,b);-1!=d&&(ra.splice(d,1),X())}function _(a,b){for(var c=0;c<ra.length;++c){var d=ra[c];if(d.series==a&&d.point[0]==b[0]&&d.point[1]==b[1])return c}return-1}function aa(b,c){var d=c[0],e=c[1],f=b.xaxis,g=b.yaxis,h="string"==typeof b.highlightColor?b.highlightColor:a.color.parse(b.color).scale("a",.5).toString();if(!(d<f.min||d>f.max||e<g.min||e>g.max)){var i=b.points.radius+b.points.lineWidth/2;ja.lineWidth=i,ja.strokeStyle=h;var j=1.5*i;d=f.p2c(d),e=g.p2c(e),ja.beginPath(),"circle"==b.points.symbol?ja.arc(d,e,j,0,2*Math.PI,!1):b.points.symbol(ja,d,e,j,!1),ja.closePath(),ja.stroke()}}function ba(b,c){var d,e="string"==typeof b.highlightColor?b.highlightColor:a.color.parse(b.color).scale("a",.5).toString(),f=e;switch(b.bars.align){case"left":d=0;break;case"right":d=-b.bars.barWidth;break;default:d=-b.bars.barWidth/2}ja.lineWidth=b.bars.lineWidth,ja.strokeStyle=e,O(c[0],c[1],c[2]||0,d,d+b.bars.barWidth,function(){return f},b.xaxis,b.yaxis,ja,b.bars.horizontal,b.bars.lineWidth)}function ca(b,c,d,e){if("string"==typeof b)return b;for(var f=ia.createLinearGradient(0,d,0,c),g=0,h=b.colors.length;h>g;++g){var i=b.colors[g];if("string"!=typeof i){var j=a.color.parse(e);null!=i.brightness&&(j=j.scale("rgb",i.brightness)),null!=i.opacity&&(j.a*=i.opacity),i=j.toString()}f.addColorStop(g/(h-1),i)}return f}var da=[],ea={"colors":a.flot_colors||["#931313","#638167","#65596B","#60747C","#B09B5B"],"legend":{"show":!0,"noColumns":a.flot_noColumns||0,"labelFormatter":null,"labelBoxBorderColor":"","container":null,"position":"ne","margin":a.flot_margin||[-5,-32],"backgroundColor":a.flot_backgroundColor||"","backgroundOpacity":a.flot_backgroundOpacity||1,"sorted":null},"xaxis":{"show":null,"position":"bottom","mode":null,"font":null,"color":null,"tickColor":null,"transform":null,"inverseTransform":null,"min":null,"max":null,"autoscaleMargin":null,"ticks":null,"tickFormatter":null,"labelWidth":null,"labelHeight":null,"reserveSpace":null,"tickLength":null,
  "alignTicksWithAxis":null,"tickDecimals":null,"tickSize":null,"minTickSize":null},"yaxis":{"autoscaleMargin":.02,"position":"left"},"xaxes":[],"yaxes":[],"series":{"points":{"show":!1,"radius":3,"lineWidth":2,"fill":!0,"fillColor":"#ffffff","symbol":"circle"},"lines":{"lineWidth":2,"fill":!1,"fillColor":null,"steps":!1},"bars":{"show":!1,"lineWidth":a.flot_bars_lineWidth||1,"barWidth":1,"fill":!0,"fillColor":a.flot_bars_fillColor||{"colors":[{"opacity":.7},{"opacity":1}]},"align":"left","horizontal":!1,"zero":!0},"shadowSize":a.flot_shadowSize||0,"highlightColor":null},"grid":{"show":!0,"aboveData":!1,"color":a.flot_grid_color||"#545454","backgroundColor":null,"borderColor":a.flot_grid_borderColor||"#efefef","tickColor":a.flot_grid_tickColor||"rgba(0,0,0,0.06)","margin":0,"labelMargin":a.flot_grid_labelMargin||10,"axisMargin":8,"borderWidth":a.flot_grid_borderWidth||0,"minBorderMargin":a.flot_grid_minBorderMargin||10,"markings":null,"markingsColor":"#f4f4f4","markingsLineWidth":2,"clickable":!1,"hoverable":!1,"autoHighlight":!0,"mouseActiveRadius":a.flot_grid_mouseActiveRadius||5},"interaction":{"redrawOverlayInterval":1e3/60},"hooks":{}},fa=null,ga=null,ha=null,ia=null,ja=null,ka=[],la=[],ma={"left":0,"right":0,"top":0,"bottom":0},na=0,oa=0,pa={"processOptions":[],"processRawData":[],"processDatapoints":[],"processOffset":[],"drawBackground":[],"drawSeries":[],"draw":[],"bindEvents":[],"drawOverlay":[],"shutdown":[]},qa=this;qa.setData=k,qa.setupGrid=B,qa.draw=G,qa.getPlaceholder=function(){return c},qa.getCanvas=function(){return fa.element},qa.getPlotOffset=function(){return ma},qa.width=function(){return na},qa.height=function(){return oa},qa.offset=function(){var a=ha.offset();return a.left+=ma.left,a.top+=ma.top,a},qa.getData=function(){return da},qa.getAxes=function(){var b={};return a.each(ka.concat(la),function(a,c){c&&(b[c.direction+(1!=c.n?c.n:"")+"axis"]=c)}),b},qa.getXAxes=function(){return ka},qa.getYAxes=function(){return la},qa.c2p=o,qa.p2c=p,qa.getOptions=function(){return ea},qa.highlight=Z,qa.unhighlight=$,qa.triggerRedrawOverlay=X,qa.pointOffset=function(a){return{"left":parseInt(ka[m(a,"x")-1].p2c(+a.x)+ma.left,10),"top":parseInt(la[m(a,"y")-1].p2c(+a.y)+ma.top,10)}},qa.shutdown=v,qa.destroy=function(){v(),c.removeData("plot").empty(),da=[],ea=null,fa=null,ga=null,ha=null,ia=null,ja=null,ka=[],la=[],pa=null,ra=[],qa=null},qa.resize=function(){var a=c.width(),b=c.height();fa.resize(a,b),ga.resize(a,b)},qa.hooks=pa,i(qa),j(f),t(),k(e),B(),G(),u();var ra=[],sa=null}function d(a,b){return b*Math.floor(a/b)}var e=Object.prototype.hasOwnProperty;a.fn.detach||(a.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),b.prototype.resize=function(a,b){if(0>=a||0>=b)throw new Error("Invalid dimensions for plot, width = "+a+", height = "+b);var c=this.element,d=this.context,e=this.pixelRatio;this.width!=a&&(c.width=a*e,c.style.width=a+"px",this.width=a),this.height!=b&&(c.height=b*e,c.style.height=b+"px",this.height=b),d.restore(),d.save(),d.scale(e,e)},b.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},b.prototype.render=function(){var a=this._textCache;for(var b in a)if(e.call(a,b)){var c=this.getTextLayer(b),d=a[b];c.hide();for(var f in d)if(e.call(d,f)){var g=d[f];for(var h in g)if(e.call(g,h)){for(var i,j=g[h].positions,k=0;i=j[k];k++)i.active?i.rendered||(c.append(i.element),i.rendered=!0):(j.splice(k--,1),i.rendered&&i.element.detach());0==j.length&&delete g[h]}}c.show()}},b.prototype.getTextLayer=function(b){var c=this.text[b];return null==c&&(null==this.textContainer&&(this.textContainer=a("<div class='flot-text'></div>").css({"position":"absolute","top":0,"left":0,"bottom":0,"right":0,"font-size":"smaller","color":"#545454"}).insertAfter(this.element)),c=this.text[b]=a("<div></div>").addClass(b).css({"position":"absolute","top":0,"left":0,"bottom":0,"right":0}).appendTo(this.textContainer)),c},b.prototype.getTextInfo=function(b,c,d,e,f){var g,h,i,j;if(c=""+c,g="object"==typeof d?d.style+" "+d.variant+" "+d.weight+" "+d.size+"px/"+d.lineHeight+"px "+d.family:d,h=this._textCache[b],null==h&&(h=this._textCache[b]={}),i=h[g],null==i&&(i=h[g]={}),j=i[c],null==j){var k=a("<div></div>").html(c).css({"position":"absolute","max-width":f,"top":-9999}).appendTo(this.getTextLayer(b));"object"==typeof d?k.css({"font":g,"color":d.color}):"string"==typeof d&&k.addClass(d),j=i[c]={"width":k.outerWidth(!0),"height":k.outerHeight(!0),"element":k,"positions":[]},k.detach()}return j},b.prototype.addText=function(a,b,c,d,e,f,g,h,i){var j=this.getTextInfo(a,d,e,f,g),k=j.positions;"center"==h?b-=j.width/2:"right"==h&&(b-=j.width),"middle"==i?c-=j.height/2:"bottom"==i&&(c-=j.height);for(var l,m=0;l=k[m];m++)if(l.x==b&&l.y==c)return void(l.active=!0);l={"active":!0,"rendered":!1,"element":k.length?j.element.clone():j.element,"x":b,"y":c},k.push(l),l.element.css({"top":Math.round(c),"left":Math.round(b),"text-align":h})},b.prototype.removeText=function(a,b,c,d,f,g){if(null==d){var h=this._textCache[a];if(null!=h)for(var i in h)if(e.call(h,i)){var j=h[i];for(var k in j)if(e.call(j,k))for(var l,m=j[k].positions,n=0;l=m[n];n++)l.active=!1}}else for(var l,m=this.getTextInfo(a,d,f,g).positions,n=0;l=m[n];n++)l.x==b&&l.y==c&&(l.active=!1)},a.plot=function(b,d,e){var f=new c(a(b),d,e,a.plot.plugins);return f},a.plot.version="0.8.3",a.plot.plugins=[],a.fn.plot=function(b,c){return this.each(function(){a.plot(this,b,c)})}}(jQuery);
  !function(a,b,c){"$:nomunge";function d(c){h===!0&&(h=c||1);for(var i=f.length-1;i>=0;i--){var m=a(f[i]);if(m[0]==b||m.is(":visible")){var n=m.width(),o=m.height(),p=m.data(k);!p||n===p.w&&o===p.h||(m.trigger(j,[p.w=n,p.h=o]),h=c||!0)}else p=m.data(k),p.w=0,p.h=0}null!==e&&(h&&(null==c||1e3>c-h)?e=b.requestAnimationFrame(d):(e=setTimeout(d,g[l]),h=!1))}var e,f=[],g=a.resize=a.extend(a.resize,{}),h=!1,i="setTimeout",j="resize",k=j+"-special-event",l="pendingDelay",m="activeDelay",n="throttleWindow";g[l]=200,g[m]=20,g[n]=!0,a.event.special[j]={"setup":function(){if(!g[n]&&this[i])return!1;var b=a(this);f.push(this),b.data(k,{"w":b.width(),"h":b.height()}),1===f.length&&(e=c,d())},"teardown":function(){if(!g[n]&&this[i])return!1;for(var b=a(this),c=f.length-1;c>=0;c--)if(f[c]==this){f.splice(c,1);break}b.removeData(k),f.length||(h?cancelAnimationFrame(e):clearTimeout(e),e=null)},"add":function(b){function d(b,d,f){var g=a(this),h=g.data(k)||{};h.w=d!==c?d:g.width(),h.h=f!==c?f:g.height(),e.apply(this,arguments)}if(!g[n]&&this[i])return!1;var e;return a.isFunction(b)?(e=b,d):(e=b.handler,void(b.handler=d))}},b.requestAnimationFrame||(b.requestAnimationFrame=function(){return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a,c){return b.setTimeout(function(){a((new Date).getTime())},g[m])}}()),b.cancelAnimationFrame||(b.cancelAnimationFrame=function(){return b.webkitCancelRequestAnimationFrame||b.mozCancelRequestAnimationFrame||b.oCancelRequestAnimationFrame||b.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(a){function b(a){function b(){var b=a.getPlaceholder();0!=b.width()&&0!=b.height()&&(a.resize(),a.setupGrid(),a.draw())}function c(a,c){a.getPlaceholder().resize(b)}function d(a,c){a.getPlaceholder().unbind("resize",b)}a.hooks.bindEvents.push(c),a.hooks.shutdown.push(d)}var c={};a.plot.plugins.push({"init":b,"options":c,"name":"resize","version":"1.0"})}(jQuery);
  !function(a){function b(a,b){return b*Math.floor(a/b)}function c(a,b,c,d){if("function"==typeof a.strftime)return a.strftime(b);var e=function(a,b){return a=""+a,b=""+(null==b?"0":b),1==a.length?b+a:a},f=[],g=!1,h=a.getHours(),i=12>h;null==c&&(c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==d&&(d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var j;j=h>12?h-12:0==h?12:h;for(var k=0;k<b.length;++k){var l=b.charAt(k);if(g){switch(l){case"a":l=""+d[a.getDay()];break;case"b":l=""+c[a.getMonth()];break;case"d":l=e(a.getDate());break;case"e":l=e(a.getDate()," ");break;case"h":case"H":l=e(h);break;case"I":l=e(j);break;case"l":l=e(j," ");break;case"m":l=e(a.getMonth()+1);break;case"M":l=e(a.getMinutes());break;case"q":l=""+(Math.floor(a.getMonth()/3)+1);break;case"S":l=e(a.getSeconds());break;case"y":l=e(a.getFullYear()%100);break;case"Y":l=""+a.getFullYear();break;case"p":l=i?"am":"pm";break;case"P":l=i?"AM":"PM";break;case"w":l=""+a.getDay()}f.push(l),g=!1}else"%"==l?g=!0:f.push(l)}return f.join("")}function d(a){function b(a,b,c,d){a[b]=function(){return c[d].apply(c,arguments)}}var c={"date":a};void 0!=a.strftime&&b(c,"strftime",a,"strftime"),b(c,"getTime",a,"getTime"),b(c,"setTime",a,"setTime");for(var d=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],e=0;e<d.length;e++)b(c,"get"+d[e],a,"getUTC"+d[e]),b(c,"set"+d[e],a,"setUTC"+d[e]);return c}function e(a,b){if("browser"==b.timezone)return new Date(a);if(b.timezone&&"utc"!=b.timezone){if("undefined"!=typeof timezoneJS&&"undefined"!=typeof timezoneJS.Date){var c=new timezoneJS.Date;return c.setTimezone(b.timezone),c.setTime(a),c}return d(new Date(a))}return d(new Date(a))}function f(d){d.hooks.processOptions.push(function(d,f){a.each(d.getAxes(),function(a,d){var f=d.options;"time"==f.mode&&(d.tickGenerator=function(a){var c=[],d=e(a.min,f),g=0,i=f.tickSize&&"quarter"===f.tickSize[1]||f.minTickSize&&"quarter"===f.minTickSize[1]?k:j;null!=f.minTickSize&&(g="number"==typeof f.tickSize?f.tickSize:f.minTickSize[0]*h[f.minTickSize[1]]);for(var l=0;l<i.length-1&&!(a.delta<(i[l][0]*h[i[l][1]]+i[l+1][0]*h[i[l+1][1]])/2&&i[l][0]*h[i[l][1]]>=g);++l);var m=i[l][0],n=i[l][1];if("year"==n){if(null!=f.minTickSize&&"year"==f.minTickSize[1])m=Math.floor(f.minTickSize[0]);else{var o=Math.pow(10,Math.floor(Math.log(a.delta/h.year)/Math.LN10)),p=a.delta/h.year/o;m=1.5>p?1:3>p?2:7.5>p?5:10,m*=o}1>m&&(m=1)}a.tickSize=f.tickSize||[m,n];var q=a.tickSize[0];n=a.tickSize[1];var r=q*h[n];"second"==n?d.setSeconds(b(d.getSeconds(),q)):"minute"==n?d.setMinutes(b(d.getMinutes(),q)):"hour"==n?d.setHours(b(d.getHours(),q)):"month"==n?d.setMonth(b(d.getMonth(),q)):"quarter"==n?d.setMonth(3*b(d.getMonth()/3,q)):"year"==n&&d.setFullYear(b(d.getFullYear(),q)),d.setMilliseconds(0),r>=h.minute&&d.setSeconds(0),r>=h.hour&&d.setMinutes(0),r>=h.day&&d.setHours(0),r>=4*h.day&&d.setDate(1),r>=2*h.month&&d.setMonth(b(d.getMonth(),3)),r>=2*h.quarter&&d.setMonth(b(d.getMonth(),6)),r>=h.year&&d.setMonth(0);var s,t=0,u=Number.NaN;do if(s=u,u=d.getTime(),c.push(u),"month"==n||"quarter"==n)if(1>q){d.setDate(1);var v=d.getTime();d.setMonth(d.getMonth()+("quarter"==n?3:1));var w=d.getTime();d.setTime(u+t*h.hour+(w-v)*q),t=d.getHours(),d.setHours(0)}else d.setMonth(d.getMonth()+q*("quarter"==n?3:1));else"year"==n?d.setFullYear(d.getFullYear()+q):d.setTime(u+r);while(u<a.max&&u!=s);return c},d.tickFormatter=function(a,b){var d=e(a,b.options);if(null!=f.timeformat)return c(d,f.timeformat,f.monthNames,f.dayNames);var g,i=b.options.tickSize&&"quarter"==b.options.tickSize[1]||b.options.minTickSize&&"quarter"==b.options.minTickSize[1],j=b.tickSize[0]*h[b.tickSize[1]],k=b.max-b.min,l=f.twelveHourClock?" %p":"",m=f.twelveHourClock?"%I":"%H";g=j<h.minute?m+":%M:%S"+l:j<h.day?k<2*h.day?m+":%M"+l:"%b %d "+m+":%M"+l:j<h.month?"%b %d":i&&j<h.quarter||!i&&j<h.year?k<h.year?"%b":"%b %Y":i&&j<h.year?k<h.year?"Q%q":"Q%q %Y":"%Y";var n=c(d,g,f.monthNames,f.dayNames);return n})})})}var g={"xaxis":{"timezone":null,"timeformat":null,"twelveHourClock":!1,"monthNames":null}},h={"second":1e3,"minute":6e4,"hour":36e5,"day":864e5,"month":2592e6,"quarter":7776e6,"year":525949.2*60*1e3},i=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],j=i.concat([[3,"month"],[6,"month"],[1,"year"]]),k=i.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);a.plot.plugins.push({"init":f,"options":g,"name":"time","version":"1.0"}),a.plot.formatDate=c,a.plot.dateGenerator=e}(jQuery);
  !function(a){function b(a){function b(a,b){var c;for(c=0;c<b.length;++c)if(b[c].id===a.fillBetween)return b[c];return"number"==typeof a.fillBetween?a.fillBetween<0||a.fillBetween>=b.length?null:b[a.fillBetween]:null}function c(a,c,d){if(null!=c.fillBetween){var e=b(c,a.getData());if(e){for(var f,g,h,i,j,k,l,m,n=d.pointsize,o=d.points,p=e.datapoints.pointsize,q=e.datapoints.points,r=[],s=c.lines.show,t=n>2&&d.format[2].y,u=s&&c.lines.steps,v=!0,w=0,x=0;;){if(w>=o.length)break;if(l=r.length,null==o[w]){for(m=0;n>m;++m)r.push(o[w+m]);w+=n}else if(x>=q.length){if(!s)for(m=0;n>m;++m)r.push(o[w+m]);w+=n}else if(null==q[x]){for(m=0;n>m;++m)r.push(null);v=!0,x+=p}else{if(f=o[w],g=o[w+1],i=q[x],j=q[x+1],k=0,f===i){for(m=0;n>m;++m)r.push(o[w+m]);k=j,w+=n,x+=p}else if(f>i){if(s&&w>0&&null!=o[w-n]){for(h=g+(o[w-n+1]-g)*(i-f)/(o[w-n]-f),r.push(i),r.push(h),m=2;n>m;++m)r.push(o[w+m]);k=j}x+=p}else{if(v&&s){w+=n;continue}for(m=0;n>m;++m)r.push(o[w+m]);s&&x>0&&null!=q[x-p]&&(k=j+(q[x-p+1]-j)*(f-i)/(q[x-p]-i)),w+=n}v=!1,l!==r.length&&t&&(r[l+2]=k)}if(u&&l!==r.length&&l>0&&null!==r[l]&&r[l]!==r[l-n]&&r[l+1]!==r[l-n+1]){for(m=0;n>m;++m)r[l+n+m]=r[l+m];r[l+1]=r[l-n+1]}}d.points=r}}}a.hooks.processDatapoints.push(c)}var c={"series":{"fillBetween":null}};a.plot.plugins.push({"init":b,"options":c,"name":"fillbetween","version":"1.0"})}(jQuery);
  /*! SmartAdmin - v1.4.1 - 2014-08-08 */!function(a){function b(a){function b(a,b,e){var g=null;if(c(b)&&(j(b),d(a),f(a),i(b),q>=2)){var h=k(b),r=0,t=l();r=m(h)?-1*n(p,h-1,Math.floor(q/2)-1)-t:n(p,Math.ceil(q/2),h-2)+t+2*s,g=o(e,b,r),e.points=g}return g}function c(a){return null!=a.bars&&a.bars.show&&null!=a.bars.order}function d(a){var b=u?a.getPlaceholder().innerHeight():a.getPlaceholder().innerWidth(),c=u?e(a.getData(),1):e(a.getData(),0),d=c[1]-c[0];t=d/b}function e(a,b){for(var c=new Array,d=0;d<a.length;d++)c[0]=a[d].data[0][b],c[1]=a[d].data[a[d].data.length-1][b];return c}function f(a){p=g(a.getData()),q=p.length}function g(a){for(var b=new Array,c=0;c<a.length;c++)null!=a[c].bars.order&&a[c].bars.show&&b.push(a[c]);return b.sort(h)}function h(a,b){var c=a.bars.order,d=b.bars.order;return d>c?-1:c>d?1:0}function i(a){r=a.bars.lineWidth?a.bars.lineWidth:2,s=r*t}function j(a){a.bars.horizontal&&(u=!0)}function k(a){for(var b=0,c=0;c<p.length;++c)if(a==p[c]){b=c;break}return b+1}function l(){var a=0;return q%2!=0&&(a=p[Math.ceil(q/2)].bars.barWidth/2),a}function m(a){return a<=Math.ceil(q/2)}function n(a,b,c){for(var d=0,e=b;c>=e;e++)d+=a[e].bars.barWidth+2*s;return d}function o(a,b,c){for(var d=a.pointsize,e=a.points,f=0,g=u?1:0;g<e.length;g+=d)e[g]+=c,b.data[f][3]=e[g],f++;return e}var p,q,r,s,t=1,u=!1;a.hooks.processDatapoints.push(b)}var c={"series":{"bars":{"order":null}}};a.plot.plugins.push({"init":b,"options":c,"name":"orderBars","version":"0.2"})}(jQuery);
  !function(a){function b(b){function e(b,c,d){x||(x=!0,r=b.getCanvas(),s=a(r).parent(),t=b.getOptions(),b.setData(f(b.getData())))}function f(b){for(var c=0,d=0,e=0,f=t.series.pie.combine.color,g=[],h=0;h<b.length;++h){var i=b[h].data;a.isArray(i)&&1==i.length&&(i=i[0]),a.isArray(i)?!isNaN(parseFloat(i[1]))&&isFinite(i[1])?i[1]=+i[1]:i[1]=0:i=!isNaN(parseFloat(i))&&isFinite(i)?[1,+i]:[1,0],b[h].data=[i]}for(var h=0;h<b.length;++h)c+=b[h].data[0][1];for(var h=0;h<b.length;++h){var i=b[h].data[0][1];i/c<=t.series.pie.combine.threshold&&(d+=i,e++,f||(f=b[h].color))}for(var h=0;h<b.length;++h){var i=b[h].data[0][1];(2>e||i/c>t.series.pie.combine.threshold)&&g.push(a.extend(b[h],{"data":[[1,i]],"color":b[h].color,"label":b[h].label,"angle":i*Math.PI*2/c,"percent":i/(c/100)}))}return e>1&&g.push({"data":[[1,d]],"color":f,"label":t.series.pie.combine.label,"angle":d*Math.PI*2/c,"percent":d/(c/100)}),g}function g(b,e){function f(){y.clearRect(0,0,j,k),s.children().filter(".pieLabel, .pieLabelBackground").remove()}function g(){var a=t.series.pie.shadow.left,b=t.series.pie.shadow.top,c=10,d=t.series.pie.shadow.alpha,e=t.series.pie.radius>1?t.series.pie.radius:u*t.series.pie.radius;if(!(e>=j/2-a||e*t.series.pie.tilt>=k/2-b||c>=e)){y.save(),y.translate(a,b),y.globalAlpha=d,y.fillStyle="#000",y.translate(v,w),y.scale(1,t.series.pie.tilt);for(var f=1;c>=f;f++)y.beginPath(),y.arc(0,0,e,0,2*Math.PI,!1),y.fill(),e-=f;y.restore()}}function i(){function b(a,b,c){0>=a||isNaN(a)||(c?y.fillStyle=b:(y.strokeStyle=b,y.lineJoin="round"),y.beginPath(),Math.abs(a-2*Math.PI)>1e-9&&y.moveTo(0,0),y.arc(0,0,e,f,f+a/2,!1),y.arc(0,0,e,f+a/2,f+a,!1),y.closePath(),f+=a,c?y.fill():y.stroke())}function c(){function b(b,c,d){if(0==b.data[0][1])return!0;var f,g=t.legend.labelFormatter,h=t.series.pie.label.formatter;f=g?g(b.label,b):b.label,h&&(f=h(f,b));var i=(c+b.angle+c)/2,l=v+Math.round(Math.cos(i)*e),m=w+Math.round(Math.sin(i)*e)*t.series.pie.tilt,n="<span class='pieLabel' id='pieLabel"+d+"' style='position:absolute;top:"+m+"px;left:"+l+"px;'>"+f+"</span>";s.append(n);var o=s.children("#pieLabel"+d),p=m-o.height()/2,q=l-o.width()/2;if(o.css("top",p),o.css("left",q),0-p>0||0-q>0||k-(p+o.height())<0||j-(q+o.width())<0)return!1;if(0!=t.series.pie.label.background.opacity){var r=t.series.pie.label.background.color;null==r&&(r=b.color);var u="top:"+p+"px;left:"+q+"px;";a("<div class='pieLabelBackground' style='position:absolute;width:"+o.width()+"px;height:"+o.height()+"px;"+u+"background-color:"+r+";'></div>").css("opacity",t.series.pie.label.background.opacity).insertBefore(o)}return!0}for(var c=d,e=t.series.pie.label.radius>1?t.series.pie.label.radius:u*t.series.pie.label.radius,f=0;f<m.length;++f){if(m[f].percent>=100*t.series.pie.label.threshold&&!b(m[f],c,f))return!1;c+=m[f].angle}return!0}var d=Math.PI*t.series.pie.startAngle,e=t.series.pie.radius>1?t.series.pie.radius:u*t.series.pie.radius;y.save(),y.translate(v,w),y.scale(1,t.series.pie.tilt),y.save();for(var f=d,g=0;g<m.length;++g)m[g].startAngle=f,b(m[g].angle,m[g].color,!0);if(y.restore(),t.series.pie.stroke.width>0){y.save(),y.lineWidth=t.series.pie.stroke.width,f=d;for(var g=0;g<m.length;++g)b(m[g].angle,t.series.pie.stroke.color,!1);y.restore()}return h(y),y.restore(),t.series.pie.label.show?c():!0}if(s){var j=b.getPlaceholder().width(),k=b.getPlaceholder().height(),l=s.children().filter(".legend").children().width()||0;y=e,x=!1,u=Math.min(j,k/t.series.pie.tilt)/2,w=k/2+t.series.pie.offset.top,v=j/2,"auto"==t.series.pie.offset.left?(t.legend.position.match("w")?v+=l/2:v-=l/2,u>v?v=u:v>j-u&&(v=j-u)):v+=t.series.pie.offset.left;var m=b.getData(),n=0;do n>0&&(u*=d),n+=1,f(),t.series.pie.tilt<=.8&&g();while(!i()&&c>n);n>=c&&(f(),s.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),b.setSeries&&b.insertLegend&&(b.setSeries(m),b.insertLegend())}}function h(a){if(t.series.pie.innerRadius>0){a.save();var b=t.series.pie.innerRadius>1?t.series.pie.innerRadius:u*t.series.pie.innerRadius;a.globalCompositeOperation="destination-out",a.beginPath(),a.fillStyle=t.series.pie.stroke.color,a.arc(0,0,b,0,2*Math.PI,!1),a.fill(),a.closePath(),a.restore(),a.save(),a.beginPath(),a.strokeStyle=t.series.pie.stroke.color,a.arc(0,0,b,0,2*Math.PI,!1),a.stroke(),a.closePath(),a.restore()}}function i(a,b){for(var c=!1,d=-1,e=a.length,f=e-1;++d<e;f=d)(a[d][1]<=b[1]&&b[1]<a[f][1]||a[f][1]<=b[1]&&b[1]<a[d][1])&&b[0]<(a[f][0]-a[d][0])*(b[1]-a[d][1])/(a[f][1]-a[d][1])+a[d][0]&&(c=!c);return c}function j(a,c){for(var d,e,f=b.getData(),g=b.getOptions(),h=g.series.pie.radius>1?g.series.pie.radius:u*g.series.pie.radius,j=0;j<f.length;++j){var k=f[j];if(k.pie.show){if(y.save(),y.beginPath(),y.moveTo(0,0),y.arc(0,0,h,k.startAngle,k.startAngle+k.angle/2,!1),y.arc(0,0,h,k.startAngle+k.angle/2,k.startAngle+k.angle,!1),y.closePath(),d=a-v,e=c-w,y.isPointInPath){if(y.isPointInPath(a-v,c-w))return y.restore(),{"datapoint":[k.percent,k.data],"dataIndex":0,"series":k,"seriesIndex":j}}else{var l=h*Math.cos(k.startAngle),m=h*Math.sin(k.startAngle),n=h*Math.cos(k.startAngle+k.angle/4),o=h*Math.sin(k.startAngle+k.angle/4),p=h*Math.cos(k.startAngle+k.angle/2),q=h*Math.sin(k.startAngle+k.angle/2),r=h*Math.cos(k.startAngle+k.angle/1.5),s=h*Math.sin(k.startAngle+k.angle/1.5),t=h*Math.cos(k.startAngle+k.angle),x=h*Math.sin(k.startAngle+k.angle),z=[[0,0],[l,m],[n,o],[p,q],[r,s],[t,x]],A=[d,e];if(i(z,A))return y.restore(),{"datapoint":[k.percent,k.data],"dataIndex":0,"series":k,"seriesIndex":j}}y.restore()}}return null}function k(a){m("plothover",a)}function l(a){m("plotclick",a)}function m(a,c){var d=b.offset(),e=parseInt(c.pageX-d.left),f=parseInt(c.pageY-d.top),g=j(e,f);if(t.grid.autoHighlight)for(var h=0;h<z.length;++h){var i=z[h];i.auto!=a||g&&i.series==g.series||o(i.series)}g&&n(g.series,a);var k={"pageX":c.pageX,"pageY":c.pageY};s.trigger(a,[k,g])}function n(a,c){var d=p(a);-1==d?(z.push({"series":a,"auto":c}),b.triggerRedrawOverlay()):c||(z[d].auto=!1)}function o(a){null==a&&(z=[],b.triggerRedrawOverlay());var c=p(a);-1!=c&&(z.splice(c,1),b.triggerRedrawOverlay())}function p(a){for(var b=0;b<z.length;++b){var c=z[b];if(c.series==a)return b}return-1}function q(a,b){function c(a){a.angle<=0||isNaN(a.angle)||(b.fillStyle="rgba(255, 255, 255, "+d.series.pie.highlight.opacity+")",b.beginPath(),Math.abs(a.angle-2*Math.PI)>1e-9&&b.moveTo(0,0),b.arc(0,0,e,a.startAngle,a.startAngle+a.angle/2,!1),b.arc(0,0,e,a.startAngle+a.angle/2,a.startAngle+a.angle,!1),b.closePath(),b.fill())}var d=a.getOptions(),e=d.series.pie.radius>1?d.series.pie.radius:u*d.series.pie.radius;b.save(),b.translate(v,w),b.scale(1,d.series.pie.tilt);for(var f=0;f<z.length;++f)c(z[f].series);h(b),b.restore()}var r=null,s=null,t=null,u=null,v=null,w=null,x=!1,y=null,z=[];b.hooks.processOptions.push(function(a,b){b.series.pie.show&&(b.grid.show=!1,"auto"==b.series.pie.label.show&&(b.legend.show?b.series.pie.label.show=!1:b.series.pie.label.show=!0),"auto"==b.series.pie.radius&&(b.series.pie.label.show?b.series.pie.radius=.75:b.series.pie.radius=1),b.series.pie.tilt>1?b.series.pie.tilt=1:b.series.pie.tilt<0&&(b.series.pie.tilt=0))}),b.hooks.bindEvents.push(function(a,b){var c=a.getOptions();c.series.pie.show&&(c.grid.hoverable&&b.unbind("mousemove").mousemove(k),c.grid.clickable&&b.unbind("click").click(l))}),b.hooks.processDatapoints.push(function(a,b,c,d){var f=a.getOptions();f.series.pie.show&&e(a,b,c,d)}),b.hooks.drawOverlay.push(function(a,b){var c=a.getOptions();c.series.pie.show&&q(a,b)}),b.hooks.draw.push(function(a,b){var c=a.getOptions();c.series.pie.show&&g(a,b)})}var c=10,d=.95,e={"series":{"pie":{"show":!1,"radius":"auto","innerRadius":0,"startAngle":1.5,"tilt":1,"shadow":{"left":5,"top":15,"alpha":.02},"offset":{"top":0,"left":"auto"},"stroke":{"color":"#fff","width":1},"label":{"show":"auto","formatter":function(a,b){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+b.color+";'>"+a+"<br/>"+Math.round(b.percent)+"%</div>"},"radius":1,"background":{"color":null,"opacity":0},"threshold":0},"combine":{"threshold":-1,"color":null,"label":"Other"},"highlight":{"opacity":.5}}}};a.plot.plugins.push({"init":b,"options":e,"name":"pie","version":"1.1"})}(jQuery);
  /*! SmartAdmin - v1.4.1 - 2014-08-08 */!function(a){var b={"tooltip":!1,"tooltipOpts":{"content":"%s | X: %x | Y: %y.2","dateFormat":"%y-%0m-%0d","shifts":{"x":10,"y":20},"defaultTheme":!0}},c=function(b){var c={"x":0,"y":0},d=b.getOptions(),e=function(a){c.x=a.x,c.y=a.y},f=function(a){var b={"x":0,"y":0};b.x=a.pageX,b.y=a.pageY,e(b)},g=function(b){var c=new Date(b);return a.plot.formatDate(c,d.tooltipOpts.dateFormat)};b.hooks.bindEvents.push(function(b,e){var i,j=d.tooltipOpts,k=b.getPlaceholder();d.tooltip!==!1&&(a("#flotTip").length>0?i=a("#flotTip"):(i=a("<div />").attr("id","flotTip"),i.appendTo("body").hide().css({"position":"absolute"}),j.defaultTheme&&i.css({"background":"#fff","z-index":"100","padding":"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em","border":"1px solid #111"})),a(k).bind("plothover",function(a,b,e){if(e){var f;f="time"===d.xaxis.mode||"time"===d.xaxes[0].mode?h(j.content,e,g):h(j.content,e),i.html(f).css({"left":c.x+j.shifts.x,"top":c.y+j.shifts.y}).show()}else i.hide().html("")}),e.mousemove(f))});var h=function(a,b,c){var d=/%p\.{0,1}(\d{0,})/,e=/%s/,f=/%x\.{0,1}(\d{0,})/,g=/%y\.{0,1}(\d{0,})/;return"undefined"!=typeof b.series.percent&&(a=i(d,a,b.series.percent)),"undefined"!=typeof b.series.label&&(a=a.replace(e,b.series.label)),"function"==typeof c?a=a.replace(f,c(b.series.data[b.dataIndex][0])):"number"==typeof b.series.data[b.dataIndex][0]&&(a=i(f,a,b.series.data[b.dataIndex][0])),"number"==typeof b.series.data[b.dataIndex][1]&&(a=i(g,a,b.series.data[b.dataIndex][1])),a},i=function(a,b,c){var d;return"null"!==b.match(a)&&(""!==RegExp.$1&&(d=RegExp.$1,c=c.toFixed(d)),b=b.replace(a,c)),b}};a.plot.plugins.push({"init":c,"options":b,"name":"tooltip","version":"0.4.4"})}(jQuery);
  /*! @license Copyright 2011 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */
  function RGBColorParser(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={"aliceblue":"f0f8ff","antiquewhite":"faebd7","aqua":"00ffff","aquamarine":"7fffd4","azure":"f0ffff","beige":"f5f5dc","bisque":"ffe4c4","black":"000000","blanchedalmond":"ffebcd","blue":"0000ff","blueviolet":"8a2be2","brown":"a52a2a","burlywood":"deb887","cadetblue":"5f9ea0","chartreuse":"7fff00","chocolate":"d2691e","coral":"ff7f50","cornflowerblue":"6495ed","cornsilk":"fff8dc","crimson":"dc143c","cyan":"00ffff","darkblue":"00008b","darkcyan":"008b8b","darkgoldenrod":"b8860b","darkgray":"a9a9a9","darkgreen":"006400","darkkhaki":"bdb76b","darkmagenta":"8b008b","darkolivegreen":"556b2f","darkorange":"ff8c00","darkorchid":"9932cc","darkred":"8b0000","darksalmon":"e9967a","darkseagreen":"8fbc8f","darkslateblue":"483d8b","darkslategray":"2f4f4f","darkturquoise":"00ced1","darkviolet":"9400d3","deeppink":"ff1493","deepskyblue":"00bfff","dimgray":"696969","dodgerblue":"1e90ff","feldspar":"d19275","firebrick":"b22222","floralwhite":"fffaf0","forestgreen":"228b22","fuchsia":"ff00ff","gainsboro":"dcdcdc","ghostwhite":"f8f8ff","gold":"ffd700","goldenrod":"daa520","gray":"808080","green":"008000","greenyellow":"adff2f","honeydew":"f0fff0","hotpink":"ff69b4","indianred":"cd5c5c","indigo":"4b0082","ivory":"fffff0","khaki":"f0e68c","lavender":"e6e6fa","lavenderblush":"fff0f5","lawngreen":"7cfc00","lemonchiffon":"fffacd","lightblue":"add8e6","lightcoral":"f08080","lightcyan":"e0ffff","lightgoldenrodyellow":"fafad2","lightgrey":"d3d3d3","lightgreen":"90ee90","lightpink":"ffb6c1","lightsalmon":"ffa07a","lightseagreen":"20b2aa","lightskyblue":"87cefa","lightslateblue":"8470ff","lightslategray":"778899","lightsteelblue":"b0c4de","lightyellow":"ffffe0","lime":"00ff00","limegreen":"32cd32","linen":"faf0e6","magenta":"ff00ff","maroon":"800000","mediumaquamarine":"66cdaa","mediumblue":"0000cd","mediumorchid":"ba55d3","mediumpurple":"9370d8","mediumseagreen":"3cb371","mediumslateblue":"7b68ee","mediumspringgreen":"00fa9a","mediumturquoise":"48d1cc","mediumvioletred":"c71585","midnightblue":"191970","mintcream":"f5fffa","mistyrose":"ffe4e1","moccasin":"ffe4b5","navajowhite":"ffdead","navy":"000080","oldlace":"fdf5e6","olive":"808000","olivedrab":"6b8e23","orange":"ffa500","orangered":"ff4500","orchid":"da70d6","palegoldenrod":"eee8aa","palegreen":"98fb98","paleturquoise":"afeeee","palevioletred":"d87093","papayawhip":"ffefd5","peachpuff":"ffdab9","peru":"cd853f","pink":"ffc0cb","plum":"dda0dd","powderblue":"b0e0e6","purple":"800080","red":"ff0000","rosybrown":"bc8f8f","royalblue":"4169e1","saddlebrown":"8b4513","salmon":"fa8072","sandybrown":"f4a460","seagreen":"2e8b57","seashell":"fff5ee","sienna":"a0522d","silver":"c0c0c0","skyblue":"87ceeb","slateblue":"6a5acd","slategray":"708090","snow":"fffafa","springgreen":"00ff7f","steelblue":"4682b4","tan":"d2b48c","teal":"008080","thistle":"d8bfd8","tomato":"ff6347","turquoise":"40e0d0","violet":"ee82ee","violetred":"d02090","wheat":"f5deb3","white":"ffffff","whitesmoke":"f5f5f5","yellow":"ffff00","yellowgreen":"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{"re":/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,"example":["rgb(123, 234, 45)","rgb(255,234,245)"],"process":function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{"re":/^(\w{2})(\w{2})(\w{2})$/,"example":["#00ff00","336699"],"process":function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{"re":/^(\w{1})(\w{1})(\w{1})$/,"example":["#fb0","f0f"],"process":function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var f=d[e].re,g=d[e].process,h=f.exec(a);if(h){var i=g(h);this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c}}function printStackTrace(a){a=a||{"guess":!0};var b=a.e||null,c=!!a.guess,d=new printStackTrace.implementation,e=d.run(b);return c?d.guessAnonymousFunctions(e):e}Date.ext={},Date.ext.util={},Date.ext.util.xPad=function(a,b,c){for("undefined"==typeof c&&(c=10);parseInt(a,10)<c&&c>1;c/=10)a=b.toString()+a;return a.toString()},Date.prototype.locale="en-GB",document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang&&(Date.prototype.locale=document.getElementsByTagName("html")[0].lang),Date.ext.locales={},Date.ext.locales.en={"a":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"A":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"b":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"B":["January","February","March","April","May","June","July","August","September","October","November","December"],"c":"%a %d %b %Y %T %Z","p":["AM","PM"],"P":["am","pm"],"x":"%d/%m/%y","X":"%T"},Date.ext.locales["en-US"]=Date.ext.locales.en,Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z",Date.ext.locales["en-US"].x="%D",Date.ext.locales["en-US"].X="%r",Date.ext.locales["en-GB"]=Date.ext.locales.en,Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"],Date.ext.formats={"a":function(a){return Date.ext.locales[a.locale].a[a.getDay()]},"A":function(a){return Date.ext.locales[a.locale].A[a.getDay()]},"b":function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},"B":function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},"c":"toLocaleString","C":function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},"d":["getDate","0"],"e":["getDate"," "],"g":function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},"G":function(a){var b=a.getFullYear(),c=parseInt(Date.ext.formats.V(a),10),d=parseInt(Date.ext.formats.W(a),10);return d>c?b++:0===d&&c>=52&&b--,b},"H":["getHours","0"],"I":function(a){var b=a.getHours()%12;return Date.ext.util.xPad(0===b?12:b,0)},"j":function(a){var b=a-new Date(""+a.getFullYear()+"/1/1 GMT");b+=6e4*a.getTimezoneOffset();var c=parseInt(b/6e4/60/24,10)+1;return Date.ext.util.xPad(c,0,100)},"m":function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},"M":["getMinutes","0"],"p":function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},"P":function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},"S":["getSeconds","0"],"u":function(a){var b=a.getDay();return 0===b?7:b},"U":function(a){var b=parseInt(Date.ext.formats.j(a),10),c=6-a.getDay(),d=parseInt((b+c)/7,10);return Date.ext.util.xPad(d,0)},"V":function(a){var b=parseInt(Date.ext.formats.W(a),10),c=new Date(""+a.getFullYear()+"/1/1").getDay(),d=b+(c>4||1>=c?0:1);return 53==d&&new Date(""+a.getFullYear()+"/12/31").getDay()<4?d=1:0===d&&(d=Date.ext.formats.V(new Date(""+(a.getFullYear()-1)+"/12/31"))),Date.ext.util.xPad(d,0)},"w":"getDay","W":function(a){var b=parseInt(Date.ext.formats.j(a),10),c=7-Date.ext.formats.u(a),d=parseInt((b+c)/7,10);return Date.ext.util.xPad(d,0,10)},"y":function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},"Y":"getFullYear","z":function(a){var b=a.getTimezoneOffset(),c=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0),d=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+c+d},"Z":function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}},Date.ext.aggregates={"c":"locale","D":"%m/%d/%y","h":"%b","n":"\n","r":"%I:%M:%S %p","R":"%H:%M","t":"	","T":"%H:%M:%S","x":"locale","X":"locale"},Date.ext.aggregates.z=Date.ext.formats.z(new Date),Date.ext.aggregates.Z=Date.ext.formats.Z(new Date),Date.ext.unsupported={},Date.prototype.strftime=function(a){this.locale in Date.ext.locales||(this.locale.replace(/-[a-zA-Z]+$/,"")in Date.ext.locales?this.locale=this.locale.replace(/-[a-zA-Z]+$/,""):this.locale="en-GB");for(var b=this;a.match(/%[cDhnrRtTxXzZ]/);)a=a.replace(/%([cDhnrRtTxXzZ])/g,function(a,c){var d=Date.ext.aggregates[c];return"locale"==d?Date.ext.locales[b.locale][c]:d});var c=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(a,c){var d=Date.ext.formats[c];return"string"==typeof d?b[d]():"function"==typeof d?d.call(b,b):"object"==typeof d&&"string"==typeof d[0]?Date.ext.util.xPad(b[d[0]](),d[1]):c});return b=null,c},printStackTrace.implementation=function(){},printStackTrace.implementation.prototype={"run":function(a,b){return a=a||this.createException(),b=b||this.mode(a),"other"===b?this.other(arguments.callee):this[b](a)},"createException":function(){try{this.undef()}catch(a){return a}},"mode":function(a){return a.arguments&&a.stack?"chrome":"string"==typeof a.message&&"undefined"!=typeof window&&window.opera?a.stacktrace?a.message.indexOf("\n")>-1&&a.message.split("\n").length>a.stacktrace.split("\n").length?"opera9":a.stack?a.stacktrace.indexOf("called from line")<0?"opera10b":"opera11":"opera10a":"opera9":a.stack?"firefox":"other"},"instrumentFunction":function(a,b,c){a=a||window;var d=a[b];a[b]=function(){return c.call(this,printStackTrace().slice(4)),a[b]._instrumented.apply(this,arguments)},a[b]._instrumented=d},"deinstrumentFunction":function(a,b){a[b].constructor===Function&&a[b]._instrumented&&a[b]._instrumented.constructor===Function&&(a[b]=a[b]._instrumented)},"chrome":function(a){var b=(a.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");return b.pop(),b},"firefox":function(a){return a.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n")},"opera11":function(a){for(var b="{anonymous}",c=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/,d=a.stacktrace.split("\n"),e=[],f=0,g=d.length;g>f;f+=2){var h=c.exec(d[f]);if(h){var i=h[4]+":"+h[1]+":"+h[2],j=h[3]||"global code";j=j.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,b),e.push(j+"@"+i+" -- "+d[f+1].replace(/^\s+/,""))}}return e},"opera10b":function(a){for(var b=/^(.*)@(.+):(\d+)$/,c=a.stacktrace.split("\n"),d=[],e=0,f=c.length;f>e;e++){var g=b.exec(c[e]);if(g){var h=g[1]?g[1]+"()":"global code";d.push(h+"@"+g[2]+":"+g[3])}}return d},"opera10a":function(a){for(var b="{anonymous}",c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,d=a.stacktrace.split("\n"),e=[],f=0,g=d.length;g>f;f+=2){var h=c.exec(d[f]);if(h){var i=h[3]||b;e.push(i+"()@"+h[2]+":"+h[1]+" -- "+d[f+1].replace(/^\s+/,""))}}return e},"opera9":function(a){for(var b="{anonymous}",c=/Line (\d+).*script (?:in )?(\S+)/i,d=a.message.split("\n"),e=[],f=2,g=d.length;g>f;f+=2){var h=c.exec(d[f]);h&&e.push(b+"()@"+h[2]+":"+h[1]+" -- "+d[f+1].replace(/^\s+/,""))}return e},"other":function(a){for(var b,c,d="{anonymous}",e=/function\s*([\w\-$]+)?\s*\(/i,f=[],g=10;a&&f.length<g;)b=e.test(a.toString())?RegExp.$1||d:d,c=Array.prototype.slice.call(a.arguments||[]),f[f.length]=b+"("+this.stringifyArguments(c)+")",a=a.caller;return f},"stringifyArguments":function(a){for(var b=[],c=Array.prototype.slice,d=0;d<a.length;++d){var e=a[d];void 0===e?b[d]="undefined":null===e?b[d]="null":e.constructor&&(e.constructor===Array?e.length<3?b[d]="["+this.stringifyArguments(e)+"]":b[d]="["+this.stringifyArguments(c.call(e,0,1))+"..."+this.stringifyArguments(c.call(e,-1))+"]":e.constructor===Object?b[d]="#object":e.constructor===Function?b[d]="#function":e.constructor===String?b[d]='"'+e+'"':e.constructor===Number&&(b[d]=e))}return b.join(",")},"sourceCache":{},"ajax":function(a){var b=this.createXMLHTTPObject();if(b)try{return b.open("GET",a,!1),b.send(null),b.responseText}catch(c){}return""},"createXMLHTTPObject":function(){for(var a,b=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0;c<b.length;c++)try{return a=b[c](),this.createXMLHTTPObject=b[c],a}catch(d){}},"isSameDomain":function(a){return-1!==a.indexOf(location.hostname)},"getSource":function(a){return a in this.sourceCache||(this.sourceCache[a]=this.ajax(a).split("\n")),this.sourceCache[a]},"guessAnonymousFunctions":function(a){for(var b=0;b<a.length;++b){var c=/\{anonymous\}\(.*\)@(.*)/,d=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,e=a[b],f=c.exec(e);if(f){var g=d.exec(f[1]),h=g[1],i=g[2],j=g[3]||0;if(h&&this.isSameDomain(h)&&i){var k=this.guessAnonymousFunction(h,i,j);a[b]=e.replace("{anonymous}",k)}}}return a},"guessAnonymousFunction":function(a,b,c){var d;try{d=this.findFunctionName(this.getSource(a),b)}catch(e){d="getSource failed with url: "+a+", exception: "+e.toString()}return d},"findFunctionName":function(a,b){for(var c,d,e,f=/function\s+([^(]*?)\s*\(([^)]*)\)/,g=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/,h=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/,i="",j=Math.min(b,20),k=0;j>k;++k)if(c=a[b-k-1],e=c.indexOf("//"),e>=0&&(c=c.substr(0,e)),c){if(i=c+i,d=g.exec(i),d&&d[1])return d[1];if(d=f.exec(i),d&&d[1])return d[1];if(d=h.exec(i),d&&d[1])return d[1]}return"(?)"}},CanvasRenderingContext2D.prototype.installPattern=function(a){if("undefined"!=typeof this.isPatternInstalled)throw"Must un-install old line pattern before installing a new one.";this.isPatternInstalled=!0;var b=[0,0],c=[],d=this.beginPath,e=this.lineTo,f=this.moveTo,g=this.stroke;this.uninstallPattern=function(){this.beginPath=d,this.lineTo=e,this.moveTo=f,this.stroke=g,this.uninstallPattern=void 0,this.isPatternInstalled=void 0},this.beginPath=function(){c=[],d.call(this)},this.moveTo=function(a,b){c.push([[a,b]]),f.call(this,a,b)},this.lineTo=function(a,b){var d=c[c.length-1];d.push([a,b])},this.stroke=function(){if(0===c.length)return void g.call(this);for(var d=0;d<c.length;d++)for(var h=c[d],i=h[0][0],j=h[0][1],k=1;k<h.length;k++){var l=h[k][0],m=h[k][1];this.save();var n=l-i,o=m-j,p=Math.sqrt(n*n+o*o),q=Math.atan2(o,n);this.translate(i,j),f.call(this,0,0),this.rotate(q);for(var r=b[0],s=0;p>s;){var t=a[r];s+=b[1]?b[1]:t,s>p?(b=[r,s-p],s=p):b=[(r+1)%a.length,0],r%2===0?e.call(this,s,0):f.call(this,s,0),r=(r+1)%a.length}this.restore(),i=l,j=m}g.call(this),c=[]}},CanvasRenderingContext2D.prototype.uninstallPattern=function(){throw"Must install a line pattern before uninstalling it."};var DygraphOptions=function(){var a=function(a){this.dygraph_=a,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()};return a.AXIS_STRING_MAPPINGS_={"y":0,"Y":0,"y1":0,"Y1":0,"y2":1,"Y2":1},a.axisToIndex_=function(b){if("string"==typeof b){if(a.AXIS_STRING_MAPPINGS_.hasOwnProperty(b))return a.AXIS_STRING_MAPPINGS_[b];throw"Unknown axis : "+b}if("number"==typeof b){if(0===b||1===b)return b;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(b)throw"Unknown axis : "+b;return 0},a.prototype.reparseSeries=function(){var b=this.get("labels");if(b){this.labels_=b.slice(1),this.yAxes_=[{"series":[],"options":{}}],this.xAxis_={"options":{}},this.series_={};var c=!this.user_.series;if(c){for(var d=0,e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.user_[f]||{},h=0,i=g.axis;"object"==typeof i&&(h=++d,this.yAxes_[h]={"series":[f],"options":i}),i||this.yAxes_[0].series.push(f),this.series_[f]={"idx":e,"yAxis":h,"options":g}}for(var e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.series_[f].options,i=g.axis;if("string"==typeof i){if(!this.series_.hasOwnProperty(i))return void Dygraph.error("Series "+f+" wants to share a y-axis with series "+i+", which does not define its own axis.");var h=this.series_[i].yAxis;this.series_[f].yAxis=h,this.yAxes_[h].series.push(f)}}}else for(var e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.user_.series[f]||{},h=a.axisToIndex_(g.axis);this.series_[f]={"idx":e,"yAxis":h,"options":g},this.yAxes_[h]?this.yAxes_[h].series.push(f):this.yAxes_[h]={"series":[f],"options":{}}}var j=this.user_.axes||{};Dygraph.update(this.yAxes_[0].options,j.y||{}),this.yAxes_.length>1&&Dygraph.update(this.yAxes_[1].options,j.y2||{}),Dygraph.update(this.xAxis_.options,j.x||{})}},a.prototype.get=function(a){var b=this.getGlobalUser_(a);return null!==b?b:this.getGlobalDefault_(a)},a.prototype.getGlobalUser_=function(a){return this.user_.hasOwnProperty(a)?this.user_[a]:null},a.prototype.getGlobalDefault_=function(a){return this.global_.hasOwnProperty(a)?this.global_[a]:Dygraph.DEFAULT_ATTRS.hasOwnProperty(a)?Dygraph.DEFAULT_ATTRS[a]:null},a.prototype.getForAxis=function(a,b){var c,d;if("number"==typeof b)c=b,d=0===c?"y":"y2";else{if("y1"==b&&(b="y"),"y"==b)c=0;else if("y2"==b)c=1;else{if("x"!=b)throw"Unknown axis "+b;c=-1}d=b}var e=-1==c?this.xAxis_:this.yAxes_[c];if(e){var f=e.options;if(f.hasOwnProperty(a))return f[a]}var g=this.getGlobalUser_(a);if(null!==g)return g;var h=Dygraph.DEFAULT_ATTRS.axes[d];return h.hasOwnProperty(a)?h[a]:this.getGlobalDefault_(a)},a.prototype.getForSeries=function(a,b){if(b===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(a))return this.highlightSeries_[a];if(!this.series_.hasOwnProperty(b))throw"Unknown series: "+b;var c=this.series_[b],d=c.options;return d.hasOwnProperty(a)?d[a]:this.getForAxis(a,c.yAxis)},a.prototype.numAxes=function(){return this.yAxes_.length},a.prototype.axisForSeries=function(a){return this.series_[a].yAxis},a.prototype.axisOptions=function(a){return this.yAxes_[a].options},a.prototype.seriesForAxis=function(a){return this.yAxes_[a].series},a.prototype.seriesNames=function(){return this.labels_},a}(),DygraphLayout=function(a){this.dygraph_=a,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)},DygraphLayout.prototype.addDataset=function(a,b){this.points.push(b),this.setNames.push(a)},DygraphLayout.prototype.getPlotArea=function(){return this.area_},DygraphLayout.prototype.computePlotArea=function(){var a={"x":0,"y":0};a.w=this.dygraph_.width_-a.x-this.attr_("rightGap"),a.h=this.dygraph_.height_;var b={"chart_div":this.dygraph_.graphDiv,"reserveSpaceLeft":function(b){var c={"x":a.x,"y":a.y,"w":b,"h":a.h};return a.x+=b,a.w-=b,c},"reserveSpaceRight":function(b){var c={"x":a.x+a.w-b,"y":a.y,"w":b,"h":a.h};return a.w-=b,c},"reserveSpaceTop":function(b){var c={"x":a.x,"y":a.y,"w":a.w,"h":b};return a.y+=b,a.h-=b,c},"reserveSpaceBottom":function(b){var c={"x":a.x,"y":a.y+a.h-b,"w":a.w,"h":b};return a.h-=b,c},"chartRect":function(){return{"x":a.x,"y":a.y,"w":a.w,"h":a.h}}};this.dygraph_.cascadeEvents_("layout",b),this.area_=a},DygraphLayout.prototype.setAnnotations=function(a){this.annotations=[];for(var b=this.attr_("xValueParser")||function(a){return a},c=0;c<a.length;c++){var d={};if(!a[c].xval&&void 0===a[c].x)return void this.dygraph_.error("Annotations must have an 'x' property");if(a[c].icon&&(!a[c].hasOwnProperty("width")||!a[c].hasOwnProperty("height")))return void this.dygraph_.error("Must set width and height when setting annotation.icon property");Dygraph.update(d,a[c]),d.xval||(d.xval=b(d.x)),this.annotations.push(d)}},DygraphLayout.prototype.setXTicks=function(a){this.xTicks_=a},DygraphLayout.prototype.setYAxes=function(a){this.yAxes_=a},DygraphLayout.prototype.evaluate=function(){this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},DygraphLayout.prototype._evaluateLimits=function(){var a=this.dygraph_.xAxisRange();this.minxval=a[0],this.maxxval=a[1];var b=a[1]-a[0];this.xscale=0!==b?1/b:1;for(var c=0;c<this.yAxes_.length;c++){var d=this.yAxes_[c];d.minyval=d.computedValueRange[0],d.maxyval=d.computedValueRange[1],d.yrange=d.maxyval-d.minyval,d.yscale=0!==d.yrange?1/d.yrange:1,d.g.attr_("logscale")&&(d.ylogrange=Dygraph.log10(d.maxyval)-Dygraph.log10(d.minyval),d.ylogscale=0!==d.ylogrange?1/d.ylogrange:1,(!isFinite(d.ylogrange)||isNaN(d.ylogrange))&&d.g.error("axis "+c+" of graph at "+d.g+" can't be displayed in log scale for range ["+d.minyval+" - "+d.maxyval+"]"))}},DygraphLayout._calcYNormal=function(a,b,c){return c?1-(Dygraph.log10(b)-Dygraph.log10(a.minyval))*a.ylogscale:1-(b-a.minyval)*a.yscale},DygraphLayout.prototype._evaluateLineCharts=function(){for(var a=this.attr_("connectSeparatedPoints"),b=this.attr_("stackedGraph"),c=this.attr_("errorBars")||this.attr_("customBars"),d=0;d<this.points.length;d++)for(var e=this.points[d],f=this.setNames[d],g=this.dygraph_.axisPropertiesForSeries(f),h=this.dygraph_.attributes_.getForSeries("logscale",f),i=0;i<e.length;i++){var j=e[i];j.x=(j.xval-this.minxval)*this.xscale;var k=j.yval;b&&(j.y_stacked=DygraphLayout._calcYNormal(g,j.yval_stacked,h),null===k||isNaN(k)||(k=j.yval_stacked)),null===k&&(k=NaN,a||(j.yval=NaN)),j.y=DygraphLayout._calcYNormal(g,k,h),c&&(j.y_top=DygraphLayout._calcYNormal(g,k-j.yval_minus,h),j.y_bottom=DygraphLayout._calcYNormal(g,k+j.yval_plus,h))}},DygraphLayout.parseFloat_=function(a){return null===a?NaN:a},DygraphLayout.prototype._evaluateLineTicks=function(){var a,b,c,d;for(this.xticks=[],a=0;a<this.xTicks_.length;a++)b=this.xTicks_[a],c=b.label,d=this.xscale*(b.v-this.minxval),d>=0&&1>=d&&this.xticks.push([d,c]);for(this.yticks=[],a=0;a<this.yAxes_.length;a++)for(var e=this.yAxes_[a],f=0;f<e.ticks.length;f++)b=e.ticks[f],c=b.label,d=this.dygraph_.toPercentYCoord(b.v,a),d>=0&&1>=d&&this.yticks.push([a,d,c])},DygraphLayout.prototype._evaluateAnnotations=function(){var a,b={};for(a=0;a<this.annotations.length;a++){var c=this.annotations[a];b[c.xval+","+c.series]=c}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var d=0;d<this.points.length;d++){var e=this.points[d];for(a=0;a<e.length;a++){var f=e[a],g=f.xval+","+f.name;g in b&&(f.annotation=b[g],this.annotated_points.push(f))}}},DygraphLayout.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]};var DygraphCanvasRenderer=function(a,b,c,d){if(this.dygraph_=a,this.layout=d,this.element=b,this.elementContext=c,this.container=this.element.parentNode,this.height=this.element.height,this.width=this.element.width,!this.isIE&&!DygraphCanvasRenderer.isSupported(this.element))throw"Canvas is not supported.";if(this.area=d.getPlotArea(),this.container.style.position="relative",this.container.style.width=this.width+"px",this.dygraph_.isUsingExcanvas_)this._createIEClipArea();else if(!Dygraph.isAndroid()){var e=this.dygraph_.canvas_ctx_;e.beginPath(),e.rect(this.area.x,this.area.y,this.area.w,this.area.h),e.clip(),e=this.dygraph_.hidden_ctx_,e.beginPath(),e.rect(this.area.x,this.area.y,this.area.w,this.area.h),e.clip()}};DygraphCanvasRenderer.prototype.attr_=function(a,b){return this.dygraph_.attr_(a,b)},DygraphCanvasRenderer.prototype.clear=function(){var a;if(this.isIE)try{this.clearDelay&&(this.clearDelay.cancel(),this.clearDelay=null),a=this.elementContext}catch(b){return}a=this.elementContext,a.clearRect(0,0,this.width,this.height)},DygraphCanvasRenderer.isSupported=function(a){var b=null;try{b="undefined"==typeof a||null===a?document.createElement("canvas"):a,b.getContext("2d")}catch(c){var d=navigator.appVersion.match(/MSIE (\d\.\d)/),e=-1!=navigator.userAgent.toLowerCase().indexOf("opera");return!d||d[1]<6||e?!1:!0}return!0},DygraphCanvasRenderer.prototype.render=function(){this._updatePoints(),this._renderLineChart()},DygraphCanvasRenderer.prototype._createIEClipArea=function(){function a(a){if(0!==a.w&&0!==a.h){var d=document.createElement("div");d.className=b,d.style.backgroundColor=e,d.style.position="absolute",d.style.left=a.x+"px",d.style.top=a.y+"px",d.style.width=a.w+"px",d.style.height=a.h+"px",c.appendChild(d)}}for(var b="dygraph-clip-div",c=this.dygraph_.graphDiv,d=c.childNodes.length-1;d>=0;d--)c.childNodes[d].className==b&&c.removeChild(c.childNodes[d]);for(var e=document.bgColor,f=this.dygraph_.graphDiv;f!=document;){var g=f.currentStyle.backgroundColor;if(g&&"transparent"!=g){e=g;break}f=f.parentNode}var h=this.area;a({"x":0,"y":0,"w":h.x,"h":this.height}),a({"x":h.x,"y":0,"w":this.width-h.x,"h":h.y}),a({"x":h.x+h.w,"y":0,"w":this.width-h.x-h.w,"h":this.height}),a({"x":h.x,"y":h.y+h.h,"w":this.width-h.x,"h":this.height-h.h-h.y})},DygraphCanvasRenderer._getIteratorPredicate=function(a){return a?DygraphCanvasRenderer._predicateThatSkipsEmptyPoints:null},DygraphCanvasRenderer._predicateThatSkipsEmptyPoints=function(a,b){return null!==a[b].yval},DygraphCanvasRenderer._drawStyledLine=function(a,b,c,d,e,f,g){var h=a.dygraph,i=h.getOption("stepPlot",a.setName);Dygraph.isArrayLike(d)||(d=null);var j=h.getOption("drawGapEdgePoints",a.setName),k=a.points,l=Dygraph.createIterator(k,0,k.length,DygraphCanvasRenderer._getIteratorPredicate(h.getOption("connectSeparatedPoints"))),m=d&&d.length>=2,n=a.drawingContext;n.save(),m&&n.installPattern(d);var o=DygraphCanvasRenderer._drawSeries(a,l,c,g,e,j,i,b);DygraphCanvasRenderer._drawPointsOnLine(a,o,f,b,g),m&&n.uninstallPattern(),n.restore()},DygraphCanvasRenderer._drawSeries=function(a,b,c,d,e,f,g,h){var i,j,k=null,l=null,m=null,n=[],o=!0,p=a.drawingContext;p.beginPath(),p.strokeStyle=h,p.lineWidth=c;for(var q=b.array_,r=b.end_,s=b.predicate_,t=b.start_;r>t;t++){if(j=q[t],s){for(;r>t&&!s(q,t);)t++;if(t==r)break;j=q[t]}if(null===j.canvasy||j.canvasy!=j.canvasy)g&&null!==k&&(p.moveTo(k,l),p.lineTo(j.canvasx,l)),k=l=null;else{if(i=!1,f||!k){b.nextIdx_=t,b.next(),m=b.hasNext?b.peek.canvasy:null;var u=null===m||m!=m;i=!k&&u,f&&(!o&&!k||b.hasNext&&u)&&(i=!0)}null!==k?c&&(g&&(p.moveTo(k,l),p.lineTo(j.canvasx,l)),p.lineTo(j.canvasx,j.canvasy)):p.moveTo(j.canvasx,j.canvasy),(e||i)&&n.push([j.canvasx,j.canvasy,j.idx]),k=j.canvasx,l=j.canvasy}o=!1}return p.stroke(),n},DygraphCanvasRenderer._drawPointsOnLine=function(a,b,c,d,e){for(var f=a.drawingContext,g=0;g<b.length;g++){var h=b[g];f.save(),c(a.dygraph,a.setName,f,h[0],h[1],d,e,h[2]),f.restore()}},DygraphCanvasRenderer.prototype._updatePoints=function(){for(var a=this.layout.points,b=a.length;b--;)for(var c=a[b],d=c.length;d--;){var e=c[d];e.canvasx=this.area.w*e.x+this.area.x,e.canvasy=this.area.h*e.y+this.area.y}},DygraphCanvasRenderer.prototype._renderLineChart=function(a,b){var c,d,e=b||this.elementContext,f=this.layout.points,g=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var h=this.attr_("plotter"),i=h;Dygraph.isArrayLike(i)||(i=[i]);var j={};for(c=0;c<g.length;c++){d=g[c];var k=this.attr_("plotter",d);k!=h&&(j[d]=k)}for(c=0;c<i.length;c++)for(var l=i[c],m=c==i.length-1,n=0;n<f.length;n++)if(d=g[n],!a||d==a){var o=f[n],p=l;if(d in j){if(!m)continue;p=j[d]}var q=this.colors[d],r=this.dygraph_.getOption("strokeWidth",d);e.save(),e.strokeStyle=q,e.lineWidth=r,p({"points":o,"setName":d,"drawingContext":e,"color":q,"strokeWidth":r,"dygraph":this.dygraph_,"axis":this.dygraph_.axisPropertiesForSeries(d),"plotArea":this.area,"seriesIndex":n,"seriesCount":f.length,"singleSeriesName":a,"allSeriesPoints":f}),e.restore()}},DygraphCanvasRenderer._Plotters={"linePlotter":function(a){DygraphCanvasRenderer._linePlotter(a)},"fillPlotter":function(a){DygraphCanvasRenderer._fillPlotter(a)},"errorPlotter":function(a){DygraphCanvasRenderer._errorPlotter(a)}},DygraphCanvasRenderer._linePlotter=function(a){var b=a.dygraph,c=a.setName,d=a.strokeWidth,e=b.getOption("strokeBorderWidth",c),f=b.getOption("drawPointCallback",c)||Dygraph.Circles.DEFAULT,g=b.getOption("strokePattern",c),h=b.getOption("drawPoints",c),i=b.getOption("pointSize",c);e&&d&&DygraphCanvasRenderer._drawStyledLine(a,b.getOption("strokeBorderColor",c),d+2*e,g,h,f,i),DygraphCanvasRenderer._drawStyledLine(a,a.color,d,g,h,f,i)},DygraphCanvasRenderer._errorPlotter=function(a){var b=a.dygraph,c=a.setName,d=b.getOption("errorBars")||b.getOption("customBars");if(d){var e=b.getOption("fillGraph",c);e&&b.warn("Can't use fillGraph option with error bars");var f,g=a.drawingContext,h=a.color,i=b.getOption("fillAlpha",c),j=b.getOption("stepPlot",c),k=a.points,l=Dygraph.createIterator(k,0,k.length,DygraphCanvasRenderer._getIteratorPredicate(b.getOption("connectSeparatedPoints"))),m=NaN,n=NaN,o=[-1,-1],p=new RGBColorParser(h),q="rgba("+p.r+","+p.g+","+p.b+","+i+")";g.fillStyle=q,g.beginPath();for(var r=function(a){return null===a||void 0===a||isNaN(a)};l.hasNext;){var s=l.next();!j&&r(s.y)||j&&!isNaN(n)&&r(n)?m=NaN:(j?(f=[s.y_bottom,s.y_top],n=s.y):f=[s.y_bottom,s.y_top],f[0]=a.plotArea.h*f[0]+a.plotArea.y,f[1]=a.plotArea.h*f[1]+a.plotArea.y,isNaN(m)||(j?(g.moveTo(m,o[0]),g.lineTo(s.canvasx,o[0]),g.lineTo(s.canvasx,o[1])):(g.moveTo(m,o[0]),g.lineTo(s.canvasx,f[0]),g.lineTo(s.canvasx,f[1])),g.lineTo(m,o[1]),g.closePath()),o=f,m=s.canvasx)}g.fill()}},DygraphCanvasRenderer._fillPlotter=function(a){if(!a.singleSeriesName&&0===a.seriesIndex){for(var b=a.dygraph,c=b.getLabels().slice(1),d=c.length;d>=0;d--)b.visibility()[d]||c.splice(d,1);var e=function(){for(var a=0;a<c.length;a++)if(b.getOption("fillGraph",c[a]))return!0;return!1}();if(e)for(var f,g,h=a.drawingContext,i=a.plotArea,j=a.allSeriesPoints,k=j.length,l=b.getOption("fillAlpha"),m=b.getOption("stackedGraph"),n=b.getColors(),o={},p=k-1;p>=0;p--){var q=c[p];if(b.getOption("fillGraph",q)){var r=b.getOption("stepPlot",q),s=n[p],t=b.axisPropertiesForSeries(q),u=1+t.minyval*t.yscale;0>u?u=0:u>1&&(u=1),u=i.h*u+i.y;var v,w=j[p],x=Dygraph.createIterator(w,0,w.length,DygraphCanvasRenderer._getIteratorPredicate(b.getOption("connectSeparatedPoints"))),y=NaN,z=[-1,-1],A=new RGBColorParser(s),B="rgba("+A.r+","+A.g+","+A.b+","+l+")";h.fillStyle=B,h.beginPath();for(var C,D=!0;x.hasNext;){var E=x.next();if(Dygraph.isOK(E.y)){if(m){if(!D&&C==E.xval)continue;D=!1,C=E.xval,f=o[E.canvasx];var F;F=void 0===f?u:g?f[0]:f,v=[E.canvasy,F],r?-1===z[0]?o[E.canvasx]=[E.canvasy,u]:o[E.canvasx]=[E.canvasy,z[0]]:o[E.canvasx]=E.canvasy}else v=[E.canvasy,u];isNaN(y)||(h.moveTo(y,z[0]),r?h.lineTo(E.canvasx,z[0]):h.lineTo(E.canvasx,v[0]),g&&f?h.lineTo(E.canvasx,f[1]):h.lineTo(E.canvasx,v[1]),h.lineTo(y,z[1]),h.closePath()),z=v,y=E.canvasx}else y=NaN,null===E.y_stacked||isNaN(E.y_stacked)||(o[E.canvasx]=i.h*E.y_stacked+i.y)}g=r,h.fill()}}}};var Dygraph=function(a,b,c,d){this.is_initial_draw_=!0,this.readyFns_=[],void 0!==d?(this.warn("Using deprecated four-argument dygraph constructor"),this.__old_init__(a,b,c,d)):this.__init__(a,b,c)};Dygraph.NAME="Dygraph",Dygraph.VERSION="1.0.1",Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"},Dygraph.toString=function(){return this.__repr__()},Dygraph.DEFAULT_ROLL_PERIOD=1,Dygraph.DEFAULT_WIDTH=480,Dygraph.DEFAULT_HEIGHT=320,Dygraph.ANIMATION_STEPS=12,Dygraph.ANIMATION_DURATION=200,Dygraph.KMB_LABELS=["K","M","B","T","Q"],Dygraph.KMG2_BIG_LABELS=["k","M","G","T","P","E","Z","Y"],Dygraph.KMG2_SMALL_LABELS=["m","u","n","p","f","a","z","y"],Dygraph.numberValueFormatter=function(a,b,c,d){var e=b("sigFigs");if(null!==e)return Dygraph.floatFormat(a,e);var f,g=b("digitsAfterDecimal"),h=b("maxNumberWidth"),i=b("labelsKMB"),j=b("labelsKMG2");if(f=0!==a&&(Math.abs(a)>=Math.pow(10,h)||Math.abs(a)<Math.pow(10,-g))?a.toExponential(g):""+Dygraph.round_(a,g),i||j){var k,l=[],m=[];i&&(k=1e3,l=Dygraph.KMB_LABELS),j&&(i&&Dygraph.warn("Setting both labelsKMB and labelsKMG2. Pick one!"),k=1024,l=Dygraph.KMG2_BIG_LABELS,m=Dygraph.KMG2_SMALL_LABELS);for(var n=Math.abs(a),o=Dygraph.pow(k,l.length),p=l.length-1;p>=0;p--,o/=k)if(n>=o){f=Dygraph.round_(a/o,g)+l[p];break}if(j){var q=String(a.toExponential()).split("e-");2===q.length&&q[1]>=3&&q[1]<=24&&(f=q[1]%3>0?Dygraph.round_(q[0]/Dygraph.pow(10,q[1]%3),g):Number(q[0]).toFixed(2),f+=m[Math.floor(q[1]/3)-1])}}return f},Dygraph.numberAxisLabelFormatter=function(a,b,c,d){return Dygraph.numberValueFormatter(a,c,d)},Dygraph.dateString_=function(a){var b=Dygraph.zeropad,c=new Date(a),d=""+c.getFullYear(),e=b(c.getMonth()+1),f=b(c.getDate()),g="",h=3600*c.getHours()+60*c.getMinutes()+c.getSeconds();
  return h&&(g=" "+Dygraph.hmsString_(a)),d+"/"+e+"/"+f+g},Dygraph.dateAxisFormatter=function(a,b){if(b>=Dygraph.DECADAL)return a.strftime("%Y");if(b>=Dygraph.MONTHLY)return a.strftime("%b %y");var c=3600*a.getHours()+60*a.getMinutes()+a.getSeconds()+a.getMilliseconds();return 0===c||b>=Dygraph.DAILY?new Date(a.getTime()+36e5).strftime("%d%b"):Dygraph.hmsString_(a.getTime())},Dygraph.Plotters=DygraphCanvasRenderer._Plotters,Dygraph.DEFAULT_ATTRS={"highlightCircleSize":3,"highlightSeriesOpts":null,"highlightSeriesBackgroundAlpha":.5,"labelsDivWidth":250,"labelsDivStyles":{},"labelsSeparateLines":!1,"labelsShowZeroValues":!0,"labelsKMB":!1,"labelsKMG2":!1,"showLabelsOnHighlight":!0,"digitsAfterDecimal":2,"maxNumberWidth":6,"sigFigs":null,"strokeWidth":1,"strokeBorderWidth":0,"strokeBorderColor":"white","axisTickSize":3,"axisLabelFontSize":14,"xAxisLabelWidth":50,"yAxisLabelWidth":50,"rightGap":5,"showRoller":!1,"xValueParser":Dygraph.dateParser,"delimiter":",","sigma":2,"errorBars":!1,"fractions":!1,"wilsonInterval":!0,"customBars":!1,"fillGraph":!1,"fillAlpha":.15,"connectSeparatedPoints":!1,"stackedGraph":!1,"stackedGraphNaNFill":"all","hideOverlayOnMouseOut":!0,"legend":"onmouseover","stepPlot":!1,"avoidMinZero":!1,"xRangePad":0,"yRangePad":null,"drawAxesAtZero":!1,"titleHeight":28,"xLabelHeight":18,"yLabelWidth":18,"drawXAxis":!0,"drawYAxis":!0,"axisLineColor":"black","axisLineWidth":.3,"gridLineWidth":.3,"axisLabelColor":"black","axisLabelFont":"Arial","axisLabelWidth":50,"drawYGrid":!0,"drawXGrid":!0,"gridLineColor":"rgb(128,128,128)","interactionModel":null,"animatedZooms":!1,"showRangeSelector":!1,"rangeSelectorHeight":40,"rangeSelectorPlotStrokeColor":"#808FAB","rangeSelectorPlotFillColor":"#A7B1C4","plotter":[Dygraph.Plotters.fillPlotter,Dygraph.Plotters.errorPlotter,Dygraph.Plotters.linePlotter],"plugins":[],"axes":{"x":{"pixelsPerLabel":60,"axisLabelFormatter":Dygraph.dateAxisFormatter,"valueFormatter":Dygraph.dateString_,"drawGrid":!0,"independentTicks":!0,"ticker":null},"y":{"pixelsPerLabel":30,"valueFormatter":Dygraph.numberValueFormatter,"axisLabelFormatter":Dygraph.numberAxisLabelFormatter,"drawGrid":!0,"independentTicks":!0,"ticker":null},"y2":{"pixelsPerLabel":30,"valueFormatter":Dygraph.numberValueFormatter,"axisLabelFormatter":Dygraph.numberAxisLabelFormatter,"drawGrid":!1,"independentTicks":!1,"ticker":null}}},Dygraph.HORIZONTAL=1,Dygraph.VERTICAL=2,Dygraph.PLUGINS=[],Dygraph.addedAnnotationCSS=!1,Dygraph.prototype.__old_init__=function(a,b,c,d){if(null!==c){for(var e=["Date"],f=0;f<c.length;f++)e.push(c[f]);Dygraph.update(d,{"labels":e})}this.__init__(a,b,d)},Dygraph.prototype.__init__=function(a,b,c){if(/MSIE/.test(navigator.userAgent)&&!window.opera&&"undefined"!=typeof G_vmlCanvasManager&&"complete"!=document.readyState){var d=this;return void setTimeout(function(){d.__init__(a,b,c)},100)}if((null===c||void 0===c)&&(c={}),c=Dygraph.mapLegacyOptions_(c),"string"==typeof a&&(a=document.getElementById(a)),!a)return void Dygraph.error("Constructing dygraph with a non-existent div!");this.isUsingExcanvas_="undefined"!=typeof G_vmlCanvasManager,this.maindiv_=a,this.file_=b,this.rollPeriod_=c.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=c.fractions||!1,this.dateWindow_=c.dateWindow||null,this.annotations_=[],this.zoomed_x_=!1,this.zoomed_y_=!1,a.innerHTML="",""===a.style.width&&c.width&&(a.style.width=c.width+"px"),""===a.style.height&&c.height&&(a.style.height=c.height+"px"),""===a.style.height&&0===a.clientHeight&&(a.style.height=Dygraph.DEFAULT_HEIGHT+"px",""===a.style.width&&(a.style.width=Dygraph.DEFAULT_WIDTH+"px")),this.width_=a.clientWidth||c.width||0,this.height_=a.clientHeight||c.height||0,c.stackedGraph&&(c.fillGraph=!0),this.user_attrs_={},Dygraph.update(this.user_attrs_,c),this.attrs_={},Dygraph.updateDeep(this.attrs_,Dygraph.DEFAULT_ATTRS),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new DygraphOptions(this),this.createInterface_(),this.plugins_=[];for(var e=Dygraph.PLUGINS.concat(this.getOption("plugins")),f=0;f<e.length;f++){var g=e[f],h=new g,i={"plugin":h,"events":{},"options":{},"pluginOptions":{}},j=h.activate(this);for(var k in j)i.events[k]=j[k];this.plugins_.push(i)}for(var f=0;f<this.plugins_.length;f++){var l=this.plugins_[f];for(var k in l.events)if(l.events.hasOwnProperty(k)){var m=l.events[k],n=[l.plugin,m];k in this.eventListeners_?this.eventListeners_[k].push(n):this.eventListeners_[k]=[n]}}this.createDragInterface_(),this.start_()},Dygraph.prototype.cascadeEvents_=function(a,b){if(!(a in this.eventListeners_))return!0;var c={"dygraph":this,"cancelable":!1,"defaultPrevented":!1,"preventDefault":function(){if(!c.cancelable)throw"Cannot call preventDefault on non-cancelable event.";c.defaultPrevented=!0},"propagationStopped":!1,"stopPropagation":function(){c.propagationStopped=!0}};Dygraph.update(c,b);var d=this.eventListeners_[a];if(d)for(var e=d.length-1;e>=0;e--){var f=d[e][0],g=d[e][1];if(g.call(f,c),c.propagationStopped)break}return c.defaultPrevented},Dygraph.prototype.isZoomed=function(a){if(null===a||void 0===a)return this.zoomed_x_||this.zoomed_y_;if("x"===a)return this.zoomed_x_;if("y"===a)return this.zoomed_y_;throw"axis parameter is ["+a+"] must be null, 'x' or 'y'."},Dygraph.prototype.toString=function(){var a=this.maindiv_,b=a&&a.id?a.id:a;return"[Dygraph "+b+"]"},Dygraph.prototype.attr_=function(a,b){return b?this.attributes_.getForSeries(a,b):this.attributes_.get(a)},Dygraph.prototype.getOption=function(a,b){return this.attr_(a,b)},Dygraph.prototype.getOptionForAxis=function(a,b){return this.attributes_.getForAxis(a,b)},Dygraph.prototype.optionsViewForAxis_=function(a){var b=this;return function(c){var d=b.user_attrs_.axes;return d&&d[a]&&d[a].hasOwnProperty(c)?d[a][c]:"undefined"!=typeof b.user_attrs_[c]?b.user_attrs_[c]:(d=b.attrs_.axes,d&&d[a]&&d[a].hasOwnProperty(c)?d[a][c]:"y"==a&&b.axes_[0].hasOwnProperty(c)?b.axes_[0][c]:"y2"==a&&b.axes_[1].hasOwnProperty(c)?b.axes_[1][c]:b.attr_(c))}},Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_},Dygraph.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},Dygraph.prototype.xAxisExtremes=function(){var a=this.attr_("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-a,1+a];var b=this.rawData_[0][0],c=this.rawData_[this.rawData_.length-1][0];if(a){var d=c-b;b-=d*a,c+=d*a}return[b,c]},Dygraph.prototype.yAxisRange=function(a){if("undefined"==typeof a&&(a=0),0>a||a>=this.axes_.length)return null;var b=this.axes_[a];return[b.computedValueRange[0],b.computedValueRange[1]]},Dygraph.prototype.yAxisRanges=function(){for(var a=[],b=0;b<this.axes_.length;b++)a.push(this.yAxisRange(b));return a},Dygraph.prototype.toDomCoords=function(a,b,c){return[this.toDomXCoord(a),this.toDomYCoord(b,c)]},Dygraph.prototype.toDomXCoord=function(a){if(null===a)return null;var b=this.plotter_.area,c=this.xAxisRange();return b.x+(a-c[0])/(c[1]-c[0])*b.w},Dygraph.prototype.toDomYCoord=function(a,b){var c=this.toPercentYCoord(a,b);if(null===c)return null;var d=this.plotter_.area;return d.y+c*d.h},Dygraph.prototype.toDataCoords=function(a,b,c){return[this.toDataXCoord(a),this.toDataYCoord(b,c)]},Dygraph.prototype.toDataXCoord=function(a){if(null===a)return null;var b=this.plotter_.area,c=this.xAxisRange();return c[0]+(a-b.x)/b.w*(c[1]-c[0])},Dygraph.prototype.toDataYCoord=function(a,b){if(null===a)return null;var c=this.plotter_.area,d=this.yAxisRange(b);if("undefined"==typeof b&&(b=0),this.attributes_.getForAxis("logscale",b)){var e=(a-c.y)/c.h,f=Dygraph.log10(d[1]),g=f-e*(f-Dygraph.log10(d[0])),h=Math.pow(Dygraph.LOG_SCALE,g);return h}return d[0]+(c.y+c.h-a)/c.h*(d[1]-d[0])},Dygraph.prototype.toPercentYCoord=function(a,b){if(null===a)return null;"undefined"==typeof b&&(b=0);var c,d=this.yAxisRange(b),e=this.attributes_.getForAxis("logscale",b);if(e){var f=Dygraph.log10(d[1]);c=(f-Dygraph.log10(a))/(f-Dygraph.log10(d[0]))}else c=(d[1]-a)/(d[1]-d[0]);return c},Dygraph.prototype.toPercentXCoord=function(a){if(null===a)return null;var b=this.xAxisRange();return(a-b[0])/(b[1]-b[0])},Dygraph.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length:0},Dygraph.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},Dygraph.prototype.getValue=function(a,b){return 0>a||a>this.rawData_.length?null:0>b||b>this.rawData_[a].length?null:this.rawData_[a][b]},Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",a.appendChild(this.graphDiv),this.canvas_=Dygraph.createCanvas(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.resizeElements_(),this.canvas_ctx_=Dygraph.getContext(this.canvas_),this.hidden_ctx_=Dygraph.getContext(this.hidden_),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new DygraphLayout(this);var b=this;this.mouseMoveHandler_=function(a){b.mouseMove_(a)},this.mouseOutHandler_=function(a){var c=a.target||a.fromElement,d=a.relatedTarget||a.toElement;Dygraph.isNodeContainedBy(c,b.graphDiv)&&!Dygraph.isNodeContainedBy(d,b.graphDiv)&&b.mouseOut_(a)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(a){b.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},Dygraph.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px",this.canvas_.width=this.width_,this.canvas_.height=this.height_,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",this.hidden_.width=this.width_,this.hidden_.height=this.height_,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px"},Dygraph.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();var a=function(b){for(;b.hasChildNodes();)a(b.firstChild),b.removeChild(b.firstChild)};this.removeTrackedEvents_(),Dygraph.removeEvent(window,"mouseout",this.mouseOutHandler_),Dygraph.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),Dygraph.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,a(this.maindiv_);var b=function(a){for(var b in a)"object"==typeof a[b]&&(a[b]=null)};b(this.layout_),b(this.plotter_),b(this)},Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();return b.style.position="absolute",b.style.top=a.style.top,b.style.left=a.style.left,b.width=this.width_,b.height=this.height_,b.style.width=this.width_+"px",b.style.height=this.height_+"px",b},Dygraph.prototype.createMouseEventElement_=function(){if(this.isUsingExcanvas_){var a=document.createElement("div");return a.style.position="absolute",a.style.backgroundColor="white",a.style.filter="alpha(opacity=0)",a.style.width=this.width_+"px",a.style.height=this.height_+"px",this.graphDiv.appendChild(a),a}return this.canvas_},Dygraph.prototype.setColors_=function(){var a=this.getLabels(),b=a.length-1;this.colors_=[],this.colorsMap_={};var c,d=this.attr_("colors");if(d){for(c=0;b>c;c++)if(this.visibility()[c]){var e=d[c%d.length];this.colors_.push(e),this.colorsMap_[a[1+c]]=e}}else{var f=this.attr_("colorSaturation")||1,g=this.attr_("colorValue")||.5,h=Math.ceil(b/2);for(c=1;b>=c;c++)if(this.visibility()[c-1]){var i=c%2?Math.ceil(c/2):h+c/2,j=1*i/(1+b),e=Dygraph.hsvToRGB(j,f,g);this.colors_.push(e),this.colorsMap_[a[c]]=e}}},Dygraph.prototype.getColors=function(){return this.colors_},Dygraph.prototype.getPropertiesForSeries=function(a){for(var b=-1,c=this.getLabels(),d=1;d<c.length;d++)if(c[d]==a){b=d;break}return-1==b?null:{"name":a,"column":b,"visible":this.visibility()[b-1],"color":this.colorsMap_[a],"axis":1+this.attributes_.axisForSeries(a)}},Dygraph.prototype.createRollInterface_=function(){this.roller_||(this.roller_=document.createElement("input"),this.roller_.type="text",this.roller_.style.display="none",this.graphDiv.appendChild(this.roller_));var a=this.attr_("showRoller")?"block":"none",b=this.plotter_.area,c={"position":"absolute","zIndex":10,"top":b.y+b.h-25+"px","left":b.x+1+"px","display":a};this.roller_.size="2",this.roller_.value=this.rollPeriod_;for(var d in c)c.hasOwnProperty(d)&&(this.roller_.style[d]=c[d]);var e=this;this.roller_.onchange=function(){e.adjustRoll(e.roller_.value)}},Dygraph.prototype.dragGetX_=function(a,b){return Dygraph.pageX(a)-b.px},Dygraph.prototype.dragGetY_=function(a,b){return Dygraph.pageY(a)-b.py},Dygraph.prototype.createDragInterface_=function(){var a={"isZooming":!1,"isPanning":!1,"is2DPan":!1,"dragStartX":null,"dragStartY":null,"dragEndX":null,"dragEndY":null,"dragDirection":null,"prevEndX":null,"prevEndY":null,"prevDragDirection":null,"cancelNextDblclick":!1,"initialLeftmostDate":null,"xUnitsPerPixel":null,"dateRange":null,"px":0,"py":0,"boundedDates":null,"boundedValues":null,"tarp":new Dygraph.IFrameTarp,"initializeMouseDown":function(a,b,c){a.preventDefault?a.preventDefault():(a.returnValue=!1,a.cancelBubble=!0),c.px=Dygraph.findPosX(b.canvas_),c.py=Dygraph.findPosY(b.canvas_),c.dragStartX=b.dragGetX_(a,c),c.dragStartY=b.dragGetY_(a,c),c.cancelNextDblclick=!1,c.tarp.cover()}},b=this.attr_("interactionModel"),c=this,d=function(b){return function(d){b(d,c,a)}};for(var e in b)b.hasOwnProperty(e)&&this.addAndTrackEvent(this.mouseEventElement_,e,d(b[e]));var f=function(b){if((a.isZooming||a.isPanning)&&(a.isZooming=!1,a.dragStartX=null,a.dragStartY=null),a.isPanning){a.isPanning=!1,a.draggingDate=null,a.dateRange=null;for(var d=0;d<c.axes_.length;d++)delete c.axes_[d].draggingValue,delete c.axes_[d].dragValueRange}a.tarp.uncover()};this.addAndTrackEvent(document,"mouseup",f)},Dygraph.prototype.drawZoomRect_=function(a,b,c,d,e,f,g,h){var i=this.canvas_ctx_;f==Dygraph.HORIZONTAL?i.clearRect(Math.min(b,g),this.layout_.getPlotArea().y,Math.abs(b-g),this.layout_.getPlotArea().h):f==Dygraph.VERTICAL&&i.clearRect(this.layout_.getPlotArea().x,Math.min(d,h),this.layout_.getPlotArea().w,Math.abs(d-h)),a==Dygraph.HORIZONTAL?c&&b&&(i.fillStyle="rgba(128,128,128,0.33)",i.fillRect(Math.min(b,c),this.layout_.getPlotArea().y,Math.abs(c-b),this.layout_.getPlotArea().h)):a==Dygraph.VERTICAL&&e&&d&&(i.fillStyle="rgba(128,128,128,0.33)",i.fillRect(this.layout_.getPlotArea().x,Math.min(d,e),this.layout_.getPlotArea().w,Math.abs(e-d))),this.isUsingExcanvas_&&(this.currentZoomRectArgs_=[a,b,c,d,e,0,0,0])},Dygraph.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height)},Dygraph.prototype.doZoomX_=function(a,b){this.currentZoomRectArgs_=null;var c=this.toDataXCoord(a),d=this.toDataXCoord(b);this.doZoomXDates_(c,d)},Dygraph.zoomAnimationFunction=function(a,b){var c=1.5;return(1-Math.pow(c,-a))/(1-Math.pow(c,-b))},Dygraph.prototype.doZoomXDates_=function(a,b){var c=this.xAxisRange(),d=[a,b];this.zoomed_x_=!0;var e=this;this.doAnimatedZoom(c,d,null,null,function(){e.attr_("zoomCallback")&&e.attr_("zoomCallback")(a,b,e.yAxisRanges())})},Dygraph.prototype.doZoomY_=function(a,b){this.currentZoomRectArgs_=null;for(var c=this.yAxisRanges(),d=[],e=0;e<this.axes_.length;e++){var f=this.toDataYCoord(a,e),g=this.toDataYCoord(b,e);d.push([g,f])}this.zoomed_y_=!0;var h=this;this.doAnimatedZoom(null,null,c,d,function(){if(h.attr_("zoomCallback")){var a=h.xAxisRange();h.attr_("zoomCallback")(a[0],a[1],h.yAxisRanges())}})},Dygraph.prototype.resetZoom=function(){var a=!1,b=!1,c=!1;null!==this.dateWindow_&&(a=!0,b=!0);for(var d=0;d<this.axes_.length;d++)"undefined"!=typeof this.axes_[d].valueWindow&&null!==this.axes_[d].valueWindow&&(a=!0,c=!0);if(this.clearSelection(),a){this.zoomed_x_=!1,this.zoomed_y_=!1;var e=this.rawData_[0][0],f=this.rawData_[this.rawData_.length-1][0];if(!this.attr_("animatedZooms")){for(this.dateWindow_=null,d=0;d<this.axes_.length;d++)null!==this.axes_[d].valueWindow&&delete this.axes_[d].valueWindow;return this.drawGraph_(),void(this.attr_("zoomCallback")&&this.attr_("zoomCallback")(e,f,this.yAxisRanges()))}var g=null,h=null,i=null,j=null;if(b&&(g=this.xAxisRange(),h=[e,f]),c){i=this.yAxisRanges();var k=this.gatherDatasets_(this.rolledSeries_,null),l=k.extremes;for(this.computeYAxisRanges_(l),j=[],d=0;d<this.axes_.length;d++){var m=this.axes_[d];j.push(null!==m.valueRange&&void 0!==m.valueRange?m.valueRange:m.extremeRange)}}var n=this;this.doAnimatedZoom(g,h,i,j,function(){n.dateWindow_=null;for(var a=0;a<n.axes_.length;a++)null!==n.axes_[a].valueWindow&&delete n.axes_[a].valueWindow;n.attr_("zoomCallback")&&n.attr_("zoomCallback")(e,f,n.yAxisRanges())})}},Dygraph.prototype.doAnimatedZoom=function(a,b,c,d,e){var f,g,h=this.attr_("animatedZooms")?Dygraph.ANIMATION_STEPS:1,i=[],j=[];if(null!==a&&null!==b)for(f=1;h>=f;f++)g=Dygraph.zoomAnimationFunction(f,h),i[f-1]=[a[0]*(1-g)+g*b[0],a[1]*(1-g)+g*b[1]];if(null!==c&&null!==d)for(f=1;h>=f;f++){g=Dygraph.zoomAnimationFunction(f,h);for(var k=[],l=0;l<this.axes_.length;l++)k.push([c[l][0]*(1-g)+g*d[l][0],c[l][1]*(1-g)+g*d[l][1]]);j[f-1]=k}var m=this;Dygraph.repeatAndCleanup(function(a){if(j.length)for(var b=0;b<m.axes_.length;b++){var c=j[a][b];m.axes_[b].valueWindow=[c[0],c[1]]}i.length&&(m.dateWindow_=i[a]),m.drawGraph_()},h,Dygraph.ANIMATION_DURATION/h,e)},Dygraph.prototype.getArea=function(){return this.plotter_.area},Dygraph.prototype.eventToDomCoords=function(a){if(a.offsetX&&a.offsetY)return[a.offsetX,a.offsetY];var b=Dygraph.pageX(a)-Dygraph.findPosX(this.mouseEventElement_),c=Dygraph.pageY(a)-Dygraph.findPosY(this.mouseEventElement_);return[b,c]},Dygraph.prototype.findClosestRow=function(a){for(var b=1/0,c=-1,d=this.layout_.points,e=0;e<d.length;e++)for(var f=d[e],g=f.length,h=0;g>h;h++){var i=f[h];if(Dygraph.isValidPoint(i,!0)){var j=Math.abs(i.canvasx-a);b>j&&(b=j,c=i.idx)}}return c},Dygraph.prototype.findClosestPoint=function(a,b){for(var c,d,e,f,g,h,i,j=1/0,k=this.layout_.points.length-1;k>=0;--k)for(var l=this.layout_.points[k],m=0;m<l.length;++m)f=l[m],Dygraph.isValidPoint(f)&&(d=f.canvasx-a,e=f.canvasy-b,c=d*d+e*e,j>c&&(j=c,g=f,h=k,i=f.idx));var n=this.layout_.setNames[h];return{"row":i,"seriesName":n,"point":g}},Dygraph.prototype.findStackedPoint=function(a,b){for(var c,d,e=this.findClosestRow(a),f=0;f<this.layout_.points.length;++f){var g=this.getLeftBoundary_(f),h=e-g,i=this.layout_.points[f];if(!(h>=i.length)){var j=i[h];if(Dygraph.isValidPoint(j)){var k=j.canvasy;if(a>j.canvasx&&h+1<i.length){var l=i[h+1];if(Dygraph.isValidPoint(l)){var m=l.canvasx-j.canvasx;if(m>0){var n=(a-j.canvasx)/m;k+=n*(l.canvasy-j.canvasy)}}}else if(a<j.canvasx&&h>0){var o=i[h-1];if(Dygraph.isValidPoint(o)){var m=j.canvasx-o.canvasx;if(m>0){var n=(j.canvasx-a)/m;k+=n*(o.canvasy-j.canvasy)}}}(0===f||b>k)&&(c=j,d=f)}}}var p=this.layout_.setNames[d];return{"row":e,"seriesName":p,"point":c}},Dygraph.prototype.mouseMove_=function(a){var b=this.layout_.points;if(void 0!==b&&null!==b){var c=this.eventToDomCoords(a),d=c[0],e=c[1],f=this.attr_("highlightSeriesOpts"),g=!1;if(f&&!this.isSeriesLocked()){var h;h=this.attr_("stackedGraph")?this.findStackedPoint(d,e):this.findClosestPoint(d,e),g=this.setSelection(h.row,h.seriesName)}else{var i=this.findClosestRow(d);g=this.setSelection(i)}var j=this.attr_("highlightCallback");j&&g&&j(a,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},Dygraph.prototype.getLeftBoundary_=function(a){if(this.boundaryIds_[a])return this.boundaryIds_[a][0];for(var b=0;b<this.boundaryIds_.length;b++)if(void 0!==this.boundaryIds_[b])return this.boundaryIds_[b][0];return 0},Dygraph.prototype.animateSelection_=function(a){var b=10,c=30;void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var d=this.fadeLevel,e=0>a?d:b-d;if(0>=e)return void(this.fadeLevel&&this.updateSelection_(1));var f=++this.animateId,g=this;Dygraph.repeatAndCleanup(function(c){g.animateId==f&&(g.fadeLevel+=a,0===g.fadeLevel?g.clearSelection():g.updateSelection_(g.fadeLevel/b))},e,c,function(){})},Dygraph.prototype.updateSelection_=function(a){this.cascadeEvents_("select",{"selectedX":this.lastx_,"selectedPoints":this.selPoints_});var b,c=this.canvas_ctx_;if(this.attr_("highlightSeriesOpts")){c.clearRect(0,0,this.width_,this.height_);var d=1-this.attr_("highlightSeriesBackgroundAlpha");if(d){var e=!0;if(e){if(void 0===a)return void this.animateSelection_(1);d*=a}c.fillStyle="rgba(255,255,255,"+d+")",c.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,c)}else if(this.previousVerticalX_>=0){var f=0,g=this.attr_("labels");for(b=1;b<g.length;b++){var h=this.attr_("highlightCircleSize",g[b]);h>f&&(f=h)}var i=this.previousVerticalX_;c.clearRect(i-f-1,0,2*f+2,this.height_)}if(this.isUsingExcanvas_&&this.currentZoomRectArgs_&&Dygraph.prototype.drawZoomRect_.apply(this,this.currentZoomRectArgs_),this.selPoints_.length>0){var j=this.selPoints_[0].canvasx;for(c.save(),b=0;b<this.selPoints_.length;b++){var k=this.selPoints_[b];if(Dygraph.isOK(k.canvasy)){var l=this.attr_("highlightCircleSize",k.name),m=this.attr_("drawHighlightPointCallback",k.name),n=this.plotter_.colors[k.name];m||(m=Dygraph.Circles.DEFAULT),c.lineWidth=this.attr_("strokeWidth",k.name),c.strokeStyle=n,c.fillStyle=n,m(this.g,k.name,c,j,k.canvasy,n,l,k.idx)}}c.restore(),this.previousVerticalX_=j}},Dygraph.prototype.setSelection=function(a,b,c){this.selPoints_=[];var d=!1;if(a!==!1&&a>=0){a!=this.lastRow_&&(d=!0),this.lastRow_=a;for(var e=0;e<this.layout_.points.length;++e){var f=this.layout_.points[e],g=a-this.getLeftBoundary_(e);if(g<f.length){var h=f[g];null!==h.yval&&this.selPoints_.push(h)}}}else this.lastRow_>=0&&(d=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==b&&(this.highlightSet_!==b&&(d=!0),this.highlightSet_=b),void 0!==c&&(this.lockedSet_=c),d&&this.updateSelection_(void 0),d},Dygraph.prototype.mouseOut_=function(a){this.attr_("unhighlightCallback")&&this.attr_("unhighlightCallback")(a),this.attr_("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},Dygraph.prototype.clearSelection=function(){return this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?void this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,void(this.highlightSet_=null))},Dygraph.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var a=0;a<this.layout_.points.length;a++)for(var b=this.layout_.points[a],c=0;c<b.length;c++)if(b[c].x==this.selPoints_[0].x)return b[c].idx;return-1},Dygraph.prototype.getHighlightSeries=function(){return this.highlightSet_},Dygraph.prototype.isSeriesLocked=function(){return this.lockedSet_},Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a),this.predraw_()},Dygraph.prototype.addXTicks_=function(){var a;a=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var b=this.optionsViewForAxis_("x"),c=b("ticker")(a[0],a[1],this.width_,b,this);this.layout_.setXTicks(c)},Dygraph.prototype.extremeValues_=function(a){var b,c,d=null,e=null,f=this.attr_("errorBars")||this.attr_("customBars");if(f){for(b=0;b<a.length;b++)if(c=a[b][1][0],null!==c&&!isNaN(c)){var g=c-a[b][1][1],h=c+a[b][1][2];g>c&&(g=c),c>h&&(h=c),(null===e||h>e)&&(e=h),(null===d||d>g)&&(d=g)}}else for(b=0;b<a.length;b++)c=a[b][1],null===c||isNaN(c)||((null===e||c>e)&&(e=c),(null===d||d>c)&&(d=c));return[d,e]},Dygraph.prototype.predraw_=function(){var a=new Date;this.layout_.computePlotArea(),this.computeYAxes_(),this.plotter_&&(this.cascadeEvents_("clearChart"),this.plotter_.clear()),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_("predraw"),this.rolledSeries_=[null];for(var b=1;b<this.numColumns();b++){var c=this.attr_("logscale"),d=this.extractSeries_(this.rawData_,b,c);d=this.rollingAverage(d,this.rollPeriod_),this.rolledSeries_.push(d)}this.drawGraph_();var e=new Date;this.drawingTimeMs_=e-a},Dygraph.PointType=void 0,Dygraph.seriesToPoints_=function(a,b,c,d){for(var e=[],f=0;f<a.length;++f){var g=a[f],h=b?g[1][0]:g[1],i=null===h?null:DygraphLayout.parseFloat_(h),j={"x":NaN,"y":NaN,"xval":DygraphLayout.parseFloat_(g[0]),"yval":i,"name":c,"idx":f+d};b&&(j.y_top=NaN,j.y_bottom=NaN,j.yval_minus=DygraphLayout.parseFloat_(g[1][1]),j.yval_plus=DygraphLayout.parseFloat_(g[1][2])),e.push(j)}return e},Dygraph.stackPoints_=function(a,b,c,d){for(var e=null,f=null,g=null,h=-1,i=function(b){if(!(h>=b))for(var c=b;c<a.length;++c)if(g=null,!isNaN(a[c].yval)&&null!==a[c].yval){h=c,g=a[c];break}},j=0;j<a.length;++j){var k=a[j],l=k.xval;void 0===b[l]&&(b[l]=0);var m=k.yval;isNaN(m)||null===m?(i(j),m=f&&g&&"none"!=d?f.yval+(g.yval-f.yval)*((l-f.xval)/(g.xval-f.xval)):f&&"all"==d?f.yval:g&&"all"==d?g.yval:0):f=k;var n=b[l];e!=l&&(n+=m,b[l]=n),e=l,k.yval_stacked=n,n>c[1]&&(c[1]=n),n<c[0]&&(c[0]=n)}},Dygraph.prototype.gatherDatasets_=function(a,b){var c,d,e,f=[],g=[],h=[],i={},j=this.attr_("errorBars"),k=this.attr_("customBars"),l=j||k,m=function(a){return l?k?null===a[1][1]:j?null===a[1][0]:!1:null===a[1]},n=a.length-1;for(c=n;c>=1;c--)if(this.visibility()[c-1]){if(b){e=a[c];var o=b[0],p=b[1],q=null,r=null;for(d=0;d<e.length;d++)e[d][0]>=o&&null===q&&(q=d),e[d][0]<=p&&(r=d);null===q&&(q=0);for(var s=q,t=!0;t&&s>0;)s--,t=m(e[s]);null===r&&(r=e.length-1);var u=r;for(t=!0;t&&u<e.length-1;)u++,t=m(e[u]);s!==q&&(q=s),u!==r&&(r=u),f[c-1]=[q,r],e=e.slice(q,r+1)}else e=a[c],f[c-1]=[0,e.length-1];var v=this.attr_("labels")[c],w=this.extremeValues_(e),x=Dygraph.seriesToPoints_(e,l,v,f[c-1][0]);this.attr_("stackedGraph")&&Dygraph.stackPoints_(x,h,w,this.attr_("stackedGraphNaNFill")),i[v]=w,g[c]=x}return{"points":g,"extremes":i,"boundaryIds":f}},Dygraph.prototype.drawGraph_=function(){var a=new Date,b=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.attr_("highlightCircleSize");var c=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),d=c.points,e=c.extremes;this.boundaryIds_=c.boundaryIds,this.setIndexByName_={};var f=this.attr_("labels");f.length>0&&(this.setIndexByName_[f[0]]=0);for(var g=0,h=1;h<d.length;h++)this.setIndexByName_[f[h]]=h,this.visibility()[h-1]&&(this.layout_.addDataset(f[h],d[h]),this.datasetIndex_[h]=g++);this.computeYAxisRanges_(e),this.layout_.setYAxes(this.axes_),this.addXTicks_();var i=this.zoomed_x_;if(this.zoomed_x_=i,this.layout_.evaluate(),this.renderGraph_(b),this.attr_("timingName")){var j=new Date;Dygraph.info(this.attr_("timingName")+" - drawGraph: "+(j-a)+"ms")}},Dygraph.prototype.renderGraph_=function(a){this.cascadeEvents_("clearChart"),this.plotter_.clear(),this.attr_("underlayCallback")&&this.attr_("underlayCallback")(this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var b={"canvas":this.hidden_,"drawingContext":this.hidden_ctx_};if(this.cascadeEvents_("willDrawChart",b),this.plotter_.render(),this.cascadeEvents_("didDrawChart",b),this.lastRow_=-1,this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height),null!==this.attr_("drawCallback")&&this.attr_("drawCallback")(this,a),a)for(this.readyFired_=!0;this.readyFns_.length>0;){var c=this.readyFns_.pop();c(this)}},Dygraph.prototype.computeYAxes_=function(){var a,b,c,d,e;if(void 0!==this.axes_&&this.user_attrs_.hasOwnProperty("valueRange")===!1)for(a=[],c=0;c<this.axes_.length;c++)a.push(this.axes_[c].valueWindow);for(this.axes_=[],b=0;b<this.attributes_.numAxes();b++)d={"g":this},Dygraph.update(d,this.attributes_.axisOptions(b)),this.axes_[b]=d;if(e=this.attr_("valueRange"),e&&(this.axes_[0].valueRange=e),void 0!==a){var f=Math.min(a.length,this.axes_.length);for(c=0;f>c;c++)this.axes_[c].valueWindow=a[c]}for(b=0;b<this.axes_.length;b++)if(0===b)d=this.optionsViewForAxis_("y"+(b?"2":"")),e=d("valueRange"),e&&(this.axes_[b].valueRange=e);else{var g=this.user_attrs_.axes;g&&g.y2&&(e=g.y2.valueRange,e&&(this.axes_[b].valueRange=e))}},Dygraph.prototype.numAxes=function(){return this.attributes_.numAxes()},Dygraph.prototype.axisPropertiesForSeries=function(a){return this.axes_[this.attributes_.axisForSeries(a)]},Dygraph.prototype.computeYAxisRanges_=function(a){for(var b,c,d,e,f,g=function(a){return isNaN(parseFloat(a))},h=this.attributes_.numAxes(),i=0;h>i;i++){var j=this.axes_[i],k=this.attributes_.getForAxis("logscale",i),l=this.attributes_.getForAxis("includeZero",i),m=this.attributes_.getForAxis("independentTicks",i);if(d=this.attributes_.seriesForAxis(i),b=!0,e=.1,null!==this.attr_("yRangePad")&&(b=!1,e=this.attr_("yRangePad")/this.plotter_.area.h),0===d.length)j.extremeRange=[0,1];else{for(var n,o,p=1/0,q=-(1/0),r=0;r<d.length;r++)a.hasOwnProperty(d[r])&&(n=a[d[r]][0],null!==n&&(p=Math.min(n,p)),o=a[d[r]][1],null!==o&&(q=Math.max(o,q)));l&&!k&&(p>0&&(p=0),0>q&&(q=0)),p==1/0&&(p=0),q==-(1/0)&&(q=1),c=q-p,0===c&&(0!==q?c=Math.abs(q):(q=1,c=1));var s,t;if(k)if(b)s=q+e*c,t=p;else{var u=Math.exp(Math.log(c)*e);s=q*u,t=p/u}else s=q+e*c,t=p-e*c,b&&!this.attr_("avoidMinZero")&&(0>t&&p>=0&&(t=0),s>0&&0>=q&&(s=0));j.extremeRange=[t,s]}if(j.valueWindow)j.computedValueRange=[j.valueWindow[0],j.valueWindow[1]];else if(j.valueRange){var v=g(j.valueRange[0])?j.extremeRange[0]:j.valueRange[0],w=g(j.valueRange[1])?j.extremeRange[1]:j.valueRange[1];if(!b)if(j.logscale){var u=Math.exp(Math.log(c)*e);v*=u,w/=u}else c=w-v,v-=c*e,w+=c*e;j.computedValueRange=[v,w]}else j.computedValueRange=j.extremeRange;if(m){j.independentTicks=m;var x=this.optionsViewForAxis_("y"+(i?"2":"")),y=x("ticker");j.ticks=y(j.computedValueRange[0],j.computedValueRange[1],this.height_,x,this),f||(f=j)}}if(void 0===f)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(var i=0;h>i;i++){var j=this.axes_[i];if(!j.independentTicks){for(var x=this.optionsViewForAxis_("y"+(i?"2":"")),y=x("ticker"),z=f.ticks,A=f.computedValueRange[1]-f.computedValueRange[0],B=j.computedValueRange[1]-j.computedValueRange[0],C=[],D=0;D<z.length;D++){var E=(z[D].v-f.computedValueRange[0])/A,F=j.computedValueRange[0]+E*B;C.push(F)}j.ticks=y(j.computedValueRange[0],j.computedValueRange[1],this.height_,x,this,C)}}},Dygraph.prototype.extractSeries_=function(a,b,c){for(var d=[],e=this.attr_("errorBars"),f=this.attr_("customBars"),g=0;g<a.length;g++){var h=a[g][0],i=a[g][b];if(c)if(e||f){for(var j=0;j<i.length;j++)if(i[j]<=0){i=null;break}}else 0>=i&&(i=null);null!==i?d.push([h,i]):d.push([h,e?[null,null]:f?[null,null,null]:i])}return d},Dygraph.prototype.rollingAverage=function(a,b){b=Math.min(b,a.length);var c,d,e,f,g,h,i,j,k=[],l=this.attr_("sigma");if(this.fractions_){var m=0,n=0,o=100;for(e=0;e<a.length;e++){m+=a[e][1][0],n+=a[e][1][1],e-b>=0&&(m-=a[e-b][1][0],n-=a[e-b][1][1]);var p=a[e][0],q=n?m/n:0;if(this.attr_("errorBars"))if(this.attr_("wilsonInterval"))if(n){var r=0>q?0:q,s=n,t=l*Math.sqrt(r*(1-r)/s+l*l/(4*s*s)),u=1+l*l/n;c=(r+l*l/(2*n)-t)/u,d=(r+l*l/(2*n)+t)/u,k[e]=[p,[r*o,(r-c)*o,(d-r)*o]]}else k[e]=[p,[0,0,0]];else j=n?l*Math.sqrt(q*(1-q)/n):1,k[e]=[p,[o*q,o*j,o*j]];else k[e]=[p,o*q]}}else if(this.attr_("customBars")){c=0;var v=0;d=0;var w=0;for(e=0;e<a.length;e++){var x=a[e][1];if(g=x[1],k[e]=[a[e][0],[g,g-x[0],x[2]-g]],null===g||isNaN(g)||(c+=x[0],v+=g,d+=x[2],w+=1),e-b>=0){var y=a[e-b];null===y[1][1]||isNaN(y[1][1])||(c-=y[1][0],v-=y[1][1],d-=y[1][2],w-=1)}w?k[e]=[a[e][0],[1*v/w,1*(v-c)/w,1*(d-v)/w]]:k[e]=[a[e][0],[null,null,null]]}}else if(this.attr_("errorBars"))for(e=0;e<a.length;e++){
  h=0;var z=0;for(i=0,f=Math.max(0,e-b+1);e+1>f;f++)g=a[f][1][0],null===g||isNaN(g)||(i++,h+=a[f][1][0],z+=Math.pow(a[f][1][1],2));if(i)j=Math.sqrt(z)/i,k[e]=[a[e][0],[h/i,l*j,l*j]];else{var A=1==b?a[e][1][0]:null;k[e]=[a[e][0],[A,A,A]]}}else{if(1==b)return a;for(e=0;e<a.length;e++){for(h=0,i=0,f=Math.max(0,e-b+1);e+1>f;f++)g=a[f][1],null===g||isNaN(g)||(i++,h+=a[f][1]);i?k[e]=[a[e][0],h/i]:k[e]=[a[e][0],null]}}return k},Dygraph.prototype.detectTypeFromString_=function(a){var b=!1,c=a.indexOf("-");c>0&&"e"!=a[c-1]&&"E"!=a[c-1]||a.indexOf("/")>=0||isNaN(parseFloat(a))?b=!0:8==a.length&&a>"19700101"&&"20371231">a&&(b=!0),this.setXAxisOptions_(b)},Dygraph.prototype.setXAxisOptions_=function(a){a?(this.attrs_.xValueParser=Dygraph.dateParser,this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter):(this.attrs_.xValueParser=function(a){return parseFloat(a)},this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},Dygraph.prototype.parseFloat_=function(a,b,c){var d=parseFloat(a);if(!isNaN(d))return d;if(/^ *$/.test(a))return null;if(/^ *nan *$/i.test(a))return NaN;var e="Unable to parse '"+a+"' as a number";return null!==c&&null!==b&&(e+=" on line "+(1+b)+" ('"+c+"') of CSV."),this.error(e),null},Dygraph.prototype.parseCSV_=function(a){var b,c,d=[],e=Dygraph.detectLineDelimiter(a),f=a.split(e||"\n"),g=this.attr_("delimiter");-1==f[0].indexOf(g)&&f[0].indexOf("	")>=0&&(g="	");var h=0;"labels"in this.user_attrs_||(h=1,this.attrs_.labels=f[0].split(g),this.attributes_.reparseSeries());for(var i,j=0,k=!1,l=this.attr_("labels").length,m=!1,n=h;n<f.length;n++){var o=f[n];if(j=n,0!==o.length&&"#"!=o[0]){var p=o.split(g);if(!(p.length<2)){var q=[];if(k||(this.detectTypeFromString_(p[0]),i=this.attr_("xValueParser"),k=!0),q[0]=i(p[0],this),this.fractions_)for(c=1;c<p.length;c++)b=p[c].split("/"),2!=b.length?(this.error('Expected fractional "num/den" values in CSV data but found a value \''+p[c]+"' on line "+(1+n)+" ('"+o+"') which is not of this form."),q[c]=[0,0]):q[c]=[this.parseFloat_(b[0],n,o),this.parseFloat_(b[1],n,o)];else if(this.attr_("errorBars"))for(p.length%2!=1&&this.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+n)+" has an odd number of values ("+(p.length-1)+"): '"+o+"'"),c=1;c<p.length;c+=2)q[(c+1)/2]=[this.parseFloat_(p[c],n,o),this.parseFloat_(p[c+1],n,o)];else if(this.attr_("customBars"))for(c=1;c<p.length;c++){var r=p[c];/^ *$/.test(r)?q[c]=[null,null,null]:(b=r.split(";"),3==b.length?q[c]=[this.parseFloat_(b[0],n,o),this.parseFloat_(b[1],n,o),this.parseFloat_(b[2],n,o)]:this.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+r+'" on line '+(1+n)))}else for(c=1;c<p.length;c++)q[c]=this.parseFloat_(p[c],n,o);if(d.length>0&&q[0]<d[d.length-1][0]&&(m=!0),q.length!=l&&this.error("Number of columns in line "+n+" ("+q.length+") does not agree with number of labels ("+l+") "+o),0===n&&this.attr_("labels")){var s=!0;for(c=0;s&&c<q.length;c++)q[c]&&(s=!1);if(s){this.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+o+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}d.push(q)}}}return m&&(this.warn("CSV is out of order; order it correctly to speed loading."),d.sort(function(a,b){return a[0]-b[0]})),d},Dygraph.prototype.parseArray_=function(a){if(0===a.length)return this.error("Can't plot empty data set"),null;if(0===a[0].length)return this.error("Data set cannot contain an empty row"),null;var b;if(null===this.attr_("labels")){for(this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter"),this.attrs_.labels=["X"],b=1;b<a[0].length;b++)this.attrs_.labels.push("Y"+b);this.attributes_.reparseSeries()}else{var c=this.attr_("labels");if(c.length!=a[0].length)return this.error("Mismatch between number of labels ("+c+") and number of columns in array ("+a[0].length+")"),null}if(Dygraph.isDateLike(a[0][0])){this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;var d=Dygraph.clone(a);for(b=0;b<a.length;b++){if(0===d[b].length)return this.error("Row "+(1+b)+" of data is empty"),null;if(null===d[b][0]||"function"!=typeof d[b][0].getTime||isNaN(d[b][0].getTime()))return this.error("x value in row "+(1+b)+" is not a Date"),null;d[b][0]=d[b][0].getTime()}return d}return this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=Dygraph.numberAxisLabelFormatter,a},Dygraph.prototype.parseDataTable_=function(a){var b=function(a){var b=String.fromCharCode(65+a%26);for(a=Math.floor(a/26);a>0;)b=String.fromCharCode(65+(a-1)%26)+b.toLowerCase(),a=Math.floor((a-1)/26);return b},c=a.getNumberOfColumns(),d=a.getNumberOfRows(),e=a.getColumnType(0);if("date"==e||"datetime"==e)this.attrs_.xValueParser=Dygraph.dateParser,this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;else{if("number"!=e)return this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+e+"')"),null;this.attrs_.xValueParser=function(a){return parseFloat(a)},this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var f,g,h=[],i={},j=!1;for(f=1;c>f;f++){var k=a.getColumnType(f);if("number"==k)h.push(f);else if("string"==k&&this.attr_("displayAnnotations")){var l=h[h.length-1];i.hasOwnProperty(l)?i[l].push(f):i[l]=[f],j=!0}else this.error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true")}var m=[a.getColumnLabel(0)];for(f=0;f<h.length;f++)m.push(a.getColumnLabel(h[f])),this.attr_("errorBars")&&(f+=1);this.attrs_.labels=m,c=m.length;var n=[],o=!1,p=[];for(f=0;d>f;f++){var q=[];if("undefined"!=typeof a.getValue(f,0)&&null!==a.getValue(f,0)){if("date"==e||"datetime"==e?q.push(a.getValue(f,0).getTime()):q.push(a.getValue(f,0)),this.attr_("errorBars"))for(g=0;c-1>g;g++)q.push([a.getValue(f,1+2*g),a.getValue(f,2+2*g)]);else{for(g=0;g<h.length;g++){var r=h[g];if(q.push(a.getValue(f,r)),j&&i.hasOwnProperty(r)&&null!==a.getValue(f,i[r][0])){var s={};s.series=a.getColumnLabel(r),s.xval=q[0],s.shortText=b(p.length),s.text="";for(var t=0;t<i[r].length;t++)t&&(s.text+="\n"),s.text+=a.getValue(f,i[r][t]);p.push(s)}}for(g=0;g<q.length;g++)isFinite(q[g])||(q[g]=null)}n.length>0&&q[0]<n[n.length-1][0]&&(o=!0),n.push(q)}else this.warn("Ignoring row "+f+" of DataTable because of undefined or null first column.")}o&&(this.warn("DataTable is out of order; order it correctly to speed loading."),n.sort(function(a,b){return a[0]-b[0]})),this.rawData_=n,p.length>0&&this.setAnnotations(p,!0),this.attributes_.reparseSeries()},Dygraph.prototype.start_=function(){var a=this.file_;if("function"==typeof a&&(a=a()),Dygraph.isArrayLike(a))this.rawData_=this.parseArray_(a),this.predraw_();else if("object"==typeof a&&"function"==typeof a.getColumnRange)this.parseDataTable_(a),this.predraw_();else if("string"==typeof a){var b=Dygraph.detectLineDelimiter(a);if(b)this.loadedEvent_(a);else{var c;c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var d=this;c.onreadystatechange=function(){4==c.readyState&&(200===c.status||0===c.status)&&d.loadedEvent_(c.responseText)},c.open("GET",a,!0),c.send(null)}}else this.error("Unknown data format: "+typeof a)},Dygraph.prototype.updateOptions=function(a,b){"undefined"==typeof b&&(b=!1);var c=a.file,d=Dygraph.mapLegacyOptions_(a);"rollPeriod"in d&&(this.rollPeriod_=d.rollPeriod),"dateWindow"in d&&(this.dateWindow_=d.dateWindow,"isZoomedIgnoreProgrammaticZoom"in d||(this.zoomed_x_=null!==d.dateWindow)),"valueRange"in d&&!("isZoomedIgnoreProgrammaticZoom"in d)&&(this.zoomed_y_=null!==d.valueRange);var e=Dygraph.isPixelChangingOptionList(this.attr_("labels"),d);Dygraph.updateDeep(this.user_attrs_,d),this.attributes_.reparseSeries(),c?(this.file_=c,b||this.start_()):b||(e?this.predraw_():this.renderGraph_(!1))},Dygraph.mapLegacyOptions_=function(a){var b={};for(var c in a)"file"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);var d=function(a,c,d){b.axes||(b.axes={}),b.axes[a]||(b.axes[a]={}),b.axes[a][c]=d},e=function(c,e,f){"undefined"!=typeof a[c]&&(Dygraph.warn("Option "+c+" is deprecated. Use the "+f+" option for the "+e+" axis instead. (e.g. { axes : { "+e+" : { "+f+" : ... } } } (see http://dygraphs.com/per-axis.html for more information."),d(e,f,a[c]),delete b[c])};return e("xValueFormatter","x","valueFormatter"),e("pixelsPerXLabel","x","pixelsPerLabel"),e("xAxisLabelFormatter","x","axisLabelFormatter"),e("xTicker","x","ticker"),e("yValueFormatter","y","valueFormatter"),e("pixelsPerYLabel","y","pixelsPerLabel"),e("yAxisLabelFormatter","y","axisLabelFormatter"),e("yTicker","y","ticker"),b},Dygraph.prototype.resize=function(a,b){if(!this.resize_lock){this.resize_lock=!0,null===a!=(null===b)&&(this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),a=b=null);var c=this.width_,d=this.height_;a?(this.maindiv_.style.width=a+"px",this.maindiv_.style.height=b+"px",this.width_=a,this.height_=b):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),(c!=this.width_||d!=this.height_)&&(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a,this.predraw_()},Dygraph.prototype.visibility=function(){for(this.attr_("visibility")||(this.attrs_.visibility=[]);this.attr_("visibility").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.attr_("visibility")},Dygraph.prototype.setVisibility=function(a,b){var c=this.visibility();0>a||a>=c.length?this.warn("invalid series number in setVisibility: "+a):(c[a]=b,this.predraw_())},Dygraph.prototype.size=function(){return{"width":this.width_,"height":this.height_}},Dygraph.prototype.setAnnotations=function(a,b){return Dygraph.addAnnotationRule(),this.annotations_=a,this.layout_?(this.layout_.setAnnotations(this.annotations_),void(b||this.predraw_())):void this.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},Dygraph.prototype.annotations=function(){return this.annotations_},Dygraph.prototype.getLabels=function(){var a=this.attr_("labels");return a?a.slice():null},Dygraph.prototype.indexFromSetName=function(a){return this.setIndexByName_[a]},Dygraph.prototype.ready=function(a){this.is_initial_draw_?this.readyFns_.push(a):a(this)},Dygraph.addAnnotationRule=function(){if(!Dygraph.addedAnnotationCSS){var a="border: 1px solid black; background-color: white; text-align: center;",b=document.createElement("style");b.type="text/css",document.getElementsByTagName("head")[0].appendChild(b);for(var c=0;c<document.styleSheets.length;c++)if(!document.styleSheets[c].disabled){var d=document.styleSheets[c];try{if(d.insertRule){var e=d.cssRules?d.cssRules.length:0;d.insertRule(".dygraphDefaultAnnotation { "+a+" }",e)}else d.addRule&&d.addRule(".dygraphDefaultAnnotation",a);return void(Dygraph.addedAnnotationCSS=!0)}catch(f){}}this.warn("Unable to add default annotation CSS rule; display may be off.")}};var DateGraph=Dygraph;Dygraph.LOG_SCALE=10,Dygraph.LN_TEN=Math.log(Dygraph.LOG_SCALE),Dygraph.log10=function(a){return Math.log(a)/Dygraph.LN_TEN},Dygraph.DEBUG=1,Dygraph.INFO=2,Dygraph.WARNING=3,Dygraph.ERROR=3,Dygraph.LOG_STACK_TRACES=!1,Dygraph.DOTTED_LINE=[2,2],Dygraph.DASHED_LINE=[7,3],Dygraph.DOT_DASH_LINE=[7,2,2,2],Dygraph.log=function(a,b){var c;if("undefined"!=typeof printStackTrace)try{for(c=printStackTrace({"guess":!1});-1!=c[0].indexOf("stacktrace");)c.splice(0,1);c.splice(0,2);for(var d=0;d<c.length;d++)c[d]=c[d].replace(/\([^)]*\/(.*)\)/,"@$1").replace(/\@.*\/([^\/]*)/,"@$1").replace("[object Object].","");var e=c.splice(0,1)[0];b+=" ("+e.replace(/^.*@ ?/,"")+")"}catch(f){}if("undefined"!=typeof window.console){var g=window.console,h=function(a,b,c){b&&"function"==typeof b?b.call(a,c):a.log(c)};switch(a){case Dygraph.DEBUG:h(g,g.debug,"dygraphs: "+b);break;case Dygraph.INFO:h(g,g.info,"dygraphs: "+b);break;case Dygraph.WARNING:h(g,g.warn,"dygraphs: "+b);break;case Dygraph.ERROR:h(g,g.error,"dygraphs: "+b)}}Dygraph.LOG_STACK_TRACES&&window.console.log(c.join("\n"))},Dygraph.info=function(a){Dygraph.log(Dygraph.INFO,a)},Dygraph.prototype.info=Dygraph.info,Dygraph.warn=function(a){Dygraph.log(Dygraph.WARNING,a)},Dygraph.prototype.warn=Dygraph.warn,Dygraph.error=function(a){Dygraph.log(Dygraph.ERROR,a)},Dygraph.prototype.error=Dygraph.error,Dygraph.getContext=function(a){return a.getContext("2d")},Dygraph.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a[b+c]=function(){c(window.event)},a.attachEvent("on"+b,a[b+c]))},Dygraph.prototype.addAndTrackEvent=function(a,b,c){Dygraph.addEvent(a,b,c),this.registeredEvents_.push({"elem":a,"type":b,"fn":c})},Dygraph.removeEvent=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else{try{a.detachEvent("on"+b,a[b+c])}catch(d){}a[b+c]=null}},Dygraph.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var a=0;a<this.registeredEvents_.length;a++){var b=this.registeredEvents_[a];Dygraph.removeEvent(b.elem,b.type,b.fn)}this.registeredEvents_=[]},Dygraph.cancelEvent=function(a){return a=a?a:window.event,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.cancel=!0,a.returnValue=!1,!1},Dygraph.hsvToRGB=function(a,b,c){var d,e,f;if(0===b)d=c,e=c,f=c;else{var g=Math.floor(6*a),h=6*a-g,i=c*(1-b),j=c*(1-b*h),k=c*(1-b*(1-h));switch(g){case 1:d=j,e=c,f=i;break;case 2:d=i,e=c,f=k;break;case 3:d=i,e=j,f=c;break;case 4:d=k,e=i,f=c;break;case 5:d=c,e=i,f=j;break;case 6:case 0:d=c,e=k,f=i}}return d=Math.floor(255*d+.5),e=Math.floor(255*e+.5),f=Math.floor(255*f+.5),"rgb("+d+","+e+","+f+")"},Dygraph.findPosX=function(a){var b=0;if(a.offsetParent)for(var c=a;;){var d="0";if(window.getComputedStyle&&(d=window.getComputedStyle(c,null).borderLeft||"0"),b+=parseInt(d,10),b+=c.offsetLeft,!c.offsetParent)break;c=c.offsetParent}else a.x&&(b+=a.x);for(;a&&a!=document.body;)b-=a.scrollLeft,a=a.parentNode;return b},Dygraph.findPosY=function(a){var b=0;if(a.offsetParent)for(var c=a;;){var d="0";if(window.getComputedStyle&&(d=window.getComputedStyle(c,null).borderTop||"0"),b+=parseInt(d,10),b+=c.offsetTop,!c.offsetParent)break;c=c.offsetParent}else a.y&&(b+=a.y);for(;a&&a!=document.body;)b-=a.scrollTop,a=a.parentNode;return b},Dygraph.pageX=function(a){if(a.pageX)return!a.pageX||a.pageX<0?0:a.pageX;var b=document.documentElement,c=document.body;return a.clientX+(b.scrollLeft||c.scrollLeft)-(b.clientLeft||0)},Dygraph.pageY=function(a){if(a.pageY)return!a.pageY||a.pageY<0?0:a.pageY;var b=document.documentElement,c=document.body;return a.clientY+(b.scrollTop||c.scrollTop)-(b.clientTop||0)},Dygraph.isOK=function(a){return!!a&&!isNaN(a)},Dygraph.isValidPoint=function(a,b){return a?null===a.yval?!1:null===a.x||void 0===a.x?!1:null===a.y||void 0===a.y?!1:isNaN(a.x)||!b&&isNaN(a.y)?!1:!0:!1},Dygraph.floatFormat=function(a,b){var c=Math.min(Math.max(1,b||2),21);return Math.abs(a)<.001&&0!==a?a.toExponential(c-1):a.toPrecision(c)},Dygraph.zeropad=function(a){return 10>a?"0"+a:""+a},Dygraph.hmsString_=function(a){var b=Dygraph.zeropad,c=new Date(a);return c.getSeconds()?b(c.getHours())+":"+b(c.getMinutes())+":"+b(c.getSeconds()):b(c.getHours())+":"+b(c.getMinutes())},Dygraph.round_=function(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c},Dygraph.binarySearch=function(a,b,c,d,e){if((null===d||void 0===d||null===e||void 0===e)&&(d=0,e=b.length-1),d>e)return-1;(null===c||void 0===c)&&(c=0);var f,g=function(a){return a>=0&&a<b.length},h=parseInt((d+e)/2,10),i=b[h];return i==a?h:i>a?c>0&&(f=h-1,g(f)&&b[f]<a)?h:Dygraph.binarySearch(a,b,c,d,h-1):a>i?0>c&&(f=h+1,g(f)&&b[f]>a)?h:Dygraph.binarySearch(a,b,c,h+1,e):-1},Dygraph.dateParser=function(a){var b,c;if((-1==a.search("-")||-1!=a.search("T")||-1!=a.search("Z"))&&(c=Dygraph.dateStrToMillis(a),c&&!isNaN(c)))return c;if(-1!=a.search("-")){for(b=a.replace("-","/","g");-1!=b.search("-");)b=b.replace("-","/");c=Dygraph.dateStrToMillis(b)}else 8==a.length?(b=a.substr(0,4)+"/"+a.substr(4,2)+"/"+a.substr(6,2),c=Dygraph.dateStrToMillis(b)):c=Dygraph.dateStrToMillis(a);return(!c||isNaN(c))&&Dygraph.error("Couldn't parse "+a+" as a date"),c},Dygraph.dateStrToMillis=function(a){return new Date(a).getTime()},Dygraph.update=function(a,b){if("undefined"!=typeof b&&null!==b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},Dygraph.updateDeep=function(a,b){function c(a){return"object"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName}if("undefined"!=typeof b&&null!==b)for(var d in b)b.hasOwnProperty(d)&&(null===b[d]?a[d]=null:Dygraph.isArrayLike(b[d])?a[d]=b[d].slice():c(b[d])?a[d]=b[d]:"object"==typeof b[d]?(("object"!=typeof a[d]||null===a[d])&&(a[d]={}),Dygraph.updateDeep(a[d],b[d])):a[d]=b[d]);return a},Dygraph.isArrayLike=function(a){var b=typeof a;return"object"!=b&&("function"!=b||"function"!=typeof a.item)||null===a||"number"!=typeof a.length||3===a.nodeType?!1:!0},Dygraph.isDateLike=function(a){return"object"!=typeof a||null===a||"function"!=typeof a.getTime?!1:!0},Dygraph.clone=function(a){for(var b=[],c=0;c<a.length;c++)Dygraph.isArrayLike(a[c])?b.push(Dygraph.clone(a[c])):b.push(a[c]);return b},Dygraph.createCanvas=function(){var a=document.createElement("canvas"),b=/MSIE/.test(navigator.userAgent)&&!window.opera;return b&&"undefined"!=typeof G_vmlCanvasManager&&(a=G_vmlCanvasManager.initElement(a)),a},Dygraph.isAndroid=function(){return/Android/.test(navigator.userAgent)},Dygraph.Iterator=function(a,b,c,d){b=b||0,c=c||a.length,this.hasNext=!0,this.peek=null,this.start_=b,this.array_=a,this.predicate_=d,this.end_=Math.min(a.length,b+c),this.nextIdx_=b-1,this.next()},Dygraph.Iterator.prototype.next=function(){if(!this.hasNext)return null;for(var a=this.peek,b=this.nextIdx_+1,c=!1;b<this.end_;){if(!this.predicate_||this.predicate_(this.array_,b)){this.peek=this.array_[b],c=!0;break}b++}return this.nextIdx_=b,c||(this.hasNext=!1,this.peek=null),a},Dygraph.createIterator=function(a,b,c,d){return new Dygraph.Iterator(a,b,c,d)},Dygraph.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),Dygraph.repeatAndCleanup=function(a,b,c,d){var e,f=0,g=(new Date).getTime();if(a(f),1==b)return void d();var h=b-1;!function i(){f>=b||Dygraph.requestAnimFrame.call(window,function(){var b=(new Date).getTime(),j=b-g;e=f,f=Math.floor(j/c);var k=f-e,l=f+k>h;l||f>=h?(a(h),d()):(0!==k&&a(f),i())})}()},Dygraph.isPixelChangingOptionList=function(a,b){var c={"annotationClickHandler":!0,"annotationDblClickHandler":!0,"annotationMouseOutHandler":!0,"annotationMouseOverHandler":!0,"axisLabelColor":!0,"axisLineColor":!0,"axisLineWidth":!0,"clickCallback":!0,"digitsAfterDecimal":!0,"drawCallback":!0,"drawHighlightPointCallback":!0,"drawPoints":!0,"drawPointCallback":!0,"drawXGrid":!0,"drawYGrid":!0,"fillAlpha":!0,"gridLineColor":!0,"gridLineWidth":!0,"hideOverlayOnMouseOut":!0,"highlightCallback":!0,"highlightCircleSize":!0,"interactionModel":!0,"isZoomedIgnoreProgrammaticZoom":!0,"labelsDiv":!0,"labelsDivStyles":!0,"labelsDivWidth":!0,"labelsKMB":!0,"labelsKMG2":!0,"labelsSeparateLines":!0,"labelsShowZeroValues":!0,"legend":!0,"maxNumberWidth":!0,"panEdgeFraction":!0,"pixelsPerYLabel":!0,"pointClickCallback":!0,"pointSize":!0,"rangeSelectorPlotFillColor":!0,"rangeSelectorPlotStrokeColor":!0,"showLabelsOnHighlight":!0,"showRoller":!0,"sigFigs":!0,"strokeWidth":!0,"underlayCallback":!0,"unhighlightCallback":!0,"xAxisLabelFormatter":!0,"xTicker":!0,"xValueFormatter":!0,"yAxisLabelFormatter":!0,"yValueFormatter":!0,"zoomCallback":!0},d=!1,e={};if(a)for(var f=1;f<a.length;f++)e[a[f]]=!0;for(var g in b){if(d)break;if(b.hasOwnProperty(g))if(e[g])for(var h in b[g]){if(d)break;b[g].hasOwnProperty(h)&&!c[h]&&(d=!0)}else c[g]||(d=!0)}return d},Dygraph.compareArrays=function(a,b){if(!Dygraph.isArrayLike(a)||!Dygraph.isArrayLike(b))return!1;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0},Dygraph.regularShape_=function(a,b,c,d,e,f,g){f=f||0,g=g||2*Math.PI/b,a.beginPath();var h=f,i=h,j=function(){var a=d+Math.sin(i)*c,b=e+-Math.cos(i)*c;return[a,b]},k=j(),l=k[0],m=k[1];a.moveTo(l,m);for(var n=0;b>n;n++){i=n==b-1?h:i+g;var o=j();a.lineTo(o[0],o[1])}a.fill(),a.stroke()},Dygraph.shapeFunction_=function(a,b,c){return function(d,e,f,g,h,i,j){f.strokeStyle=i,f.fillStyle="white",Dygraph.regularShape_(f,a,j,g,h,b,c)}},Dygraph.Circles={"DEFAULT":function(a,b,c,d,e,f,g){c.beginPath(),c.fillStyle=f,c.arc(d,e,g,0,2*Math.PI,!1),c.fill()},"TRIANGLE":Dygraph.shapeFunction_(3),"SQUARE":Dygraph.shapeFunction_(4,Math.PI/4),"DIAMOND":Dygraph.shapeFunction_(4),"PENTAGON":Dygraph.shapeFunction_(5),"HEXAGON":Dygraph.shapeFunction_(6),"CIRCLE":function(a,b,c,d,e,f,g){c.beginPath(),c.strokeStyle=f,c.fillStyle="white",c.arc(d,e,g,0,2*Math.PI,!1),c.fill(),c.stroke()},"STAR":Dygraph.shapeFunction_(5,0,4*Math.PI/5),"PLUS":function(a,b,c,d,e,f,g){c.strokeStyle=f,c.beginPath(),c.moveTo(d+g,e),c.lineTo(d-g,e),c.closePath(),c.stroke(),c.beginPath(),c.moveTo(d,e+g),c.lineTo(d,e-g),c.closePath(),c.stroke()},"EX":function(a,b,c,d,e,f,g){c.strokeStyle=f,c.beginPath(),c.moveTo(d+g,e+g),c.lineTo(d-g,e-g),c.closePath(),c.stroke(),c.beginPath(),c.moveTo(d+g,e-g),c.lineTo(d-g,e+g),c.closePath(),c.stroke()}},Dygraph.IFrameTarp=function(){this.tarps=[]},Dygraph.IFrameTarp.prototype.cover=function(){for(var a=document.getElementsByTagName("iframe"),b=0;b<a.length;b++){var c=a[b],d=Dygraph.findPosX(c),e=Dygraph.findPosY(c),f=c.offsetWidth,g=c.offsetHeight,h=document.createElement("div");h.style.position="absolute",h.style.left=d+"px",h.style.top=e+"px",h.style.width=f+"px",h.style.height=g+"px",h.style.zIndex=999,document.body.appendChild(h),this.tarps.push(h)}},Dygraph.IFrameTarp.prototype.uncover=function(){for(var a=0;a<this.tarps.length;a++)this.tarps[a].parentNode.removeChild(this.tarps[a]);this.tarps=[]},Dygraph.detectLineDelimiter=function(a){for(var b=0;b<a.length;b++){var c=a.charAt(b);if("\r"===c)return b+1<a.length&&"\n"===a.charAt(b+1)?"\r\n":c;if("\n"===c)return b+1<a.length&&"\r"===a.charAt(b+1)?"\n\r":c}return null},Dygraph.isNodeContainedBy=function(a,b){if(null===b||null===a)return!1;for(var c=a;c&&c!==b;)c=c.parentNode;return c===b},Dygraph.pow=function(a,b){return 0>b?1/Math.pow(a,-b):Math.pow(a,b)},Dygraph.dateSetters={"ms":Date.prototype.setMilliseconds,"s":Date.prototype.setSeconds,"m":Date.prototype.setMinutes,"h":Date.prototype.setHours},Dygraph.setDateSameTZ=function(a,b){var c=a.getTimezoneOffset();for(var d in b)if(b.hasOwnProperty(d)){var e=Dygraph.dateSetters[d];if(!e)throw"Invalid setter: "+d;e.call(a,b[d]),a.getTimezoneOffset()!=c&&a.setTime(a.getTime()+60*(c-a.getTimezoneOffset())*1e3)}},Dygraph.GVizChart=function(a){this.container=a},Dygraph.GVizChart.prototype.draw=function(a,b){this.container.innerHTML="","undefined"!=typeof this.date_graph&&this.date_graph.destroy(),this.date_graph=new Dygraph(this.container,a,b)},Dygraph.GVizChart.prototype.setSelection=function(a){var b=!1;a.length&&(b=a[0].row),this.date_graph.setSelection(b)},Dygraph.GVizChart.prototype.getSelection=function(){var a=[],b=this.date_graph.getSelection();if(0>b)return a;for(var c=this.date_graph.layout_.points,d=0;d<c.length;++d)a.push({"row":b,"column":d+1});return a},Dygraph.Interaction={},Dygraph.Interaction.startPan=function(a,b,c){var d,e;c.isPanning=!0;var f=b.xAxisRange();if(c.dateRange=f[1]-f[0],c.initialLeftmostDate=f[0],c.xUnitsPerPixel=c.dateRange/(b.plotter_.area.w-1),b.attr_("panEdgeFraction")){var g=b.width_*b.attr_("panEdgeFraction"),h=b.xAxisExtremes(),i=b.toDomXCoord(h[0])-g,j=b.toDomXCoord(h[1])+g,k=b.toDataXCoord(i),l=b.toDataXCoord(j);c.boundedDates=[k,l];var m=[],n=b.height_*b.attr_("panEdgeFraction");for(d=0;d<b.axes_.length;d++){e=b.axes_[d];var o=e.extremeRange,p=b.toDomYCoord(o[0],d)+n,q=b.toDomYCoord(o[1],d)-n,r=b.toDataYCoord(p,d),s=b.toDataYCoord(q,d);m[d]=[r,s]}c.boundedValues=m}for(c.is2DPan=!1,c.axes=[],d=0;d<b.axes_.length;d++){e=b.axes_[d];var t={},u=b.yAxisRange(d),v=b.attributes_.getForAxis("logscale",d);v?(t.initialTopValue=Dygraph.log10(u[1]),t.dragValueRange=Dygraph.log10(u[1])-Dygraph.log10(u[0])):(t.initialTopValue=u[1],t.dragValueRange=u[1]-u[0]),t.unitsPerPixel=t.dragValueRange/(b.plotter_.area.h-1),c.axes.push(t),(e.valueWindow||e.valueRange)&&(c.is2DPan=!0)}},Dygraph.Interaction.movePan=function(a,b,c){c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=c.initialLeftmostDate-(c.dragEndX-c.dragStartX)*c.xUnitsPerPixel;c.boundedDates&&(d=Math.max(d,c.boundedDates[0]));var e=d+c.dateRange;if(c.boundedDates&&e>c.boundedDates[1]&&(d-=e-c.boundedDates[1],e=d+c.dateRange),b.dateWindow_=[d,e],c.is2DPan)for(var f=c.dragEndY-c.dragStartY,g=0;g<b.axes_.length;g++){var h=b.axes_[g],i=c.axes[g],j=f*i.unitsPerPixel,k=c.boundedValues?c.boundedValues[g]:null,l=i.initialTopValue+j;k&&(l=Math.min(l,k[1]));var m=l-i.dragValueRange;k&&m<k[0]&&(l-=m-k[0],m=l-i.dragValueRange);var n=b.attributes_.getForAxis("logscale",g);n?h.valueWindow=[Math.pow(Dygraph.LOG_SCALE,m),Math.pow(Dygraph.LOG_SCALE,l)]:h.valueWindow=[m,l]}b.drawGraph_(!1)},Dygraph.Interaction.endPan=function(a,b,c){c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c),c.isPanning=!1,c.is2DPan=!1,c.initialLeftmostDate=null,c.dateRange=null,c.valueRange=null,c.boundedDates=null,c.boundedValues=null,c.axes=null},Dygraph.Interaction.startZoom=function(a,b,c){c.isZooming=!0,c.zoomMoved=!1},Dygraph.Interaction.moveZoom=function(a,b,c){c.zoomMoved=!0,c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragStartX-c.dragEndX),e=Math.abs(c.dragStartY-c.dragEndY);c.dragDirection=e/2>d?Dygraph.VERTICAL:Dygraph.HORIZONTAL,b.drawZoomRect_(c.dragDirection,c.dragStartX,c.dragEndX,c.dragStartY,c.dragEndY,c.prevDragDirection,c.prevEndX,c.prevEndY),c.prevEndX=c.dragEndX,c.prevEndY=c.dragEndY,c.prevDragDirection=c.dragDirection},Dygraph.Interaction.treatMouseOpAsClick=function(a,b,c){var d=a.attr_("clickCallback"),e=a.attr_("pointClickCallback"),f=null;if(e){for(var g=-1,h=Number.MAX_VALUE,i=0;i<a.selPoints_.length;i++){var j=a.selPoints_[i],k=Math.pow(j.canvasx-c.dragEndX,2)+Math.pow(j.canvasy-c.dragEndY,2);!isNaN(k)&&(-1==g||h>k)&&(h=k,g=i)}var l=a.attr_("highlightCircleSize")+2;l*l>=h&&(f=a.selPoints_[g])}f&&e(b,f),d&&d(b,a.lastx_,a.selPoints_)},Dygraph.Interaction.endZoom=function(a,b,c){c.isZooming=!1,c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c);var f=b.getArea();if(d>=10&&c.dragDirection==Dygraph.HORIZONTAL){var g=Math.min(c.dragStartX,c.dragEndX),h=Math.max(c.dragStartX,c.dragEndX);g=Math.max(g,f.x),h=Math.min(h,f.x+f.w),h>g&&b.doZoomX_(g,h),c.cancelNextDblclick=!0}else if(e>=10&&c.dragDirection==Dygraph.VERTICAL){var i=Math.min(c.dragStartY,c.dragEndY),j=Math.max(c.dragStartY,c.dragEndY);i=Math.max(i,f.y),j=Math.min(j,f.y+f.h),j>i&&b.doZoomY_(i,j),c.cancelNextDblclick=!0}else c.zoomMoved&&b.clearZoomRect_();c.dragStartX=null,c.dragStartY=null},Dygraph.Interaction.startTouch=function(a,b,c){a.preventDefault(),a.touches.length>1&&(c.startTimeForDoubleTapMs=null);for(var d=[],e=0;e<a.touches.length;e++){var f=a.touches[e];d.push({"pageX":f.pageX,"pageY":f.pageY,"dataX":b.toDataXCoord(f.pageX),"dataY":b.toDataYCoord(f.pageY)})}if(c.initialTouches=d,1==d.length)c.initialPinchCenter=d[0],c.touchDirections={"x":!0,"y":!0};else if(d.length>=2){c.initialPinchCenter={"pageX":.5*(d[0].pageX+d[1].pageX),"pageY":.5*(d[0].pageY+d[1].pageY),"dataX":.5*(d[0].dataX+d[1].dataX),"dataY":.5*(d[0].dataY+d[1].dataY)};var g=180/Math.PI*Math.atan2(c.initialPinchCenter.pageY-d[0].pageY,d[0].pageX-c.initialPinchCenter.pageX);g=Math.abs(g),g>90&&(g=90-g),c.touchDirections={"x":67.5>g,"y":g>22.5}}c.initialRange={"x":b.xAxisRange(),"y":b.yAxisRange()}},Dygraph.Interaction.moveTouch=function(a,b,c){c.startTimeForDoubleTapMs=null;var d,e=[];for(d=0;d<a.touches.length;d++){var f=a.touches[d];e.push({"pageX":f.pageX,"pageY":f.pageY})}var g,h=c.initialTouches,i=c.initialPinchCenter;g=1==e.length?e[0]:{"pageX":.5*(e[0].pageX+e[1].pageX),"pageY":.5*(e[0].pageY+e[1].pageY)};var j={"pageX":g.pageX-i.pageX,"pageY":g.pageY-i.pageY},k=c.initialRange.x[1]-c.initialRange.x[0],l=c.initialRange.y[0]-c.initialRange.y[1];j.dataX=j.pageX/b.plotter_.area.w*k,j.dataY=j.pageY/b.plotter_.area.h*l;var m,n;if(1==e.length)m=1,n=1;else if(e.length>=2){var o=h[1].pageX-i.pageX;m=(e[1].pageX-g.pageX)/o;var p=h[1].pageY-i.pageY;n=(e[1].pageY-g.pageY)/p}m=Math.min(8,Math.max(.125,m)),n=Math.min(8,Math.max(.125,n));var q=!1;if(c.touchDirections.x&&(b.dateWindow_=[i.dataX-j.dataX+(c.initialRange.x[0]-i.dataX)/m,i.dataX-j.dataX+(c.initialRange.x[1]-i.dataX)/m],q=!0),c.touchDirections.y)for(d=0;1>d;d++){var r=b.axes_[d],s=b.attributes_.getForAxis("logscale",d);s||(r.valueWindow=[i.dataY-j.dataY+(c.initialRange.y[0]-i.dataY)/n,i.dataY-j.dataY+(c.initialRange.y[1]-i.dataY)/n],q=!0)}if(b.drawGraph_(!1),q&&e.length>1&&b.attr_("zoomCallback")){var t=b.xAxisRange();b.attr_("zoomCallback")(t[0],t[1],b.yAxisRanges())}},Dygraph.Interaction.endTouch=function(a,b,c){if(0!==a.touches.length)Dygraph.Interaction.startTouch(a,b,c);else if(1==a.changedTouches.length){var d=(new Date).getTime(),e=a.changedTouches[0];c.startTimeForDoubleTapMs&&d-c.startTimeForDoubleTapMs<500&&c.doubleTapX&&Math.abs(c.doubleTapX-e.screenX)<50&&c.doubleTapY&&Math.abs(c.doubleTapY-e.screenY)<50?b.resetZoom():(c.startTimeForDoubleTapMs=d,c.doubleTapX=e.screenX,c.doubleTapY=e.screenY)}},Dygraph.Interaction.defaultModel={"mousedown":function(a,b,c){a.button&&2==a.button||(c.initializeMouseDown(a,b,c),a.altKey||a.shiftKey?Dygraph.startPan(a,b,c):Dygraph.startZoom(a,b,c))},"mousemove":function(a,b,c){c.isZooming?Dygraph.moveZoom(a,b,c):c.isPanning&&Dygraph.movePan(a,b,c)},"mouseup":function(a,b,c){c.isZooming?Dygraph.endZoom(a,b,c):c.isPanning&&Dygraph.endPan(a,b,c)},"touchstart":function(a,b,c){Dygraph.Interaction.startTouch(a,b,c)},"touchmove":function(a,b,c){Dygraph.Interaction.moveTouch(a,b,c)},"touchend":function(a,b,c){Dygraph.Interaction.endTouch(a,b,c)},"mouseout":function(a,b,c){c.isZooming&&(c.dragEndX=null,c.dragEndY=null,b.clearZoomRect_())},"dblclick":function(a,b,c){return c.cancelNextDblclick?void(c.cancelNextDblclick=!1):void(a.altKey||a.shiftKey||b.resetZoom())}},Dygraph.DEFAULT_ATTRS.interactionModel=Dygraph.Interaction.defaultModel,Dygraph.defaultInteractionModel=Dygraph.Interaction.defaultModel,Dygraph.endZoom=Dygraph.Interaction.endZoom,Dygraph.moveZoom=Dygraph.Interaction.moveZoom,Dygraph.startZoom=Dygraph.Interaction.startZoom,Dygraph.endPan=Dygraph.Interaction.endPan,Dygraph.movePan=Dygraph.Interaction.movePan,Dygraph.startPan=Dygraph.Interaction.startPan,Dygraph.Interaction.nonInteractiveModel_={"mousedown":function(a,b,c){c.initializeMouseDown(a,b,c)},"mouseup":function(a,b,c){c.dragEndX=b.dragGetX_(a,c),
  c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c)}},Dygraph.Interaction.dragIsPanInteractionModel={"mousedown":function(a,b,c){c.initializeMouseDown(a,b,c),Dygraph.startPan(a,b,c)},"mousemove":function(a,b,c){c.isPanning&&Dygraph.movePan(a,b,c)},"mouseup":function(a,b,c){c.isPanning&&Dygraph.endPan(a,b,c)}},Dygraph.TickList=void 0,Dygraph.Ticker=void 0,Dygraph.numericLinearTicks=function(a,b,c,d,e,f){var g=function(a){return"logscale"===a?!1:d(a)};return Dygraph.numericTicks(a,b,c,g,e,f)},Dygraph.numericTicks=function(a,b,c,d,e,f){var g,h,i,j,k=d("pixelsPerLabel"),l=[];if(f)for(g=0;g<f.length;g++)l.push({"v":f[g]});else{if(d("logscale")){j=Math.floor(c/k);var m=Dygraph.binarySearch(a,Dygraph.PREFERRED_LOG_TICK_VALUES,1),n=Dygraph.binarySearch(b,Dygraph.PREFERRED_LOG_TICK_VALUES,-1);-1==m&&(m=0),-1==n&&(n=Dygraph.PREFERRED_LOG_TICK_VALUES.length-1);var o=null;if(n-m>=j/4){for(var p=n;p>=m;p--){var q=Dygraph.PREFERRED_LOG_TICK_VALUES[p],r=Math.log(q/a)/Math.log(b/a)*c,s={"v":q};null===o?o={"tickValue":q,"pixel_coord":r}:Math.abs(r-o.pixel_coord)>=k?o={"tickValue":q,"pixel_coord":r}:s.label="",l.push(s)}l.reverse()}}if(0===l.length){var t,u,v=d("labelsKMG2");v?(t=[1,2,4,8,16,32,64,128,256],u=16):(t=[1,2,5,10,20,50,100],u=10);var w,x,y,z,A=Math.ceil(c/k),B=Math.abs(b-a)/A,C=Math.floor(Math.log(B)/Math.log(u)),D=Math.pow(u,C);for(h=0;h<t.length&&(w=D*t[h],x=Math.floor(a/w)*w,y=Math.ceil(b/w)*w,j=Math.abs(y-x)/w,z=c/j,!(z>k));h++);for(x>y&&(w*=-1),g=0;j>g;g++)i=x+g*w,l.push({"v":i})}}var E=d("axisLabelFormatter");for(g=0;g<l.length;g++)void 0===l[g].label&&(l[g].label=E(l[g].v,0,d,e));return l},Dygraph.dateTicker=function(a,b,c,d,e,f){var g=Dygraph.pickDateTickGranularity(a,b,c,d);return g>=0?Dygraph.getDateAxis(a,b,g,d,e):[]},Dygraph.SECONDLY=0,Dygraph.TWO_SECONDLY=1,Dygraph.FIVE_SECONDLY=2,Dygraph.TEN_SECONDLY=3,Dygraph.THIRTY_SECONDLY=4,Dygraph.MINUTELY=5,Dygraph.TWO_MINUTELY=6,Dygraph.FIVE_MINUTELY=7,Dygraph.TEN_MINUTELY=8,Dygraph.THIRTY_MINUTELY=9,Dygraph.HOURLY=10,Dygraph.TWO_HOURLY=11,Dygraph.SIX_HOURLY=12,Dygraph.DAILY=13,Dygraph.WEEKLY=14,Dygraph.MONTHLY=15,Dygraph.QUARTERLY=16,Dygraph.BIANNUAL=17,Dygraph.ANNUAL=18,Dygraph.DECADAL=19,Dygraph.CENTENNIAL=20,Dygraph.NUM_GRANULARITIES=21,Dygraph.SHORT_SPACINGS=[],Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1e3,Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=2e3,Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=5e3,Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1e4,Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=3e4,Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=6e4,Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=12e4,Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=3e5,Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=6e5,Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=18e5,Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=36e5,Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=72e5,Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=216e5,Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=864e5,Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=6048e5,Dygraph.LONG_TICK_PLACEMENTS=[],Dygraph.LONG_TICK_PLACEMENTS[Dygraph.MONTHLY]={"months":[0,1,2,3,4,5,6,7,8,9,10,11],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.QUARTERLY]={"months":[0,3,6,9],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.BIANNUAL]={"months":[0,6],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.ANNUAL]={"months":[0],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.DECADAL]={"months":[0],"year_mod":10},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.CENTENNIAL]={"months":[0],"year_mod":100},Dygraph.PREFERRED_LOG_TICK_VALUES=function(){for(var a=[],b=-39;39>=b;b++)for(var c=Math.pow(10,b),d=1;9>=d;d++){var e=c*d;a.push(e)}return a}(),Dygraph.pickDateTickGranularity=function(a,b,c,d){for(var e=d("pixelsPerLabel"),f=0;f<Dygraph.NUM_GRANULARITIES;f++){var g=Dygraph.numDateTicks(a,b,f);if(c/g>=e)return f}return-1},Dygraph.numDateTicks=function(a,b,c){if(c<Dygraph.MONTHLY){var d=Dygraph.SHORT_SPACINGS[c];return Math.floor(.5+1*(b-a)/d)}var e=Dygraph.LONG_TICK_PLACEMENTS[c],f=31557807360,g=1*(b-a)/f;return Math.floor(.5+1*g*e.months.length/e.year_mod)},Dygraph.getDateAxis=function(a,b,c,d,e){var f,g=d("axisLabelFormatter"),h=[];if(c<Dygraph.MONTHLY){var i=Dygraph.SHORT_SPACINGS[c],j=i/1e3,k=new Date(a);Dygraph.setDateSameTZ(k,{"ms":0});var l;60>=j?(l=k.getSeconds(),Dygraph.setDateSameTZ(k,{"s":l-l%j})):(Dygraph.setDateSameTZ(k,{"s":0}),j/=60,60>=j?(l=k.getMinutes(),Dygraph.setDateSameTZ(k,{"m":l-l%j})):(Dygraph.setDateSameTZ(k,{"m":0}),j/=60,24>=j?(l=k.getHours(),k.setHours(l-l%j)):(k.setHours(0),j/=24,7==j&&k.setDate(k.getDate()-k.getDay())))),a=k.getTime();var m=new Date(a).getTimezoneOffset(),n=i>=Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY];for(f=a;b>=f;f+=i){if(k=new Date(f),n&&k.getTimezoneOffset()!=m){var o=k.getTimezoneOffset()-m;f+=60*o*1e3,k=new Date(f),m=k.getTimezoneOffset(),new Date(f+i).getTimezoneOffset()!=m&&(f+=i,k=new Date(f),m=k.getTimezoneOffset())}h.push({"v":f,"label":g(k,c,d,e)})}}else{var p,q=1;c<Dygraph.NUM_GRANULARITIES?(p=Dygraph.LONG_TICK_PLACEMENTS[c].months,q=Dygraph.LONG_TICK_PLACEMENTS[c].year_mod):Dygraph.warn("Span of dates is too long");for(var r=new Date(a).getFullYear(),s=new Date(b).getFullYear(),t=Dygraph.zeropad,u=r;s>=u;u++)if(u%q===0)for(var v=0;v<p.length;v++){var w=u+"/"+t(1+p[v])+"/01";f=Dygraph.dateStrToMillis(w),a>f||f>b||h.push({"v":f,"label":g(new Date(f),c,d,e)})}}return h},Dygraph&&Dygraph.DEFAULT_ATTRS&&Dygraph.DEFAULT_ATTRS.axes&&Dygraph.DEFAULT_ATTRS.axes.x&&Dygraph.DEFAULT_ATTRS.axes.y&&Dygraph.DEFAULT_ATTRS.axes.y2&&(Dygraph.DEFAULT_ATTRS.axes.x.ticker=Dygraph.dateTicker,Dygraph.DEFAULT_ATTRS.axes.y.ticker=Dygraph.numericTicks,Dygraph.DEFAULT_ATTRS.axes.y2.ticker=Dygraph.numericTicks),Dygraph.Plugins={},Dygraph.Plugins.Annotations=function(){var a=function(){this.annotations_=[]};return a.prototype.toString=function(){return"Annotations Plugin"},a.prototype.activate=function(a){return{"clearChart":this.clearChart,"didDrawChart":this.didDrawChart}},a.prototype.detachLabels=function(){for(var a=0;a<this.annotations_.length;a++){var b=this.annotations_[a];b.parentNode&&b.parentNode.removeChild(b),this.annotations_[a]=null}this.annotations_=[]},a.prototype.clearChart=function(a){this.detachLabels()},a.prototype.didDrawChart=function(a){var b=a.dygraph,c=b.layout_.annotated_points;if(c&&0!==c.length)for(var d=a.canvas.parentNode,e={"position":"absolute","fontSize":b.getOption("axisLabelFontSize")+"px","zIndex":10,"overflow":"hidden"},f=function(a,c,d){return function(e){var f=d.annotation;f.hasOwnProperty(a)?f[a](f,d,b,e):b.getOption(c)&&b.getOption(c)(f,d,b,e)}},g=a.dygraph.plotter_.area,h={},i=0;i<c.length;i++){var j=c[i];if(!(j.canvasx<g.x||j.canvasx>g.x+g.w||j.canvasy<g.y||j.canvasy>g.y+g.h)){var k=j.annotation,l=6;k.hasOwnProperty("tickHeight")&&(l=k.tickHeight);var m=document.createElement("div");for(var n in e)e.hasOwnProperty(n)&&(m.style[n]=e[n]);k.hasOwnProperty("icon")||(m.className="dygraphDefaultAnnotation"),k.hasOwnProperty("cssClass")&&(m.className+=" "+k.cssClass);var o=k.hasOwnProperty("width")?k.width:16,p=k.hasOwnProperty("height")?k.height:16;if(k.hasOwnProperty("icon")){var q=document.createElement("img");q.src=k.icon,q.width=o,q.height=p,m.appendChild(q)}else j.annotation.hasOwnProperty("shortText")&&m.appendChild(document.createTextNode(j.annotation.shortText));var r=j.canvasx-o/2;m.style.left=r+"px";var s=0;if(k.attachAtBottom){var t=g.y+g.h-p-l;h[r]?t-=h[r]:h[r]=0,h[r]+=l+p,s=t}else s=j.canvasy-p-l;m.style.top=s+"px",m.style.width=o+"px",m.style.height=p+"px",m.title=j.annotation.text,m.style.color=b.colorsMap_[j.name],m.style.borderColor=b.colorsMap_[j.name],k.div=m,b.addAndTrackEvent(m,"click",f("clickHandler","annotationClickHandler",j,this)),b.addAndTrackEvent(m,"mouseover",f("mouseOverHandler","annotationMouseOverHandler",j,this)),b.addAndTrackEvent(m,"mouseout",f("mouseOutHandler","annotationMouseOutHandler",j,this)),b.addAndTrackEvent(m,"dblclick",f("dblClickHandler","annotationDblClickHandler",j,this)),d.appendChild(m),this.annotations_.push(m);var u=a.drawingContext;if(u.save(),u.strokeStyle=b.colorsMap_[j.name],u.beginPath(),k.attachAtBottom){var t=s+p;u.moveTo(j.canvasx,t),u.lineTo(j.canvasx,t+l)}else u.moveTo(j.canvasx,j.canvasy),u.lineTo(j.canvasx,j.canvasy-2-l);u.closePath(),u.stroke(),u.restore()}}},a.prototype.destroy=function(){this.detachLabels()},a}(),Dygraph.Plugins.Axes=function(){var a=function(){this.xlabels_=[],this.ylabels_=[]};return a.prototype.toString=function(){return"Axes Plugin"},a.prototype.activate=function(a){return{"layout":this.layout,"clearChart":this.clearChart,"willDrawChart":this.willDrawChart}},a.prototype.layout=function(a){var b=a.dygraph;if(b.getOption("drawYAxis")){var c=b.getOption("yAxisLabelWidth")+2*b.getOption("axisTickSize");a.reserveSpaceLeft(c)}if(b.getOption("drawXAxis")){var d;d=b.getOption("xAxisHeight")?b.getOption("xAxisHeight"):b.getOptionForAxis("axisLabelFontSize","x")+2*b.getOption("axisTickSize"),a.reserveSpaceBottom(d)}if(2==b.numAxes()){if(b.getOption("drawYAxis")){var c=b.getOption("yAxisLabelWidth")+2*b.getOption("axisTickSize");a.reserveSpaceRight(c)}}else b.numAxes()>2&&b.error("Only two y-axes are supported at this time. (Trying to use "+b.numAxes()+")")},a.prototype.detachLabels=function(){function a(a){for(var b=0;b<a.length;b++){var c=a[b];c.parentNode&&c.parentNode.removeChild(c)}}a(this.xlabels_),a(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},a.prototype.clearChart=function(a){this.detachLabels()},a.prototype.willDrawChart=function(a){function b(a){return Math.round(a)+.5}function c(a){return Math.round(a)-.5}var d=a.dygraph;if(d.getOption("drawXAxis")||d.getOption("drawYAxis")){var e,f,g,h,i,j=a.drawingContext,k=a.canvas.parentNode,l=a.canvas.width,m=a.canvas.height,n=function(a){return{"position":"absolute","fontSize":d.getOptionForAxis("axisLabelFontSize",a)+"px","zIndex":10,"color":d.getOptionForAxis("axisLabelColor",a),"width":d.getOption("axisLabelWidth")+"px","lineHeight":"normal","overflow":"hidden"}},o={"x":n("x"),"y":n("y"),"y2":n("y2")},p=function(a,b,c){var d=document.createElement("div"),e=o["y2"==c?"y2":b];for(var f in e)e.hasOwnProperty(f)&&(d.style[f]=e[f]);var g=document.createElement("div");return g.className="dygraph-axis-label dygraph-axis-label-"+b+(c?" dygraph-axis-label-"+c:""),g.innerHTML=a,d.appendChild(g),d};j.save();var q=d.layout_,r=a.dygraph.plotter_.area;if(d.getOption("drawYAxis")){if(q.yticks&&q.yticks.length>0){var s=d.numAxes();for(i=0;i<q.yticks.length;i++){if(h=q.yticks[i],"function"==typeof h)return;f=r.x;var t=1,u="y1";1==h[0]&&(f=r.x+r.w,t=-1,u="y2");var v=d.getOptionForAxis("axisLabelFontSize",u);g=r.y+h[1]*r.h,e=p(h[2],"y",2==s?u:null);var w=g-v/2;0>w&&(w=0),w+v+3>m?e.style.bottom="0px":e.style.top=w+"px",0===h[0]?(e.style.left=r.x-d.getOption("yAxisLabelWidth")-d.getOption("axisTickSize")+"px",e.style.textAlign="right"):1==h[0]&&(e.style.left=r.x+r.w+d.getOption("axisTickSize")+"px",e.style.textAlign="left"),e.style.width=d.getOption("yAxisLabelWidth")+"px",k.appendChild(e),this.ylabels_.push(e)}var x=this.ylabels_[0],v=d.getOptionForAxis("axisLabelFontSize","y"),y=parseInt(x.style.top,10)+v;y>m-v&&(x.style.top=parseInt(x.style.top,10)-v/2+"px")}var z;if(d.getOption("drawAxesAtZero")){var A=d.toPercentXCoord(0);(A>1||0>A||isNaN(A))&&(A=0),z=b(r.x+A*r.w)}else z=b(r.x);j.strokeStyle=d.getOptionForAxis("axisLineColor","y"),j.lineWidth=d.getOptionForAxis("axisLineWidth","y"),j.beginPath(),j.moveTo(z,c(r.y)),j.lineTo(z,c(r.y+r.h)),j.closePath(),j.stroke(),2==d.numAxes()&&(j.strokeStyle=d.getOptionForAxis("axisLineColor","y2"),j.lineWidth=d.getOptionForAxis("axisLineWidth","y2"),j.beginPath(),j.moveTo(c(r.x+r.w),c(r.y)),j.lineTo(c(r.x+r.w),c(r.y+r.h)),j.closePath(),j.stroke())}if(d.getOption("drawXAxis")){if(q.xticks)for(i=0;i<q.xticks.length;i++){h=q.xticks[i],f=r.x+h[0]*r.w,g=r.y+r.h,e=p(h[1],"x"),e.style.textAlign="center",e.style.top=g+d.getOption("axisTickSize")+"px";var B=f-d.getOption("axisLabelWidth")/2;B+d.getOption("axisLabelWidth")>l&&(B=l-d.getOption("xAxisLabelWidth"),e.style.textAlign="right"),0>B&&(B=0,e.style.textAlign="left"),e.style.left=B+"px",e.style.width=d.getOption("xAxisLabelWidth")+"px",k.appendChild(e),this.xlabels_.push(e)}j.strokeStyle=d.getOptionForAxis("axisLineColor","x"),j.lineWidth=d.getOptionForAxis("axisLineWidth","x"),j.beginPath();var C;if(d.getOption("drawAxesAtZero")){var A=d.toPercentYCoord(0,0);(A>1||0>A)&&(A=1),C=c(r.y+A*r.h)}else C=c(r.y+r.h);j.moveTo(b(r.x),C),j.lineTo(b(r.x+r.w),C),j.closePath(),j.stroke()}j.restore()}},a}(),Dygraph.Plugins.ChartLabels=function(){var a=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};a.prototype.toString=function(){return"ChartLabels Plugin"},a.prototype.activate=function(a){return{"layout":this.layout,"didDrawChart":this.didDrawChart}};var b=function(a){var b=document.createElement("div");return b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=a.w+"px",b.style.height=a.h+"px",b};a.prototype.detachLabels_=function(){for(var a=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],b=0;b<a.length;b++){var c=a[b];c&&c.parentNode&&c.parentNode.removeChild(c)}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var c=function(a,b,c,d,e){var f=document.createElement("div");f.style.position="absolute",1==c?f.style.left="0px":f.style.left=b.x+"px",f.style.top=b.y+"px",f.style.width=b.w+"px",f.style.height=b.h+"px",f.style.fontSize=a.getOption("yLabelWidth")-2+"px";var g=document.createElement("div");g.style.position="absolute",g.style.width=b.h+"px",g.style.height=b.w+"px",g.style.top=b.h/2-b.w/2+"px",g.style.left=b.w/2-b.h/2+"px",g.style.textAlign="center";var h="rotate("+(1==c?"-":"")+"90deg)";g.style.transform=h,g.style.WebkitTransform=h,g.style.MozTransform=h,g.style.OTransform=h,g.style.msTransform=h,"undefined"!=typeof document.documentMode&&document.documentMode<9&&(g.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+(1==c?"3":"1")+")",g.style.left="0px",g.style.top="0px");var i=document.createElement("div");return i.className=d,i.innerHTML=e,g.appendChild(i),f.appendChild(g),f};return a.prototype.layout=function(a){this.detachLabels_();var d=a.dygraph,e=a.chart_div;if(d.getOption("title")){var f=a.reserveSpaceTop(d.getOption("titleHeight"));this.title_div_=b(f),this.title_div_.style.textAlign="center",this.title_div_.style.fontSize=d.getOption("titleHeight")-8+"px",this.title_div_.style.fontWeight="bold",this.title_div_.style.zIndex=10;var g=document.createElement("div");g.className="dygraph-label dygraph-title",g.innerHTML=d.getOption("title"),this.title_div_.appendChild(g),e.appendChild(this.title_div_)}if(d.getOption("xlabel")){var h=a.reserveSpaceBottom(d.getOption("xLabelHeight"));this.xlabel_div_=b(h),this.xlabel_div_.style.textAlign="center",this.xlabel_div_.style.fontSize=d.getOption("xLabelHeight")-2+"px";var g=document.createElement("div");g.className="dygraph-label dygraph-xlabel",g.innerHTML=d.getOption("xlabel"),this.xlabel_div_.appendChild(g),e.appendChild(this.xlabel_div_)}if(d.getOption("ylabel")){var i=a.reserveSpaceLeft(0);this.ylabel_div_=c(d,i,1,"dygraph-label dygraph-ylabel",d.getOption("ylabel")),e.appendChild(this.ylabel_div_)}if(d.getOption("y2label")&&2==d.numAxes()){var j=a.reserveSpaceRight(0);this.y2label_div_=c(d,j,2,"dygraph-label dygraph-y2label",d.getOption("y2label")),e.appendChild(this.y2label_div_)}},a.prototype.didDrawChart=function(a){var b=a.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=b.getOption("title")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=b.getOption("xlabel")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=b.getOption("ylabel")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=b.getOption("y2label"))},a.prototype.clearChart=function(){},a.prototype.destroy=function(){this.detachLabels_()},a}(),Dygraph.Plugins.Grid=function(){var a=function(){};return a.prototype.toString=function(){return"Gridline Plugin"},a.prototype.activate=function(a){return{"willDrawChart":this.willDrawChart}},a.prototype.willDrawChart=function(a){function b(a){return Math.round(a)+.5}function c(a){return Math.round(a)-.5}var d,e,f,g,h=a.dygraph,i=a.drawingContext,j=h.layout_,k=a.dygraph.plotter_.area;if(h.getOption("drawYGrid")){for(var l=["y","y2"],m=[],n=[],o=[],p=[],q=[],f=0;f<l.length;f++)o[f]=h.getOptionForAxis("drawGrid",l[f]),o[f]&&(m[f]=h.getOptionForAxis("gridLineColor",l[f]),n[f]=h.getOptionForAxis("gridLineWidth",l[f]),q[f]=h.getOptionForAxis("gridLinePattern",l[f]),p[f]=q[f]&&q[f].length>=2);for(g=j.yticks,i.save(),f=0;f<g.length;f++){var r=g[f][0];o[r]&&(p[r]&&i.installPattern(q[r]),i.strokeStyle=m[r],i.lineWidth=n[r],d=b(k.x),e=c(k.y+g[f][1]*k.h),i.beginPath(),i.moveTo(d,e),i.lineTo(d+k.w,e),i.closePath(),i.stroke(),p[r]&&i.uninstallPattern())}i.restore()}if(h.getOption("drawXGrid")&&h.getOptionForAxis("drawGrid","x")){g=j.xticks,i.save();var q=h.getOptionForAxis("gridLinePattern","x"),p=q&&q.length>=2;for(p&&i.installPattern(q),i.strokeStyle=h.getOptionForAxis("gridLineColor","x"),i.lineWidth=h.getOptionForAxis("gridLineWidth","x"),f=0;f<g.length;f++)d=b(k.x+g[f][0]*k.w),e=c(k.y+k.h),i.beginPath(),i.moveTo(d,e),i.lineTo(d,k.y),i.closePath(),i.stroke();p&&i.uninstallPattern(),i.restore()}},a.prototype.destroy=function(){},a}(),Dygraph.Plugins.Legend=function(){var a=function(){this.legend_div_=null,this.is_generated_div_=!1};a.prototype.toString=function(){return"Legend Plugin"};var b,c;a.prototype.activate=function(a){var b,c=a.getOption("labelsDivWidth"),d=a.getOption("labelsDiv");if(d&&null!==d)b="string"==typeof d||d instanceof String?document.getElementById(d):d;else{var e={"position":"absolute","fontSize":"14px","zIndex":10,"width":c+"px","top":"0px","left":a.size().width-c-2+"px","background":"white","lineHeight":"normal","textAlign":"left","overflow":"hidden"};Dygraph.update(e,a.getOption("labelsDivStyles")),b=document.createElement("div"),b.className="dygraph-legend";for(var f in e)if(e.hasOwnProperty(f))try{b.style[f]=e[f]}catch(g){this.warn("You are using unsupported css properties for your browser in labelsDivStyles")}a.graphDiv.appendChild(b),this.is_generated_div_=!0}return this.legend_div_=b,this.one_em_width_=10,{"select":this.select,"deselect":this.deselect,"predraw":this.predraw,"didDrawChart":this.didDrawChart}};var d=function(a){var b=document.createElement("span");b.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),a.appendChild(b);var c=b.offsetWidth;return a.removeChild(b),c};return a.prototype.select=function(a){var c=a.selectedX,d=a.selectedPoints,e=b(a.dygraph,c,d,this.one_em_width_);this.legend_div_.innerHTML=e},a.prototype.deselect=function(a){var c=d(this.legend_div_);this.one_em_width_=c;var e=b(a.dygraph,void 0,void 0,c);this.legend_div_.innerHTML=e},a.prototype.didDrawChart=function(a){this.deselect(a)},a.prototype.predraw=function(a){if(this.is_generated_div_){a.dygraph.graphDiv.appendChild(this.legend_div_);var b=a.dygraph.plotter_.area,c=a.dygraph.getOption("labelsDivWidth");this.legend_div_.style.left=b.x+b.w-c-1+"px",this.legend_div_.style.top=b.y+"px",this.legend_div_.style.width=c+"px"}},a.prototype.destroy=function(){this.legend_div_=null},b=function(a,b,d,e){if(a.getOption("showLabelsOnHighlight")!==!0)return"";var f,g,h,i,j,k=a.getLabels();if("undefined"==typeof b){if("always"!=a.getOption("legend"))return"";for(g=a.getOption("labelsSeparateLines"),f="",h=1;h<k.length;h++){var l=a.getPropertiesForSeries(k[h]);l.visible&&(""!==f&&(f+=g?"<br/>":" "),j=a.getOption("strokePattern",k[h]),i=c(j,l.color,e),f+="<span style='font-weight: bold; color: "+l.color+";'>"+i+" "+k[h]+"</span>")}return f}var m=a.optionsViewForAxis_("x"),n=m("valueFormatter");f=n(b,m,k[0],a),""!==f&&(f+=":");var o=[],p=a.numAxes();for(h=0;p>h;h++)o[h]=a.optionsViewForAxis_("y"+(h?1+h:""));var q=a.getOption("labelsShowZeroValues");g=a.getOption("labelsSeparateLines");var r=a.getHighlightSeries();for(h=0;h<d.length;h++){var s=d[h];if((0!==s.yval||q)&&Dygraph.isOK(s.canvasy)){g&&(f+="<br/>");var l=a.getPropertiesForSeries(s.name),t=o[l.axis-1],u=t("valueFormatter"),v=u(s.yval,t,s.name,a),w=s.name==r?" class='highlight'":"";f+="<span"+w+"> <b><span style='color: "+l.color+";'>"+s.name+"</span></b>:&nbsp;"+v+"</span>"}}return f},c=function(a,b,c){var d=/MSIE/.test(navigator.userAgent)&&!window.opera;if(d)return"&mdash;";if(!a||a.length<=1)return'<div style="display: inline-block; position: relative; bottom: .5ex; padding-left: 1em; height: 1px; border-bottom: 2px solid '+b+';"></div>';var e,f,g,h,i,j=0,k=0,l=[];for(e=0;e<=a.length;e++)j+=a[e%a.length];if(i=Math.floor(c/(j-a[0])),i>1){for(e=0;e<a.length;e++)l[e]=a[e]/c;k=l.length}else{for(i=1,e=0;e<a.length;e++)l[e]=a[e]/j;k=l.length+1}var m="";for(f=0;i>f;f++)for(e=0;k>e;e+=2)g=l[e%l.length],h=e<a.length?l[(e+1)%l.length]:0,m+='<div style="display: inline-block; position: relative; bottom: .5ex; margin-right: '+h+"em; padding-left: "+g+"em; height: 1px; border-bottom: 2px solid "+b+';"></div>';return m},a}(),Dygraph.Plugins.RangeSelector=function(){var a=function(){this.isIE_=/MSIE/.test(navigator.userAgent)&&!window.opera,this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};return a.prototype.toString=function(){return"RangeSelector Plugin"},a.prototype.activate=function(a){return this.dygraph_=a,this.isUsingExcanvas_=a.isUsingExcanvas_,this.getOption_("showRangeSelector")&&this.createInterface_(),{"layout":this.reserveSpace_,"predraw":this.renderStaticLayer_,"didDrawChart":this.renderInteractiveLayer_}},a.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null,this.iePanOverlay_=null},a.prototype.getOption_=function(a){return this.dygraph_.getOption(a)},a.prototype.setDefaultOption_=function(a,b){return this.dygraph_.attrs_[a]=b},a.prototype.createInterface_=function(){this.createCanvases_(),this.isUsingExcanvas_&&this.createIEPanOverlay_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(this.dygraph_.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({"animatedZooms":!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},a.prototype.addToGraph_=function(){var a=this.graphDiv_=this.dygraph_.graphDiv;a.appendChild(this.bgcanvas_),a.appendChild(this.fgcanvas_),a.appendChild(this.leftZoomHandle_),a.appendChild(this.rightZoomHandle_)},a.prototype.removeFromGraph_=function(){var a=this.graphDiv_;a.removeChild(this.bgcanvas_),a.removeChild(this.fgcanvas_),a.removeChild(this.leftZoomHandle_),a.removeChild(this.rightZoomHandle_),this.graphDiv_=null},a.prototype.reserveSpace_=function(a){this.getOption_("showRangeSelector")&&a.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},a.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},a.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},a.prototype.updateVisibility_=function(){var a=this.getOption_("showRangeSelector");if(a)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var b=this.dygraph_;setTimeout(function(){b.width_=0,b.resize()},1)}return a},a.prototype.resize_=function(){function a(a,b){a.style.top=b.y+"px",a.style.left=b.x+"px",a.width=b.w,a.height=b.h,a.style.width=a.width+"px",a.style.height=a.height+"px"}var b=this.dygraph_.layout_.getPlotArea(),c=0;this.getOption_("drawXAxis")&&(c=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={"x":b.x,"y":b.y+b.h+c+4,"w":b.w,"h":this.getOption_("rangeSelectorHeight")},a(this.bgcanvas_,this.canvasRect_),a(this.fgcanvas_,this.canvasRect_)},a.prototype.createCanvases_=function(){this.bgcanvas_=Dygraph.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=Dygraph.getContext(this.bgcanvas_),this.fgcanvas_=Dygraph.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=Dygraph.getContext(this.fgcanvas_)},a.prototype.createIEPanOverlay_=function(){this.iePanOverlay_=document.createElement("div"),this.iePanOverlay_.style.position="absolute",this.iePanOverlay_.style.backgroundColor="white",this.iePanOverlay_.style.filter="alpha(opacity=0)",this.iePanOverlay_.style.display="none",this.iePanOverlay_.style.cursor="move",this.fgcanvas_.appendChild(this.iePanOverlay_)},a.prototype.createZoomHandles_=function(){var a=new Image;a.className="dygraph-rangesel-zoomhandle",a.style.position="absolute",a.style.zIndex=10,a.style.visibility="hidden",a.style.cursor="col-resize",/MSIE 7/.test(navigator.userAgent)?(a.width=7,a.height=14,a.style.backgroundColor="white",a.style.border="1px solid #333333"):(a.width=9,a.height=16,a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII="),this.isMobileDevice_&&(a.width*=2,a.height*=2),this.leftZoomHandle_=a,this.rightZoomHandle_=a.cloneNode(!1)},a.prototype.initInteraction_=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=this,p=this.isIE_?document:window,q=0,r=null,s=!1,t=!1,u=!this.isMobileDevice_&&!this.isUsingExcanvas_,v=new Dygraph.IFrameTarp;a=function(a){var b=o.dygraph_.xAxisExtremes(),c=(b[1]-b[0])/o.canvasRect_.w,d=b[0]+(a.leftHandlePos-o.canvasRect_.x)*c,e=b[0]+(a.rightHandlePos-o.canvasRect_.x)*c;return[d,e]},b=function(a){return Dygraph.cancelEvent(a),s=!0,q=a.clientX,r=a.target?a.target:a.srcElement,("mousedown"===a.type||"dragstart"===a.type)&&(Dygraph.addEvent(p,"mousemove",c),Dygraph.addEvent(p,"mouseup",d)),o.fgcanvas_.style.cursor="col-resize",v.cover(),!0},c=function(a){if(!s)return!1;Dygraph.cancelEvent(a);var b=a.clientX-q;if(Math.abs(b)<4)return!0;q=a.clientX;var c,d=o.getZoomHandleStatus_();r==o.leftZoomHandle_?(c=d.leftHandlePos+b,c=Math.min(c,d.rightHandlePos-r.width-3),c=Math.max(c,o.canvasRect_.x)):(c=d.rightHandlePos+b,c=Math.min(c,o.canvasRect_.x+o.canvasRect_.w),c=Math.max(c,d.leftHandlePos+r.width+3));var f=r.width/2;return r.style.left=c-f+"px",o.drawInteractiveLayer_(),u&&e(),!0},d=function(a){return s?(s=!1,v.uncover(),Dygraph.removeEvent(p,"mousemove",c),Dygraph.removeEvent(p,"mouseup",d),o.fgcanvas_.style.cursor="default",u||e(),!0):!1},e=function(){try{var b=o.getZoomHandleStatus_();if(o.isChangingRange_=!0,b.isZoomed){var c=a(b);o.dygraph_.doZoomXDates_(c[0],c[1])}else o.dygraph_.resetZoom()}finally{o.isChangingRange_=!1}},f=function(a){if(o.isUsingExcanvas_)return a.srcElement==o.iePanOverlay_;var b=o.leftZoomHandle_.getBoundingClientRect(),c=b.left+b.width/2;b=o.rightZoomHandle_.getBoundingClientRect();var d=b.left+b.width/2;return a.clientX>c&&a.clientX<d},g=function(a){return!t&&f(a)&&o.getZoomHandleStatus_().isZoomed?(Dygraph.cancelEvent(a),t=!0,q=a.clientX,"mousedown"===a.type&&(Dygraph.addEvent(p,"mousemove",h),Dygraph.addEvent(p,"mouseup",i)),!0):!1},h=function(a){if(!t)return!1;Dygraph.cancelEvent(a);var b=a.clientX-q;if(Math.abs(b)<4)return!0;q=a.clientX;var c=o.getZoomHandleStatus_(),d=c.leftHandlePos,e=c.rightHandlePos,f=e-d;d+b<=o.canvasRect_.x?(d=o.canvasRect_.x,e=d+f):e+b>=o.canvasRect_.x+o.canvasRect_.w?(e=o.canvasRect_.x+o.canvasRect_.w,d=e-f):(d+=b,e+=b);var g=o.leftZoomHandle_.width/2;return o.leftZoomHandle_.style.left=d-g+"px",o.rightZoomHandle_.style.left=e-g+"px",o.drawInteractiveLayer_(),u&&j(),!0},i=function(a){return t?(t=!1,Dygraph.removeEvent(p,"mousemove",h),Dygraph.removeEvent(p,"mouseup",i),u||j(),!0):!1},j=function(){try{o.isChangingRange_=!0,o.dygraph_.dateWindow_=a(o.getZoomHandleStatus_()),o.dygraph_.drawGraph_(!1)}finally{o.isChangingRange_=!1}},k=function(a){if(!s&&!t){var b=f(a)?"move":"default";b!=o.fgcanvas_.style.cursor&&(o.fgcanvas_.style.cursor=b)}},l=function(a){"touchstart"==a.type&&1==a.targetTouches.length?b(a.targetTouches[0])&&Dygraph.cancelEvent(a):"touchmove"==a.type&&1==a.targetTouches.length?c(a.targetTouches[0])&&Dygraph.cancelEvent(a):d(a)},m=function(a){"touchstart"==a.type&&1==a.targetTouches.length?g(a.targetTouches[0])&&Dygraph.cancelEvent(a):"touchmove"==a.type&&1==a.targetTouches.length?h(a.targetTouches[0])&&Dygraph.cancelEvent(a):i(a)},n=function(a,b){for(var c=["touchstart","touchend","touchmove","touchcancel"],d=0;d<c.length;d++)o.dygraph_.addAndTrackEvent(a,c[d],b)},this.setDefaultOption_("interactionModel",Dygraph.Interaction.dragIsPanInteractionModel),this.setDefaultOption_("panEdgeFraction",1e-4);var w=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,w,b),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,w,b),this.isUsingExcanvas_?this.dygraph_.addAndTrackEvent(this.iePanOverlay_,"mousedown",g):(this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",g),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",k)),this.hasTouchInterface_&&(n(this.leftZoomHandle_,l),n(this.rightZoomHandle_,l),n(this.fgcanvas_,m))},a.prototype.drawStaticLayer_=function(){var a=this.bgcanvas_ctx_;a.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(b){Dygraph.warn(b)}var c=.5;this.bgcanvas_ctx_.lineWidth=1,a.strokeStyle="gray",a.beginPath(),a.moveTo(c,c),a.lineTo(c,this.canvasRect_.h-c),a.lineTo(this.canvasRect_.w-c,this.canvasRect_.h-c),a.lineTo(this.canvasRect_.w-c,c),a.stroke()},a.prototype.drawMiniPlot_=function(){var a=this.getOption_("rangeSelectorPlotFillColor"),b=this.getOption_("rangeSelectorPlotStrokeColor");if(a||b){var c=this.getOption_("stepPlot"),d=this.computeCombinedSeriesAndLimits_(),e=d.yMax-d.yMin,f=this.bgcanvas_ctx_,g=.5,h=this.dygraph_.xAxisExtremes(),i=Math.max(h[1]-h[0],1e-30),j=(this.canvasRect_.w-g)/i,k=(this.canvasRect_.h-g)/e,l=this.canvasRect_.w-g,m=this.canvasRect_.h-g,n=null,o=null;f.beginPath(),f.moveTo(g,m);for(var p=0;p<d.data.length;p++){var q=d.data[p],r=null!==q[0]?(q[0]-h[0])*j:NaN,s=null!==q[1]?m-(q[1]-d.yMin)*k:NaN;isFinite(r)&&isFinite(s)?(null===n?f.lineTo(r,m):c&&f.lineTo(r,o),f.lineTo(r,s),n=r,o=s):(null!==n&&(c?(f.lineTo(r,o),f.lineTo(r,m)):f.lineTo(n,m)),n=o=null)}if(f.lineTo(l,m),f.closePath(),a){var t=this.bgcanvas_ctx_.createLinearGradient(0,0,0,m);t.addColorStop(0,"white"),t.addColorStop(1,a),this.bgcanvas_ctx_.fillStyle=t,f.fill()}b&&(this.bgcanvas_ctx_.strokeStyle=b,this.bgcanvas_ctx_.lineWidth=1.5,f.stroke())}},a.prototype.computeCombinedSeriesAndLimits_=function(){var a,b,c,d,e,f,g,h,i=this.dygraph_.rawData_,j=this.getOption_("logscale"),k=[];for(d=0;d<i.length;d++)if(i[d].length>1&&null!==i[d][1]){if(c="number"!=typeof i[d][1])for(a=[],b=[],f=0;f<i[d][1].length;f++)a.push(0),b.push(0);break}for(d=0;d<i.length;d++){var l=i[d];if(g=l[0],c)for(f=0;f<a.length;f++)a[f]=b[f]=0;else a=b=0;for(e=1;e<l.length;e++)if(this.dygraph_.visibility()[e-1]){var m;if(c)for(f=0;f<a.length;f++)m=l[e][f],null===m||isNaN(m)||(a[f]+=m,b[f]++);else{if(m=l[e],null===m||isNaN(m))continue;a+=m,b++}}if(c){for(f=0;f<a.length;f++)a[f]/=b[f];h=a.slice(0)}else h=a/b;k.push([g,h])}if(k=this.dygraph_.rollingAverage(k,this.dygraph_.rollPeriod_),"number"!=typeof k[0][1])for(d=0;d<k.length;d++)h=k[d][1],
  k[d][1]=h[0];var n=Number.MAX_VALUE,o=-Number.MAX_VALUE;for(d=0;d<k.length;d++)h=k[d][1],null!==h&&isFinite(h)&&(!j||h>0)&&(n=Math.min(n,h),o=Math.max(o,h));var p=.25;if(j)for(o=Dygraph.log10(o),o+=o*p,n=Dygraph.log10(n),d=0;d<k.length;d++)k[d][1]=Dygraph.log10(k[d][1]);else{var q,r=o-n;q=r<=Number.MIN_VALUE?o*p:r*p,o+=q,n-=q}return{"data":k,"yMin":n,"yMax":o}},a.prototype.placeZoomHandles_=function(){var a=this.dygraph_.xAxisExtremes(),b=this.dygraph_.xAxisRange(),c=a[1]-a[0],d=Math.max(0,(b[0]-a[0])/c),e=Math.max(0,(a[1]-b[1])/c),f=this.canvasRect_.x+this.canvasRect_.w*d,g=this.canvasRect_.x+this.canvasRect_.w*(1-e),h=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),i=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=f-i+"px",this.leftZoomHandle_.style.top=h+"px",this.rightZoomHandle_.style.left=g-i+"px",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility="visible",this.rightZoomHandle_.style.visibility="visible"},a.prototype.drawInteractiveLayer_=function(){var a=this.fgcanvas_ctx_;a.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var b=1,c=this.canvasRect_.w-b,d=this.canvasRect_.h-b,e=this.getZoomHandleStatus_();if(a.strokeStyle="black",e.isZoomed){var f=Math.max(b,e.leftHandlePos-this.canvasRect_.x),g=Math.min(c,e.rightHandlePos-this.canvasRect_.x);a.fillStyle="rgba(240, 240, 240, 0.6)",a.fillRect(0,0,f,this.canvasRect_.h),a.fillRect(g,0,this.canvasRect_.w-g,this.canvasRect_.h),a.beginPath(),a.moveTo(b,b),a.lineTo(f,b),a.lineTo(f,d),a.lineTo(g,d),a.lineTo(g,b),a.lineTo(c,b),a.stroke(),this.isUsingExcanvas_&&(this.iePanOverlay_.style.width=g-f+"px",this.iePanOverlay_.style.left=f+"px",this.iePanOverlay_.style.height=d+"px",this.iePanOverlay_.style.display="inline")}else a.beginPath(),a.moveTo(b,b),a.lineTo(b,d),a.lineTo(c,d),a.lineTo(c,b),a.stroke(),this.iePanOverlay_&&(this.iePanOverlay_.style.display="none")},a.prototype.getZoomHandleStatus_=function(){var a=this.leftZoomHandle_.width/2,b=parseFloat(this.leftZoomHandle_.style.left)+a,c=parseFloat(this.rightZoomHandle_.style.left)+a;return{"leftHandlePos":b,"rightHandlePos":c,"isZoomed":b-1>this.canvasRect_.x||c+1<this.canvasRect_.x+this.canvasRect_.w}},a}(),Dygraph.PLUGINS.push(Dygraph.Plugins.Legend,Dygraph.Plugins.Axes,Dygraph.Plugins.RangeSelector,Dygraph.Plugins.ChartLabels,Dygraph.Plugins.Annotations,Dygraph.Plugins.Grid);
  /*!
   * Chart.js
   * http://chartjs.org/
   * Version: 1.0.2
   *
   * Copyright 2015 Nick Downie
   * Released under the MIT license
   * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
   */
  (function(){"use strict";var a=this,b=a.Chart,c=function(a){this.canvas=a.canvas,this.ctx=a;var b=function(a,b){return a["offset"+b]?a["offset"+b]:document.defaultView.getComputedStyle(a).getPropertyValue(b)},c=this.width=b(a.canvas,"Width"),e=this.height=b(a.canvas,"Height");a.canvas.width=c,a.canvas.height=e;var c=this.width=a.canvas.width,e=this.height=a.canvas.height;return this.aspectRatio=this.width/this.height,d.retinaScale(this),this};c.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(){}}},c.types={};var d=c.helpers={},e=d.each=function(a,b,c){var d=Array.prototype.slice.call(arguments,3);if(a)if(a.length===+a.length){var e;for(e=0;e<a.length;e++)b.apply(c,[a[e],e].concat(d))}else for(var f in a)b.apply(c,[a[f],f].concat(d))},f=d.clone=function(a){var b={};return e(a,function(c,d){a.hasOwnProperty(d)&&(b[d]=c)}),b},g=d.extend=function(a){return e(Array.prototype.slice.call(arguments,1),function(b){e(b,function(c,d){b.hasOwnProperty(d)&&(a[d]=c)})}),a},h=d.merge=function(a,b){var c=Array.prototype.slice.call(arguments,0);return c.unshift({}),g.apply(null,c)},i=d.indexOf=function(a,b){if(Array.prototype.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},j=(d.where=function(a,b){var c=[];return d.each(a,function(a){b(a)&&c.push(a)}),c},d.findNextWhere=function(a,b,c){c||(c=-1);for(var d=c+1;d<a.length;d++){var e=a[d];if(b(e))return e}},d.findPreviousWhere=function(a,b,c){c||(c=a.length);for(var d=c-1;d>=0;d--){var e=a[d];if(b(e))return e}},d.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=j,a&&g(c.prototype,a),c.__super__=b.prototype,c}),k=d.noop=function(){},l=d.uid=function(){var a=0;return function(){return"chart-"+a++}}(),m=d.warn=function(a){window.console&&"function"==typeof window.console.warn&&console.warn(a)},n=d.amd="function"==typeof define&&define.amd,o=d.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},p=d.max=function(a){return Math.max.apply(Math,a)},q=d.min=function(a){return Math.min.apply(Math,a)},r=(d.cap=function(a,b,c){if(o(b)){if(a>b)return b}else if(o(c)&&c>a)return c;return a},d.getDecimalPlaces=function(a){return a%1!==0&&o(a)?a.toString().split(".")[1].length:0}),s=d.radians=function(a){return a*(Math.PI/180)},t=(d.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=2*Math.PI+Math.atan2(d,c);return 0>c&&0>d&&(f+=2*Math.PI),{"angle":f,"distance":e}},d.aliasPixel=function(a){return a%2===0?0:.5}),u=(d.splineCurve=function(a,b,c,d){var e=Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)),f=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2)),g=d*e/(e+f),h=d*f/(e+f);return{"inner":{"x":b.x-g*(c.x-a.x),"y":b.y-g*(c.y-a.y)},"outer":{"x":b.x+h*(c.x-a.x),"y":b.y+h*(c.y-a.y)}}},d.calculateOrderOfMagnitude=function(a){return Math.floor(Math.log(a)/Math.LN10)}),v=(d.calculateScaleRange=function(a,b,c,d,e){var f=2,g=Math.floor(b/(1.5*c)),h=f>=g,i=p(a),j=q(a);i===j&&(i+=.5,j>=.5&&!d?j-=.5:i+=.5);for(var k=Math.abs(i-j),l=u(k),m=Math.ceil(i/(1*Math.pow(10,l)))*Math.pow(10,l),n=d?0:Math.floor(j/(1*Math.pow(10,l)))*Math.pow(10,l),o=m-n,r=Math.pow(10,l),s=Math.round(o/r);(s>g||g>2*s)&&!h;)if(s>g)r*=2,s=Math.round(o/r),s%1!==0&&(h=!0);else if(e&&l>=0){if(r/2%1!==0)break;r/=2,s=Math.round(o/r)}else r/=2,s=Math.round(o/r);return h&&(s=f,r=o/s),{"steps":s,"stepValue":r,"min":n,"max":n+s*r}},d.template=function(a,b){function c(a,b){var c=/\W/.test(a)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.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('');"):d[a]=d[a];return b?c(b):c}if(a instanceof Function)return a(b);var d={};return c(a,b)}),w=(d.generateLabels=function(a,b,c,d){var f=new Array(b);return labelTemplateString&&e(f,function(b,e){f[e]=v(a,{"value":c+d*(e+1)})}),f},d.easingEffects={"linear":function(a){return a},"easeInQuad":function(a){return a*a},"easeOutQuad":function(a){return-1*a*(a-2)},"easeInOutQuad":function(a){return(a/=.5)<1?.5*a*a:-0.5*(--a*(a-2)-1)},"easeInCubic":function(a){return a*a*a},"easeOutCubic":function(a){return 1*((a=a/1-1)*a*a+1)},"easeInOutCubic":function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},"easeInQuart":function(a){return a*a*a*a},"easeOutQuart":function(a){return-1*((a=a/1-1)*a*a*a-1)},"easeInOutQuart":function(a){return(a/=.5)<1?.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},"easeInQuint":function(a){return 1*(a/=1)*a*a*a*a},"easeOutQuint":function(a){return 1*((a=a/1-1)*a*a*a*a+1)},"easeInOutQuint":function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},"easeInSine":function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},"easeOutSine":function(a){return 1*Math.sin(a/1*(Math.PI/2))},"easeInOutSine":function(a){return-0.5*(Math.cos(Math.PI*a/1)-1)},"easeInExpo":function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},"easeOutExpo":function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},"easeInOutExpo":function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},"easeInCirc":function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},"easeOutCirc":function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},"easeInOutCirc":function(a){return(a/=.5)<1?-0.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},"easeInElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:1==(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),-(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)))},"easeOutElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:1==(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),d*Math.pow(2,-10*a)*Math.sin((1*a-b)*(2*Math.PI)/c)+1)},"easeInOutElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:2==(a/=.5)?1:(c||(c=1*(.3*1.5)),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),1>a?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},"easeInBack":function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},"easeOutBack":function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},"easeInOutBack":function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},"easeInBounce":function(a){return 1-w.easeOutBounce(1-a)},"easeOutBounce":function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},"easeInOutBounce":function(a){return.5>a?.5*w.easeInBounce(2*a):.5*w.easeOutBounce(2*a-1)+.5}}),x=d.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),y=d.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),z=(d.animationLoop=function(a,b,c,d,e,f){var g=0,h=w[c]||w.linear,i=function(){g++;var c=g/b,j=h(c);a.call(f,j,c,g),d.call(f,j,c),b>g?f.animationFrame=x(i):e.apply(f)};x(i)},d.getRelativePosition=function(a){var b,c,d=a.originalEvent||a,e=a.currentTarget||a.srcElement,f=e.getBoundingClientRect();return d.touches?(b=d.touches[0].clientX-f.left,c=d.touches[0].clientY-f.top):(b=d.clientX-f.left,c=d.clientY-f.top),{"x":b,"y":c}},d.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c}),A=d.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=k},B=(d.bindEvents=function(a,b,c){a.events||(a.events={}),e(b,function(b){a.events[b]=function(){c.apply(a,arguments)},z(a.chart.canvas,b,a.events[b])})},d.unbindEvents=function(a,b){e(b,function(b,c){A(a.chart.canvas,c,b)})}),C=d.getMaximumWidth=function(a){var b=a.parentNode;return b.clientWidth},D=d.getMaximumHeight=function(a){var b=a.parentNode;return b.clientHeight},E=(d.getMaximumSize=d.getMaximumWidth,d.retinaScale=function(a){var b=a.ctx,c=a.canvas.width,d=a.canvas.height;window.devicePixelRatio&&(b.canvas.style.width=c+"px",b.canvas.style.height=d+"px",b.canvas.height=d*window.devicePixelRatio,b.canvas.width=c*window.devicePixelRatio,b.scale(window.devicePixelRatio,window.devicePixelRatio))}),F=d.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},G=d.fontString=function(a,b,c){return b+" "+a+"px "+c},H=d.longestText=function(a,b,c){a.font=b;var d=0;return e(c,function(b){var c=a.measureText(b).width;d=c>d?c:d}),d},I=d.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()};c.instances={},c.Type=function(a,b,d){this.options=b,this.chart=d,this.id=l(),c.instances[this.id]=this,b.responsive&&this.resize(),this.initialize.call(this,a)},g(c.Type.prototype,{"initialize":function(){return this},"clear":function(){return F(this.chart),this},"stop":function(){return y(this.animationFrame),this},"resize":function(a){this.stop();var b=this.chart.canvas,c=C(this.chart.canvas),d=this.options.maintainAspectRatio?c/this.chart.aspectRatio:D(this.chart.canvas);return b.width=this.chart.width=c,b.height=this.chart.height=d,E(this.chart),"function"==typeof a&&a.apply(this,Array.prototype.slice.call(arguments,1)),this},"reflow":k,"render":function(a){return a&&this.reflow(),this.options.animation&&!a?d.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 v(this.options.legendTemplate,this)},"destroy":function(){this.clear(),B(this,this.events);var a=this.chart.canvas;a.width=this.chart.width,a.height=this.chart.height,a.style.removeProperty?(a.style.removeProperty("width"),a.style.removeProperty("height")):(a.style.removeAttribute("width"),a.style.removeAttribute("height")),delete c.instances[this.id]},"showTooltip":function(a,b){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var f=function(a){var b=!1;return a.length!==this.activeElements.length?b=!0:(e(a,function(a,c){a!==this.activeElements[c]&&(b=!0)},this),b)}.call(this,a);if(f||b){if(this.activeElements=a,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),a.length>0)if(this.datasets&&this.datasets.length>1){for(var g,h,j=this.datasets.length-1;j>=0&&(g=this.datasets[j].points||this.datasets[j].bars||this.datasets[j].segments,h=i(g,a[0]),-1===h);j--);var k=[],l=[],m=function(a){var b,c,e,f,g,i=[],j=[],m=[];return d.each(this.datasets,function(a){b=a.points||a.bars||a.segments,b[h]&&b[h].hasValue()&&i.push(b[h])}),d.each(i,function(a){j.push(a.x),m.push(a.y),k.push(d.template(this.options.multiTooltipTemplate,a)),l.push({"fill":a._saved.fillColor||a.fillColor,"stroke":a._saved.strokeColor||a.strokeColor})},this),g=q(m),e=p(m),f=q(j),c=p(j),{"x":f>this.chart.width/2?f:c,"y":(g+e)/2}}.call(this,h);new c.MultiTooltip({"x":m.x,"y":m.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":k,"legendColors":l,"legendColorBackground":this.options.multiTooltipKeyBackground,"title":a[0].label,"chart":this.chart,"ctx":this.chart.ctx,"custom":this.options.customTooltips}).draw()}else e(a,function(a){var b=a.tooltipPosition();new c.Tooltip({"x":Math.round(b.x),"y":Math.round(b.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":v(this.options.tooltipTemplate,a),"chart":this.chart,"custom":this.options.customTooltips}).draw()},this);return this}},"toBase64Image":function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),c.Type.extend=function(a){var b=this,d=function(){return b.apply(this,arguments)};if(d.prototype=f(b.prototype),g(d.prototype,a),d.extend=c.Type.extend,a.name||b.prototype.name){var e=a.name||b.prototype.name,i=c.defaults[b.prototype.name]?f(c.defaults[b.prototype.name]):{};c.defaults[e]=g(i,a.defaults),c.types[e]=d,c.prototype[e]=function(a,b){var f=h(c.defaults.global,c.defaults[e],b||{});return new d(a,f,this)}}else m("Name not provided for this chart, so it hasn't been registered");return b},c.Element=function(a){g(this,a),this.initialize.apply(this,arguments),this.save()},g(c.Element.prototype,{"initialize":function(){},"restore":function(a){return a?e(a,function(a){this[a]=this._saved[a]},this):g(this,this._saved),this},"save":function(){return this._saved=f(this),delete this._saved._saved,this},"update":function(a){return e(a,function(a,b){this._saved[b]=this[b],this[b]=a},this),this},"transition":function(a,b){return e(a,function(a,c){this[c]=(a-this._saved[c])*b+this._saved[c]},this),this},"tooltipPosition":function(){return{"x":this.x,"y":this.y}},"hasValue":function(){return o(this.value)}}),c.Element.extend=j,c.Point=c.Element.extend({"display":!0,"inRange":function(a,b){var c=this.hitDetectionRadius+this.radius;return Math.pow(a-this.x,2)+Math.pow(b-this.y,2)<Math.pow(c,2)},"draw":function(){if(this.display){var a=this.ctx;a.beginPath(),a.arc(this.x,this.y,this.radius,0,2*Math.PI),a.closePath(),a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.fillStyle=this.fillColor,a.fill(),a.stroke()}}}),c.Arc=c.Element.extend({"inRange":function(a,b){var c=d.getAngleFromPoint(this,{"x":a,"y":b}),e=c.angle>=this.startAngle&&c.angle<=this.endAngle,f=c.distance>=this.innerRadius&&c.distance<=this.outerRadius;return e&&f},"tooltipPosition":function(){var a=this.startAngle+(this.endAngle-this.startAngle)/2,b=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{"x":this.x+Math.cos(a)*b,"y":this.y+Math.sin(a)*b}},"draw":function(a){var b=this.ctx;b.beginPath(),b.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),b.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),b.closePath(),b.strokeStyle=this.strokeColor,b.lineWidth=this.strokeWidth,b.fillStyle=this.fillColor,b.fill(),b.lineJoin="bevel",this.showStroke&&b.stroke()}}),c.Rectangle=c.Element.extend({"draw":function(){var a=this.ctx,b=this.width/2,c=this.x-b,d=this.x+b,e=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(c+=f,d-=f,e+=f),a.beginPath(),a.fillStyle=this.fillColor,a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.moveTo(c,this.base),a.lineTo(c,e),a.lineTo(d,e),a.lineTo(d,this.base),a.fill(),this.showStroke&&a.stroke()},"height":function(){return this.base-this.y},"inRange":function(a,b){return a>=this.x-this.width/2&&a<=this.x+this.width/2&&b>=this.y&&b<=this.base}}),c.Tooltip=c.Element.extend({"draw":function(){var a=this.chart.ctx;a.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var b=this.caretPadding=2,c=a.measureText(this.text).width+2*this.xPadding,d=this.fontSize+2*this.yPadding,e=d+this.caretHeight+b;this.x+c/2>this.chart.width?this.xAlign="left":this.x-c/2<0&&(this.xAlign="right"),this.y-e<0&&(this.yAlign="below");var f=this.x-c/2,g=this.y-e;if(a.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":a.beginPath(),a.moveTo(this.x,this.y-b),a.lineTo(this.x+this.caretHeight,this.y-(b+this.caretHeight)),a.lineTo(this.x-this.caretHeight,this.y-(b+this.caretHeight)),a.closePath(),a.fill();break;case"below":g=this.y+b+this.caretHeight,a.beginPath(),a.moveTo(this.x,this.y+b),a.lineTo(this.x+this.caretHeight,this.y+b+this.caretHeight),a.lineTo(this.x-this.caretHeight,this.y+b+this.caretHeight),a.closePath(),a.fill()}switch(this.xAlign){case"left":f=this.x-c+(this.cornerRadius+this.caretHeight);break;case"right":f=this.x-(this.cornerRadius+this.caretHeight)}I(a,f,g,c,d,this.cornerRadius),a.fill(),a.fillStyle=this.textColor,a.textAlign="center",a.textBaseline="middle",a.fillText(this.text,f+c/2,g+d/2)}}}),c.MultiTooltip=c.Element.extend({"initialize":function(){this.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=G(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var a=this.ctx.measureText(this.title).width,b=H(this.ctx,this.font,this.labels)+this.fontSize+3,c=p([b,a]);this.width=c+2*this.xPadding;var d=this.height/2;this.y-d<0?this.y=d:this.y+d>this.chart.height&&(this.y=this.chart.height-d),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},"getLineHeight":function(a){var b=this.y-this.height/2+this.yPadding,c=a-1;return 0===a?b+this.titleFontSize/2:b+(1.5*this.fontSize*c+this.fontSize/2)+1.5*this.titleFontSize},"draw":function(){if(this.custom)this.custom(this);else{I(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var a=this.ctx;a.fillStyle=this.fillColor,a.fill(),a.closePath(),a.textAlign="left",a.textBaseline="middle",a.fillStyle=this.titleTextColor,a.font=this.titleFont,a.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),a.font=this.font,d.each(this.labels,function(b,c){a.fillStyle=this.textColor,a.fillText(b,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(c+1)),a.fillStyle=this.legendColorBackground,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize),a.fillStyle=this.legendColors[c].fill,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),c.Scale=c.Element.extend({"initialize":function(){this.fit()},"buildYLabels":function(){this.yLabels=[];for(var a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{"value":(this.min+b*this.stepValue).toFixed(a)}));this.yLabelWidth=this.display&&this.showLabels?H(this.ctx,this.font,this.yLabels):0},"addXLabel":function(a){this.xLabels.push(a),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-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var a,b=this.endPoint-this.startPoint;for(this.calculateYRange(b),this.buildYLabels(),this.calculateXLabelRotation();b>this.endPoint-this.startPoint;)b=this.endPoint-this.startPoint,a=this.yLabelWidth,this.calculateYRange(b),this.buildYLabels(),a<this.yLabelWidth&&this.calculateXLabelRotation()},"calculateXLabelRotation":function(){this.ctx.font=this.font;var a,b,c=this.ctx.measureText(this.xLabels[0]).width,d=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=d/2+3,this.xScalePaddingLeft=c/2>this.yLabelWidth+10?c/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var e,f=H(this.ctx,this.font,this.xLabels);this.xLabelWidth=f;for(var g=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>g&&0===this.xLabelRotation||this.xLabelWidth>g&&this.xLabelRotation<=90&&this.xLabelRotation>0;)e=Math.cos(s(this.xLabelRotation)),a=e*c,b=e*d,a+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=a+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=e*f;this.xLabelRotation>0&&(this.endPoint-=Math.sin(s(this.xLabelRotation))*f+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},"calculateYRange":k,"drawingArea":function(){return this.startPoint-this.endPoint},"calculateY":function(a){var b=this.drawingArea()/(this.min-this.max);return this.endPoint-b*(a-this.min)},"calculateX":function(a){var b=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),c=b/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),d=c*a+this.xScalePaddingLeft;return this.offsetGridLines&&(d+=c/2),Math.round(d)},"update":function(a){d.extend(this,a),this.fit()},"draw":function(){var a=this.ctx,b=(this.endPoint-this.startPoint)/this.steps,c=Math.round(this.xScalePaddingLeft);this.display&&(a.fillStyle=this.textColor,a.font=this.font,e(this.yLabels,function(e,f){var g=this.endPoint-b*f,h=Math.round(g),i=this.showHorizontalLines;a.textAlign="right",a.textBaseline="middle",this.showLabels&&a.fillText(e,c-10,g),0!==f||i||(i=!0),i&&a.beginPath(),f>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),h+=d.aliasPixel(a.lineWidth),i&&(a.moveTo(c,h),a.lineTo(this.width,h),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(c-5,h),a.lineTo(c,h),a.stroke(),a.closePath()},this),e(this.xLabels,function(b,c){var d=this.calculateX(c)+t(this.lineWidth),e=this.calculateX(c-(this.offsetGridLines?.5:0))+t(this.lineWidth),f=this.xLabelRotation>0,g=this.showVerticalLines;0!==c||g||(g=!0),g&&a.beginPath(),c>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),g&&(a.moveTo(e,this.endPoint),a.lineTo(e,this.startPoint-3),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(e,this.endPoint),a.lineTo(e,this.endPoint+5),a.stroke(),a.closePath(),a.save(),a.translate(d,f?this.endPoint+12:this.endPoint+8),a.rotate(-1*s(this.xLabelRotation)),a.font=this.font,a.textAlign=f?"right":"center",a.textBaseline=f?"middle":"top",a.fillText(b,0,0),a.restore()},this))}}),c.RadialScale=c.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(a){var b=this.drawingArea/(this.max-this.min);return(a-this.min)*b},"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 a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{"value":(this.min+b*this.stepValue).toFixed(a)}))},"getCircumference":function(){return 2*Math.PI/this.valuesCount},"setScaleSize":function(){var a,b,c,d,e,f,g,h,i,j,k,l,m=q([this.height/2-this.pointLabelFontSize-5,this.width/2]),n=this.width,p=0;for(this.ctx.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),b=0;b<this.valuesCount;b++)a=this.getPointPosition(b,m),c=this.ctx.measureText(v(this.templateString,{"value":this.labels[b]})).width+5,0===b||b===this.valuesCount/2?(d=c/2,a.x+d>n&&(n=a.x+d,e=b),a.x-d<p&&(p=a.x-d,g=b)):b<this.valuesCount/2?a.x+c>n&&(n=a.x+c,e=b):b>this.valuesCount/2&&a.x-c<p&&(p=a.x-c,g=b);i=p,j=Math.ceil(n-this.width),f=this.getIndexAngle(e),h=this.getIndexAngle(g),k=j/Math.sin(f+Math.PI/2),l=i/Math.sin(h+Math.PI/2),k=o(k)?k:0,l=o(l)?l:0,this.drawingArea=m-(l+k)/2,this.setCenterPoint(l,k)},"setCenterPoint":function(a,b){var c=this.width-b-this.drawingArea,d=a+this.drawingArea;this.xCenter=(d+c)/2,this.yCenter=this.height/2},"getIndexAngle":function(a){var b=2*Math.PI/this.valuesCount;return a*b-Math.PI/2},"getPointPosition":function(a,b){var c=this.getIndexAngle(a);return{"x":Math.cos(c)*b+this.xCenter,"y":Math.sin(c)*b+this.yCenter}},"draw":function(){if(this.display){var a=this.ctx;if(e(this.yLabels,function(b,c){if(c>0){var d,e=c*(this.drawingArea/this.steps),f=this.yCenter-e;if(this.lineWidth>0)if(a.strokeStyle=this.lineColor,a.lineWidth=this.lineWidth,this.lineArc)a.beginPath(),a.arc(this.xCenter,this.yCenter,e,0,2*Math.PI),a.closePath(),a.stroke();else{a.beginPath();for(var g=0;g<this.valuesCount;g++)d=this.getPointPosition(g,this.calculateCenterOffset(this.min+c*this.stepValue)),0===g?a.moveTo(d.x,d.y):a.lineTo(d.x,d.y);a.closePath(),a.stroke()}if(this.showLabels){if(a.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=a.measureText(b).width;a.fillStyle=this.backdropColor,a.fillRect(this.xCenter-h/2-this.backdropPaddingX,f-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=this.fontColor,a.fillText(b,this.xCenter,f)}}},this),!this.lineArc){a.lineWidth=this.angleLineWidth,a.strokeStyle=this.angleLineColor;for(var b=this.valuesCount-1;b>=0;b--){if(this.angleLineWidth>0){var c=this.getPointPosition(b,this.calculateCenterOffset(this.max));a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(c.x,c.y),a.stroke(),a.closePath()}var d=this.getPointPosition(b,this.calculateCenterOffset(this.max)+5);a.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),a.fillStyle=this.pointLabelFontColor;var f=this.labels.length,g=this.labels.length/2,h=g/2,i=h>b||b>f-h,j=b===h||b===f-h;0===b?a.textAlign="center":b===g?a.textAlign="center":g>b?a.textAlign="left":a.textAlign="right",j?a.textBaseline="middle":i?a.textBaseline="bottom":a.textBaseline="top",a.fillText(this.labels[b],d.x,d.y)}}}}}),d.addEvent(window,"resize",function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){e(c.instances,function(a){a.options.responsive&&a.resize(a.render,!0)})},50)}}()),n?define(function(){return c}):"object"==typeof module&&module.exports&&(module.exports=c),a.Chart=c,c.noConflict=function(){return a.Chart=b,c}}).call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"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>'};b.Type.extend({"name":"Bar","defaults":d,"initialize":function(a){var d=this.options;this.ScaleClass=b.Scale.extend({"offsetGridLines":!0,"calculateBarX":function(a,b,c){var e=this.calculateBaseWidth(),f=this.calculateX(c)-e/2,g=this.calculateBarWidth(a);return f+g*b+b*d.barDatasetSpacing+g/2},"calculateBaseWidth":function(){return this.calculateX(1)-this.calculateX(0)-2*d.barValueSpacing},"calculateBarWidth":function(a){var b=this.calculateBaseWidth()-(a-1)*d.barDatasetSpacing;return b/a}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getBarsAtEvent(a):[];this.eachBars(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),this.BarClass=b.Rectangle.extend({"strokeWidth":this.options.barStrokeWidth,"showStroke":this.options.barShowStroke,"ctx":this.chart.ctx}),c.each(a.datasets,function(b,d){var e={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"bars":[]};this.datasets.push(e),c.each(b.data,function(c,d){e.bars.push(new this.BarClass({"value":c,"label":a.labels[d],"datasetLabel":b.label,"strokeColor":b.strokeColor,"fillColor":b.fillColor,"highlightFill":b.highlightFill||b.fillColor,"highlightStroke":b.highlightStroke||b.strokeColor}))},this)},this),this.buildScale(a.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(a,b,d){c.extend(a,{"width":this.scale.calculateBarWidth(this.datasets.length),"x":this.scale.calculateBarX(this.datasets.length,d,b),"y":this.scale.endPoint}),a.save()},this),this.render()},"update":function(){this.scale.update(),c.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachBars(function(a){a.save()}),this.render()},"eachBars":function(a){c.each(this.datasets,function(b,d){c.each(b.bars,a,this,d)},this)},"getBarsAtEvent":function(a){for(var b,d=[],e=c.getRelativePosition(a),f=function(a){d.push(a.bars[b])},g=0;g<this.datasets.length;g++)for(b=0;b<this.datasets[g].bars.length;b++)if(this.datasets[g].bars[b].inRange(e.x,e.y))return c.each(this.datasets,f),d;return d},"buildScale":function(a){var b=this,d=function(){var a=[];return b.eachBars(function(b){a.push(b.value)}),a},e={"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(a){var b=c.calculateScaleRange(d(),a,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,b)},"xLabels":a,"font":c.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&&c.extend(e,{
  "calculateYRange":c.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(e)},"addData":function(a,b){c.each(a,function(a,c){this.datasets[c].bars.push(new this.BarClass({"value":a,"label":b,"x":this.scale.calculateBarX(this.datasets.length,c,this.scale.valuesCount+1),"y":this.scale.endPoint,"width":this.scale.calculateBarWidth(this.datasets.length),"base":this.scale.endPoint,"strokeColor":this.datasets[c].strokeColor,"fillColor":this.datasets[c].fillColor}))},this),this.scale.addXLabel(b),this.update()},"removeData":function(){this.scale.removeXLabel(),c.each(this.datasets,function(a){a.bars.shift()},this),this.update()},"reflow":function(){c.extend(this.BarClass.prototype,{"y":this.scale.endPoint,"base":this.scale.endPoint});var a=c.extend({"height":this.chart.height,"width":this.chart.width});this.scale.update(a)},"draw":function(a){var b=a||1;this.clear();this.chart.ctx;this.scale.draw(b),c.each(this.datasets,function(a,d){c.each(a.bars,function(a,c){a.hasValue()&&(a.base=this.scale.endPoint,a.transition({"x":this.scale.calculateBarX(this.datasets.length,d,c),"y":this.scale.calculateY(a.value),"width":this.scale.calculateBarWidth(this.datasets.length)},b).draw())},this)},this)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"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>'};b.Type.extend({"name":"Doughnut","defaults":d,"initialize":function(a){this.segments=[],this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=b.Arc.extend({"ctx":this.chart.ctx,"x":this.chart.width/2,"y":this.chart.height/2}),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.calculateTotal(a),c.each(a,function(a,b){this.addData(a,b,!0)},this),this.render()},"getSegmentsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},"addData":function(a,b,c){var d=b||this.segments.length;this.segments.splice(d,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":1.5*Math.PI,"circumference":this.options.animateRotate?0:this.calculateCircumference(a.value),"label":a.label})),c||(this.reflow(),this.update())},"calculateCircumference":function(a){return 2*Math.PI*(Math.abs(a)/this.total)},"calculateTotal":function(a){this.total=0,c.each(a,function(a){this.total+=Math.abs(a.value)},this)},"update":function(){this.calculateTotal(this.segments),c.each(this.activeElements,function(a){a.restore(["fillColor"])}),c.each(this.segments,function(a){a.save()}),this.render()},"removeData":function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},"reflow":function(){c.extend(this.SegmentArc.prototype,{"x":this.chart.width/2,"y":this.chart.height/2}),this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,c.each(this.segments,function(a){a.update({"outerRadius":this.outerRadius,"innerRadius":this.outerRadius/100*this.options.percentageInnerCutout})},this)},"draw":function(a){var b=a?a:1;this.clear(),c.each(this.segments,function(a,c){a.transition({"circumference":this.calculateCircumference(a.value),"outerRadius":this.outerRadius,"innerRadius":this.outerRadius/100*this.options.percentageInnerCutout},b),a.endAngle=a.startAngle+a.circumference,a.draw(),0===c&&(a.startAngle=1.5*Math.PI),c<this.segments.length-1&&(this.segments[c+1].startAngle=a.endAngle)},this)}}),b.types.Doughnut.extend({"name":"Pie","defaults":c.merge(d,{"percentageInnerCutout":0})})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"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>'};b.Type.extend({"name":"Line","defaults":d,"initialize":function(a){this.PointClass=b.Point.extend({"strokeWidth":this.options.pointDotStrokeWidth,"radius":this.options.pointDotRadius,"display":this.options.pointDot,"hitDetectionRadius":this.options.pointHitDetectionRadius,"ctx":this.chart.ctx,"inRange":function(a){return Math.pow(a-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getPointsAtEvent(a):[];this.eachPoints(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),c.each(a.datasets,function(b){var d={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"pointColor":b.pointColor,"pointStrokeColor":b.pointStrokeColor,"points":[]};this.datasets.push(d),c.each(b.data,function(c,e){d.points.push(new this.PointClass({"value":c,"label":a.labels[e],"datasetLabel":b.label,"strokeColor":b.pointStrokeColor,"fillColor":b.pointColor,"highlightFill":b.pointHighlightFill||b.pointColor,"highlightStroke":b.pointHighlightStroke||b.pointStrokeColor}))},this),this.buildScale(a.labels),this.eachPoints(function(a,b){c.extend(a,{"x":this.scale.calculateX(b),"y":this.scale.endPoint}),a.save()},this)},this),this.render()},"update":function(){this.scale.update(),c.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachPoints(function(a){a.save()}),this.render()},"eachPoints":function(a){c.each(this.datasets,function(b){c.each(b.points,a,this)},this)},"getPointsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.datasets,function(a){c.each(a.points,function(a){a.inRange(d.x,d.y)&&b.push(a)})},this),b},"buildScale":function(a){var d=this,e=function(){var a=[];return d.eachPoints(function(b){a.push(b.value)}),a},f={"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(a){var b=c.calculateScaleRange(e(),a,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,b)},"xLabels":a,"font":c.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&&c.extend(f,{"calculateYRange":c.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 b.Scale(f)},"addData":function(a,b){c.each(a,function(a,c){this.datasets[c].points.push(new this.PointClass({"value":a,"label":b,"x":this.scale.calculateX(this.scale.valuesCount+1),"y":this.scale.endPoint,"strokeColor":this.datasets[c].pointStrokeColor,"fillColor":this.datasets[c].pointColor}))},this),this.scale.addXLabel(b),this.update()},"removeData":function(){this.scale.removeXLabel(),c.each(this.datasets,function(a){a.points.shift()},this),this.update()},"reflow":function(){var a=c.extend({"height":this.chart.height,"width":this.chart.width});this.scale.update(a)},"draw":function(a){var b=a||1;this.clear();var d=this.chart.ctx,e=function(a){return null!==a.value},f=function(a,b,d){return c.findNextWhere(b,e,d)||a},g=function(a,b,d){return c.findPreviousWhere(b,e,d)||a};this.scale.draw(b),c.each(this.datasets,function(a){var h=c.where(a.points,e);c.each(a.points,function(a,c){a.hasValue()&&a.transition({"y":this.scale.calculateY(a.value),"x":this.scale.calculateX(c)},b)},this),this.options.bezierCurve&&c.each(h,function(a,b){var d=b>0&&b<h.length-1?this.options.bezierCurveTension:0;a.controlPoints=c.splineCurve(g(a,h,b),a,f(a,h,b),d),a.controlPoints.outer.y>this.scale.endPoint?a.controlPoints.outer.y=this.scale.endPoint:a.controlPoints.outer.y<this.scale.startPoint&&(a.controlPoints.outer.y=this.scale.startPoint),a.controlPoints.inner.y>this.scale.endPoint?a.controlPoints.inner.y=this.scale.endPoint:a.controlPoints.inner.y<this.scale.startPoint&&(a.controlPoints.inner.y=this.scale.startPoint)},this),d.lineWidth=this.options.datasetStrokeWidth,d.strokeStyle=a.strokeColor,d.beginPath(),c.each(h,function(a,b){if(0===b)d.moveTo(a.x,a.y);else if(this.options.bezierCurve){var c=g(a,h,b);d.bezierCurveTo(c.controlPoints.outer.x,c.controlPoints.outer.y,a.controlPoints.inner.x,a.controlPoints.inner.y,a.x,a.y)}else d.lineTo(a.x,a.y)},this),d.stroke(),this.options.datasetFill&&h.length>0&&(d.lineTo(h[h.length-1].x,this.scale.endPoint),d.lineTo(h[0].x,this.scale.endPoint),d.fillStyle=a.fillColor,d.closePath(),d.fill()),c.each(h,function(a){a.draw()})},this)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"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>'};b.Type.extend({"name":"PolarArea","defaults":d,"initialize":function(a){this.segments=[],this.SegmentArc=b.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 b.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(),c.each(a,function(a,b){this.addData(a,b,!0)},this),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.render()},"getSegmentsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},"addData":function(a,b,c){var d=b||this.segments.length;this.segments.splice(d,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":1.5*Math.PI})),c||(this.reflow(),this.update())},"removeData":function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},"calculateTotal":function(a){this.total=0,c.each(a,function(a){this.total+=a.value},this),this.scale.valuesCount=this.segments.length},"updateScaleRange":function(a){var b=[];c.each(a,function(a){b.push(a.value)});var d=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}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d,{"size":c.min([this.chart.width,this.chart.height]),"xCenter":this.chart.width/2,"yCenter":this.chart.height/2})},"update":function(){this.calculateTotal(this.segments),c.each(this.segments,function(a){a.save()}),this.reflow(),this.render()},"reflow":function(){c.extend(this.SegmentArc.prototype,{"x":this.chart.width/2,"y":this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),c.extend(this.scale,{"xCenter":this.chart.width/2,"yCenter":this.chart.height/2}),c.each(this.segments,function(a){a.update({"outerRadius":this.scale.calculateCenterOffset(a.value)})},this)},"draw":function(a){var b=a||1;this.clear(),c.each(this.segments,function(a,c){a.transition({"circumference":this.scale.getCircumference(),"outerRadius":this.scale.calculateCenterOffset(a.value)},b),a.endAngle=a.startAngle+a.circumference,0===c&&(a.startAngle=1.5*Math.PI),c<this.segments.length-1&&(this.segments[c+1].startAngle=a.endAngle),a.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.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(a){this.PointClass=b.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(a),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getPointsAtEvent(a):[];this.eachPoints(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),c.each(a.datasets,function(b){var d={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"pointColor":b.pointColor,"pointStrokeColor":b.pointStrokeColor,"points":[]};this.datasets.push(d),c.each(b.data,function(c,e){var f;this.scale.animation||(f=this.scale.getPointPosition(e,this.scale.calculateCenterOffset(c))),d.points.push(new this.PointClass({"value":c,"label":a.labels[e],"datasetLabel":b.label,"x":this.options.animation?this.scale.xCenter:f.x,"y":this.options.animation?this.scale.yCenter:f.y,"strokeColor":b.pointStrokeColor,"fillColor":b.pointColor,"highlightFill":b.pointHighlightFill||b.pointColor,"highlightStroke":b.pointHighlightStroke||b.pointStrokeColor}))},this)},this),this.render()},"eachPoints":function(a){c.each(this.datasets,function(b){c.each(b.points,a,this)},this)},"getPointsAtEvent":function(a){var b=c.getRelativePosition(a),d=c.getAngleFromPoint({"x":this.scale.xCenter,"y":this.scale.yCenter},b),e=2*Math.PI/this.scale.valuesCount,f=Math.round((d.angle-1.5*Math.PI)/e),g=[];return(f>=this.scale.valuesCount||0>f)&&(f=0),d.distance<=this.scale.drawingArea&&c.each(this.datasets,function(a){g.push(a.points[f])}),g},"buildScale":function(a){this.scale=new b.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":a.labels,"valuesCount":a.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(a.datasets),this.scale.buildYLabels()},"updateScaleRange":function(a){var b=function(){var b=[];return c.each(a,function(a){a.data?b=b.concat(a.data):c.each(a.points,function(a){b.push(a.value)})}),b}(),d=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}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d)},"addData":function(a,b){this.scale.valuesCount++,c.each(a,function(a,c){var d=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(a));this.datasets[c].points.push(new this.PointClass({"value":a,"label":b,"x":d.x,"y":d.y,"strokeColor":this.datasets[c].pointStrokeColor,"fillColor":this.datasets[c].pointColor}))},this),this.scale.labels.push(b),this.reflow(),this.update()},"removeData":function(){this.scale.valuesCount--,this.scale.labels.shift(),c.each(this.datasets,function(a){a.points.shift()},this),this.reflow(),this.update()},"update":function(){this.eachPoints(function(a){a.save()}),this.reflow(),this.render()},"reflow":function(){c.extend(this.scale,{"width":this.chart.width,"height":this.chart.height,"size":c.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(a){var b=a||1,d=this.chart.ctx;this.clear(),this.scale.draw(),c.each(this.datasets,function(a){c.each(a.points,function(a,c){a.hasValue()&&a.transition(this.scale.getPointPosition(c,this.scale.calculateCenterOffset(a.value)),b)},this),d.lineWidth=this.options.datasetStrokeWidth,d.strokeStyle=a.strokeColor,d.beginPath(),c.each(a.points,function(a,b){0===b?d.moveTo(a.x,a.y):d.lineTo(a.x,a.y)},this),d.closePath(),d.stroke(),d.fillStyle=a.fillColor,d.fill(),c.each(a.points,function(a){a.hasValue()&&a.draw()})},this)}})}.call(this);
  !function(){function a(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function b(a,b){return parseInt(a,b||10)}function c(a){return"string"==typeof a}function d(a){return"object"==typeof a}function e(a){return"number"==typeof a}function f(a){return U.log(a)/U.LN10}function g(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function h(a){return a!==F&&null!==a}function i(a,b,e){var f,g;if(c(b))h(e)?a.setAttribute(b,e):a&&a.getAttribute&&(g=a.getAttribute(b));else if(h(b)&&d(b))for(f in b)a.setAttribute(f,b[f]);return g}function j(a){return"[object Array]"===Object.prototype.toString.call(a)?a:[a]}function k(){var a,b,c=arguments,d=c.length;for(a=0;d>a;a++)if(b=c[a],"undefined"!=typeof b&&null!==b)return b}function l(b,c){ea&&c&&c.opacity!==F&&(c.filter="alpha(opacity="+100*c.opacity+")"),a(b.style,c)}function m(b,c,d,e,f){return b=S.createElement(b),c&&a(b,c),f&&l(b,{"padding":0,"border":va,"margin":0}),d&&l(b,d),e&&e.appendChild(b),b}function n(b,c){var d=function(){};return d.prototype=new b,a(d.prototype,c),d}function o(a,c,d,e){var f=B.lang;a=a;var g=isNaN(c=$(c))?2:c;c=void 0===d?f.decimalPoint:d,e=void 0===e?f.thousandsSep:e,f=0>a?"-":"",d=String(b(a=$(+a||0).toFixed(g)));var h=d.length>3?d.length%3:0;return f+(h?d.substr(0,h)+e:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+e)+(g?c+$(a-d).toFixed(g).slice(2):"")}function p(a){var b={"left":a.offsetLeft,"top":a.offsetTop};for(a=a.offsetParent;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a!==S.body&&a!==S.documentElement&&(b.left-=a.scrollLeft,b.top-=a.scrollTop),a=a.offsetParent;return b}function q(){this.symbol=this.color=0}function r(a,b,c,d,e,f,g){var h=g.x;g=g.y;var i,j=h-a+c-25,k=g-b+d+10;return 7>j&&(j=c+h+15),j+a>c+e&&(j-=j+a-(c+e),k-=b,i=!0),5>k?(k=5,i&&g>=k&&k+b>=g&&(k=g+b-5)):k+b>d+f&&(k=d+f-b-5),{"x":j,"y":k}}function s(a,b){var c,d=a.length;for(c=0;d>c;c++)a[c].ss_i=c;for(a.sort(function(a,c){var d=b(a,c);return 0===d?a.ss_i-c.ss_i:d}),c=0;d>c;c++)delete a[c].ss_i}function t(a){for(var b in a)a[b]&&a[b].destroy&&a[b].destroy(),delete a[b]}function u(a,b){D=k(a,b.animation)}function v(){var a=B.global.useUTC;G=a?Date.UTC:function(a,b,c,d,e,f){return new Date(a,b,k(c,1),k(d,0),k(e,0),k(f,0)).getTime()},H=a?"getUTCMinutes":"getMinutes",I=a?"getUTCHours":"getHours",J=a?"getUTCDay":"getDay",K=a?"getUTCDate":"getDate",L=a?"getUTCMonth":"getMonth",M=a?"getUTCFullYear":"getFullYear",N=a?"setUTCMinutes":"setMinutes",O=a?"setUTCHours":"setHours",P=a?"setUTCDate":"setDate",Q=a?"setUTCMonth":"setMonth",R=a?"setUTCFullYear":"setFullYear"}function w(a){A||(A=m(oa)),a&&A.appendChild(a),A.innerHTML=""}function x(){}function y(e,n){function v(c){function d(a,b){this.pos=a,this.minor=b,this.isNew=!0,b||this.addLabel()}function e(a){return a&&(this.options=a,this.id=a.id),this}function i(a,b,c,d){this.isNegative=b,this.options=a,this.x=c,this.stack=d,this.alignOptions={"align":a.align||(Gb?b?"left":"right":"center"),"verticalAlign":a.verticalAlign||(Gb?"middle":b?"bottom":"top"),"y":k(a.y,Gb?4:b?14:-6),"x":k(a.x,Gb?b?-6:6:0)},this.textAlign=a.textAlign||(Gb?b?"right":"left":"center")}function j(){var a,b=[],c=[];S=T=null,_=[],Da(dc,function(d){if(a=!1,Da(["xAxis","yAxis"],function(b){d.isCartesian&&("xAxis"===b&&ha||"yAxis"===b&&!ha)&&(d.options[b]===ma.index||d.options[b]===F&&0===ma.index)&&(d[b]=oa,_.push(d),a=!0)}),!d.visible&&Ca.ignoreHiddenSeries&&(a=!1),a){var e,f,g,j,l,m;ha||(e=d.options.stacking,ga="percent"===e,e&&(l=d.options.stack,j=d.type+k(l,""),m="-"+j,d.stackKey=j,f=b[j]||[],b[j]=f,g=c[m]||[],c[m]=g),ga&&(S=0,T=99)),d.isCartesian&&(Da(d.data,function(a){var b=a.x,c=a.y,d=0>c,n=d?g:f,o=d?m:j;null===S&&(S=T=a[ya]),ha?b>T?T=b:S>b&&(S=b):h(c)&&(e&&(n[b]=h(n[b])?n[b]+c:c),c=n?n[b]:c,a=k(a.low,c),ga||(c>T?T=c:S>a&&(S=a)),e&&(la[o]||(la[o]={}),la[o][b]||(la[o][b]=new i(ma.stackLabels,d,b,l)),la[o][b].setTotal(c)))}),/(area|column|bar)/.test(d.type)&&!ha&&(S>=0?(S=0,ea=!0):0>T&&(T=0,fa=!0)))}})}function l(a,b){var c,d;for(Oa=b?1:U.pow(10,W(U.log(a)/U.LN10)),c=a/Oa,b||(b=[1,2,2.5,5,10],(ma.allowDecimals===!1||sa)&&(1===Oa?b=[1,2,5,10]:.1>=Oa&&(b=[1/Oa]))),d=0;d<b.length&&(a=b[d],!(c<=(b[d]+(b[d+1]||b[d]))/2));d++);return a*=Oa}function m(a){var b;return b=a,Oa=k(Oa,U.pow(10,W(U.log(Ma)/U.LN10))),1>Oa&&(b=10*V(1/Oa),b=V(a*b)/b),b}function n(){var a,b,c,d,e=ma.tickInterval,g=ma.tickPixelInterval;if(a=ma.maxZoom||(!ha||h(ma.min)||h(ma.max)?null:Z(5*$b.smallestInterval,T-S)),v=ja?xb:wb,Ka?(c=$b[ha?"xAxis":"yAxis"][ma.linkedTo],d=c.getExtremes(),Ba=k(d.min,d.dataMin),Aa=k(d.max,d.dataMax)):(Ba=k(aa,ma.min,S),Aa=k(ba,ma.max,T)),sa&&(Ba=f(Ba),Aa=f(Aa)),a>Aa-Ba&&(d=(a-Aa+Ba)/2,Ba=Y(Ba-d,k(ma.min,Ba-d),S),Aa=Z(Ba+a,k(ma.max,Ba+a),T)),lb||ga||Ka||!h(Ba)||!h(Aa)||(a=Aa-Ba||1,h(ma.min)||h(aa)||!Ea||!(0>S)&&ea||(Ba-=a*Ea),h(ma.max)||h(ba)||!Fa||!(T>0)&&fa||(Aa+=a*Fa)),Ma=Ba===Aa?1:Ka&&!e&&g===c.options.tickPixelInterval?c.tickInterval:k(e,lb?1:(Aa-Ba)*g/v),qa||h(ma.tickInterval)||(Ma=l(Ma)),oa.tickInterval=Ma,Na="auto"===ma.minorTickInterval&&Ma?Ma/5:ma.minorTickInterval,qa){Pa=[],e=B.global.useUTC;var i=1e3/na,j=6e4/na,n=36e5/na;g=864e5/na,a=6048e5/na,d=2592e6/na;var o=31556952e3/na,p=[["second",i,[1,2,5,10,15,30]],["minute",j,[1,2,5,10,15,30]],["hour",n,[1,2,3,4,6,8,12]],["day",g,[1,2]],["week",a,[1,2]],["month",d,[1,2,3,4,6]],["year",o,null]],q=p[6],r=q[1],s=q[2];for(c=0;c<p.length&&(q=p[c],r=q[1],s=q[2],!(p[c+1]&&Ma<=(r*s[s.length-1]+p[c+1][1])/2));c++);for(r===o&&5*r>Ma&&(s=[1,2,5]),p=l(Ma/r,s),s=new Date(Ba*na),s.setMilliseconds(0),r>=i&&s.setSeconds(r>=j?0:p*W(s.getSeconds()/p)),r>=j&&s[N](r>=n?0:p*W(s[H]()/p)),r>=n&&s[O](r>=g?0:p*W(s[I]()/p)),r>=g&&s[P](r>=d?1:p*W(s[K]()/p)),r>=d&&(s[Q](r>=o?0:p*W(s[L]()/p)),b=s[M]()),r>=o&&(b-=b%p,s[R](b)),r===a&&s[P](s[K]()-s[J]()+ma.startOfWeek),c=1,b=s[M](),i=s.getTime()/na,j=s[L](),n=s[K]();Aa>i&&xb>c;)Pa.push(i),r===o?i=G(b+c*p,0)/na:r===d?i=G(b,j+c*p)/na:e||r!==g&&r!==a?i+=r*p:i=G(b,j,n+c*p*(r===g?1:7)),c++;Pa.push(i),cb=ma.dateTimeLabelFormats[q[0]]}else for(c=m(W(Ba/Ma)*Ma),b=m(X(Aa/Ma)*Ma),Pa=[],c=m(c);b>=c;)Pa.push(c),c=m(c+Ma);Ka||((lb||ha&&$b.hasColumn)&&(b=.5*(lb?1:Ma),(lb||!h(k(ma.min,aa)))&&(Ba-=b),(lb||!h(k(ma.max,ba)))&&(Aa+=b)),b=Pa[0],c=Pa[Pa.length-1],ma.startOnTick?Ba=b:Ba>b&&Pa.shift(),ma.endOnTick?Aa=c:c>Aa&&Pa.pop(),Fb||(Fb={"x":0,"y":0}),!qa&&Pa.length>Fb[ya]&&(Fb[ya]=Pa.length))}function p(){var a,b;if(ca=Ba,da=Aa,j(),n(),x=w,w=v/(Aa-Ba||1),!ha)for(a in la)for(b in la[a])la[a][b].cum=la[a][b].total;oa.isDirty||(oa.isDirty=Ba!==ca||Aa!==da)}function q(a){return a=new e(a).render(),db.push(a),a}function r(){var a,c,f=ma.title,g=ma.stackLabels,i=ma.alternateGridColor,j=ma.lineWidth,k=(a=$b.hasRendered)&&h(ca)&&!isNaN(ca);if(c=_.length&&h(Ba)&&h(Aa),v=ja?xb:wb,w=v/(Aa-Ba||1),za=ja?_a:$a,c||Ka){if(Na&&!lb)for(c=Ba+(Pa[0]-Ba)%Na;Aa>=c;c+=Na)fb[c]||(fb[c]=new d(c,!0)),k&&fb[c].isNew&&fb[c].render(null,!0),fb[c].isActive=!0,fb[c].render();Da(Pa,function(a,b){(!Ka||a>=Ba&&Aa>=a)&&(k&&eb[a].isNew&&eb[a].render(b,!0),eb[a].isActive=!0,eb[a].render(b))}),i&&Da(Pa,function(a,b){b%2===0&&Aa>a&&(gb[a]||(gb[a]=new e),gb[a].options={"from":a,"to":Pa[b+1]!==F?Pa[b+1]:Aa,"color":i},gb[a].render(),gb[a].isActive=!0)}),a||Da((ma.plotLines||[]).concat(ma.plotBands||[]),function(a){db.push(new e(a).render())})}if(Da([eb,fb,gb],function(a){for(var b in a)a[b].isActive?a[b].isActive=!1:(a[b].destroy(),delete a[b])}),j&&(a=_a+(ia?xb:0)+va,c=ib-$a-(ia?wb:0)+va,a=Hb.crispLine([wa,ja?_a:a,ja?c:Xa,xa,ja?hb-Za:a,ja?c:ib-$a],j),E?E.animate({"d":a}):E=Hb.path(a).attr({"stroke":ma.lineColor,"stroke-width":j,"zIndex":7}).add()),u&&(a=ja?_a:Xa,j=b(f.style.fontSize||12),a={"low":a+(ja?0:v),"middle":a+v/2,"high":a+(ja?v:0)}[f.align],j=(ja?Xa+wb:_a)+(ja?1:-1)*(ia?-1:1)*bb+(2===ka?j:0),u[u.isNew?"attr":"animate"]({"x":ja?a:j+(ia?xb:0)+va+(f.x||0),"y":ja?j-(ia?wb:0)+va:a+(f.y||0)}),u.isNew=!1),g&&g.enabled){var l,m;g=oa.stackTotalGroup,g||(oa.stackTotalGroup=g=Hb.g("stack-labels").attr({"visibility":ta,"zIndex":6}).translate(_a,Xa).add());for(l in la){f=la[l];for(m in f)f[m].render(g)}}oa.isDirty=!1}function s(a){for(var b=db.length;b--;)db[b].id===a&&db[b].destroy()}var u,v,w,x,y,z,A,D,E,S,T,_,aa,ba,ca,da,ea,fa,ga,ha=c.isX,ia=c.opposite,ja=Gb?!ha:ha,ka=ja?ia?0:2:ia?1:3,la={},ma=Ga(ha?Qa:Ra,[Va,Ta,Ua,Sa][ka],c),oa=this,pa=ma.type,qa="datetime"===pa,sa="logarithmic"===pa,va=ma.offset||0,ya=ha?"x":"y",za=ja?_a:$a,Aa=null,Ba=null,Ea=ma.minPadding,Fa=ma.maxPadding,Ka=h(ma.linkedTo);pa=ma.events;var La,Ma,Na,Oa,Pa,Wa,Ya,bb,cb,db=[],eb={},fb={},gb={},lb=ma.categories,mb=ma.labels.formatter||function(){var a=this.value;return cb?C(cb,a):Ma%1e6===0?a/1e6+"M":Ma%1e3===0?a/1e3+"k":!lb&&a>=1e3?o(a,0):a},nb=ja&&ma.labels.staggerLines,ob=ma.reversed,pb=lb&&"between"===ma.tickmarkPlacement?.5:0;d.prototype={"addLabel":function(){var b=this.pos,c=ma.labels,d=!(b===Ba&&!k(ma.showFirstLabel,1)||b===Aa&&!k(ma.showLastLabel,0)),e=lb&&ja&&lb.length&&!c.step&&!c.staggerLines&&!c.rotation&&xb/lb.length||!ja&&xb/2,f=lb&&h(lb[b])?lb[b]:b,g=this.label;b=mb.call({"isFirst":b===Pa[0],"isLast":b===Pa[Pa.length-1],"dateTimeLabelFormat":cb,"value":sa?U.pow(10,f):f}),e=e&&{"width":Y(1,V(e-2*(c.padding||10)))+ua},e=a(e,c.style),g===F?this.label=h(b)&&d&&c.enabled?Hb.text(b,0,0,c.useHTML).attr({"align":c.align,"rotation":c.rotation}).css(e).add(A):null:g&&g.attr({"text":b}).css(e)},"getLabelSize":function(){var a=this.label;return a?(this.labelBBox=a.getBBox())[ja?"height":"width"]:0},"render":function(a,c){var d,e=!this.minor,f=this.label,g=this.pos,i=ma.labels,j=this.gridLine,k=e?ma.gridLineWidth:ma.minorGridLineWidth,l=e?ma.gridLineColor:ma.minorGridLineColor,m=e?ma.gridLineDashStyle:ma.minorGridLineDashStyle,n=this.mark,o=e?ma.tickLength:ma.minorTickLength,p=e?ma.tickWidth:ma.minorTickWidth||0,q=e?ma.tickColor:ma.minorTickColor,r=e?ma.tickPosition:ma.minorTickPosition,s=i.step,t=c&&kb||ib;d=ja?y(g+pb,null,null,c)+za:_a+va+(ia?(c&&jb||hb)-Za-_a:0),t=ja?t-$a+va-(ia?wb:0):t-y(g+pb,null,null,c)-za,k&&(g=z(g+pb,k,c),j===F&&(j={"stroke":l,"stroke-width":k},m&&(j.dashstyle=m),e&&(j.zIndex=1),this.gridLine=j=k?Hb.path(g).attr(j).add(D):null),!c&&j&&g&&j.animate({"d":g})),p&&("inside"===r&&(o=-o),ia&&(o=-o),e=Hb.crispLine([wa,d,t,xa,d+(ja?0:-o),t+(ja?o:0)],p),n?n.animate({"d":e}):this.mark=Hb.path(e).attr({"stroke":q,"stroke-width":p}).add(A)),f&&!isNaN(d)&&(d=d+i.x-(pb&&ja?pb*w*(ob?-1:1):0),t=t+i.y-(pb&&!ja?pb*w*(ob?1:-1):0),h(i.y)||(t+=.9*b(f.styles.lineHeight)-f.getBBox().height/2),nb&&(t+=a/(s||1)%nb*16),s&&f[a%s?"hide":"show"](),f[this.isNew?"attr":"animate"]({"x":d,"y":t})),this.isNew=!1},"destroy":function(){t(this)}},e.prototype={"render":function(){var a,b,c,d=this,e=d.options,g=e.label,i=d.label,j=e.width,l=e.to,m=e.from,n=e.value,o=e.dashStyle,p=d.svgElem,q=[],r=e.color;c=e.zIndex;var s=e.events;if(sa&&(m=f(m),l=f(l),n=f(n)),j)q=z(n,j),e={"stroke":r,"stroke-width":j},o&&(e.dashstyle=o);else{if(!h(m)||!h(l))return;m=Y(m,Ba),l=Z(l,Aa),a=z(l),(q=z(m))&&a?q.push(a[4],a[5],a[1],a[2]):q=null,e={"fill":r}}if(h(c)&&(e.zIndex=c),p)q?p.animate({"d":q},null,p.onGetPath):(p.hide(),p.onGetPath=function(){p.show()});else if(q&&q.length&&(d.svgElem=p=Hb.path(q).attr(e).add(),s)){o=function(a){p.on(a,function(b){s[a].apply(d,[b])})};for(b in s)o(b)}return g&&h(g.text)&&q&&q.length&&xb>0&&wb>0?(g=Ga({"align":ja&&a&&"center","x":ja?!a&&4:10,"verticalAlign":!ja&&a&&"middle","y":ja?a?16:10:a?6:-4,"rotation":ja&&!a&&90},g),i||(d.label=i=Hb.text(g.text,0,0).attr({"align":g.textAlign||g.align,"rotation":g.rotation,"zIndex":c}).css(g.style).add()),a=[q[1],q[4],k(q[6],q[1])],q=[q[2],q[5],k(q[7],q[2])],b=Z.apply(U,a),c=Z.apply(U,q),i.align(g,!1,{"x":b,"y":c,"width":Y.apply(U,a)-b,"height":Y.apply(U,q)-c}),i.show()):i&&i.hide(),d},"destroy":function(){t(this),g(db,this)}},i.prototype={"destroy":function(){t(this)},"setTotal":function(a){this.cum=this.total=a},"render":function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({"text":b,"visibility":ra}):this.label=$b.renderer.text(b,0,0).css(this.options.style).attr({"align":this.textAlign,"rotation":this.options.rotation,"visibility":ra}).add(a)},"setOffset":function(a,b){var c=this.isNegative,d=oa.translate(this.total),e=oa.translate(0);e=$(d-e);var f=$b.xAxis[0].translate(this.x)+a,g=$b.plotHeight;c={"x":Gb?c?d:d-e:f,"y":Gb?g-f-b:c?g-d-e:g-d,"width":Gb?e:b,"height":Gb?b:e},this.label&&this.label.align(this.alignOptions,null,c).attr({"visibility":ta})}},y=function(a,b,c,d,e){var g=1,h=0,i=d?x:w;return d=d?ca:Ba,i||(i=w),c&&(g*=-1,h=v),ob&&(g*=-1,h-=g*v),b?(ob&&(a=v-a),a=a/i+d,sa&&e&&(a=U.pow(10,a))):(sa&&e&&(a=f(a)),a=g*(a-d)*i+h),a},z=function(a,b,c){var d,e,f;a=y(a,null,null,c);var g,h=c&&kb||ib,i=c&&jb||hb;return c=e=V(a+za),d=f=V(h-a-za),isNaN(a)?g=!0:ja?(d=Xa,f=h-$a,(_a>c||c>_a+xb)&&(g=!0)):(c=_a,e=i-Za,(Xa>d||d>Xa+wb)&&(g=!0)),g?null:Hb.crispLine([wa,c,d,xa,e,f],b||0)},Gb&&ha&&ob===F&&(ob=!0),a(oa,{"addPlotBand":q,"addPlotLine":q,"adjustTickAmount":function(){if(Fb&&!qa&&!lb&&!Ka){var a=Wa,b=Pa.length;if(Wa=Fb[ya],Wa>b){for(;Pa.length<Wa;)Pa.push(m(Pa[Pa.length-1]+Ma));w*=(b-1)/(Wa-1),Aa=Pa[Pa.length-1]}h(a)&&Wa!==a&&(oa.isDirty=!0)}},"categories":lb,"getExtremes":function(){return{"min":Ba,"max":Aa,"dataMin":S,"dataMax":T,"userMin":aa,"userMax":ba}},"getPlotLinePath":z,"getThreshold":function(a){return Ba>a?a=Ba:a>Aa&&(a=Aa),y(a,0,1)},"isXAxis":ha,"options":ma,"plotLinesAndBands":db,"getOffset":function(){var a,b=_.length&&h(Ba)&&h(Aa),c=0,e=0,f=ma.title,g=ma.labels,i=[-1,1,1,-1][ka];if(A||(A=Hb.g("axis").attr({"zIndex":7}).add(),D=Hb.g("grid").attr({"zIndex":1}).add()),Ya=0,b||Ka)Da(Pa,function(a){eb[a]?eb[a].addLabel():eb[a]=new d(a),(0===ka||2===ka||{"1":"left","3":"right"}[ka]===g.align)&&(Ya=Y(eb[a].getLabelSize(),Ya))}),nb&&(Ya+=16*(nb-1));else for(a in eb)eb[a].destroy(),delete eb[a];f&&f.text&&(u||(u=oa.axisTitle=Hb.text(f.text,0,0,f.useHTML).attr({"zIndex":7,"rotation":f.rotation||0,"align":f.textAlign||{"low":"left","middle":"center","high":"right"}[f.align]}).css(f.style).add(),u.isNew=!0),c=u.getBBox()[ja?"height":"width"],e=k(f.margin,ja?5:10)),va=i*(ma.offset||ab[ka]),bb=Ya+(2!==ka&&Ya&&i*ma.labels[ja?"y":"x"])+e,ab[ka]=Y(ab[ka],bb+c+i*va)},"render":r,"setCategories":function(a,b){oa.categories=c.categories=lb=a,Da(_,function(a){a.translate(),a.setTooltipPoints(!0)}),oa.isDirty=!0,k(b,!0)&&$b.redraw()},"setExtremes":function(a,b,c,d){c=k(c,!0),Ja(oa,"setExtremes",{"min":a,"max":b},function(){aa=a,ba=b,c&&$b.redraw(d)})},"setScale":p,"setTickPositions":n,"translate":y,"redraw":function(){yb.resetTracker&&yb.resetTracker(),r(),Da(db,function(a){a.render()}),Da(_,function(a){a.isDirty=!0})},"removePlotBand":s,"removePlotLine":s,"reversed":ob,"stacks":la,"destroy":function(){var a;Ia(oa);for(a in la)t(la[a]),la[a]=null;oa.stackTotalGroup&&(oa.stackTotalGroup=oa.stackTotalGroup.destroy()),Da([eb,fb,gb,db],function(a){t(a)}),Da([E,A,D,u],function(a){a&&a.destroy()}),E=A=D=u=null}});for(La in pa)Ha(oa,La,pa[La]);p()}function x(){var a={};return{"add":function(b,c,d,f){a[b]||(c=Hb.text(c,0,0).css(e.toolbar.itemStyle).align({"align":"right","x":-Za-20,"y":Xa+30}).on("click",f).attr({"align":"right","zIndex":20}).add(),a[b]=c)},"remove":function(b){w(a[b].element),a[b]=null}}}function y(a){function d(){var a=this.points||j(this),b=a[0].series.xAxis,d=this.x;b=b&&"datetime"===b.options.type;var e,f=c(d)||b;return e=f?['<span style="font-size: 10px">'+(b?C("%A, %b %e, %Y",d):d)+"</span>"]:[],Da(a,function(a){e.push(a.point.tooltipFormatter(f))}),e.join("<br/>")}function e(a,b){t=s?a:(2*t+a)/3,u=s?b:(u+b)/2,v.translate(t,u),Ib=$(a-t)>1||$(b-u)>1?function(){e(a,b)}:null}function f(){if(!s){var a=$b.hoverPoints;v.hide(),Da(m,function(a){a&&a.hide()}),a&&Da(a,function(a){a.setState()}),$b.hoverPoints=null,s=!0}}var g,h,i,k=a.borderWidth,l=a.crosshairs,m=[],n=a.style,o=a.shared,p=b(n.padding),q=k+p,s=!0,t=0,u=0;n.padding=0;var v=Hb.g("tooltip").attr({"zIndex":8}).add(),w=Hb.rect(q,q,0,0,a.borderRadius,k).attr({"fill":a.backgroundColor,"stroke-width":k}).add(v).shadow(a.shadow),x=Hb.text("",p+q,b(n.fontSize)+p+q,a.useHTML).attr({"zIndex":1}).css(n).add(v);return v.hide(),{"shared":o,"refresh":function(b){var c,k,n,t=0,u={},y=[];if(n=b.tooltipPos,c=a.formatter||d,u=$b.hoverPoints,o?(u&&Da(u,function(a){a.setState()}),$b.hoverPoints=b,Da(b,function(a){a.setState(Aa),t+=a.plotY,y.push(a.getLabelConfig())}),k=b[0].plotX,t=V(t)/b.length,u={"x":b[0].category},u.points=y,b=b[0]):u=b.getLabelConfig(),u=c.call(u),g=b.series,k=o?k:b.plotX,t=o?t:b.plotY,c=V(n?n[0]:Gb?xb-t:k),k=V(n?n[1]:Gb?wb-k:t),n=o||!b.series.isCartesian||qb(c,k),u!==!1&&n?(s&&(v.show(),s=!1),x.attr({"text":u}),n=x.getBBox(),h=n.width+2*p,i=n.height+2*p,w.attr({"width":h,"height":i,"stroke":a.borderColor||b.color||g.color||"#606060"}),c=r(h,i,_a,Xa,xb,wb,{"x":c,"y":k}),e(V(c.x-q),V(c.y-q))):f(),l)for(l=j(l),c=l.length;c--;)k=b.series[c?"yAxis":"xAxis"],l[c]&&k&&(k=k.getPlotLinePath(b[c?"y":"x"],1),m[c]?m[c].attr({"d":k,"visibility":ta}):(n={"stroke-width":l[c].width||1,"stroke":l[c].color||"#C0C0C0","zIndex":2},l[c].dashStyle&&(n.dashstyle=l[c].dashStyle),m[c]=Hb.path(k).attr(n).add()))},"hide":f,"destroy":function(){Da(m,function(a){a&&a.destroy()}),Da([w,x,v],function(a){a&&a.destroy()}),w=x=v=null}}}function A(b){function c(b){var c,d,e,f,g=ga&&S.width/S.body.scrollWidth-1;return b=b||T.event,b.target||(b.target=b.srcElement),c=b.touches?b.touches.item(0):b,("mousemove"!==b.type||T.opera||g)&&(Eb=p(db),d=Eb.left,e=Eb.top),ea?(f=b.x,c=b.y):c.layerX===F?(f=c.pageX-d,c=c.pageY-e):(f=b.layerX,c=b.layerY),g&&(f+=V((g+1)*d-d),c+=V((g+1)*e-e)),a(b,{"chartX":f,"chartY":c})}function d(a){var b={"xAxis":[],"yAxis":[]};return Da(cc,function(c){var d=c.translate,e=c.isXAxis;b[e?"xAxis":"yAxis"].push({"axis":c,"value":d((Gb?!e:e)?a.chartX-_a:wb-a.chartY+Xa,!0)})}),b}function e(){var a=$b.hoverSeries,b=$b.hoverPoint;b&&b.onMouseOut(),a&&a.onMouseOut(),rb&&rb.hide(),Kb=null}function f(){if(m){var a={"xAxis":[],"yAxis":[]},b=m.getBBox(),c=b.x-_a,d=b.y-Xa;l&&(Da(cc,function(e){var f=e.translate,g=e.isXAxis,h=Gb?!g:g,i=f(h?c:wb-d-b.height,!0,0,0,1);f=f(h?c+b.width:wb-d,!0,0,0,1),a[g?"xAxis":"yAxis"].push({"axis":e,"min":Z(i,f),"max":Y(i,f)})}),Ja($b,"selection",a,Qb)),m=m.destroy()}$b.mouseIsDown=sb=l=!1,Ia(S,ka?"touchend":"mouseup",f)}function g(a){var b=h(a.pageX)?a.pageX:a.page.x;a=h(a.pageX)?a.pageY:a.page.y,Eb&&!qb(b-Eb.left-_a,a-Eb.top-Xa)&&e()}var j,k,l,m,n=Ca.zoomType,o=/x/.test(n),q=/y/.test(n),r=o&&!Gb||q&&Gb,s=q&&!Gb||o&&Gb;Ab=function(){zb?(zb.translate(_a,Xa),Gb&&zb.attr({"width":$b.plotWidth,"height":$b.plotHeight}).invert()):$b.trackerGroup=zb=Hb.g("tracker").attr({"zIndex":9}).add()},Ab(),b.enabled&&($b.tooltip=rb=y(b)),function(){db.onmousedown=function(a){a=c(a),!ka&&a.preventDefault&&a.preventDefault(),$b.mouseIsDown=sb=!0,j=a.chartX,k=a.chartY,Ha(S,ka?"touchend":"mouseup",f)};var h=function(a){if(!(a&&a.touches&&a.touches.length>1)){a=c(a),ka||(a.returnValue=!1);var d=a.chartX,e=a.chartY,f=!qb(d-_a,e-Xa);if(Eb||(Eb=p(db)),ka&&"touchstart"===a.type&&(i(a.target,"isTracker")?$b.runTrackerClick||a.preventDefault():!_b&&!f&&a.preventDefault()),f&&(_a>d?d=_a:d>_a+xb&&(d=_a+xb),Xa>e?e=Xa:e>Xa+wb&&(e=Xa+wb)),sb&&"touchstart"!==a.type)l=Math.sqrt(Math.pow(j-d,2)+Math.pow(k-e,2)),l>10&&(ac&&(o||q)&&qb(j-_a,k-Xa)&&(m||(m=Hb.rect(_a,Xa,r?1:xb,s?1:wb,0).attr({"fill":Ca.selectionMarkerFill||"rgba(69,114,167,0.25)","zIndex":7}).add())),m&&r&&(d-=j,m.attr({"width":$(d),"x":(d>0?0:d)+j})),m&&s&&(e-=k,m.attr({"height":$(e),"y":(e>0?0:e)+k})));else if(!f){var g;e=$b.hoverPoint,d=$b.hoverSeries;var h,n,t=hb,u=Gb?a.chartY:a.chartX-_a;if(rb&&b.shared){for(g=[],h=dc.length,n=0;h>n;n++)dc[n].visible&&dc[n].tooltipPoints.length&&(a=dc[n].tooltipPoints[u],a._dist=$(u-a.plotX),t=Z(t,a._dist),g.push(a));for(h=g.length;h--;)g[h]._dist>t&&g.splice(h,1);g.length&&g[0].plotX!==Kb&&(rb.refresh(g),Kb=g[0].plotX)}d&&d.tracker&&(a=d.tooltipPoints[u])&&a!==e&&a.onMouseOver()}return f||!ac}};db.onmousemove=h,Ha(db,"mouseleave",e),Ha(S,"mousemove",g),db.ontouchstart=function(a){(o||q)&&db.onmousedown(a),h(a)},db.ontouchmove=h,db.ontouchend=function(){l&&e()},db.onclick=function(b){var e=$b.hoverPoint;if(b=c(b),b.cancelBubble=!0,!l)if(e&&i(b.target,"isTracker")){var f=e.plotX,g=e.plotY;a(e,{"pageX":Eb.left+_a+(Gb?xb-g:f),"pageY":Eb.top+Xa+(Gb?wb-f:g)}),Ja(e.series,"click",a(b,{"point":e})),e.firePointEvent("click",b)}else a(b,d(b)),qb(b.chartX-_a,b.chartY-Xa)&&Ja($b,"click",b);l=!1}}(),Jb=setInterval(function(){Ib&&Ib()},32),a(this,{"zoomX":o,"zoomY":q,"resetTracker":e,"destroy":function(){$b.trackerGroup&&($b.trackerGroup=zb=$b.trackerGroup.destroy()),Ia(S,"mousemove",g),db.onclick=db.onmousedown=db.onmousemove=db.ontouchstart=db.ontouchend=db.ontouchmove=null}})}function E(a){var b=a.type||Ca.type||Ca.defaultSeriesType,c=Ma[b],d=$b.hasRendered;return d&&(Gb&&"column"===b?c=Ma.bar:Gb||"bar"!==b||(c=Ma.column)),b=new c,b.init($b,a),!d&&b.inverted&&(Gb=!0),b.isCartesian&&(ac=b.isCartesian),dc.push(b),b}function _(){Ca.alignTicks!==!1&&Da(cc,function(a){a.adjustTickAmount()}),Fb=null}function aa(a){var b,c=$b.isDirtyLegend,d=$b.isDirtyBox,e=dc.length,f=e,g=$b.clipRect;for(u(a,$b);f--;)if(a=dc[f],a.isDirty&&a.options.stacking){b=!0;break}if(b)for(f=e;f--;)a=dc[f],a.options.stacking&&(a.isDirty=!0);Da(dc,function(a){a.isDirty&&(a.cleanData(),a.getSegments(),"point"===a.options.legendType&&(c=!0))}),c&&Bb.renderLegend&&(Bb.renderLegend(),$b.isDirtyLegend=!1),ac&&(bc||(Fb=null,Da(cc,function(a){a.setScale()})),_(),Mb(),Da(cc,function(a){(a.isDirty||d)&&(a.redraw(),d=!0)})),d&&(Lb(),Ab(),g&&(La(g),g.animate({"width":$b.plotSizeX,"height":$b.plotSizeY}))),Da(dc,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()}),yb&&yb.resetTracker&&yb.resetTracker(),Ja($b,"redraw")}function ba(){var a,b=e.xAxis||{},c=e.yAxis||{};b=j(b),Da(b,function(a,b){a.index=b,a.isX=!0}),c=j(c),Da(c,function(a,b){a.index=b}),cc=b.concat(c),$b.xAxis=[],$b.yAxis=[],cc=Fa(cc,function(b){return a=new v(b),$b[a.isXAxis?"xAxis":"yAxis"].push(a),a}),_()}function ca(a,b){Pa=Ga(e.title,a),Wa=Ga(e.subtitle,b),Da([["title",a,Pa],["subtitle",b,Wa]],function(a){var b=a[0],c=$b[b],d=a[1];a=a[2],c&&d&&(c=c.destroy()),a&&a.text&&!c&&($b[b]=Hb.text(a.text,0,0,a.useHTML).attr({"align":a.align,"class":"highcharts-"+b,"zIndex":1}).css(a.style).add().align(a,!1,Oa))})}function da(){bb=Ca.renderTo,eb=sa+ma++,c(bb)&&(bb=S.getElementById(bb)),bb.innerHTML="",bb.offsetWidth||(cb=bb.cloneNode(0),l(cb,{"position":pa,"top":"-9999px","display":""}),S.body.appendChild(cb)),fb=(cb||bb).offsetWidth,gb=(cb||bb).offsetHeight,$b.chartWidth=hb=Ca.width||fb||600,$b.chartHeight=ib=Ca.height||(gb>19?gb:400),$b.container=db=m(oa,{"className":"highcharts-container"+(Ca.className?" "+Ca.className:""),"id":eb},a({"position":qa,"overflow":ra,"width":hb+ua,"height":ib+ua,"textAlign":"left"},Ca.style),cb||bb),$b.renderer=Hb=Ca.forExport?new Ya(db,hb,ib,!0):new z(db,hb,ib);var d,e;ha&&db.getBoundingClientRect&&(d=function(){l(db,{"left":0,"top":0}),e=db.getBoundingClientRect(),l(db,{"left":-(e.left-b(e.left))+ua,"top":-(e.top-b(e.top))+ua})},d(),Ha(T,"resize",d),Ha($b,"destroy",function(){Ia(T,"resize",d)}))}function fa(){function a(){var a=Ca.width||bb.offsetWidth,c=Ca.height||bb.offsetHeight;a&&c&&((a!==fb||c!==gb)&&(clearTimeout(b),b=setTimeout(function(){Pb(a,c,!1)},100)),fb=a,gb=c)}var b;Ha(T,"resize",a),Ha($b,"destroy",function(){Ia(T,"resize",a)})}function ja(){Ja($b,"endResize",null,function(){bc-=1})}function la(){var c,d=e.labels,f=e.credits;ca(),Bb=$b.legend=new ec,Mb(),Da(cc,function(a){a.setTickPositions(!0)}),_(),Mb(),Lb(),ac&&Da(cc,function(a){a.render()}),$b.seriesGroup||($b.seriesGroup=Hb.g("series-group").attr({"zIndex":3}).add()),Da(dc,function(a){a.translate(),a.setTooltipPoints(),a.render()}),d.items&&Da(d.items,function(){var c=a(d.style,this.style),e=b(c.left)+_a,f=b(c.top)+Xa+12;delete c.left,delete c.top,Hb.text(this.html,e,f).attr({"zIndex":2}).css(c).add()}),$b.toolbar||($b.toolbar=x()),f.enabled&&!$b.credits&&(c=f.href,$b.credits=Hb.text(f.text,0,0).on("click",function(){c&&(location.href=c)}).attr({"align":f.position.align,"zIndex":8}).css(f.style).add().align(f.position)),Ab(),$b.hasRendered=!0,cb&&(bb.appendChild(db),w(cb))}function ya(){var a,b=db&&db.parentNode;if(null!==$b){for(Ja($b,"destroy"),Ia(T,"unload",ya),Ia($b),a=cc.length;a--;)cc[a]=cc[a].destroy();for(a=dc.length;a--;)dc[a]=dc[a].destroy();Da(["title","subtitle","seriesGroup","clipRect","credits","tracker"],function(a){var b=$b[a];b&&($b[a]=b.destroy())}),Da([lb,ob,mb,Bb,rb,Hb,yb],function(a){a&&a.destroy&&a.destroy()}),lb=ob=mb=Bb=rb=Hb=yb=null,db&&(db.innerHTML="",Ia(db),b&&w(db),db=null),clearInterval(Jb);for(a in $b)delete $b[a];$b=null}}function Ba(){ia||T!=T.top||"complete"===S.readyState?(da(),Nb(),Ob(),Da(e.series||[],function(a){E(a)}),$b.inverted=Gb=k(Gb,e.chart.inverted),ba(),$b.render=la,$b.tracker=yb=new A(e.tooltip),la(),Ja($b,"load"),n&&n.apply($b,[$b]),Da($b.callbacks,function(a){a.apply($b,[$b])})):S.attachEvent("onreadystatechange",function(){S.detachEvent("onreadystatechange",Ba),"complete"===S.readyState&&Ba()})}Qa=Ga(Qa,B.xAxis),Ra=Ga(Ra,B.yAxis),B.xAxis=B.yAxis=null,e=Ga(B,e);var Ca=e.chart,Na=Ca.margin;Na=d(Na)?Na:[Na,Na,Na,Na];var Oa,Pa,Wa,Xa,Za,$a,_a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb=k(Ca.marginTop,Na[0]),Tb=k(Ca.marginRight,Na[1]),Ub=k(Ca.marginBottom,Na[2]),Vb=k(Ca.marginLeft,Na[3]),Wb=Ca.spacingTop,Xb=Ca.spacingRight,Yb=Ca.spacingBottom,Zb=Ca.spacingLeft,$b=this,_b=(Na=Ca.events)&&!!Na.click,ac=Ca.showAxes,bc=0,cc=[],dc=[],ec=function(){function c(a,b){var c=a.legendItem,d=a.legendLine,e=a.legendSymbol,f=z.color,g=b?h.itemStyle.color:f,i=b?a.color:f;f=b?a.pointAttr[za]:{"stroke":f,"fill":f},c&&c.css({"fill":g}),d&&d.attr({"stroke":i}),e&&e.attr(f)}function d(a,b,c){var d=a.legendItem,e=a.legendLine,f=a.legendSymbol;a=a.checkbox,d&&d.attr({"x":b,"y":c}),e&&e.translate(b,c-4),f&&f.attr({"x":b+f.xOff,"y":c+f.yOff}),a&&(a.x=b,a.y=c)}function e(){Da(i,function(a){var b=a.checkbox,c=p.alignAttr;b&&l(b,{"left":c.translateX+a.legendItemWidth+b.x-40+ua,"top":c.translateY+b.y-11+ua})})}function f(a){var b,e,f,g,i=a.legendItem;g=a.series||a;var l=g.options,o=l&&l.borderWidth||0;if(!i){if(g=/^(bar|pie|area|column)$/.test(g.type),a.legendItem=i=Hb.text(h.labelFormatter.call(a),0,0).css(a.visible?x:z).on("mouseover",function(){a.setState(Aa),i.css(y)}).on("mouseout",function(){i.css(a.visible?x:z),a.setState()}).on("click",function(){var b=function(){a.setVisible()};a.firePointEvent?a.firePointEvent("legendItemClick",null,b):Ja(a,"legendItemClick",null,b)}).attr({"zIndex":2}).add(p),!g&&l&&l.lineWidth){var s={"stroke-width":l.lineWidth,"zIndex":2};l.dashStyle&&(s.dashstyle=l.dashStyle),a.legendLine=Hb.path([wa,-t-u,0,xa,-u,0]).attr(s).add(p)}g?b=Hb.rect(e=-t-u,f=-11,t,12,2).attr({"zIndex":3}).add(p):l&&l.marker&&l.marker.enabled&&(b=Hb.symbol(a.symbol,e=-t/2-u,f=-4,l.marker.radius).attr({"zIndex":3}).add(p)),b&&(b.xOff=e+o%2/2,b.yOff=f+o%2/2),a.legendSymbol=b,c(a,a.visible),l&&l.showCheckbox&&(a.checkbox=m("input",{"type":"checkbox","checked":a.selected,"defaultChecked":a.selected},h.itemCheckboxStyle,db),Ha(a.checkbox,"click",function(b){Ja(a,"checkboxClick",{"checked":b.target.checked},function(){a.select()})}))}b=i.getBBox(),e=a.legendItemWidth=h.itemWidth||t+u+b.width+A,D=b.height,r&&j-C+e>(G||hb-2*A-C)&&(j=C,k+=D),n=k,d(a,j,k),r?j+=e:k+=D,q=G||Y(r?j-C:e,q)}function g(){j=C,k=B,n=q=0,p||(p=Hb.g("legend").attr({"zIndex":7}).add()),i=[],Da(H,function(a){var b=a.options;b.showInLegend&&(i=i.concat("point"===b.legendType?a.data:a))}),s(i,function(a,b){return(a.options.legendIndex||0)-(b.options.legendIndex||0)}),I&&i.reverse(),Da(i,f),Cb=G||q,Db=n-B+D,(E||F)&&(Cb+=2*A,Db+=2*A,o?Cb>0&&Db>0&&(o[o.isNew?"attr":"animate"](o.crisp(null,null,null,Cb,Db)),o.isNew=!1):(o=Hb.rect(0,0,Cb,Db,h.borderRadius,E||0).attr({"stroke":h.borderColor,"stroke-width":E||0,"fill":F||va}).add(p).shadow(h.shadow),o.isNew=!0),o[i.length?"show":"hide"]());for(var c,d=["left","right","top","bottom"],g=4;g--;)c=d[g],v[c]&&"auto"!==v[c]&&(h[2>g?"align":"verticalAlign"]=c,h[2>g?"x":"y"]=b(v[c])*(g%2?-1:1));i.length&&p.align(a(h,{"width":Cb,"height":Db}),!0,Oa),bc||e()}var h=$b.options.legend;if(h.enabled){var i,j,k,n,o,p,q,r="horizontal"===h.layout,t=h.symbolWidth,u=h.symbolPadding,v=h.style,x=h.itemStyle,y=h.itemHoverStyle,z=h.itemHiddenStyle,A=b(v.padding),B=18,C=4+A+t+u,D=0,E=h.borderWidth,F=h.backgroundColor,G=h.width,H=$b.series,I=h.reversed;return g(),Ha($b,"endResize",e),{"colorizeItem":c,"destroyItem":function(a){var b=a.checkbox;Da(["legendItem","legendLine","legendSymbol"],function(b){a[b]&&a[b].destroy()}),b&&w(a.checkbox)},"renderLegend":g,"destroy":function(){o&&(o=o.destroy()),p&&(p=p.destroy())}}}};if(qb=function(a,b){return a>=0&&xb>=a&&b>=0&&wb>=b},Rb=function(){Ja($b,"selection",{"resetSelection":!0},Qb),$b.toolbar.remove("zoom")},Qb=function(a){var b=B.lang,c=$b.pointCount<100;$b.toolbar.add("zoom",b.resetZoom,b.resetZoomTitle,Rb),!a||a.resetSelection?Da(cc,function(a){a.setExtremes(null,null,!1,c)}):Da(a.xAxis.concat(a.yAxis),function(a){var b=a.axis;$b.tracker[b.isXAxis?"zoomX":"zoomY"]&&b.setExtremes(a.min,a.max,!1,c)}),aa()},Mb=function(){var a,b=e.legend,c=k(b.margin,10),d=b.x,f=b.y,g=b.align,i=b.verticalAlign;Nb(),!$b.title&&!$b.subtitle||h(Sb)||(a=Y($b.title&&!Pa.floating&&!Pa.verticalAlign&&Pa.y||0,$b.subtitle&&!Wa.floating&&!Wa.verticalAlign&&Wa.y||0))&&(Xa=Y(Xa,a+k(Pa.margin,15)+Wb)),b.enabled&&!b.floating&&("right"===g?h(Tb)||(Za=Y(Za,Cb-d+c+Xb)):"left"===g?h(Vb)||(_a=Y(_a,Cb+d+c+Zb)):"top"===i?h(Sb)||(Xa=Y(Xa,Db+f+c+Wb)):"bottom"===i&&(h(Ub)||($a=Y($a,Db-f+c+Yb)))),ac&&Da(cc,function(a){a.getOffset()}),h(Vb)||(_a+=ab[3]),h(Sb)||(Xa+=ab[0]),h(Ub)||($a+=ab[2]),h(Tb)||(Za+=ab[1]),Ob()},Pb=function(a,b,c){var d=$b.title,e=$b.subtitle;bc+=1,u(c,$b),kb=ib,jb=hb,$b.chartWidth=hb=V(a),$b.chartHeight=ib=V(b),l(db,{"width":hb+ua,"height":ib+ua}),Hb.setSize(hb,ib,c),xb=hb-_a-Za,wb=ib-Xa-$a,Fb=null,Da(cc,function(a){a.isDirty=!0,a.setScale()}),Da(dc,function(a){a.isDirty=!0}),$b.isDirtyLegend=!0,$b.isDirtyBox=!0,Mb(),d&&d.align(null,null,Oa),e&&e.align(null,null,Oa),aa(c),kb=null,Ja($b,"resize"),D===!1?ja():setTimeout(ja,D&&D.duration||500)},Ob=function(){$b.plotLeft=_a=V(_a),$b.plotTop=Xa=V(Xa),$b.plotWidth=xb=V(hb-_a-Za),$b.plotHeight=wb=V(ib-Xa-$a),$b.plotSizeX=Gb?wb:xb,$b.plotSizeY=Gb?xb:wb,Oa={"x":Zb,"y":Wb,"width":hb-Zb-Xb,"height":ib-Wb-Yb}},Nb=function(){Xa=k(Sb,Wb),Za=k(Tb,Xb),$a=k(Ub,Yb),_a=k(Vb,Zb),ab=[0,0,0,0]},Lb=function(){var a,b=Ca.borderWidth||0,c=Ca.backgroundColor,d=Ca.plotBackgroundColor,e=Ca.plotBackgroundImage,f={"x":_a,"y":Xa,"width":xb,"height":wb};a=b+(Ca.shadow?8:0),(b||c)&&(lb?lb.animate(lb.crisp(null,null,null,hb-a,ib-a)):lb=Hb.rect(a/2,a/2,hb-a,ib-a,Ca.borderRadius,b).attr({"stroke":Ca.borderColor,"stroke-width":b,"fill":c||va}).add().shadow(Ca.shadow)),d&&(mb?mb.animate(f):mb=Hb.rect(_a,Xa,xb,wb,0).attr({"fill":d}).add().shadow(Ca.plotShadow)),e&&(nb?nb.animate(f):nb=Hb.image(e,_a,Xa,xb,wb).add()),Ca.plotBorderWidth&&(ob?ob.animate(ob.crisp(null,_a,Xa,xb,wb)):ob=Hb.rect(_a,Xa,xb,wb,0,Ca.plotBorderWidth).attr({"stroke":Ca.plotBorderColor,"stroke-width":Ca.plotBorderWidth,"zIndex":4}).add()),$b.isDirtyBox=!1},Ha(T,"unload",ya),Ca.reflow!==!1&&Ha($b,"load",fa),Na)for(pb in Na)Ha($b,pb,Na[pb]);$b.options=e,$b.series=dc,$b.addSeries=function(a,b,c){var d;return a&&(u(c,$b),b=k(b,!0),Ja($b,"addSeries",{"options":a},function(){d=E(a),d.isDirty=!0,$b.isDirtyLegend=!0,b&&$b.redraw()})),d},$b.animation=k(Ca.animation,!0),$b.destroy=ya,$b.get=function(a){var b,c,d;for(b=0;b<cc.length;b++)if(cc[b].options.id===a)return cc[b];for(b=0;b<dc.length;b++)if(dc[b].options.id===a)return dc[b];for(b=0;b<dc.length;b++)for(d=dc[b].data,c=0;c<d.length;c++)if(d[c].id===a)return d[c];return null},$b.getSelectedPoints=function(){var a=[];return Da(dc,function(b){a=a.concat(Ea(b.data,function(a){return a.selected}));
  }),a},$b.getSelectedSeries=function(){return Ea(dc,function(a){return a.selected})},$b.hideLoading=function(){Ka(tb,{"opacity":0},{"duration":e.loading.hideDuration,"complete":function(){l(tb,{"display":va})}}),vb=!1},$b.isInsidePlot=qb,$b.redraw=aa,$b.setSize=Pb,$b.setTitle=ca,$b.showLoading=function(b){var c=e.loading;tb||(tb=m(oa,{"className":"highcharts-loading"},a(c.style,{"left":_a+ua,"top":Xa+ua,"width":xb+ua,"height":wb+ua,"zIndex":10,"display":va}),db),ub=m("span",null,c.labelStyle,tb)),ub.innerHTML=b||e.lang.loading,vb||(l(tb,{"opacity":0,"display":""}),Ka(tb,{"opacity":c.style.opacity},{"duration":c.showDuration}),vb=!0)},$b.pointCount=0,$b.counters=new q,Ba()}var z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S=document,T=window,U=Math,V=U.round,W=U.floor,X=U.ceil,Y=U.max,Z=U.min,$=U.abs,_=U.cos,aa=U.sin,ba=U.PI,ca=2*ba/360,da=navigator.userAgent,ea=/msie/i.test(da)&&!T.opera,fa=8===S.documentMode,ga=/AppleWebKit/.test(da),ha=/Firefox/.test(da),ia=!!S.createElementNS&&!!S.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,ja=ha&&parseInt(da.split("Firefox/")[1],10)<4,ka=void 0!==S.documentElement.ontouchstart,la={},ma=0,na=1,oa="div",pa="absolute",qa="relative",ra="hidden",sa="highcharts-",ta="visible",ua="px",va="none",wa="M",xa="L",ya="rgba(192,192,192,"+(ia?1e-6:.002)+")",za="",Aa="hover",Ba=T.HighchartsAdapter,Ca=Ba||{},Da=Ca.each,Ea=Ca.grep,Fa=Ca.map,Ga=Ca.merge,Ha=Ca.addEvent,Ia=Ca.removeEvent,Ja=Ca.fireEvent,Ka=Ca.animate,La=Ca.stop,Ma={};if(C=function(a,b,c){function d(a){return a.toString().replace(/^([0-9])$/,"0$1")}if(!h(b)||isNaN(b))return"Invalid date";a=k(a,"%Y-%m-%d %H:%M:%S"),b=new Date(b*na);var e,f=b[I](),g=b[J](),i=b[K](),j=b[L](),l=b[M](),m=B.lang,n=m.weekdays;b={"a":n[g].substr(0,3),"A":n[g],"d":d(i),"e":i,"b":m.shortMonths[j],"B":m.months[j],"m":d(j+1),"y":l.toString().substr(2,2),"Y":l,"H":d(f),"I":d(f%12||12),"l":f%12||12,"M":d(b[H]()),"p":12>f?"AM":"PM","P":12>f?"am":"pm","S":d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a},q.prototype={"wrapColor":function(a){this.color>=a&&(this.color=0)},"wrapSymbol":function(a){this.symbol>=a&&(this.symbol=0)}},E={"init":function(a,b,c){b=b||"";var d,e=a.shift,f=b.indexOf("C")>-1,g=f?7:3;b=b.split(" "),c=[].concat(c);var h,i,j=function(a){for(d=a.length;d--;)a[d]===wa&&a.splice(d+1,0,a[d+1],a[d+2],a[d+1],a[d+2])};if(f&&(j(b),j(c)),a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6)),e&&(c=[].concat(c).splice(0,g).concat(c),a.shift=!1),b.length)for(a=c.length;b.length<a;)e=[].concat(b).splice(b.length-g,g),f&&(e[g-6]=e[g-2],e[g-5]=e[g-1]),b=b.concat(e);return h&&(b=b.concat(h),c=c.concat(i)),[b,c]},"step":function(a,b,c,d){var e=[],f=a.length;if(1===c)e=d;else if(f===b.length&&1>c)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}},Ba&&Ba.init&&Ba.init(E),!Ba&&T.jQuery){var Na=jQuery;Da=function(a,b){for(var c=0,d=a.length;d>c;c++)if(b.call(a[c],a[c],c,a)===!1)return c},Ea=Na.grep,Fa=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=b.call(a[d],a[d],d,a);return c},Ga=function(){var a=arguments;return Na.extend(!0,null,a[0],a[1],a[2],a[3])},Ha=function(a,b,c){Na(a).bind(b,c)},Ia=function(a,b,c){var d=S.removeEventListener?"removeEventListener":"detachEvent";S[d]&&!a[d]&&(a[d]=function(){}),Na(a).unbind(b,c)},Ja=function(b,c,d,e){var f=Na.Event(c),g="detached"+c;a(f,d),b[c]&&(b[g]=b[c],b[c]=null),Na(b).trigger(f),b[g]&&(b[c]=b[g],b[g]=null),e&&!f.isDefaultPrevented()&&e(f)},Ka=function(a,b,c){var d=Na(a);b.d&&(a.toD=b.d,b.d=1),d.stop(),d.animate(b,c)},La=function(a){Na(a).stop()},Na.extend(Na.easing,{"easeOutQuad":function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var Oa=jQuery.fx,Pa=Oa.step;Da(["cur","_default","width","height"],function(a,b){var c,d=b?Pa:Oa.prototype,e=d[a];e&&(d[a]=function(a){return a=b?a:this,c=a.elem,c.attr?c.attr(a.prop,a.now):e.apply(this,arguments)})}),Pa.d=function(a){var b=a.elem;if(!a.started){var c=E.init(b,b.d,b.toD);a.start=c[0],a.end=c[1],a.started=!0}b.attr("d",E.step(a.start,a.end,a.pos,b.toD))}}Ba={"enabled":!0,"align":"center","x":0,"y":15,"style":{"color":"#666","fontSize":"11px","lineHeight":"14px"}},B={"colors":["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],"symbols":["circle","diamond","square","triangle","triangle-down"],"lang":{"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"decimalPoint":".","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","thousandsSep":","},"global":{"useUTC":!0},"chart":{"borderColor":"#4572A7","borderRadius":5,"defaultSeriesType":"line","ignoreHiddenSeries":!0,"spacingTop":10,"spacingRight":10,"spacingBottom":15,"spacingLeft":10,"style":{"fontFamily":'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',"fontSize":"12px"},"backgroundColor":"#FFFFFF","plotBorderColor":"#C0C0C0"},"title":{"text":"Chart title","align":"center","y":15,"style":{"color":"#3E576F","fontSize":"16px"}},"subtitle":{"text":"","align":"center","y":30,"style":{"color":"#6D869F"}},"plotOptions":{"line":{"allowPointSelect":!1,"showCheckbox":!1,"animation":{"duration":1e3},"events":{},"lineWidth":2,"shadow":!0,"marker":{"enabled":!0,"lineWidth":0,"radius":4,"lineColor":"#FFFFFF","states":{"hover":{},"select":{"fillColor":"#FFFFFF","lineColor":"#000000","lineWidth":2}}},"point":{"events":{}},"dataLabels":Ga(Ba,{"enabled":!1,"y":-6,"formatter":function(){return this.y}}),"showInLegend":!0,"states":{"hover":{"marker":{}},"select":{"marker":{}}},"stickyTracking":!0}},"labels":{"style":{"position":pa,"color":"#3E576F"}},"legend":{"enabled":!0,"align":"center","layout":"horizontal","labelFormatter":function(){return this.name},"borderWidth":1,"borderColor":"#909090","borderRadius":5,"shadow":!1,"style":{"padding":"5px"},"itemStyle":{"cursor":"pointer","color":"#3E576F"},"itemHoverStyle":{"cursor":"pointer","color":"#000000"},"itemHiddenStyle":{"color":"#C0C0C0"},"itemCheckboxStyle":{"position":pa,"width":"13px","height":"13px"},"symbolWidth":16,"symbolPadding":5,"verticalAlign":"bottom","x":0,"y":0},"loading":{"hideDuration":100,"labelStyle":{"fontWeight":"bold","position":qa,"top":"1em"},"showDuration":100,"style":{"position":pa,"backgroundColor":"white","opacity":.5,"textAlign":"center"}},"tooltip":{"enabled":!0,"backgroundColor":"rgba(255, 255, 255, .85)","borderWidth":2,"borderRadius":5,"shadow":!0,"snap":ka?25:10,"style":{"color":"#333333","fontSize":"12px","padding":"5px","whiteSpace":"nowrap"}},"toolbar":{"itemStyle":{"color":"#4572A7","cursor":"pointer"}},"credits":{"enabled":!0,"text":"Highcharts.com","href":"http://www.highcharts.com","position":{"align":"right","x":-10,"verticalAlign":"bottom","y":-5},"style":{"cursor":"pointer","color":"#909090","fontSize":"10px"}}};var Qa={"dateTimeLabelFormats":{"second":"%H:%M:%S","minute":"%H:%M","hour":"%H:%M","day":"%e. %b","week":"%e. %b","month":"%b '%y","year":"%Y"},"endOnTick":!1,"gridLineColor":"#C0C0C0","labels":Ba,"lineColor":"#C0D0E0","lineWidth":1,"max":null,"min":null,"minPadding":.01,"maxPadding":.01,"minorGridLineColor":"#E0E0E0","minorGridLineWidth":1,"minorTickColor":"#A0A0A0","minorTickLength":2,"minorTickPosition":"outside","startOfWeek":1,"startOnTick":!1,"tickColor":"#C0D0E0","tickLength":5,"tickmarkPlacement":"between","tickPixelInterval":100,"tickPosition":"outside","tickWidth":1,"title":{"align":"middle","style":{"color":"#6D869F","fontWeight":"bold"}},"type":"linear"},Ra=Ga(Qa,{"endOnTick":!0,"gridLineWidth":1,"tickPixelInterval":72,"showLastLabel":!0,"labels":{"align":"right","x":-8,"y":3},"lineWidth":0,"maxPadding":.05,"minPadding":.05,"startOnTick":!0,"tickWidth":0,"title":{"rotation":270,"text":"Y-values"},"stackLabels":{"enabled":!1,"formatter":function(){return this.total},"style":Ba.style}}),Sa={"labels":{"align":"right","x":-8,"y":null},"title":{"rotation":270}},Ta={"labels":{"align":"left","x":8,"y":null},"title":{"rotation":90}},Ua={"labels":{"align":"center","x":0,"y":14},"title":{"rotation":0}},Va=Ga(Ua,{"labels":{"y":-5}}),Wa=B.plotOptions;Ba=Wa.line,Wa.spline=Ga(Ba),Wa.scatter=Ga(Ba,{"lineWidth":0,"states":{"hover":{"lineWidth":0}}}),Wa.area=Ga(Ba,{}),Wa.areaspline=Ga(Wa.area),Wa.column=Ga(Ba,{"borderColor":"#FFFFFF","borderWidth":1,"borderRadius":0,"groupPadding":.2,"marker":null,"pointPadding":.1,"minPointLength":0,"states":{"hover":{"brightness":.1,"shadow":!1},"select":{"color":"#C0C0C0","borderColor":"#000000","shadow":!1}},"dataLabels":{"y":null,"verticalAlign":null}}),Wa.bar=Ga(Wa.column,{"dataLabels":{"align":"left","x":5,"y":0}}),Wa.pie=Ga(Ba,{"borderColor":"#FFFFFF","borderWidth":1,"center":["50%","50%"],"colorByPoint":!0,"dataLabels":{"distance":30,"enabled":!0,"formatter":function(){return this.point.name},"y":5},"legendType":"point","marker":null,"size":"75%","showInLegend":!1,"slicedOffset":10,"states":{"hover":{"brightness":.1,"shadow":!1}}}),v();var Xa=function(a){var c,d=[];return function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?d=[b(c[1]),b(c[2]),b(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(d=[b(c[1],16),b(c[2],16),b(c[3],16),1])}(a),{"get":function(b){return d&&!isNaN(d[0])?"rgb"===b?"rgb("+d[0]+","+d[1]+","+d[2]+")":"a"===b?d[3]:"rgba("+d.join(",")+")":a},"brighten":function(a){if(e(a)&&0!==a){var c;for(c=0;3>c;c++)d[c]+=b(255*a),d[c]<0&&(d[c]=0),d[c]>255&&(d[c]=255)}return this},"setOpacity":function(a){return d[3]=a,this}}};x.prototype={"init":function(a,b){this.element=S.createElementNS("http://www.w3.org/2000/svg",b),this.renderer=a},"animate":function(a,b,c){(b=k(b,D,!0))?(b=Ga(b),c&&(b.complete=c),Ka(this,a,b)):(this.attr(a),c&&c())},"attr":function(d,e){var f,g,j,k,m,n,o=this.element,p=o.nodeName,q=this.renderer,r=this.shadows,s=this.htmlNode,t=this;if(c(d)&&h(e)&&(f=d,d={},d[f]=e),c(d))f=d,"circle"===p?f={"x":"cx","y":"cy"}[f]||f:"strokeWidth"===f&&(f="stroke-width"),t=i(o,f)||this[f]||0,"d"!==f&&"visibility"!==f&&(t=parseFloat(t));else for(f in d){if(m=!1,g=d[f],"d"===f)g&&g.join&&(g=g.join(" ")),/(NaN| {2}|^$)/.test(g)&&(g="M 0 0"),this.d=g;else if("x"===f&&"text"===p){for(j=0;j<o.childNodes.length;j++)k=o.childNodes[j],i(k,"x")===i(o,"x")&&i(k,"x",g);this.rotation&&i(o,"transform","rotate("+this.rotation+" "+g+" "+b(d.y||i(o,"y"))+")")}else if("fill"===f)g=q.color(g,o,f);else if("circle"!==p||"x"!==f&&"y"!==f)if("translateX"===f||"translateY"===f||"rotation"===f||"verticalAlign"===f)this[f]=g,this.updateTransform(),m=!0;else if("stroke"===f)g=q.color(g,o,f);else if("dashstyle"===f){if(f="stroke-dasharray",g=g&&g.toLowerCase(),"solid"===g)g=va;else if(g){for(g=g.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),j=g.length;j--;)g[j]=b(g[j])*d["stroke-width"];g=g.join(",")}}else"isTracker"===f?this[f]=g:"width"===f?g=b(g):"align"===f?(f="text-anchor",g={"left":"start","center":"middle","right":"end"}[g]):"title"===f&&(j=S.createElementNS("http://www.w3.org/2000/svg","title"),j.appendChild(S.createTextNode(g)),o.appendChild(j));else f={"x":"cx","y":"cy"}[f]||f;if("strokeWidth"===f&&(f="stroke-width"),ga&&"stroke-width"===f&&0===g&&(g=1e-6),this.symbolName&&/^(x|y|r|start|end|innerR)/.test(f)&&(n||(this.symbolAttr(d),n=!0),m=!0),r&&/^(width|height|visibility|x|y|d)$/.test(f))for(j=r.length;j--;)i(r[j],f,g);if(("width"===f||"height"===f)&&"rect"===p&&0>g&&(g=0),"text"===f?(this.textStr=g,this.added&&q.buildText(this)):m||i(o,f,g),s&&("x"===f||"y"===f||"translateX"===f||"translateY"===f||"visibility"===f)){j=s.length?s:[this],k=j.length;var u;for(u=0;k>u;u++)s=j[u],m=s.getBBox(),s=s.htmlNode,l(s,a(this.styles,{"left":m.x+(this.translateX||0)+ua,"top":m.y+(this.translateY||0)+ua})),"visibility"===f&&l(s,{"visibility":g})}}return t},"symbolAttr":function(a){var b=this;Da(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=k(a[c],b[c])}),b.attr({"d":b.renderer.symbols[b.symbolName](V(2*b.x)/2,V(2*b.y)/2,b.r,{"start":b.start,"end":b.end,"width":b.width,"height":b.height,"innerR":b.innerR})})},"clip":function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},"crisp":function(a,b,c,d,e){var f,g,h={},i={};a=a||this.strokeWidth||0,g=a%2/2,i.x=W(b||this.x||0)+g,i.y=W(c||this.y||0)+g,i.width=W((d||this.width||0)-2*g),i.height=W((e||this.height||0)-2*g),i.strokeWidth=a;for(f in i)this[f]!==i[f]&&(this[f]=h[f]=i[f]);return h},"css":function(b){var c=this.element;c=b&&b.width&&"text"===c.nodeName;var d,e="",f=function(a,b){return"-"+b.toLowerCase()};if(b&&b.color&&(b.fill=b.color),this.styles=b=a(this.styles,b),ea&&!ia)c&&delete b.width,l(this.element,b);else{for(d in b)e+=d.replace(/([A-Z])/g,f)+":"+b[d]+";";this.attr({"style":e})}return c&&this.added&&this.renderer.buildText(this),this},"on":function(a,b){var c=b;return ka&&"click"===a&&(a="touchstart",c=function(a){a.preventDefault(),b()}),this.element["on"+a]=c,this},"translate":function(a,b){return this.attr({"translateX":a,"translateY":b})},"invert":function(){return this.inverted=!0,this.updateTransform(),this},"updateTransform":function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height")),(a||b)&&e.push("translate("+a+","+b+")"),c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+this.x+" "+this.y+")"),e.length&&i(this.element,"transform",e.join(" "))},"toFront":function(){var a=this.element;return a.parentNode.appendChild(a),this},"align":function(a,b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate),c=k(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};return/^(right|center)$/.test(d)&&(f+=(c.width-(a.width||0))/{"right":1,"center":2}[d]),h[b?"translateX":"x"]=V(f),/^(bottom|middle)$/.test(e)&&(g+=(c.height-(a.height||0))/({"bottom":1,"middle":2}[e]||1)),h[b?"translateY":"y"]=V(g),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},"getBBox":function(){var b,c,d,e=this.rotation,f=e*ca;try{b=a({},this.element.getBBox())}catch(g){b={"width":0,"height":0}}return c=b.width,d=b.height,e&&(b.width=$(d*aa(f))+$(c*_(f)),b.height=$(d*_(f))+$(c*aa(f))),b},"show":function(){return this.attr({"visibility":ta})},"hide":function(){return this.attr({"visibility":ra})},"add":function(a){var c=this.renderer,d=a||c,e=d.element||c.box,f=e.childNodes,g=this.element,j=i(g,"zIndex");if(this.parentInverted=a&&a.inverted,void 0!==this.textStr&&c.buildText(this),a&&this.htmlNode&&(a.htmlNode||(a.htmlNode=[]),a.htmlNode.push(this)),j&&(d.handleZ=!0,j=b(j)),d.handleZ)for(d=0;d<f.length;d++)if(a=f[d],c=i(a,"zIndex"),a!==g&&(b(c)>j||!h(j)&&h(c)))return e.insertBefore(g,a),this;return e.appendChild(g),this.added=!0,this},"safeRemoveChild":function(a){var b=a.parentNode;b&&b.removeChild(a)},"destroy":function(){var a,b,c=this,d=c.element||{},e=c.shadows;if(d.onclick=d.onmouseout=d.onmouseover=d.onmousemove=null,La(c),c.clipPath&&(c.clipPath=c.clipPath.destroy()),c.stops){for(b=0;b<c.stops.length;b++)c.stops[b]=c.stops[b].destroy();c.stops=null}c.safeRemoveChild(d),e&&Da(e,function(a){c.safeRemoveChild(a)}),g(c.renderer.alignedObjects,c);for(a in c)delete c[a];return null},"empty":function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},"shadow":function(a,b){var c,d,e=[],f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(c=1;3>=c;c++)d=f.cloneNode(0),i(d,{"isShadow":"true","stroke":"rgb(0, 0, 0)","stroke-opacity":.05*c,"stroke-width":7-2*c,"transform":"translate"+g,"fill":va}),b?b.element.appendChild(d):f.parentNode.insertBefore(d,f),e.push(d);this.shadows=e}return this}};var Ya=function(){this.init.apply(this,arguments)};Ya.prototype={"Element":x,"init":function(a,b,c,d){var e,f=location;e=this.createElement("svg").attr({"xmlns":"http://www.w3.org/2000/svg","version":"1.1"}),a.appendChild(e.element),this.box=e.element,this.boxWrapper=e,this.alignedObjects=[],this.url=ea?"":f.href.replace(/#.*?$/,""),this.defs=this.createElement("defs").add(),this.forExport=d,this.gradients=[],this.setSize(b,c,!1)},"destroy":function(){var a,b=this.gradients,c=this.defs;if(this.box=null,this.boxWrapper=this.boxWrapper.destroy(),b){for(a=0;a<b.length;a++)this.gradients[a]=b[a].destroy();this.gradients=null}return c&&(this.defs=c.destroy()),this.alignedObjects=null},"createElement":function(a){var b=new this.Element;return b.init(this,a),b},"buildText":function(c){for(var d,e=c.element,f=k(c.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),g=e.childNodes,h=/style="([^"]+)"/,j=/href="([^"]+)"/,n=i(e,"x"),o=c.styles,p=o&&c.useHTML&&!this.forExport,q=c.htmlNode,r=o&&b(o.width),s=o&&o.lineHeight,t=g.length;t--;)e.removeChild(g[t]);if(r&&!c.added&&this.box.appendChild(e),Da(f,function(a,f){var g,k,m=0;a=a.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),g=a.split("|||"),Da(g,function(a){if(""!==a||1===g.length){var o={},p=S.createElementNS("http://www.w3.org/2000/svg","tspan");if(h.test(a)&&i(p,"style",a.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2")),j.test(a)&&(i(p,"onclick",'location.href="'+a.match(j)[1]+'"'),l(p,{"cursor":"pointer"})),a=(a.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">"),p.appendChild(S.createTextNode(a)),m?o.dx=3:o.x=n,m||(f&&(!ia&&c.renderer.forExport&&l(p,{"display":"block"}),k=T.getComputedStyle&&b(T.getComputedStyle(d,null).getPropertyValue("line-height")),(!k||isNaN(k))&&(k=s||d.offsetHeight||18),i(p,"dy",k)),d=p),i(p,o),e.appendChild(p),m++,r){a=a.replace(/-/g,"- ").split(" ");for(var q,t=[];a.length||t.length;)q=e.getBBox().width,o=q>r,o&&1!==a.length?(p.removeChild(p.firstChild),t.unshift(a.pop())):(a=t,t=[],a.length&&(p=S.createElementNS("http://www.w3.org/2000/svg","tspan"),i(p,{"dy":s||16,"x":n}),e.appendChild(p),q>r&&(r=q))),a.length&&p.appendChild(S.createTextNode(a.join(" ").replace(/- /g,"-")))}}})}),p)for(q||(q=c.htmlNode=m("span",null,a(o,{"position":pa,"top":0,"left":0}),this.box.parentNode)),q.innerHTML=c.textStr,t=g.length;t--;)g[t].style.visibility=ra},"crispLine":function(a,b){return a[1]===a[4]&&(a[1]=a[4]=V(a[1])+b%2/2),a[2]===a[5]&&(a[2]=a[5]=V(a[2])+b%2/2),a},"path":function(a){return this.createElement("path").attr({"d":a,"fill":va})},"circle":function(a,b,c){return a=d(a)?a:{"x":a,"y":b,"r":c},this.createElement("circle").attr(a)},"arc":function(a,b,c,e,f,g){return d(a)&&(b=a.y,c=a.r,e=a.innerR,f=a.start,g=a.end,a=a.x),this.symbol("arc",a||0,b||0,c||0,{"innerR":e||0,"start":f||0,"end":g||0})},"rect":function(a,b,c,e,f,g){return d(a)&&(b=a.y,c=a.width,e=a.height,f=a.r,g=a.strokeWidth,a=a.x),f=this.createElement("rect").attr({"rx":f,"ry":f,"fill":va}),f.attr(f.crisp(g,a,b,Y(c,0),Y(e,0)))},"setSize":function(a,b,c){var d=this.alignedObjects,e=d.length;for(this.width=a,this.height=b,this.boxWrapper[k(c,!0)?"animate":"attr"]({"width":a,"height":b});e--;)d[e].align()},"g":function(a){var b=this.createElement("g");return h(a)?b.attr({"class":sa+a}):b},"image":function(b,c,d,e,f){var g={"preserveAspectRatio":va};return arguments.length>1&&a(g,{"x":c,"y":d,"width":e,"height":f}),g=this.createElement("image").attr(g),g.element.setAttributeNS?g.element.setAttributeNS("http://www.w3.org/1999/xlink","href",b):g.element.setAttribute("hc-svg-href",b),g},"symbol":function(b,c,d,e,f){var g,h=this.symbols[b];h=h&&h(V(c),V(d),e,f);var i,j=/^url\((.*?)\)$/;if(h)g=this.path(h),a(g,{"symbolName":b,"x":c,"y":d,"r":e}),f&&a(g,f);else if(j.test(b)){var k=function(a,b){a.attr({"width":b[0],"height":b[1]}).translate(-V(b[0]/2),-V(b[1]/2))};i=b.match(j)[1],b=la[i],g=this.image(i).attr({"x":c,"y":d}),b?k(g,b):(g.attr({"width":0,"height":0}),m("img",{"onload":function(){k(g,la[i]=[this.width,this.height])},"src":i}))}else g=this.circle(c,d,e);return g},"symbols":{"square":function(a,b,c){return c=.707*c,[wa,a-c,b-c,xa,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},"triangle":function(a,b,c){return[wa,a,b-1.33*c,xa,a+c,b+.67*c,a-c,b+.67*c,"Z"]},"triangle-down":function(a,b,c){return[wa,a,b+1.33*c,xa,a-c,b-.67*c,a+c,b-.67*c,"Z"]},"diamond":function(a,b,c){return[wa,a,b-c,xa,a+c,b,a,b+c,a-c,b,"Z"]},"arc":function(a,b,c,d){var e=d.start,f=d.end-1e-6,g=d.innerR,h=_(e),i=aa(e),j=_(f);return f=aa(f),d=d.end-e<ba?0:1,[wa,a+c*h,b+c*i,"A",c,c,0,d,1,a+c*j,b+c*f,xa,a+g*j,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*i,"Z"]}},"clipRect":function(a,b,c,d){var e=sa+ma++,f=this.createElement("clipPath").attr({"id":e}).add(this.defs);return a=this.rect(a,b,c,d,0).add(f),a.id=e,a.clipPath=f,a},"color":function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient,c=sa+ma++;var g,h,j;return g=f.createElement("linearGradient").attr({"id":c,"gradientUnits":"userSpaceOnUse","x1":b[0],"y1":b[1],"x2":b[2],"y2":b[3]}).add(f.defs),f.gradients.push(g),g.stops=[],Da(a.stops,function(a){e.test(a[1])?(d=Xa(a[1]),h=d.get("rgb"),j=d.get("a")):(h=a[1],j=1),a=f.createElement("stop").attr({"offset":a[0],"stop-color":h,"stop-opacity":j}).add(g),g.stops.push(a)}),"url("+this.url+"#"+c+")"}return e.test(a)?(d=Xa(a),i(b,c+"-opacity",d.get("a")),d.get("rgb")):(b.removeAttribute(c+"-opacity"),a)},"text":function(a,b,c,d){var e=B.chart.style;return b=V(k(b,0)),c=V(k(c,0)),a=this.createElement("text").attr({"x":b,"y":c,"text":a}).css({"fontFamily":e.fontFamily,"fontSize":e.fontSize}),a.x=b,a.y=c,a.useHTML=d,a}},z=Ya,ia||(Ca=n(x,{"init":function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",pa,";"];("shape"===b||b===oa)&&d.push("left:0;top:0;width:10px;height:10px;"),fa&&d.push("visibility: ",b===oa?ra:ta),c.push(' style="',d.join(""),'"/>'),b&&(c=b===oa||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=m(c)),this.renderer=a},"add":function(a){var b=this.renderer,c=this.element,d=b.box;return d=a?a.element||a:d,a&&a.inverted&&b.invertChild(c,d),fa&&d.gVis===ra&&l(c,{"visibility":ra}),d.appendChild(c),this.added=!0,this.alignOnAdd&&this.updateTransform(),this},"attr":function(a,b){var d,f,g,j,k,n=this.element||{},o=n.style,p=n.nodeName,q=this.renderer,r=this.symbolName,s=this.shadows,t=this;if(c(a)&&h(b)&&(d=a,a={},a[d]=b),c(a))d=a,t="strokeWidth"===d||"stroke-width"===d?this.strokeweight:this[d];else for(d in a){if(f=a[d],j=!1,r&&/^(x|y|r|start|end|width|height|innerR)/.test(d))k||(this.symbolAttr(a),k=!0),j=!0;else if("d"===d){for(f=f||[],this.d=f.join(" "),g=f.length,j=[];g--;)j[g]=e(f[g])?V(10*f[g])-5:"Z"===f[g]?"x":f[g];if(f=j.join(" ")||"x",n.path=f,s)for(g=s.length;g--;)s[g].path=f;j=!0}else if("zIndex"===d||"visibility"===d){if(fa&&"visibility"===d&&"DIV"===p){for(n.gVis=f,j=n.childNodes,g=j.length;g--;)l(j[g],{"visibility":f});f===ta&&(f=null)}f&&(o[d]=f),j=!0}else/^(width|height)$/.test(d)?(this[d]=f,this.updateClipping?(this[d]=f,this.updateClipping()):o[d]=f,j=!0):/^(x|y)$/.test(d)?(this[d]=f,"SPAN"===n.tagName?this.updateTransform():o[{"x":"left","y":"top"}[d]]=f):"class"===d?n.className=f:"stroke"===d?(f=q.color(f,n,d),d="strokecolor"):"stroke-width"===d||"strokeWidth"===d?(n.stroked=f?!0:!1,d="strokeweight",this[d]=f,e(f)&&(f+=ua)):"dashstyle"===d?((n.getElementsByTagName("stroke")[0]||m(q.prepVML(["<stroke/>"]),null,null,n))[d]=f||"solid",this.dashstyle=f,j=!0):"fill"===d?"SPAN"===p?o.color=f:(n.filled=f!==va?!0:!1,f=q.color(f,n,d),d="fillcolor"):"translateX"===d||"translateY"===d||"rotation"===d||"align"===d?("align"===d&&(d="textAlign"),this[d]=f,this.updateTransform(),j=!0):"text"===d&&(this.bBox=null,n.innerHTML=f,j=!0);if(s&&"visibility"===d)for(g=s.length;g--;)s[g].style[d]=f;j||(fa?n[d]=f:i(n,d,f))}return t},"clip":function(a){var b=this,c=a.members;return c.push(b),b.destroyClip=function(){g(c,b)},b.css(a.getCSS(b.inverted))},"css":function(b){var c=this.element;return(c=b&&"SPAN"===c.tagName&&b.width)&&(delete b.width,this.textWidth=c,this.updateTransform()),this.styles=a(this.styles,b),l(this.element,b),this},"safeRemoveChild":function(a){a.parentNode&&w(a)},"destroy":function(){return this.destroyClip&&this.destroyClip(),x.prototype.destroy.apply(this)},"empty":function(){for(var a,b=this.element.childNodes,c=b.length;c--;)a=b[c],a.parentNode.removeChild(a)},"getBBox":function(){var a=this.element,b=this.bBox;return b||("text"===a.nodeName&&(a.style.position=pa),b=this.bBox={"x":a.offsetLeft,"y":a.offsetTop,"width":a.offsetWidth,"height":a.offsetHeight}),b},"on":function(a,b){return this.element["on"+a]=function(){var a=T.event;a.target=a.srcElement,b(a)},this},"updateTransform":function(){if(this.added){var a=this,c=a.element,d=a.translateX||0,e=a.translateY||0,f=a.x||0,g=a.y||0,i=a.textAlign||"left",j={"left":0,"center":.5,"right":1}[i],k=i&&"left"!==i;if((d||e)&&a.css({"marginLeft":d,"marginTop":e}),a.inverted&&Da(c.childNodes,function(b){a.renderer.invertChild(b,c)}),"SPAN"===c.tagName){var m,n;d=a.rotation;var o;m=0,e=1;var p,q=0;o=b(a.textWidth);var r=a.xCorr||0,s=a.yCorr||0,t=[d,i,c.innerHTML,a.textWidth].join(",");t!==a.cTT&&(h(d)&&(m=d*ca,e=_(m),q=aa(m),l(c,{"filter":d?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-q,", M21=",q,", M22=",e,", sizingMethod='auto expand')"].join(""):va})),m=c.offsetWidth,n=c.offsetHeight,m>o&&(l(c,{"width":o+ua,"display":"block","whiteSpace":"normal"}),m=o),o=V(1.2*(b(c.style.fontSize)||12)),r=0>e&&-m,s=0>q&&-n,p=0>e*q,r+=q*o*(p?1-j:j),s-=e*o*(d?p?j:1-j:1),k&&(r-=m*j*(0>e?-1:1),d&&(s-=n*j*(0>q?-1:1)),l(c,{"textAlign":i})),a.xCorr=r,a.yCorr=s),l(c,{"left":f+r,"top":g+s}),a.cTT=t}}else this.alignOnAdd=!0},"shadow":function(a,c){var d,e,f,g=[],h=this.element,i=this.renderer,j=h.style,k=h.path;if(k&&"string"!=typeof k.value&&(k="x"),a){for(d=1;3>=d;d++)f=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',k,'" coordsize="100,100" style="',h.style.cssText,'" />'],e=m(i.prepVML(f),null,{"left":b(j.left)+1,"top":b(j.top)+1}),f=['<stroke color="black" opacity="',.05*d,'"/>'],m(i.prepVML(f),null,null,e),c?c.element.appendChild(e):h.parentNode.insertBefore(e,h),g.push(e);this.shadows=g}return this}}),Ba=function(){this.init.apply(this,arguments)},Ba.prototype=Ga(Ya.prototype,{"Element":Ca,"isIE8":da.indexOf("MSIE 8.0")>-1,"init":function(a,b,c){var d;this.alignedObjects=[],d=this.createElement(oa),a.appendChild(d.element),this.box=d.element,this.boxWrapper=d,this.setSize(b,c,!1),S.namespaces.hcv||(S.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),S.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},"clipRect":function(b,c,d,e){var f=this.createElement();return a(f,{"members":[],"left":b,"top":c,"width":d,"height":e,"getCSS":function(b){var c=this.top,d=this.left,e=d+this.width,f=c+this.height;return c={"clip":"rect("+V(b?d:c)+"px,"+V(b?f:e)+"px,"+V(b?e:f)+"px,"+V(b?c:d)+"px)"},!b&&fa&&a(c,{"width":e+ua,"height":f+ua}),c},"updateClipping":function(){Da(f.members,function(a){a.css(f.getCSS(a.inverted))})}})},"color":function(a,b,c){var d,e=/^rgba/;if(!a||!a.linearGradient)return e.test(a)&&"IMG"!==b.tagName?(d=Xa(a),a=["<",c,' opacity="',d.get("a"),'"/>'],m(this.prepVML(a),null,null,b),d.get("rgb")):(b=b.getElementsByTagName(c),b.length&&(b[0].opacity=1),a);var f,g,h,i,j,k,l=a.linearGradient;Da(a.stops,function(a,b){e.test(a[1])?(d=Xa(a[1]),f=d.get("rgb"),g=d.get("a")):(f=a[1],g=1),b?(j=f,k=g):(h=f,i=g)}),a=90-180*U.atan((l[3]-l[1])/(l[2]-l[0]))/ba,a=["<",c,' colors="0% ',h,",100% ",j,'" angle="',a,'" opacity="',k,'" o:opacity2="',i,'" type="gradient" focus="100%" />'],m(this.prepVML(a),null,null,b)},"prepVML":function(a){var b=this.isIE8;return a=a.join(""),b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:"),a},"text":function(a,b,c){var d=B.chart.style;return this.createElement("span").attr({"text":a,"x":V(b),"y":V(c)}).css({"whiteSpace":"nowrap","fontFamily":d.fontFamily,"fontSize":d.fontSize})},"path":function(a){return this.createElement("shape").attr({"coordsize":"100 100","d":a})},"circle":function(a,b,c){return this.symbol("circle").attr({"x":a,"y":b,"r":c})},"g":function(a){var b;return a&&(b={"className":sa+a,"class":sa+a}),this.createElement(oa).attr(b)},"image":function(a,b,c,d,e){var f=this.createElement("img").attr({"src":a});return arguments.length>1&&f.css({"left":b,"top":c,"width":d,"height":e}),f},"rect":function(a,b,c,e,f,g){d(a)&&(b=a.y,c=a.width,e=a.height,f=a.r,g=a.strokeWidth,a=a.x);var h=this.symbol("rect");return h.r=f,h.attr(h.crisp(g,a,b,Y(c,0),Y(e,0)))},"invertChild":function(a,c){var d=c.style;l(a,{"flip":"x","left":b(d.width)-10,"top":b(d.height)-10,"rotation":-90})},"symbols":{"arc":function(a,b,c,d){var e=d.start,f=d.end,g=_(e),h=aa(e),i=_(f),j=aa(f);d=d.innerR;var k=.07/c,l=d&&.1/d||0;return f-e===0?["x"]:(k>2*ba-f+e?i=-k:l>f-e&&(i=_(e+l)),["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*i,b+c*j,"at",a-d,b-d,a+d,b+d,a+d*i,b+d*j,a+d*g,b+d*h,"x","e"])},"circle":function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},"rect":function(a,b,c,d){if(!h(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;return c=Z(c,e,d),[wa,a+c,b,xa,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,xa,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,xa,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,xa,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}}),z=Ba),y.prototype.callbacks=[];var Za=function(){};Za.prototype={"init":function(a,b){var c,d=a.chart.counters;return this.series=a,this.applyOptions(b),this.pointAttr={},a.options.colorByPoint&&(c=a.chart.options.colors,this.options||(this.options={}),this.color=this.options.color=this.color||c[d.color++],d.wrapColor(c.length)),a.chart.pointCount++,this},"applyOptions":function(b){var f=this.series;this.config=b,e(b)||null===b?this.y=b:d(b)&&!e(b.length)?(a(this,b),this.options=b):c(b[0])?(this.name=b[0],this.y=b[1]):e(b[0])&&(this.x=b[0],this.y=b[1]),this.x===F&&(this.x=f.autoIncrement())},"destroy":function(){var a,b=this,c=b.series,d=c.chart.hoverPoints;c.chart.pointCount--,d&&(b.setState(),g(d,b)),b===c.chart.hoverPoint&&b.onMouseOut(),Ia(b),Da(["graphic","tracker","group","dataLabel","connector","shadowGroup"],function(a){b[a]&&b[a].destroy()}),b.legendItem&&b.series.chart.legend.destroyItem(b);for(a in b)b[a]=null},"getLabelConfig":function(){return{"x":this.category,"y":this.y,"series":this.series,"point":this,"percentage":this.percentage,"total":this.total||this.stackTotal}},"select":function(a,b){var c=this,d=c.series.chart;a=k(a,!c.selected),c.firePointEvent(a?"select":"unselect",{"accumulate":b},function(){c.selected=a,c.setState(a&&"select"),b||Da(d.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=!1,a.setState(za),a.firePointEvent("unselect"))})})},"onMouseOver":function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut(),this.firePointEvent("mouseOver"),b&&!b.shared&&b.refresh(this),this.setState(Aa),a.hoverPoint=this},"onMouseOut":function(){this.firePointEvent("mouseOut"),this.setState(),this.series.chart.hoverPoint=null},"tooltipFormatter":function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",a?"":"<b>x = "+(this.name||this.x)+",</b> ","<b>",a?"":"y = ",this.y,"</b>"].join("")},"update":function(a,b,c){var e=this,f=e.series,g=e.graphic,h=f.chart;b=k(b,!0),e.firePointEvent("update",{
  "options":a},function(){e.applyOptions(a),d(a)&&(f.getAttribs(),g&&g.attr(e.pointAttr[f.state])),f.isDirty=!0,b&&h.redraw(c)})},"remove":function(a,b){var c=this,d=c.series,e=d.chart,f=d.data;u(b,e),a=k(a,!0),c.firePointEvent("remove",null,function(){g(f,c),c.destroy(),d.isDirty=!0,a&&e.redraw()})},"firePointEvent":function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents(),"click"===a&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}),Ja(this,a,b,c)},"importEvents":function(){if(!this.hasImportedEvents){var a,b=Ga(this.series.options.point,this.options).events;this.events=b;for(a in b)Ha(this,a,b[a]);this.hasImportedEvents=!0}},"setState":function(a){var b=this.series,c=b.options.states,d=Wa[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===!1,g=b.stateMarkerGraphic,h=b.chart,i=this.pointAttr;a=a||za,a===this.state||this.selected&&"select"!==a||c[a]&&c[a].enabled===!1||a&&(f||e&&!d.enabled)||(this.graphic?this.graphic.attr(i[a]):(a&&(g||(b.stateMarkerGraphic=g=h.renderer.circle(0,0,i[a].r).attr(i[a]).add(b.group)),g.translate(this.plotX,this.plotY)),g&&g[a?"show":"hide"]()),this.state=a)}};var $a=function(){};$a.prototype={"isCartesian":!0,"type":"line","pointClass":Za,"pointAttrToOptions":{"stroke":"lineColor","stroke-width":"lineWidth","fill":"fillColor","r":"radius"},"init":function(b,c){var d,e;e=b.series.length,this.chart=b,c=this.setOptions(c),a(this,{"index":e,"options":c,"name":c.name||"Series "+(e+1),"state":za,"pointAttr":{},"visible":c.visible!==!1,"selected":c.selected===!0}),e=c.events;for(d in e)Ha(this,d,e[d]);(e&&e.click||c.point&&c.point.events&&c.point.events.click||c.allowPointSelect)&&(b.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.setData(c.data,!1)},"autoIncrement":function(){var a=this.options,b=this.xIncrement;return b=k(b,a.pointStart,0),this.pointInterval=k(this.pointInterval,a.pointInterval,1),this.xIncrement=b+this.pointInterval,b},"cleanData":function(){var a,b,c,d,e=this.chart,f=this.data,g=e.smallestInterval;if(s(f,function(a,b){return a.x-b.x}),this.options.connectNulls)for(d=f.length-1;d>=0;d--)null===f[d].y&&f[d-1]&&f[d+1]&&f.splice(d,1);for(d=f.length-1;d>=0;d--)f[d-1]&&(c=f[d].x-f[d-1].x,c>0&&(b===F||b>c)&&(b=c,a=d));(g===F||g>b)&&(e.smallestInterval=b),this.closestPoints=a},"getSegments":function(){var a=-1,b=[],c=this.data;Da(c,function(d,e){null===d.y?(e>a+1&&b.push(c.slice(a+1,e)),a=e):e===c.length-1&&b.push(c.slice(a+1,e+1))}),this.segments=b},"setOptions":function(a){var b=this.chart.options.plotOptions;return Ga(b[this.type],b.series,a)},"getColor":function(){var a=this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff",b.wrapColor(a.length)},"getSymbol":function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++],b.wrapSymbol(a.length)},"addPoint":function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a),u(d,h),f&&c&&(f.shift=c),g&&(g.shift=c,g.isArea=!0),b=k(b,!0),e.push(a),c&&e[0].remove(!1),this.getAttribs(),this.isDirty=!0,b&&h.redraw()},"setData":function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;for(c.xIncrement=null,h(e)&&(f.counters.color=e),a=Fa(j(a||[]),function(a){return(new c.pointClass).init(c,a)});g--;)d[g].destroy();c.data=a,c.cleanData(),c.getSegments(),c.getAttribs(),c.isDirty=!0,f.isDirtyBox=!0,k(b,!0)&&f.redraw(!1)},"remove":function(a,b){var c=this,d=c.chart;a=k(a,!0),c.isRemoving||(c.isRemoving=!0,Ja(c,"remove",null,function(){c.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,a&&d.redraw(b)})),c.isRemoving=!1},"translate":function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],i=g.x,j=g.y,k=g.low,l=d.stacks[(0>j?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(i),b&&this.visible&&l&&l[i]&&(k=l[i],i=k.total,k.cum=k=k.cum-j,j=k+j,"percent"===b&&(k=i?100*k/i:0,j=i?100*j/i:0),g.percentage=i?100*g.y/i:0,g.stackTotal=i),h(k)&&(g.yBottom=d.translate(k,0,1,0,1)),null!==j&&(g.plotY=d.translate(j,0,1,0,1)),g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX,g.category=c&&c[g.x]!==F?c[g.x]:g.x}},"setTooltipPoints":function(a){var b,c,d=this.chart,e=d.inverted,f=[],g=V((e?d.plotTop:d.plotLeft)+d.plotSizeX),h=[];a&&(this.tooltipPoints=null),Da(this.segments,function(a){f=f.concat(a)}),this.xAxis&&this.xAxis.reversed&&(f=f.reverse()),Da(f,function(a,d){for(b=f[d-1]?f[d-1]._high+1:0,c=a._high=f[d+1]?W((a.plotX+(f[d+1]?f[d+1].plotX:g))/2):g;c>=b;)h[e?g-b++:b++]=a}),this.tooltipPoints=h},"onMouseOver":function(){var a=this.chart,b=a.hoverSeries;(ka||!a.mouseIsDown)&&(b&&b!==this&&b.onMouseOut(),this.options.events.mouseOver&&Ja(this,"mouseOver"),this.tracker&&this.tracker.toFront(),this.setState(Aa),a.hoverSeries=this)},"onMouseOut":function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut(),this&&a.events.mouseOut&&Ja(this,"mouseOut"),c&&!a.stickyTracking&&c.hide(),this.setState(),b.hoverSeries=null},"animate":function(a){var b=this.chart,c=this.clipRect,e=this.options.animation;e&&!d(e)&&(e={}),a?c.isAnimating||(c.attr("width",0),c.isAnimating=!0):(c.animate({"width":b.plotSizeX},e),this.animate=null)},"drawPoints":function(){var a,b,c,d,e,f,g,h=this.data,i=this.chart;if(this.options.marker.enabled)for(d=h.length;d--;)e=h[d],b=e.plotX,c=e.plotY,g=e.graphic,c===F||isNaN(c)||(a=e.pointAttr[e.selected?"select":za],f=a.r,g?g.animate({"x":b,"y":c,"r":f}):e.graphic=i.renderer.symbol(k(e.marker&&e.marker.symbol,this.symbol),b,c,f).attr(a).add(this.group))},"convertAttribs":function(a,b,c,d){var e,f,g=this.pointAttrToOptions,h={};a=a||{},b=b||{},c=c||{},d=d||{};for(e in g)f=g[e],h[e]=k(a[f],b[e],c[e],d[e]);return h},"getAttribs":function(){var a,b,c,d=this,e=Wa[d.type].marker?d.options.marker:d.options,f=e.states,g=f[Aa],i=d.color,j={"stroke":i,"fill":i},k=d.data,l=[],m=d.pointAttrToOptions;for(d.options.marker?(g.radius=g.radius||e.radius+2,g.lineWidth=g.lineWidth||e.lineWidth+1):g.color=g.color||Xa(g.color||i).brighten(g.brightness).get(),l[za]=d.convertAttribs(e,j),Da([Aa,"select"],function(a){l[a]=d.convertAttribs(f[a],l[za])}),d.pointAttr=l,i=k.length;i--;){if(j=k[i],(e=j.options&&j.options.marker||j.options)&&e.enabled===!1&&(e.radius=0),a=!1,j.options)for(c in m)h(e[m[c]])&&(a=!0);a?(b=[],f=e.states||{},a=f[Aa]=f[Aa]||{},d.options.marker||(a.color=Xa(a.color||j.options.color).brighten(a.brightness||g.brightness).get()),b[za]=d.convertAttribs(e,l[za]),b[Aa]=d.convertAttribs(f[Aa],l[Aa],b[za]),b.select=d.convertAttribs(f.select,l.select,b[za])):b=l,j.pointAttr=b}},"destroy":function(){var a,b,c=this,d=c.chart,e=c.clipRect,f=/\/5[0-9\.]+ (Safari|Mobile)\//.test(da);Ja(c,"destroy"),Ia(c),c.legendItem&&c.chart.legend.destroyItem(c),Da(c.data,function(a){a.destroy()}),e&&e!==d.clipRect&&(c.clipRect=e.destroy()),Da(["area","graph","dataLabelsGroup","group","tracker"],function(b){c[b]&&(a=f&&"group"===b?"hide":"destroy",c[b][a]())}),d.hoverSeries===c&&(d.hoverSeries=null),g(d.series,c);for(b in c)delete c[b]},"drawDataLabels":function(){if(this.options.dataLabels.enabled){var a,c,d,e,f=this.data,g=this.options,i=g.dataLabels,j=this.dataLabelsGroup,l=this.chart,m=l.renderer,n=l.inverted,o=this.type;e=g.stacking;var p="column"===o||"bar"===o,q=null===i.verticalAlign,r=null===i.y;p&&(e?(q&&(i=Ga(i,{"verticalAlign":"middle"})),r&&(i=Ga(i,{"y":{"top":14,"middle":4,"bottom":-6}[i.verticalAlign]}))):q&&(i=Ga(i,{"verticalAlign":"top"}))),j?j.translate(l.plotLeft,l.plotTop):j=this.dataLabelsGroup=m.g("data-labels").attr({"visibility":this.visible?ta:ra,"zIndex":6}).translate(l.plotLeft,l.plotTop).add(),e=i.color,"auto"===e&&(e=null),i.style.color=k(e,this.color,"black"),Da(f,function(e){var f=e.barX,q=f&&f+e.barW/2||e.plotX||-999,s=k(e.plotY,-999),t=e.dataLabel,u=i.align,v=r?e.y>=0?-6:12:i.y;d=i.formatter.call(e.getLabelConfig()),a=(n?l.plotWidth-s:q)+i.x,c=(n?l.plotHeight-q:s)+v,"column"===o&&(a+={"left":-1,"right":1}[u]*e.barW/2||0),n&&e.y<0&&(u="right",a-=10),t?(n&&!i.y&&(c=c+.9*b(t.styles.lineHeight)-t.getBBox().height/2),t.attr({"text":d}).animate({"x":a,"y":c})):h(d)&&(t=e.dataLabel=m.text(d,a,c).attr({"align":u,"rotation":i.rotation,"zIndex":1}).css(i.style).add(j),n&&!i.y&&t.attr({"y":c+.9*b(t.styles.lineHeight)-t.getBBox().height/2})),p&&g.stacking&&t&&(q=e.barY,s=e.barW,e=e.barH,t.align(i,null,{"x":n?l.plotWidth-q-e:f,"y":n?l.plotHeight-f-s:q,"width":n?e:s,"height":n?s:e}))})}},"drawGraph":function(){var a,b,c=this,d=c.options,e=c.graph,f=[],g=c.area,h=c.group,i=d.lineColor||c.color,j=d.lineWidth,l=d.dashStyle,m=c.chart.renderer,n=c.yAxis.getThreshold(d.threshold||0),o=/^area/.test(c.type),p=[],q=[];Da(c.segments,function(a){if(b=[],Da(a,function(e,f){c.getPointSpline?b.push.apply(b,c.getPointSpline(a,e,f)):(b.push(f?xa:wa),f&&d.step&&b.push(e.plotX,a[f-1].plotY),b.push(e.plotX,e.plotY))}),a.length>1?f=f.concat(b):p.push(a[0]),o){var e,g=[],h=b.length;for(e=0;h>e;e++)g.push(b[e]);if(3===h&&g.push(xa,b[1],b[2]),d.stacking&&"areaspline"!==c.type)for(e=a.length-1;e>=0;e--)g.push(a[e].plotX,a[e].yBottom);else g.push(xa,a[a.length-1].plotX,n,xa,a[0].plotX,n);q=q.concat(g)}}),c.graphPath=f,c.singlePoints=p,o&&(a=k(d.fillColor,Xa(c.color).setOpacity(d.fillOpacity||.75).get()),g?g.animate({"d":q}):c.area=c.chart.renderer.path(q).attr({"fill":a}).add(h)),e?(La(e),e.animate({"d":f})):j&&(e={"stroke":i,"stroke-width":j},l&&(e.dashstyle=l),c.graph=m.path(f).attr(e).add(h).shadow(d.shadow))},"render":function(){var a,b,c=this,d=c.chart,e=c.options,f=e.animation,g=f&&c.animate;f=g?f&&f.duration||500:0;var h=c.clipRect,i=d.renderer;h||(h=c.clipRect=!d.hasRendered&&d.clipRect?d.clipRect:i.clipRect(0,0,d.plotSizeX,d.plotSizeY),d.clipRect||(d.clipRect=h)),c.group||(a=c.group=i.g("series"),d.inverted&&(b=function(){a.attr({"width":d.plotWidth,"height":d.plotHeight}).invert()},b(),Ha(d,"resize",b),Ha(c,"destroy",function(){Ia(d,"resize",b)})),a.clip(c.clipRect).attr({"visibility":c.visible?ta:ra,"zIndex":e.zIndex}).translate(d.plotLeft,d.plotTop).add(d.seriesGroup)),c.drawDataLabels(),g&&c.animate(!0),c.drawGraph&&c.drawGraph(),c.drawPoints(),c.options.enableMouseTracking!==!1&&c.drawTracker(),g&&c.animate(),setTimeout(function(){h.isAnimating=!1,(a=c.group)&&h!==d.clipRect&&h.renderer&&(a.clip(c.clipRect=d.clipRect),h.destroy())},f),c.isDirty=!1},"redraw":function(){var a=this.chart,b=this.group;b&&(a.inverted&&b.attr({"width":a.plotWidth,"height":a.plotHeight}),b.animate({"translateX":a.plotLeft,"translateY":a.plotTop})),this.translate(),this.setTooltipPoints(!0),this.render()},"setState":function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth,a=a||za,this.state!==a&&(this.state=a,d[a]&&d[a].enabled===!1||(a&&(b=d[a].lineWidth||b+1),c&&!c.dashstyle&&c.attr({"stroke-width":b},a?0:500)))},"setVisible":function(a,b){var c,d=this.chart,e=this.legendItem,f=this.group,g=this.tracker,h=this.dataLabelsGroup,i=this.data,j=d.options.chart.ignoreHiddenSeries;if(c=this.visible,c=(this.visible=a=a===F?!c:a)?"show":"hide",f&&f[c](),g)g[c]();else for(f=i.length;f--;)g=i[f],g.tracker&&g.tracker[c]();h&&h[c](),e&&d.legend.colorizeItem(this,a),this.isDirty=!0,this.options.stacking&&Da(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)}),j&&(d.isDirtyBox=!0),b!==!1&&d.redraw(),Ja(this,c)},"show":function(){this.setVisible(!0)},"hide":function(){this.setVisible(!1)},"select":function(a){this.selected=a=a===F?!this.selected:a,this.checkbox&&(this.checkbox.checked=a),Ja(this,a?"select":"unselect")},"drawTracker":function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{"cursor":h};var i,j=a.singlePoints;if(d)for(i=d+1;i--;)c[i]===wa&&c.splice(i+1,0,c[i+1]-f,c[i+2],xa),(i&&c[i]===wa||i===d)&&c.splice(i,0,xa,c[i-2]+f,c[i-1]);for(i=0;i<j.length;i++)d=j[i],c.push(wa,d.plotX-f,d.plotY,xa,d.plotX+f,d.plotY);g?g.attr({"d":c}):a.tracker=e.renderer.path(c).attr({"isTracker":!0,"stroke":ya,"fill":va,"stroke-width":b.lineWidth+2*f,"visibility":a.visible?ta:ra,"zIndex":b.zIndex||1}).on(ka?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}},Ba=n($a),Ma.line=Ba,Ba=n($a,{"type":"area"}),Ma.area=Ba,Ba=n($a,{"type":"spline","getPointSpline":function(a,b,c){var d,e,f,g,h=b.plotX,i=b.plotY,j=a[c-1],k=a[c+1];if(c&&c<a.length-1){a=j.plotY,f=k.plotX,k=k.plotY;var l;d=(1.5*h+j.plotX)/2.5,e=(1.5*i+a)/2.5,f=(1.5*h+f)/2.5,g=(1.5*i+k)/2.5,l=(g-e)*(f-h)/(f-d)+i-g,e+=l,g+=l,e>a&&e>i?(e=Y(a,i),g=2*i-e):a>e&&i>e&&(e=Z(a,i),g=2*i-e),g>k&&g>i?(g=Y(k,i),e=2*i-g):k>g&&i>g&&(g=Z(k,i),e=2*i-g),b.rightContX=f,b.rightContY=g}return c?(b=["C",j.rightContX||j.plotX,j.rightContY||j.plotY,d||h,e||i,h,i],j.rightContX=j.rightContY=null):b=[wa,h,i],b}}),Ma.spline=Ba,Ba=n(Ba,{"type":"areaspline"}),Ma.areaspline=Ba;var _a=n($a,{"type":"column","pointAttrToOptions":{"stroke":"borderColor","stroke-width":"borderWidth","fill":"color","r":"borderRadius"},"init":function(){$a.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=!0,b.hasRendered&&Da(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},"translate":function(){var b,c,d=this,e=d.chart,f=d.options,g=f.stacking,i=f.borderWidth,j=0,l=d.xAxis.reversed,m=d.xAxis.categories,n={};$a.prototype.translate.apply(d),Da(e.series,function(a){a.type===d.type&&a.visible&&(a.options.stacking?(b=a.stackKey,n[b]===F&&(n[b]=j++),c=n[b]):c=j++,a.columnIndex=c)});var o=d.data,p=d.closestPoints;m=$(o[1]?o[p].plotX-o[p-1].plotX:e.plotSizeX/(m&&m.length||1)),p=m*f.groupPadding;var q=(m-2*p)/j,r=f.pointWidth,s=h(r)?(q-r)/2:q*f.pointPadding,t=Y(k(r,q-2*s),1),u=s+(p+((l?j-d.columnIndex:d.columnIndex)||0)*q-m/2)*(l?-1:1),v=d.yAxis.getThreshold(f.threshold||0),w=k(f.minPointLength,5);Da(o,function(b){var c,j=b.plotY,k=b.yBottom||v,l=b.plotX+u,m=X(Z(j,k)),n=X(Y(j,k)-m),o=d.yAxis.stacks[(b.y<0?"-":"")+d.stackKey];g&&d.visible&&o&&o[b.x]&&o[b.x].setOffset(u,t),$(n)<w&&(w&&(n=w,m=$(m-v)>w?k-w:v-(v>=j?w:0)),c=m-3),a(b,{"barX":l,"barY":m,"barW":t,"barH":n}),b.shapeType="rect",j=a(e.renderer.Element.prototype.crisp.apply({},[i,l,m,t,n]),{"r":f.borderRadius}),i%2&&(j.y-=1,j.height+=1),b.shapeArgs=j,b.trackerArgs=h(c)&&Ga(b.shapeArgs,{"height":Y(6,n+3),"y":c})})},"getSymbol":function(){},"drawGraph":function(){},"drawPoints":function(){var a,b,c=this,d=c.options,e=c.chart.renderer;Da(c.data,function(f){var g=f.plotY;g===F||isNaN(g)||null===f.y||(a=f.graphic,b=f.shapeArgs,a?(La(a),a.animate(b)):f.graphic=e[f.shapeType](b).attr(f.pointAttr[f.selected?"select":za]).add(c.group).shadow(d.shadow))})},"drawTracker":function(){var a,b,c,d=this,e=d.chart,f=e.renderer,g=+new Date,h=d.options,j=h.cursor,k=j&&{"cursor":j};Da(d.data,function(j){b=j.tracker,a=j.trackerArgs||j.shapeArgs,delete a.strokeWidth,null!==j.y&&(b?b.attr(a):j.tracker=f[j.shapeType](a).attr({"isTracker":g,"fill":ya,"visibility":d.visible?ta:ra,"zIndex":h.zIndex||1}).on(ka?"touchstart":"mouseover",function(a){c=a.relatedTarget||a.fromElement,e.hoverSeries!==d&&i(c,"isTracker")!==g&&d.onMouseOver(),j.onMouseOver()}).on("mouseout",function(a){h.stickyTracking||(c=a.relatedTarget||a.toElement,i(c,"isTracker")!==g&&d.onMouseOut())}).css(k).add(j.group||e.trackerGroup))})},"animate":function(a){var b=this,c=b.data;a||(Da(c,function(a){var c=a.graphic;a=a.shapeArgs,c&&(c.attr({"height":0,"y":b.yAxis.translate(0,0,1)}),c.animate({"height":a.height,"y":a.y},b.options.animation))}),b.animate=null)},"remove":function(){var a=this,b=a.chart;b.hasRendered&&Da(b.series,function(b){b.type===a.type&&(b.isDirty=!0)}),$a.prototype.remove.apply(a,arguments)}});Ma.column=_a,Ba=n(_a,{"type":"bar","init":function(a){a.inverted=this.inverted=!0,_a.prototype.init.apply(this,arguments)}}),Ma.bar=Ba,Ba=n($a,{"type":"scatter","translate":function(){var a=this;$a.prototype.translate.apply(a),Da(a.data,function(b){b.shapeType="circle",b.shapeArgs={"x":b.plotX,"y":b.plotY,"r":a.chart.options.tooltip.snap}})},"drawTracker":function(){var a,b=this,c=b.options.cursor,d=c&&{"cursor":c};Da(b.data,function(c){(a=c.graphic)&&a.attr({"isTracker":!0}).on("mouseover",function(){b.onMouseOver(),c.onMouseOver()}).on("mouseout",function(){b.options.stickyTracking||b.onMouseOut()}).css(d)})},"cleanData":function(){}}),Ma.scatter=Ba,Ba=n(Za,{"init":function(){Za.prototype.init.apply(this,arguments);var b,c=this;return a(c,{"visible":c.visible!==!1,"name":k(c.name,"Slice")}),b=function(){c.slice()},Ha(c,"select",b),Ha(c,"unselect",b),c},"setVisible":function(a){var b,c=this.series.chart,d=this.tracker,e=this.dataLabel,f=this.connector,g=this.shadowGroup;b=(this.visible=a=a===F?!this.visible:a)?"show":"hide",this.group[b](),d&&d[b](),e&&e[b](),f&&f[b](),g&&g[b](),this.legendItem&&c.legend.colorizeItem(this,a)},"slice":function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;u(c,d),k(b,!0),a=this.sliced=h(a)?a:!this.sliced,a={"translateX":a?e[0]:d.plotLeft,"translateY":a?e[1]:d.plotTop},this.group.animate(a),this.shadowGroup&&this.shadowGroup.animate(a)}}),Ba=n($a,{"type":"pie","isCartesian":!1,"pointClass":Ba,"pointAttrToOptions":{"stroke":"borderColor","stroke-width":"borderWidth","fill":"color"},"getColor":function(){this.initialColor=this.chart.counters.color},"animate":function(){var a=this;Da(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-ba/2;c&&(c.attr({"r":0,"start":d,"end":d}),c.animate({"r":b.r,"start":b.start,"end":b.end},a.options.animation))}),a.animate=null},"translate":function(){var a,c,d,e,f,g,h,i=0,j=-.25,k=this.options,l=k.slicedOffset,m=l+k.borderWidth,n=k.center.concat([k.size,k.innerSize||0]),o=this.chart,p=o.plotWidth,q=o.plotHeight,r=this.data,s=2*ba,t=Z(p,q),u=k.dataLabels.distance;n=Fa(n,function(a,c){return(f=/%$/.test(a))?[p,q,t,t][c]*b(a)/100:a}),this.getX=function(a,b){return d=U.asin((a-n[1])/(n[2]/2+u)),n[0]+(b?-1:1)*_(d)*(n[2]/2+u)},this.center=n,Da(r,function(a){i+=a.y}),Da(r,function(b){e=i?b.y/i:0,a=V(j*s*1e3)/1e3,j+=e,c=V(j*s*1e3)/1e3,b.shapeType="arc",b.shapeArgs={"x":n[0],"y":n[1],"r":n[2]/2,"innerR":n[3]/2,"start":a,"end":c},d=(c+a)/2,b.slicedTranslation=Fa([_(d)*l+o.plotLeft,aa(d)*l+o.plotTop],V),g=_(d)*n[2]/2,h=aa(d)*n[2]/2,b.tooltipPos=[n[0]+.7*g,n[1]+.7*h],b.labelPos=[n[0]+g+_(d)*u,n[1]+h+aa(d)*u,n[0]+g+_(d)*m,n[1]+h+aa(d)*m,n[0]+g,n[1]+h,0>u?"center":s/4>d?"left":"right",d],b.percentage=100*e,b.total=i}),this.setTooltipPoints()},"render":function(){this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),this.drawDataLabels(),this.options.animation&&this.animate&&this.animate(),this.isDirty=!1},"drawPoints":function(){var b,c,d,e,f,g=this.chart,h=g.renderer,i=this.options.shadow;Da(this.data,function(j){c=j.graphic,f=j.shapeArgs,d=j.group,e=j.shadowGroup,i&&!e&&(e=j.shadowGroup=h.g("shadow").attr({"zIndex":4}).add()),d||(d=j.group=h.g("point").attr({"zIndex":5}).add()),b=j.sliced?j.slicedTranslation:[g.plotLeft,g.plotTop],d.translate(b[0],b[1]),e&&e.translate(b[0],b[1]),c?c.animate(f):j.graphic=h.arc(f).attr(a(j.pointAttr[za],{"stroke-linejoin":"round"})).add(j.group).shadow(i,e),j.visible===!1&&j.setVisible(!1)})},"drawDataLabels":function(){var a,c,d,e=this.data,f=this.chart,g=this.options.dataLabels,h=k(g.connectorPadding,10),i=k(g.connectorWidth,1),j=k(g.softConnector,!0),l=g.distance,m=this.center,n=m[2]/2;m=m[1];var o,p,q,r,s,t=l>0,u=[[],[]],v=2;if(g.enabled)for($a.prototype.drawDataLabels.apply(this),Da(e,function(a){a.dataLabel&&u[a.labelPos[7]<ba/2?0:1].push(a)}),u[1].reverse(),r=function(a,b){return b.y-a.y},e=u[0][0]&&u[0][0].dataLabel&&b(u[0][0].dataLabel.styles.lineHeight);v--;){var w,x=[],y=[],z=u[v],A=z.length;for(s=m-n-l;m+n+l>=s;s+=e)x.push(s);if(q=x.length,A>q){for(d=[].concat(z),d.sort(r),s=A;s--;)d[s].rank=s;for(s=A;s--;)z[s].rank>=q&&z.splice(s,1);A=z.length}for(s=0;A>s;s++){for(a=z[s],d=a.labelPos,a=9999,p=0;q>p;p++)c=$(x[p]-d[1]),a>c&&(a=c,w=p);if(s>w&&null!==x[s])w=s;else for(A-s+w>q&&null!==x[s]&&(w=q-A+s);null===x[w];)w++;y.push({"i":w,"y":x[w]}),x[w]=null}for(y.sort(r),s=0;A>s;s++)a=z[s],d=a.labelPos,c=a.dataLabel,p=y.pop(),o=d[1],q=a.visible===!1?ra:ta,w=p.i,p=p.y,(o>p&&null!==x[w+1]||p>o&&null!==x[w-1])&&(p=o),o=this.getX(0===w||w===x.length-1?o:p,v),c.attr({"visibility":q,"align":d[6]})[c.moved?"animate":"attr"]({"x":o+g.x+({"left":h,"right":-h}[d[6]]||0),"y":p+g.y}),c.moved=!0,t&&i&&(c=a.connector,d=j?[wa,o+("left"===d[6]?5:-5),p,"C",o,p,2*d[2]-d[4],2*d[3]-d[5],d[2],d[3],xa,d[4],d[5]]:[wa,o+("left"===d[6]?5:-5),p,xa,d[2],d[3],xa,d[4],d[5]],c?(c.animate({"d":d}),c.attr("visibility",q)):a.connector=c=this.chart.renderer.path(d).attr({"stroke-width":i,"stroke":g.connectorColor||a.color||"#606060","visibility":q,"zIndex":3}).translate(f.plotLeft,f.plotTop).add())}},"drawTracker":_a.prototype.drawTracker,"getSymbol":function(){}}),Ma.pie=Ba,T.Highcharts={"Chart":y,"dateFormat":C,"pathAnim":E,"getOptions":function(){return B},"hasRtlBug":ja,"numberFormat":o,"Point":Za,"Color":Xa,"Renderer":z,"seriesTypes":Ma,"setOptions":function(a){return B=Ga(B,a),v(),B},"Series":$a,"addEvent":Ha,"removeEvent":Ia,"createElement":m,"discardElement":w,"css":l,"each":Da,"extend":a,"map":Fa,"merge":Ga,"pick":k,"extendClass":n,"product":"Highcharts","version":"2.1.9"}}();
  !function(a){a.fn.highchartTable=function(){var d=["column","line","area","spline","pie"],e=function(b,c){var d=a(b).data(c);if("undefined"!=typeof d){for(var e=d.split("."),f=window[e[0]],g=1,h=e.length;h>g;g++)f=f[e[g]];return f}};return this.each(function(){var f,g=a(this),h=a(g),i=1,j=a("caption",g),k=j.length?a(j[0]).text():"";if(1!=h.data("graph-container-before")){var l=h.data("graph-container");if(!l)throw"graph-container data attribute is mandatory";if("#"===l[0]||-1===l.indexOf(".."))f=a(l);else{for(var m=g,n=l;-1!==n.indexOf("..");)n=n.replace(/^.. /,""),m=m.parent();f=a(n,m)}if(1!==f.length)throw"graph-container is not available in this DOM or available multiple times";f=f[0]}else h.before("<div></div>"),f=h.prev(),f=f[0];var o=h.data("graph-type");if(!o)throw"graph-type data attribute is mandatory";if(-1==a.inArray(o,d))throw"graph-container data attribute must be one of "+d.join(", ");var p=h.data("graph-stacking");p||(p="normal");var q=h.data("graph-datalabels-enabled"),r=1==h.data("graph-inverted"),s=a("thead th",g),t=[],u=[],v=0,w=!1;s.each(function(b,c){var e=a(c),f=e.data("graph-value-scale"),g=e.data("graph-type");-1==a.inArray(g,d)&&(g=o);var j=e.data("graph-stack-group");j&&(w=!0);var k=e.data("graph-datalabels-enabled");"undefined"==typeof k&&(k=q);var l=e.data("graph-yaxis");"undefined"!=typeof l&&"1"==l&&(i=2);var m=1==e.data("graph-skip");m&&(v+=1);var n={"libelle":e.text(),"skip":m,"indexTd":b-v-1,"color":e.data("graph-color"),"visible":!e.data("graph-hidden"),"yAxis":"undefined"!=typeof l?l:0,"dashStyle":e.data("graph-dash-style")||"solid","dataLabelsEnabled":1==k,"dataLabelsColor":e.data("graph-datalabels-color")||h.data("graph-datalabels-color")},p=e.data("graph-vline-x");"undefined"==typeof p?(n.scale="undefined"!=typeof f?parseFloat(f):1,n.graphType="column"==g&&r?"bar":g,n.stack=j,n.unit=e.data("graph-unit"),t[b]=n):(n.x=p,n.height=e.data("graph-vline-height"),n.name=e.data("graph-vline-name"),u[b]=n)});var x=[];a(t).each(function(a,b){if(0!=a&&!b.skip){var c={"name":b.libelle+(b.unit?" ("+b.unit+")":""),"data":[],"type":b.graphType,"stack":b.stack,"color":b.color,"visible":b.visible,"yAxis":b.yAxis,"dashStyle":b.dashStyle,"marker":{"enabled":!1},"dataLabels":{"enabled":b.dataLabelsEnabled,"color":b.dataLabelsColor,"align":h.data("graph-datalabels-align")||("column"==o&&1==r?void 0:"center")}};if(b.dataLabelsEnabled){var d=e(g,"graph-datalabels-formatter");d&&(c.dataLabels.formatter=function(){return d(this.y)})}x.push(c)}}),a(u).each(function(a,b){"undefined"==typeof b||b.skip||x.push({"name":b.libelle,"data":[{"x":b.x,"y":0,"name":b.name},{"x":b.x,"y":b.height,"name":b.name}],"type":"spline","color":b.color,"visible":b.visible,"marker":{"enabled":!1}})});var y=[],z=e(g,"graph-point-callback"),A="datetime"==h.data("graph-xaxis-type"),B=a("tbody:first tr",g);B.each(function(b,d){if(!a(d).data("graph-skip")){var e=a("td",d);e.each(function(e,f){var g,i=t[e];if(!i.skip){var j=a(f);if(0==e)g=j.text(),y.push(g);else{var k=j.text(),l=x[i.indexTd];if(0==k.length)A||l.data.push(null);else{var m=k.replace(/\s/g,"").replace(/,/,"."),n={"value":m,"rawValue":k,"td":j,"tr":a(d),"indexTd":e,"indexTr":b};h.trigger("highchartTable.cleanValue",n),g=Math.round(parseFloat(n.value)*i.scale*100)/100;var o=j.data("graph-x");if(A){o=a("td",a(d)).first().text();var p=c(o);o=p.getTime()-60*p.getTimezoneOffset()*1e3}var q=j.data("graph-name"),r={"name":"undefined"!=typeof q?q:k,"y":g,"x":o};z&&(r.events={"click":function(){return z(this)}}),"pie"===i.graphType&&j.data("graph-item-highlight")&&(r.sliced=1);var s=j.data("graph-item-color");"undefined"!=typeof s&&(r.color=s),l.data.push(r)}}}})}});var C,D=function(a,b,c){var d=a.data("graph-yaxis-"+b+"-"+c);return"undefined"!=typeof d?d:a.data("graph-yaxis"+b+"-"+c)},E=[];for(C=1;i>=C;C++){var F={"title":{"text":"undefined"!=typeof D(h,C,"title-text")?D(h,C,"title-text"):null},"max":"undefined"!=typeof D(h,C,"max")?D(h,C,"max"):null,"min":"undefined"!=typeof D(h,C,"min")?D(h,C,"min"):null,"reversed":"1"==D(h,C,"reversed"),"opposite":"1"==D(h,C,"opposite"),"tickInterval":D(h,C,"tick-interval")||null,"labels":{"rotation":D(h,C,"rotation")||0},"startOnTick":"0"!=D(h,C,"start-on-tick"),"endOnTick":"0"!=D(h,C,"end-on-tick"),"stackLabels":{"enabled":"1"==D(h,C,"stacklabels-enabled")},"gridLineInterpolation":D(h,C,"grid-line-interpolation")||null},G=e(g,"graph-yaxis-"+C+"-formatter-callback");G||(G=e(g,"graph-yaxis"+C+"-formatter-callback")),G&&(F.labels.formatter=function(){return G(this.value)}),E.push(F)}for(var H=["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],I=[],J="undefined"!=typeof Highcharts.theme&&"undefined"!=typeof Highcharts.theme.colors?Highcharts.theme.colors:[],K=h.data("graph-line-shadow"),L=h.data("graph-line-width")||2,M=Math.max(H.length,J.length),N=0;M>N;N++){var O="graph-color-"+(N+1);I.push("undefined"!=typeof h.data(O)?h.data(O):"undefined"!=typeof J[N]?J[N]:H[N])}var P=h.data("graph-margin-top"),Q=h.data("graph-margin-right"),R=h.data("graph-margin-bottom"),S=h.data("graph-margin-left"),T=h.data("graph-xaxis-labels-enabled"),U={},V=h.data("graph-xaxis-labels-font-size");"undefined"!=typeof V&&(U.fontSize=V);var W={"colors":I,"chart":{"renderTo":f,"inverted":r,"marginTop":"undefined"!=typeof P?P:null,"marginRight":"undefined"!=typeof Q?Q:null,"marginBottom":"undefined"!=typeof R?R:null,"marginLeft":"undefined"!=typeof S?S:null,"spacingTop":h.data("graph-spacing-top")||10,"height":h.data("graph-height")||null,"zoomType":h.data("graph-zoom-type")||null,"polar":h.data("graph-polar")||null},"title":{"text":k},"subtitle":{"text":h.data("graph-subtitle-text")||""},"legend":{"enabled":"1"!=h.data("graph-legend-disabled"),"layout":h.data("graph-legend-layout")||"horizontal","symbolWidth":h.data("graph-legend-width")||30,"x":h.data("graph-legend-x")||15,"y":h.data("graph-legend-y")||0},"xAxis":{"categories":"datetime"!=h.data("graph-xaxis-type")?y:void 0,"type":"datetime"==h.data("graph-xaxis-type")?"datetime":void 0,"reversed":"1"==h.data("graph-xaxis-reversed"),"opposite":"1"==h.data("graph-xaxis-opposite"),"showLastLabel":"undefined"!=typeof h.data("graph-xaxis-show-last-label")?h.data("graph-xaxis-show-last-label"):!0,"tickInterval":h.data("graph-xaxis-tick-interval")||null,"dateTimeLabelFormats":{"second":"%e. %b","minute":"%e. %b","hour":"%e. %b","day":"%e. %b","week":"%e. %b","month":"%e. %b","year":"%e. %b"},"labels":{"rotation":h.data("graph-xaxis-rotation")||void 0,"align":h.data("graph-xaxis-align")||void 0,"enabled":"undefined"!=typeof T?T:!0,"style":U},"startOnTick":h.data("graph-xaxis-start-on-tick"),"endOnTick":h.data("graph-xaxis-end-on-tick"),"min":b(g,"min"),"max":b(g,"max"),"alternateGridColor":h.data("graph-xaxis-alternateGridColor")||null,"title":{"text":h.data("graph-xaxis-title-text")||null},"gridLineWidth":h.data("graph-xaxis-gridLine-width")||0,"gridLineDashStyle":h.data("graph-xaxis-gridLine-style")||"ShortDot","tickmarkPlacement":h.data("graph-xaxis-tickmark-placement")||"between","lineWidth":h.data("graph-xaxis-line-width")||0},"yAxis":E,"tooltip":{"formatter":function(){if("datetime"==h.data("graph-xaxis-type"))return"<b>"+this.series.name+"</b><br/>"+Highcharts.dateFormat("%e. %b",this.x)+" : "+this.y;var a="undefined"!=typeof y[this.point.x]?y[this.point.x]:this.point.x;return"pie"===o?"<strong>"+this.series.name+"</strong><br />"+a+" : "+this.point.y:"<strong>"+this.series.name+"</strong><br />"+a+" : "+this.point.name}},"credits":{"enabled":!1},"plotOptions":{"line":{"dataLabels":{"enabled":!0},"lineWidth":L},"area":{"lineWidth":L,"shadow":"undefined"!=typeof K?K:!0,"fillOpacity":h.data("graph-area-fillOpacity")||.75},"pie":{"allowPointSelect":!0,"dataLabels":{"enabled":!0},"showInLegend":"1"==h.data("graph-pie-show-in-legend"),"size":"80%"},"series":{"animation":!1,"stickyTracking":!1,"stacking":w?p:null,"groupPadding":h.data("graph-group-padding")||0}},"series":x,"exporting":{"filename":k.replace(/ /g,"_"),"buttons":{"exportButton":{"menuItems":null,"onclick":function(){this.exportChart()}}}}};h.trigger("highchartTable.beforeRender",W),new Highcharts.Chart(W)}),this};var b=function(b,d){var e=a(b).data("graph-xaxis-"+d);if("undefined"!=typeof e){if("datetime"==a(b).data("graph-xaxis-type")){var f=c(e);return f.getTime()-60*f.getTimezoneOffset()*1e3}return e}return null},c=function(a){var b=a.split(" "),c=b[0].split("-"),d=null,e=null;if(b[1]){var f=b[1].split(":");d=parseInt(f[0],10),e=parseInt(f[1],10)}return new Date(parseInt(c[0],10),parseInt(c[1],10)-1,parseInt(c[2],10),d,e)}}(jQuery);