!function(e,t){var i=t();if("object"==typeof i){var o=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,e&&e!==window?e:null];for(var n in i)o[0]&&(o[0][n]=i[n]),o[1]&&"__esModule"!==n&&(o[1][n]=i[n]),o[2]&&(o[2][n]=i[n])}}(this,function(){return function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=478)}({478:function(e,t,i){i(479),i(480),i(481),i(482),i(62)},479:function(e,t,o){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a,r,s,l;!function(e){var t=function(t,i){var o=i.getElementsByClassName(t)[0];if(!o&&((o=document.createElement("canvas")).className=t,o.style.direction="ltr",o.style.position="absolute",o.style.left="0px",o.style.top="0px",i.appendChild(o),!o.getContext))throw new Error("Canvas is not available.");this.element=o;var n=this.context=o.getContext("2d");this.pixelRatio=e.plot.browser.getPixelRatio(n);var a=i.getBoundingClientRect();this.resize(a.width,a.height),this.SVGContainer=null,this.SVG={},this._textCache={}};t.prototype.resize=function(e,t){e=e<10?10:e,t=t<10?10:t;var i=this.element,o=this.context,n=this.pixelRatio;this.width!==e&&(i.width=e*n,i.style.width=e+"px",this.width=e),this.height!==t&&(i.height=t*n,i.style.height=t+"px",this.height=t),o.restore(),o.save(),o.scale(n,n)},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),o=e[t],n=i.style.display;for(var a in i.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||(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=n}},t.prototype.getSVGLayer=function(e){var t,i=this.SVG[e];return 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),i},t.prototype.getTextInfo=function(e,t,o,a,r){var s,l,c,u;t=""+t,s="object"===n(o)?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,null==(l=this._textCache[e])&&(l=this._textCache[e]={}),null==(c=l[s])&&(c=l[s]={});var p=t.replace(/0|1|2|3|4|5|6|7|8|9/g,"0");if(!(u=c[p])){var h=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==t.indexOf("
"))i(t,h,-9999);else{var d=document.createTextNode(t);h.appendChild(d)}h.style.position="absolute",h.style.maxWidth=r,h.setAttributeNS(null,"x",-9999),h.setAttributeNS(null,"y",-9999),"object"===n(o)?(h.style.font=s,h.style.fill=o.fill):"string"==typeof o&&h.setAttribute("class",o),this.getSVGLayer(e).appendChild(h);var f=h.getBBox();for(u=c[p]={width:f.width,height:f.height,measured:!0,element:h,positions:[]};h.firstChild;)h.removeChild(h.firstChild);h.parentNode.removeChild(h)}return u.measured=!0,u},t.prototype.addText=function(e,t,o,n,a,r,s,l,c,u){var p=this.getTextInfo(e,n,a,r,s),h=p.positions;"center"===l?t-=p.width/2:"right"===l&&(t-=p.width),"middle"===c?o-=p.height/2:"bottom"===c&&(o-=p.height),o+=.75*p.height;for(var d,f=0;h[f];f++){if((d=h[f]).x===t&&d.y===o&&d.text===n)return void(d.active=!0);if(!1===d.active)return d.active=!0,-1!==(d.text=n).indexOf("
")?(o-=.25*p.height,i(n,d.element,t)):d.element.textContent=n,d.element.setAttributeNS(null,"x",t),d.element.setAttributeNS(null,"y",o),d.x=t,void(d.y=o)}d={active:!0,rendered:!1,element:h.length?p.element.cloneNode():p.element,text:n,x:t,y:o},h.push(d),-1!==n.indexOf("
")?(o-=.25*p.height,i(n,d.element,t)):d.element.textContent=n,d.element.setAttributeNS(null,"x",t),d.element.setAttributeNS(null,"y",o),d.element.style.textAlign=l,u&&u.forEach(function(e){p.element.transform.baseVal.appendItem(e)})};var i=function(e,t,i){var o,n,a,r=e.split("
");for(n=0;nl.xmax&&(l.xmax=p)),!0===h.y&&(pl.ymax&&(l.ymax=p)))}return l},k.adjustSeriesDataRange=function(e,t){if(e.bars.show){var i,o=e.bars.barWidth[1];e.datapoints&&e.datapoints.points&&!o&&function(e){var t=e.datapoints.pointsize,i=Number.MAX_VALUE,o=e.datapoints.points[t]-e.datapoints.points[0]||1;isFinite(o)&&(i=o);for(var n=t;ne.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(L(),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;it.max?f:(s=p.getTextInfo(h,e.label,d),"x"===t.direction?(a="center",o=v.left+t.p2c(e.v),"bottom"===t.position?n=c.top+c.padding-t.boxPosition.centerY:(n=c.top+c.height-c.padding+t.boxPosition.centerY,r="bottom")):(r="middle",n=v.top+t.p2c(e.v),"left"===t.position?(o=c.left+c.width-c.padding-t.boxPosition.centerX,a="right"):o=c.left+c.padding+t.boxPosition.centerX),l={x:o-s.width/2-3,y:n-3,width:s.width+6,height:s.height+6},u=l,i.some(function(e){return function(e,t,i,o,n,a,r,s){return(e<=n&&n<=i||n<=e&&e<=r)&&(t<=a&&a<=o||a<=t&&t<=s)}(u.x,u.y,u.x+u.width,u.y+u.height,e.x,e.y,e.x+e.width,e.y+e.height)})?f:(p.addText(h,o,n,e.label,d,null,null,a,r),l));var u};if(p.removeText(h),C(w.drawAxis,[t,p]),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=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=H(f.lineWidth,a):r=H(f.lineWidth,r),f.moveTo(a,r),f.lineTo(a+u,r+p)),!0===i&&se.max||(i=a,o=u.grid.borderWidth,(!("object"===n(o)&&0a.axis.max||r.tor.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 c=n.lineWidth||u.grid.markingsLineWidth,p=c%2?.5:0;f.beginPath(),f.strokeStyle=n.color||u.grid.markingsColor,f.lineWidth=c,s?(f.moveTo(a.to+p,r.from),f.lineTo(a.to+p,r.to)):(f.moveTo(a.from,r.to+p),f.lineTo(a.to,r.to+p)),f.stroke()}else f.fillStyle=n.color||u.grid.markingsColor,f.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),t=L(),i=u.grid.borderWidth;for(var r=0;re.yaxis.min?Math.min(e.yaxis.max,u):e.yaxis.min,h=null,d=0;d=Math.min(p,f)&&m+o<=s&&s<=m+n:f+o<=r&&r<=f+n&&s>=Math.min(p,m)&&s<=Math.max(p,m))&&(h=d/c)}return h}function K(){var e=u.interaction.redrawOverlayInterval;-1!==e?M||(M=setTimeout(function(){ee(k)},e)):ee()}function ee(e){if(M=null,m){h.clear(),C(w.drawOverlay,[m,h]);var t=new CustomEvent("onDrawingDone");e.getEventHolder().dispatchEvent(t)}}function te(t,i,o,n){if("string"==typeof t)return t;for(var a=f.createLinearGradient(0,o,0,i),r=0,s=t.colors.length;rr.max||vs.max||(mr.max&&(g=r.max,h=!1),xs.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)),0i.min?Math.min(i.max,o):i.min,c=0,u=1,p=!1,h=0,d=0,f=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(0t.max){if(v>t.max)continue;x=(t.max-g)/(v-g)*(b-x)+x,g=t.max}else if(g<=v&&v>t.max){if(g>t.max)continue;b=(t.max-g)/(v-g)*(b-x)+x,v=t.max}if(p||(n.beginPath(),n.moveTo(t.p2c(g),i.p2c(l)),p=!0),x>=i.max&&b>=i.max)n.lineTo(t.p2c(g),i.p2c(i.max)),n.lineTo(t.p2c(v),i.p2c(i.max));else if(x<=i.min&&b<=i.min)n.lineTo(t.p2c(g),i.p2c(i.min)),n.lineTo(t.p2c(v),i.p2c(i.min));else{var y=g,w=v;x<=b&&x=i.min?(g=(i.min-x)/(b-x)*(v-g)+g,x=i.min):b<=x&&b=i.min&&(v=(i.min-x)/(b-x)*(v-g)+g,b=i.min),b<=x&&x>i.max&&b<=i.max?(g=(i.max-x)/(b-x)*(v-g)+g,x=i.max):x<=b&&b>i.max&&x<=i.max&&(v=(i.max-x)/(b-x)*(v-g)+g,b=i.max),g!==y&&n.lineTo(t.p2c(y),i.p2c(x)),n.lineTo(t.p2c(g),i.p2c(x)),n.lineTo(t.p2c(v),i.p2c(b)),v!==w&&(n.lineTo(t.p2c(v),i.p2c(b)),n.lineTo(t.p2c(w),i.p2c(b)))}}else m=f=null}}(l,e.xaxis,e.yaxis,e.lines.fillTowards||0,i,e.lines.steps)),0n.max){if(f>n.max)continue;p=(n.max-h)/(f-h)*(d-p)+p,h=n.max}else if(h<=f&&f>n.max){if(h>n.max)continue;d=(n.max-h)/(f-h)*(d-p)+p,f=n.max}if(p<=d&&po.max){if(d>o.max)continue;h=(o.max-p)/(d-p)*(f-h)+h,p=o.max}else if(p<=d&&d>o.max){if(p>o.max)continue;f=(o.max-p)/(d-p)*(f-h)+h,d=o.max}p===c&&h===u||a.moveTo(o.p2c(p)+0,n.p2c(h)+0),c=d,u=f,a.lineTo(o.p2c(d)+0,n.p2c(f)+0)}else g=m=null;a.stroke()}(l,0,0,e.xaxis,e.yaxis,i,e.lines.steps),i.restore()},this.drawSeriesPoints=function(e,i,o,n,a,r,s){function l(e,t,i,o,n,a){e.moveTo(t+o,i),e.arc(t,i,o,0,n?Math.PI:2*Math.PI,!1)}l.fill=!0,i.save(),i.translate(o.left,o.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,n,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),i.lineWidth=p,i.fillStyle=t(e.points,e.color,null,null,s),i.strokeStyle=e.color,function(e,t,o,n,a,r,s,l){var c=e.points,u=e.pointsize;i.beginPath();for(var p=0;pr.max||ds.max||(h=r.p2c(h),d=s.p2c(d)+0,l(i,h,d,t,!1,!0))}l.fill&&i.fill(),i.stroke()}(c,h,0,0,0,e.xaxis,e.yaxis,u),i.restore()},this.drawSeriesBars=function(i,o,n,a,r,s,l){o.save(),o.translate(n.left,n.top);var c,u={format:i.datapoints.format,points:i.datapoints.points,pointsize:i.datapoints.pointsize};i.decimate&&(u.points=i.decimate(i,i.xaxis.min,i.xaxis.max,a)),o.lineWidth=i.bars.lineWidth,o.strokeStyle=i.color;var p=i.bars.barWidth[0]||i.bars.barWidth;switch(i.bars.align){case"left":c=0;break;case"right":c=-p;break;default:c=-p/2}!function(t,n,a,r,s,l){for(var c=t.points,u=t.pointsize,p=i.bars.fillTowards||0,h=p>l.min?Math.min(l.max,p):l.min,d=0;dl[1].max||vl[0].max))continue;if("y"===u[m].err&&(x>l[0].max||xl[1].max))continue;var w=!0,k=!0;b>g[1]&&(w=!1,b=g[1]),y=v?x={pixelCoord:m,idealPixelCoord:x.idealPixelCoord-v}:g=null,g&&s.push(g);s.reverse()}else{var y=o.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,o=e.max;return i<=0&&o<(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,o){var n=0t.left&&s.leftt.top&&s.topt.left&&o.leftt.top&&o.top=o||Math.abs(c.x)=o),T=a.getAxes();p=e=s?function(e){switch(!P&&Math.max(Math.abs(e.x),Math.abs(e.y))>=o&&(P=Math.abs(e.x)=o?{x:0,y:u.y}:Math.abs(u.y)=o?{x:u.x,y:0}:u),0t.left&&i.leftt.top&&i.top=t.length?null:t[e.fillBetween]:null}(t,e.getData());if(o){for(var n,a,r,s,l,c,u,p,h=i.pointsize,d=i.points,f=o.datapoints.pointsize,m=o.datapoints.points,g=[],x=t.lines.show,v=2=d.length);){if(u=g.length,null==d[w]){for(p=0;p=m.length){if(!x)for(p=0;p=m.length);){if(h=v.length,null==m[S]){for(d=0;d=x.length){if(!b)for(d=0;dt)&&(n=e,c=f,u=m,p=(o=i).offset(),h={left:0,top:0},g=a(n)/c.prevDistance,x=a(n),h.left=l(n,"pinch").x-p.left,h.top=l(n,"pinch").y-p.top,o.zoom({center:h,amount:g,axes:u.touchedAxis}),c.prevDistance=x,f.zoomEnable=!0),d=null},1e3/60))},end:function(e){d&&(clearTimeout(d),d=null),b(e),f.prevDistance=null}},h={recenterPlot:function(t){t&&t.detail&&"touchstart"===t.detail.type&&function(t,i,n,a){var r,s,l,c,u;(l=i,c=a,void 0!==(u=(s=t).getTouchedAxis(l.detail.firstTouch.x,l.detail.firstTouch.y))[0]&&(c.prevTouchedAxis=u[0].direction),void 0!==(u=s.getTouchedAxis(l.detail.secondTouch.x,l.detail.secondTouch.y))[0]&&(c.touchedAxis=u,c.currentTouchedAxis=u[0].direction),o(c)&&(c.touchedAxis=null,c.prevTouchedAxis="none",c.currentTouchedAxis="none"),"x"===a.currentTouchedAxis&&"x"===a.prevTouchedAxis||"y"===a.currentTouchedAxis&&"y"===a.prevTouchedAxis||"none"===a.currentTouchedAxis&&"none"===a.prevTouchedAxis)&&(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 o(e){return!e.touchedAxis||0===e.touchedAxis.length}function n(e,t,i,o){var n,a=l(e,t);switch(o.navigationConstraint){case"unconstrained":o.touchedAxis=null,i.prevTapPosition={x:i.prevPanPosition.x,y:i.prevPanPosition.y},i.prevPanPosition={x:a.x,y:a.y};break;case"axisConstrained":n=o.touchedAxis[0].direction,o.currentTouchedAxis=n,i.prevTapPosition[n]=i.prevPanPosition[n],i.prevPanPosition[n]=a[n]}}function a(e){var t,i,o,n,a=e.detail.touches[0],r=e.detail.touches[1];return t=a.pageX,i=a.pageY,o=r.pageX,n=r.pageY,Math.sqrt((t-o)*(t-o)+(i-n)*(i-n))}function r(e,t,i,o){var n=l(e,t);switch(o.navigationConstraint){case"unconstrained":i.prevPanPosition.x=n.x,i.prevPanPosition.y=n.y;break;case"axisConstrained":i.prevPanPosition[o.currentTouchedAxis]=n[o.currentTouchedAxis]}}function s(e,t,i){var o=l(e,t);return{x:o.x-i.prevPanPosition.x,y:o.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){var t=e.plot.browser;function i(e,i){var a=[],r={click:"click",hover:"hover"},s=e.getPlaceholder()[0].lastMouseMoveEvent;e.highlight=m,e.unhighlight=g;var l=function(t){var i=e.getOptions(),o=new CustomEvent("mouseevent");return o.pageX=t.detail.changedTouches[0].pageX,o.pageY=t.detail.changedTouches[0].pageY,o.clientX=t.detail.changedTouches[0].clientX,o.clientY=t.detail.changedTouches[0].clientY,i.grid.hoverable&&c(o,r.hover,30),!1};function c(t,i,o){var n=e.getData();if(void 0!==t&&0s.max||rl.max)){var u=t.points.radius+t.points.lineWidth/2;o.lineWidth=u,o.strokeStyle=c;var p=1.5*u;a=s.p2c(a),r=l.p2c(r),o.beginPath();var h=t.points.symbol;"circle"===h?o.arc(a,r,p,0,2*Math.PI,!1):"string"==typeof h&&n.drawSymbol&&n.drawSymbol[h]&&n.drawSymbol[h](o,a,r,p,!1),o.closePath(),o.stroke()}}function n(t,i,o){var n,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":n=0;break;case"right":n=-s;break;default:n=-s/2}o.lineWidth=t.bars.lineWidth,o.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,n,n+s,function(){return r},t.xaxis,t.yaxis,o,t.bars.horizontal,t.bars.lineWidth)}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(i)},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery),function(e){function t(e,t){var i,o={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},n=20,a=500;function r(t){var r=e.getOptions();(r.pan.active||r.zoom.active)&&(3<=t.touches.length?o.isUnsupportedGesture=!0:o.isUnsupportedGesture=!1,i.dispatchEvent(new CustomEvent("touchevent",{detail:t})),x(t)?s(t,"pinch"):(s(t,"pan"),g(t)||(function(e){var t=(new Date).getTime(),i=t-o.prevTapTime;return 0<=i&&i=h);++f);var m=d[f][0],g=d[f][1];if("year"===g){if(null!==o.minTickSize&&void 0!==o.minTickSize&&"year"===o.minTickSize[1])m=Math.floor(o.minTickSize[0]);else{var x=Math.pow(10,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=o.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=o&&"seconds"===o.timeBase?w/1e3:o&&"microseconds"===o.timeBase?1e3*w:w,n.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"===o.timeBase?c.setTime(1e3*(M+y)):"microseconds"===o.timeBase?c.setTime((M+y)/1e3):c.setTime(M+y)}while(M=i&&Math.abs(t.second.y-t.first.y)>=i}e.clearSelection=f,e.setSelection=function(i,o){var n;"y"===p(e)?(t.first.x=0,t.second.x=e.width()):(n=m(i,"x"),t.first.x=n.axis.p2c(n.from),t.second.x=n.axis.p2c(n.to)),"x"===p(e)?(t.first.y=0,t.second.y=e.height()):(n=m(i,"y"),t.first.y=n.axis.p2c(n.from),t.second.y=n.axis.p2c(n.to)),t.show=!0,e.triggerRedrawOverlay(),!o&&g()&&c()},e.getSelection=l,e.hooks.bindEvents.push(function(e,t){null!=e.getOptions().selection.mode&&(t.mousemove(r),t.mousedown(s))}),e.hooks.drawOverlay.push(function(e,i){if(t.show&&g()){var o=e.getPlotOffset(),n=e.getOptions();i.save(),i.translate(o.left,o.top);var r=a.color.parse(n.selection.color);i.strokeStyle=r.scale("a",1).toString(),i.lineWidth=1,i.lineJoin=n.selection.shape,i.fillStyle=r.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,h=Math.abs(t.second.x-t.first.x)-1,d=Math.abs(t.second.y-t.first.y)-1;"x"===p(e)&&(d+=c,c=0),"y"===p(e)&&(h+=s,s=0),i.fillRect(0,0,e.width(),e.height()),i.clearRect(s,c,h,d),f=i,m=s,x=c,v=h,b=d,y=l,w=u,k=p(e),T=Math.max(0,Math.min(15,v/2-2,b/2-2)),f.fillStyle="#ffffff","xy"===k&&(f.beginPath(),f.moveTo(m,x+T),f.lineTo(m-3,x+T),f.lineTo(m-3,x-3),f.lineTo(m+T,x-3),f.lineTo(m+T,x),f.lineTo(m,x),f.closePath(),f.moveTo(m,x+b-T),f.lineTo(m-3,x+b-T),f.lineTo(m-3,x+b+3),f.lineTo(m+T,x+b+3),f.lineTo(m+T,x+b),f.lineTo(m,x+b),f.closePath(),f.moveTo(m+v,x+T),f.lineTo(m+v+3,x+T),f.lineTo(m+v+3,x-3),f.lineTo(m+v-T,x-3),f.lineTo(m+v-T,x),f.lineTo(m+v,x),f.closePath(),f.moveTo(m+v,x+b-T),f.lineTo(m+v+3,x+b-T),f.lineTo(m+v+3,x+b+3),f.lineTo(m+v-T,x+b+3),f.lineTo(m+v-T,x+b),f.lineTo(m+v,x+b),f.closePath(),f.stroke(),f.fill()),m=y,x=w,"x"===k&&(f.beginPath(),f.moveTo(m,x+15),f.lineTo(m,x-15),f.lineTo(m-3,x-15),f.lineTo(m-3,x+15),f.closePath(),f.moveTo(m+v,x+15),f.lineTo(m+v,x-15),f.lineTo(m+v+3,x-15),f.lineTo(m+v+3,x+15),f.closePath(),f.stroke(),f.fill()),"y"===k&&(f.beginPath(),f.moveTo(m-15,x),f.lineTo(m+15,x),f.lineTo(m+15,x-3),f.lineTo(m-15,x-3),f.closePath(),f.moveTo(m-15,x+b),f.lineTo(m+15,x+b),f.lineTo(m+15,x+b+3),f.lineTo(m-15,x+b+3),f.closePath(),f.stroke(),f.fill()),i.restore()}var f,m,x,v,b,y,w,k,T}),e.hooks.shutdown.push(function(e,t){t.unbind("mousemove",r),t.unbind("mousedown",s),n&&a(document).unbind("mouseup",n)})},options:{selection:{mode:null,color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"}),function(e){var t=-100,i=0,o=-1,n=-2,a=1,r=e.plot.browser,s=r.getPixelRatio;function l(e,t){var l=e.filter(c);a=s(t.getContext("2d"));var f,m=l.map(function(e){var t,i,o=new Image;return new Promise((i=e,(t=o).sourceDescription='',t.sourceComponent=i,function(e,o){var n,a,s,l,c,d,f,m,g,x,v,b;t.onload=function(i){t.successfullyLoaded=!0,e(t)},t.onabort=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},t.onerror=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},a=t,"CANVAS"===(n=i).tagName&&(s=n,a.src=s.toDataURL("image/png")),"svg"===n.tagName&&(l=n,c=a,r.isSafari()||r.isMobileSafari()?(d=l,f=c,x=h(x=p(u(document),d)),g=function(e){for(var t="",i=new Uint8Array(e),o=0;oe[h].genLeft&&(l=e[h].genLeft),c>e[h].genTop&&(c=e[h].genTop);for(h=1;h',"",t.innerHTML,""].join("\n")}function h(e){var t="";return e.match(/^]+xmlns="http:\/\/www\.w3\.org\/2000\/svg"/)||(t=e.replace(/^]+"http:\/\/www\.w3\.org\/1999\/xlink"/)||(t=e.replace(/^\r\n'+t}function d(){return t}e.plot.composeImages=l,e.plot.plugins.push({init:function(e){e.composeImages=l},name:"composeImages",version:"1.0"})}(jQuery),function(e){function t(e){var t="",i=e.name,o=e.xPos,n=e.yPos,a=e.fillColor,r=e.strokeColor,s=e.strokeWidth;switch(i){case"circle":t='';break;case"diamond":t='';break;case"cross":t='';break;case"rectangle":t='';break;case"plus":t='';break;case"bar":t='';break;case"area":t='';break;case"line":t='';break;default:t=''}return t}function i(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 n=o.getOptions(),a=o.getData(),r=n.legend.labelFormatter,s=n.legend.legendEntries,l=n.legend.plotOffset,c=function(t,i,o){var n=i,a=t.map(function(e,t){return{label:(n?n(e.label,e):e.label)||"Plot "+(t+1),color:e.color,options:{lines:e.lines,points:e.points,bars:e.bars}}});if(o)if(e.isFunction(o))a.sort(o);else if("reverse"===o)a.reverse();else{var r="descending"!==o;a.sort(function(e,t){return e.label===t.label?0:e.label',p[d++]='',p[d++]='';for(var v=0;v'+x.label+"",p[d++]=""+l+s+"";p[d++]="",null==g[0]&&(g=[g,g]),"n"===m.charAt(0)?f+="top:"+(g[1]+u.top)+"px;":"s"===m.charAt(0)&&(f+="bottom:"+(g[1]+u.bottom)+"px;"),"e"===m.charAt(1)?f+="right:"+(g[0]+u.right)+"px;":"w"===m.charAt(1)&&(f+="left:"+(g[0]+u.left)+"px;");var b,y=3+h/2,w=1.6*c.length;o.legend.container?(b=e(p.join("")).appendTo(o.legend.container)[0],o.legend.container.style.width=y+"em",o.legend.container.style.height=w+"em"):((b=e('
'+p.join("")+"
").appendTo(n)).css("width",y+"em"),b.css("height",w+"em"),b.css("pointerEvents","none"))}}(o,n,o.getPlaceholder(),c)})},options:{legend:{show:!1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery)},480:function(e,t){!function(e){var t=10,i=.95;var o={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"
"+e+"
"+Math.round(t.percent)+"%
"},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(o){var n=null,a=null,r=null,s=null,l=null,c=null,u=!1,p=null,h=[];function d(t,i,o){u||(u=!0,n=t.getCanvas(),a=e(n).parent(),r=t.getOptions(),t.setData(function(t){var i,o,n=0,a=0,s=0,l=r.series.pie.combine.color,c=[];for(i=0;ir.series.pie.combine.threshold)&&c.push(e.extend(t[i],{data:[[1,o]],color:t[i].color,label:t[i].label,angle:o*Math.PI*2/n,percent:o/(n/100)}));return s>1&&c.push({data:[[1,a]],color:l,label:r.series.pie.combine.label,angle:a*Math.PI*2/n,percent:a/(n/100)}),c}(t.getData())))}function f(o,n){if(a){var h=o.getPlaceholder().width(),d=o.getPlaceholder().height(),f=a.children().filter(".legend").children().width()||0;p=n,u=!1,s=Math.min(h,d/r.series.pie.tilt)/2,c=d/2+r.series.pie.offset.top,l=h/2,"auto"===r.series.pie.offset.left?(r.legend.position.match("w")?l+=f/2:l-=f/2,lh-s&&(l=h-s)):l+=r.series.pie.offset.left;var g=o.getData(),x=0;do{x>0&&(s*=i),x+=1,v(),r.series.pie.tilt<=.8&&b()}while(!y()&&x=t&&(v(),a.prepend("
Could not draw pie with labels contained inside canvas
")),o.setSeries&&o.insertLegend&&(o.setSeries(g),o.insertLegend())}function v(){p.clearRect(0,0,h,d),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=r.series.pie.shadow.left,t=r.series.pie.shadow.top,i=r.series.pie.shadow.alpha,o=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;if(!(o>=h/2-e||o*r.series.pie.tilt>=d/2-t||o<=10)){p.save(),p.translate(e,t),p.globalAlpha=i,p.fillStyle="#000",p.translate(l,c),p.scale(1,r.series.pie.tilt);for(var n=1;n<=10;n++)p.beginPath(),p.arc(0,0,o,0,2*Math.PI,!1),p.fill(),o-=n;p.restore()}}function y(){var t,i=Math.PI*r.series.pie.startAngle,o=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;p.save(),p.translate(l,c),p.scale(1,r.series.pie.tilt),p.save();var n=i;for(t=0;t0){for(p.save(),p.lineWidth=r.series.pie.stroke.width,n=i,t=0;t1?r.series.pie.label.radius:s*r.series.pie.label.radius,n=0;n=100*r.series.pie.label.threshold&&!u(g[n],t,n))return!1;t+=g[n].angle}return!0;function u(t,i,n){if(0===t.data[0][1])return!0;var s,u=r.legend.labelFormatter,p=r.series.pie.label.formatter;s=u?u(t.label,t):t.label,p&&(s=p(s,t));var f=(i+t.angle+i)/2,m=l+Math.round(Math.cos(f)*o),g=c+Math.round(Math.sin(f)*o)*r.series.pie.tilt,x=""+s+"";a.append(x);var v=a.children("#pieLabel"+n),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||d-(b+v.height())<0||h-(y+v.width())<0)return!1;if(0!==r.series.pie.label.background.opacity){var w=r.series.pie.label.background.color;null==w&&(w=t.color);var k="top:"+b+"px;left:"+y+"px;";e("
").css("opacity",r.series.pie.label.background.opacity).insertBefore(v)}return!0}}();function u(e,t,i){e<=0||isNaN(e)||(i?p.fillStyle=t:(p.strokeStyle=t,p.lineJoin="round"),p.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&p.moveTo(0,0),p.arc(0,0,o,n,n+e/2,!1),p.arc(0,0,o,n+e/2,n+e,!1),p.closePath(),n+=e,i?p.fill():p.stroke())}}}function m(e){if(r.series.pie.innerRadius>0){e.save();var t=r.series.pie.innerRadius>1?r.series.pie.innerRadius:s*r.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=r.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=r.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function g(e,t){for(var i=!1,o=-1,n=e.length,a=n-1;++o1?r.series.pie.radius:s*r.series.pie.radius,h=0;h1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),o.hooks.bindEvents.push(function(e,t){var i=e.getOptions();i.series.pie.show&&(i.grid.hoverable&&t.unbind("mousemove").mousemove(x),i.grid.clickable&&t.unbind("click").click(v))}),o.hooks.processDatapoints.push(function(e,t,i,o){e.getOptions().series.pie.show&&d(e)}),o.hooks.drawOverlay.push(function(e,t){e.getOptions().series.pie.show&&function(e,t){var i=e.getOptions(),o=i.series.pie.radius>1?i.series.pie.radius:s*i.series.pie.radius;t.save(),t.translate(l,c),t.scale(1,i.series.pie.tilt);for(var n=0;n1e-9&&t.moveTo(0,0),t.arc(0,0,o,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,o,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill())}m(t),t.restore()}(e,t)}),o.hooks.draw.push(function(e,t){e.getOptions().series.pie.show&&f(e,t)})},options:o,name:"pie",version:"1.1"})}(jQuery)},481:function(e,t){!function(e){function t(e,t,i,o){var n="categories"===t.xaxis.options.mode,a="categories"===t.yaxis.options.mode;if(n||a){var r=o.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)}o.format=r}for(var c=0;c=e.min&&o<=e.max&&t.push([o,i])}return t.sort(function(e,t){return e[0]-t[0]}),t}function o(t,o,n){if("categories"===t[o].options.mode){if(!t[o].categories){var a={},r=t[o].options.categories||{};if(e.isArray(r))for(var s=0;st&&(t=e[i]);return t+1}(i),l=0;l=0;s--){var p=e(n[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!==o&&(r&&(null==i||i-r<1e3)?o=t.requestAnimationFrame(d):(o=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);n.push(this),t.data(c,{w:t.width(),h:t.height()}),1===n.length&&(o=i,d())},teardown:function(){if(!a[h]&&this[s])return!1;for(var t=e(this),i=n.length-1;i>=0;i--)if(n[i]==this){n.splice(i,1);break}t.removeData(c),n.length||(r?cancelAnimationFrame(o):clearTimeout(o),o=null)},add:function(t){if(!a[h]&&this[s])return!1;var o;function n(t,n,a){var r=e(this),s=r.data(c)||{};s.w=n!==i?n:r.width(),s.h=a!==i?a:r.height(),o.apply(this,arguments)}if(e.isFunction(t))return o=t,n;o=t.handler,t.handler=n}},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),function(e){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"})}()},62:function(e,t){!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,o=e.plot.plugins.length;if(this.plotPlugins=[],o)for(var n=0;n=n.x&&(a=u-1,s=u);if(-1!==s){var p={x:o.data[a][0],y:o.data[a][1]},h={x:o.data[s][0],y:o.data[s][1]},d=function(e,t,i,o,n,a,s){if(!s||(s=function(e,t,i,o,n,a){if(void 0!==i)return{x:i,y:t};if(void 0!==o)return{x:e,y:o};var r,s=-1/((a-o)/(n-i));return{x:r=(n*(e*s-t+o)+i*(e*-s+t-a))/(s*(n-i)+o-a),y:s*r-s*e+t}}(e,t,i,o,n,a)).x>=Math.min(i,n)&&s.x<=Math.max(i,n)&&s.y>=Math.min(o,a)&&s.y<=Math.max(o,a)){var l=o-a,c=n-i,u=i*a-o*n;return Math.abs(l*e+c*t+u)/Math.sqrt(l*l+c*c)}var p=r(e,t,i,o),h=r(e,t,n,a);return p>h?h:p}(o.xaxis.p2c(n.x),o.yaxis.p2c(n.y),o.xaxis.p2c(p.x),o.yaxis.p2c(p.y),o.xaxis.p2c(h.x),o.yaxis.p2c(h.y),!1);if(de(window)[i.wfunc]()-n&&(t.x-=n,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,o,n){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("
");return this.tooltipOptions&&this.tooltipOptions.cssClass&&0===(t=e("."+this.tooltipOptions.cssClass)).length&&((t=e("
").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,o,n,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],o=t.datapoint[1],n=t.datapoint[2]):void 0!==t.series.curvedLines?(i=t.datapoint[0],o=t.datapoint[1]):void 0!==t.series.lines&&t.series.lines.steps?(i=t.series.datapoints.points[2*t.dataIndex],o=t.series.datapoints.points[2*t.dataIndex+1],n=""):(i=t.series.data[t.dataIndex][0],o=t.series.data[t.dataIndex][1],n=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,o,t)),"boolean"==typeof e&&!e)return"";if(n&&(e=e.replace("%ct",n)),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(o,this.tooltipOptions.yDateFormat,t.series.yaxis.options))),"number"==typeof i&&(e=this.adjustValPrecision(p,e,i)),"number"==typeof o&&(e=this.adjustValPrecision(h,e,o)),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)===o&&(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(o,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,o){var n=e.plot.dateGenerator(t,o);return e.plot.formatDate(n,i,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},i.prototype.adjustValPrecision=function(e,t,i){var o;return null!==t.match(e)&&""!==RegExp.$1&&(o=RegExp.$1,i=i.toFixed(o),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)}})});