"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(r){var t=function(t,e){var n=e.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",e.appendChild(n),!n.getContext))throw new Error("Canvas is not available.");this.element=n;var o=this.context=n.getContext("2d");this.pixelRatio=r.plot.browser.getPixelRatio(o);var i=r(e).width(),a=r(e).height();this.resize(i,a),this.SVGContainer=null,this.SVG={},this._textCache={}};function d(e,t){e.transform.baseVal.clear(),t&&t.forEach(function(t){e.transform.baseVal.appendItem(t)})}t.prototype.resize=function(t,e){t=t<10?10:t,e=e<10?10:e;var n=this.element,o=this.context,i=this.pixelRatio;this.width!==t&&(n.width=t*i,n.style.width=t+"px",this.width=t),this.height!==e&&(n.height=e*i,n.style.height=e+"px",this.height=e),o.restore(),o.save(),o.scale(i,i)},t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},t.prototype.render=function(){var t=this._textCache;for(var e in t)if(hasOwnProperty.call(t,e)){var n=this.getSVGLayer(e),o=t[e],i=n.style.display;for(var a in n.style.display="none",o)if(hasOwnProperty.call(o,a)){var r=o[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||(n.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])}}n.style.display=i}},t.prototype.getSVGLayer=function(t){var e,n=this.SVG[t];n||(this.SVGContainer?e=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),(e=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.width="100%",e.style.height="100%",this.SVGContainer.appendChild(e)),(n=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("class",t),n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style.bottom="0px",n.style.right="0px",e.appendChild(n),this.SVG[t]=n);return n},t.prototype.getTextInfo=function(t,e,n,o,i){var a,r,s,l;e=""+e,a="object"===_typeof(n)?n.style+" "+n.variant+" "+n.weight+" "+n.size+"px/"+n.lineHeight+"px "+n.family:n,null==(r=this._textCache[t])&&(r=this._textCache[t]={}),null==(s=r[a])&&(s=r[a]={});var c=e.replace(/0|1|2|3|4|5|6|7|8|9/g,"0");if(!(l=s[c])){var u=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==e.indexOf("
"))m(e,u,-9999);else{var p=document.createTextNode(e);u.appendChild(p)}u.style.position="absolute",u.style.maxWidth=i,u.setAttributeNS(null,"x",-9999),u.setAttributeNS(null,"y",-9999),"object"===_typeof(n)?(u.style.font=a,u.style.fill=n.fill):"string"==typeof n&&u.setAttribute("class",n),this.getSVGLayer(t).appendChild(u);var h=u.getBBox();for(l=s[c]={width:h.width,height:h.height,measured:!0,element:u,positions:[]};u.firstChild;)u.removeChild(u.firstChild);u.parentNode.removeChild(u)}return l.measured=!0,l},t.prototype.addText=function(t,e,n,o,i,a,r,s,l,c){var u=this.getTextInfo(t,o,i,a,r),p=u.positions;"center"===s?e-=u.width/2:"right"===s&&(e-=u.width),"middle"===l?n-=u.height/2:"bottom"===l&&(n-=u.height),n+=.75*u.height;for(var h,f=0;p[f];f++){if((h=p[f]).x===e&&h.y===n&&h.text===o)return h.active=!0,void d(h.element,c);if(!1===h.active)return h.active=!0,-1!==(h.text=o).indexOf("
")?(n-=.25*u.height,m(o,h.element,e)):h.element.textContent=o,h.element.setAttributeNS(null,"x",e),h.element.setAttributeNS(null,"y",n),h.x=e,h.y=n,void d(h.element,c)}h={active:!0,rendered:!1,element:p.length?u.element.cloneNode():u.element,text:o,x:e,y:n},p.push(h),-1!==o.indexOf("
")?(n-=.25*u.height,m(o,h.element,e)):h.element.textContent=o,h.element.setAttributeNS(null,"x",e),h.element.setAttributeNS(null,"y",n),h.element.style.textAlign=s,d(h.element,c)};var m=function(t,e,n){var o,i,a,r=t.split("
");for(i=0;il.xmax&&(l.xmax=p)),!0===h.y&&(pl.ymax&&(l.ymax=p))))}return l},M.adjustSeriesDataRange=function(t,e){if(t.bars.show){var n,o=t.bars.barWidth[1];t.datapoints&&t.datapoints.points&&!o&&function(t){var e=[],n=t.datapoints.pointsize,o=Number.MAX_VALUE;t.datapoints.points.length<=n&&(o=1);for(var i=t.bars.horizontal?1:0;it.datamax&&n!==1/0&&(t.datamax=n)}function g(t,e){return t&&t[e]&&t[e].datapoints&&t[e].datapoints.points?t[e].datapoints.points:[]}for(J.each(L(),function(t,e){!0!==e.options.growOnly?(e.datamin=f,e.datamax=d):(void 0===e.datamin&&(e.datamin=f),void 0===e.datamax&&(e.datamax=d)),e.used=!1}),e=0;eo.max?f:(l=x.getTextInfo(p,t.label,h),"x"===o.direction?(r="center",i=b.left+o.p2c(t.v),"bottom"===o.position?a=u.top+u.padding-o.boxPosition.centerY:(a=u.top+u.height-u.padding+o.boxPosition.centerY,s="bottom")):(s="middle",a=b.top+o.p2c(t.v),"left"===o.position?(i=u.left+u.width-u.padding-o.boxPosition.centerX,r="right"):i=u.left+u.padding+o.boxPosition.centerX),c={x:i-l.width/2-3,y:a-3,width:l.width+6,height:l.height+6},n=c,e.some(function(t){return m(n.x,n.y,n.x+n.width,n.y+n.height,t.x,t.y,t.x+t.width,t.y+t.height)})?f:(x.addText(p,i,a,t.label,h,null,null,r,s),c));var n};if(x.removeText(p),P(k.drawAxis,[o,x]),o.show)switch(o.options.showTickLabels){case"none":break;case"endpoints":d.push(g(o.ticks[0],d)),d.push(g(o.ticks[o.ticks.length-1],d));break;case"major":for(d.push(g(o.ticks[0],d)),d.push(g(o.ticks[o.ticks.length-1],d)),e=1;e=t.min&&c<=t.max&&("x"===t.direction?(a=t.p2c(c),p=e,"top"===t.position&&(p=-p)):(r=t.p2c(c),u=e,"left"===t.position&&(u=-u)),"x"===t.direction?a=X(g.lineWidth,a):r=X(g.lineWidth,r),g.moveTo(a,r),g.lineTo(a+u,r+p)),!0===n&&st.max||(n=i,void 0,o=d.grid.borderWidth,(!("object"===_typeof(o)&&0i.axis.max||a.toa.axis.max)){i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),a.from=Math.max(a.from,a.axis.min),a.to=Math.min(a.to,a.axis.max);var r=i.from===i.to,s=a.from===a.to;if(!r||!s)if(i.from=Math.floor(i.axis.p2c(i.from)),i.to=Math.floor(i.axis.p2c(i.to)),a.from=Math.floor(a.axis.p2c(a.from)),a.to=Math.floor(a.axis.p2c(a.to)),r||s){var l=o.lineWidth||d.grid.markingsLineWidth,c=l%2?.5:0;g.beginPath(),g.strokeStyle=o.color||d.grid.markingsColor,g.lineWidth=l,r?(g.moveTo(i.to+c,a.from),g.lineTo(i.to+c,a.to)):(g.moveTo(i.from,a.to+c),g.lineTo(i.to,a.to+c)),g.stroke()}else g.fillStyle=o.color||d.grid.markingsColor,g.fillRect(i.from,a.to,i.to-i.from,a.from-a.to)}}}(),t=L(),e=d.grid.borderWidth;for(var i=0;it.yaxis.min?Math.min(t.yaxis.max,u):t.yaxis.min,h=-1,f=0;f=Math.min(p,d)&&m+o<=s&&s<=m+i:d+o<=r&&r<=d+i&&s>=Math.min(p,m)&&s<=Math.max(p,m))&&(h=f/c))}return h}function U(){var t=d.interaction.redrawOverlayInterval;-1!==t?s||(s=setTimeout(function(){Q(M)},t)):Q()}function Q(t){if(s=null,a){n.clear(),P(k.drawOverlay,[a,n]);var e=new CustomEvent("onDrawingDone");t.getEventHolder().dispatchEvent(e),t.getPlaceholder().trigger("drawingdone")}}function Z(t,e,n,o){if("string"==typeof t)return t;for(var i=g.createLinearGradient(0,n,0,e),a=0,r=t.colors.length;ar.max||vs.max||(mr.max&&(g=r.max,h=!1),xs.max&&(v=s.max,f=!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)),0n.min?Math.min(n.max,o):n.min,c=0,u=1,p=!1,h=0,f=0,d=null,m=null;!(0r.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(0e.max){if(v>e.max)continue;x=(e.max-g)/(v-g)*(b-x)+x,g=e.max}else if(g<=v&&v>e.max){if(g>e.max)continue;b=(e.max-g)/(v-g)*(b-x)+x,v=e.max}if(p||(i.beginPath(),i.moveTo(e.p2c(g),n.p2c(l)),p=!0),x>=n.max&&b>=n.max)i.lineTo(e.p2c(g),n.p2c(n.max)),i.lineTo(e.p2c(v),n.p2c(n.max));else if(x<=n.min&&b<=n.min)i.lineTo(e.p2c(g),n.p2c(n.min)),i.lineTo(e.p2c(v),n.p2c(n.min));else{var y=g,w=v;x<=b&&x=n.min?(g=(n.min-x)/(b-x)*(v-g)+g,x=n.min):b<=x&&b=n.min&&(v=(n.min-x)/(b-x)*(v-g)+g,b=n.min),b<=x&&x>n.max&&b<=n.max?(g=(n.max-x)/(b-x)*(v-g)+g,x=n.max):x<=b&&b>n.max&&x<=n.max&&(v=(n.max-x)/(b-x)*(v-g)+g,b=n.max),g!==y&&i.lineTo(e.p2c(y),n.p2c(x)),i.lineTo(e.p2c(g),n.p2c(x)),i.lineTo(e.p2c(v),n.p2c(b)),v!==w&&(i.lineTo(e.p2c(v),n.p2c(b)),i.lineTo(e.p2c(w),n.p2c(b)))}}else m=d=null}}(s,t.xaxis,t.yaxis,t.lines.fillTowards||0,e,t.lines.steps)),0i.max){if(d>i.max)continue;p=(i.max-h)/(d-h)*(f-p)+p,h=i.max}else if(h<=d&&d>i.max){if(h>i.max)continue;f=(i.max-h)/(d-h)*(f-p)+p,d=i.max}if(p<=f&&po.max){if(f>o.max)continue;h=(o.max-p)/(f-p)*(d-h)+h,p=o.max}else if(p<=f&&f>o.max){if(p>o.max)continue;d=(o.max-p)/(f-p)*(d-h)+h,f=o.max}p===c&&h===u||a.moveTo(o.p2c(p)+e,i.p2c(h)+n),c=f,u=d,a.lineTo(o.p2c(f)+e,i.p2c(d)+n)}else g=m=null;a.stroke()}(s,0,0,t.xaxis,t.yaxis,e,t.lines.steps),e.restore()},this.drawSeriesPoints=function(t,f,e,n,o,i,a){function r(t,e,n,o,i,a){t.moveTo(e+o,n),t.arc(e,n,o,0,i?Math.PI:2*Math.PI,!1)}r.fill=!0,f.save(),f.translate(e.left,e.top);var s={format:t.datapoints.format,points:t.datapoints.points,pointsize:t.datapoints.pointsize};t.decimatePoints&&(s.points=t.decimatePoints(t,t.xaxis.min,t.xaxis.max,n,t.yaxis.min,t.yaxis.max,o));var l,c=t.points.lineWidth,u=t.points.radius,p=t.points.symbol;"circle"===p?l=r:"string"==typeof p&&i&&i[p]?l=i[p]:"function"==typeof i&&(l=i),0===c&&(c=1e-4),f.lineWidth=c,f.fillStyle=m(t.points,t.color,null,null,a),f.strokeStyle=t.color,function(t,e,n,o,i,a,r,s){var l=t.points,c=t.pointsize;f.beginPath();for(var u=0;ua.max||hr.max||(p=a.p2c(p),h=r.p2c(h)+o,s(f,p,h,e,i,n))}s.fill&&!i&&f.fill(),f.stroke()}(s,u,!0,0,!1,t.xaxis,t.yaxis,l),f.restore()},this.drawSeriesBars=function(h,f,t,e,n,o,i){f.save(),f.translate(t.left,t.top);var a,r={format:h.datapoints.format,points:h.datapoints.points,pointsize:h.datapoints.pointsize};h.decimate&&(r.points=h.decimate(h,h.xaxis.min,h.xaxis.max,e)),f.lineWidth=h.bars.lineWidth,f.strokeStyle=h.color;var s=h.bars.barWidth[0]||h.bars.barWidth;switch(h.bars.align){case"left":a=0;break;case"right":a=-s;break;default:a=-s/2}!function(t,e,n,o,i,a){for(var r=t.points,s=t.pointsize,l=h.bars.fillTowards||0,c=l>a.min?Math.min(a.max,l):a.min,u=0;ur[1].max||gr[0].max))continue;if("y"===l[f].err&&(m>r[0].max||mr[1].max))continue;var b=!0,y=!0;x>d[1]&&(b=!1,x=d[1]),v=d?f={pixelCoord:p,idealPixelCoord:f.idealPixelCoord-d}:h=null,h&&o.push(h);o.reverse()}else{var g=t.computeTickSize(l,c,n),x={min:l,max:c,tickSize:g};o=v.plot.linearTickGenerator(x)}return o},w=function(t,e){var n=t.min,o=t.max;return n<=0&&o<(n=null===t.datamin?t.min=.1:h(e,t))&&(t.max=null!==t.datamax?t.datamax:t.options.max,t.options.offset.below=0,t.options.offset.above=0),n},a=function(t,e,n){var o=0e.left&&a.lefte.top&&a.tope.left&&n.lefte.top&&n.top=N||Math.abs(r.x)=N),b=y.getAxes();o=n?function(t){switch(!k&&Math.max(Math.abs(t.x),Math.abs(t.y))>=N&&(k=Math.abs(t.x)=N?{x:0,y:s.y}:Math.abs(s.y)=N?{x:s.x,y:0}:s),l=o,0e.left&&n.lefte.top&&n.top=e.length?null:e[t.fillBetween]:null}(e,t.getData());if(o){for(var i,a,r,s,l,c,u,p,h=n.pointsize,f=n.points,d=o.datapoints.pointsize,m=o.datapoints.points,g=[],x=e.lines.show,v=2=f.length);){if(u=g.length,null==f[w]){for(p=0;p=m.length){if(!x)for(p=0;p=t.min&&o<=t.max&&e.push([o,n])}return e.sort(function(t,e){return t[0]-e[0]}),e}function o(t,e,n){if("categories"===t[e].options.mode){if(!t[e].categories){var o={},i=t[e].options.categories||{};if(s.isArray(i))for(var a=0;ae&&(e=t[n]);return e+1}(n),l=0;l=m.length);){if(h=v.length,null==m[S]){for(f=0;f=x.length){if(!b)for(f=0;fm)&&(e=c,n=h,o=f,i=(t=u).offset(),a={left:0,top:0},r=x(e)/n.prevDistance,s=x(e),a.left=y(e,"pinch").x-i.left,a.top=y(e,"pinch").y-i.top,t.zoom({center:a,amount:r,axes:o.touchedAxis}),n.prevDistance=s,h.zoomEnable=!0),p=null},1e3/60))},end:function(t){p&&(clearTimeout(p),p=null),d(t,"pinch",h),h.prevDistance=null}},a={recenterPlot:function(t){t&&t.detail&&"touchstart"===t.detail.type&&function(t,e,n,o){if(a=t,r=e,s=o,l=a.getTouchedAxis(r.detail.firstTouch.x,r.detail.firstTouch.y),void 0!==l[0]&&(s.prevTouchedAxis=l[0].direction),void 0!==(l=a.getTouchedAxis(r.detail.secondTouch.x,r.detail.secondTouch.y))[0]&&(s.touchedAxis=l,s.currentTouchedAxis=l[0].direction),g(s)&&(s.touchedAxis=null,s.prevTouchedAxis="none",s.currentTouchedAxis="none"),"x"===o.currentTouchedAxis&&"x"===o.prevTouchedAxis||"y"===o.currentTouchedAxis&&"y"===o.prevTouchedAxis||"none"===o.currentTouchedAxis&&"none"===o.prevTouchedAxis){var i;t.recenter({axes:o.touchedAxis}),i=o.touchedAxis?new c.Event("re-center",{detail:{axisTouched:o.touchedAxis}}):new c.Event("re-center",{detail:e}),t.getPlaceholder().trigger(i)}var a,r,s,l}(u,t,0,f)}},!0!==t.pan.enableTouch&&!0!==t.zoom.enableTouch||(u.hooks.bindEvents.push(function(t,e){var n=t.getOptions();n.zoom.interactive&&n.zoom.enableTouch&&(e[0].addEventListener("pinchstart",i.start,!1),e[0].addEventListener("pinchdrag",i.drag,!1),e[0].addEventListener("pinchend",i.end,!1)),n.pan.interactive&&n.pan.enableTouch&&(e[0].addEventListener("panstart",o.start,!1),e[0].addEventListener("pandrag",o.drag,!1),e[0].addEventListener("panend",o.end,!1)),n.recenter.interactive&&n.recenter.enableTouch&&e[0].addEventListener("doubletap",a.recenterPlot,!1)}),u.hooks.shutdown.push(function(t,e){e[0].removeEventListener("panstart",o.start),e[0].removeEventListener("pandrag",o.drag),e[0].removeEventListener("panend",o.end),e[0].removeEventListener("pinchstart",i.start),e[0].removeEventListener("pinchdrag",i.drag),e[0].removeEventListener("pinchend",i.end),e[0].removeEventListener("doubletap",a.recenterPlot)}))}function g(t){return!t.touchedAxis||0===t.touchedAxis.length}function l(t,e,n,o){var i,a=y(t,e);switch(o.navigationConstraint){case"unconstrained":o.touchedAxis=null,n.prevTapPosition={x:n.prevPanPosition.x,y:n.prevPanPosition.y},n.prevPanPosition={x:a.x,y:a.y};break;case"axisConstrained":i=o.touchedAxis[0].direction,o.currentTouchedAxis=i,n.prevTapPosition[i]=n.prevPanPosition[i],n.prevPanPosition[i]=a[i]}}function x(t){var e,n,o,i,a=t.detail.touches[0],r=t.detail.touches[1];return e=a.pageX,n=a.pageY,o=r.pageX,i=r.pageY,Math.sqrt((e-o)*(e-o)+(n-i)*(n-i))}function v(t,e,n,o){var i=y(t,e);switch(o.navigationConstraint){case"unconstrained":n.prevPanPosition.x=i.x,n.prevPanPosition.y=i.y;break;case"axisConstrained":n.prevPanPosition[o.currentTouchedAxis]=i[o.currentTouchedAxis]}}function b(t,e,n){var o=y(t,e);return{x:o.x-n.prevPanPosition.x,y:o.y-n.prevPanPosition.y}}function y(t,e){return"pinch"===e?{x:(t.detail.touches[0].pageX+t.detail.touches[1].pageX)/2,y:(t.detail.touches[0].pageY+t.detail.touches[1].pageY)/2}:{x:t.detail.touches[0].pageX,y:t.detail.touches[0].pageY}}c.plot.plugins.push({init:function(t){t.hooks.processOptions.push(e)},options:{zoom:{enableTouch:!1},pan:{enableTouch:!1,touchMode:"manual"},recenter:{enableTouch:!0}},name:"navigateTouch",version:"0.3"})}(jQuery),function(y){var w=y.plot.browser,e="click",T="hover";y.plot.plugins.push({init:function(d){var n,m=[];function o(t){var e=d.getOptions(),n=new CustomEvent("mouseevent");return n.pageX=t.detail.changedTouches[0].pageX,n.pageY=t.detail.changedTouches[0].pageY,n.clientX=t.detail.changedTouches[0].clientX,n.clientY=t.detail.changedTouches[0].clientY,e.grid.hoverable&&i(n,T,30),!1}function i(t,e,n){var o=d.getData();if(void 0!==t&&0r.max||as.max)){var c=t.points.radius+t.points.lineWidth/2;n.lineWidth=c,n.strokeStyle=l;var u=1.5*c;i=r.p2c(i),a=s.p2c(a),n.beginPath();var p=t.points.symbol;"circle"===p?n.arc(i,a,u,0,2*Math.PI,!1):"string"==typeof p&&o.drawSymbol&&o.drawSymbol[p]&&o.drawSymbol[p](n,i,a,u,!1),n.closePath(),n.stroke()}}function b(t,e,n){var o,i="string"==typeof t.highlightColor?t.highlightColor:y.color.parse(t.color).scale("a",.5).toString(),a=i,r=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-r;break;default:o=-r/2}n.lineWidth=t.bars.lineWidth,n.strokeStyle=i;var s=t.bars.fillTowards||0,l=s>t.yaxis.min?Math.min(t.yaxis.max,s):t.yaxis.min;y.plot.drawSeries.drawBar(e[0],e[1],e[2]||l,o,o+r,function(){return a},t.xaxis,t.yaxis,n,t.bars.horizontal,t.bars.lineWidth)}d.hooks.bindEvents.push(function(t,e){var n=t.getOptions();(n.grid.hoverable||n.grid.clickable)&&(e[0].addEventListener("touchevent",l,!1),e[0].addEventListener("tap",o,!1)),n.grid.clickable&&e.bind("click",s),n.grid.hoverable&&(e.bind("mousemove",a),e.bind("mouseleave",r))}),d.hooks.shutdown.push(function(t,e){e[0].removeEventListener("tap",o),e[0].removeEventListener("touchevent",l),e.unbind("mousemove",a),e.unbind("mouseleave",r),e.unbind("click",s),m=[]}),d.hooks.processOptions.push(function(t,e){t.highlight=g,t.unhighlight=x,(e.grid.hoverable||e.grid.clickable)&&(t.hooks.drawOverlay.push(f),t.hooks.processDatapoints.push(p),t.hooks.setupGrid.push(h)),n=t.getPlaceholder()[0].lastMouseMoveEvent})},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery),function(t){function e(n,t){var o,i={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},a=20,r=500;function s(t){var e=n.getOptions();(e.pan.active||e.zoom.active)&&(3<=t.touches.length?i.isUnsupportedGesture=!0:i.isUnsupportedGesture=!1,o.dispatchEvent(new CustomEvent("touchevent",{detail:t})),v(t)?l(t,"pinch"):(l(t,"pan"),x(t)||(function(t){var e=(new Date).getTime(),n=e-i.prevTapTime;if(0<=n&&n=a);++s);var l=r[s][0],c=r[s][1];if("year"===c){if(null!==n.minTickSize&&void 0!==n.minTickSize&&"year"===n.minTickSize[1])l=Math.floor(n.minTickSize[0]);else{var u=parseFloat("1e"+Math.floor(Math.log(t.delta/e.year)/Math.LN10)),p=t.delta/e.year/u;l=p<1.5?1:p<3?2:p<7.5?5:10,l*=u}l<1&&(l=1)}t.tickSize=n.tickSize||[l,c];var h=t.tickSize[0],f=h*e[c=t.tickSize[1]];"microsecond"===c?i.setMicroseconds(y(i.getMicroseconds(),h)):"millisecond"===c?i.setMilliseconds(y(i.getMilliseconds(),h)):"second"===c?i.setSeconds(y(i.getSeconds(),h)):"minute"===c?i.setMinutes(y(i.getMinutes(),h)):"hour"===c?i.setHours(y(i.getHours(),h)):"month"===c?i.setMonth(y(i.getMonth(),h)):"quarter"===c?i.setMonth(3*y(i.getMonth()/3,h)):"year"===c&&i.setFullYear(y(i.getFullYear(),h)),f>=e.millisecond&&(f>=e.second?i.setMicroseconds(0):i.setMicroseconds(1e3*i.getMilliseconds())),f>=e.minute&&i.setSeconds(0),f>=e.hour&&i.setMinutes(0),f>=e.day&&i.setHours(0),f>=4*e.day&&i.setDate(1),f>=2*e.month&&i.setMonth(y(i.getMonth(),3)),f>=2*e.quarter&&i.setMonth(y(i.getMonth(),6)),f>=e.year&&i.setMonth(0);var d,m,g=0,x=Number.NaN;do{if(m=x,d=i.getTime(),x=n&&"seconds"===n.timeBase?d/1e3:n&&"microseconds"===n.timeBase?1e3*d:d,o.push(x),"month"===c||"quarter"===c)if(h<1){i.setDate(1);var v=i.getTime();i.setMonth(i.getMonth()+("quarter"===c?3:1));var b=i.getTime();i.setTime(x+g*e.hour+(b-v)*h),g=i.getHours(),i.setHours(0)}else i.setMonth(i.getMonth()+h*("quarter"===c?3:1));else"year"===c?i.setFullYear(i.getFullYear()+h):"seconds"===n.timeBase?i.setTime(1e3*(x+f)):"microseconds"===n.timeBase?i.setTime((x+f)/1e3):i.setTime(x+f)}while(x=t&&Math.abs(T.second.y-T.first.y)>=t}c.clearSelection=h,c.setSelection=function(t,e){var n;"y"===k(c)?(T.first.x=0,T.second.x=c.width()):(n=f(t,"x"),T.first.x=n.axis.p2c(n.from),T.second.x=n.axis.p2c(n.to)),"x"===k(c)?(T.first.y=0,T.second.y=c.height()):(n=f(t,"y"),T.first.y=n.axis.p2c(n.from),T.second.y=n.axis.p2c(n.to)),T.show=!0,c.triggerRedrawOverlay(),!e&&M()&&s()},c.getSelection=e,c.hooks.bindEvents.push(function(t,e){null!=t.getOptions().selection.mode&&(e.mousemove(a),e.mousedown(r))}),c.hooks.drawOverlay.push(function(t,e){if(T.show&&M()){var n=t.getPlotOffset(),o=t.getOptions();e.save(),e.translate(n.left,n.top);var i=S.color.parse(o.selection.color),a=o.selection.visualization,r=1;"fill"===a&&(r=.8),e.strokeStyle=i.scale("a",r).toString(),e.lineWidth=1,e.lineJoin=o.selection.shape,e.fillStyle=i.scale("a",.4).toString();var s=Math.min(T.first.x,T.second.x)+.5,l=s,c=Math.min(T.first.y,T.second.y)+.5,u=c,p=Math.abs(T.second.x-T.first.x)-1,h=Math.abs(T.second.y-T.first.y)-1;"x"===k(t)&&(h+=c,c=0),"y"===k(t)&&(p+=s,s=0),"fill"===a?(e.fillRect(s,c,p,h),e.strokeRect(s,c,p,h)):(e.fillRect(0,0,t.width(),t.height()),e.clearRect(s,c,p,h),f=e,d=s,m=c,g=p,x=h,v=l,b=u,y=k(t),w=Math.max(0,Math.min(15,g/2-2,x/2-2)),f.fillStyle="#ffffff","xy"===y&&(f.beginPath(),f.moveTo(d,m+w),f.lineTo(d-3,m+w),f.lineTo(d-3,m-3),f.lineTo(d+w,m-3),f.lineTo(d+w,m),f.lineTo(d,m),f.closePath(),f.moveTo(d,m+x-w),f.lineTo(d-3,m+x-w),f.lineTo(d-3,m+x+3),f.lineTo(d+w,m+x+3),f.lineTo(d+w,m+x),f.lineTo(d,m+x),f.closePath(),f.moveTo(d+g,m+w),f.lineTo(d+g+3,m+w),f.lineTo(d+g+3,m-3),f.lineTo(d+g-w,m-3),f.lineTo(d+g-w,m),f.lineTo(d+g,m),f.closePath(),f.moveTo(d+g,m+x-w),f.lineTo(d+g+3,m+x-w),f.lineTo(d+g+3,m+x+3),f.lineTo(d+g-w,m+x+3),f.lineTo(d+g-w,m+x),f.lineTo(d+g,m+x),f.closePath(),f.stroke(),f.fill()),d=v,m=b,"x"===y&&(f.beginPath(),f.moveTo(d,m+15),f.lineTo(d,m-15),f.lineTo(d-3,m-15),f.lineTo(d-3,m+15),f.closePath(),f.moveTo(d+g,m+15),f.lineTo(d+g,m-15),f.lineTo(d+g+3,m-15),f.lineTo(d+g+3,m+15),f.closePath(),f.stroke(),f.fill()),"y"===y&&(f.beginPath(),f.moveTo(d-15,m),f.lineTo(d+15,m),f.lineTo(d+15,m-3),f.lineTo(d-15,m-3),f.closePath(),f.moveTo(d-15,m+x),f.lineTo(d+15,m+x),f.lineTo(d+15,m+x+3),f.lineTo(d-15,m+x+3),f.closePath(),f.stroke(),f.fill())),e.restore()}var f,d,m,g,x,v,b,y,w}),c.hooks.shutdown.push(function(t,e){e.unbind("mousemove",a),e.unbind("mousedown",r),o&&S(document).unbind("mouseup",o)})},options:{selection:{mode:null,visualization:"focus",color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery),function(t){var e=-100,c=0,u=-1,p=-2,h=1,g=t.plot.browser,a=g.getPixelRatio;function n(t,e){var n=t.filter(r);h=a(e.getContext("2d"));var o,i=n.map(function(t){var d,m,e=new Image;return new Promise((m=t,(d=e).sourceDescription='',d.sourceComponent=m,function(e,t){var n,o,i,a,r,s,l,c,u,p,h,f;d.onload=function(t){d.successfullyLoaded=!0,e(d)},d.onabort=function(t){d.successfullyLoaded=!1,console.log("Can't generate temp image from "+d.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",d.sourceComponent),e(d)},d.onerror=function(t){d.successfullyLoaded=!1,console.log("Can't generate temp image from "+d.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",d.sourceComponent),e(d)},o=d,"CANVAS"===(n=m).tagName&&(i=n,o.src=i.toDataURL("image/png")),"svg"===n.tagName&&(a=n,r=o,g.isSafari()||g.isMobileSafari()?(s=a,l=r,p=b(p=v(x(document),s)),u=function(t){for(var e="",n=new Uint8Array(t),o=0;ot[l].genLeft&&(i=t[l].genLeft),a>t[l].genTop&&(a=t[l].genTop);for(l=1;l',"",e.innerHTML,""].join("\n")}function b(t){var e="";return t.match(/^]+xmlns="http:\/\/www\.w3\.org\/2000\/svg"/)||(e=t.replace(/^]+"http:\/\/www\.w3\.org\/1999\/xlink"/)||(e=t.replace(/^\r\n'+e}function s(){return e}t.plot.composeImages=n,t.plot.plugins.push({init:function(t){t.composeImages=n},name:"composeImages",version:"1.0"})}(jQuery),function(M){function S(t){var e="",n=t.name,o=t.xPos,i=t.yPos,a=t.fillColor,r=t.strokeColor,s=t.strokeWidth;switch(n){case"circle":e='';break;case"diamond":e='';break;case"cross":e='';break;case"rectangle":e='';break;case"plus":e='';break;case"bar":e='';break;case"area":e='';break;case"line":e='';break;default:e=''}return e}var C='';function l(t,e){for(var n in t)if(t.hasOwnProperty(n)&&t[n]!==e[n])return!0;return!1}M.plot.plugins.push({init:function(t){t.hooks.setupGrid.push(function(t){var e=t.getOptions(),n=t.getData(),o=e.legend.labelFormatter,i=e.legend.legendEntries,a=e.legend.plotOffset,r=function(t,e,n){var a=e,o=t.reduce(function(t,e,n){var o=a?a(e.label,e):e.label;if(!e.hasOwnProperty("label")||o){var i={label:o||"Plot "+(n+1),color:e.color,options:{lines:e.lines,points:e.points,bars:e.bars}};t.push(i)}return t},[]);if(n)if(M.isFunction(n))o.sort(n);else if("reverse"===n)o.reverse();else{var i="descending"!==n;o.sort(function(t,e){return t.label===e.label?0:t.label',u[p++]='',u[p++]=C;var g=0,x=[],v=window.getComputedStyle(document.querySelector("body"));for(s=0;sx[b]&&(x[b]=labelWidth+48):x[b]=labelWidth+48}for(s=0;s'+m.label+"",u[p++]=""+r+a+"";u[p++]="",null==d[0]&&(d=[d,d]),"n"===f.charAt(0)?h+="top:"+(d[1]+c.top)+"px;":"s"===f.charAt(0)&&(h+="bottom:"+(d[1]+c.bottom)+"px;"),"e"===f.charAt(1)?h+="right:"+(d[0]+c.right)+"px;":"w"===f.charAt(1)&&(h+="left:"+(d[0]+c.left)+"px;");var w=6;for(s=0;s'+u.join("")+"").appendTo(n)).css("width",w+"px"),T.css("height",k+"em"),T.css("pointerEvents","none"))}}(t,e,t.getPlaceholder(),r)})},options:{legend:{show:!1,noColumns:1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery); //# sourceMappingURL=jquery.flot.js.map