/* Highcharts JS v7.0.3 (2019-02-06) GridAxis (c) 2016-2019 Lars A. V. Cabrera License: www.highcharts.com/license */ (function(n){"object"===typeof module&&module.exports?(n["default"]=n,module.exports=n):"function"===typeof define&&define.amd?define(function(){return n}):n("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(n){(function(g){var l=g.addEvent,n=g.dateFormat,t=g.defined,x=g.isArray,y=g.isNumber,r=function(a){return g.isObject(a,!0)},z=g.merge,v=g.pick,A=g.wrap,f=g.Axis,C=g.Tick,w={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};f.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)}; f.prototype.isOuterAxis=function(){var a=this,b=-1,c=!0;a.chart.axes.forEach(function(d,e){d.side!==a.side||d.isNavigatorAxis()||(d===a?b=e:0<=b&&e>b&&(c=!1))});return c};f.prototype.getMaxLabelDimensions=function(a,b){var c={width:0,height:0};b.forEach(function(b){b=a[b];var d;r(b)&&(d=r(b.label)?b.label:{},b=d.getBBox?d.getBBox().height:0,d=y(d.textPxLength)?d.textPxLength:0,c.height=Math.max(b,c.height),c.width=Math.max(d,c.width))});return c};g.dateFormats={W:function(a){a=new Date(a);var b;a.setHours(0, 0,0,0);a.setDate(a.getDate()-(a.getDay()||7));b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)},E:function(a){return n("%a",a,!0).charAt(0)}};l(C,"afterGetLabelPosition",function(a){var b=this.label,c=this.axis,d=c.reversed,e=c.chart,h=c.options,q=h&&r(h.grid)?h.grid:{},h=c.options.labels,B=h.align,k=w[c.side],m=a.tickmarkOffset,p=c.tickPositions,u=this.pos-m,p=y(p[a.index+1])?p[a.index+1]-m:c.max+m,g=c.tickSize("tick",!0),m=x(g)?g[0]:0,g=g&&g[1]/2,f;!0===q.enabled&&("top"===k? (q=c.top+c.offset,f=q-m):"bottom"===k?(f=e.chartHeight-c.bottom+c.offset,q=f+m):(q=c.top+c.len-c.translate(d?p:u),f=c.top+c.len-c.translate(d?u:p)),"right"===k?(k=e.chartWidth-c.right+c.offset,d=k+m):"left"===k?(d=c.left+c.offset,k=d-m):(k=Math.round(c.left+c.translate(d?p:u))-g,d=Math.round(c.left+c.translate(d?u:p))-g),this.slotWidth=d-k,a.pos.x="left"===B?k:"right"===B?d:k+(d-k)/2,a.pos.y=f+(q-f)/2,e=e.renderer.fontMetrics(h.style.fontSize,b.element),b=b.getBBox().height,h.useHTML?a.pos.y+=e.b+ -(b/2):(b=Math.round(b/e.h),a.pos.y+=(e.b-(e.h-e.f))/2+-((b-1)*e.h/2)),a.pos.x+=c.horiz&&h.x||0)});l(f,"afterTickSize",function(a){var b=this.maxLabelDimensions,c=this.options;!0===(c&&r(c.grid)?c.grid:{}).enabled&&(c=2*Math.abs(this.defaultLeftAxisOptions.labels.x),b=c+(this.horiz?b.height:b.width),x(a.tickSize)?a.tickSize[0]=b:a.tickSize=[b])});l(f,"afterGetTitlePosition",function(a){var b=this.options;if(!0===(b&&r(b.grid)?b.grid:{}).enabled){var c=this.axisTitle,d=c&&c.getBBox().width,e=this.horiz, h=this.left,q=this.top,g=this.width,k=this.height,m=b.title,b=this.opposite,p=this.offset,u=this.tickSize()||[0],f=m.x||0,l=m.y||0,n=v(m.margin,e?5:10),c=this.chart.renderer.fontMetrics(m.style&&m.style.fontSize,c).f,u=(e?q+k:h)+u[0]/2*(b?-1:1)*(e?1:-1)+(this.side===w.bottom?c:0);a.titlePosition.x=e?h-d/2-n+f:u+(b?g:0)+p+f;a.titlePosition.y=e?u-(b?k:0)+(b?c:-c)/2+p+l:q-n+l}});A(f.prototype,"unsquish",function(a){var b=this.options;return!0===(b&&r(b.grid)?b.grid:{}).enabled&&this.categories?this.tickInterval: a.apply(this,Array.prototype.slice.call(arguments,1))});l(f,"afterSetOptions",function(a){var b=this.options;a=a.userOptions;var c,d=b&&r(b.grid)?b.grid:{};!0===d.enabled&&(c=z(!0,{className:"highcharts-grid-axis "+(a.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0}, units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},a),"xAxis"===this.coll&&(t(a.linkedTo)&&!t(a.tickPixelInterval)&&(c.tickPixelInterval=350),t(a.tickPixelInterval)||!t(a.linkedTo)||t(a.tickPositioner)||t(a.tickInterval)||(c.tickPositioner=function(a,b){var d=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(d){var e,k,h,p,f=c.units;for(p=0;pf||ef)&&!a.startOnTick&&(d[0]=f),(hg&&h-k