text: var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,l,d){f!=Array.prototype&&f!=Object.prototype&&(f[l]=d.value)};
  $jscomp.getGlobal=function(f){f=["object"==typeof globalThis&&globalThis,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,f];for(var l=0;l<f.length;++l){var d=f[l];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
  $jscomp.polyfill=function(f,l,d,g){if(l){d=$jscomp.global;f=f.split(".");for(g=0;g<f.length-1;g++){var a=f[g];a in d||(d[a]={});d=d[a]}f=f[f.length-1];g=d[f];l=l(g);l!=g&&null!=l&&$jscomp.defineProperty(d,f,{configurable:!0,writable:!0,value:l})}};$jscomp.polyfill("Array.prototype.fill",function(f){return f?f:function(f,d,g){var a=this.length||0;0>d&&(d=Math.max(0,a+d));if(null==g||g>a)g=a;g=Number(g);0>g&&(g=Math.max(0,a+g));for(d=Number(d||0);d<g;d++)this[d]=f;return this}},"es6","es3");
  (function(f){function l(a){this.options=g.extend({},l.defaultOptions,a);this.disabled=!1;this.clear()}function d(a){this.options=g.extend({},d.defaultChartOptions,a);this.seriesSet=[];this.currentValueRange=1;this.lastChartTimestamp=this.lastRenderTimeMillis=this.currentVisMinValue=0;this.mousemove=this.mousemove.bind(this);this.mouseout=this.mouseout.bind(this);this.mousewheel=this.mousewheel.bind(this)}Date.now=Date.now||function(){return(new Date).getTime()};var g={extend:function(){arguments[0]=
  arguments[0]||{};for(var a=1;a<arguments.length;a++)for(var c in arguments[a])arguments[a].hasOwnProperty(c)&&(arguments[0][c]="object"===typeof arguments[a][c]?arguments[a][c]instanceof Array?arguments[a][c]:g.extend(arguments[0][c],arguments[a][c]):arguments[a][c]);return arguments[0]},binarySearch:function(a,c){for(var b=0,e=a.length;b<e;){var m=b+e>>1;c<a[m][0]?e=m:b=m+1}return b}};l.defaultOptions={resetBoundsInterval:3E3,resetBounds:!0};l.prototype.clear=function(){this.data=[];this.start_index=
  0;this.minValue=this.maxValue=Number.NaN};l.prototype.resetBounds=function(){if(this.data.length){this.start_index<this.data.length||(this.start_index=0);this.maxValue=this.data[this.start_index][1];this.minValue=this.data[this.start_index][1];for(var a=this.start_index+1;a<this.data.length;a++){var c=this.data[a][1];c>this.maxValue&&(this.maxValue=c);c<this.minValue&&(this.minValue=c)}}else this.minValue=this.maxValue=Number.NaN};l.prototype.append=function(a,c,b,e){for(var m=this.data.length-1;0<=
  m&&this.data[m][0]>a;)m--;e&&m+1<this.data.length&&this.data.splice(m+1,this.data.length-(m+1));-1===m?this.data.splice(0,0,[a,c]):0<this.data.length&&this.data[m][0]===a?b?(this.data[m][1]+=c,c=this.data[m][1]):this.data[m][1]=c:m<this.data.length-1?this.data.splice(m+1,0,[a,c]):this.data.push([a,c]);this.maxValue=isNaN(this.maxValue)?c:Math.max(this.maxValue,c);this.minValue=isNaN(this.minValue)?c:Math.min(this.minValue,c);this.dropOldData(a,2,3E5)};l.prototype.dropOldData=function(a,c,b){var e=
  0;for(0<this.data.length&&(a=Math.min(a,this.data[this.data.length-1][0]-2*b));this.data.length-e>=c&&this.data[e+1][0]<a;)e++;500<e&&this.data.splice(0,e)};l.prototype.startIndex=function(a){for(var c=this.data.length-1;0<=c&&this.data[c][0]>=a;)c--;return c+1};d.tooltipFormatter=function(a,c){a=[(this.options.timestampFormatter||d.timeFormatter)(new Date(a))];for(var b=0;b<c.length;++b)a.push('<span style="color:'+c[b].series.options.strokeStyle+'">'+this.options.yLabelFormatter(c[b].value,this.options.labels.precision)+
  "</span>");return a.join("<br>")};d.defaultChartOptions={millisPerPixel:20,minHistoryMillis:3E5,enableDpiScaling:!0,yMinFormatter:function(a,c){return parseFloat(a).toFixed(c)},yMaxFormatter:function(a,c){return parseFloat(a).toFixed(c)},yLabelFormatter:function(a,c){return parseFloat(a).toFixed(c)},yIntermediateFormatter:function(a,c){return parseFloat(a).toFixed(c)},maxValueScale:1,minValueScale:1,interpolation:"linear",scaleSmoothing:.1,maxDataSetLength:2,scrollBackwards:!1,displayDataFromPercentile:1,grid:{fillStyle:"#000000",strokeStyle:"#777777",lineWidth:1,
  sharpLines:!1,millisPerLine:1E3,verticalSections:2,borderVisible:!0},labels:{fillStyle:"#ffffff",disabled:!1,fontSize:10,fontFamily:"monospace",precision:4,showIntermediateLabels:!0,intermediateLabelSameAxis:!0},horizontalLines:[],tooltip:!0,tooltipLine:{lineWidth:1,strokeStyle:"#BBBBBB"},tooltipFormatter:d.tooltipFormatter,nonRealtimeData:!0,responsive:!1,limitFPS:25};d.AnimateCompatibility=function(){return{requestAnimationFrame:function(a,c){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||
  window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(b){return window.setTimeout(function(){b(Date.now())},16)}).call(window,a,c)},cancelAnimationFrame:function(a){return(window.cancelAnimationFrame||function(a){clearTimeout(a)}).call(window,a)}}}();d.defaultSeriesPresentationOptions={lineWidth:1,strokeStyle:"#ffffff"};d.prototype.addTimeSeries=function(a,c){this.seriesSet.push({timeSeries:a,options:g.extend({},d.defaultSeriesPresentationOptions,
  c)});a.options.resetBounds&&0<a.options.resetBoundsInterval&&(a.resetBoundsTimerId=setInterval(function(){a.resetBounds()},a.options.resetBoundsInterval))};d.prototype.removeTimeSeries=function(a){for(var c=this.seriesSet.length,b=0;b<c;b++)if(this.seriesSet[b].timeSeries===a){this.seriesSet.splice(b,1);break}a.resetBoundsTimerId&&clearInterval(a.resetBoundsTimerId)};d.prototype.getTimeSeriesOptions=function(a){for(var c=this.seriesSet.length,b=0;b<c;b++)if(this.seriesSet[b].timeSeries===a)return this.seriesSet[b].options};
  d.prototype.bringToFront=function(a){for(var c=this.seriesSet.length,b=0;b<c;b++)if(this.seriesSet[b].timeSeries===a){a=this.seriesSet.splice(b,1);this.seriesSet.push(a[0]);break}};d.prototype.streamTo=function(a,c){this.canvas=a;this.delay=c;this.start()};d.prototype.getTooltipEl=function(){this.tooltipEl||(this.tooltipEl=document.createElement("div"),this.tooltipEl.className="smoothie-chart-tooltip",this.tooltipEl.style.position="absolute",this.tooltipEl.style.display="none",this.tooltipEl.style.backgroundColor=
  "#0000007F",this.tooltipEl.style.zIndex=1E7,document.body.appendChild(this.tooltipEl));return this.tooltipEl};d.prototype.updateTooltip=function(){var a=this.getTooltipEl();if(this.mouseover&&this.options.tooltip){var c=this.lastChartTimestamp;c=this.options.scrollBackwards?c-this.mouseX*this.options.millisPerPixel:c-(this.canvas.offsetWidth-this.mouseX)*this.options.millisPerPixel;for(var b=[],e=0;e<this.seriesSet.length;e++){var m=this.seriesSet[e].timeSeries;if(!m.disabled){var d=g.binarySearch(m.data,
  c);0<d&&d<m.data.length&&b.push({series:this.seriesSet[e],index:d,value:m.data[d][1]})}}b.length?(a.innerHTML="<font color='white'>"+this.options.tooltipFormatter.call(this,c,b)+"</font>",a.style.display="block"):a.style.display="none"}else a.style.display="none"};d.prototype.mousemove=function(a){this.mouseover=!0;this.mouseX=a.offsetX;this.mouseY=a.offsetY;var c=this.getTooltipEl();this.updateTooltip();this.mousePageX=a.pageX+10;this.mousePageY=a.pageY-c.offsetHeight/2;c.style.top=Math.round(this.mousePageY)+
  "px";c.style.left=Math.round(this.mousePageX)+"px"};d.prototype.mouseout=function(a){this.mouseover=!1;this.mouseX=this.mouseY=-1;this.tooltipEl&&(this.tooltipEl.style.display="none")};d.prototype.mousewheel=function(a){this.options.millisPerPixel=0>(a.detail?-120*a.detail:a.wheelDelta)?this.options.millisPerPixel/1.1:1.1*this.options.millisPerPixel;this.options.millisPerPixel=Math.max(1,Math.min(this.options.millisPerPixel,1E3));if(a.preventDefault)a.preventDefault();else return!1};d.prototype.resize=
  function(){var a=this.options.enableDpiScaling&&window?window.devicePixelRatio:1;if(this.options.responsive){var c=this.canvas.offsetWidth;var b=this.canvas.offsetHeight;c!==this.lastWidth&&(this.lastWidth=c,this.canvas.setAttribute("width",Math.floor(c*a).toString()));b!==this.lastHeight&&(this.lastHeight=b,this.canvas.setAttribute("height",Math.floor(b*a).toString()))}else 1!==a&&(c=parseInt(this.canvas.getAttribute("width")),b=parseInt(this.canvas.getAttribute("height")),this.originalWidth&&Math.floor(this.originalWidth*
  a)===c||(this.originalWidth=c,this.canvas.setAttribute("width",Math.floor(c*a).toString()),this.canvas.style.width=c+"px",this.canvas.getContext("2d").scale(a,a)),this.originalHeight&&Math.floor(this.originalHeight*a)===b||(this.originalHeight=b,this.canvas.setAttribute("height",Math.floor(b*a).toString()),this.canvas.style.height=b+"px",this.canvas.getContext("2d").scale(a,a)))};d.prototype.start=function(){if(!this.frame){var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";
  this.canvas.attachEvent?(this.canvas.attachEvent("on"+a,this.mousewheel),this.canvas.addEventListener("onmousemove",this.mousemove),this.canvas.addEventListener("onmouseout",this.mouseout)):this.canvas.addEventListener&&(this.canvas.addEventListener(a,this.mousewheel,!1),this.canvas.addEventListener("mousemove",this.mousemove),this.canvas.addEventListener("mouseout",this.mouseout));var c=function(){this.frame=d.AnimateCompatibility.requestAnimationFrame(function(){if(this.options.nonRealtimeData){var b=
  new Date(0),a=this.seriesSet.reduce(function(b,a){a=a.timeSeries.data;var c=Math.round(this.options.displayDataFromPercentile*a.length)-1;c=0<=c?c:0;c=c<=a.length-1?c:a.length-1;a&&0<a.length&&(a=a[c][0],b=b>a?b:a);return b}.bind(this),b);this.render(this.canvas,a>b?a:null)}else this.render();c()}.bind(this))}.bind(this);c()}};d.prototype.stop=function(){this.frame&&(d.AnimateCompatibility.cancelAnimationFrame(this.frame),delete this.frame,this.canvas.removeEventListener("mousemove",this.mousemove),
  this.canvas.removeEventListener("mouseout",this.mouseout),this.canvas.removeEventListener("mousewheel",this.mousewheel))};d.prototype.restart=function(){this.frame&&d.AnimateCompatibility.cancelAnimationFrame(this.frame)};d.prototype.updateValueRange=function(){for(var a=this.options,c=Number.NaN,b=Number.NaN,e=0;e<this.seriesSet.length;e++){var d=this.seriesSet[e].timeSeries;d.disabled||(isNaN(d.maxValue)||(c=isNaN(c)?d.maxValue:Math.max(c,d.maxValue)),isNaN(d.minValue)||(b=isNaN(b)?d.minValue:Math.min(b,
  d.minValue)))}c=null!=a.maxValue?a.maxValue:c*a.maxValueScale;b=null!=a.minValue?a.minValue:b-Math.abs(b*a.minValueScale-b);this.options.yRangeFunction&&(c=this.options.yRangeFunction({min:b,max:c}),b=c.min,c=c.max);isNaN(c)||isNaN(b)||(e=c-b-this.currentValueRange,d=b-this.currentVisMinValue,this.isAnimatingScale=.1<Math.abs(e)||.1<Math.abs(d),this.currentValueRange+=a.scaleSmoothing*e,this.currentVisMinValue+=a.scaleSmoothing*d);this.valueRange={min:b,max:c}};d.prototype.render=function(a,c){if(!(a.isVisible instanceof
  Function)||a.isVisible()){var b=Date.now();if(!(0<this.options.limitFPS&&b-this.lastRenderTimeMillis<1E3/this.options.limitFPS||!this.isAnimatingScale&&b-this.lastRenderTimeMillis<Math.min(1E3/6,this.options.millisPerPixel))){this.resize();this.updateTooltip();this.lastRenderTimeMillis=b;a=a||this.canvas;c=c||b-(this.delay||0);this.lastChartTimestamp=c-=c%this.options.millisPerPixel;b=a.getContext("2d");var e=this.options,d=a.clientWidth,f=a.clientHeight;a=c-d*e.millisPerPixel;var g=function(a){a-=
  this.currentVisMinValue;return 0===this.currentValueRange?f:f-Math.round(a/this.currentValueRange*f)}.bind(this),l=function(a){return e.scrollBackwards?Math.round((c-a)/e.millisPerPixel):Math.round(d-(c-a)/e.millisPerPixel)};this.updateValueRange();b.font=e.labels.fontSize+"px "+e.labels.fontFamily;b.save();b.translate(0,0);b.beginPath();b.rect(0,0,d,f);b.clip();b.save();b.fillStyle=e.grid.fillStyle;b.clearRect(0,0,d,f);b.fillRect(0,0,d,f);b.restore();b.save();b.lineWidth=e.grid.lineWidth;b.strokeStyle=
  e.grid.strokeStyle;if(0<e.grid.millisPerLine){b.beginPath();for(var k=c-c%e.grid.millisPerLine;k>=a;k-=e.grid.millisPerLine){var h=l(k);e.grid.sharpLines&&(h-=.5);b.moveTo(h,0);b.lineTo(h,f)}b.stroke();b.closePath()}for(k=1;k<e.grid.verticalSections;k++)h=Math.round(k*f/e.grid.verticalSections),e.grid.sharpLines&&(h-=.5),b.beginPath(),b.moveTo(0,h),b.lineTo(d,h),b.stroke(),b.closePath();e.grid.borderVisible&&(b.beginPath(),b.strokeRect(0,0,d,f),b.closePath());b.restore();if(e.horizontalLines&&e.horizontalLines.length)for(k=
  0;k<e.horizontalLines.length;k++){h=e.horizontalLines[k];var n=Math.round(g(h.value))-.5;b.strokeStyle=h.color||"#ffffff";b.lineWidth=h.lineWidth||1;b.beginPath();b.moveTo(0,n);b.lineTo(d,n);b.stroke();b.closePath()}for(k=0;k<this.seriesSet.length;k++)if(b.save(),h=this.seriesSet[k].timeSeries,!h.disabled){n=h.data;var p=this.seriesSet[k].options;h.dropOldData(a,e.maxDataSetLength,e.minHistoryMillis);h.start_index=h.startIndex(a);b.lineWidth=p.lineWidth;b.strokeStyle=p.strokeStyle;b.beginPath();for(var x=
  0,w=0,v=0,u=h.start_index;u<n.length&&1!==n.length-h.start_index;u++){var q=l(n[u][0]),t=g(n[u][1]);if(u===h.start_index)x=q,b.moveTo(q,t);else switch(e.interpolation){case "linear":case "line":b.lineTo(q,t);break;default:b.bezierCurveTo(Math.round((w+q)/2),v,Math.round(w+q)/2,t,q,t);break;case "step":b.lineTo(q,v),b.lineTo(q,t)}w=q;v=t}1<n.length&&(p.fillStyle&&(b.lineTo(d+p.lineWidth+1,v),b.lineTo(d+p.lineWidth+1,f+p.lineWidth+1),b.lineTo(x,f+p.lineWidth),b.fillStyle=p.fillStyle,b.fill()),p.strokeStyle&&
  "none"!==p.strokeStyle&&b.stroke(),b.closePath());b.restore()}e.tooltip&&0<=this.mouseX&&(b.lineWidth=e.tooltipLine.lineWidth,b.strokeStyle=e.tooltipLine.strokeStyle,b.beginPath(),b.moveTo(this.mouseX,0),b.lineTo(this.mouseX,f),b.closePath(),b.stroke(),this.updateTooltip());if(!e.labels.disabled&&!isNaN(this.valueRange.min)&&!isNaN(this.valueRange.max)){g=e.yMaxFormatter(this.valueRange.max,e.labels.precision);var r=e.yMinFormatter(this.valueRange.min,e.labels.precision);k=e.scrollBackwards?0:d-b.measureText(g).width-
  2;h=e.scrollBackwards?0:d-b.measureText(r).width-2;b.fillStyle=e.labels.fillStyle;b.fillText(g,k,e.labels.fontSize);b.fillText(r,h,f-2)}if(e.labels.showIntermediateLabels&&!isNaN(this.valueRange.min)&&!isNaN(this.valueRange.max)&&0<e.grid.verticalSections)for(g=(this.valueRange.max-this.valueRange.min)/e.grid.verticalSections,n=f/e.grid.verticalSections,k=1;k<e.grid.verticalSections;k++)h=f-Math.round(k*n),e.grid.sharpLines&&(h-=.5),p=e.yIntermediateFormatter(this.valueRange.min+k*g,e.labels.precision),
  intermediateLabelPos=e.labels.intermediateLabelSameAxis?e.scrollBackwards?0:d-b.measureText(p).width-2:e.scrollBackwards?d-b.measureText(p).width-2:0,b.fillText(p,intermediateLabelPos,h-e.grid.lineWidth);if(e.timestampFormatter&&0<e.grid.millisPerLine)for(r=e.scrollBackwards?b.measureText(r).width:d-b.measureText(r).width+4,k=c-c%e.grid.millisPerLine;k>=a;k-=e.grid.millisPerLine)if(h=l(k),!e.scrollBackwards&&h<r||e.scrollBackwards&&h>r)g=e.timestampFormatter(new Date(k)),n=b.measureText(g).width,
  r=e.scrollBackwards?h+n+2:h-n-2,b.fillStyle=e.labels.fillStyle,e.scrollBackwards?b.fillText(g,h,f-2):b.fillText(g,h-n,f-2);b.restore()}}};d.timeFormatter=function(a){function c(a){return(10>a?"0":"")+a}return c(a.getHours())+":"+c(a.getMinutes())+":"+c(a.getSeconds())};f.TimeSeries=l;f.SmoothieChart=d})("undefined"===typeof exports?this:exports);
  