/* Highcharts Gantt JS v9.1.1 (2021-06-03) GridAxis (c) 2016-2021 Lars A. V. Cabrera License: www.highcharts.com/license */ 'use strict';(function(g){"object"===typeof module&&module.exports?(g["default"]=g,module.exports=g):"function"===typeof define&&define.amd?define("highcharts/modules/grid-axis",["highcharts"],function(n){g(n);g.Highcharts=n;return g}):g("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(g){function n(g,m,n,k){g.hasOwnProperty(m)||(g[m]=k.apply(null,n))}g=g?g._modules:{};n(g,"Core/Axis/GridAxis.js",[g["Core/Axis/Axis.js"],g["Core/Axis/AxisDefaults.js"],g["Core/Globals.js"],g["Core/Utilities.js"]], function(g,n,z,k){var m=z.dateFormats,f=k.addEvent,p=k.defined,y=k.erase,C=k.find,D=k.isArray,u=k.isNumber,v=k.merge,x=k.pick,E=k.timeUnits,F=k.wrap,w;(function(q){function m(a,b){var c={width:0,height:0};b.forEach(function(b){b=a[b];if(k.isObject(b,!0)){var d=k.isObject(b.label,!0)?b.label:{};b=d.getBBox?d.getBBox().height:0;d.textStr&&!u(d.textPxLength)&&(d.textPxLength=d.getBBox().width);var e=u(d.textPxLength)?Math.round(d.textPxLength):0;d.textStr&&(e=Math.round(d.getBBox().width));c.height= Math.max(b,c.height);c.width=Math.max(e,c.width)}});"treegrid"===this.options.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode&&(c.width+=this.options.labels.indentation*((this.treeGrid.mapOfPosToGridNode[-1].height||0)-1));return c}function G(){var a=this.grid;(a&&a.columns||[]).forEach(function(b){b.getOffset()})}function w(a){if(!0===(this.options.grid||{}).enabled){var b=this.axisTitle,c=this.height,e=this.horiz,d=this.left,h=this.offset,l=this.opposite,t=this.options,A=this.top,g=this.width, r=this.tickSize(),k=b&&b.getBBox().width,f=t.title.x,n=t.title.y,m=x(t.title.margin,e?5:10);b=this.chart.renderer.fontMetrics(t.title.style.fontSize,b).f;r=(e?A+c:d)+(e?1:-1)*(l?-1:1)*(r?r[0]/2:0)+(this.side===q.Side.bottom?b:0);a.titlePosition.x=e?d-(k||0)/2-m+f:r+(l?g:0)+h+f;a.titlePosition.y=e?r-(l?c:0)+(l?b:-b)/2+h+n:A-m+n}}function H(){var a=this.chart,b=this.options.grid;b=void 0===b?{}:b;var c=this.userOptions;if(b.enabled){var e=this.options;e.labels.align=x(e.labels.align,"center");this.categories|| (e.showLastLabel=!1);this.labelRotation=0;e.labels.rotation=0}if(b.columns){e=this.grid.columns=[];for(var d=this.grid.columnIndex=0;++da?l.hide():l.show()),(l=this.ticks[b].label)&&(b-e>a?l.hide():l.show()),(c=this.ticks[b].mark)&&(b-eh&&!a.startOnTick&&(c[0]=h),d>f&&d-g