!function(e){var t=function(t,i){var n=i.getElementsByClassName(t)[0];if(!n&&((n=document.createElement("canvas")).className=t,n.style.direction="ltr",n.style.position="absolute",n.style.left="0px",n.style.top="0px",i.appendChild(n),!n.getContext))throw new Error("Canvas is not available.");this.element=n;var o=this.context=n.getContext("2d");this.pixelRatio=e.plot.browser.getPixelRatio(o);var a=e(i).width(),r=e(i).height();this.resize(a,r),this.SVGContainer=null,this.SVG={},this._textCache={}};function i(e,t){e.transform.baseVal.clear(),t&&t.forEach((function(t){e.transform.baseVal.appendItem(t)}))}t.prototype.resize=function(e,t){e=e<10?10:e,t=t<10?10:t;var i=this.element,n=this.context,o=this.pixelRatio;this.width!==e&&(i.width=e*o,i.style.width=e+"px",this.width=e),this.height!==t&&(i.height=t*o,i.style.height=t+"px",this.height=t),n.restore(),n.save(),n.scale(o,o)},t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},t.prototype.render=function(){var e=this._textCache;for(var t in e)if(hasOwnProperty.call(e,t)){var i=this.getSVGLayer(t),n=e[t],o=i.style.display;for(var a in i.style.display="none",n)if(hasOwnProperty.call(n,a)){var r=n[a];for(var s in r)if(hasOwnProperty.call(r,s)){for(var l,c=r[s],u=c.positions,p=0;u[p];p++)if((l=u[p]).active)l.rendered||(i.appendChild(l.element),l.rendered=!0);else if(u.splice(p--,1),l.rendered){for(;l.element.firstChild;)l.element.removeChild(l.element.firstChild);l.element.parentNode.removeChild(l.element)}0===u.length&&(c.measured?c.measured=!1:delete r[s])}}i.style.display=o}},t.prototype.getSVGLayer=function(e){var t,i=this.SVG[e];i||(this.SVGContainer?t=this.SVGContainer.firstChild:(this.SVGContainer=document.createElement("div"),this.SVGContainer.className="flot-svg",this.SVGContainer.style.position="absolute",this.SVGContainer.style.top="0px",this.SVGContainer.style.left="0px",this.SVGContainer.style.height="100%",this.SVGContainer.style.width="100%",this.SVGContainer.style.pointerEvents="none",this.element.parentNode.appendChild(this.SVGContainer),(t=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.width="100%",t.style.height="100%",this.SVGContainer.appendChild(t)),(i=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("class",e),i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.bottom="0px",i.style.right="0px",t.appendChild(i),this.SVG[e]=i);return i},t.prototype.getTextInfo=function(e,t,i,o,a){var r,s,l,c;t=""+t,r="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px/"+i.lineHeight+"px "+i.family:i,null==(s=this._textCache[e])&&(s=this._textCache[e]={}),null==(l=s[r])&&(l=s[r]={});var u=function(e){return e.replace(/0|1|2|3|4|5|6|7|8|9/g,"0")}(t);if(!(c=l[u])){var p=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==t.indexOf("<br>"))n(t,p,-9999);else{var h=document.createTextNode(t);p.appendChild(h)}p.style.position="absolute",p.style.maxWidth=a,p.setAttributeNS(null,"x",-9999),p.setAttributeNS(null,"y",-9999),"object"==typeof i?(p.style.font=r,p.style.fill=i.fill):"string"==typeof i&&p.setAttribute("class",i),this.getSVGLayer(e).appendChild(p);var d=p.getBBox();for(c=l[u]={width:d.width,height:d.height,measured:!0,element:p,positions:[]};p.firstChild;)p.removeChild(p.firstChild);p.parentNode.removeChild(p)}return c.measured=!0,c},t.prototype.addText=function(e,t,o,a,r,s,l,c,u,p){var h=this.getTextInfo(e,a,r,s,l),d=h.positions;"center"===c?t-=h.width/2:"right"===c&&(t-=h.width),"middle"===u?o-=h.height/2:"bottom"===u&&(o-=h.height),o+=.75*h.height;for(var f,m=0;d[m];m++){if((f=d[m]).x===t&&f.y===o&&f.text===a)return f.active=!0,void i(f.element,p);if(!1===f.active)return f.active=!0,f.text=a,-1!==a.indexOf("<br>")?(o-=.25*h.height,n(a,f.element,t)):f.element.textContent=a,f.element.setAttributeNS(null,"x",t),f.element.setAttributeNS(null,"y",o),f.x=t,f.y=o,void i(f.element,p)}f={active:!0,rendered:!1,element:d.length?h.element.cloneNode():h.element,text:a,x:t,y:o},d.push(f),-1!==a.indexOf("<br>")?(o-=.25*h.height,n(a,f.element,t)):f.element.textContent=a,f.element.setAttributeNS(null,"x",t),f.element.setAttributeNS(null,"y",o),f.element.style.textAlign=c,i(f.element,p)};var n=function(e,t,i){var n,o,a,r=e.split("<br>");for(o=0;o<r.length;o++)t.childNodes[o]?n=t.childNodes[o]:(n=document.createElementNS("http://www.w3.org/2000/svg","tspan"),t.appendChild(n)),n.textContent=r[o],a=(0===o?0:1)+"em",n.setAttributeNS(null,"dy",a),n.setAttributeNS(null,"x",i)};t.prototype.removeText=function(e,t,i,n,o,a){var r,s;if(null==n){var l=this._textCache[e];if(null!=l)for(var c in l)if(hasOwnProperty.call(l,c)){var u=l[c];for(var p in u)if(hasOwnProperty.call(u,p)){var h=u[p].positions;h.forEach((function(e){e.active=!1}))}}}else(h=(r=this.getTextInfo(e,n,o,a)).positions).forEach((function(e){s=i+.75*r.height,e.x===t&&e.y===s&&e.text===n&&(e.active=!1)}))},t.prototype.clearCache=function(){var e=this._textCache;for(var t in e)if(hasOwnProperty.call(e,t))for(var i=this.getSVGLayer(t);i.firstChild;)i.removeChild(i.firstChild);this._textCache={}},window.Flot||(window.Flot={}),window.Flot.Canvas=t}(jQuery),function(e){e.color={},e.color.make=function(t,i,n,o){var a={};return a.r=t||0,a.g=i||0,a.b=n||0,a.a=null!=o?o:1,a.add=function(e,t){for(var i=0;i<e.length;++i)a[e.charAt(i)]+=t;return a.normalize()},a.scale=function(e,t){for(var i=0;i<e.length;++i)a[e.charAt(i)]*=t;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function e(e,t,i){return t<e?e:t>i?i:t}return a.r=e(0,parseInt(a.r),255),a.g=e(0,parseInt(a.g),255),a.b=e(0,parseInt(a.b),255),a.a=e(0,a.a,1),a},a.clone=function(){return e.color.make(a.r,a.b,a.g,a.a)},a.normalize()},e.color.extract=function(t,i){var n;do{if(""!==(n=t.css(i).toLowerCase())&&"transparent"!==n)break;t=t.parent()}while(t.length&&!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"===n&&(n="transparent"),e.color.parse(n)},e.color.parse=function(i){var n,o=e.color.make;if(n=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))return o(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10));if(n=/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(i))return o(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4]));if(n=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*\)/.exec(i))return o(2.55*parseFloat(n[1]),2.55*parseFloat(n[2]),2.55*parseFloat(n[3]));if(n=/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(i))return o(2.55*parseFloat(n[1]),2.55*parseFloat(n[2]),2.55*parseFloat(n[3]),parseFloat(n[4]));if(n=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))return o(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16));if(n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(i))return o(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16));var a=e.trim(i).toLowerCase();return"transparent"===a?o(255,255,255,0):o((n=t[a]||[0,0,0])[0],n[1],n[2])};var t={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(e){"use strict";var t=window.Flot.Canvas;function i(t){var i,n=[],o=e.plot.saturated.saturate(e.plot.saturated.floorInBase(t.min,t.tickSize)),a=0,r=Number.NaN;o===-Number.MAX_VALUE&&(n.push(o),o=e.plot.saturated.floorInBase(t.min+t.tickSize,t.tickSize));do{i=r,r=e.plot.saturated.multiplyAdd(t.tickSize,a,o),n.push(r),++a}while(r<t.max&&r!==i);return n}function n(e,t,i){var n=t.tickDecimals;if(-1!==(""+e).indexOf("e"))return o(e,t,i);i>0&&(t.tickDecimals=i);var a=t.tickDecimals?parseFloat("1e"+t.tickDecimals):1,r=""+Math.round(e*a)/a;if(null!=t.tickDecimals){var s=r.indexOf("."),l=-1===s?0:r.length-s-1;if(l<t.tickDecimals)r=(l?r:r+".")+(""+a).substr(1,t.tickDecimals-l)}return t.tickDecimals=n,r}function o(e,t,i){var n=(""+e).indexOf("e"),o=parseInt((""+e).substr(n+1)),r=-1!==n?o:e>0?Math.floor(Math.log(e)/Math.LN10):0,s=parseFloat("1e"+r),l=e/s;if(i){var c=a(e,i);return(e/s).toFixed(c)+"e"+r}return t.tickDecimals>0?l.toFixed(a(e,t.tickDecimals))+"e"+r:l.toFixed()+"e"+r}function a(e,t){var i=Math.log(Math.abs(e))*Math.LOG10E,n=Math.abs(i+t);return n<=20?Math.floor(n):20}function r(o,a,r,s){var l=[],c={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoScaleMargin:null,autoScale:"exact",windowSize:null,growOnly:null,ticks:null,tickFormatter:null,showTickLabels:"major",labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,showMinorTicks:null,showTicks:null,gridLines:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},yaxis:{autoScaleMargin:.02,autoScale:"loose",growOnly:null,position:"left",showTickLabels:"major",offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:1,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,horizontal:!1,barWidth:.8,fill:!0,fillColor:null,align:"left",zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:1,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:15},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},u=null,p=null,h=null,d=null,f=null,m=[],g=[],x={left:0,right:0,top:0,bottom:0},v=0,b=0,y={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],setupGrid:[],adjustSeriesDataRange:[],setRange:[],drawBackground:[],drawSeries:[],drawAxis:[],draw:[],findNearbyItems:[],axisReserveSpace:[],bindEvents:[],drawOverlay:[],resize:[],shutdown:[]},w=this,k={},T=null;w.setData=C,w.setupGrid=R,w.draw=B,w.getPlaceholder=function(){return o},w.getCanvas=function(){return u.element},w.getSurface=function(){return u},w.getEventHolder=function(){return h[0]},w.getPlotOffset=function(){return x},w.width=function(){return v},w.height=function(){return b},w.offset=function(){var e=h.offset();return e.left+=x.left,e.top+=x.top,e},w.getData=function(){return l},w.getAxes=function(){var t={};return e.each(m.concat(g),(function(e,i){i&&(t[i.direction+(1!==i.n?i.n:"")+"axis"]=i)})),t},w.getXAxes=function(){return m},w.getYAxes=function(){return g},w.c2p=function(e){var t,i,n={};for(t=0;t<m.length;++t)(i=m[t])&&i.used&&(n["x"+i.n]=i.c2p(e.left));for(t=0;t<g.length;++t)(i=g[t])&&i.used&&(n["y"+i.n]=i.c2p(e.top));void 0!==n.x1&&(n.x=n.x1);void 0!==n.y1&&(n.y=n.y1);return n},w.p2c=function(e){var t,i,n,o={};for(t=0;t<m.length;++t)if((i=m[t])&&i.used&&(n="x"+i.n,null==e[n]&&1===i.n&&(n="x"),null!=e[n])){o.left=i.p2c(e[n]);break}for(t=0;t<g.length;++t)if((i=g[t])&&i.used&&(n="y"+i.n,null==e[n]&&1===i.n&&(n="y"),null!=e[n])){o.top=i.p2c(e[n]);break}return o},w.getOptions=function(){return c},w.triggerRedrawOverlay=K,w.pointOffset=function(e){return{left:parseInt(m[A(e,"x")-1].p2c(+e.x)+x.left,10),top:parseInt(g[A(e,"y")-1].p2c(+e.y)+x.top,10)}},w.shutdown=L,w.destroy=function(){L(),o.removeData("plot").empty(),l=[],c=null,u=null,p=null,h=null,d=null,f=null,m=[],g=[],y=null,w=null},w.resize=function(){var e=o.width(),t=o.height();u.resize(e,t),p.resize(e,t),P(y.resize,[e,t])},w.clearTextCache=function(){u.clearCache(),p.clearCache()},w.autoScaleAxis=D,w.computeRangeForDataSeries=function(e,t,i){for(var n=e.datapoints.points,o=e.datapoints.pointsize,a=e.datapoints.format,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l={xmin:r,ymin:r,xmax:s,ymax:s},c=0;c<n.length;c+=o)if(null!==n[c]&&("function"!=typeof i||i(n[c])))for(var u=0;u<o;++u){var p=n[c+u],h=a[u];null!=h&&(("function"!=typeof i||i(p))&&(t||h.computeRange)&&p!==1/0&&p!==-1/0&&(!0===h.x&&(p<l.xmin&&(l.xmin=p),p>l.xmax&&(l.xmax=p)),!0===h.y&&(p<l.ymin&&(l.ymin=p),p>l.ymax&&(l.ymax=p))))}return l},w.adjustSeriesDataRange=function(e,t){if(e.bars.show){var i,n=e.bars.barWidth[1];e.datapoints&&e.datapoints.points&&!n&&function(e){var t=[],i=e.datapoints.pointsize,n=Number.MAX_VALUE;e.datapoints.points.length<=i&&(n=1);for(let n=e.bars.horizontal?1:0;n<e.datapoints.points.length;n+=i)isFinite(e.datapoints.points[n])&&null!==e.datapoints.points[n]&&t.push(e.datapoints.points[n]);(t=t.filter((function(e,t,i){return i.indexOf(e)===t}))).sort((function(e,t){return e-t}));for(let e=1;e<t.length;e++){var o=Math.abs(t[e]-t[e-1]);o<n&&isFinite(o)&&(n=o)}"number"==typeof e.bars.barWidth?e.bars.barWidth=e.bars.barWidth*n:e.bars.barWidth[0]=e.bars.barWidth[0]*n}(e);var o=e.bars.barWidth[0]||e.bars.barWidth;switch(e.bars.align){case"left":i=0;break;case"right":i=-o;break;default:i=-o/2}e.bars.horizontal?(t.ymin+=i,t.ymax+=i+o):(t.xmin+=i,t.xmax+=i+o)}if(e.bars.show&&e.bars.zero||e.lines.show&&e.lines.zero){e.datapoints.pointsize<=2&&(t.ymin=Math.min(0,t.ymin),t.ymax=Math.max(0,t.ymax))}return t},w.findNearbyItem=function(e,t,i,n,o){var a=$(e,t,i,n,o);return void 0!==a[0]?a[0]:null},w.findNearbyItems=$,w.findNearbyInterpolationPoint=function(e,t,i){var n,o,a,r,s,c,u,p=Number.MAX_VALUE;for(n=0;n<l.length;++n){if(!i(n))continue;var h=l[n].datapoints.points;c=l[n].datapoints.pointsize;const x=h[h.length-c]<h[0]?function(e,t){return e>t}:function(e,t){return t>e};if(!x(e,h[0])){for(o=c;o<h.length&&!x(e,h[o]);o+=c);var d=h[o-c],f=h[o-c+1],m=h[o],g=h[o+1];void 0!==d&&void 0!==m&&void 0!==f&&void 0!==g&&(t=d===m?g:f+(g-f)*(e-d)/(m-d),r=Math.abs(l[n].xaxis.p2c(m)-e),s=Math.abs(l[n].yaxis.p2c(g)-t),(a=r*r+s*s)<p&&(p=a,u=[e,t,n,o]))}}if(u)return n=u[2],o=u[3],c=l[n].datapoints.pointsize,h=l[n].datapoints.points,d=h[o-c],f=h[o-c+1],m=h[o],g=h[o+1],{datapoint:[u[0],u[1]],leftPoint:[d,f],rightPoint:[m,g],seriesIndex:n};return null},w.computeValuePrecision=F,w.computeTickSize=W,w.addEventHandler=function(e,t,i,n){var o=i+e,a=k[o]||[];a.push({event:e,handler:t,eventHolder:i,priority:n}),a.sort((e,t)=>t.priority-e.priority),a.forEach(e=>{e.eventHolder.unbind(e.event,e.handler),e.eventHolder.bind(e.event,e.handler)}),k[o]=a},w.hooks=y;var M=e.plot.uiConstants.MINOR_TICKS_COUNT_CONSTANT,S=e.plot.uiConstants.TICK_LENGTH_CONSTANT;function P(e,t){t=[w].concat(t);for(var i=0;i<e.length;++i)e[i].apply(this,t)}function C(t){var i=l;l=function(t){for(var i=[],n=0;n<t.length;++n){var o=e.extend(!0,{},c.series);null!=t[n].data?(o.data=t[n].data,delete t[n].data,e.extend(!0,o,t[n]),t[n].data=o.data):o.data=t[n],i.push(o)}return i}(t),function(){var t,i=l.length,n=-1;for(t=0;t<l.length;++t){var o=l[t].color;null!=o&&(i--,"number"==typeof o&&o>n&&(n=o))}i<=n&&(i=n+1);var a,r=[],s=c.colors,u=s.length,p=0,h=Math.max(0,l.length-i);for(t=0;t<i;t++)a=e.color.parse(s[(h+t)%u]||"#666"),t%u==0&&t&&(p=p>=0?p<.5?-p-.2:0:-p),r[t]=a.scale("rgb",1+p);var d,f=0;for(t=0;t<l.length;++t){if(null==(d=l[t]).color?(d.color=r[f].toString(),++f):"number"==typeof d.color&&(d.color=r[d.color].toString()),null==d.lines.show){var x,v=!0;for(x in d)if(d[x]&&d[x].show){v=!1;break}v&&(d.lines.show=!0)}null==d.lines.zero&&(d.lines.zero=!!d.lines.fill),d.xaxis=N(m,A(d,"x")),d.yaxis=N(g,A(d,"y"))}}(),function(t){var i,n,o,a,r,s,c,u,p,h,d,f,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;function x(e,t,i){t<e.datamin&&t!==-1/0&&(e.datamin=t),i>e.datamax&&i!==1/0&&(e.datamax=i)}function v(e,t){return e&&e[t]&&e[t].datapoints&&e[t].datapoints.points?e[t].datapoints.points:[]}for(e.each(O(),(function(e,t){!0!==t.options.growOnly?(t.datamin=m,t.datamax=g):(void 0===t.datamin&&(t.datamin=m),void 0===t.datamax&&(t.datamax=g)),t.used=!1})),i=0;i<l.length;++i)(r=l[i]).datapoints={points:[]},0===r.datapoints.points.length&&(r.datapoints.points=v(t,i)),P(y.processRawData,[r,r.data,r.datapoints]);for(i=0;i<l.length;++i){if(r=l[i],d=r.data,!(f=r.datapoints.format)){if((f=[]).push({x:!0,y:!1,number:!0,required:!0,computeRange:"none"!==r.xaxis.options.autoScale,defaultValue:null}),f.push({x:!1,y:!0,number:!0,required:!0,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:null}),r.stack||r.bars.show||r.lines.show&&r.lines.fill)(null!=r.datapoints.pointsize?r.datapoints.pointsize:r.data&&r.data[0]&&r.data[0].length?r.data[0].length:3)>2&&f.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:0});r.datapoints.format=f}if(r.xaxis.used=r.yaxis.used=!0,null==r.datapoints.pointsize){for(r.datapoints.pointsize=f.length,c=r.datapoints.pointsize,s=r.datapoints.points,n=o=0;n<d.length;++n,o+=c){var b=null==(h=d[n]);if(!b)for(a=0;a<c;++a)u=h[a],(p=f[a])&&(p.number&&null!=u&&(u=+u,isNaN(u)&&(u=null)),null==u&&(p.required&&(b=!0),null!=p.defaultValue&&(u=p.defaultValue))),s[o+a]=u;if(b)for(a=0;a<c;++a)null!=(u=s[o+a])&&(p=f[a]).computeRange&&(p.x&&x(r.xaxis,u,u),p.y&&x(r.yaxis,u,u)),s[o+a]=null}s.length=o}}for(i=0;i<l.length;++i)r=l[i],P(y.processDatapoints,[r,r.datapoints]);for(i=0;i<l.length;++i)if(r=l[i],!(f=r.datapoints.format).every((function(e){return!e.computeRange}))){var k=w.adjustSeriesDataRange(r,w.computeRangeForDataSeries(r));P(y.adjustSeriesDataRange,[r,k]),x(r.xaxis,k.xmin,k.xmax),x(r.yaxis,k.ymin,k.ymax)}e.each(O(),(function(e,t){t.datamin===m&&(t.datamin=null),t.datamax===g&&(t.datamax=null)}))}(i)}function A(e,t){var i=e[t+"axis"];return"object"==typeof i&&(i=i.n),"number"!=typeof i&&(i=1),i}function O(){return m.concat(g).filter((function(e){return e}))}function N(t,i){return t[i-1]||(t[i-1]={n:i,direction:t===m?"x":"y",options:e.extend(!0,{},t===m?c.xaxis:c.yaxis)}),t[i-1]}function L(){T&&clearTimeout(T),P(y.shutdown,[h])}function z(t){function i(e){return e}var n,o,a=t.options.transform||i,r=t.options.inverseTransform;"x"===t.direction?(n=isFinite(a(t.max)-a(t.min))?t.scale=v/Math.abs(a(t.max)-a(t.min)):t.scale=1/Math.abs(e.plot.saturated.delta(a(t.min),a(t.max),v)),o=Math.min(a(t.max),a(t.min))):(n=-(n=isFinite(a(t.max)-a(t.min))?t.scale=b/Math.abs(a(t.max)-a(t.min)):t.scale=1/Math.abs(e.plot.saturated.delta(a(t.min),a(t.max),b))),o=Math.max(a(t.max),a(t.min))),t.p2c=a===i?function(e){return isFinite(e-o)?(e-o)*n:(e/4-o/4)*n*4}:function(e){var t=a(e);return isFinite(t-o)?(t-o)*n:(t/4-o/4)*n*4},t.c2p=r?function(e){return r(o+e/n)}:function(e){return o+e/n}}function I(t){P(y.axisReserveSpace,[t]);var i=t.labelWidth,n=t.labelHeight,o=t.options.position,a="x"===t.direction,r=t.options.tickLength,s=t.options.showTicks,l=t.options.showMinorTicks,p=t.options.gridLines,h=c.grid.axisMargin,d=c.grid.labelMargin,f=!0,v=!0,b=!1;e.each(a?m:g,(function(e,i){i&&(i.show||i.reserveSpace)&&(i===t?b=!0:i.options.position===o&&(b?v=!1:f=!1))})),v&&(h=0),null==r&&(r=S),null==s&&(s=!0),null==l&&(l=!0),null==p&&(p=!!f),isNaN(+r)||(d+=s?+r:0),a?(n+=d,"bottom"===o?(x.bottom+=n+h,t.box={top:u.height-x.bottom,height:n}):(t.box={top:x.top+h,height:n},x.top+=n+h)):(i+=d,"left"===o?(t.box={left:x.left+h,width:i},x.left+=i+h):(x.right+=i+h,t.box={left:u.width-x.right,width:i})),t.position=o,t.tickLength=r,t.showMinorTicks=l,t.showTicks=s,t.gridLines=p,t.box.padding=d,t.innermost=f}function E(e,t,i){"x"===e.direction?("bottom"===e.position&&i(t.bottom)&&(e.box.top-=Math.ceil(t.bottom)),"top"===e.position&&i(t.top)&&(e.box.top+=Math.ceil(t.top))):("left"===e.position&&i(t.left)&&(e.box.left+=Math.ceil(t.left)),"right"===e.position&&i(t.right)&&(e.box.left-=Math.ceil(t.right)))}function R(t){var o,a,r=O(),s=c.grid.show;for(a in x)x[a]=0;for(a in P(y.processOffset,[x]),x)"object"==typeof c.grid.borderWidth?x[a]+=s?c.grid.borderWidth[a]:0:x[a]+=s?c.grid.borderWidth:0;if(e.each(r,(function(i,o){var a=o.options;o.show=null==a.show?o.used:a.show,o.reserveSpace=null==a.reserveSpace?o.show:a.reserveSpace,function(e){var t=e.options;e.tickFormatter||("function"==typeof t.tickFormatter?e.tickFormatter=function(){var e=Array.prototype.slice.call(arguments);return""+t.tickFormatter.apply(null,e)}:e.tickFormatter=n)}(o),P(y.setRange,[o,t]),function(t,i){var n="number"==typeof t.options.min?t.options.min:t.min,o="number"==typeof t.options.max?t.options.max:t.max,a=t.options.offset;i&&(D(t),n=t.autoScaledMin,o=t.autoScaledMax);if(n=(null!=n?n:-1)+(a.below||0),o=(null!=o?o:1)+(a.above||0),n>o){var r=n;n=o,o=r,t.options.offset={above:0,below:0}}t.min=e.plot.saturated.saturate(n),t.max=e.plot.saturated.saturate(o)}(o,t)})),s){v=u.width-x.left-x.right,b=u.height-x.bottom-x.top;var p=e.grep(r,(function(e){return e.show||e.reserveSpace}));for(e.each(p,(function(t,n){!function(t){var n,o=t.options;n=Y(t.direction,u,o.ticks),t.delta=e.plot.saturated.delta(t.min,t.max,n);var a=w.computeValuePrecision(t.min,t.max,t.direction,n,o.tickDecimals);t.tickDecimals=Math.max(0,null!=o.tickDecimals?o.tickDecimals:a),t.tickSize=function(e,t,i,n,o){var a;a="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"===i?u.width:u.height);var r=W(e,t,a,o);null!=n.minTickSize&&r<n.minTickSize&&(r=n.minTickSize);return n.tickSize||r}(t.min,t.max,t.direction,o,o.tickDecimals),t.tickGenerator||("function"==typeof o.tickGenerator?t.tickGenerator=o.tickGenerator:t.tickGenerator=i);if(null!=o.alignTicksWithAxis){var r=("x"===t.direction?m:g)[o.alignTicksWithAxis-1];if(r&&r.used&&r!==t){var s=t.tickGenerator(t,w);if(s.length>0&&(null==o.min&&(t.min=Math.min(t.min,s[0])),null==o.max&&s.length>1&&(t.max=Math.max(t.max,s[s.length-1]))),t.tickGenerator=function(e){var t,i,n=[];for(i=0;i<r.ticks.length;++i)t=(r.ticks[i].v-r.min)/(r.max-r.min),t=e.min+t*(e.max-e.min),n.push(t);return n},!t.mode&&null==o.tickDecimals){var l=Math.max(0,1-Math.floor(Math.log(t.delta)/Math.LN10)),c=t.tickGenerator(t,w);c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(l))||(t.tickDecimals=l)}}}}(n),function(t){var i,n,o=t.options.ticks,a=[];null==o||"number"==typeof o&&o>0?a=t.tickGenerator(t,w):o&&(a=e.isFunction(o)?o(t):o);for(t.ticks=[],i=0;i<a.length;++i){var r=null,s=a[i];"object"==typeof s?(n=+s[0],s.length>1&&(r=s[1])):n=+s,isNaN(n)||t.ticks.push(X(n,r,t,"major"))}}(n),function(e,t,i){"loose"===e.options.autoScale&&t.length>0&&function(e){return e.some(e=>e.datapoints.points.length>0)}(i)&&(e.min=Math.min(e.min,t[0].v),e.max=Math.max(e.max,t[t.length-1].v))}(n,n.ticks,l),z(n),function(e,t){(function(e,t){if("endpoints"===e.options.showTickLabels)return!0;if("all"===e.options.showTickLabels){var i=t.filter((function(t){return t.bars.horizontal?t.yaxis===e:t.xaxis===e})),n=i.some((function(e){return!e.bars.show}));return 0===i.length||n}if("major"===e.options.showTickLabels||"none"===e.options.showTickLabels)return!1})(e,t)&&(e.ticks.unshift(X(e.min,null,e,"min")),e.ticks.push(X(e.max,null,e,"max")))}(n,l),function(e){for(var t=e.options,i="none"!==t.showTickLabels&&e.ticks?e.ticks:[],n="major"===t.showTickLabels||"all"===t.showTickLabels,o="endpoints"===t.showTickLabels||"all"===t.showTickLabels,a=t.labelWidth||0,r=t.labelHeight||0,s=e.direction+"Axis "+e.direction+e.n+"Axis",l="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+s,c=t.font||"flot-tick-label tickLabel",p=0;p<i.length;++p){var h=i[p],d=h.label;if(h.label&&!(!1===n&&p>0&&p<i.length-1)&&(!1!==o||0!==p&&p!==i.length-1)){"object"==typeof h.label&&(d=h.label.name);var f=u.getTextInfo(l,d,c);a=Math.max(a,f.width),r=Math.max(r,f.height)}}e.labelWidth=t.labelWidth||a,e.labelHeight=t.labelHeight||r}(n)})),o=p.length-1;o>=0;--o)I(p[o]);!function(){var t,i=c.grid.minBorderMargin;if(null==i)for(i=0,t=0;t<l.length;++t)i=Math.max(i,2*(l[t].points.radius+l[t].points.lineWidth/2));var n,o={},a={left:i,right:i,top:i,bottom:i};for(n in e.each(O(),(function(e,t){t.reserveSpace&&t.ticks&&t.ticks.length&&("x"===t.direction?(a.left=Math.max(a.left,t.labelWidth/2),a.right=Math.max(a.right,t.labelWidth/2)):(a.bottom=Math.max(a.bottom,t.labelHeight/2),a.top=Math.max(a.top,t.labelHeight/2)))})),a)o[n]=a[n]-x[n];e.each(m.concat(g),(function(e,t){E(t,o,(function(e){return e>0}))})),x.left=Math.ceil(Math.max(a.left,x.left)),x.right=Math.ceil(Math.max(a.right,x.right)),x.top=Math.ceil(Math.max(a.top,x.top)),x.bottom=Math.ceil(Math.max(a.bottom,x.bottom))}(),e.each(p,(function(e,t){!function(e){"x"===e.direction?(e.box.left=x.left-e.labelWidth/2,e.box.width=u.width-x.left-x.right+e.labelWidth):(e.box.top=x.top-e.labelHeight/2,e.box.height=u.height-x.bottom-x.top+e.labelHeight)}(t)}))}if(c.grid.margin){for(a in x){var h=c.grid.margin||0;x[a]+="number"==typeof h?h:h[a]||0}e.each(m.concat(g),(function(e,t){E(t,c.grid.margin,(function(e){return null!=e}))}))}v=u.width-x.left-x.right,b=u.height-x.bottom-x.top,e.each(r,(function(e,t){z(t)})),s&&e.each(O(),(function(e,t){var i,n,o,a,r,s,l,c=t.box,p=t.direction+"Axis "+t.direction+t.n+"Axis",h="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+p,d=t.options.font||"flot-tick-label tickLabel",f={x:NaN,y:NaN,width:NaN,height:NaN},m=[],g=function(e,i){return!e||!e.label||e.v<t.min||e.v>t.max?f:(s=u.getTextInfo(h,e.label,d),"x"===t.direction?(a="center",n=x.left+t.p2c(e.v),"bottom"===t.position?o=c.top+c.padding-t.boxPosition.centerY:(o=c.top+c.height-c.padding+t.boxPosition.centerY,r="bottom"),l={x:n-s.width/2-3,y:o-3,width:s.width+6,height:s.height+6}):(r="middle",o=x.top+t.p2c(e.v),"left"===t.position?(n=c.left+c.width-c.padding-t.boxPosition.centerX,a="right"):n=c.left+c.padding+t.boxPosition.centerX,l={x:n-s.width/2-3,y:o-3,width:s.width+6,height:s.height+6}),function(e,t){return t.some((function(t){return i=e.x,n=e.y,o=e.x+e.width,a=e.y+e.height,r=t.x,s=t.y,l=t.x+t.width,c=t.y+t.height,(i<=r&&r<=o||r<=i&&i<=l)&&(n<=s&&s<=a||s<=n&&n<=c);var i,n,o,a,r,s,l,c}))}(l,i)?f:(u.addText(h,n,o,e.label,d,null,null,a,r),l))};if(u.removeText(h),P(y.drawAxis,[t,u]),t.show)switch(t.options.showTickLabels){case"none":break;case"endpoints":m.push(g(t.ticks[0],m)),m.push(g(t.ticks[t.ticks.length-1],m));break;case"major":for(m.push(g(t.ticks[0],m)),m.push(g(t.ticks[t.ticks.length-1],m)),i=1;i<t.ticks.length-1;++i)m.push(g(t.ticks[i],m));break;case"all":for(m.push(g(t.ticks[0],[])),m.push(g(t.ticks[t.ticks.length-1],m)),i=1;i<t.ticks.length-1;++i)m.push(g(t.ticks[i],m))}})),P(y.setupGrid,[])}function D(t){var i,n=t.options,o=n.min,a=n.max,r=t.datamin,s=t.datamax;switch(n.autoScale){case"none":o=+(null!=n.min?n.min:r),a=+(null!=n.max?n.max:s);break;case"loose":if(null!=r&&null!=s){o=r,a=s,i=e.plot.saturated.saturate(a-o);var l="number"==typeof n.autoScaleMargin?n.autoScaleMargin:.02;o=e.plot.saturated.saturate(o-i*l),a=e.plot.saturated.saturate(a+i*l),o<0&&r>=0&&(o=0)}else o=n.min,a=n.max;break;case"exact":o=null!=r?r:n.min,a=null!=s?s:n.max;break;case"sliding-window":s>a&&(a=s,o=Math.max(s-(n.windowSize||100),o))}var c=function(e,t){var i=void 0===e?null:e,n=void 0===t?null:t;if(0===n-i){var o=0===n?1:.01,a=null;null==i&&(a-=o),null!=n&&null==i||(n+=o),null!=a&&(i=a)}return{min:i,max:n}}(o,a);o=c.min,a=c.max,!0===n.growOnly&&"none"!==n.autoScale&&"sliding-window"!==n.autoScale&&(o=o<r?o:null!==r?r:o,a=a>s?a:null!==s?s:a),t.autoScaledMin=o,t.autoScaledMax=a}function F(t,i,n,o,a){var r=Y(n,u,o),s=e.plot.saturated.delta(t,i,r),l=-Math.floor(Math.log(s)/Math.LN10);a&&l>a&&(l=a);var c=s/parseFloat("1e"+-l);return c>2.25&&c<3&&l+1<=a&&++l,isFinite(l)?l:0}function W(t,i,n,o){var a=e.plot.saturated.delta(t,i,n),r=-Math.floor(Math.log(a)/Math.LN10);o&&r>o&&(r=o);var s,l=parseFloat("1e"+-r),c=a/l;return c<1.5?s=1:c<3?(s=2,c>2.25&&(null==o||r+1<=o)&&(s=2.5)):s=c<7.5?5:10,s*=l}function Y(e,t,i){return"number"==typeof i&&i>0?i:.3*Math.sqrt("x"===e?t.width:t.height)}function X(e,t,i,n){if(null===t)switch(n){case"min":case"max":var o=function(e,t){var i=Math.floor(t.p2c(e)),n="x"===t.direction?i+1:i-1,o=t.c2p(i),a=t.c2p(n);return F(o,a,t.direction,1)}(e,i);isFinite(o),t=i.tickFormatter(e,i,o,w);break;case"major":t=i.tickFormatter(e,i,void 0,w)}return{v:e,label:t}}function B(){u.clear(),P(y.drawBackground,[d]);var e=c.grid;e.show&&e.backgroundColor&&(d.save(),d.translate(x.left,x.top),d.fillStyle=te(c.grid.backgroundColor,b,0,"rgba(255, 255, 255, 0)"),d.fillRect(0,0,v,b),d.restore()),e.show&&!e.aboveData&&Q();for(var t=0;t<l.length;++t)P(y.drawSeries,[d,l[t],t,te]),U(l[t]);P(y.draw,[d]),e.show&&e.aboveData&&Q(),u.render(),K()}function G(e,t){for(var i,n,o,a,r=O(),s=0;s<r.length;++s)if((i=r[s]).direction===t&&(e[a=t+i.n+"axis"]||1!==i.n||(a=t+"axis"),e[a])){n=e[a].from,o=e[a].to;break}if(e[a]||(i="x"===t?m[0]:g[0],n=e[t+"1"],o=e[t+"2"]),null!=n&&null!=o&&n>o){var l=n;n=o,o=l}return{from:n,to:o,axis:i}}function q(e){var t=e.box,i=0,n=0;return"x"===e.direction?(i=0,n=t.top-x.top+("top"===e.position?t.height:0)):(n=0,i=t.left-x.left+("left"===e.position?t.width:0)+e.boxPosition.centerX),{x:i,y:n}}function j(e,t){return e%2!=0?Math.floor(t)+.5:t}function H(e){d.lineWidth=1;var t=q(e),i=t.x,n=t.y;if(e.show){var o=0,a=0;d.strokeStyle=e.options.color,d.beginPath(),"x"===e.direction?o=v+1:a=b+1,"x"===e.direction?n=j(d.lineWidth,n):i=j(d.lineWidth,i),d.moveTo(i,n),d.lineTo(i+o,n+a),d.stroke()}}function V(e){var t=e.tickLength,i=e.showMinorTicks,n=M,o=q(e),a=o.x,r=o.y,s=0;for(d.strokeStyle=e.options.color,d.beginPath(),s=0;s<e.ticks.length;++s){var l,c=e.ticks[s].v,u=0,p=0,h=0,f=0;if(!isNaN(c)&&c>=e.min&&c<=e.max&&("x"===e.direction?(a=e.p2c(c),p=t,"top"===e.position&&(p=-p)):(r=e.p2c(c),u=t,"left"===e.position&&(u=-u)),"x"===e.direction?a=j(d.lineWidth,a):r=j(d.lineWidth,r),d.moveTo(a,r),d.lineTo(a+u,r+p)),!0===i&&s<e.ticks.length-1){var m=e.ticks[s].v,g=(e.ticks[s+1].v-m)/(n+1);for(l=1;l<=n;l++){if("x"===e.direction){if(f=t/2,a=j(d.lineWidth,e.p2c(m+l*g)),"top"===e.position&&(f=-f),a<0||a>v)continue}else if(h=t/2,r=j(d.lineWidth,e.p2c(m+l*g)),"left"===e.position&&(h=-h),r<0||r>b)continue;d.moveTo(a,r),d.lineTo(a+h,r+f)}}}d.stroke()}function _(e){var t,i,n;for(d.strokeStyle=c.grid.tickColor,d.beginPath(),t=0;t<e.ticks.length;++t){var o=e.ticks[t].v,a=0,r=0,s=0,l=0;isNaN(o)||o<e.min||o>e.max||(i=o,n=void 0,(!("object"==typeof(n=c.grid.borderWidth)&&n[e.position]>0||n>0)||i!==e.min&&i!==e.max)&&("x"===e.direction?(s=e.p2c(o),l=b,r=-b):(s=0,l=e.p2c(o),a=v),"x"===e.direction?s=j(d.lineWidth,s):l=j(d.lineWidth,l),d.moveTo(s,l),d.lineTo(s+a,l+r)))}d.stroke()}function Q(){var t,i;d.save(),d.translate(x.left,x.top),function(){var t,i,n=c.grid.markings;if(n)for(e.isFunction(n)&&((t=w.getAxes()).xmin=t.xaxis.min,t.xmax=t.xaxis.max,t.ymin=t.yaxis.min,t.ymax=t.yaxis.max,n=n(t)),i=0;i<n.length;++i){var o=n[i],a=G(o,"x"),r=G(o,"y");if(null==a.from&&(a.from=a.axis.min),null==a.to&&(a.to=a.axis.max),null==r.from&&(r.from=r.axis.min),null==r.to&&(r.to=r.axis.max),!(a.to<a.axis.min||a.from>a.axis.max||r.to<r.axis.min||r.from>r.axis.max)){a.from=Math.max(a.from,a.axis.min),a.to=Math.min(a.to,a.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max);var s=a.from===a.to,l=r.from===r.to;if(!s||!l)if(a.from=Math.floor(a.axis.p2c(a.from)),a.to=Math.floor(a.axis.p2c(a.to)),r.from=Math.floor(r.axis.p2c(r.from)),r.to=Math.floor(r.axis.p2c(r.to)),s||l){var u=o.lineWidth||c.grid.markingsLineWidth,p=u%2?.5:0;d.beginPath(),d.strokeStyle=o.color||c.grid.markingsColor,d.lineWidth=u,s?(d.moveTo(a.to+p,r.from),d.lineTo(a.to+p,r.to)):(d.moveTo(a.from,r.to+p),d.lineTo(a.to,r.to+p)),d.stroke()}else d.fillStyle=o.color||c.grid.markingsColor,d.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),t=O(),i=c.grid.borderWidth;for(var n=0;n<t.length;++n){var o=t[n];o.show&&(H(o),!0===o.showTicks&&V(o),!0===o.gridLines&&_(o))}i&&function(){var e=c.grid.borderWidth,t=c.grid.borderColor;"object"==typeof e||"object"==typeof t?("object"!=typeof e&&(e={top:e,right:e,bottom:e,left:e}),"object"!=typeof t&&(t={top:t,right:t,bottom:t,left:t}),e.top>0&&(d.strokeStyle=t.top,d.lineWidth=e.top,d.beginPath(),d.moveTo(0-e.left,0-e.top/2),d.lineTo(v,0-e.top/2),d.stroke()),e.right>0&&(d.strokeStyle=t.right,d.lineWidth=e.right,d.beginPath(),d.moveTo(v+e.right/2,0-e.top),d.lineTo(v+e.right/2,b),d.stroke()),e.bottom>0&&(d.strokeStyle=t.bottom,d.lineWidth=e.bottom,d.beginPath(),d.moveTo(v+e.right,b+e.bottom/2),d.lineTo(0,b+e.bottom/2),d.stroke()),e.left>0&&(d.strokeStyle=t.left,d.lineWidth=e.left,d.beginPath(),d.moveTo(0-e.left/2,b+e.bottom),d.lineTo(0-e.left/2,0),d.stroke())):(d.lineWidth=e,d.strokeStyle=c.grid.borderColor,d.strokeRect(-e/2,-e/2,v+e,b+e))}(),d.restore()}function U(t){t.lines.show&&e.plot.drawSeries.drawSeriesLines(t,d,x,v,b,w.drawSymbol,te),t.bars.show&&e.plot.drawSeries.drawSeriesBars(t,d,x,v,b,w.drawSymbol,te),t.points.show&&e.plot.drawSeries.drawSeriesPoints(t,d,x,v,b,w.drawSymbol,te)}function $(e,t,i,n,o){for(var a=function(e,t,i,n,o){var a,r=[],s=[],c=n*n+1;for(a=l.length-1;a>=0;--a)if(i(a)){var u=l[a];if(!u.datapoints)return;var p=!1;if(u.lines.show||u.points.show){var h=Z(u,e,t,n,o);h&&(s.push({seriesIndex:a,dataIndex:h.dataIndex,distance:h.distance}),p=!0)}if(u.bars.show&&!p){var d=J(u,e,t);d>=0&&s.push({seriesIndex:a,dataIndex:d,distance:c})}}for(a=0;a<s.length;a++){var f=s[a].seriesIndex,m=s[a].dataIndex,g=s[a].distance,x=l[f].datapoints.pointsize;r.push({datapoint:l[f].datapoints.points.slice(m*x,(m+1)*x),dataIndex:m,series:l[f],seriesIndex:f,distance:Math.sqrt(g)})}return r}(e,t,i,n,o),r=0;r<l.length;++r)i(r)&&P(y.findNearbyItems,[e,t,l,r,n,o,a]);return a.sort((e,t)=>void 0===t.distance?-1:void 0===e.distance&&void 0!==t.distance?1:e.distance-t.distance)}function Z(e,t,i,n,o){var a=e.xaxis.c2p(t),r=e.yaxis.c2p(i),s=n/e.xaxis.scale,l=n/e.yaxis.scale,c=e.datapoints.points,u=e.datapoints.pointsize,p=Number.POSITIVE_INFINITY;e.xaxis.options.inverseTransform&&(s=Number.MAX_VALUE),e.yaxis.options.inverseTransform&&(l=Number.MAX_VALUE);for(var h=null,d=0;d<c.length;d+=u){var f=c[d],m=c[d+1];if(null!=f&&!(f-a>s||f-a<-s||m-r>l||m-r<-l)){var g=Math.abs(e.xaxis.p2c(f)-t),x=Math.abs(e.yaxis.p2c(m)-i),v=o?o(g,x):g*g+x*x;v<p&&(p=v,h={dataIndex:d/u,distance:v})}}return h}function J(e,t,i){var n,o,a=e.bars.barWidth[0]||e.bars.barWidth,r=e.xaxis.c2p(t),s=e.yaxis.c2p(i),l=e.datapoints.points,c=e.datapoints.pointsize;switch(e.bars.align){case"left":n=0;break;case"right":n=-a;break;default:n=-a/2}o=n+a;for(var u=e.bars.fillTowards||0,p=u>e.yaxis.min?Math.min(e.yaxis.max,u):e.yaxis.min,h=-1,d=0;d<l.length;d+=c){var f=l[d],m=l[d+1];if(null!=f){var g=3===c?l[d+2]:p;(e.bars.horizontal?r<=Math.max(g,f)&&r>=Math.min(g,f)&&s>=m+n&&s<=m+o:r>=f+n&&r<=f+o&&s>=Math.min(g,m)&&s<=Math.max(g,m))&&(h=d/c)}}return h}function K(){var e=c.interaction.redrawOverlayInterval;-1!==e?T||(T=setTimeout((function(){ee(w)}),e)):ee()}function ee(e){if(T=null,f){p.clear(),P(y.drawOverlay,[f,p]);var t=new CustomEvent("onDrawingDone");e.getEventHolder().dispatchEvent(t),e.getPlaceholder().trigger("drawingdone")}}function te(t,i,n,o){if("string"==typeof t)return t;for(var a=d.createLinearGradient(0,n,0,i),r=0,s=t.colors.length;r<s;++r){var l=t.colors[r];if("string"!=typeof l){var c=e.color.parse(o);null!=l.brightness&&(c=c.scale("rgb",l.brightness)),null!=l.opacity&&(c.a*=l.opacity),l=c.toString()}a.addColorStop(r/(s-1),l)}return a}!function(){for(var i={Canvas:t},n=0;n<s.length;++n){var o=s[n];o.init(w,i),o.options&&e.extend(!0,c,o.options)}}(),function(){o.css("padding",0).children().filter((function(){return!e(this).hasClass("flot-overlay")&&!e(this).hasClass("flot-base")})).remove(),"static"===o.css("position")&&o.css("position","relative");u=new t("flot-base",o[0]),p=new t("flot-overlay",o[0]),d=u.context,f=p.context,h=e(p.element).unbind();var i=o.data("plot");i&&(i.shutdown(),p.clear());o.data("plot",w)}(),function(t){e.extend(!0,c,t),t&&t.colors&&(c.colors=t.colors);null==c.xaxis.color&&(c.xaxis.color=e.color.parse(c.grid.color).scale("a",.22).toString());null==c.yaxis.color&&(c.yaxis.color=e.color.parse(c.grid.color).scale("a",.22).toString());null==c.xaxis.tickColor&&(c.xaxis.tickColor=c.grid.tickColor||c.xaxis.color);null==c.yaxis.tickColor&&(c.yaxis.tickColor=c.grid.tickColor||c.yaxis.color);null==c.grid.borderColor&&(c.grid.borderColor=c.grid.color);null==c.grid.tickColor&&(c.grid.tickColor=e.color.parse(c.grid.color).scale("a",.22).toString());var i,n,a,r=o.css("font-size"),s=r?+r.replace("px",""):13,l={style:o.css("font-style"),size:Math.round(.8*s),variant:o.css("font-variant"),weight:o.css("font-weight"),family:o.css("font-family")};for(a=c.xaxes.length||1,i=0;i<a;++i)(n=c.xaxes[i])&&!n.tickColor&&(n.tickColor=n.color),n=e.extend(!0,{},c.xaxis,n),c.xaxes[i]=n,n.font&&(n.font=e.extend({},l,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=c.yaxes.length||1,i=0;i<a;++i)(n=c.yaxes[i])&&!n.tickColor&&(n.tickColor=n.color),n=e.extend(!0,{},c.yaxis,n),c.yaxes[i]=n,n.font&&(n.font=e.extend({},l,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(i=0;i<c.xaxes.length;++i)N(m,i+1).options=c.xaxes[i];for(i=0;i<c.yaxes.length;++i)N(g,i+1).options=c.yaxes[i];for(var u in e.each(O(),(function(e,t){t.boxPosition=t.options.boxPosition||{centerX:0,centerY:0}})),y)c.hooks[u]&&c.hooks[u].length&&(y[u]=y[u].concat(c.hooks[u]));P(y.processOptions,[c])}(r),C(a),R(!0),B(),P(y.bindEvents,[h])}e.plot=function(t,i,n){return new r(e(t),i,n,e.plot.plugins)},e.plot.version="3.0.0",e.plot.plugins=[],e.fn.plot=function(t,i){return this.each((function(){e.plot(this,t,i)}))},e.plot.linearTickGenerator=i,e.plot.defaultTickFormatter=n,e.plot.expRepTickFormatter=o}(jQuery),function(e){"use strict";var t={saturate:function(e){return e===1/0?Number.MAX_VALUE:e===-1/0?-Number.MAX_VALUE:e},delta:function(e,t,i){return(t-e)/i==1/0?t/i-e/i:(t-e)/i},multiply:function(e,i){return t.saturate(e*i)},multiplyAdd:function(e,i,n){if(isFinite(e*i))return t.saturate(e*i+n);for(var o=n,a=0;a<i;a++)o+=e;return t.saturate(o)},floorInBase:function(e,t){return t*Math.floor(e/t)}};e.plot.saturated=t}(jQuery),function(e){"use strict";var t={getPageXY:function(e){var t=document.documentElement;return{X:e.clientX+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0),Y:e.clientY+(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}},getPixelRatio:function(e){return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},isSafari:function(){return/constructor/i.test(window.top.HTMLElement)||"[object SafariRemoteNotification]"===(!window.top.safari||void 0!==window.top.safari&&window.top.safari.pushNotification).toString()},isMobileSafari:function(){return navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&navigator.userAgent.match(/AppleWebKit/)},isOpera:function(){return!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0},isFirefox:function(){return"undefined"!=typeof InstallTrigger},isIE:function(){return!!document.documentMode},isEdge:function(){return!t.isIE()&&!!window.StyleMedia},isChrome:function(){return!!window.chrome&&!!window.chrome.webstore},isBlink:function(){return(t.isChrome()||t.isOpera())&&!!window.CSS}};e.plot.browser=t}(jQuery),function(e){"use strict";e.plot.drawSeries=new function(){function t(e,t,i,n,o,a,r,s,l,c,u){var p,h,d,f,m=e+n,g=e+o,x=i,v=t,b=!1;p=h=d=!0,c?(b=h=d=!0,p=!1,v=t+n,x=t+o,(g=e)<(m=i)&&(f=g,g=m,m=f,p=!0,h=!1)):(p=h=d=!0,b=!1,m=e+n,g=e+o,(v=t)<(x=i)&&(f=v,v=x,x=f,b=!0,d=!1)),g<r.min||m>r.max||v<s.min||x>s.max||(m<r.min&&(m=r.min,p=!1),g>r.max&&(g=r.max,h=!1),x<s.min&&(x=s.min,b=!1),v>s.max&&(v=s.max,d=!1),m=r.p2c(m),x=s.p2c(x),g=r.p2c(g),v=s.p2c(v),a&&(l.fillStyle=a(x,v),l.fillRect(m,v,g-m,x-v)),u>0&&(p||h||d||b)&&(l.beginPath(),l.moveTo(m,x),p?l.lineTo(m,v):l.moveTo(m,v),d?l.lineTo(g,v):l.moveTo(g,v),h?l.lineTo(g,x):l.moveTo(g,x),b?l.lineTo(m,x):l.moveTo(m,x),l.stroke()))}function i(t,i,n,o,a){var r=t.fill;if(!r)return null;if(t.fillColor)return a(t.fillColor,n,o,i);var s=e.color.parse(i);return s.a="number"==typeof r?r:.4,s.normalize(),s.toString()}this.drawSeriesLines=function(e,t,n,o,a,r,s){t.save(),t.translate(n.left,n.top),t.lineJoin="round",e.lines.dashes&&t.setLineDash&&t.setLineDash(e.lines.dashes);var l={format:e.datapoints.format,points:e.datapoints.points,pointsize:e.datapoints.pointsize};e.decimate&&(l.points=e.decimate(e,e.xaxis.min,e.xaxis.max,o,e.yaxis.min,e.yaxis.max,a));var c=e.lines.lineWidth;t.lineWidth=c,t.strokeStyle=e.color;var u=i(e.lines,e.color,0,a,s);u&&(t.fillStyle=u,function(e,t,i,n,o,a){for(var r=e.points,s=e.pointsize,l=n>i.min?Math.min(i.max,n):i.min,c=0,u=1,p=!1,h=0,d=0,f=null,m=null;!(s>0&&c>r.length+s);){var g=r[(c+=s)-s],x=r[c-s+u],v=r[c],b=r[c+u];if(-2===s&&(x=b=l),p){if(s>0&&null!=g&&null==v){d=c,s=-s,u=2;continue}if(s<0&&c===h+s){o.fill(),p=!1,u=1,c=h=d+(s=-s);continue}}if(null!=g&&null!=v){if(a&&(null!==f&&null!==m?(v=g,b=x,g=f,x=m,f=null,m=null,c-=s):x!==b&&g!==v&&(b=x,f=v,m=x)),g<=v&&g<t.min){if(v<t.min)continue;x=(t.min-g)/(v-g)*(b-x)+x,g=t.min}else if(v<=g&&v<t.min){if(g<t.min)continue;b=(t.min-g)/(v-g)*(b-x)+x,v=t.min}if(g>=v&&g>t.max){if(v>t.max)continue;x=(t.max-g)/(v-g)*(b-x)+x,g=t.max}else if(v>=g&&v>t.max){if(g>t.max)continue;b=(t.max-g)/(v-g)*(b-x)+x,v=t.max}if(p||(o.beginPath(),o.moveTo(t.p2c(g),i.p2c(l)),p=!0),x>=i.max&&b>=i.max)o.lineTo(t.p2c(g),i.p2c(i.max)),o.lineTo(t.p2c(v),i.p2c(i.max));else if(x<=i.min&&b<=i.min)o.lineTo(t.p2c(g),i.p2c(i.min)),o.lineTo(t.p2c(v),i.p2c(i.min));else{var y=g,w=v;x<=b&&x<i.min&&b>=i.min?(g=(i.min-x)/(b-x)*(v-g)+g,x=i.min):b<=x&&b<i.min&&x>=i.min&&(v=(i.min-x)/(b-x)*(v-g)+g,b=i.min),x>=b&&x>i.max&&b<=i.max?(g=(i.max-x)/(b-x)*(v-g)+g,x=i.max):b>=x&&b>i.max&&x<=i.max&&(v=(i.max-x)/(b-x)*(v-g)+g,b=i.max),g!==y&&o.lineTo(t.p2c(y),i.p2c(x)),o.lineTo(t.p2c(g),i.p2c(x)),o.lineTo(t.p2c(v),i.p2c(b)),v!==w&&(o.lineTo(t.p2c(v),i.p2c(b)),o.lineTo(t.p2c(w),i.p2c(b)))}}else f=null,m=null}}(l,e.xaxis,e.yaxis,e.lines.fillTowards||0,t,e.lines.steps)),c>0&&function(e,t,i,n,o,a,r){var s=e.points,l=e.pointsize,c=null,u=null,p=0,h=0,d=0,f=0,m=null,g=null,x=0;for(a.beginPath(),x=l;x<s.length;x+=l)if(p=s[x-l],h=s[x-l+1],d=s[x],f=s[x+1],null!==p&&null!==d)if(isNaN(p)||isNaN(d)||isNaN(h)||isNaN(f))c=null,u=null;else{if(r&&(null!==m&&null!==g?(d=p,f=h,p=m,h=g,m=null,g=null,x-=l):h!==f&&p!==d&&(f=h,m=d,g=h)),h<=f&&h<o.min){if(f<o.min)continue;p=(o.min-h)/(f-h)*(d-p)+p,h=o.min}else if(f<=h&&f<o.min){if(h<o.min)continue;d=(o.min-h)/(f-h)*(d-p)+p,f=o.min}if(h>=f&&h>o.max){if(f>o.max)continue;p=(o.max-h)/(f-h)*(d-p)+p,h=o.max}else if(f>=h&&f>o.max){if(h>o.max)continue;d=(o.max-h)/(f-h)*(d-p)+p,f=o.max}if(p<=d&&p<n.min){if(d<n.min)continue;h=(n.min-p)/(d-p)*(f-h)+h,p=n.min}else if(d<=p&&d<n.min){if(p<n.min)continue;f=(n.min-p)/(d-p)*(f-h)+h,d=n.min}if(p>=d&&p>n.max){if(d>n.max)continue;h=(n.max-p)/(d-p)*(f-h)+h,p=n.max}else if(d>=p&&d>n.max){if(p>n.max)continue;f=(n.max-p)/(d-p)*(f-h)+h,d=n.max}p===c&&h===u||a.moveTo(n.p2c(p)+t,o.p2c(h)+i),c=d,u=f,a.lineTo(n.p2c(d)+t,o.p2c(f)+i)}else m=null,g=null;a.stroke()}(l,0,0,e.xaxis,e.yaxis,t,e.lines.steps),t.restore()},this.drawSeriesPoints=function(e,t,n,o,a,r,s){function l(e,t,i,n,o,a){e.moveTo(t+n,i),e.arc(t,i,n,0,o?Math.PI:2*Math.PI,!1)}l.fill=!0,t.save(),t.translate(n.left,n.top);var c={format:e.datapoints.format,points:e.datapoints.points,pointsize:e.datapoints.pointsize};e.decimatePoints&&(c.points=e.decimatePoints(e,e.xaxis.min,e.xaxis.max,o,e.yaxis.min,e.yaxis.max,a));var u,p=e.points.lineWidth,h=e.points.radius,d=e.points.symbol;"circle"===d?u=l:"string"==typeof d&&r&&r[d]?u=r[d]:"function"==typeof r&&(u=r),0===p&&(p=1e-4),t.lineWidth=p,t.fillStyle=i(e.points,e.color,null,null,s),t.strokeStyle=e.color,function(e,i,n,o,a,r,s,l){var c=e.points,u=e.pointsize;t.beginPath();for(var p=0;p<c.length;p+=u){var h=c[p],d=c[p+1];null==h||h<r.min||h>r.max||d<s.min||d>s.max||(h=r.p2c(h),d=s.p2c(d)+o,l(t,h,d,i,a,n))}l.fill&&!a&&t.fill(),t.stroke()}(c,h,!0,0,!1,e.xaxis,e.yaxis,u),t.restore()},this.drawSeriesBars=function(e,n,o,a,r,s,l){n.save(),n.translate(o.left,o.top);var c,u={format:e.datapoints.format,points:e.datapoints.points,pointsize:e.datapoints.pointsize};e.decimate&&(u.points=e.decimate(e,e.xaxis.min,e.xaxis.max,a)),n.lineWidth=e.bars.lineWidth,n.strokeStyle=e.color;var p=e.bars.barWidth[0]||e.bars.barWidth;switch(e.bars.align){case"left":c=0;break;case"right":c=-p;break;default:c=-p/2}!function(i,o,a,r,s,l){for(var c=i.points,u=i.pointsize,p=e.bars.fillTowards||0,h=p>l.min?Math.min(l.max,p):l.min,d=0;d<c.length;d+=u)if(null!=c[d]){var f=3===u?c[d+2]:h;t(c[d],c[d+1],f,o,a,r,s,l,n,e.bars.horizontal,e.bars.lineWidth)}}(u,c,c+p,e.bars.fill?function(t,n){return i(e.bars,e.color,t,n,l)}:null,e.xaxis,e.yaxis),n.restore()},this.drawBar=t}}(jQuery),function(e){function t(e,t,i,n){if(t.points.errorbars){var o=[{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0}],a=t.points.errorbars;"x"!==a&&"xy"!==a||(t.points.xerr.asymmetric?(o.push({x:!0,number:!0,required:!0}),o.push({x:!0,number:!0,required:!0})):o.push({x:!0,number:!0,required:!0})),"y"!==a&&"xy"!==a||(t.points.yerr.asymmetric?(o.push({y:!0,number:!0,required:!0}),o.push({y:!0,number:!0,required:!0})):o.push({y:!0,number:!0,required:!0})),n.format=o}}function i(e,t){var i=e.datapoints.points,n=null,o=null,a=null,r=null,s=e.points.xerr,l=e.points.yerr,c=e.points.errorbars;"x"===c||"xy"===c?s.asymmetric?(n=i[t+2],o=i[t+3],"xy"===c&&(l.asymmetric?(a=i[t+4],r=i[t+5]):a=i[t+4])):(n=i[t+2],"xy"===c&&(l.asymmetric?(a=i[t+3],r=i[t+4]):a=i[t+3])):"y"===c&&(l.asymmetric?(a=i[t+2],r=i[t+3]):a=i[t+2]),null==o&&(o=n),null==r&&(r=a);var u=[n,o,a,r];return s.show||(u[0]=null,u[1]=null),l.show||(u[2]=null,u[3]=null),u}function n(t,i,n,a,r,s,l,c,u,p,h){a+=p,r+=p,s+=p,"x"===i.err?(r>n+u?o(t,[[r,a],[Math.max(n+u,h[0]),a]]):l=!1,s<n-u?o(t,[[Math.min(n-u,h[1]),a],[s,a]]):c=!1):(r<a-u?o(t,[[n,r],[n,Math.min(a-u,h[0])]]):l=!1,s>a+u?o(t,[[n,Math.max(a+u,h[1])],[n,s]]):c=!1),u=null!=i.radius?i.radius:u,l&&("-"===i.upperCap?"x"===i.err?o(t,[[r,a-u],[r,a+u]]):o(t,[[n-u,r],[n+u,r]]):e.isFunction(i.upperCap)&&("x"===i.err?i.upperCap(t,r,a,u):i.upperCap(t,n,r,u))),c&&("-"===i.lowerCap?"x"===i.err?o(t,[[s,a-u],[s,a+u]]):o(t,[[n-u,s],[n+u,s]]):e.isFunction(i.lowerCap)&&("x"===i.err?i.lowerCap(t,s,a,u):i.lowerCap(t,n,s,u)))}function o(e,t){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var i=1;i<t.length;i++)e.lineTo(t[i][0],t[i][1]);e.stroke()}function a(t,o){var a=t.getPlotOffset();o.save(),o.translate(a.left,a.top),e.each(t.getData(),(function(e,t){t.points.errorbars&&(t.points.xerr.show||t.points.yerr.show)&&function(e,t,o){var a,r=o.datapoints.points,s=o.datapoints.pointsize,l=[o.xaxis,o.yaxis],c=o.points.radius,u=[o.points.xerr,o.points.yerr],p=!1;l[0].p2c(l[0].max)<l[0].p2c(l[0].min)&&(p=!0,a=u[0].lowerCap,u[0].lowerCap=u[0].upperCap,u[0].upperCap=a);var h=!1;l[1].p2c(l[1].min)<l[1].p2c(l[1].max)&&(h=!0,a=u[1].lowerCap,u[1].lowerCap=u[1].upperCap,u[1].upperCap=a);for(var d=0;d<o.datapoints.points.length;d+=s)for(var f=i(o,d),m=0;m<u.length;m++){var g=[l[m].min,l[m].max];if(f[m*u.length]){var x=r[d],v=r[d+1],b=[x,v][m]+f[m*u.length+1],y=[x,v][m]-f[m*u.length];if("x"===u[m].err&&(v>l[1].max||v<l[1].min||b<l[0].min||y>l[0].max))continue;if("y"===u[m].err&&(x>l[0].max||x<l[0].min||b<l[1].min||y>l[1].max))continue;var w=!0,k=!0;b>g[1]&&(w=!1,b=g[1]),y<g[0]&&(k=!1,y=g[0]),("x"===u[m].err&&p||"y"===u[m].err&&h)&&(a=y,y=b,b=a,a=k,k=w,w=a,a=g[0],g[0]=g[1],g[1]=a),x=l[0].p2c(x),v=l[1].p2c(v),b=l[m].p2c(b),y=l[m].p2c(y),g[0]=l[m].p2c(g[0]),g[1]=l[m].p2c(g[1]);var T=u[m].lineWidth?u[m].lineWidth:o.points.lineWidth,M=null!=o.points.shadowSize?o.points.shadowSize:o.shadowSize;if(T>0&&M>0){var S=M/2;t.lineWidth=S,t.strokeStyle="rgba(0,0,0,0.1)",n(t,u[m],x,v,b,y,w,k,c,S+S/2,g),t.strokeStyle="rgba(0,0,0,0.2)",n(t,u[m],x,v,b,y,w,k,c,S/2,g)}t.strokeStyle=u[m].color?u[m].color:o.color,t.lineWidth=T,n(t,u[m],x,v,b,y,w,k,c,0,g)}}}(0,o,t)})),o.restore()}e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t),e.hooks.draw.push(a)},options:{series:{points:{errorbars:null,xerr:{err:"x",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null},yerr:{err:"y",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null}}}},name:"errorbars",version:"1.0"})}(jQuery),function(e){"use strict";jQuery.plot.uiConstants={SNAPPING_CONSTANT:20,PANHINT_LENGTH_CONSTANT:10,MINOR_TICKS_COUNT_CONSTANT:4,TICK_LENGTH_CONSTANT:10,ZOOM_DISTANCE_MARGIN:25}}(),function(e){"use strict";var t=n(Number.MAX_VALUE,10),i=n(Number.MAX_VALUE,4);function n(e,t){for(var i,n,o=Math.floor(Math.log(e)*Math.LOG10E)-1,a=[],r=-o;r<=o;r++){n=parseFloat("1e"+r);for(var s=1;s<9;s+=t)i=n*s,a.push(i)}return a}var o=function(n,o,r){var s=[],l=-1,c=-1,u=n.getCanvas(),p=t,h=a(o,n),d=o.max;r||(r=.3*Math.sqrt("x"===o.direction?u.width:u.height)),t.some((function(e,t){return e>=h&&(l=t,!0)})),t.some((function(e,t){return e>=d&&(c=t,!0)})),-1===c&&(c=t.length-1),c-l<=r/4&&p.length!==i.length&&(p=i,l*=2,c*=2);var f,m,g,x=null,v=1/r;if(c-l>=r/4){for(var b=c;b>=l;b--)f=p[b],m=(Math.log(f)-Math.log(h))/(Math.log(d)-Math.log(h)),g=f,null===x?x={pixelCoord:m,idealPixelCoord:m}:Math.abs(m-x.pixelCoord)>=v?x={pixelCoord:m,idealPixelCoord:x.idealPixelCoord-v}:g=null,g&&s.push(g);s.reverse()}else{var y=n.computeTickSize(h,d,r),w={min:h,max:d,tickSize:y};s=e.plot.linearTickGenerator(w)}return s},a=function(e,t){var i=e.min,n=e.max;return i<=0&&n<(i=null===e.datamin?e.min=.1:d(t,e))&&(e.max=null!==e.datamax?e.datamax:e.options.max,e.options.offset.below=0,e.options.offset.above=0),i},r=function(t,i,n){var o=t>0?Math.floor(Math.log(t)/Math.LN10):0;if(n)return o>=-4&&o<=7?e.plot.defaultTickFormatter(t,i,n):e.plot.expRepTickFormatter(t,i,n);if(o>=-4&&o<=7){var a=o<0?t.toFixed(-o):t.toFixed(o+2);if(-1!==a.indexOf(".")){for(var r=a.lastIndexOf("0");r===a.length-1;)r=(a=a.slice(0,-1)).lastIndexOf("0");a.indexOf(".")===a.length-1&&(a=a.slice(0,-1))}return a}return e.plot.expRepTickFormatter(t,i)},s=function(e){return e<t[0]&&(e=t[0]),Math.log(e)},l=function(e){return Math.exp(e)},c=function(e){return-e},u=function(e){return-s(e)},p=function(e){return l(-e)};function h(e,t){"log"===t.options.mode&&t.datamin<=0&&(null===t.datamin?t.datamin=.1:t.datamin=d(e,t))}function d(e,t){var i=e.getData().filter((function(e){return e.xaxis===t||e.yaxis===t})).map((function(t){return e.computeRangeForDataSeries(t,null,f)})),n="x"===t.direction?Math.min(.1,i&&i[0]?i[0].xmin:.1):Math.min(.1,i&&i[0]?i[0].ymin:.1);return t.min=n,n}function f(e){return e>0}e.plot.plugins.push({init:function(t){t.hooks.processOptions.push((function(t){e.each(t.getAxes(),(function(e,i){var n=i.options;"log"===n.mode?(i.tickGenerator=function(e){return o(t,e,11)},"function"!=typeof i.options.tickFormatter&&(i.options.tickFormatter=r),i.options.transform=n.inverted?u:s,i.options.inverseTransform=n.inverted?p:l,i.options.autoScaleMargin=0,t.hooks.setRange.push(h)):n.inverted&&(i.options.transform=c,i.options.inverseTransform=c)}))}))},options:{xaxis:{}},name:"log",version:"0.1"}),e.plot.logTicksGenerator=o,e.plot.logTickFormatter=r}(jQuery),function(e){var t=function(e,t,i,n,o){var a=n*Math.sqrt(Math.PI)/2;e.rect(t-a,i-a,a+a,a+a)},i=function(e,t,i,n,o){var a=n*Math.sqrt(Math.PI)/2;e.rect(t-a,i-a,a+a,a+a)},n=function(e,t,i,n,o){var a=n*Math.sqrt(Math.PI/2);e.moveTo(t-a,i),e.lineTo(t,i-a),e.lineTo(t+a,i),e.lineTo(t,i+a),e.lineTo(t-a,i),e.lineTo(t,i-a)},o=function(e,t,i,n,o){var a=n*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3)),r=a*Math.sin(Math.PI/3);e.moveTo(t-a/2,i+r/2),e.lineTo(t+a/2,i+r/2),o||(e.lineTo(t,i-r/2),e.lineTo(t-a/2,i+r/2),e.lineTo(t+a/2,i+r/2))},a=function(e,t,i,n,o,a){o||(e.moveTo(t+n,i),e.arc(t,i,n,0,2*Math.PI,!1))},r={square:t,rectangle:i,diamond:n,triangle:o,cross:function(e,t,i,n,o){var a=n*Math.sqrt(Math.PI)/2;e.moveTo(t-a,i-a),e.lineTo(t+a,i+a),e.moveTo(t-a,i+a),e.lineTo(t+a,i-a)},ellipse:a,plus:function(e,t,i,n,o){var a=n*Math.sqrt(Math.PI/2);e.moveTo(t-a,i),e.lineTo(t+a,i),e.moveTo(t,i+a),e.lineTo(t,i-a)}};t.fill=!0,i.fill=!0,n.fill=!0,o.fill=!0,a.fill=!0,e.plot.plugins.push({init:function(e){e.drawSymbol=r},name:"symbols",version:"1.0"})}(jQuery),function(e){"use strict";function t(e,t,i,n){if(!0===t.flatdata){var o=t.start||0,a="number"==typeof t.step?t.step:1;n.pointsize=2;for(var r=0,s=0;r<i.length;r++,s+=2)n.points[s]=o+r*a,n.points[s+1]=i[r];void 0!==n.points?n.points.length=2*i.length:n.points=[]}}jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t)},name:"flatdata",version:"0.0.2"})}(),function(e){"use strict";var t={zoom:{interactive:!1,active:!1,amount:1.5},pan:{interactive:!1,active:!1,cursor:"move",frameRate:60,mode:"smart"},recenter:{interactive:!0},xaxis:{axisZoom:!0,plotZoom:!0,axisPan:!0,plotPan:!0,panRange:[void 0,void 0],zoomRange:[void 0,void 0]},yaxis:{axisZoom:!0,plotZoom:!0,axisPan:!0,plotPan:!0,panRange:[void 0,void 0],zoomRange:[void 0,void 0]}},i=e.plot.saturated,n=e.plot.browser,o=e.plot.uiConstants.SNAPPING_CONSTANT,a=e.plot.uiConstants.PANHINT_LENGTH_CONSTANT;function r(t,r){var s=null,l=!1,c="manual"===r.pan.mode,u="smartLock"===r.pan.mode,p=u||"smart"===r.pan.mode;var h,d="default",f=null,m=null,g={x:0,y:0},x=!1;function v(e,i){var o=Math.abs(e.originalEvent.deltaY)<=1?1+Math.abs(e.originalEvent.deltaY)/50:null;if(x&&T(e),t.getOptions().zoom.active)return e.preventDefault(),function(e,i,o){var a=n.getPageXY(e),r=t.offset();r.left=a.X-r.left,r.top=a.Y-r.top;var s=t.getPlaceholder().offset();s.left=a.X-s.left,s.top=a.Y-s.top;var l=t.getXAxes().concat(t.getYAxes()).filter((function(e){var t=e.box;if(void 0!==t)return s.left>t.left&&s.left<t.left+t.width&&s.top>t.top&&s.top<t.top+t.height}));0===l.length&&(l=void 0),i?t.zoomOut({center:r,axes:l,amount:o}):t.zoom({center:r,axes:l,amount:o})}(e,i<0,o),!1}function b(e){l=!0}function y(e){l=!1}function w(e){if(!l||!function(e){return 0===e.button}(e))return!1;x=!0;var i=n.getPageXY(e),o=t.getPlaceholder().offset();o.left=i.X-o.left,o.top=i.Y-o.top,0===(s=t.getXAxes().concat(t.getYAxes()).filter((function(e){var t=e.box;if(void 0!==t)return o.left>t.left&&o.left<t.left+t.width&&o.top>t.top&&o.top<t.top+t.height}))).length&&(s=void 0);var a=t.getPlaceholder().css("cursor");a&&(d=a),t.getPlaceholder().css("cursor",t.getOptions().pan.cursor),p?h=t.navigationState(i.X,i.Y):c&&(g.x=i.X,g.y=i.Y)}function k(e){if(x){var i=n.getPageXY(e),o=t.getOptions().pan.frameRate;-1!==o?!m&&o&&(m=setTimeout((function(){p?t.smartPan({x:h.startPageX-i.X,y:h.startPageY-i.Y},h,s,!1,u):c&&(t.pan({left:g.x-i.X,top:g.y-i.Y,axes:s}),g.x=i.X,g.y=i.Y),m=null}),1/o*1e3)):p?t.smartPan({x:h.startPageX-i.X,y:h.startPageY-i.Y},h,s,!1,u):c&&(t.pan({left:g.x-i.X,top:g.y-i.Y,axes:s}),g.x=i.X,g.y=i.Y)}}function T(e){if(x){m&&(clearTimeout(m),m=null),x=!1;var i=n.getPageXY(e);t.getPlaceholder().css("cursor",d),p?(t.smartPan({x:h.startPageX-i.X,y:h.startPageY-i.Y},h,s,!1,u),t.smartPan.end()):c&&(t.pan({left:g.x-i.X,top:g.y-i.Y,axes:s}),g.x=0,g.y=0)}}function M(i){if(t.activate(),t.getOptions().recenter.interactive){var n,o=t.getTouchedAxis(i.clientX,i.clientY);t.recenter({axes:o[0]?o:null}),n=o[0]?new e.Event("re-center",{detail:{axisTouched:o[0]}}):new e.Event("re-center",{detail:i}),t.getPlaceholder().trigger(n)}}function S(e){return t.activate(),x&&T(e),!1}t.navigationState=function(e,t){var i=this.getAxes(),n={};return Object.keys(i).forEach((function(e){var t=i[e];n[e]={navigationOffset:{below:t.options.offset.below||0,above:t.options.offset.above||0},axisMin:t.min,axisMax:t.max,diagMode:!1}})),n.startPageX=e||0,n.startPageY=t||0,n},t.activate=function(){var e=t.getOptions();e.pan.active&&e.zoom.active||(e.pan.active=!0,e.zoom.active=!0,t.getPlaceholder().trigger("plotactivated",[t]))},t.zoomOut=function(e){e||(e={}),e.amount||(e.amount=t.getOptions().zoom.amount),e.amount=1/e.amount,t.zoom(e)},t.zoom=function(i){i||(i={});var n=i.center,o=i.amount||t.getOptions().zoom.amount,a=t.width(),r=t.height(),s=i.axes||t.getAxes();n||(n={left:a/2,top:r/2});var l=n.left/a,c=n.top/r,u={x:{min:n.left-l*a/o,max:n.left+(1-l)*a/o},y:{min:n.top-c*r/o,max:n.top+(1-c)*r/o}};for(var p in s)if(s.hasOwnProperty(p)){var h=s[p],d=h.options,f=u[h.direction].min,m=u[h.direction].max,g=h.options.offset;if((d.axisZoom||!i.axes)&&(i.axes||d.plotZoom)){if((f=e.plot.saturated.saturate(h.c2p(f)))>(m=e.plot.saturated.saturate(h.c2p(m)))){var x=f;f=m,m=x}if(d.zoomRange){if(m-f<d.zoomRange[0])continue;if(m-f>d.zoomRange[1])continue}var v=e.plot.saturated.saturate(g.below-(h.min-f)),b=e.plot.saturated.saturate(g.above-(h.max-m));d.offset={below:v,above:b}}}t.setupGrid(!0),t.draw(),i.preventEvent||t.getPlaceholder().trigger("plotzoom",[t,i])},t.pan=function(n){var o={x:+n.left,y:+n.top};isNaN(o.x)&&(o.x=0),isNaN(o.y)&&(o.y=0),e.each(n.axes||t.getAxes(),(function(e,t){var a=t.options,r=o[t.direction];if((a.axisPan||!n.axes)&&(a.plotPan||n.axes)){var s=t.p2c(a.panRange[0])-t.p2c(t.min),l=t.p2c(a.panRange[1])-t.p2c(t.max);if(void 0!==a.panRange[0]&&r>=l&&(r=l),void 0!==a.panRange[1]&&r<=s&&(r=s),0!==r){var c=i.saturate(t.c2p(t.p2c(t.min)+r)-t.c2p(t.p2c(t.min))),u=i.saturate(t.c2p(t.p2c(t.max)+r)-t.c2p(t.p2c(t.max)));isFinite(c)||(c=0),isFinite(u)||(u=0),a.offset={below:i.saturate(c+(a.offset.below||0)),above:i.saturate(u+(a.offset.above||0))}}}})),t.setupGrid(!0),t.draw(),n.preventEvent||t.getPlaceholder().trigger("plotpan",[t,n])},t.recenter=function(i){e.each(i.axes||t.getAxes(),(function(e,t){i.axes?"x"===this.direction?t.options.offset={below:0}:"y"===this.direction&&(t.options.offset={above:0}):t.options.offset={below:0,above:0}})),t.setupGrid(!0),t.draw()};var P=null,C={x:0,y:0};t.smartPan=function(e,n,a,r,s){var l,c,u,p,h,d,m=!!s||function(e){return Math.abs(e.y)<o&&Math.abs(e.x)>=o||Math.abs(e.x)<o&&Math.abs(e.y)>=o}(e),g=t.getAxes();(function(e){return Math.abs(e.x)>0&&Math.abs(e.y)>0})(e=s?function(e){switch(!P&&Math.max(Math.abs(e.x),Math.abs(e.y))>=o&&(P=Math.abs(e.x)<Math.abs(e.y)?"y":"x"),P){case"x":return{x:e.x,y:0};case"y":return{x:0,y:e.y};default:return{x:0,y:0}}}(e):function(e){return Math.abs(e.x)<o&&Math.abs(e.y)>=o?{x:0,y:e.y}:Math.abs(e.y)<o&&Math.abs(e.x)>=o?{x:e.x,y:0}:e}(e))&&(n.diagMode=!0),m&&!0===n.diagMode&&(n.diagMode=!1,function(e,t,i){var n;Object.keys(e).forEach((function(o){n=e[o],0===i[n.direction]&&(n.options.offset.below=t[o].navigationOffset.below,n.options.offset.above=t[o].navigationOffset.above)}))}(g,n,e)),f=m?{start:{x:n.startPageX-t.offset().left+t.getPlotOffset().left,y:n.startPageY-t.offset().top+t.getPlotOffset().top},end:{x:n.startPageX-e.x-t.offset().left+t.getPlotOffset().left,y:n.startPageY-e.y-t.offset().top+t.getPlotOffset().top}}:{start:{x:n.startPageX-t.offset().left+t.getPlotOffset().left,y:n.startPageY-t.offset().top+t.getPlotOffset().top},end:!1},isNaN(e.x)&&(e.x=0),isNaN(e.y)&&(e.y=0),a&&(g=a),Object.keys(g).forEach((function(t){if(c=g[t],u=c.min,p=c.max,l=c.options,d=e[c.direction],h=C[c.direction],(l.axisPan||!a)&&(a||l.plotPan)){var n=h+c.p2c(l.panRange[0])-c.p2c(u),o=h+c.p2c(l.panRange[1])-c.p2c(p);if(void 0!==l.panRange[0]&&d>=o&&(d=o),void 0!==l.panRange[1]&&d<=n&&(d=n),0!==d){var r=i.saturate(c.c2p(c.p2c(u)-(h-d))-c.c2p(c.p2c(u))),s=i.saturate(c.c2p(c.p2c(p)-(h-d))-c.c2p(c.p2c(p)));isFinite(r)||(r=0),isFinite(s)||(s=0),c.options.offset.below=i.saturate(r+(c.options.offset.below||0)),c.options.offset.above=i.saturate(s+(c.options.offset.above||0))}}})),C=e,t.setupGrid(!0),t.draw(),r||t.getPlaceholder().trigger("plotpan",[t,e,a,n])},t.smartPan.end=function(){f=null,P=null,C={x:0,y:0},t.triggerRedrawOverlay()},t.getTouchedAxis=function(e,i){var n=t.getPlaceholder().offset();return n.left=e-n.left,n.top=i-n.top,t.getXAxes().concat(t.getYAxes()).filter((function(e){var t=e.box;if(void 0!==t)return n.left>t.left&&n.left<t.left+t.width&&n.top>t.top&&n.top<t.top+t.height}))},t.hooks.drawOverlay.push((function(e,t){if(f){t.strokeStyle="rgba(96, 160, 208, 0.7)",t.lineWidth=2,t.lineJoin="round";var i,n,o=Math.round(f.start.x),r=Math.round(f.start.y);if(s?"x"===s[0].direction?(n=Math.round(f.start.y),i=Math.round(f.end.x)):"y"===s[0].direction&&(i=Math.round(f.start.x),n=Math.round(f.end.y)):(i=Math.round(f.end.x),n=Math.round(f.end.y)),t.beginPath(),!1===f.end)t.moveTo(o,r-a),t.lineTo(o,r+a),t.moveTo(o+a,r),t.lineTo(o-a,r);else{var l=r===n;t.moveTo(o-(l?0:a),r-(l?a:0)),t.lineTo(o+(l?0:a),r+(l?a:0)),t.moveTo(o,r),t.lineTo(i,n),t.moveTo(i-(l?0:a),n-(l?a:0)),t.lineTo(i+(l?0:a),n+(l?a:0))}t.stroke()}})),t.hooks.bindEvents.push((function(e,t){var i=e.getOptions();i.zoom.interactive&&t.mousewheel(v),i.pan.interactive&&(e.addEventHandler("dragstart",w,t,0),e.addEventHandler("drag",k,t,0),e.addEventHandler("dragend",T,t,0),t.bind("mousedown",b),t.bind("mouseup",y)),t.dblclick(M),t.click(S)})),t.hooks.shutdown.push((function(e,t){t.unbind("mousewheel",v),t.unbind("mousedown",b),t.unbind("mouseup",y),t.unbind("dragstart",w),t.unbind("drag",k),t.unbind("dragend",T),t.unbind("dblclick",M),t.unbind("click",S),m&&clearTimeout(m)}))}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(r)},options:t,name:"navigate",version:"1.3"})}(jQuery),jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push((function(e,t,i,n){if(null!=t.fillBetween){var o=n.format;o||((o=[]).push({x:!0,number:!0,computeRange:"none"!==t.xaxis.options.autoScale,required:!0}),o.push({y:!0,number:!0,computeRange:"none"!==t.yaxis.options.autoScale,required:!0}),void 0!==t.fillBetween&&""!==t.fillBetween&&function(t){for(var i=e.getData(),n=0;n<i.length;n++)if(i[n].id===t)return!0;return!1}(t.fillBetween)&&t.fillBetween!==t.id&&o.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==t.yaxis.options.autoScale,defaultValue:0}),n.format=o)}})),e.hooks.processDatapoints.push((function(e,t,i){if(null!=t.fillBetween){var n=function(e,t){var i;for(i=0;i<t.length;++i)if(t[i].id===e.fillBetween)return t[i];return"number"==typeof e.fillBetween?e.fillBetween<0||e.fillBetween>=t.length?null:t[e.fillBetween]:null}(t,e.getData());if(n){for(var o,a,r,s,l,c,u,p,h=i.pointsize,d=i.points,f=n.datapoints.pointsize,m=n.datapoints.points,g=[],x=t.lines.show,v=h>2&&i.format[2].y,b=x&&t.lines.steps,y=!0,w=0,k=0;!(w>=d.length);){if(u=g.length,null==d[w]){for(p=0;p<h;++p)g.push(d[w+p]);w+=h}else if(k>=m.length){if(!x)for(p=0;p<h;++p)g.push(d[w+p]);w+=h}else if(null==m[k]){for(p=0;p<h;++p)g.push(null);y=!0,k+=f}else{if(o=d[w],a=d[w+1],s=m[k],l=m[k+1],c=0,o===s){for(p=0;p<h;++p)g.push(d[w+p]);c=l,w+=h,k+=f}else if(o>s){if(x&&w>0&&null!=d[w-h]){for(r=a+(d[w-h+1]-a)*(s-o)/(d[w-h]-o),g.push(s),g.push(r),p=2;p<h;++p)g.push(d[w+p]);c=l}k+=f}else{if(y&&x){w+=h;continue}for(p=0;p<h;++p)g.push(d[w+p]);x&&k>0&&null!=m[k-f]&&(c=l+(m[k-f+1]-l)*(o-s)/(m[k-f]-s)),w+=h}y=!1,u!==g.length&&v&&(g[u+2]=c)}if(b&&u!==g.length&&u>0&&null!==g[u]&&g[u]!==g[u-h]&&g[u+1]!==g[u-h+1]){for(p=0;p<h;++p)g[u+h+p]=g[u+p];g[u+1]=g[u-h+1]}}i.points=g}}}))},options:{series:{fillBetween:null}},name:"fillbetween",version:"1.0"}),function(e){function t(e,t,i,n){var o="categories"===t.xaxis.options.mode,a="categories"===t.yaxis.options.mode;if(o||a){var r=n.format;if(!r){var s=t;if((r=[]).push({x:!0,number:!0,required:!0,computeRange:!0}),r.push({y:!0,number:!0,required:!0,computeRange:!0}),s.bars.show||s.lines.show&&s.lines.fill){var l=!!(s.bars.show&&s.bars.zero||s.lines.show&&s.lines.zero);r.push({y:!0,number:!0,required:!1,defaultValue:0,computeRange:l}),s.bars.horizontal&&(delete r[r.length-1].y,r[r.length-1].x=!0)}n.format=r}for(var c=0;c<r.length;++c)r[c].x&&o&&(r[c].number=!1),r[c].y&&a&&(r[c].number=!1,r[c].computeRange=!1)}}function i(e){var t=[];for(var i in e.categories){var n=e.categories[i];n>=e.min&&n<=e.max&&t.push([n,i])}return t.sort((function(e,t){return e[0]-t[0]})),t}function n(t,n,o){if("categories"===t[n].options.mode){if(!t[n].categories){var a={},r=t[n].options.categories||{};if(e.isArray(r))for(var s=0;s<r.length;++s)a[r[s]]=s;else for(var l in r)a[l]=r[l];t[n].categories=a}t[n].options.ticks||(t[n].options.ticks=i),function(e,t,i){for(var n=e.points,o=e.pointsize,a=e.format,r=t.charAt(0),s=function(e){var t=-1;for(var i in e)e[i]>t&&(t=e[i]);return t+1}(i),l=0;l<n.length;l+=o)if(null!=n[l])for(var c=0;c<o;++c){var u=n[l+c];null!=u&&a[c][r]&&(u in i||(i[u]=s,++s),n[l+c]=i[u])}}(o,n,t[n].categories)}}function o(e,t,i){n(t,"xaxis",i),n(t,"yaxis",i)}e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t),e.hooks.processDatapoints.push(o)},options:{xaxis:{categories:null},yaxis:{categories:null}},name:"categories",version:"1.0"})}(jQuery),jQuery.plot.plugins.push({init:function(e){e.hooks.processDatapoints.push((function(e,t,i){if(null!=t.stack&&!1!==t.stack){var n=t.bars.show||t.lines.show&&t.lines.fill,o=i.pointsize>2&&(t.bars.horizontal?i.format[2].x:i.format[2].y);n&&!o&&function(e,t){for(var i=[],n=0;n<t.points.length;n+=2)i.push(t.points[n]),i.push(t.points[n+1]),i.push(0);t.format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==e.yaxis.options.autoScale,defaultValue:0}),t.points=i,t.pointsize=3}(t,i);var a=function(e,t){for(var i=null,n=0;n<t.length&&e!==t[n];++n)t[n].stack===e.stack&&(i=t[n]);return i}(t,e.getData());if(a){for(var r,s,l,c,u,p,h,d,f=i.pointsize,m=i.points,g=a.datapoints.pointsize,x=a.datapoints.points,v=[],b=t.lines.show,y=t.bars.horizontal,w=b&&t.lines.steps,k=!0,T=y?1:0,M=y?0:1,S=0,P=0;!(S>=m.length);){if(h=v.length,null==m[S]){for(d=0;d<f;++d)v.push(m[S+d]);S+=f}else if(P>=x.length){if(!b)for(d=0;d<f;++d)v.push(m[S+d]);S+=f}else if(null==x[P]){for(d=0;d<f;++d)v.push(null);k=!0,P+=g}else{if(r=m[S+T],s=m[S+M],c=x[P+T],u=x[P+M],p=0,r===c){for(d=0;d<f;++d)v.push(m[S+d]);v[h+M]+=u,p=u,S+=f,P+=g}else if(r>c){if(b&&S>0&&null!=m[S-f]){for(l=s+(m[S-f+M]-s)*(c-r)/(m[S-f+T]-r),v.push(c),v.push(l+u),d=2;d<f;++d)v.push(m[S+d]);p=u}P+=g}else{if(k&&b){S+=f;continue}for(d=0;d<f;++d)v.push(m[S+d]);b&&P>0&&null!=x[P-g]&&(p=u+(x[P-g+M]-u)*(r-c)/(x[P-g+T]-c)),v[h+M]+=p,S+=f}k=!1,h!==v.length&&n&&(v[h+2]+=p)}if(w&&h!==v.length&&h>0&&null!==v[h]&&v[h]!==v[h-f]&&v[h+1]!==v[h-f+1]){for(d=0;d<f;++d)v[h+f+d]=v[h+d];v[h+1]=v[h-f+1]}}i.points=v}}}))},options:{series:{stack:null}},name:"stack",version:"1.2"}),function(e){"use strict";var t=e.plot.uiConstants.ZOOM_DISTANCE_MARGIN;function i(i,c){var u,p,h,d,f={zoomEnable:!1,prevDistance:null,prevTapTime:0,prevPanPosition:{x:0,y:0},prevTapPosition:{x:0,y:0}},m={prevTouchedAxis:"none",currentTouchedAxis:"none",touchedAxis:null,navigationConstraint:"unconstrained",initialState:null},g=c.pan.interactive&&"manual"===c.pan.touchMode,x="smartLock"===c.pan.touchMode,v=c.pan.interactive&&(x||"smart"===c.pan.touchMode);function b(e,t,o){m.touchedAxis=function(e,t,i,n){if("pinchstart"!==t.type)return"panstart"===t.type||"pinchend"===t.type?e.getTouchedAxis(t.detail.touches[0].pageX,t.detail.touches[0].pageY):n.touchedAxis;var o=e.getTouchedAxis(t.detail.touches[0].pageX,t.detail.touches[0].pageY),a=e.getTouchedAxis(t.detail.touches[1].pageX,t.detail.touches[1].pageY);if(o.length===a.length&&o.toString()===a.toString())return o}(i,e,0,m),n(m)?m.navigationConstraint="unconstrained":m.navigationConstraint="axisConstrained"}u={start:function(e){if(b(e,"pan",f),o(e,"pan",f,m),v){var t=l(e,"pan");m.initialState=i.navigationState(t.x,t.y)}},drag:function(e){if(b(e,"pan",f),v){var t=l(e,"pan");i.smartPan({x:m.initialState.startPageX-t.x,y:m.initialState.startPageY-t.y},m.initialState,m.touchedAxis,!1,x)}else g&&(i.pan({left:-s(e,"pan",f).x,top:-s(e,"pan",f).y,axes:m.touchedAxis}),r(e,"pan",f,m))},end:function(e){b(e,"pan",f),v&&i.smartPan.end(),function(e,t){return t.zoomEnable&&1===e.detail.touches.length}(e,f)&&updateprevPanPosition(e,"pan",f,m)}},p={start:function(e){d&&(clearTimeout(d),d=null),b(e,"pinch",f),function(e,t){t.prevDistance=a(e)}(e,f),o(e,"pinch",f,m)},drag:function(e){d||(d=setTimeout((function(){b(e,"pinch",f),i.pan({left:-s(e,"pinch",f).x,top:-s(e,"pinch",f).y,axes:m.touchedAxis}),r(e,"pinch",f,m);var n=a(e);(f.zoomEnable||Math.abs(n-f.prevDistance)>t)&&(!function(e,t,i,n){var o=e.offset(),r={left:0,top:0},s=a(t)/i.prevDistance,c=a(t);r.left=l(t,"pinch").x-o.left,r.top=l(t,"pinch").y-o.top,e.zoom({center:r,amount:s,axes:n.touchedAxis}),i.prevDistance=c}(i,e,f,m),f.zoomEnable=!0),d=null}),1e3/60))},end:function(e){d&&(clearTimeout(d),d=null),b(e,"pinch",f),f.prevDistance=null}},h={recenterPlot:function(t){t&&t.detail&&"touchstart"===t.detail.type&&function(t,i,o,a){if(function(e,t,i){var o=e.getTouchedAxis(t.detail.firstTouch.x,t.detail.firstTouch.y);void 0!==o[0]&&(i.prevTouchedAxis=o[0].direction);void 0!==(o=e.getTouchedAxis(t.detail.secondTouch.x,t.detail.secondTouch.y))[0]&&(i.touchedAxis=o,i.currentTouchedAxis=o[0].direction);n(i)&&(i.touchedAxis=null,i.prevTouchedAxis="none",i.currentTouchedAxis="none")}(t,i,a),"x"===a.currentTouchedAxis&&"x"===a.prevTouchedAxis||"y"===a.currentTouchedAxis&&"y"===a.prevTouchedAxis||"none"===a.currentTouchedAxis&&"none"===a.prevTouchedAxis){var r;t.recenter({axes:a.touchedAxis}),r=a.touchedAxis?new e.Event("re-center",{detail:{axisTouched:a.touchedAxis}}):new e.Event("re-center",{detail:i}),t.getPlaceholder().trigger(r)}}(i,t,0,m)}},!0!==c.pan.enableTouch&&!0!==c.zoom.enableTouch||(i.hooks.bindEvents.push((function(e,t){var i=e.getOptions();i.zoom.interactive&&i.zoom.enableTouch&&(t[0].addEventListener("pinchstart",p.start,!1),t[0].addEventListener("pinchdrag",p.drag,!1),t[0].addEventListener("pinchend",p.end,!1)),i.pan.interactive&&i.pan.enableTouch&&(t[0].addEventListener("panstart",u.start,!1),t[0].addEventListener("pandrag",u.drag,!1),t[0].addEventListener("panend",u.end,!1)),i.recenter.interactive&&i.recenter.enableTouch&&t[0].addEventListener("doubletap",h.recenterPlot,!1)})),i.hooks.shutdown.push((function(e,t){t[0].removeEventListener("panstart",u.start),t[0].removeEventListener("pandrag",u.drag),t[0].removeEventListener("panend",u.end),t[0].removeEventListener("pinchstart",p.start),t[0].removeEventListener("pinchdrag",p.drag),t[0].removeEventListener("pinchend",p.end),t[0].removeEventListener("doubletap",h.recenterPlot)})))}function n(e){return!e.touchedAxis||0===e.touchedAxis.length}function o(e,t,i,n){var o,a=l(e,t);switch(n.navigationConstraint){case"unconstrained":n.touchedAxis=null,i.prevTapPosition={x:i.prevPanPosition.x,y:i.prevPanPosition.y},i.prevPanPosition={x:a.x,y:a.y};break;case"axisConstrained":o=n.touchedAxis[0].direction,n.currentTouchedAxis=o,i.prevTapPosition[o]=i.prevPanPosition[o],i.prevPanPosition[o]=a[o]}}function a(e){var t,i,n,o,a=e.detail.touches[0],r=e.detail.touches[1];return t=a.pageX,i=a.pageY,n=r.pageX,o=r.pageY,Math.sqrt((t-n)*(t-n)+(i-o)*(i-o))}function r(e,t,i,n){var o=l(e,t);switch(n.navigationConstraint){case"unconstrained":i.prevPanPosition.x=o.x,i.prevPanPosition.y=o.y;break;case"axisConstrained":i.prevPanPosition[n.currentTouchedAxis]=o[n.currentTouchedAxis]}}function s(e,t,i){var n=l(e,t);return{x:n.x-i.prevPanPosition.x,y:n.y-i.prevPanPosition.y}}function l(e,t){return"pinch"===t?{x:(e.detail.touches[0].pageX+e.detail.touches[1].pageX)/2,y:(e.detail.touches[0].pageY+e.detail.touches[1].pageY)/2}:{x:e.detail.touches[0].pageX,y:e.detail.touches[0].pageY}}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(i)},options:{zoom:{enableTouch:!1},pan:{enableTouch:!1,touchMode:"manual"},recenter:{enableTouch:!0}},name:"navigateTouch",version:"0.3"})}(jQuery),function(e){"use strict";var t=e.plot.browser,i="click",n="hover";e.plot.plugins.push({init:function(o){var a,r=[];function s(e){var t=o.getOptions(),i=new CustomEvent("mouseevent");return i.pageX=e.detail.changedTouches[0].pageX,i.pageY=e.detail.changedTouches[0].pageY,i.clientX=e.detail.changedTouches[0].clientX,i.clientY=e.detail.changedTouches[0].clientY,t.grid.hoverable&&l(i,n,30),!1}function l(e,t,i){var n=o.getData();if(void 0!==e&&n.length>0&&void 0!==n[0].xaxis.c2p&&void 0!==n[0].yaxis.c2p){var a=t+"able";d("plot"+t,e,(function(e){return!1!==n[e][a]}),i)}}function c(e){a=e,o.getPlaceholder()[0].lastMouseMoveEvent=e,l(e,n)}function u(e){a=void 0,o.getPlaceholder()[0].lastMouseMoveEvent=void 0,d("plothover",e,(function(e){return!1}))}function p(e){l(e,i)}function h(){o.unhighlight(),o.getPlaceholder().trigger("plothovercleanup")}function d(e,i,n,a){var s=o.getOptions(),l=o.offset(),c=t.getPageXY(i),u=c.X-l.left,p=c.Y-l.top,h=o.c2p({left:u,top:p}),d=void 0!==a?a:s.grid.mouseActiveRadius;h.pageX=c.X,h.pageY=c.Y;var g=o.findNearbyItems(u,p,n,d),x=g[0];for(let e=1;e<g.length;++e)(void 0===x.distance||g[e].distance<x.distance)&&(x=g[e]);if(x?(x.pageX=parseInt(x.series.xaxis.p2c(x.datapoint[0])+l.left,10),x.pageY=parseInt(x.series.yaxis.p2c(x.datapoint[1])+l.top,10)):x=null,s.grid.autoHighlight){for(let t=0;t<r.length;++t){var v=r[t];(v.auto!==e||x&&v.series===x.series&&v.point[0]===x.datapoint[0]&&v.point[1]===x.datapoint[1])&&x||m(v.series,v.point)}x&&f(x.series,x.datapoint,e)}o.getPlaceholder().trigger(e,[h,x,g])}function f(e,t,i){if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var n=e.datapoints.pointsize;t=e.datapoints.points.slice(n*t,n*(t+1))}var a=g(e,t);-1===a?(r.push({series:e,point:t,auto:i}),o.triggerRedrawOverlay()):i||(r[a].auto=!1)}function m(e,t){if(null==e&&null==t)return r=[],void o.triggerRedrawOverlay();if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var i=e.datapoints.pointsize;t=e.datapoints.points.slice(i*t,i*(t+1))}var n=g(e,t);-1!==n&&(r.splice(n,1),o.triggerRedrawOverlay())}function g(e,t){for(var i=0;i<r.length;++i){var n=r[i];if(n.series===e&&n.point[0]===t[0]&&n.point[1]===t[1])return i}return-1}function x(){h(),l(a,n)}function v(){l(a,n)}function b(e,t,i){var n,o,a=e.getPlotOffset();for(t.save(),t.translate(a.left,a.top),n=0;n<r.length;++n)(o=r[n]).series.bars.show?w(o.series,o.point,t):y(o.series,o.point,t,e);t.restore()}function y(t,i,n,o){var a=i[0],r=i[1],s=t.xaxis,l=t.yaxis,c="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(!(a<s.min||a>s.max||r<l.min||r>l.max)){var u=t.points.radius+t.points.lineWidth/2;n.lineWidth=u,n.strokeStyle=c;var p=1.5*u;a=s.p2c(a),r=l.p2c(r),n.beginPath();var h=t.points.symbol;"circle"===h?n.arc(a,r,p,0,2*Math.PI,!1):"string"==typeof h&&o.drawSymbol&&o.drawSymbol[h]&&o.drawSymbol[h](n,a,r,p,!1),n.closePath(),n.stroke()}}function w(t,i,n){var o,a="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),r=a,s=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-s;break;default:o=-s/2}n.lineWidth=t.bars.lineWidth,n.strokeStyle=a;var l=t.bars.fillTowards||0,c=l>t.yaxis.min?Math.min(t.yaxis.max,l):t.yaxis.min;e.plot.drawSeries.drawBar(i[0],i[1],i[2]||c,o,o+s,(function(){return r}),t.xaxis,t.yaxis,n,t.bars.horizontal,t.bars.lineWidth)}o.hooks.bindEvents.push((function(e,t){var i=e.getOptions();(i.grid.hoverable||i.grid.clickable)&&(t[0].addEventListener("touchevent",h,!1),t[0].addEventListener("tap",s,!1)),i.grid.clickable&&t.bind("click",p),i.grid.hoverable&&(t.bind("mousemove",c),t.bind("mouseleave",u))})),o.hooks.shutdown.push((function(e,t){t[0].removeEventListener("tap",s),t[0].removeEventListener("touchevent",h),t.unbind("mousemove",c),t.unbind("mouseleave",u),t.unbind("click",p),r=[]})),o.hooks.processOptions.push((function(e,t){e.highlight=f,e.unhighlight=m,(t.grid.hoverable||t.grid.clickable)&&(e.hooks.drawOverlay.push(b),e.hooks.processDatapoints.push(x),e.hooks.setupGrid.push(v)),a=e.getPlaceholder()[0].lastMouseMoveEvent}))},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery),function(e){"use strict";function t(e,t){var i,n={twoTouches:!1,currentTapStart:{x:0,y:0},currentTapEnd:{x:0,y:0},prevTap:{x:0,y:0},currentTap:{x:0,y:0},interceptedLongTap:!1,isUnsupportedGesture:!1,prevTapTime:null,tapStartTime:null,longTapTriggerId:null};function o(t){var o=e.getOptions();(o.pan.active||o.zoom.active)&&(!function(e){e.touches.length>=3?n.isUnsupportedGesture=!0:n.isUnsupportedGesture=!1}(t),i.dispatchEvent(new CustomEvent("touchevent",{detail:t})),m(t)?a(t,"pinch"):(a(t,"pan"),f(t)||(function(e){var t=(new Date).getTime(),i=t-n.prevTapTime;if(i>=0&&i<500&&d(n.prevTap.x,n.prevTap.y,n.currentTap.x,n.currentTap.y)<20)return e.firstTouch=n.prevTap,e.secondTouch=n.currentTap,!0;return n.prevTapTime=t,!1}(t)&&a(t,"doubleTap"),a(t,"tap"),a(t,"longTap"))))}function a(e,t){switch(t){case"pan":r[e.type](e);break;case"pinch":s[e.type](e);break;case"doubleTap":l.onDoubleTap(e);break;case"longTap":c[e.type](e);break;case"tap":u[e.type](e)}}var r={touchstart:function(e){n.prevTap={x:n.currentTap.x,y:n.currentTap.y},p(e),function(e){n.tapStartTime=(new Date).getTime(),n.interceptedLongTap=!1,n.currentTapStart={x:e.touches[0].pageX,y:e.touches[0].pageY},n.currentTapEnd={x:e.touches[0].pageX,y:e.touches[0].pageY}}(e),i.dispatchEvent(new CustomEvent("panstart",{detail:e}))},touchmove:function(e){h(e),p(e),function(e){n.currentTapEnd={x:e.touches[0].pageX,y:e.touches[0].pageY}}(e),n.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pandrag",{detail:e}))},touchend:function(e){h(e),f(e)?(i.dispatchEvent(new CustomEvent("pinchend",{detail:e})),i.dispatchEvent(new CustomEvent("panstart",{detail:e}))):function(e){return e.touches&&0===e.touches.length}(e)&&i.dispatchEvent(new CustomEvent("panend",{detail:e}))}},s={touchstart:function(e){i.dispatchEvent(new CustomEvent("pinchstart",{detail:e}))},touchmove:function(e){h(e),n.twoTouches=m(e),n.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pinchdrag",{detail:e}))},touchend:function(e){h(e)}},l={onDoubleTap:function(e){h(e),i.dispatchEvent(new CustomEvent("doubletap",{detail:e}))}},c={touchstart:function(e){c.waitForLongTap(e)},touchmove:function(e){},touchend:function(e){n.longTapTriggerId&&(clearTimeout(n.longTapTriggerId),n.longTapTriggerId=null)},isLongTap:function(e){return(new Date).getTime()-n.tapStartTime>=1500&&!n.interceptedLongTap&&d(n.currentTapStart.x,n.currentTapStart.y,n.currentTapEnd.x,n.currentTapEnd.y)<20&&(n.interceptedLongTap=!0,!0)},waitForLongTap:function(e){n.longTapTriggerId||(n.longTapTriggerId=setTimeout((function(){c.isLongTap(e)&&i.dispatchEvent(new CustomEvent("longtap",{detail:e})),n.longTapTriggerId=null}),1500))}},u={touchstart:function(e){n.tapStartTime=(new Date).getTime()},touchmove:function(e){},touchend:function(e){u.isTap(e)&&(i.dispatchEvent(new CustomEvent("tap",{detail:e})),h(e))},isTap:function(e){return(new Date).getTime()-n.tapStartTime<=125&&d(n.currentTapStart.x,n.currentTapStart.y,n.currentTapEnd.x,n.currentTapEnd.y)<20}};function p(e){n.currentTap={x:e.touches[0].pageX,y:e.touches[0].pageY}}function h(t){n.isUnsupportedGesture||(t.preventDefault(),e.getOptions().propagateSupportedGesture||t.stopPropagation())}function d(e,t,i,n){return Math.sqrt((e-i)*(e-i)+(t-n)*(t-n))}function f(e){return n.twoTouches&&1===e.touches.length}function m(t){return!!(t.touches&&t.touches.length>=2&&t.touches[0].target===e.getEventHolder()&&t.touches[1].target===e.getEventHolder())}(!0===t.pan.enableTouch||t.zoom.enableTouch)&&(e.hooks.bindEvents.push((function(e,t){i=t[0],t[0].addEventListener("touchstart",o,!1),t[0].addEventListener("touchmove",o,!1),t[0].addEventListener("touchend",o,!1)})),e.hooks.shutdown.push((function(e,t){t[0].removeEventListener("touchstart",o),t[0].removeEventListener("touchmove",o),t[0].removeEventListener("touchend",o),n.longTapTriggerId&&(clearTimeout(n.longTapTriggerId),n.longTapTriggerId=null)})))}jQuery.plot.plugins.push({init:function(e){e.hooks.processOptions.push(t)},options:{propagateSupportedGesture:!1},name:"navigateTouch",version:"0.3"})}(),function(e){"use strict";var t=e.plot.saturated.floorInBase,i=function(e,t){var i=new e(t),n=i.setTime.bind(i);i.update=function(e){n(e),e=Math.round(1e3*e)/1e3,this.microseconds=1e3*(e-Math.floor(e))};var o=i.getTime.bind(i);return i.getTime=function(){return o()+this.microseconds/1e3},i.setTime=function(e){this.update(e)},i.getMicroseconds=function(){return this.microseconds},i.setMicroseconds=function(e){var t=o()+e/1e3;this.update(t)},i.setUTCMicroseconds=function(e){this.setMicroseconds(e)},i.getUTCMicroseconds=function(){return this.getMicroseconds()},i.microseconds=null,i.microEpoch=null,i.update(t),i};function n(e,t,i,n){if("function"==typeof e.strftime)return e.strftime(t);var o,a=function(e,t){return t=""+(null==t?"0":t),1===(e=""+e).length?t+e:e},r=function(e,t,i){var n,o=1e3*e+t;if(i<6&&i>0){var a=parseFloat("1e"+(i-6));n=("00000"+(o=Math.round(Math.round(o*a)/a))).slice(-6,-(6-i))}else n=("00000"+(o=Math.round(o))).slice(-6);return n},s=[],l=!1,c=e.getHours(),u=c<12;i||(i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),n||(n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),o=c>12?c-12:0===c?12:c;for(var p=-1,h=0;h<t.length;++h){var d=t.charAt(h);if(!isNaN(Number(d))&&Number(d)>0)p=Number(d);else if(l){switch(d){case"a":d=""+n[e.getDay()];break;case"b":d=""+i[e.getMonth()];break;case"d":d=a(e.getDate());break;case"e":d=a(e.getDate()," ");break;case"h":case"H":d=a(c);break;case"I":d=a(o);break;case"l":d=a(o," ");break;case"m":d=a(e.getMonth()+1);break;case"M":d=a(e.getMinutes());break;case"q":d=""+(Math.floor(e.getMonth()/3)+1);break;case"S":d=a(e.getSeconds());break;case"s":d=""+r(e.getMilliseconds(),e.getMicroseconds(),p);break;case"y":d=a(e.getFullYear()%100);break;case"Y":d=""+e.getFullYear();break;case"p":d=u?"am":"pm";break;case"P":d=u?"AM":"PM";break;case"w":d=""+e.getDay()}s.push(d),l=!1}else"%"===d?l=!0:s.push(d)}return s.join("")}function o(e){function t(e,t,i,n){e[t]=function(){return i[n].apply(i,arguments)}}var i={date:e};void 0!==e.strftime&&t(i,"strftime",e,"strftime"),t(i,"getTime",e,"getTime"),t(i,"setTime",e,"setTime");for(var n=["Date","Day","FullYear","Hours","Minutes","Month","Seconds","Milliseconds","Microseconds"],o=0;o<n.length;o++)t(i,"get"+n[o],e,"getUTC"+n[o]),t(i,"set"+n[o],e,"setUTC"+n[o]);return i}function a(e,t){if(t&&"seconds"===t.timeBase?e*=1e3:"microseconds"===t.timeBase&&(e/=1e3),e>864e13?e=864e13:e<-864e13&&(e=-864e13),"browser"===t.timezone)return i(Date,e);if(t.timezone&&"utc"!==t.timezone){if("undefined"!=typeof timezoneJS&&void 0!==timezoneJS.Date){var n=i(timezoneJS.Date,e);return n.setTimezone(t.timezone),n.setTime(e),n}return o(i(Date,e))}return o(i(Date,e))}var r={microsecond:1e-6,millisecond:.001,second:1,minute:60,hour:3600,day:86400,month:2592e3,quarter:7776e3,year:525949.2*60},s={microsecond:.001,millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},l={microsecond:1,millisecond:1e3,second:1e6,minute:6e7,hour:36e8,day:864e8,month:2592e9,quarter:7776e9,year:31556951999999.996},c=[[1,"microsecond"],[2,"microsecond"],[5,"microsecond"],[10,"microsecond"],[25,"microsecond"],[50,"microsecond"],[100,"microsecond"],[250,"microsecond"],[500,"microsecond"],[1,"millisecond"],[2,"millisecond"],[5,"millisecond"],[10,"millisecond"],[25,"millisecond"],[50,"millisecond"],[100,"millisecond"],[250,"millisecond"],[500,"millisecond"],[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"]],u=c.concat([[3,"month"],[6,"month"],[1,"year"]]),p=c.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function h(e){var i,n=e.options,o=[],c=a(e.min,n),h=0,d=n.tickSize&&"quarter"===n.tickSize[1]||n.minTickSize&&"quarter"===n.minTickSize[1]?p:u;i="seconds"===n.timeBase?r:"microseconds"===n.timeBase?l:s,null!==n.minTickSize&&void 0!==n.minTickSize&&(h="number"==typeof n.tickSize?n.tickSize:n.minTickSize[0]*i[n.minTickSize[1]]);for(var f=0;f<d.length-1&&!(e.delta<(d[f][0]*i[d[f][1]]+d[f+1][0]*i[d[f+1][1]])/2&&d[f][0]*i[d[f][1]]>=h);++f);var m=d[f][0],g=d[f][1];if("year"===g){if(null!==n.minTickSize&&void 0!==n.minTickSize&&"year"===n.minTickSize[1])m=Math.floor(n.minTickSize[0]);else{var x=parseFloat("1e"+Math.floor(Math.log(e.delta/i.year)/Math.LN10)),v=e.delta/i.year/x;m=v<1.5?1:v<3?2:v<7.5?5:10,m*=x}m<1&&(m=1)}e.tickSize=n.tickSize||[m,g];var b=e.tickSize[0],y=b*i[g=e.tickSize[1]];"microsecond"===g?c.setMicroseconds(t(c.getMicroseconds(),b)):"millisecond"===g?c.setMilliseconds(t(c.getMilliseconds(),b)):"second"===g?c.setSeconds(t(c.getSeconds(),b)):"minute"===g?c.setMinutes(t(c.getMinutes(),b)):"hour"===g?c.setHours(t(c.getHours(),b)):"month"===g?c.setMonth(t(c.getMonth(),b)):"quarter"===g?c.setMonth(3*t(c.getMonth()/3,b)):"year"===g&&c.setFullYear(t(c.getFullYear(),b)),y>=i.millisecond&&(y>=i.second?c.setMicroseconds(0):c.setMicroseconds(1e3*c.getMilliseconds())),y>=i.minute&&c.setSeconds(0),y>=i.hour&&c.setMinutes(0),y>=i.day&&c.setHours(0),y>=4*i.day&&c.setDate(1),y>=2*i.month&&c.setMonth(t(c.getMonth(),3)),y>=2*i.quarter&&c.setMonth(t(c.getMonth(),6)),y>=i.year&&c.setMonth(0);var w,k,T=0,M=Number.NaN;do{if(k=M,w=c.getTime(),M=n&&"seconds"===n.timeBase?w/1e3:n&&"microseconds"===n.timeBase?1e3*w:w,o.push(M),"month"===g||"quarter"===g)if(b<1){c.setDate(1);var S=c.getTime();c.setMonth(c.getMonth()+("quarter"===g?3:1));var P=c.getTime();c.setTime(M+T*i.hour+(P-S)*b),T=c.getHours(),c.setHours(0)}else c.setMonth(c.getMonth()+b*("quarter"===g?3:1));else"year"===g?c.setFullYear(c.getFullYear()+b):"seconds"===n.timeBase?c.setTime(1e3*(M+y)):"microseconds"===n.timeBase?c.setTime((M+y)/1e3):c.setTime(M+y)}while(M<e.max&&M!==k);return o}e.plot.plugins.push({init:function(t){t.hooks.processOptions.push((function(t){e.each(t.getAxes(),(function(e,t){var i=t.options;if("time"===i.mode){if(t.tickGenerator=h,"tickFormatter"in i&&"function"==typeof i.tickFormatter)return;t.tickFormatter=function(e,t){var o=a(e,t.options);if(null!=i.timeformat)return n(o,i.timeformat,i.monthNames,i.dayNames);var c,u=t.options.tickSize&&"quarter"===t.options.tickSize[1]||t.options.minTickSize&&"quarter"===t.options.minTickSize[1];c="seconds"===i.timeBase?r:"microseconds"===i.timeBase?l:s;var p,h,d=t.tickSize[0]*c[t.tickSize[1]],f=t.max-t.min,m=i.twelveHourClock?" %p":"",g=i.twelveHourClock?"%I":"%H";if(p="seconds"===i.timeBase?1:"microseconds"===i.timeBase?1e6:1e3,d<c.second){var x=-Math.floor(Math.log10(d/p));String(d).indexOf("25")>-1&&x++,h="%S.%"+x+"s"}else h=d<c.minute?g+":%M:%S"+m:d<c.day?f<2*c.day?g+":%M"+m:"%b %d "+g+":%M"+m:d<c.month?"%b %d":u&&d<c.quarter||!u&&d<c.year?f<c.year?"%b":"%b %Y":u&&d<c.year?f<c.year?"Q%q":"Q%q %Y":"%Y";return n(o,h,i.monthNames,i.dayNames)}}}))}))},options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null,timeBase:"seconds"},yaxis:{timeBase:"seconds"}},name:"time",version:"1.0"}),e.plot.formatDate=n,e.plot.dateGenerator=a,e.plot.dateTickGenerator=h,e.plot.makeUtcWrapper=o}(jQuery),function(e){"use strict";function t(e,t,i,n,o,a){this.axisName=e,this.position=t,this.padding=i,this.placeholder=n,this.axisLabel=o,this.surface=a,this.width=0,this.height=0,this.elem=null}t.prototype.calculateSize=function(){var e=this.axisName+"Label",t=e+"Layer",i=e+" axisLabels",n=this.surface.getTextInfo(t,this.axisLabel,i);this.labelWidth=n.width,this.labelHeight=n.height,"left"===this.position||"right"===this.position?(this.width=this.labelHeight+this.padding,this.height=0):(this.width=0,this.height=this.labelHeight+this.padding)},t.prototype.transforms=function(e,t,i,n){var o,a,r=[];if(0===t&&0===i||((o=n.createSVGTransform()).setTranslate(t,i),r.push(o)),0!==e){a=n.createSVGTransform();var s=Math.round(this.labelWidth/2);a.setRotate(e,s,0),r.push(a)}return r},t.prototype.calculateOffsets=function(e){var t={x:0,y:0,degrees:0};return"bottom"===this.position?(t.x=e.left+e.width/2-this.labelWidth/2,t.y=e.top+e.height-this.labelHeight):"top"===this.position?(t.x=e.left+e.width/2-this.labelWidth/2,t.y=e.top):"left"===this.position?(t.degrees=-90,t.x=e.left-this.labelWidth/2,t.y=e.height/2+e.top):"right"===this.position&&(t.degrees=90,t.x=e.left+e.width-this.labelWidth/2,t.y=e.height/2+e.top),t.x=Math.round(t.x),t.y=Math.round(t.y),t},t.prototype.cleanup=function(){var e=this.axisName+"Label",t=e+"Layer",i=e+" axisLabels";this.surface.removeText(t,0,0,this.axisLabel,i)},t.prototype.draw=function(e){var t=this.axisName+"Label",i=t+"Layer",n=t+" axisLabels",o=this.calculateOffsets(e),a={position:"absolute",bottom:"",right:"",display:"inline-block","white-space":"nowrap"},r=this.surface.getSVGLayer(i),s=this.transforms(o.degrees,o.x,o.y,r.parentNode);this.surface.addText(i,0,0,this.axisLabel,n,void 0,void 0,void 0,void 0,s),this.surface.render(),Object.keys(a).forEach((function(e){r.style[e]=a[e]}))},e.plot.plugins.push({init:function(i){i.hooks.processOptions.push((function(i,n){if(n.axisLabels.show){var o={};i.hooks.axisReserveSpace.push((function(e,i){var n=i.options,a=i.direction+i.n;if(i.labelHeight+=i.boxPosition.centerY,i.labelWidth+=i.boxPosition.centerX,n&&n.axisLabel&&i.show){var r=void 0===n.axisLabelPadding?2:n.axisLabelPadding,s=o[a];s||(s=new t(a,n.position,r,e.getPlaceholder()[0],n.axisLabel,e.getSurface()),o[a]=s),s.calculateSize(),i.labelHeight+=s.height,i.labelWidth+=s.width}})),i.hooks.draw.push((function(t,i){e.each(t.getAxes(),(function(e,t){var i=t.options;if(i&&i.axisLabel&&t.show){var n=t.direction+t.n;o[n].draw(t.box)}}))})),i.hooks.shutdown.push((function(e,t){for(var i in o)o[i].cleanup()}))}}))},options:{axisLabels:{show:!0}},name:"axisLabels",version:"3.0"})}(jQuery),function(e){e.plot.plugins.push({init:function(t){var i={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,currentMode:"xy",active:!1},n=e.plot.uiConstants.SNAPPING_CONSTANT,o={};function a(e){i.active&&(d(e),t.getPlaceholder().trigger("plotselecting",[l()]))}function r(e){var n=t.getOptions();1===e.which&&null!==n.selection.mode&&(i.currentMode="xy",document.body.focus(),void 0!==document.onselectstart&&null==o.onselectstart&&(o.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),void 0!==document.ondrag&&null==o.ondrag&&(o.ondrag=document.ondrag,document.ondrag=function(){return!1}),h(i.first,e),i.active=!0)}function s(e){return void 0!==document.onselectstart&&(document.onselectstart=o.onselectstart),void 0!==document.ondrag&&(document.ondrag=o.ondrag),i.active=!1,d(e),g()?c():(t.getPlaceholder().trigger("plotunselected",[]),t.getPlaceholder().trigger("plotselecting",[null])),!1}function l(){if(!g())return null;if(!i.show)return null;var n={},o={x:i.first.x,y:i.first.y},a={x:i.second.x,y:i.second.y};return"x"===p(t)&&(o.y=0,a.y=t.height()),"y"===p(t)&&(o.x=0,a.x=t.width()),e.each(t.getAxes(),(function(e,t){if(t.used){var i=t.c2p(o[t.direction]),r=t.c2p(a[t.direction]);n[e]={from:Math.min(i,r),to:Math.max(i,r)}}})),n}function c(){var e=l();t.getPlaceholder().trigger("plotselected",[e]),e.xaxis&&e.yaxis&&t.getPlaceholder().trigger("selected",[{x1:e.xaxis.from,y1:e.yaxis.from,x2:e.xaxis.to,y2:e.yaxis.to}])}function u(e,t,i){return t<e?e:t>i?i:t}function p(e){var t=e.getOptions();return"smart"===t.selection.mode?i.currentMode:t.selection.mode}function h(e,o){var a=t.getPlaceholder().offset(),r=t.getPlotOffset();e.x=u(0,o.pageX-a.left-r.left,t.width()),e.y=u(0,o.pageY-a.top-r.top,t.height()),e!==i.first&&function(e){if(i.first){var t={x:e.x-i.first.x,y:e.y-i.first.y};Math.abs(t.x)<n?i.currentMode="y":Math.abs(t.y)<n?i.currentMode="x":i.currentMode="xy"}}(e),"y"===p(t)&&(e.x=e===i.first?0:t.width()),"x"===p(t)&&(e.y=e===i.first?0:t.height())}function d(e){null!=e.pageX&&(h(i.second,e),g()?(i.show=!0,t.triggerRedrawOverlay()):f(!0))}function f(e){i.show&&(i.show=!1,i.currentMode="",t.triggerRedrawOverlay(),e||t.getPlaceholder().trigger("plotunselected",[]))}function m(e,i){var n,o,a,r,s=t.getAxes();for(var l in s)if((n=s[l]).direction===i&&(e[r=i+n.n+"axis"]||1!==n.n||(r=i+"axis"),e[r])){o=e[r].from,a=e[r].to;break}if(e[r]||(n="x"===i?t.getXAxes()[0]:t.getYAxes()[0],o=e[i+"1"],a=e[i+"2"]),null!=o&&null!=a&&o>a){var c=o;o=a,a=c}return{from:o,to:a,axis:n}}function g(){var e=t.getOptions().selection.minSize;return Math.abs(i.second.x-i.first.x)>=e&&Math.abs(i.second.y-i.first.y)>=e}t.clearSelection=f,t.setSelection=function(e,n){var o;"y"===p(t)?(i.first.x=0,i.second.x=t.width()):(o=m(e,"x"),i.first.x=o.axis.p2c(o.from),i.second.x=o.axis.p2c(o.to)),"x"===p(t)?(i.first.y=0,i.second.y=t.height()):(o=m(e,"y"),i.first.y=o.axis.p2c(o.from),i.second.y=o.axis.p2c(o.to)),i.show=!0,t.triggerRedrawOverlay(),!n&&g()&&c()},t.getSelection=l,t.hooks.bindEvents.push((function(e,t){null!=e.getOptions().selection.mode&&(e.addEventHandler("dragstart",r,t,0),e.addEventHandler("drag",a,t,0),e.addEventHandler("dragend",s,t,0))})),t.hooks.drawOverlay.push((function(t,n){if(i.show&&g()){var o=t.getPlotOffset(),a=t.getOptions();n.save(),n.translate(o.left,o.top);var r=e.color.parse(a.selection.color),s=a.selection.visualization,l=a.selection.displaySelectionDecorations,c=1;"fill"===s&&(c=.8),n.strokeStyle=r.scale("a",c).toString(),n.lineWidth=1,n.lineJoin=a.selection.shape,n.fillStyle=r.scale("a",.4).toString();var u=Math.min(i.first.x,i.second.x)+.5,h=u,d=Math.min(i.first.y,i.second.y)+.5,f=d,m=Math.abs(i.second.x-i.first.x)-1,x=Math.abs(i.second.y-i.first.y)-1;"x"===p(t)&&(x+=d,d=0),"y"===p(t)&&(m+=u,u=0),"fill"===s?(n.fillRect(u,d,m,x),n.strokeRect(u,d,m,x)):(n.fillRect(0,0,t.width(),t.height()),n.clearRect(u,d,m,x),l&&function(e,t,i,n,o,a,r,s){var l=Math.max(0,Math.min(15,n/2-2,o/2-2));e.fillStyle="#ffffff","xy"===s&&(e.beginPath(),e.moveTo(t,i+l),e.lineTo(t-3,i+l),e.lineTo(t-3,i-3),e.lineTo(t+l,i-3),e.lineTo(t+l,i),e.lineTo(t,i),e.closePath(),e.moveTo(t,i+o-l),e.lineTo(t-3,i+o-l),e.lineTo(t-3,i+o+3),e.lineTo(t+l,i+o+3),e.lineTo(t+l,i+o),e.lineTo(t,i+o),e.closePath(),e.moveTo(t+n,i+l),e.lineTo(t+n+3,i+l),e.lineTo(t+n+3,i-3),e.lineTo(t+n-l,i-3),e.lineTo(t+n-l,i),e.lineTo(t+n,i),e.closePath(),e.moveTo(t+n,i+o-l),e.lineTo(t+n+3,i+o-l),e.lineTo(t+n+3,i+o+3),e.lineTo(t+n-l,i+o+3),e.lineTo(t+n-l,i+o),e.lineTo(t+n,i+o),e.closePath(),e.stroke(),e.fill()),t=a,i=r,"x"===s&&(e.beginPath(),e.moveTo(t,i+15),e.lineTo(t,i-15),e.lineTo(t-3,i-15),e.lineTo(t-3,i+15),e.closePath(),e.moveTo(t+n,i+15),e.lineTo(t+n,i-15),e.lineTo(t+n+3,i-15),e.lineTo(t+n+3,i+15),e.closePath(),e.stroke(),e.fill()),"y"===s&&(e.beginPath(),e.moveTo(t-15,i),e.lineTo(t+15,i),e.lineTo(t+15,i-3),e.lineTo(t-15,i-3),e.closePath(),e.moveTo(t-15,i+o),e.lineTo(t+15,i+o),e.lineTo(t+15,i+o+3),e.lineTo(t-15,i+o+3),e.closePath(),e.stroke(),e.fill())}(n,u,d,m,x,h,f,p(t))),n.restore()}})),t.hooks.shutdown.push((function(e,t){t.unbind("dragstart",r),t.unbind("drag",a),t.unbind("dragend",s)}))},options:{selection:{mode:null,visualization:"focus",displaySelectionDecorations:!0,color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery),function(e){"use strict";var t=1,i=e.plot.browser,n=i.getPixelRatio;function o(e,o){var u=e.filter(a);t=n(o.getContext("2d"));var p=u.map((function(e){var t=new Image;return new Promise(function(e,t){return e.sourceDescription='<info className="'+t.className+'" tagName="'+t.tagName+'" id="'+t.id+'">',e.sourceComponent=t,function(n,o){e.onload=function(t){e.successfullyLoaded=!0,n(e)},e.onabort=function(t){e.successfullyLoaded=!1,console.log("Can't generate temp image from "+e.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",e.sourceComponent),n(e)},e.onerror=function(t){e.successfullyLoaded=!1,console.log("Can't generate temp image from "+e.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",e.sourceComponent),n(e)},function(e,t){"CANVAS"===e.tagName&&(n=e,t.src=n.toDataURL("image/png"));var n;"svg"===e.tagName&&function(e,t){i.isSafari()||i.isMobileSafari()?function(e,t){var i,n,o=s(r(document),e);o=l(o),n=function(e){var t="";const i=new Uint8Array(e);for(var n=0;n<i.length;n+=16384){t+=String.fromCharCode.apply(null,i.subarray(n,n+16384))}return t}(new(TextEncoder||TextEncoderLite)("utf-8").encode(o)),i="data:image/svg+xml;base64,"+btoa(n),t.src=i}(e,t):function(e,t){var i=s(r(document),e);i=l(i);var n=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),o=(self.URL||self.webkitURL||self).createObjectURL(n);t.src=o}(e,t)}(e,t);t.srcImgTagName=e.tagName,function(e,t){t.genLeft=e.getBoundingClientRect().left,t.genTop=e.getBoundingClientRect().top,"CANVAS"===e.tagName&&(t.genRight=t.genLeft+e.width,t.genBottom=t.genTop+e.height);"svg"===e.tagName&&(t.genRight=e.getBoundingClientRect().right,t.genBottom=e.getBoundingClientRect().bottom)}(e,t)}(t,e)}}(t,e))}));return Promise.all(p).then(function(e){return function(i){return function(e,i){var n=function(e,i){var n=0;if(0===e.length)n=-1;else{var o=e[0].genLeft,a=e[0].genTop,r=e[0].genRight,s=e[0].genBottom,l=0;for(l=1;l<e.length;l++)o>e[l].genLeft&&(o=e[l].genLeft),a>e[l].genTop&&(a=e[l].genTop);for(l=1;l<e.length;l++)r<e[l].genRight&&(r=e[l].genRight),s<e[l].genBottom&&(s=e[l].genBottom);if(r-o<=0||s-a<=0)n=-2;else{for(i.width=Math.round(r-o),i.height=Math.round(s-a),l=0;l<e.length;l++)e[l].xCompOffset=e[l].genLeft-o,e[l].yCompOffset=e[l].genTop-a;!function(e,i){void 0!==i.find((function(e){return"svg"===e.srcImgTagName}))&&t<1&&(e.width=e.width*t,e.height=e.height*t)}(i,e)}}return n}(e,i);if(0===n)for(var o=i.getContext("2d"),a=0;a<e.length;a++)!0===e[a].successfullyLoaded&&o.drawImage(e[a],e[a].xCompOffset*t,e[a].yCompOffset*t);return n}(i,e)}}(o),c)}function a(e){var t=!0,i=!0;return null==e?i=!1:"CANVAS"===e.tagName&&(e.getBoundingClientRect().right!==e.getBoundingClientRect().left&&e.getBoundingClientRect().bottom!==e.getBoundingClientRect().top||(t=!1)),i&&t&&"visible"===window.getComputedStyle(e).visibility}function r(e){for(var t=e.styleSheets,i=[],n=0;n<t.length;n++)try{for(var o=t[n].cssRules||[],a=0;a<o.length;a++){var r=o[a];i.push(r.cssText)}}catch(e){console.log("Failed to get some css rules")}return i}function s(e,i){return['<svg class="snapshot '+i.classList+'" width="'+i.width.baseVal.value*t+'" height="'+i.height.baseVal.value*t+'" viewBox="0 0 '+i.width.baseVal.value+" "+i.height.baseVal.value+'" xmlns="http://www.w3.org/2000/svg">',"<style>","/* <![CDATA[ */",e.join("\n"),"/* ]]> */","</style>",i.innerHTML,"</svg>"].join("\n")}function l(e){var t="";return e.match(/^<svg[^>]+xmlns="http:\/\/www\.w3\.org\/2000\/svg"/)||(t=e.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"')),e.match(/^<svg[^>]+"http:\/\/www\.w3\.org\/1999\/xlink"/)||(t=e.replace(/^<svg/,'<svg xmlns:xlink="http://www.w3.org/1999/xlink"')),'<?xml version="1.0" standalone="no"?>\r\n'+t}function c(){return-100}e.plot.composeImages=o,e.plot.plugins.push({init:function(e){e.composeImages=o},name:"composeImages",version:"1.0"})}(jQuery),function(e){function t(e){var t="",i=e.name,n=e.xPos,o=e.yPos,a=e.fillColor,r=e.strokeColor,s=e.strokeWidth;switch(i){case"circle":t='<use xlink:href="#circle" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"diamond":t='<use xlink:href="#diamond" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"cross":t='<use xlink:href="#cross" class="legendIcon" x="'+n+'" y="'+o+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"rectangle":t='<use xlink:href="#rectangle" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"plus":t='<use xlink:href="#plus" class="legendIcon" x="'+n+'" y="'+o+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"bar":t='<use xlink:href="#bars" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" width="1.5em" height="1.5em"/>';break;case"area":t='<use xlink:href="#area" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" width="1.5em" height="1.5em"/>';break;case"line":t='<use xlink:href="#line" class="legendIcon" x="'+n+'" y="'+o+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;default:t='<use xlink:href="#circle" class="legendIcon" x="'+n+'" y="'+o+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>'}return t}var i='<defs><symbol id="line" fill="none" viewBox="-5 -5 25 25"><polyline points="0,15 5,5 10,10 15,0"/></symbol><symbol id="area" stroke-width="1" viewBox="-5 -5 25 25"><polyline points="0,15 5,5 10,10 15,0, 15,15, 0,15"/></symbol><symbol id="bars" stroke-width="1" viewBox="-5 -5 25 25"><polyline points="1.5,15.5 1.5,12.5, 4.5,12.5 4.5,15.5 6.5,15.5 6.5,3.5, 9.5,3.5 9.5,15.5 11.5,15.5 11.5,7.5 14.5,7.5 14.5,15.5 1.5,15.5"/></symbol><symbol id="circle" viewBox="-5 -5 25 25"><circle cx="0" cy="15" r="2.5"/><circle cx="5" cy="5" r="2.5"/><circle cx="10" cy="10" r="2.5"/><circle cx="15" cy="0" r="2.5"/></symbol><symbol id="rectangle" viewBox="-5 -5 25 25"><rect x="-2.1" y="12.9" width="4.2" height="4.2"/><rect x="2.9" y="2.9" width="4.2" height="4.2"/><rect x="7.9" y="7.9" width="4.2" height="4.2"/><rect x="12.9" y="-2.1" width="4.2" height="4.2"/></symbol><symbol id="diamond" viewBox="-5 -5 25 25"><path d="M-3,15 L0,12 L3,15, L0,18 Z"/><path d="M2,5 L5,2 L8,5, L5,8 Z"/><path d="M7,10 L10,7 L13,10, L10,13 Z"/><path d="M12,0 L15,-3 L18,0, L15,3 Z"/></symbol><symbol id="cross" fill="none" viewBox="-5 -5 25 25"><path d="M-2.1,12.9 L2.1,17.1, M2.1,12.9 L-2.1,17.1 Z"/><path d="M2.9,2.9 L7.1,7.1 M7.1,2.9 L2.9,7.1 Z"/><path d="M7.9,7.9 L12.1,12.1 M12.1,7.9 L7.9,12.1 Z"/><path d="M12.9,-2.1 L17.1,2.1 M17.1,-2.1 L12.9,2.1 Z"/></symbol><symbol id="plus" fill="none" viewBox="-5 -5 25 25"><path d="M0,12 L0,18, M-3,15 L3,15 Z"/><path d="M5,2 L5,8 M2,5 L8,5 Z"/><path d="M10,7 L10,13 M7,10 L13,10 Z"/><path d="M15,-3 L15,3 M12,0 L18,0 Z"/></symbol></defs>';function n(e,t){for(var i in e)if(e.hasOwnProperty(i)&&e[i]!==t[i])return!0;return!1}e.plot.plugins.push({init:function(o){o.hooks.setupGrid.push((function(o){var a=o.getOptions(),r=o.getData(),s=a.legend.labelFormatter,l=a.legend.legendEntries,c=a.legend.plotOffset,u=function(t,i,n){var o=i,a=t.reduce((function(e,t,i){var n=o?o(t.label,t):t.label;if(!t.hasOwnProperty("label")||n){var a={label:n||"Plot "+(i+1),color:t.color,options:{lines:t.lines,points:t.points,bars:t.bars}};e.push(a)}return e}),[]);if(n)if(e.isFunction(n))a.sort(n);else if("reverse"===n)a.reverse();else{var r="descending"!==n;a.sort((function(e,t){return e.label===t.label?0:e.label<t.label!==r?1:-1}))}return a}(r,s,a.legend.sorted),p=o.getPlotOffset();(function(e,t){if(!e||!t)return!0;if(e.length!==t.length)return!0;var i,o,a;for(i=0;i<t.length;i++){if(o=t[i],a=e[i],o.label!==a.label)return!0;if(o.color!==a.color)return!0;if(n(o.options.lines,a.options.lines))return!0;if(n(o.options.points,a.options.points))return!0;if(n(o.options.bars,a.options.bars))return!0}return!1}(l,u)||n(c,p))&&function(n,o,a,r){if(null!=o.legend.container?e(o.legend.container).html(""):a.find(".legend").remove(),o.legend.show){var s,l,c,u,p=o.legend.legendEntries=r,h=o.legend.plotOffset=n.getPlotOffset(),d=[],f=0,m="",g=o.legend.position,x=o.legend.margin,v={name:"",label:"",xPos:"",yPos:""};d[f++]='<svg class="legendLayer" style="width:inherit;height:inherit;">',d[f++]='<rect class="background" width="100%" height="100%"/>',d[f++]=i;var b=0,y=[],w=window.getComputedStyle(document.querySelector("body"));for(u=0;u<p.length;++u){let e=u%o.legend.noColumns;s=p[u],v.label=s.label;var k=n.getSurface().getTextInfo("",v.label,{style:w.fontStyle,variant:w.fontVariant,weight:w.fontWeight,size:parseInt(w.fontSize),lineHeight:parseInt(w.lineHeight),family:w.fontFamily}).width;y[e]?k>y[e]&&(y[e]=k+48):y[e]=k+48}for(u=0;u<p.length;++u){let e=u%o.legend.noColumns;s=p[u],c="",v.label=s.label,v.xPos=b+3+"px",b+=y[e],(u+1)%o.legend.noColumns==0&&(b=0),v.yPos=1.5*Math.floor(u/o.legend.noColumns)+"em",s.options.lines.show&&s.options.lines.fill&&(v.name="area",v.fillColor=s.color,c+=t(v)),s.options.bars.show&&(v.name="bar",v.fillColor=s.color,c+=t(v)),s.options.lines.show&&!s.options.lines.fill&&(v.name="line",v.strokeColor=s.color,v.strokeWidth=s.options.lines.lineWidth,c+=t(v)),s.options.points.show&&(v.name=s.options.points.symbol,v.strokeColor=s.color,v.fillColor=s.options.points.fillColor,v.strokeWidth=s.options.points.lineWidth,c+=t(v)),l='<text x="'+v.xPos+'" y="'+v.yPos+'" text-anchor="start"><tspan dx="2em" dy="1.2em">'+v.label+"</tspan></text>",d[f++]="<g>"+c+l+"</g>"}d[f++]="</svg>",null==x[0]&&(x=[x,x]),"n"===g.charAt(0)?m+="top:"+(x[1]+h.top)+"px;":"s"===g.charAt(0)&&(m+="bottom:"+(x[1]+h.bottom)+"px;"),"e"===g.charAt(1)?m+="right:"+(x[0]+h.right)+"px;":"w"===g.charAt(1)&&(m+="left:"+(x[0]+h.left)+"px;");var T=6;for(u=0;u<y.length;++u)T+=y[u];var M,S=1.6*Math.ceil(p.length/o.legend.noColumns);o.legend.container?(M=e(d.join("")).appendTo(o.legend.container)[0],o.legend.container.style.width=T+"px",o.legend.container.style.height=S+"em"):((M=e('<div class="legend" style="position:absolute;'+m+'">'+d.join("")+"</div>").appendTo(a)).css("width",T+"px"),M.css("height",S+"em"),M.css("pointerEvents","none"))}}(o,a,o.getPlaceholder(),u)}))},options:{legend:{show:!1,noColumns:1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery),function(e){function t(e,t,i){var n=e.getPlotOffset();if(i.images&&i.images.show)for(var o=i.datapoints.points,a=i.datapoints.pointsize,r=0;r<o.length;r+=a){var s,l=o[r],c=o[r+1],u=o[r+2],p=o[r+3],h=o[r+4],d=i.xaxis,f=i.yaxis;if(!(!l||l.width<=0||l.height<=0)&&(c>p&&(s=p,p=c,c=s),u>h&&(s=h,h=u,u=s),"center"===i.images.anchor&&(c-=s=.5*(p-c)/(l.width-1),p+=s,u-=s=.5*(h-u)/(l.height-1),h+=s),!(c===p||u===h||c>=d.max||p<=d.min||u>=f.max||h<=f.min))){var m=0,g=0,x=l.width,v=l.height;c<d.min&&(m+=(x-m)*(d.min-c)/(p-c),c=d.min),p>d.max&&(x+=(x-m)*(d.max-p)/(p-c),p=d.max),u<f.min&&(v+=(g-v)*(f.min-u)/(h-u),u=f.min),h>f.max&&(g+=(g-v)*(f.max-h)/(h-u),h=f.max),(c=d.p2c(c))>(p=d.p2c(p))&&(s=p,p=c,c=s),(u=f.p2c(u))>(h=f.p2c(h))&&(s=h,h=u,u=s),s=t.globalAlpha,t.globalAlpha*=i.images.alpha,t.drawImage(l,m,g,x-m,v-g,c+n.left,u+n.top,p-c,h-u),t.globalAlpha=s}}}function i(e,t,i,n){t.images.show&&(n.format=[{required:!0},{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0},{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0}])}e.plot.image={},e.plot.image.loadDataImages=function(t,i,n){var o=[],a=[],r=i.series.images.show;e.each(t,(function(t,i){(r||i.images.show)&&(i.data&&(i=i.data),e.each(i,(function(e,t){"string"==typeof t[0]&&(o.push(t[0]),a.push(t))})))})),e.plot.image.load(o,(function(t){e.each(a,(function(e,i){var n=i[0];t[n]&&(i[0]=t[n])})),n()}))},e.plot.image.load=function(t,i){var n=t.length,o={};0===n&&i({}),e.each(t,(function(t,a){var r=function(){--n,o[a]=this,0===n&&i(o)};e("<img />").load(r).error(r).attr("src",a)}))},e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(i),e.hooks.drawSeries.push(t)},options:{series:{images:{show:!1,alpha:1,anchor:"corner"}}},name:"image",version:"1.1"})}(jQuery),jQuery.plot.plugins.push({init:function(e){var t={x:-1,y:-1,locked:!1,highlighted:!1};function i(i){t.locked||-1!==t.x&&(t.x=-1,e.triggerRedrawOverlay())}function n(i){var n=e.offset();if(t.locked){var o=Math.max(0,Math.min(i.pageX-n.left,e.width())),a=Math.max(0,Math.min(i.pageY-n.top,e.height()));o>t.x-4&&o<t.x+4&&a>t.y-4&&a<t.y+4?t.highlighted||(t.highlighted=!0,e.triggerRedrawOverlay()):t.highlighted&&(t.highlighted=!1,e.triggerRedrawOverlay())}else e.getSelection&&e.getSelection()?t.x=-1:(t.x=Math.max(0,Math.min(i.pageX-n.left,e.width())),t.y=Math.max(0,Math.min(i.pageY-n.top,e.height())),e.triggerRedrawOverlay())}e.setCrosshair=function(i){if(i){var n=e.p2c(i);t.x=Math.max(0,Math.min(n.left,e.width())),t.y=Math.max(0,Math.min(n.top,e.height()))}else t.x=-1;e.triggerRedrawOverlay()},e.clearCrosshair=e.setCrosshair,e.lockCrosshair=function(i){i&&e.setCrosshair(i),t.locked=!0},e.unlockCrosshair=function(){t.locked=!1,t.rect=null},e.hooks.bindEvents.push((function(e,t){e.getOptions().crosshair.mode&&(t.mouseout(i),t.mousemove(n))})),e.hooks.drawOverlay.push((function(e,i){var n=e.getOptions().crosshair;if(n.mode){var o=e.getPlotOffset();if(i.save(),i.translate(o.left,o.top),-1!==t.x){var a=e.getOptions().crosshair.lineWidth%2?.5:0;if(i.strokeStyle=n.color,i.lineWidth=n.lineWidth,i.lineJoin="round",i.beginPath(),-1!==n.mode.indexOf("x")){var r=Math.floor(t.x)+a;i.moveTo(r,0),i.lineTo(r,e.height())}if(-1!==n.mode.indexOf("y")){var s=Math.floor(t.y)+a;i.moveTo(0,s),i.lineTo(e.width(),s)}t.locked&&(t.highlighted?i.fillStyle="orange":i.fillStyle=n.color,i.fillRect(Math.floor(t.x)+a-4,Math.floor(t.y)+a-4,8,8)),i.stroke()}i.restore()}})),e.hooks.shutdown.push((function(e,t){t.unbind("mouseout",i),t.unbind("mousemove",n)}))},options:{crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}},name:"crosshair",version:"1.0"}),function(e){var t={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(e,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:function(t){var i=null,n=null,o=null,a=null,r=null,s=null,l=!1,c=null,u=[];function p(t,a,r){l||(l=!0,i=t.getCanvas(),n=e(i).parent(),o=t.getOptions(),t.setData(function(t){var i,n,a=0,r=0,s=0,l=o.series.pie.combine.color,c=[];for(i=0;i<t.length;++i)n=t[i].data,e.isArray(n)&&1===n.length&&(n=n[0]),e.isArray(n)?!isNaN(parseFloat(n[1]))&&isFinite(n[1])?n[1]=+n[1]:n[1]=0:n=!isNaN(parseFloat(n))&&isFinite(n)?[1,+n]:[1,0],t[i].data=[n];for(i=0;i<t.length;++i)a+=t[i].data[0][1];for(i=0;i<t.length;++i)(n=t[i].data[0][1])/a<=o.series.pie.combine.threshold&&(r+=n,s++,l||(l=t[i].color));for(i=0;i<t.length;++i)n=t[i].data[0][1],(s<2||n/a>o.series.pie.combine.threshold)&&c.push(e.extend(t[i],{data:[[1,n]],color:t[i].color,label:t[i].label,angle:n*Math.PI*2/a,percent:n/(a/100)}));s>1&&c.push({data:[[1,r]],color:l,label:o.series.pie.combine.label,angle:r*Math.PI*2/a,percent:r/(a/100)});return c}(t.getData())))}function h(t,i){if(n){var u=t.getPlaceholder().width(),p=t.getPlaceholder().height(),h=n.children().filter(".legend").children().width()||0;c=i,l=!1,a=Math.min(u,p/o.series.pie.tilt)/2,s=p/2+o.series.pie.offset.top,r=u/2,"auto"===o.series.pie.offset.left?(o.legend.position.match("w")?r+=h/2:r-=h/2,r<a?r=a:r>u-a&&(r=u-a)):r+=o.series.pie.offset.left;var f=t.getData(),m=0;do{m>0&&(a*=.95),m+=1,g(),o.series.pie.tilt<=.8&&x()}while(!v()&&m<10);m>=10&&(g(),n.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),t.setSeries&&t.insertLegend&&(t.setSeries(f),t.insertLegend())}function g(){c.clearRect(0,0,u,p),n.children().filter(".pieLabel, .pieLabelBackground").remove()}function x(){var e=o.series.pie.shadow.left,t=o.series.pie.shadow.top,i=o.series.pie.shadow.alpha,n=o.series.pie.radius>1?o.series.pie.radius:a*o.series.pie.radius;if(!(n>=u/2-e||n*o.series.pie.tilt>=p/2-t||n<=10)){c.save(),c.translate(e,t),c.globalAlpha=i,c.fillStyle="#000",c.translate(r,s),c.scale(1,o.series.pie.tilt);for(var l=1;l<=10;l++)c.beginPath(),c.arc(0,0,n,0,2*Math.PI,!1),c.fill(),n-=l;c.restore()}}function v(){var t,i=Math.PI*o.series.pie.startAngle,l=o.series.pie.radius>1?o.series.pie.radius:a*o.series.pie.radius;c.save(),c.translate(r,s),c.scale(1,o.series.pie.tilt),c.save();var h=i;for(t=0;t<f.length;++t)f[t].startAngle=h,m(f[t].angle,f[t].color,!0);if(c.restore(),o.series.pie.stroke.width>0){for(c.save(),c.lineWidth=o.series.pie.stroke.width,h=i,t=0;t<f.length;++t)m(f[t].angle,o.series.pie.stroke.color,!1);c.restore()}return d(c),c.restore(),!o.series.pie.label.show||function(){for(var t=i,l=o.series.pie.label.radius>1?o.series.pie.label.radius:a*o.series.pie.label.radius,c=0;c<f.length;++c){if(f[c].percent>=100*o.series.pie.label.threshold&&!h(f[c],t,c))return!1;t+=f[c].angle}return!0;function h(t,i,a){if(0===t.data[0][1])return!0;var c,h=o.legend.labelFormatter,d=o.series.pie.label.formatter;c=h?h(t.label,t):t.label,d&&(c=d(c,t));var f=(i+t.angle+i)/2,m=r+Math.round(Math.cos(f)*l),g=s+Math.round(Math.sin(f)*l)*o.series.pie.tilt,x="<span class='pieLabel' id='pieLabel"+a+"' style='position:absolute;top:"+g+"px;left:"+m+"px;'>"+c+"</span>";n.append(x);var v=n.children("#pieLabel"+a),b=g-v.height()/2,y=m-v.width()/2;if(v.css("top",b),v.css("left",y),0-b>0||0-y>0||p-(b+v.height())<0||u-(y+v.width())<0)return!1;if(0!==o.series.pie.label.background.opacity){var w=o.series.pie.label.background.color;null==w&&(w=t.color);var k="top:"+b+"px;left:"+y+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+v.width()+"px;height:"+v.height()+"px;"+k+"background-color:"+w+";'></div>").css("opacity",o.series.pie.label.background.opacity).insertBefore(v)}return!0}}();function m(e,t,i){e<=0||isNaN(e)||(i?c.fillStyle=t:(c.strokeStyle=t,c.lineJoin="round"),c.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&c.moveTo(0,0),c.arc(0,0,l,h,h+e/2,!1),c.arc(0,0,l,h+e/2,h+e,!1),c.closePath(),h+=e,i?c.fill():c.stroke())}}}function d(e){if(o.series.pie.innerRadius>0){e.save();var t=o.series.pie.innerRadius>1?o.series.pie.innerRadius:a*o.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=o.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=o.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function f(e,t){for(var i=!1,n=-1,o=e.length,a=o-1;++n<o;a=n)(e[n][1]<=t[1]&&t[1]<e[a][1]||e[a][1]<=t[1]&&t[1]<e[n][1])&&t[0]<(e[a][0]-e[n][0])*(t[1]-e[n][1])/(e[a][1]-e[n][1])+e[n][0]&&(i=!i);return i}function m(e){x("plothover",e)}function g(e){x("plotclick",e)}function x(e,i){var l=t.offset(),p=function(e,i){for(var n,o,l=t.getData(),u=t.getOptions(),p=u.series.pie.radius>1?u.series.pie.radius:a*u.series.pie.radius,h=0;h<l.length;++h){var d=l[h];if(d.pie.show){if(c.save(),c.beginPath(),c.moveTo(0,0),c.arc(0,0,p,d.startAngle,d.startAngle+d.angle/2,!1),c.arc(0,0,p,d.startAngle+d.angle/2,d.startAngle+d.angle,!1),c.closePath(),n=e-r,o=i-s,c.isPointInPath){if(c.isPointInPath(e-r,i-s))return c.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:h}}else if(f([[0,0],[p*Math.cos(d.startAngle),p*Math.sin(d.startAngle)],[p*Math.cos(d.startAngle+d.angle/4),p*Math.sin(d.startAngle+d.angle/4)],[p*Math.cos(d.startAngle+d.angle/2),p*Math.sin(d.startAngle+d.angle/2)],[p*Math.cos(d.startAngle+d.angle/1.5),p*Math.sin(d.startAngle+d.angle/1.5)],[p*Math.cos(d.startAngle+d.angle),p*Math.sin(d.startAngle+d.angle)]],[n,o]))return c.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:h};c.restore()}}return null}(parseInt(i.pageX-l.left),parseInt(i.pageY-l.top));if(o.grid.autoHighlight)for(var h=0;h<u.length;++h){var d=u[h];d.auto!==e||p&&d.series===p.series||v(d.series)}p&&function(e,i){var n=b(e);-1===n?(u.push({series:e,auto:i}),t.triggerRedrawOverlay()):i||(u[n].auto=!1)}(p.series,e);var m={pageX:i.pageX,pageY:i.pageY};n.trigger(e,[m,p])}function v(e){null==e&&(u=[],t.triggerRedrawOverlay());var i=b(e);-1!==i&&(u.splice(i,1),t.triggerRedrawOverlay())}function b(e){for(var t=0;t<u.length;++t){if(u[t].series===e)return t}return-1}t.hooks.processOptions.push((function(e,t){t.series.pie.show&&(t.grid.show=!1,"auto"===t.series.pie.label.show&&(t.legend.show?t.series.pie.label.show=!1:t.series.pie.label.show=!0),"auto"===t.series.pie.radius&&(t.series.pie.label.show?t.series.pie.radius=3/4:t.series.pie.radius=1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))})),t.hooks.bindEvents.push((function(e,t){var i=e.getOptions();i.series.pie.show&&(i.grid.hoverable&&(t.unbind("mousemove").mousemove(m),t.bind("mouseleave",m)),i.grid.clickable&&t.unbind("click").click(g))})),t.hooks.shutdown.push((function(e,t){t.unbind("mousemove",m),t.unbind("mouseleave",m),t.unbind("click",g),u=[]})),t.hooks.processDatapoints.push((function(e,t,i,n){e.getOptions().series.pie.show&&p(e,t,i)})),t.hooks.drawOverlay.push((function(e,t){e.getOptions().series.pie.show&&function(e,t){var i=e.getOptions(),n=i.series.pie.radius>1?i.series.pie.radius:a*i.series.pie.radius;t.save(),t.translate(r,s),t.scale(1,i.series.pie.tilt);for(var o=0;o<u.length;++o)l(u[o].series);function l(e){e.angle<=0||isNaN(e.angle)||(t.fillStyle="rgba(255, 255, 255, "+i.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&t.moveTo(0,0),t.arc(0,0,n,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,n,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill())}d(t),t.restore()}(e,t)})),t.hooks.draw.push((function(e,t){e.getOptions().series.pie.show&&h(e,t)}))},options:t,name:"pie",version:"1.1"})}(jQuery),function(e,t,i){var n,o=[],a=e.resize=e.extend(e.resize,{}),r=!1,s="setTimeout",l="resize",c=l+"-special-event",u="pendingDelay",p="activeDelay",h="throttleWindow";function d(i){!0===r&&(r=i||1);for(var s=o.length-1;s>=0;s--){var p=e(o[s]);if(p[0]==t||p.is(":visible")){var h=p.width(),f=p.height(),m=p.data(c);!m||h===m.w&&f===m.h||(p.trigger(l,[m.w=h,m.h=f]),r=i||!0)}else(m=p.data(c)).w=0,m.h=0}null!==n&&(r&&(null==i||i-r<1e3)?n=t.requestAnimationFrame(d):(n=setTimeout(d,a[u]),r=!1))}a[u]=200,a[p]=20,a[h]=!0,e.event.special[l]={setup:function(){if(!a[h]&&this[s])return!1;var t=e(this);o.push(this),t.data(c,{w:t.width(),h:t.height()}),1===o.length&&(n=i,d())},teardown:function(){if(!a[h]&&this[s])return!1;for(var t=e(this),i=o.length-1;i>=0;i--)if(o[i]==this){o.splice(i,1);break}t.removeData(c),o.length||(r?cancelAnimationFrame(n):clearTimeout(n),n=null)},add:function(t){if(!a[h]&&this[s])return!1;var n;function o(t,o,a){var r=e(this),s=r.data(c)||{};s.w=o!==i?o:r.width(),s.h=a!==i?a:r.height(),n.apply(this,arguments)}if(e.isFunction(t))return n=t,o;n=t.handler,t.handler=o}},t.requestAnimationFrame||(t.requestAnimationFrame=t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,i){return t.setTimeout((function(){e((new Date).getTime())}),a[p])}),t.cancelAnimationFrame||(t.cancelAnimationFrame=t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout)}(jQuery,window),jQuery.plot.plugins.push({init:function(e){function t(){var t=e.getPlaceholder();0!==t.width()&&0!==t.height()&&(e.resize(),e.setupGrid(),e.draw())}e.hooks.bindEvents.push((function(e,i){e.getPlaceholder().resize(t)})),e.hooks.shutdown.push((function(e,i){e.getPlaceholder().unbind("resize",t)}))},options:{},name:"resize",version:"1.0"}),function(e){e.plot.plugins.push({init:function(t){function i(t,i,n,o,a){var r,s,l,c,u,p=n.pointsize,h=e.extend({},i);h.datapoints={points:[],pointsize:p,format:n.format},h.label=null,h.color=a,h.threshold=null,h.originSeries=i,h.data=[];var d,f=n.points,m=i.lines.show,g=[],x=[];for(r=0;r<f.length;r+=p){if(s=f[r],u=c,c=(l=f[r+1])<o?g:x,m&&u!==c&&null!==s&&r>0&&null!=f[r-p]){var v=s+(o-l)*(s-f[r-p])/(l-f[r-p+1]);for(u.push(v),u.push(o),d=2;d<p;++d)u.push(f[r+d]);for(c.push(null),c.push(null),d=2;d<p;++d)c.push(f[r+d]);for(c.push(v),c.push(o),d=2;d<p;++d)c.push(f[r+d])}for(c.push(s),c.push(l),d=2;d<p;++d)c.push(f[r+d])}if(n.points=x,h.datapoints.points=g,h.datapoints.points.length>0){var b=e.inArray(i,t.getData());t.getData().splice(b+1,0,h)}}t.hooks.processDatapoints.push((function(t,n,o){n.threshold&&(n.threshold instanceof Array?(n.threshold.sort((function(e,t){return e.below-t.below})),e(n.threshold).each((function(e,a){i(t,n,o,a.below,a.color)}))):i(t,n,o,n.threshold.below,n.threshold.color))}))},options:{series:{threshold:null}},name:"threshold",version:"1.2"})}(jQuery),function(e){var t={tooltip:{show:!1,cssClass:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,snap:!0,lines:!1,clickTips:!1,onHover:function(e,t){},$compat:!1}};t.tooltipOpts=t.tooltip;var i=function(e){this.tipPosition={x:0,y:0},this.init(e)};i.prototype.init=function(t){var i=this,n=e.plot.plugins.length;if(this.plotPlugins=[],n)for(var o=0;o<n;o++)this.plotPlugins.push(e.plot.plugins[o].name);function a(e){var i={};i.x=e.pageX,i.y=e.pageY,t.setTooltipPosition(i)}function r(n,o,a){i.clickmode?(e(t.getPlaceholder()).bind("plothover",s),t.hideTooltip(),i.clickmode=!1):(s(n,o,a),i.getDomElement().is(":visible")&&(e(t.getPlaceholder()).unbind("plothover",s),i.clickmode=!0))}function s(n,o,a){var r=function(e,t,i,n){return Math.sqrt((i-e)*(i-e)+(n-t)*(n-t))};if(a)t.showTooltip(a,i.tooltipOptions.snap?a:o);else if(i.plotOptions.series.lines.show&&!0===i.tooltipOptions.lines){var s=i.plotOptions.grid.mouseActiveRadius,l={distance:s+1},c=o;e.each(t.getData(),(function(e,n){for(var a=0,s=-1,u=1;u<n.data.length;u++)n.data[u-1][0]<=o.x&&n.data[u][0]>=o.x&&(a=u-1,s=u);if(-1!==s){var p={x:n.data[a][0],y:n.data[a][1]},h={x:n.data[s][0],y:n.data[s][1]},d=function(e,t,i,n,o,a,s){if(!s||(s=function(e,t,i,n,o,a){if(void 0!==i)return{x:i,y:t};if(void 0!==n)return{x:e,y:n};var r,s=-1/((a-n)/(o-i));return{x:r=(o*(e*s-t+n)+i*(e*-s+t-a))/(s*(o-i)+n-a),y:s*r-s*e+t}}(e,t,i,n,o,a)).x>=Math.min(i,o)&&s.x<=Math.max(i,o)&&s.y>=Math.min(n,a)&&s.y<=Math.max(n,a)){var l=n-a,c=o-i,u=i*a-n*o;return Math.abs(l*e+c*t+u)/Math.sqrt(l*l+c*c)}var p=r(e,t,i,n),h=r(e,t,o,a);return p>h?h:p}(n.xaxis.p2c(o.x),n.yaxis.p2c(o.y),n.xaxis.p2c(p.x),n.yaxis.p2c(p.y),n.xaxis.p2c(h.x),n.yaxis.p2c(h.y),!1);if(d<l.distance){var f=r(p.x,p.y,o.x,o.y)<r(o.x,o.y,h.x,h.y)?a:s,m=(n.datapoints.pointsize,[o.x,p.y+(h.y-p.y)*((o.x-p.x)/(h.x-p.x))]);l={distance:d,item:{datapoint:m,dataIndex:f,series:n,seriesIndex:e}},i.tooltipOptions.snap&&(c={pageX:n.xaxis.p2c(m[0]),pageY:n.yaxis.p2c(m[1])})}}else t.hideTooltip()})),l.distance<s+1?t.showTooltip(l.item,c):t.hideTooltip()}else t.hideTooltip()}t.hooks.bindEvents.push((function(t,n){if(i.plotOptions=t.getOptions(),"boolean"==typeof i.plotOptions.tooltip&&(i.plotOptions.tooltipOpts.show=i.plotOptions.tooltip,i.plotOptions.tooltip=i.plotOptions.tooltipOpts,delete i.plotOptions.tooltipOpts),!1!==i.plotOptions.tooltip.show&&void 0!==i.plotOptions.tooltip.show){i.tooltipOptions=i.plotOptions.tooltip,i.tooltipOptions.$compat?(i.wfunc="width",i.hfunc="height"):(i.wfunc="innerWidth",i.hfunc="innerHeight");i.getDomElement();e(t.getPlaceholder()).bind("plothover",s),i.tooltipOptions.clickTips&&e(t.getPlaceholder()).bind("plotclick",r),i.clickmode=!1,e(n).bind("mousemove",a)}})),t.hooks.shutdown.push((function(t,i){e(t.getPlaceholder()).unbind("plothover",s),e(t.getPlaceholder()).unbind("plotclick",r),t.removeTooltip(),e(i).unbind("mousemove",a)})),t.setTooltipPosition=function(t){var n=i.getDomElement(),o=n.outerWidth()+i.tooltipOptions.shifts.x,a=n.outerHeight()+i.tooltipOptions.shifts.y;t.x-e(window).scrollLeft()>e(window)[i.wfunc]()-o&&(t.x-=o,t.x=Math.max(t.x,0)),t.y-e(window).scrollTop()>e(window)[i.hfunc]()-a&&(t.y-=a),isNaN(t.x)?i.tipPosition.x=i.tipPosition.xPrev:(i.tipPosition.x=t.x,i.tipPosition.xPrev=t.x),isNaN(t.y)?i.tipPosition.y=i.tipPosition.yPrev:(i.tipPosition.y=t.y,i.tipPosition.yPrev=t.y)},t.showTooltip=function(e,n,o){var a=i.getDomElement(),r=i.stringFormat(i.tooltipOptions.content,e);""!==r&&(a.html(r),t.setTooltipPosition({x:i.tipPosition.x,y:i.tipPosition.y}),a.css({left:i.tipPosition.x+i.tooltipOptions.shifts.x,top:i.tipPosition.y+i.tooltipOptions.shifts.y}).show(),"function"==typeof i.tooltipOptions.onHover&&i.tooltipOptions.onHover(e,a))},t.hideTooltip=function(){i.getDomElement().hide().html("")},t.removeTooltip=function(){i.getDomElement().remove()}},i.prototype.getDomElement=function(){var t=e("<div>");return this.tooltipOptions&&this.tooltipOptions.cssClass&&0===(t=e("."+this.tooltipOptions.cssClass)).length&&((t=e("<div />").addClass(this.tooltipOptions.cssClass)).appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&t.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),t},i.prototype.stringFormat=function(e,t){var i,n,o,a,r,s=/%s/,l=/%c/,c=/%lx/,u=/%ly/,p=/%x\.{0,1}(\d{0,})/,h=/%y\.{0,1}(\d{0,})/;if(void 0!==t.series.threshold?(i=t.datapoint[0],n=t.datapoint[1],o=t.datapoint[2]):void 0!==t.series.curvedLines?(i=t.datapoint[0],n=t.datapoint[1]):void 0!==t.series.lines&&t.series.lines.steps?(i=t.series.datapoints.points[2*t.dataIndex],n=t.series.datapoints.points[2*t.dataIndex+1],o=""):(i=t.series.data[t.dataIndex][0],n=t.series.data[t.dataIndex][1],o=t.series.data[t.dataIndex][2]),null===t.series.label&&t.series.originSeries&&(t.series.label=t.series.originSeries.label),"function"==typeof e&&(e=e(t.series.label,i,n,t)),"boolean"==typeof e&&!e)return"";if(o&&(e=e.replace("%ct",o)),void 0!==t.series.percent?a=t.series.percent:void 0!==t.series.percents&&(a=t.series.percents[t.dataIndex]),"number"==typeof a&&(e=this.adjustValPrecision(/%p\.{0,1}(\d{0,})/,e,a)),t.series.hasOwnProperty("pie")&&void 0!==t.series.data[0][1]&&(r=t.series.data[0][1]),"number"==typeof r&&(e=e.replace("%n",r)),e=void 0!==t.series.label?e.replace(s,t.series.label):e.replace(s,""),e=void 0!==t.series.color?e.replace(l,t.series.color):e.replace(l,""),e=this.hasAxisLabel("xaxis",t)?e.replace(c,t.series.xaxis.options.axisLabel):e.replace(c,""),e=this.hasAxisLabel("yaxis",t)?e.replace(u,t.series.yaxis.options.axisLabel):e.replace(u,""),this.isTimeMode("xaxis",t)&&this.isXDateFormat(t)&&(e=e.replace(p,this.timestampToDate(i,this.tooltipOptions.xDateFormat,t.series.xaxis.options))),this.isTimeMode("yaxis",t)&&this.isYDateFormat(t)&&(e=e.replace(h,this.timestampToDate(n,this.tooltipOptions.yDateFormat,t.series.yaxis.options))),"number"==typeof i&&(e=this.adjustValPrecision(p,e,i)),"number"==typeof n&&(e=this.adjustValPrecision(h,e,n)),void 0!==t.series.xaxis.ticks){var d;d=this.hasRotatedXAxisTicks(t)?"rotatedTicks":"ticks";var f=t.dataIndex+t.seriesIndex;for(var m in t.series.xaxis[d]){if(t.series.xaxis[d].hasOwnProperty(f)&&!this.isTimeMode("xaxis",t))(this.isCategoriesMode("xaxis",t)?t.series.xaxis[d][f].label:t.series.xaxis[d][f].v)===i&&(e=e.replace(p,t.series.xaxis[d][f].label.replace(/\$/g,"$$$$")))}}if(void 0!==t.series.yaxis.ticks)for(var g in t.series.yaxis.ticks){if(t.series.yaxis.ticks.hasOwnProperty(g))(this.isCategoriesMode("yaxis",t)?t.series.yaxis.ticks[g].label:t.series.yaxis.ticks[g].v)===n&&(e=e.replace(h,t.series.yaxis.ticks[g].label.replace(/\$/g,"$$$$")))}return void 0!==t.series.xaxis.tickFormatter&&(e=e.replace("%x",t.series.xaxis.tickFormatter(i,t.series.xaxis).replace(/\$/g,"$$"))),void 0!==t.series.yaxis.tickFormatter&&(e=e.replace("%y",t.series.yaxis.tickFormatter(n,t.series.yaxis).replace(/\$/g,"$$"))),e},i.prototype.isTimeMode=function(e,t){return void 0!==t.series[e].options.mode&&"time"===t.series[e].options.mode},i.prototype.isXDateFormat=function(e){return void 0!==this.tooltipOptions.xDateFormat&&null!==this.tooltipOptions.xDateFormat},i.prototype.isYDateFormat=function(e){return void 0!==this.tooltipOptions.yDateFormat&&null!==this.tooltipOptions.yDateFormat},i.prototype.isCategoriesMode=function(e,t){return void 0!==t.series[e].options.mode&&"categories"===t.series[e].options.mode},i.prototype.timestampToDate=function(t,i,n){var o=e.plot.dateGenerator(t,n);return e.plot.formatDate(o,i,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},i.prototype.adjustValPrecision=function(e,t,i){var n;return null!==t.match(e)&&""!==RegExp.$1&&(n=RegExp.$1,i=i.toFixed(n),t=t.replace(e,i)),t},i.prototype.hasAxisLabel=function(t,i){return-1!==e.inArray("axisLabels",this.plotPlugins)&&void 0!==i.series[t].options.axisLabel&&i.series[t].options.axisLabel.length>0},i.prototype.hasRotatedXAxisTicks=function(t){return-1!==e.inArray("tickRotor",this.plotPlugins)&&void 0!==t.series.xaxis.rotatedTicks};e.plot.plugins.push({init:function(e){new i(e)},options:t,name:"tooltip",version:"0.8.5"})}(jQuery);