From eebfd3c4354199437468e9dd2b9729858cb204d9 Mon Sep 17 00:00:00 2001 From: Sabina Mollenhauer Date: Thu, 20 Jun 2019 12:02:34 +0200 Subject: [PATCH 1/8] created dummy server and modified contrast switch --- dist/bundle.js | 26 +- dummyServer.js | 82 ++ package-lock.json | 1729 +++++++++++++++++++++++---------- package.json | 4 +- src/components/GraphSignal.js | 14 +- src/container/App.css | 29 +- src/container/App.js | 45 +- src/utils/ContrastSwitch.js | 5 +- src/utils/IconBar.js | 68 -- 9 files changed, 1394 insertions(+), 608 deletions(-) create mode 100644 dummyServer.js delete mode 100644 src/utils/IconBar.js diff --git a/dist/bundle.js b/dist/bundle.js index 6d1ef6b..579fbca 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,24 +1,24 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=47)}([function(e,t,n){"use strict";n.d(t,"g",function(){return i}),n.d(t,"H",function(){return o}),n.d(t,"I",function(){return l}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"h",function(){return d}),n.d(t,"x",function(){return f}),n.d(t,"i",function(){return p}),n.d(t,"O",function(){return h}),n.d(t,"k",function(){return g}),n.d(t,"z",function(){return v}),n.d(t,"v",function(){return y}),n.d(t,"L",function(){return m}),n.d(t,"M",function(){return _}),n.d(t,"t",function(){return b}),n.d(t,"u",function(){return x}),n.d(t,"E",function(){return w}),n.d(t,"G",function(){return k}),n.d(t,"w",function(){return S}),n.d(t,"d",function(){return C}),n.d(t,"e",function(){return E}),n.d(t,"q",function(){return P}),n.d(t,"j",function(){return A}),n.d(t,"p",function(){return L}),n.d(t,"R",function(){return R}),n.d(t,"S",function(){return M}),n.d(t,"A",function(){return I}),n.d(t,"C",function(){return F}),n.d(t,"l",function(){return H}),n.d(t,"m",function(){return U}),n.d(t,"y",function(){return Y}),n.d(t,"n",function(){return V}),n.d(t,"P",function(){return B}),n.d(t,"F",function(){return X}),n.d(t,"a",function(){return G}),n.d(t,"s",function(){return Z}),n.d(t,"D",function(){return $}),n.d(t,"Q",function(){return J}),n.d(t,"B",function(){return ee}),n.d(t,"N",function(){return te}),n.d(t,"K",function(){return ae}),n.d(t,"J",function(){return oe}),n.d(t,"o",function(){return se}),n.d(t,"r",function(){return ue});var r=n(2),i=10,a=Math.log(i),o=function(e){return Math.log(e)/a},l=function(e,t,n){var r=o(e),a=r+n*(o(t)-r);return Math.pow(i,a)},s=[7,3],u=[7,2,2,2],c=1,d=2,f=function(e){return e.getContext("2d")},p=function(e,t,n){e.addEventListener(t,n,!1)}; +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=46)}([function(e,t,n){"use strict";n.d(t,"g",function(){return i}),n.d(t,"H",function(){return o}),n.d(t,"I",function(){return l}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"h",function(){return d}),n.d(t,"x",function(){return f}),n.d(t,"i",function(){return p}),n.d(t,"O",function(){return h}),n.d(t,"k",function(){return g}),n.d(t,"z",function(){return v}),n.d(t,"v",function(){return y}),n.d(t,"L",function(){return m}),n.d(t,"M",function(){return _}),n.d(t,"t",function(){return b}),n.d(t,"u",function(){return x}),n.d(t,"E",function(){return w}),n.d(t,"G",function(){return k}),n.d(t,"w",function(){return S}),n.d(t,"d",function(){return E}),n.d(t,"e",function(){return C}),n.d(t,"q",function(){return P}),n.d(t,"j",function(){return N}),n.d(t,"p",function(){return L}),n.d(t,"R",function(){return R}),n.d(t,"S",function(){return M}),n.d(t,"A",function(){return F}),n.d(t,"C",function(){return I}),n.d(t,"l",function(){return H}),n.d(t,"m",function(){return U}),n.d(t,"y",function(){return Y}),n.d(t,"n",function(){return V}),n.d(t,"P",function(){return j}),n.d(t,"F",function(){return X}),n.d(t,"a",function(){return G}),n.d(t,"s",function(){return Z}),n.d(t,"D",function(){return $}),n.d(t,"Q",function(){return J}),n.d(t,"B",function(){return ee}),n.d(t,"N",function(){return te}),n.d(t,"K",function(){return ae}),n.d(t,"J",function(){return oe}),n.d(t,"o",function(){return se}),n.d(t,"r",function(){return ue});var r=n(2),i=10,a=Math.log(i),o=function(e){return Math.log(e)/a},l=function(e,t,n){var r=o(e),a=r+n*(o(t)-r);return Math.pow(i,a)},s=[7,3],u=[7,2,2,2],c=1,d=2,f=function(e){return e.getContext("2d")},p=function(e,t,n){e.addEventListener(t,n,!1)}; /** * @license * Copyright 2011 Dan Vanderkam (danvdk@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) - */function h(e,t,n){e.removeEventListener(t,n,!1)}function g(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1}function v(e,t,n){var r,i,a;if(0===t)r=n,i=n,a=n;else{var o=Math.floor(6*e),l=6*e-o,s=n*(1-t),u=n*(1-t*l),c=n*(1-t*(1-l));switch(o){case 1:r=u,i=n,a=s;break;case 2:r=s,i=n,a=c;break;case 3:r=s,i=u,a=n;break;case 4:r=c,i=s,a=n;break;case 5:r=n,i=s,a=u;break;case 6:case 0:r=n,i=c,a=s}}return"rgb("+(r=Math.floor(255*r+.5))+","+(i=Math.floor(255*i+.5))+","+(a=Math.floor(255*a+.5))+")"}function y(e){var t=e.getBoundingClientRect(),n=window,r=document.documentElement;return{x:t.left+(n.pageXOffset||r.scrollLeft),y:t.top+(n.pageYOffset||r.scrollTop)}}function m(e){return!e.pageX||e.pageX<0?0:e.pageX}function _(e){return!e.pageY||e.pageY<0?0:e.pageY}function b(e,t){return m(e)-t.px}function x(e,t){return _(e)-t.py}function w(e){return!!e&&!isNaN(e)}function k(e,t){return!!e&&(null!==e.yval&&(null!==e.x&&void 0!==e.x&&(null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y)))))}function S(e,t){var n=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(n-1):e.toPrecision(n)}function T(e){return e<10?"0"+e:""+e}var C={getFullYear:e=>e.getFullYear(),getMonth:e=>e.getMonth(),getDate:e=>e.getDate(),getHours:e=>e.getHours(),getMinutes:e=>e.getMinutes(),getSeconds:e=>e.getSeconds(),getMilliseconds:e=>e.getMilliseconds(),getDay:e=>e.getDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(e,t,n,r,i,a,o)}},E={getFullYear:e=>e.getUTCFullYear(),getMonth:e=>e.getUTCMonth(),getDate:e=>e.getUTCDate(),getHours:e=>e.getUTCHours(),getMinutes:e=>e.getUTCMinutes(),getSeconds:e=>e.getUTCSeconds(),getMilliseconds:e=>e.getUTCMilliseconds(),getDay:e=>e.getUTCDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(Date.UTC(e,t,n,r,i,a,o))}};function O(e,t,n,r){var i=T(e)+":"+T(t);if(n&&(i+=":"+T(n),r)){var a=""+r;i+="."+("000"+a).substring(a.length)}return i}function P(e,t){var n=t?E:C,r=new Date(e),i=n.getFullYear(r),a=n.getMonth(r),o=n.getDate(r),l=n.getHours(r),s=n.getMinutes(r),u=n.getSeconds(r),c=n.getMilliseconds(r),d=""+i+"/"+T(a+1)+"/"+T(o);return 3600*l+60*s+u+.001*c&&(d+=" "+O(l,s,u,c)),d}function N(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function A(e,t,n,r,i){if(null!=r&&null!=i||(r=0,i=t.length-1),r>i)return-1;null==n&&(n=0);var a,o=function(e){return e>=0&&ee?n>0&&o(a=l-1)&&t[a]e?l:A(e,t,n,l+1,i):-1}function L(e){var t,n;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(n=D(e))&&!isNaN(n))return n;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");n=D(t)}else n=8==e.length?D(t=e.substr(0,4)+"/"+e.substr(4,2)+"/"+e.substr(6,2)):D(e);return n&&!isNaN(n)||console.error("Couldn't parse "+e+" as a date"),n}function D(e){return new Date(e).getTime()}function R(e,t){if(null!=t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function M(e,t){function n(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}if(null!=t)for(var r in t)t.hasOwnProperty(r)&&(null===t[r]?e[r]=null:I(t[r])?e[r]=t[r].slice():n(t[r])?e[r]=t[r]:"object"==typeof t[r]?("object"==typeof e[r]&&null!==e[r]||(e[r]={}),M(e[r],t[r])):e[r]=t[r]);return e}function I(e){var t=typeof e;return("object"==t||"function"==t&&"function"==typeof e.item)&&null!==e&&"number"==typeof e.length&&3!==e.nodeType}function F(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime}function H(e){for(var t=[],n=0;n=t||j.call(window,function(){var t=(new Date).getTime()-o;i=a;var u=(a=Math.floor(t/n))-i;a+u>l||a>=l?(e(l),r()):(0!==u&&e(a),s())})}()}else r()}var W={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0};function X(e,t){var n={};if(e)for(var r=1;r=Math.pow(10,a)||Math.abs(e)=0;p--,f/=s)if(d>=f){r=N(e/f,i)+u[p];break}if(l){var h=String(e.toExponential()).split("e-");2===h.length&&h[1]>=3&&h[1]<=24&&(r=h[1]%3>0?N(h[0]/K(10,h[1]%3),i):Number(h[0]).toFixed(2),r+=c[Math.floor(h[1]/3)-1])}}return r}function oe(e,t,n){return ae.call(this,e,n)}var le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(e,t,n){var i=n("labelsUTC")?E:C,a=i.getFullYear(e),o=i.getMonth(e),l=i.getDate(e),s=i.getHours(e),u=i.getMinutes(e),c=i.getSeconds(e),d=i.getMilliseconds(e);if(t>=r.a.DECADAL)return""+a;if(t>=r.a.MONTHLY)return le[o]+" "+a;if(0===3600*s+60*u+c+.001*d||t>=r.a.DAILY)return T(l)+" "+le[o];if(tr.a.MINUTELY?O(s,u,c,0):O(s,u,c,d)}function ue(e,t){return P(e,t("labelsUTC"))}},function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"a",function(){return l}),n.d(t,"c",function(){return b});var r=n(0),i=function(e,t,n,r,i,o){return a(e,t,n,function(e){return"logscale"!==e&&r(e)},i,o)},a=function(e,t,n,i,a,o){var l,s,u,c,d=i("pixelsPerLabel"),f=[];if(o)for(l=0;l=c/4){for(var v=h;v>=p;v--){var m=y[v],_=Math.log(m/e)/Math.log(t/e)*n,b={v:m};null===g?g={tickValue:m,pixel_coord:_}:Math.abs(_-g.pixel_coord)>=d?g={tickValue:m,pixel_coord:_}:b.label="",f.push(b)}f.reverse()}}if(0===f.length){var x,w;i("labelsKMG2")?(x=[1,2,4,8,16,32,64,128,256],w=16):(x=[1,2,5,10,20,50,100],w=10);var k,S,T,C=Math.ceil(n/d),E=Math.abs(t-e)/C,O=Math.floor(Math.log(E)/Math.log(w)),P=Math.pow(w,O);for(s=0;sd));s++);for(S>T&&(k*=-1),l=0;l<=c;l++)u=S+l*k,f.push({v:u})}}var N=i("axisLabelFormatter");for(l=0;l=0?b(e,t,o,r,i):[]},l={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29},s=0,u=1,c=2,d=3,f=4,p=5,h=6,g=7,v=[]; + */function h(e,t,n){e.removeEventListener(t,n,!1)}function g(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1}function v(e,t,n){var r,i,a;if(0===t)r=n,i=n,a=n;else{var o=Math.floor(6*e),l=6*e-o,s=n*(1-t),u=n*(1-t*l),c=n*(1-t*(1-l));switch(o){case 1:r=u,i=n,a=s;break;case 2:r=s,i=n,a=c;break;case 3:r=s,i=u,a=n;break;case 4:r=c,i=s,a=n;break;case 5:r=n,i=s,a=u;break;case 6:case 0:r=n,i=c,a=s}}return"rgb("+(r=Math.floor(255*r+.5))+","+(i=Math.floor(255*i+.5))+","+(a=Math.floor(255*a+.5))+")"}function y(e){var t=e.getBoundingClientRect(),n=window,r=document.documentElement;return{x:t.left+(n.pageXOffset||r.scrollLeft),y:t.top+(n.pageYOffset||r.scrollTop)}}function m(e){return!e.pageX||e.pageX<0?0:e.pageX}function _(e){return!e.pageY||e.pageY<0?0:e.pageY}function b(e,t){return m(e)-t.px}function x(e,t){return _(e)-t.py}function w(e){return!!e&&!isNaN(e)}function k(e,t){return!!e&&(null!==e.yval&&(null!==e.x&&void 0!==e.x&&(null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y)))))}function S(e,t){var n=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(n-1):e.toPrecision(n)}function T(e){return e<10?"0"+e:""+e}var E={getFullYear:e=>e.getFullYear(),getMonth:e=>e.getMonth(),getDate:e=>e.getDate(),getHours:e=>e.getHours(),getMinutes:e=>e.getMinutes(),getSeconds:e=>e.getSeconds(),getMilliseconds:e=>e.getMilliseconds(),getDay:e=>e.getDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(e,t,n,r,i,a,o)}},C={getFullYear:e=>e.getUTCFullYear(),getMonth:e=>e.getUTCMonth(),getDate:e=>e.getUTCDate(),getHours:e=>e.getUTCHours(),getMinutes:e=>e.getUTCMinutes(),getSeconds:e=>e.getUTCSeconds(),getMilliseconds:e=>e.getUTCMilliseconds(),getDay:e=>e.getUTCDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(Date.UTC(e,t,n,r,i,a,o))}};function O(e,t,n,r){var i=T(e)+":"+T(t);if(n&&(i+=":"+T(n),r)){var a=""+r;i+="."+("000"+a).substring(a.length)}return i}function P(e,t){var n=t?C:E,r=new Date(e),i=n.getFullYear(r),a=n.getMonth(r),o=n.getDate(r),l=n.getHours(r),s=n.getMinutes(r),u=n.getSeconds(r),c=n.getMilliseconds(r),d=""+i+"/"+T(a+1)+"/"+T(o);return 3600*l+60*s+u+.001*c&&(d+=" "+O(l,s,u,c)),d}function A(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function N(e,t,n,r,i){if(null!=r&&null!=i||(r=0,i=t.length-1),r>i)return-1;null==n&&(n=0);var a,o=function(e){return e>=0&&ee?n>0&&o(a=l-1)&&t[a]e?l:N(e,t,n,l+1,i):-1}function L(e){var t,n;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(n=D(e))&&!isNaN(n))return n;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");n=D(t)}else n=8==e.length?D(t=e.substr(0,4)+"/"+e.substr(4,2)+"/"+e.substr(6,2)):D(e);return n&&!isNaN(n)||console.error("Couldn't parse "+e+" as a date"),n}function D(e){return new Date(e).getTime()}function R(e,t){if(null!=t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function M(e,t){function n(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}if(null!=t)for(var r in t)t.hasOwnProperty(r)&&(null===t[r]?e[r]=null:F(t[r])?e[r]=t[r].slice():n(t[r])?e[r]=t[r]:"object"==typeof t[r]?("object"==typeof e[r]&&null!==e[r]||(e[r]={}),M(e[r],t[r])):e[r]=t[r]);return e}function F(e){var t=typeof e;return("object"==t||"function"==t&&"function"==typeof e.item)&&null!==e&&"number"==typeof e.length&&3!==e.nodeType}function I(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime}function H(e){for(var t=[],n=0;n=t||W.call(window,function(){var t=(new Date).getTime()-o;i=a;var u=(a=Math.floor(t/n))-i;a+u>l||a>=l?(e(l),r()):(0!==u&&e(a),s())})}()}else r()}var B={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0};function X(e,t){var n={};if(e)for(var r=1;r=Math.pow(10,a)||Math.abs(e)=0;p--,f/=s)if(d>=f){r=A(e/f,i)+u[p];break}if(l){var h=String(e.toExponential()).split("e-");2===h.length&&h[1]>=3&&h[1]<=24&&(r=h[1]%3>0?A(h[0]/K(10,h[1]%3),i):Number(h[0]).toFixed(2),r+=c[Math.floor(h[1]/3)-1])}}return r}function oe(e,t,n){return ae.call(this,e,n)}var le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(e,t,n){var i=n("labelsUTC")?C:E,a=i.getFullYear(e),o=i.getMonth(e),l=i.getDate(e),s=i.getHours(e),u=i.getMinutes(e),c=i.getSeconds(e),d=i.getMilliseconds(e);if(t>=r.a.DECADAL)return""+a;if(t>=r.a.MONTHLY)return le[o]+" "+a;if(0===3600*s+60*u+c+.001*d||t>=r.a.DAILY)return T(l)+" "+le[o];if(tr.a.MINUTELY?O(s,u,c,0):O(s,u,c,d)}function ue(e,t){return P(e,t("labelsUTC"))}},function(e,t,n){"use strict";e.exports=n(33)},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"a",function(){return l}),n.d(t,"c",function(){return b});var r=n(0),i=function(e,t,n,r,i,o){return a(e,t,n,function(e){return"logscale"!==e&&r(e)},i,o)},a=function(e,t,n,i,a,o){var l,s,u,c,d=i("pixelsPerLabel"),f=[];if(o)for(l=0;l=c/4){for(var v=h;v>=p;v--){var m=y[v],_=Math.log(m/e)/Math.log(t/e)*n,b={v:m};null===g?g={tickValue:m,pixel_coord:_}:Math.abs(_-g.pixel_coord)>=d?g={tickValue:m,pixel_coord:_}:b.label="",f.push(b)}f.reverse()}}if(0===f.length){var x,w;i("labelsKMG2")?(x=[1,2,4,8,16,32,64,128,256],w=16):(x=[1,2,5,10,20,50,100],w=10);var k,S,T,E=Math.ceil(n/d),C=Math.abs(t-e)/E,O=Math.floor(Math.log(C)/Math.log(w)),P=Math.pow(w,O);for(s=0;sd));s++);for(S>T&&(k*=-1),l=0;l<=c;l++)u=S+l*k,f.push({v:u})}}var A=i("axisLabelFormatter");for(l=0;l=0?b(e,t,o,r,i):[]},l={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29},s=0,u=1,c=2,d=3,f=4,p=5,h=6,g=7,v=[]; /** * @license * Copyright 2011 Dan Vanderkam (danvdk@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) - */v[l.MILLISECONDLY]={datefield:h,step:1,spacing:1},v[l.TWO_MILLISECONDLY]={datefield:h,step:2,spacing:2},v[l.FIVE_MILLISECONDLY]={datefield:h,step:5,spacing:5},v[l.TEN_MILLISECONDLY]={datefield:h,step:10,spacing:10},v[l.FIFTY_MILLISECONDLY]={datefield:h,step:50,spacing:50},v[l.HUNDRED_MILLISECONDLY]={datefield:h,step:100,spacing:100},v[l.FIVE_HUNDRED_MILLISECONDLY]={datefield:h,step:500,spacing:500},v[l.SECONDLY]={datefield:p,step:1,spacing:1e3},v[l.TWO_SECONDLY]={datefield:p,step:2,spacing:2e3},v[l.FIVE_SECONDLY]={datefield:p,step:5,spacing:5e3},v[l.TEN_SECONDLY]={datefield:p,step:10,spacing:1e4},v[l.THIRTY_SECONDLY]={datefield:p,step:30,spacing:3e4},v[l.MINUTELY]={datefield:f,step:1,spacing:6e4},v[l.TWO_MINUTELY]={datefield:f,step:2,spacing:12e4},v[l.FIVE_MINUTELY]={datefield:f,step:5,spacing:3e5},v[l.TEN_MINUTELY]={datefield:f,step:10,spacing:6e5},v[l.THIRTY_MINUTELY]={datefield:f,step:30,spacing:18e5},v[l.HOURLY]={datefield:d,step:1,spacing:36e5},v[l.TWO_HOURLY]={datefield:d,step:2,spacing:72e5},v[l.SIX_HOURLY]={datefield:d,step:6,spacing:216e5},v[l.DAILY]={datefield:c,step:1,spacing:864e5},v[l.TWO_DAILY]={datefield:c,step:2,spacing:1728e5},v[l.WEEKLY]={datefield:c,step:7,spacing:6048e5},v[l.MONTHLY]={datefield:u,step:1,spacing:2629817280},v[l.QUARTERLY]={datefield:u,step:3,spacing:216e5*365.2524},v[l.BIANNUAL]={datefield:u,step:6,spacing:432e5*365.2524},v[l.ANNUAL]={datefield:s,step:1,spacing:864e5*365.2524},v[l.DECADAL]={datefield:s,step:10,spacing:315578073600},v[l.CENTENNIAL]={datefield:s,step:100,spacing:3155780736e3};var y=function(){for(var e=[],t=-39;t<=39;t++)for(var n=Math.pow(10,t),r=1;r<=9;r++){var i=n*r;e.push(i)}return e}(),m=function(e,t,n,r){for(var i=r("pixelsPerLabel"),a=0;a=i)return a}return-1},_=function(e,t,n){var r=v[n].spacing;return Math.round(1*(t-e)/r)},b=function(e,t,n,i,a){var o=i("axisLabelFormatter"),y=i("labelsUTC")?r.e:r.d,m=v[n].datefield,_=v[n].step,b=v[n].spacing,x=new Date(e),w=[];w[s]=y.getFullYear(x),w[u]=y.getMonth(x),w[c]=y.getDate(x),w[d]=y.getHours(x),w[f]=y.getMinutes(x),w[p]=y.getSeconds(x),w[h]=y.getMilliseconds(x);var k=w[m]%_;n==l.WEEKLY&&(k=y.getDay(x)),w[m]-=k;for(var S=m+1;S=l.DAILY||y.getHours(C)%_==0)&&T.push({v:E,label:o.call(a,C,n,i,a)}),w[m]+=_,E=(C=y.makeDate.apply(null,w)).getTime();return T}},function(e,t,n){"use strict";var r=n(0),i={maybeTreatMouseOpAsClick:function(e,t,n){n.dragEndX=r.t(e,n),n.dragEndY=r.u(e,n);var a=Math.abs(n.dragEndX-n.dragStartX),o=Math.abs(n.dragEndY-n.dragStartY);a<2&&o<2&&void 0!==t.lastx_&&-1!=t.lastx_&&i.treatMouseOpAsClick(t,e,n),n.regionWidth=a,n.regionHeight=o},startPan:function(e,t,n){var i,a;n.isPanning=!0;var o=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(n.initialLeftmostDate=r.H(o[0]),n.dateRange=r.H(o[1])-r.H(o[0])):(n.initialLeftmostDate=o[0],n.dateRange=o[1]-o[0]),n.xUnitsPerPixel=n.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var l=t.width_*t.getNumericOption("panEdgeFraction"),s=t.xAxisExtremes(),u=t.toDomXCoord(s[0])-l,c=t.toDomXCoord(s[1])+l,d=t.toDataXCoord(u),f=t.toDataXCoord(c);n.boundedDates=[d,f];var p=[],h=t.height_*t.getNumericOption("panEdgeFraction");for(i=0;in.boundedDates[1]&&(a=(i-=a-n.boundedDates[1])+n.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(r.g,i),Math.pow(r.g,a)]:t.dateWindow_=[i,a],n.is2DPan)for(var o=n.dragEndY-n.dragStartY,l=0;l=i)return a}return-1},_=function(e,t,n){var r=v[n].spacing;return Math.round(1*(t-e)/r)},b=function(e,t,n,i,a){var o=i("axisLabelFormatter"),y=i("labelsUTC")?r.e:r.d,m=v[n].datefield,_=v[n].step,b=v[n].spacing,x=new Date(e),w=[];w[s]=y.getFullYear(x),w[u]=y.getMonth(x),w[c]=y.getDate(x),w[d]=y.getHours(x),w[f]=y.getMinutes(x),w[p]=y.getSeconds(x),w[h]=y.getMilliseconds(x);var k=w[m]%_;n==l.WEEKLY&&(k=y.getDay(x)),w[m]-=k;for(var S=m+1;S=l.DAILY||y.getHours(E)%_==0)&&T.push({v:C,label:o.call(a,E,n,i,a)}),w[m]+=_,C=(E=y.makeDate.apply(null,w)).getTime();return T}},function(e,t,n){"use strict";var r=n(0),i={maybeTreatMouseOpAsClick:function(e,t,n){n.dragEndX=r.t(e,n),n.dragEndY=r.u(e,n);var a=Math.abs(n.dragEndX-n.dragStartX),o=Math.abs(n.dragEndY-n.dragStartY);a<2&&o<2&&void 0!==t.lastx_&&-1!=t.lastx_&&i.treatMouseOpAsClick(t,e,n),n.regionWidth=a,n.regionHeight=o},startPan:function(e,t,n){var i,a;n.isPanning=!0;var o=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(n.initialLeftmostDate=r.H(o[0]),n.dateRange=r.H(o[1])-r.H(o[0])):(n.initialLeftmostDate=o[0],n.dateRange=o[1]-o[0]),n.xUnitsPerPixel=n.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var l=t.width_*t.getNumericOption("panEdgeFraction"),s=t.xAxisExtremes(),u=t.toDomXCoord(s[0])-l,c=t.toDomXCoord(s[1])+l,d=t.toDataXCoord(u),f=t.toDataXCoord(c);n.boundedDates=[d,f];var p=[],h=t.height_*t.getNumericOption("panEdgeFraction");for(i=0;in.boundedDates[1]&&(a=(i-=a-n.boundedDates[1])+n.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(r.g,i),Math.pow(r.g,a)]:t.dateWindow_=[i,a],n.is2DPan)for(var o=n.dragEndY-n.dragStartY,l=0;l=10&&n.dragDirection==r.f){var o=Math.min(n.dragStartX,n.dragEndX),l=Math.max(n.dragStartX,n.dragEndX);(o=Math.max(o,a.x))<(l=Math.min(l,a.x+a.w))&&t.doZoomX_(o,l),n.cancelNextDblclick=!0}else if(n.regionHeight>=10&&n.dragDirection==r.h){var s=Math.min(n.dragStartY,n.dragEndY),u=Math.max(n.dragStartY,n.dragEndY);(s=Math.max(s,a.y))<(u=Math.min(u,a.y+a.h))&&t.doZoomY_(s,u),n.cancelNextDblclick=!0}n.dragStartX=null,n.dragStartY=null},i.startTouch=function(e,t,n){e.preventDefault(),e.touches.length>1&&(n.startTimeForDoubleTapMs=null);for(var r=[],i=0;i=2){n.initialPinchCenter={pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY),dataX:.5*(r[0].dataX+r[1].dataX),dataY:.5*(r[0].dataY+r[1].dataY)};var o=180/Math.PI*Math.atan2(n.initialPinchCenter.pageY-r[0].pageY,r[0].pageX-n.initialPinchCenter.pageX);(o=Math.abs(o))>90&&(o=90-o),n.touchDirections={x:o<67.5,y:o>22.5}}n.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},i.moveTouch=function(e,t,n){n.startTimeForDoubleTapMs=null;var r,i=[];for(r=0;r=2){var h=u[1].pageX-c.pageX;l=(i[1].pageX-o.pageX)/h;var g=u[1].pageY-c.pageY;s=(i[1].pageY-o.pageY)/g}l=Math.min(8,Math.max(.125,l)),s=Math.min(8,Math.max(.125,s));var v=!1;if(n.touchDirections.x&&(t.dateWindow_=[c.dataX-d.dataX+(n.initialRange.x[0]-c.dataX)/l,c.dataX-d.dataX+(n.initialRange.x[1]-c.dataX)/l],v=!0),n.touchDirections.y)for(r=0;r<1;r++){var y=t.axes_[r];t.attributes_.getForAxis("logscale",r)||(y.valueRange=[c.dataY-d.dataY+(n.initialRange.y[0]-c.dataY)/s,c.dataY-d.dataY+(n.initialRange.y[1]-c.dataY)/s],v=!0)}if(t.drawGraph_(!1),v&&i.length>1&&t.getFunctionOption("zoomCallback")){var m=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,m[0],m[1],t.yAxisRanges())}},i.endTouch=function(e,t,n){if(0!==e.touches.length)i.startTouch(e,t,n);else if(1==e.changedTouches.length){var r=(new Date).getTime(),a=e.changedTouches[0];n.startTimeForDoubleTapMs&&r-n.startTimeForDoubleTapMs<500&&n.doubleTapX&&Math.abs(n.doubleTapX-a.screenX)<50&&n.doubleTapY&&Math.abs(n.doubleTapY-a.screenY)<50?t.resetZoom():(n.startTimeForDoubleTapMs=r,n.doubleTapX=a.screenX,n.doubleTapY=a.screenY)}};var a=function(e,t,n){return en?e-n:0};i.defaultModel={mousedown:function(e,t,n){if(!e.button||2!=e.button){n.initializeMouseDown(e,t,n),e.altKey||e.shiftKey?i.startPan(e,t,n):i.startZoom(e,t,n);var o=function(e){n.isZooming?function(e,t){var n=r.v(t.canvas_),i={left:n.x,right:n.x+t.canvas_.offsetWidth,top:n.y,bottom:n.y+t.canvas_.offsetHeight},o={x:r.L(e),y:r.M(e)},l=a(o.x,i.left,i.right),s=a(o.y,i.top,i.bottom);return Math.max(l,s)}(e,t)<100?i.moveZoom(e,t,n):null!==n.dragEndX&&(n.dragEndX=null,n.dragEndY=null,t.clearZoomRect_()):n.isPanning&&i.movePan(e,t,n)},l=function(e){n.isZooming?null!==n.dragEndX?i.endZoom(e,t,n):i.maybeTreatMouseOpAsClick(e,t,n):n.isPanning&&i.endPan(e,t,n),r.O(document,"mousemove",o),r.O(document,"mouseup",l),n.destroy()};t.addAndTrackEvent(document,"mousemove",o),t.addAndTrackEvent(document,"mouseup",l)}},willDestroyContextMyself:!0,touchstart:function(e,t,n){i.startTouch(e,t,n)},touchmove:function(e,t,n){i.moveTouch(e,t,n)},touchend:function(e,t,n){i.endTouch(e,t,n)},dblclick:function(e,t,n){if(n.cancelNextDblclick)n.cancelNextDblclick=!1;else{var r={canvasx:n.dragEndX,canvasy:n.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",r)||e.altKey||e.shiftKey||t.resetZoom()}}},i.nonInteractiveModel_={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n)},mouseup:i.maybeTreatMouseOpAsClick},i.dragIsPanInteractionModel={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n),i.startPan(e,t,n)},mousemove:function(e,t,n){n.isPanning&&i.movePan(e,t,n)},mouseup:function(e,t,n){n.isPanning&&i.endPan(e,t,n)}},t.a=i},function(e,t,n){"use strict";var r=n(5),i=n(10),a=function(){r.a.call(this)};(a.prototype=new r.a).extractSeries=function(e,t,n){},a.prototype.rollingAverage=function(e,t,n){},a.prototype.onPointsCreated_=function(e,t){for(var n=0;nr&&(s=r),ua)&&(a=u),(null===i||s=10&&n.dragDirection==r.f){var o=Math.min(n.dragStartX,n.dragEndX),l=Math.max(n.dragStartX,n.dragEndX);(o=Math.max(o,a.x))<(l=Math.min(l,a.x+a.w))&&t.doZoomX_(o,l),n.cancelNextDblclick=!0}else if(n.regionHeight>=10&&n.dragDirection==r.h){var s=Math.min(n.dragStartY,n.dragEndY),u=Math.max(n.dragStartY,n.dragEndY);(s=Math.max(s,a.y))<(u=Math.min(u,a.y+a.h))&&t.doZoomY_(s,u),n.cancelNextDblclick=!0}n.dragStartX=null,n.dragStartY=null},i.startTouch=function(e,t,n){e.preventDefault(),e.touches.length>1&&(n.startTimeForDoubleTapMs=null);for(var r=[],i=0;i=2){n.initialPinchCenter={pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY),dataX:.5*(r[0].dataX+r[1].dataX),dataY:.5*(r[0].dataY+r[1].dataY)};var o=180/Math.PI*Math.atan2(n.initialPinchCenter.pageY-r[0].pageY,r[0].pageX-n.initialPinchCenter.pageX);(o=Math.abs(o))>90&&(o=90-o),n.touchDirections={x:o<67.5,y:o>22.5}}n.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},i.moveTouch=function(e,t,n){n.startTimeForDoubleTapMs=null;var r,i=[];for(r=0;r=2){var h=u[1].pageX-c.pageX;l=(i[1].pageX-o.pageX)/h;var g=u[1].pageY-c.pageY;s=(i[1].pageY-o.pageY)/g}l=Math.min(8,Math.max(.125,l)),s=Math.min(8,Math.max(.125,s));var v=!1;if(n.touchDirections.x&&(t.dateWindow_=[c.dataX-d.dataX+(n.initialRange.x[0]-c.dataX)/l,c.dataX-d.dataX+(n.initialRange.x[1]-c.dataX)/l],v=!0),n.touchDirections.y)for(r=0;r<1;r++){var y=t.axes_[r];t.attributes_.getForAxis("logscale",r)||(y.valueRange=[c.dataY-d.dataY+(n.initialRange.y[0]-c.dataY)/s,c.dataY-d.dataY+(n.initialRange.y[1]-c.dataY)/s],v=!0)}if(t.drawGraph_(!1),v&&i.length>1&&t.getFunctionOption("zoomCallback")){var m=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,m[0],m[1],t.yAxisRanges())}},i.endTouch=function(e,t,n){if(0!==e.touches.length)i.startTouch(e,t,n);else if(1==e.changedTouches.length){var r=(new Date).getTime(),a=e.changedTouches[0];n.startTimeForDoubleTapMs&&r-n.startTimeForDoubleTapMs<500&&n.doubleTapX&&Math.abs(n.doubleTapX-a.screenX)<50&&n.doubleTapY&&Math.abs(n.doubleTapY-a.screenY)<50?t.resetZoom():(n.startTimeForDoubleTapMs=r,n.doubleTapX=a.screenX,n.doubleTapY=a.screenY)}};var a=function(e,t,n){return en?e-n:0};i.defaultModel={mousedown:function(e,t,n){if(!e.button||2!=e.button){n.initializeMouseDown(e,t,n),e.altKey||e.shiftKey?i.startPan(e,t,n):i.startZoom(e,t,n);var o=function(e){n.isZooming?function(e,t){var n=r.v(t.canvas_),i={left:n.x,right:n.x+t.canvas_.offsetWidth,top:n.y,bottom:n.y+t.canvas_.offsetHeight},o={x:r.L(e),y:r.M(e)},l=a(o.x,i.left,i.right),s=a(o.y,i.top,i.bottom);return Math.max(l,s)}(e,t)<100?i.moveZoom(e,t,n):null!==n.dragEndX&&(n.dragEndX=null,n.dragEndY=null,t.clearZoomRect_()):n.isPanning&&i.movePan(e,t,n)},l=function(e){n.isZooming?null!==n.dragEndX?i.endZoom(e,t,n):i.maybeTreatMouseOpAsClick(e,t,n):n.isPanning&&i.endPan(e,t,n),r.O(document,"mousemove",o),r.O(document,"mouseup",l),n.destroy()};t.addAndTrackEvent(document,"mousemove",o),t.addAndTrackEvent(document,"mouseup",l)}},willDestroyContextMyself:!0,touchstart:function(e,t,n){i.startTouch(e,t,n)},touchmove:function(e,t,n){i.moveTouch(e,t,n)},touchend:function(e,t,n){i.endTouch(e,t,n)},dblclick:function(e,t,n){if(n.cancelNextDblclick)n.cancelNextDblclick=!1;else{var r={canvasx:n.dragEndX,canvasy:n.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",r)||e.altKey||e.shiftKey||t.resetZoom()}}},i.nonInteractiveModel_={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n)},mouseup:i.maybeTreatMouseOpAsClick},i.dragIsPanInteractionModel={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n),i.startPan(e,t,n)},mousemove:function(e,t,n){n.isPanning&&i.movePan(e,t,n)},mouseup:function(e,t,n){n.isPanning&&i.endPan(e,t,n)}},t.a=i},function(e,t,n){"use strict";var r=n(5),i=n(9),a=function(){r.a.call(this)};(a.prototype=new r.a).extractSeries=function(e,t,n){},a.prototype.rollingAverage=function(e,t,n){},a.prototype.onPointsCreated_=function(e,t){for(var n=0;nr&&(s=r),ua)&&(a=u),(null===i||s=2,v=e.drawingContext;v.save(),g&&v.setLineDash&&v.setLineDash(i);var y=a._drawSeries(e,h,n,s,o,d,c,t);a._drawPointsOnLine(e,y,l,t,s),g&&v.setLineDash&&v.setLineDash([]),v.restore()},a._drawSeries=function(e,t,n,r,i,a,o,l){var s,u,c=null,d=null,f=null,p=[],h=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=l,g.lineWidth=n;for(var v=t.array_,y=t.end_,m=t.predicate_,_=t.start_;_0;n--)if(2==(l=t[n])[0]){var r=t[n-1];r[1]==l[1]&&r[2]==l[2]&&t.splice(n,1)}for(n=0;n2&&!e){var i=0;2==t[0][0]&&i++;var a=null,o=null;for(n=i;nt[o][2]&&(o=n)}}var u=t[a],c=t[o];t.splice(i,t.length-i),ao?(t.push(c),t.push(u)):t.push(u)}}}(n);for(var a=0,o=t.length;a1||l-n>1),n=l);t.push([e,i,o])};return{moveTo:function(e,t){o(2,e,t)},lineTo:function(e,t){o(1,e,t)},stroke:function(){a(!0),e.stroke()},fill:function(){a(!0),e.fill()},beginPath:function(){a(!0),e.beginPath()},closePath:function(){a(!0),e.closePath()},_count:function(){return i}}},a._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,n=t.getLabels().slice(1),o=n.length;o>=0;o--)t.visibility()[o]||n.splice(o,1);if(function(){for(var e=0;e=0;i--){var a=r[i];e.lineTo(a[0],a[1])}},v=d-1;v>=0;v--){var y=e.drawingContext,m=n[v];if(t.getBooleanOption("fillGraph",m)){var _=t.getNumericOption("fillAlpha",m),b=t.getBooleanOption("stepPlot",m),x=p[v],w=t.axisPropertiesForSeries(m),k=1+w.minyval*w.yscale;k<0?k=0:k>1&&(k=1),k=u.h*k+u.y;var S,T=c[v],C=r.n(T,0,T.length,a._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",m))),E=NaN,O=[-1,-1],P=r.Q(x),N="rgba("+P.r+","+P.g+","+P.b+","+_+")";y.fillStyle=N,y.beginPath();var A,L=!0;(T.length>2*t.width_||i.a.FORCE_FAST_PROXY)&&(y=a._fastCanvasProxy(y));for(var D,R=[];C.hasNext;)if(D=C.next(),r.E(D.y)||b){if(f){if(!L&&A==D.xval)continue;var M;L=!1,A=D.xval,M=void 0===(l=h[D.canvasx])?k:s?l[0]:l,S=[D.canvasy,M],b?-1===O[0]?h[D.canvasx]=[D.canvasy,k]:h[D.canvasx]=[D.canvasy,O[0]]:h[D.canvasx]=D.canvasy}else S=isNaN(D.canvasy)&&b?[u.y+u.h,k]:[D.canvasy,k];isNaN(E)?(y.moveTo(D.canvasx,S[1]),y.lineTo(D.canvasx,S[0])):(b?(y.lineTo(D.canvasx,O[0]),y.lineTo(D.canvasx,S[0])):y.lineTo(D.canvasx,S[0]),f&&(R.push([E,O[1]]),s&&l?R.push([D.canvasx,l[1]]):R.push([D.canvasx,S[1]]))),O=S,E=D.canvasx}else g(y,E,O[1],R),R=[],E=NaN,null===D.y_stacked||isNaN(D.y_stacked)||(h[D.canvasx]=u.h*D.y_stacked+u.y);s=b,S&&D&&(g(y,D.canvasx,S[1],R),R=[]),y.fill()}}}},t.a=a},function(e,t,n){"use strict";(function(e){var r=n(10),i=n(6),a=n(32),o=n(3),l=n(2),s=n(0),u=n(8),c=(n(30),n(13)),d=n(11),f=n(16),p=n(17),h=n(18),g=n(19),v=n(4),y=n(20),m=n(21),_=n(22),b=n(23),x=n(24),w=n(25),k=n(33),S=function(e,t,n){this.__init__(e,t,n)};S.NAME="Dygraph",S.VERSION="2.0.0",S.DEFAULT_ROLL_PERIOD=1,S.DEFAULT_WIDTH=480,S.DEFAULT_HEIGHT=320,S.ANIMATION_STEPS=12,S.ANIMATION_DURATION=200,S.Plotters=i.a._Plotters,S.addedAnnotationCSS=!1,S.prototype.__init__=function(e,t,n){if(this.is_initial_draw_=!0,this.readyFns_=[],null==n&&(n={}),n=S.copyUserAttrs_(n),"string"==typeof e&&(e=document.getElementById(e)),!e)throw new Error("Constructing dygraph with a non-existent div!");this.maindiv_=e,this.file_=t,this.rollPeriod_=n.rollPeriod||S.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=n.fractions||!1,this.dateWindow_=n.dateWindow||null,this.annotations_=[],e.innerHTML="",""===e.style.width&&n.width&&(e.style.width=n.width+"px"),""===e.style.height&&n.height&&(e.style.height=n.height+"px"),""===e.style.height&&0===e.clientHeight&&(e.style.height=S.DEFAULT_HEIGHT+"px",""===e.style.width&&(e.style.width=S.DEFAULT_WIDTH+"px")),this.width_=e.clientWidth||n.width||0,this.height_=e.clientHeight||n.height||0,n.stackedGraph&&(n.fillGraph=!0),this.user_attrs_={},s.R(this.user_attrs_,n),this.attrs_={},s.S(this.attrs_,u.a),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new a.a(this),this.createInterface_(),this.plugins_=[];for(var r=S.PLUGINS.concat(this.getOption("plugins")),i=0;i=0;i--){var a=r[i][0];if(r[i][1].call(a,n),n.propagationStopped)break}return n.defaultPrevented},S.prototype.getPluginInstance_=function(e){for(var t=0;t!!e.valueRange).indexOf(!0)>=0;if(null==e)return t||n;if("y"===e)return n;throw new Error(`axis parameter is [${e}] must be null, 'x' or 'y'.`)},S.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},S.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},S.prototype.getOption=function(e,t){return this.attr_(e,t)},S.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},S.prototype.getStringOption=function(e,t){return this.getOption(e,t)},S.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},S.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},S.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},S.prototype.optionsViewForAxis_=function(e){var t=this;return function(n){var r=t.user_attrs_.axes;return r&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:("x"!==e||"logscale"!==n)&&(void 0!==t.user_attrs_[n]?t.user_attrs_[n]:(r=t.attrs_.axes)&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:"y"==e&&t.axes_[0].hasOwnProperty(n)?t.axes_[0][n]:"y2"==e&&t.axes_[1].hasOwnProperty(n)?t.axes_[1][n]:t.attr_(n))}},S.prototype.rollPeriod=function(){return this.rollPeriod_},S.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},S.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],n=this.rawData_[this.rawData_.length-1][0];if(e){var r=n-t;t-=r*e,n+=r*e}return[t,n]},S.prototype.yAxisExtremes=function(){const e=this.gatherDatasets_(this.rolledSeries_,null),{extremes:t}=e,n=this.axes_;this.computeYAxisRanges_(t);const r=this.axes_;return this.axes_=n,r.map(e=>e.extremeRange)},S.prototype.yAxisRange=function(e){if(void 0===e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},S.prototype.yAxisRanges=function(){for(var e=[],t=0;tthis.rawData_.length?null:t<0||t>this.rawData_[e].length?null:this.rawData_[e][t]},S.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=s.m(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=s.x(this.canvas_),this.hidden_ctx_=s.x(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new r.a(this);var t=this;this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var n=e.target||e.fromElement,r=e.relatedTarget||e.toElement;s.D(n,t.graphDiv)&&!s.D(r,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},S.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||s.y(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var n=e||s.y(this.hidden_ctx_);this.hidden_.width=this.width_*n,this.hidden_.height=this.height_*n,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==n&&this.hidden_ctx_.scale(n,n)},S.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}var n=function(e){for(;e.hasChildNodes();)n(e.firstChild),e.removeChild(e.firstChild)};this.removeTrackedEvents_(),s.O(window,"mouseout",this.mouseOutHandler_),s.O(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),s.O(window,"resize",this.resizeHandler_),this.resizeHandler_=null,n(this.maindiv_);var r=function(e){for(var t in e)"object"==typeof e[t]&&(e[t]=null)};r(this.layout_),r(this.plotter_),r(this)},S.prototype.createPlotKitCanvas_=function(e){var t=s.m();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},S.prototype.createMouseEventElement_=function(){return this.canvas_},S.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var n=this.getNumericOption("colorSaturation")||1,r=this.getNumericOption("colorValue")||.5,i=Math.ceil(t/2),a=this.getOption("colors"),o=this.visibility(),l=0;lthis.adjustRoll(e.value))},S.prototype.createDragInterface_=function(){var e={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new c.a,initializeMouseDown:function(e,t,n){e.preventDefault?e.preventDefault():(e.returnValue=!1,e.cancelBubble=!0);var r=s.v(t.canvas_);n.px=r.x,n.py=r.y,n.dragStartX=s.t(e,n),n.dragStartY=s.u(e,n),n.cancelNextDblclick=!1,n.tarp.cover()},destroy:function(){if((this.isZooming||this.isPanning)&&(this.isZooming=!1,this.dragStartX=null,this.dragStartY=null),this.isPanning){this.isPanning=!1,this.draggingDate=null,this.dateRange=null;for(var e=0;e{i&&i.call(this,e,t,this.yAxisRanges())})},S.prototype.doZoomY_=function(e,t){this.currentZoomRectArgs_=null;for(var n=this.yAxisRanges(),r=[],i=0;i{if(l){const[e,t]=this.xAxisRange();l.call(this,e,t,this.yAxisRanges())}})},S.zoomAnimationFunction=function(e,t){return(1-Math.pow(1.5,-e))/(1-Math.pow(1.5,-t))},S.prototype.resetZoom=function(){const e=this.isZoomed("x"),t=this.isZoomed("y"),n=e||t;if(this.clearSelection(),!n)return;const[r,i]=this.xAxisExtremes(),a=this.getBooleanOption("animatedZooms"),o=this.getFunctionOption("zoomCallback");if(!a)return this.dateWindow_=null,this.axes_.forEach(e=>{e.valueRange&&delete e.valueRange}),this.drawGraph_(),void(o&&o.call(this,r,i,this.yAxisRanges()));var l=null,s=null,u=null,c=null;e&&(l=this.xAxisRange(),s=[r,i]),t&&(u=this.yAxisRanges(),c=this.yAxisExtremes()),this.doAnimatedZoom(l,s,u,c,()=>{this.dateWindow_=null,this.axes_.forEach(e=>{e.valueRange&&delete e.valueRange}),o&&o.call(this,r,i,this.yAxisRanges())})},S.prototype.doAnimatedZoom=function(e,t,n,r,i){var a,o,l=this.getBooleanOption("animatedZooms")?S.ANIMATION_STEPS:1,u=[],c=[];if(null!==e&&null!==t)for(a=1;a<=l;a++)o=S.zoomAnimationFunction(a,l),u[a-1]=[e[0]*(1-o)+o*t[0],e[1]*(1-o)+o*t[1]];if(null!==n&&null!==r)for(a=1;a<=l;a++){o=S.zoomAnimationFunction(a,l);for(var d=[],f=0;f{if(c.length)for(var t=0;t=0;--d)for(var f=this.layout_.points[d],p=0;p=l.length)){var u=l[o];if(s.G(u)){var c=u.canvasy;if(e>u.canvasx&&o+10)c+=(e-u.canvasx)/f*(d.canvasy-u.canvasy)}else if(e0){var f,p=l[o-1];if(s.G(p))if((f=u.canvasx-p.canvasx)>0)c+=(u.canvasx-e)/f*(p.canvasy-u.canvasy)}(0===a||c=0){var a=0,o=this.attr_("labels");for(t=1;ta&&(a=l)}var u=this.previousVerticalX_;n.clearRect(u-a-1,0,2*a+2,this.height_)}if(this.selPoints_.length>0){var c=this.selPoints_[0].canvasx;for(n.save(),t=0;t=0){e!=this.lastRow_&&(r=!0),this.lastRow_=e;for(var i=0;i=0&&o=0&&(r=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==t&&(this.highlightSet_!==t&&(r=!0),this.highlightSet_=t),void 0!==n&&(this.lockedSet_=n),r&&this.updateSelection_(void 0),r},S.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},S.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null)},S.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e1&&(n=this.dataHandler_.rollingAverage(n,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(n)}this.drawGraph_();var r=new Date;this.drawingTimeMs_=r-e},S.PointType=void 0,S.stackPoints_=function(e,t,n,r){for(var i=null,a=null,o=null,l=-1,s=function(t){if(!(l>=t))for(var n=t;nn[1]&&(n[1]=p),p=1;n--)if(this.visibility()[n-1]){if(t){l=e[n];var f=t[0],p=t[1];for(i=null,a=null,r=0;r=f&&null===i&&(i=r),l[r][0]<=p&&(a=r);null===i&&(i=0);for(var h=i,g=!0;g&&h>0;)g=null===l[--h][1];null===a&&(a=l.length-1);var v=a;for(g=!0;g&&v0;){this.readyFns_.pop()(this)}},S.prototype.computeYAxes_=function(){var e,t,n;for(this.axes_=[],e=0;e0&&(v=0),y<0&&(y=0)),v==1/0&&(v=0),y==-1/0&&(y=1),0===(n=y-v)&&(0!==y?n=Math.abs(y):(y=1,n=1));var _=y,b=v;t&&(d?(_=y+i*n,b=v):((b=v-i*n)<0&&v>=0&&(b=0),(_=y+i*n)>0&&y<=0&&(_=0))),c.extremeRange=[b,_]}if(c.valueRange){var x=o(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0],w=o(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];c.computedValueRange=[x,w]}else c.computedValueRange=c.extremeRange;if(!t)if(d){x=c.computedValueRange[0],w=c.computedValueRange[1];var k=i/(2*i-1),S=(i-1)/(2*i-1);c.computedValueRange[0]=s.I(x,w,k),c.computedValueRange[1]=s.I(x,w,S)}else x=c.computedValueRange[0],n=(w=c.computedValueRange[1])-x,c.computedValueRange[0]=x-n*i,c.computedValueRange[1]=w+n*i;if(p){c.independentTicks=p;var T=(C=this.optionsViewForAxis_("y"+(u?"2":"")))("ticker");c.ticks=T(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,C,this),a||(a=c)}}if(void 0===a)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(u=0;u0&&"e"!=e[n-1]&&"E"!=e[n-1]||e.indexOf("/")>=0||isNaN(parseFloat(e))?t=!0:8==e.length&&e>"19700101"&&e<"20371231"&&(t=!0),this.setXAxisOptions_(t)},S.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=s.p,this.attrs_.axes.x.valueFormatter=s.r,this.attrs_.axes.x.ticker=l.b,this.attrs_.axes.x.axisLabelFormatter=s.o):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.e,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},S.prototype.parseCSV_=function(e){var t,n,r=[],i=s.s(e),a=e.split(i||"\n"),o=this.getStringOption("delimiter");-1==a[0].indexOf(o)&&a[0].indexOf("\t")>=0&&(o="\t");var l=0;"labels"in this.user_attrs_||(l=1,this.attrs_.labels=a[0].split(o),this.attributes_.reparseSeries());for(var u,c=!1,d=this.attr_("labels").length,f=!1,p=l;p0&&v[0]0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t},n=e.getNumberOfColumns(),r=e.getNumberOfRows(),i=e.getColumnType(0);if("date"==i||"datetime"==i)this.attrs_.xValueParser=s.p,this.attrs_.axes.x.valueFormatter=s.r,this.attrs_.axes.x.ticker=l.b,this.attrs_.axes.x.axisLabelFormatter=s.o;else{if("number"!=i)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+i+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.e,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var a,o,u=[],c={},d=!1;for(a=1;a0&&m[0]0&&this.setAnnotations(y,!0),this.attributes_.reparseSeries()},S.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},S.prototype.start_=function(){var e=this.file_;if("function"==typeof e&&(e=e()),s.A(e))this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==typeof e&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==typeof e){if(s.s(e))this.loadedEvent_(e);else{var t;t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var n=this;t.onreadystatechange=function(){4==t.readyState&&(200!==t.status&&0!==t.status||n.loadedEvent_(t.responseText))},t.open("GET",e,!0),t.send(null)}}else console.error("Unknown data format: "+typeof e)},S.prototype.updateOptions=function(e,t){void 0===t&&(t=!1);var n=e.file,r=S.copyUserAttrs_(e);"rollPeriod"in r&&(this.rollPeriod_=r.rollPeriod),"dateWindow"in r&&(this.dateWindow_=r.dateWindow);var i=s.F(this.attr_("labels"),r);s.S(this.user_attrs_,r),this.attributes_.reparseSeries(),n?(this.cascadeEvents_("dataWillUpdate",{}),this.file_=n,t||this.start_()):t||(i?this.predraw_():this.renderGraph_(!1))},S.copyUserAttrs_=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&"file"!=n&&e.hasOwnProperty(n)&&(t[n]=e[n]);return t},S.prototype.resize=function(e,t){if(!this.resize_lock){this.resize_lock=!0,null===e!=(null===t)&&(console.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),e=t=null);var n=this.width_,r=this.height_;e?(this.maindiv_.style.width=e+"px",this.maindiv_.style.height=t+"px",this.width_=e,this.height_=t):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),n==this.width_&&r==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},S.prototype.adjustRoll=function(e){this.rollPeriod_=e,this.predraw_()},S.prototype.visibility=function(){for(this.getOption("visibility")||(this.attrs_.visibility=[]);this.getOption("visibility").length=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]);else for(i=0;i=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]:e[i]<0||e[i]>=n.length?console.warn("Invalid series number in setVisibility: "+e[i]):n[e[i]]=t;this.predraw_()},S.prototype.size=function(){return{width:this.width_,height:this.height_}},S.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},S.prototype.annotations=function(){return this.annotations_},S.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},S.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},S.prototype.getRowForX=function(e){for(var t=0,n=this.numRows()-1;t<=n;){var r=n+t>>1,i=this.getValue(r,0);if(ie)n=r-1;else{if(t==r)return r;n=r}}return null},S.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},S.prototype.addAndTrackEvent=function(e,t,n){s.i(e,t,n),this.registeredEvents_.push({elem:e,type:t,fn:n})},S.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;e=2,v=e.drawingContext;v.save(),g&&v.setLineDash&&v.setLineDash(i);var y=a._drawSeries(e,h,n,s,o,d,c,t);a._drawPointsOnLine(e,y,l,t,s),g&&v.setLineDash&&v.setLineDash([]),v.restore()},a._drawSeries=function(e,t,n,r,i,a,o,l){var s,u,c=null,d=null,f=null,p=[],h=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=l,g.lineWidth=n;for(var v=t.array_,y=t.end_,m=t.predicate_,_=t.start_;_0;n--)if(2==(l=t[n])[0]){var r=t[n-1];r[1]==l[1]&&r[2]==l[2]&&t.splice(n,1)}for(n=0;n2&&!e){var i=0;2==t[0][0]&&i++;var a=null,o=null;for(n=i;nt[o][2]&&(o=n)}}var u=t[a],c=t[o];t.splice(i,t.length-i),ao?(t.push(c),t.push(u)):t.push(u)}}}(n);for(var a=0,o=t.length;a1||l-n>1),n=l);t.push([e,i,o])};return{moveTo:function(e,t){o(2,e,t)},lineTo:function(e,t){o(1,e,t)},stroke:function(){a(!0),e.stroke()},fill:function(){a(!0),e.fill()},beginPath:function(){a(!0),e.beginPath()},closePath:function(){a(!0),e.closePath()},_count:function(){return i}}},a._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,n=t.getLabels().slice(1),o=n.length;o>=0;o--)t.visibility()[o]||n.splice(o,1);if(function(){for(var e=0;e=0;i--){var a=r[i];e.lineTo(a[0],a[1])}},v=d-1;v>=0;v--){var y=e.drawingContext,m=n[v];if(t.getBooleanOption("fillGraph",m)){var _=t.getNumericOption("fillAlpha",m),b=t.getBooleanOption("stepPlot",m),x=p[v],w=t.axisPropertiesForSeries(m),k=1+w.minyval*w.yscale;k<0?k=0:k>1&&(k=1),k=u.h*k+u.y;var S,T=c[v],E=r.n(T,0,T.length,a._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",m))),C=NaN,O=[-1,-1],P=r.Q(x),A="rgba("+P.r+","+P.g+","+P.b+","+_+")";y.fillStyle=A,y.beginPath();var N,L=!0;(T.length>2*t.width_||i.a.FORCE_FAST_PROXY)&&(y=a._fastCanvasProxy(y));for(var D,R=[];E.hasNext;)if(D=E.next(),r.E(D.y)||b){if(f){if(!L&&N==D.xval)continue;var M;L=!1,N=D.xval,M=void 0===(l=h[D.canvasx])?k:s?l[0]:l,S=[D.canvasy,M],b?-1===O[0]?h[D.canvasx]=[D.canvasy,k]:h[D.canvasx]=[D.canvasy,O[0]]:h[D.canvasx]=D.canvasy}else S=isNaN(D.canvasy)&&b?[u.y+u.h,k]:[D.canvasy,k];isNaN(C)?(y.moveTo(D.canvasx,S[1]),y.lineTo(D.canvasx,S[0])):(b?(y.lineTo(D.canvasx,O[0]),y.lineTo(D.canvasx,S[0])):y.lineTo(D.canvasx,S[0]),f&&(R.push([C,O[1]]),s&&l?R.push([D.canvasx,l[1]]):R.push([D.canvasx,S[1]]))),O=S,C=D.canvasx}else g(y,C,O[1],R),R=[],C=NaN,null===D.y_stacked||isNaN(D.y_stacked)||(h[D.canvasx]=u.h*D.y_stacked+u.y);s=b,S&&D&&(g(y,D.canvasx,S[1],R),R=[]),y.fill()}}}},t.a=a},function(e,t,n){"use strict";(function(e){var r=n(9),i=n(6),a=n(29),o=n(3),l=n(2),s=n(0),u=n(8),c=(n(27),n(11)),d=n(10),f=n(13),p=n(14),h=n(15),g=n(16),v=n(4),y=n(17),m=n(18),_=n(19),b=n(20),x=n(21),w=n(22),k=n(30),S=function(e,t,n){this.__init__(e,t,n)};S.NAME="Dygraph",S.VERSION="2.0.0",S.DEFAULT_ROLL_PERIOD=1,S.DEFAULT_WIDTH=480,S.DEFAULT_HEIGHT=320,S.ANIMATION_STEPS=12,S.ANIMATION_DURATION=200,S.Plotters=i.a._Plotters,S.addedAnnotationCSS=!1,S.prototype.__init__=function(e,t,n){if(this.is_initial_draw_=!0,this.readyFns_=[],null==n&&(n={}),n=S.copyUserAttrs_(n),"string"==typeof e&&(e=document.getElementById(e)),!e)throw new Error("Constructing dygraph with a non-existent div!");this.maindiv_=e,this.file_=t,this.rollPeriod_=n.rollPeriod||S.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=n.fractions||!1,this.dateWindow_=n.dateWindow||null,this.annotations_=[],e.innerHTML="",""===e.style.width&&n.width&&(e.style.width=n.width+"px"),""===e.style.height&&n.height&&(e.style.height=n.height+"px"),""===e.style.height&&0===e.clientHeight&&(e.style.height=S.DEFAULT_HEIGHT+"px",""===e.style.width&&(e.style.width=S.DEFAULT_WIDTH+"px")),this.width_=e.clientWidth||n.width||0,this.height_=e.clientHeight||n.height||0,n.stackedGraph&&(n.fillGraph=!0),this.user_attrs_={},s.R(this.user_attrs_,n),this.attrs_={},s.S(this.attrs_,u.a),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new a.a(this),this.createInterface_(),this.plugins_=[];for(var r=S.PLUGINS.concat(this.getOption("plugins")),i=0;i=0;i--){var a=r[i][0];if(r[i][1].call(a,n),n.propagationStopped)break}return n.defaultPrevented},S.prototype.getPluginInstance_=function(e){for(var t=0;t!!e.valueRange).indexOf(!0)>=0;if(null==e)return t||n;if("y"===e)return n;throw new Error(`axis parameter is [${e}] must be null, 'x' or 'y'.`)},S.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},S.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},S.prototype.getOption=function(e,t){return this.attr_(e,t)},S.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},S.prototype.getStringOption=function(e,t){return this.getOption(e,t)},S.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},S.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},S.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},S.prototype.optionsViewForAxis_=function(e){var t=this;return function(n){var r=t.user_attrs_.axes;return r&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:("x"!==e||"logscale"!==n)&&(void 0!==t.user_attrs_[n]?t.user_attrs_[n]:(r=t.attrs_.axes)&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:"y"==e&&t.axes_[0].hasOwnProperty(n)?t.axes_[0][n]:"y2"==e&&t.axes_[1].hasOwnProperty(n)?t.axes_[1][n]:t.attr_(n))}},S.prototype.rollPeriod=function(){return this.rollPeriod_},S.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},S.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],n=this.rawData_[this.rawData_.length-1][0];if(e){var r=n-t;t-=r*e,n+=r*e}return[t,n]},S.prototype.yAxisExtremes=function(){const e=this.gatherDatasets_(this.rolledSeries_,null),{extremes:t}=e,n=this.axes_;this.computeYAxisRanges_(t);const r=this.axes_;return this.axes_=n,r.map(e=>e.extremeRange)},S.prototype.yAxisRange=function(e){if(void 0===e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},S.prototype.yAxisRanges=function(){for(var e=[],t=0;tthis.rawData_.length?null:t<0||t>this.rawData_[e].length?null:this.rawData_[e][t]},S.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=s.m(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=s.x(this.canvas_),this.hidden_ctx_=s.x(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new r.a(this);var t=this;this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var n=e.target||e.fromElement,r=e.relatedTarget||e.toElement;s.D(n,t.graphDiv)&&!s.D(r,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},S.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||s.y(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var n=e||s.y(this.hidden_ctx_);this.hidden_.width=this.width_*n,this.hidden_.height=this.height_*n,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==n&&this.hidden_ctx_.scale(n,n)},S.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}var n=function(e){for(;e.hasChildNodes();)n(e.firstChild),e.removeChild(e.firstChild)};this.removeTrackedEvents_(),s.O(window,"mouseout",this.mouseOutHandler_),s.O(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),s.O(window,"resize",this.resizeHandler_),this.resizeHandler_=null,n(this.maindiv_);var r=function(e){for(var t in e)"object"==typeof e[t]&&(e[t]=null)};r(this.layout_),r(this.plotter_),r(this)},S.prototype.createPlotKitCanvas_=function(e){var t=s.m();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},S.prototype.createMouseEventElement_=function(){return this.canvas_},S.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var n=this.getNumericOption("colorSaturation")||1,r=this.getNumericOption("colorValue")||.5,i=Math.ceil(t/2),a=this.getOption("colors"),o=this.visibility(),l=0;lthis.adjustRoll(e.value))},S.prototype.createDragInterface_=function(){var e={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new c.a,initializeMouseDown:function(e,t,n){e.preventDefault?e.preventDefault():(e.returnValue=!1,e.cancelBubble=!0);var r=s.v(t.canvas_);n.px=r.x,n.py=r.y,n.dragStartX=s.t(e,n),n.dragStartY=s.u(e,n),n.cancelNextDblclick=!1,n.tarp.cover()},destroy:function(){if((this.isZooming||this.isPanning)&&(this.isZooming=!1,this.dragStartX=null,this.dragStartY=null),this.isPanning){this.isPanning=!1,this.draggingDate=null,this.dateRange=null;for(var e=0;e{i&&i.call(this,e,t,this.yAxisRanges())})},S.prototype.doZoomY_=function(e,t){this.currentZoomRectArgs_=null;for(var n=this.yAxisRanges(),r=[],i=0;i{if(l){const[e,t]=this.xAxisRange();l.call(this,e,t,this.yAxisRanges())}})},S.zoomAnimationFunction=function(e,t){return(1-Math.pow(1.5,-e))/(1-Math.pow(1.5,-t))},S.prototype.resetZoom=function(){const e=this.isZoomed("x"),t=this.isZoomed("y"),n=e||t;if(this.clearSelection(),!n)return;const[r,i]=this.xAxisExtremes(),a=this.getBooleanOption("animatedZooms"),o=this.getFunctionOption("zoomCallback");if(!a)return this.dateWindow_=null,this.axes_.forEach(e=>{e.valueRange&&delete e.valueRange}),this.drawGraph_(),void(o&&o.call(this,r,i,this.yAxisRanges()));var l=null,s=null,u=null,c=null;e&&(l=this.xAxisRange(),s=[r,i]),t&&(u=this.yAxisRanges(),c=this.yAxisExtremes()),this.doAnimatedZoom(l,s,u,c,()=>{this.dateWindow_=null,this.axes_.forEach(e=>{e.valueRange&&delete e.valueRange}),o&&o.call(this,r,i,this.yAxisRanges())})},S.prototype.doAnimatedZoom=function(e,t,n,r,i){var a,o,l=this.getBooleanOption("animatedZooms")?S.ANIMATION_STEPS:1,u=[],c=[];if(null!==e&&null!==t)for(a=1;a<=l;a++)o=S.zoomAnimationFunction(a,l),u[a-1]=[e[0]*(1-o)+o*t[0],e[1]*(1-o)+o*t[1]];if(null!==n&&null!==r)for(a=1;a<=l;a++){o=S.zoomAnimationFunction(a,l);for(var d=[],f=0;f{if(c.length)for(var t=0;t=0;--d)for(var f=this.layout_.points[d],p=0;p=l.length)){var u=l[o];if(s.G(u)){var c=u.canvasy;if(e>u.canvasx&&o+10)c+=(e-u.canvasx)/f*(d.canvasy-u.canvasy)}else if(e0){var f,p=l[o-1];if(s.G(p))if((f=u.canvasx-p.canvasx)>0)c+=(u.canvasx-e)/f*(p.canvasy-u.canvasy)}(0===a||c=0){var a=0,o=this.attr_("labels");for(t=1;ta&&(a=l)}var u=this.previousVerticalX_;n.clearRect(u-a-1,0,2*a+2,this.height_)}if(this.selPoints_.length>0){var c=this.selPoints_[0].canvasx;for(n.save(),t=0;t=0){e!=this.lastRow_&&(r=!0),this.lastRow_=e;for(var i=0;i=0&&o=0&&(r=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==t&&(this.highlightSet_!==t&&(r=!0),this.highlightSet_=t),void 0!==n&&(this.lockedSet_=n),r&&this.updateSelection_(void 0),r},S.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},S.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null)},S.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e1&&(n=this.dataHandler_.rollingAverage(n,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(n)}this.drawGraph_();var r=new Date;this.drawingTimeMs_=r-e},S.PointType=void 0,S.stackPoints_=function(e,t,n,r){for(var i=null,a=null,o=null,l=-1,s=function(t){if(!(l>=t))for(var n=t;nn[1]&&(n[1]=p),p=1;n--)if(this.visibility()[n-1]){if(t){l=e[n];var f=t[0],p=t[1];for(i=null,a=null,r=0;r=f&&null===i&&(i=r),l[r][0]<=p&&(a=r);null===i&&(i=0);for(var h=i,g=!0;g&&h>0;)g=null===l[--h][1];null===a&&(a=l.length-1);var v=a;for(g=!0;g&&v0;){this.readyFns_.pop()(this)}},S.prototype.computeYAxes_=function(){var e,t,n;for(this.axes_=[],e=0;e0&&(v=0),y<0&&(y=0)),v==1/0&&(v=0),y==-1/0&&(y=1),0===(n=y-v)&&(0!==y?n=Math.abs(y):(y=1,n=1));var _=y,b=v;t&&(d?(_=y+i*n,b=v):((b=v-i*n)<0&&v>=0&&(b=0),(_=y+i*n)>0&&y<=0&&(_=0))),c.extremeRange=[b,_]}if(c.valueRange){var x=o(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0],w=o(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];c.computedValueRange=[x,w]}else c.computedValueRange=c.extremeRange;if(!t)if(d){x=c.computedValueRange[0],w=c.computedValueRange[1];var k=i/(2*i-1),S=(i-1)/(2*i-1);c.computedValueRange[0]=s.I(x,w,k),c.computedValueRange[1]=s.I(x,w,S)}else x=c.computedValueRange[0],n=(w=c.computedValueRange[1])-x,c.computedValueRange[0]=x-n*i,c.computedValueRange[1]=w+n*i;if(p){c.independentTicks=p;var T=(E=this.optionsViewForAxis_("y"+(u?"2":"")))("ticker");c.ticks=T(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,E,this),a||(a=c)}}if(void 0===a)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(u=0;u0&&"e"!=e[n-1]&&"E"!=e[n-1]||e.indexOf("/")>=0||isNaN(parseFloat(e))?t=!0:8==e.length&&e>"19700101"&&e<"20371231"&&(t=!0),this.setXAxisOptions_(t)},S.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=s.p,this.attrs_.axes.x.valueFormatter=s.r,this.attrs_.axes.x.ticker=l.b,this.attrs_.axes.x.axisLabelFormatter=s.o):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.e,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},S.prototype.parseCSV_=function(e){var t,n,r=[],i=s.s(e),a=e.split(i||"\n"),o=this.getStringOption("delimiter");-1==a[0].indexOf(o)&&a[0].indexOf("\t")>=0&&(o="\t");var l=0;"labels"in this.user_attrs_||(l=1,this.attrs_.labels=a[0].split(o),this.attributes_.reparseSeries());for(var u,c=!1,d=this.attr_("labels").length,f=!1,p=l;p0&&v[0]0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t},n=e.getNumberOfColumns(),r=e.getNumberOfRows(),i=e.getColumnType(0);if("date"==i||"datetime"==i)this.attrs_.xValueParser=s.p,this.attrs_.axes.x.valueFormatter=s.r,this.attrs_.axes.x.ticker=l.b,this.attrs_.axes.x.axisLabelFormatter=s.o;else{if("number"!=i)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+i+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.e,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var a,o,u=[],c={},d=!1;for(a=1;a0&&m[0]0&&this.setAnnotations(y,!0),this.attributes_.reparseSeries()},S.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},S.prototype.start_=function(){var e=this.file_;if("function"==typeof e&&(e=e()),s.A(e))this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==typeof e&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==typeof e){if(s.s(e))this.loadedEvent_(e);else{var t;t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var n=this;t.onreadystatechange=function(){4==t.readyState&&(200!==t.status&&0!==t.status||n.loadedEvent_(t.responseText))},t.open("GET",e,!0),t.send(null)}}else console.error("Unknown data format: "+typeof e)},S.prototype.updateOptions=function(e,t){void 0===t&&(t=!1);var n=e.file,r=S.copyUserAttrs_(e);"rollPeriod"in r&&(this.rollPeriod_=r.rollPeriod),"dateWindow"in r&&(this.dateWindow_=r.dateWindow);var i=s.F(this.attr_("labels"),r);s.S(this.user_attrs_,r),this.attributes_.reparseSeries(),n?(this.cascadeEvents_("dataWillUpdate",{}),this.file_=n,t||this.start_()):t||(i?this.predraw_():this.renderGraph_(!1))},S.copyUserAttrs_=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&"file"!=n&&e.hasOwnProperty(n)&&(t[n]=e[n]);return t},S.prototype.resize=function(e,t){if(!this.resize_lock){this.resize_lock=!0,null===e!=(null===t)&&(console.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),e=t=null);var n=this.width_,r=this.height_;e?(this.maindiv_.style.width=e+"px",this.maindiv_.style.height=t+"px",this.width_=e,this.height_=t):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),n==this.width_&&r==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},S.prototype.adjustRoll=function(e){this.rollPeriod_=e,this.predraw_()},S.prototype.visibility=function(){for(this.getOption("visibility")||(this.attrs_.visibility=[]);this.getOption("visibility").length=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]);else for(i=0;i=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]:e[i]<0||e[i]>=n.length?console.warn("Invalid series number in setVisibility: "+e[i]):n[e[i]]=t;this.predraw_()},S.prototype.size=function(){return{width:this.width_,height:this.height_}},S.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},S.prototype.annotations=function(){return this.annotations_},S.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},S.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},S.prototype.getRowForX=function(e){for(var t=0,n=this.numRows()-1;t<=n;){var r=n+t>>1,i=this.getValue(r,0);if(ie)n=r-1;else{if(t==r)return r;n=r}}return null},S.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},S.prototype.addAndTrackEvent=function(e,t,n){s.i(e,t,n),this.registeredEvents_.push({elem:e,type:t,fn:n})},S.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;ea)&&(a=r),(null===i||r1)for(var n=1;na)&&(a=r),(null===i||r1)for(var n=1;n=0){var d=e[s-t];null===d[1]||isNaN(d[1])||(i-=d[2][0],o-=d[1],a-=d[2][1],l-=1)}c[s]=l?[e[s][0],1*o/l,[1*i/l,1*a/l]]:[e[s][0],null,[null,null]]}return c},t.a=i},function(e,t,n){"use strict";n(5);var r=n(11),i=function(){};(i.prototype=new r.a).extractSeries=function(e,t,n){for(var r,i,a,o,l,s=[],u=n.get("logscale"),c=0;c=0&&(a-=e[r-t][2][0],o-=e[r-t][2][1]);var l=e[r][0],s=o?a/o:0;i[r]=[l,100*s]}return i},t.a=i},function(e,t,n){"use strict";var r=n(4),i=function(){}; + */(i.prototype=new r.a).extractSeries=function(e,t,n){for(var r,i,a,o=[],l=n.get("logscale"),s=0;s=0){var d=e[s-t];null===d[1]||isNaN(d[1])||(i-=d[2][0],o-=d[1],a-=d[2][1],l-=1)}c[s]=l?[e[s][0],1*o/l,[1*i/l,1*a/l]]:[e[s][0],null,[null,null]]}return c},t.a=i},function(e,t,n){"use strict";n(5);var r=n(10),i=function(){};(i.prototype=new r.a).extractSeries=function(e,t,n){for(var r,i,a,o,l,s=[],u=n.get("logscale"),c=0;c=0&&(a-=e[r-t][2][0],o-=e[r-t][2][1]);var l=e[r][0],s=o?a/o:0;i[r]=[l,100*s]}return i},t.a=i},function(e,t,n){"use strict";var r=n(4),i=function(){}; /** * @license * Copyright 2013 David Eberlein (david.eberlein@ch.sauter-bc.com) @@ -68,17 +68,17 @@ * @license * Copyright 2012 Dan Vanderkam (danvdk@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) - */i.prototype.toString=function(){return"Legend Plugin"},i.prototype.activate=function(e){var t,n=e.getOption("labelsDiv");return n&&null!==n?t="string"==typeof n||n instanceof String?document.getElementById(n):n:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};function a(e,t,n){if(!e||e.length<=1)return`
`;var r,i,a,o,l=0,s=0,u=[];for(r=0;r<=e.length;r++)l+=e[r%e.length];if((o=Math.floor(n/(l-e[0])))>1){for(r=0;r`;return c}i.prototype.select=function(e){var t=e.selectedX,n=e.selectedPoints,r=e.selectedRow,a=e.dygraph.getOption("legend");if("never"!==a){if("follow"===a){var o=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth,s=e.dygraph.getOptionForAxis("axisLabelWidth","y"),u=n[0].x*o.w+50,c=n[0].y*o.h-50;u+l+1>o.w&&(u=u-100-l-(s-o.x)),e.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=s+u+"px",this.legend_div_.style.top=c+"px"}var d=i.generateLegendHTML(e.dygraph,t,n,this.one_em_width_,r);this.legend_div_.innerHTML=d,this.legend_div_.style.display=""}else this.legend_div_.style.display="none"},i.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var n=t.offsetWidth;return e.removeChild(t),n}(this.legend_div_);this.one_em_width_=t;var n=i.generateLegendHTML(e.dygraph,void 0,void 0,t,null);this.legend_div_.innerHTML=n},i.prototype.didDrawChart=function(e){this.deselect(e)},i.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.getArea(),n=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-n-1+"px",this.legend_div_.style.top=t.y+"px"}},i.prototype.destroy=function(){this.legend_div_=null},i.generateLegendHTML=function(e,t,n,o,l){var s,u={dygraph:e,x:t,series:[]},c={},d=e.getLabels();if(d)for(var f=1;f/g,">")),isVisible:p.visible,color:p.color};u.series.push(h),c[d[f]]=h}if(void 0!==t){var g=e.optionsViewForAxis_("x"),v=g("valueFormatter");u.xHTML=v.call(e,t,g,d[0],e,l,0);var y=[],m=e.numAxes();for(f=0;f":" "),n+=`${a.dashHTML} ${a.labelHTML}`)}return n}n=e.xHTML+":";for(i=0;i"),n+=` ${a.labelHTML}: ${a.yHTML}`}return n},t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(3),a=n(13),o=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};o.prototype.toString=function(){return"RangeSelector Plugin"},o.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},o.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},o.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},o.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},o.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},o.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},o.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},o.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},o.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},o.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},o.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout(function(){t.width_=0,t.resize()},1)}return e},o.prototype.resize_=function(){function e(e,t,n,i){var a=i||r.y(t);e.style.top=n.y+"px",e.style.left=n.x+"px",e.width=n.w*a,e.height=n.h*a,e.style.width=n.w+"px",e.style.height=n.h+"px",1!=a&&t.scale(a,a)}var t=this.dygraph_.layout_.getPlotArea(),n=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(n=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+n+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var i=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},o.prototype.createCanvases_=function(){this.bgcanvas_=r.m(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.x(this.bgcanvas_),this.fgcanvas_=r.m(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.x(this.fgcanvas_)},o.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},o.prototype.initInteraction_=function(){var e,t,n,o,l,s,u,c,d,f,p,h,g,v,y=this,m=document,_=0,b=null,x=!1,w=!1,k=!this.isMobileDevice_,S=new a.a;e=function(e){var t=y.dygraph_.xAxisExtremes(),n=(t[1]-t[0])/y.canvasRect_.w;return[t[0]+(e.leftHandlePos-y.canvasRect_.x)*n,t[0]+(e.rightHandlePos-y.canvasRect_.x)*n]},t=function(e){return r.k(e),x=!0,_=e.clientX,b=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.i(m,"mousemove",n),r.i(m,"mouseup",o)),y.fgcanvas_.style.cursor="col-resize",S.cover(),!0},n=function(e){if(!x)return!1;r.k(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var n,i=y.getZoomHandleStatus_();b==y.leftZoomHandle_?(n=i.leftHandlePos+t,n=Math.min(n,i.rightHandlePos-b.width-3),n=Math.max(n,y.canvasRect_.x)):(n=i.rightHandlePos+t,n=Math.min(n,y.canvasRect_.x+y.canvasRect_.w),n=Math.max(n,i.leftHandlePos+b.width+3));var a=b.width/2;return b.style.left=n-a+"px",y.drawInteractiveLayer_(),k&&l(),!0},o=function(e){return!!x&&(x=!1,S.uncover(),r.O(m,"mousemove",n),r.O(m,"mouseup",o),y.fgcanvas_.style.cursor="default",k||l(),!0)},l=function(){try{var t=y.getZoomHandleStatus_();if(y.isChangingRange_=!0,t.isZoomed){var n=e(t);y.dygraph_.doZoomXDates_(n[0],n[1])}else y.dygraph_.resetZoom()}finally{y.isChangingRange_=!1}},s=function(e){var t=y.leftZoomHandle_.getBoundingClientRect(),n=t.left+t.width/2,r=(t=y.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>n&&e.clientX=y.canvasRect_.x+y.canvasRect_.w?i=(a=y.canvasRect_.x+y.canvasRect_.w)-o:(i+=t,a+=t);var l=y.leftZoomHandle_.width/2;return y.leftZoomHandle_.style.left=i-l+"px",y.rightZoomHandle_.style.left=a-l+"px",y.drawInteractiveLayer_(),k&&f(),!0},d=function(e){return!!w&&(w=!1,r.O(m,"mousemove",c),r.O(m,"mouseup",d),k||f(),!0)},f=function(){try{y.isChangingRange_=!0,y.dygraph_.dateWindow_=e(y.getZoomHandleStatus_()),y.dygraph_.drawGraph_(!1)}finally{y.isChangingRange_=!1}},p=function(e){if(!x&&!w){var t=s(e)?"move":"default";t!=y.fgcanvas_.style.cursor&&(y.fgcanvas_.style.cursor=t)}},h=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.k(e):"touchmove"==e.type&&1==e.targetTouches.length?n(e.targetTouches[0])&&r.k(e):o(e)},g=function(e){"touchstart"==e.type&&1==e.targetTouches.length?u(e.targetTouches[0])&&r.k(e):"touchmove"==e.type&&1==e.targetTouches.length?c(e.targetTouches[0])&&r.k(e):d(e)},v=function(e,t){for(var n=["touchstart","touchend","touchmove","touchcancel"],r=0;r1&&(h=f.rollingAverage(h,t.rollPeriod(),p)),d.push(h)}var g=[];for(e=0;e0)&&(b=Math.min(b,w),x=Math.max(x,w))}if(n)for(x=r.H(x),x+=.25*x,b=r.H(b),e=0;ethis.canvasRect_.x||n+1`;var r,i,a,o,l=0,s=0,u=[];for(r=0;r<=e.length;r++)l+=e[r%e.length];if((o=Math.floor(n/(l-e[0])))>1){for(r=0;r`;return c}i.prototype.select=function(e){var t=e.selectedX,n=e.selectedPoints,r=e.selectedRow,a=e.dygraph.getOption("legend");if("never"!==a){if("follow"===a){var o=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth,s=e.dygraph.getOptionForAxis("axisLabelWidth","y"),u=n[0].x*o.w+50,c=n[0].y*o.h-50;u+l+1>o.w&&(u=u-100-l-(s-o.x)),e.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=s+u+"px",this.legend_div_.style.top=c+"px"}var d=i.generateLegendHTML(e.dygraph,t,n,this.one_em_width_,r);this.legend_div_.innerHTML=d,this.legend_div_.style.display=""}else this.legend_div_.style.display="none"},i.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var n=t.offsetWidth;return e.removeChild(t),n}(this.legend_div_);this.one_em_width_=t;var n=i.generateLegendHTML(e.dygraph,void 0,void 0,t,null);this.legend_div_.innerHTML=n},i.prototype.didDrawChart=function(e){this.deselect(e)},i.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.getArea(),n=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-n-1+"px",this.legend_div_.style.top=t.y+"px"}},i.prototype.destroy=function(){this.legend_div_=null},i.generateLegendHTML=function(e,t,n,o,l){var s,u={dygraph:e,x:t,series:[]},c={},d=e.getLabels();if(d)for(var f=1;f/g,">")),isVisible:p.visible,color:p.color};u.series.push(h),c[d[f]]=h}if(void 0!==t){var g=e.optionsViewForAxis_("x"),v=g("valueFormatter");u.xHTML=v.call(e,t,g,d[0],e,l,0);var y=[],m=e.numAxes();for(f=0;f":" "),n+=`${a.dashHTML} ${a.labelHTML}`)}return n}n=e.xHTML+":";for(i=0;i"),n+=` ${a.labelHTML}: ${a.yHTML}`}return n},t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(3),a=n(11),o=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};o.prototype.toString=function(){return"RangeSelector Plugin"},o.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},o.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},o.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},o.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},o.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},o.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},o.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},o.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},o.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},o.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},o.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout(function(){t.width_=0,t.resize()},1)}return e},o.prototype.resize_=function(){function e(e,t,n,i){var a=i||r.y(t);e.style.top=n.y+"px",e.style.left=n.x+"px",e.width=n.w*a,e.height=n.h*a,e.style.width=n.w+"px",e.style.height=n.h+"px",1!=a&&t.scale(a,a)}var t=this.dygraph_.layout_.getPlotArea(),n=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(n=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+n+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var i=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},o.prototype.createCanvases_=function(){this.bgcanvas_=r.m(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.x(this.bgcanvas_),this.fgcanvas_=r.m(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.x(this.fgcanvas_)},o.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},o.prototype.initInteraction_=function(){var e,t,n,o,l,s,u,c,d,f,p,h,g,v,y=this,m=document,_=0,b=null,x=!1,w=!1,k=!this.isMobileDevice_,S=new a.a;e=function(e){var t=y.dygraph_.xAxisExtremes(),n=(t[1]-t[0])/y.canvasRect_.w;return[t[0]+(e.leftHandlePos-y.canvasRect_.x)*n,t[0]+(e.rightHandlePos-y.canvasRect_.x)*n]},t=function(e){return r.k(e),x=!0,_=e.clientX,b=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.i(m,"mousemove",n),r.i(m,"mouseup",o)),y.fgcanvas_.style.cursor="col-resize",S.cover(),!0},n=function(e){if(!x)return!1;r.k(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var n,i=y.getZoomHandleStatus_();b==y.leftZoomHandle_?(n=i.leftHandlePos+t,n=Math.min(n,i.rightHandlePos-b.width-3),n=Math.max(n,y.canvasRect_.x)):(n=i.rightHandlePos+t,n=Math.min(n,y.canvasRect_.x+y.canvasRect_.w),n=Math.max(n,i.leftHandlePos+b.width+3));var a=b.width/2;return b.style.left=n-a+"px",y.drawInteractiveLayer_(),k&&l(),!0},o=function(e){return!!x&&(x=!1,S.uncover(),r.O(m,"mousemove",n),r.O(m,"mouseup",o),y.fgcanvas_.style.cursor="default",k||l(),!0)},l=function(){try{var t=y.getZoomHandleStatus_();if(y.isChangingRange_=!0,t.isZoomed){var n=e(t);y.dygraph_.doZoomXDates_(n[0],n[1])}else y.dygraph_.resetZoom()}finally{y.isChangingRange_=!1}},s=function(e){var t=y.leftZoomHandle_.getBoundingClientRect(),n=t.left+t.width/2,r=(t=y.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>n&&e.clientX=y.canvasRect_.x+y.canvasRect_.w?i=(a=y.canvasRect_.x+y.canvasRect_.w)-o:(i+=t,a+=t);var l=y.leftZoomHandle_.width/2;return y.leftZoomHandle_.style.left=i-l+"px",y.rightZoomHandle_.style.left=a-l+"px",y.drawInteractiveLayer_(),k&&f(),!0},d=function(e){return!!w&&(w=!1,r.O(m,"mousemove",c),r.O(m,"mouseup",d),k||f(),!0)},f=function(){try{y.isChangingRange_=!0,y.dygraph_.dateWindow_=e(y.getZoomHandleStatus_()),y.dygraph_.drawGraph_(!1)}finally{y.isChangingRange_=!1}},p=function(e){if(!x&&!w){var t=s(e)?"move":"default";t!=y.fgcanvas_.style.cursor&&(y.fgcanvas_.style.cursor=t)}},h=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.k(e):"touchmove"==e.type&&1==e.targetTouches.length?n(e.targetTouches[0])&&r.k(e):o(e)},g=function(e){"touchstart"==e.type&&1==e.targetTouches.length?u(e.targetTouches[0])&&r.k(e):"touchmove"==e.type&&1==e.targetTouches.length?c(e.targetTouches[0])&&r.k(e):d(e)},v=function(e,t){for(var n=["touchstart","touchend","touchmove","touchcancel"],r=0;r1&&(h=f.rollingAverage(h,t.rollPeriod(),p)),d.push(h)}var g=[];for(e=0;e0)&&(b=Math.min(b,w),x=Math.max(x,w))}if(n)for(x=r.H(x),x+=.25*x,b=r.H(b),e=0;ethis.canvasRect_.x||n+1=0&&c.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var o=u++;n=s||(s=v(t)),r=x.bind(null,n,o,!1),i=x.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=d(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(o),l&&URL.revokeObjectURL(l)}.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var r=[],i=0;i1&&r.R(this.yAxes_[1].options,s.y2||{}),r.R(this.xAxis_.options,s.x||{})}},a.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},a.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},a.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:i.a.hasOwnProperty(e)?i.a[e]:null},a.prototype.getForAxis=function(e,t){var n,r;if("number"==typeof t)r=0===(n=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)n=0;else if("y2"==t)n=1;else{if("x"!=t)throw"Unknown axis "+t;n=-1}r=t}var a=-1==n?this.xAxis_:this.yAxes_[n];if(a){var o=a.options;if(o.hasOwnProperty(e))return o[e]}if("x"!==t||"logscale"!==e){var l=this.getGlobalUser_(e);if(null!==l)return l}var s=i.a.axes[r];return s.hasOwnProperty(e)?s[e]:this.getGlobalDefault_(e)},a.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var n=this.series_[t],r=n.options;return r.hasOwnProperty(e)?r[e]:this.getForAxis(e,n.yAxis)},a.prototype.numAxes=function(){return this.yAxes_.length},a.prototype.axisForSeries=function(e){return this.series_[e].yAxis},a.prototype.axisOptions=function(e){return this.yAxes_[e].options},a.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},a.prototype.seriesNames=function(){return this.labels_},void 0!==e);t.a=a}).call(this,n(15))},function(e,t,n){"use strict";var r=n(7),i=function(e){this.container=e}; +*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s=0&&c.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var o=u++;n=s||(s=v(t)),r=x.bind(null,n,o,!1),i=x.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=d(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(o),l&&URL.revokeObjectURL(l)}.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var r=[],i=0;i1&&r.R(this.yAxes_[1].options,s.y2||{}),r.R(this.xAxis_.options,s.x||{})}},a.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},a.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},a.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:i.a.hasOwnProperty(e)?i.a[e]:null},a.prototype.getForAxis=function(e,t){var n,r;if("number"==typeof t)r=0===(n=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)n=0;else if("y2"==t)n=1;else{if("x"!=t)throw"Unknown axis "+t;n=-1}r=t}var a=-1==n?this.xAxis_:this.yAxes_[n];if(a){var o=a.options;if(o.hasOwnProperty(e))return o[e]}if("x"!==t||"logscale"!==e){var l=this.getGlobalUser_(e);if(null!==l)return l}var s=i.a.axes[r];return s.hasOwnProperty(e)?s[e]:this.getGlobalDefault_(e)},a.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var n=this.series_[t],r=n.options;return r.hasOwnProperty(e)?r[e]:this.getForAxis(e,n.yAxis)},a.prototype.numAxes=function(){return this.yAxes_.length},a.prototype.axisForSeries=function(e){return this.series_[e].yAxis},a.prototype.axisOptions=function(e){return this.yAxes_[e].options},a.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},a.prototype.seriesNames=function(){return this.labels_},void 0!==e);t.a=a}).call(this,n(12))},function(e,t,n){"use strict";var r=n(7),i=function(e){this.container=e}; /** * @license * Copyright 2011 Dan Vanderkam (danvdk@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) - */i.prototype.draw=function(e,t){this.container.innerHTML="",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new r.a(this.container,e,t)},i.prototype.setSelection=function(e){var t=!1;e.length&&(t=e[0].row),this.date_graph.setSelection(t)},i.prototype.getSelection=function(){var e=[],t=this.date_graph.getSelection();if(t<0)return e;for(var n=this.date_graph.layout_.points,r=0;rA.length&&A.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var s=!1;if(null===t)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case a:case o:s=!0}}if(s)return r(i,t,""===n?"."+M(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uN.length&&N.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var s=!1;if(null===t)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case a:case o:s=!0}}if(s)return r(i,t,""===n?"."+M(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ue,e.release=ce}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=oe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=oe)},persist:function(){this.isPersistent=oe},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),se.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},se.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var a=new t;return i(a,n.prototype),n.prototype=a,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,de(n),n},de(se);var fe=se.extend({data:null}),pe=se.extend({data:null}),he=[9,13,27,32],ge=W&&"CompositionEvent"in window,ve=null;W&&"documentMode"in document&&(ve=document.documentMode);var ye=W&&"TextEvent"in window&&!ve,me=W&&(!ge||ve&&8=ve),_e=String.fromCharCode(32),be={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function we(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Te={eventTypes:be,extractEvents:function(e,t,n,r){var i=void 0,a=void 0;if(ge)e:{switch(e){case"compositionstart":i=be.compositionStart;break e;case"compositionend":i=be.compositionEnd;break e;case"compositionupdate":i=be.compositionUpdate;break e}i=void 0}else Se?we(e,n)&&(i=be.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=be.compositionStart);return i?(me&&"ko"!==n.locale&&(Se||i!==be.compositionStart?i===be.compositionEnd&&Se&&(a=ae()):(re="value"in(ne=r)?ne.value:ne.textContent,Se=!0)),i=fe.getPooled(i,t,n,r),a?i.data=a:null!==(a=ke(n))&&(i.data=a),B(i),a=i):a=null,(e=ye?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(xe=!0,_e);case"textInput":return(e=t.data)===_e&&xe?null:e;default:return null}}(e,n):function(e,t){if(Se)return"compositionend"===e||!ge&&we(e,t)?(e=ae(),ie=re=ne=null,Se=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1