/*
 Highcharts JS v7.0.3 (2019-02-06)
 Tree Grid

 (c) 2016-2019 Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(y){"object"===typeof module&&module.exports?(y["default"]=y,module.exports=y):"function"===typeof define&&define.amd?define(function(){return y}):y("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(y){(function(b){var p=b.addEvent,t=b.dateFormat,m=b.defined,v=b.isArray,w=b.isNumber,q=function(c){return b.isObject(c,!0)},n=b.merge,k=b.pick,d=b.wrap,e=b.Axis,l=b.Tick,h={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};e.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};
e.prototype.isOuterAxis=function(){var c=this,a=-1,f=!0;c.chart.axes.forEach(function(g,h){g.side!==c.side||g.isNavigatorAxis()||(g===c?a=h:0<=a&&h>a&&(f=!1))});return f};e.prototype.getMaxLabelDimensions=function(c,a){var f={width:0,height:0};a.forEach(function(a){a=c[a];var g;q(a)&&(g=q(a.label)?a.label:{},a=g.getBBox?g.getBBox().height:0,g=w(g.textPxLength)?g.textPxLength:0,f.height=Math.max(a,f.height),f.width=Math.max(g,f.width))});return f};b.dateFormats={W:function(c){c=new Date(c);var a;c.setHours(0,
0,0,0);c.setDate(c.getDate()-(c.getDay()||7));a=new Date(c.getFullYear(),0,1);return Math.ceil(((c-a)/864E5+1)/7)},E:function(c){return t("%a",c,!0).charAt(0)}};p(l,"afterGetLabelPosition",function(c){var a=this.label,f=this.axis,g=f.reversed,d=f.chart,k=f.options,e=k&&q(k.grid)?k.grid:{},k=f.options.labels,l=k.align,b=h[f.side],n=c.tickmarkOffset,z=f.tickPositions,u=this.pos-n,z=w(z[c.index+1])?z[c.index+1]-n:f.max+n,A=f.tickSize("tick",!0),n=v(A)?A[0]:0,A=A&&A[1]/2,r;!0===e.enabled&&("top"===b?
(e=f.top+f.offset,r=e-n):"bottom"===b?(r=d.chartHeight-f.bottom+f.offset,e=r+n):(e=f.top+f.len-f.translate(g?z:u),r=f.top+f.len-f.translate(g?u:z)),"right"===b?(b=d.chartWidth-f.right+f.offset,g=b+n):"left"===b?(g=f.left+f.offset,b=g-n):(b=Math.round(f.left+f.translate(g?z:u))-A,g=Math.round(f.left+f.translate(g?u:z))-A),this.slotWidth=g-b,c.pos.x="left"===l?b:"right"===l?g:b+(g-b)/2,c.pos.y=r+(e-r)/2,d=d.renderer.fontMetrics(k.style.fontSize,a.element),a=a.getBBox().height,k.useHTML?c.pos.y+=d.b+
-(a/2):(a=Math.round(a/d.h),c.pos.y+=(d.b-(d.h-d.f))/2+-((a-1)*d.h/2)),c.pos.x+=f.horiz&&k.x||0)});p(e,"afterTickSize",function(c){var a=this.maxLabelDimensions,f=this.options;!0===(f&&q(f.grid)?f.grid:{}).enabled&&(f=2*Math.abs(this.defaultLeftAxisOptions.labels.x),a=f+(this.horiz?a.height:a.width),v(c.tickSize)?c.tickSize[0]=a:c.tickSize=[a])});p(e,"afterGetTitlePosition",function(c){var a=this.options;if(!0===(a&&q(a.grid)?a.grid:{}).enabled){var f=this.axisTitle,g=f&&f.getBBox().width,d=this.horiz,
e=this.left,b=this.top,l=this.width,n=this.height,p=a.title,a=this.opposite,z=this.offset,u=this.tickSize()||[0],A=p.x||0,r=p.y||0,B=k(p.margin,d?5:10),f=this.chart.renderer.fontMetrics(p.style&&p.style.fontSize,f).f,u=(d?b+n:e)+u[0]/2*(a?-1:1)*(d?1:-1)+(this.side===h.bottom?f:0);c.titlePosition.x=d?e-g/2-B+A:u+(a?l:0)+z+A;c.titlePosition.y=d?u-(a?n:0)+(a?f:-f)/2+z+r:b-B+r}});d(e.prototype,"unsquish",function(c){var a=this.options;return!0===(a&&q(a.grid)?a.grid:{}).enabled&&this.categories?this.tickInterval:
c.apply(this,Array.prototype.slice.call(arguments,1))});p(e,"afterSetOptions",function(c){var a=this.options;c=c.userOptions;var f,g=a&&q(a.grid)?a.grid:{};!0===g.enabled&&(f=n(!0,{className:"highcharts-grid-axis "+(c.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]]},c),"xAxis"===this.coll&&(m(c.linkedTo)&&!m(c.tickPixelInterval)&&(f.tickPixelInterval=350),m(c.tickPixelInterval)||!m(c.linkedTo)||m(c.tickPositioner)||m(c.tickInterval)||(f.tickPositioner=function(a,c){var g=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(g){var h,d,k,e,l=f.units;for(e=0;e<l.length;e++)if(l[e][0]===
g.unitName){h=e;break}if(l[h][1])return l[h+1]&&(k=l[h+1][0],d=(l[h+1][1]||[1])[0]),g=b.timeUnits[k],this.tickInterval=g*d,this.getTimeTicks({unitRange:g,count:d,unitName:k},a,c,this.options.startOfWeek)}})),n(!0,this.options,f),this.horiz&&(a.minPadding=k(c.minPadding,0),a.maxPadding=k(c.maxPadding,0)),w(a.grid.borderWidth)&&(a.tickWidth=a.lineWidth=g.borderWidth))});p(e,"afterSetAxisTranslation",function(){var c=this.options,a=c&&q(c.grid)?c.grid:{},f=this.tickPositions&&this.tickPositions.info,
g=this.userOptions.labels||{};this.horiz&&(!0===a.enabled&&this.series.forEach(function(a){a.options.pointRange=0}),f&&(!1===c.dateTimeLabelFormats[f.unitName].range||1<f.count)&&!m(g.align)&&(c.labels.align="left",m(g.x)||(c.labels.x=3)))});p(e,"trimTicks",function(){var c=this.options,a=c&&q(c.grid)?c.grid:{},f=this.categories,g=this.tickPositions,h=g[0],d=g[g.length-1],k=this.linkedParent&&this.linkedParent.min||this.min,e=this.linkedParent&&this.linkedParent.max||this.max,b=this.tickInterval;
!0!==a.enabled||f||!this.horiz&&!this.isLinked||((h>k||h<k&&h+b>k)&&!c.startOnTick&&(g[0]=k),(d<e||d>e&&d-b<e)&&!c.endOnTick&&(g[g.length-1]=e))});p(e,"afterRender",function(){var c=this.options,a=c&&q(c.grid)?c.grid:{},f,g,d,k,e,b,l=this.chart.renderer,n=this.horiz;if(!0===a.enabled&&(a=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),a=this.maxLabelDimensions.width+a,f=c.lineWidth,this.rightWall&&this.rightWall.destroy(),
g=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(n&&(a=g.height-1),f))){g=this.getLinePath(f);e=g.indexOf("M")+1;b=g.indexOf("L")+1;d=g.indexOf("M")+2;k=g.indexOf("L")+2;if(this.side===h.top||this.side===h.left)a=-a;n?(g[d]+=a,g[k]+=a):(g[e]+=a,g[b]+=a);this.axisLineExtra?this.axisLineExtra.animate({d:g}):this.axisLineExtra=l.path(g).attr({stroke:c.lineColor,"stroke-width":f,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});
p(e,"init",function(c){function a(){var a=f.options,g=25/11,c=f.chart.renderer.fontMetrics(a.labels.style.fontSize);a.labels||(a.labels={});a.labels.align=k(a.labels.align,"center");f.categories||(a.showLastLabel=!1);f.horiz&&(a.tickLength=h.cellHeight||c.h*g);f.labelRotation=0;a.labels.rotation=0}var f=this,g=f.chart,h=(c=c.userOptions)&&q(c.grid)?c.grid:{},l,D,x;if(h.enabled)if(m(h.borderColor)&&(c.tickColor=c.lineColor=h.borderColor),v(h.columns)){D=0;for(x=h.columns.length;x--;)l=n(c,h.columns[x],
{type:"category"}),delete l.grid.columns,l=new e(f.chart,l),l.isColumn=!0,l.columnIndex=D,d(l,"labelFormatter",function(a){var g=this.axis,c=g.tickPositions,h=this.value,f=h===c[0],c=h===c[c.length-1],d=b.find(g.series[0].options.data,function(a){return a[g.isXAxis?"x":"y"]===h});this.isFirst=f;this.isLast=c;this.point=d;return a.call(this)}),D++;p(this,"afterInit",function(){b.erase(g.axes,this);b.erase(g[f.coll],this)})}else p(this,"afterInit",a)})})(y);var G=function(b){var p=b.extend,t=b.isNumber,
m=b.pick,v=function(b,n){var k=b.reduce(function(d,k){var e=m(k.parent,"");void 0===d[e]&&(d[e]=[]);d[e].push(k);return d},{});Object.keys(k).forEach(function(d,e){var b=k[d];""!==d&&-1===n.indexOf(d)&&(b.forEach(function(h){e[""].push(h)}),delete e[d])});return k},w=function(b,n,k,d,e,l){var h=0,c=0,a=l&&l.after,f=l&&l.before;n={data:d,depth:k-1,id:b,level:k,parent:n};var g,q;"function"===typeof f&&f(n,l);f=(e[b]||[]).map(function(a){var f=w(a.id,b,k+1,a,e,l),d=a.start;a=!0===a.milestone?d:a.end;
g=!t(g)||d<g?d:g;q=!t(q)||a>q?a:q;h=h+1+f.descendants;c=Math.max(f.height+1,c);return f});d&&(d.start=m(d.start,g),d.end=m(d.end,q));p(n,{children:f,descendants:h,height:c});"function"===typeof a&&a(n,l);return n};return{getListOfParents:v,getNode:w,getTree:function(b,n){var k=b.map(function(d){return d.id});b=v(b,k);return w("",null,1,null,b,n)}}}(y),H=function(b){var p=b.extend,t=b.isArray,m=b.isObject,v=b.isNumber,w=b.merge,q=b.pick;return{getColor:function(n,k){var d=k.index,e=k.mapOptionsToLevel,
l=k.parentColor,h=k.parentColorIndex,c=k.series,a=k.colors,f=k.siblings,g=c.points,p=c.chart.options.chart,C,m,x,t;if(n){g=g[n.i];n=e[n.level]||{};if(e=g&&n.colorByPoint)m=g.index%(a?a.length:p.colorCount),C=a&&a[m];if(!c.chart.styledMode){a=g&&g.options.color;p=n&&n.color;if(x=l)x=(x=n&&n.colorVariation)&&"brightness"===x.key?b.color(l).brighten(d/f*x.to).get():l;x=q(a,p,C,x,c.color)}t=q(g&&g.options.colorIndex,n&&n.colorIndex,m,h,k.colorIndex)}return{color:x,colorIndex:t}},getLevelOptions:function(b){var k=
null,d,e,l,h;if(m(b))for(k={},l=v(b.from)?b.from:1,h=b.levels,e={},d=m(b.defaults)?b.defaults:{},t(h)&&(e=h.reduce(function(c,a){var f,g;m(a)&&v(a.level)&&(g=w({},a),f="boolean"===typeof g.levelIsConstant?g.levelIsConstant:d.levelIsConstant,delete g.levelIsConstant,delete g.level,a=a.level+(f?0:l-1),m(c[a])?p(c[a],g):c[a]=g);return c},{})),h=v(b.to)?b.to:1,b=0;b<=h;b++)k[b]=w({},d,m(e[b])?e[b]:{});return k},setTreeValues:function k(d,b){var e=b.before,h=b.idRoot,c=b.mapIdToNode[h],a=b.points[d.i],
f=a&&a.options||{},g=0,m=[];p(d,{levelDynamic:d.level-(("boolean"===typeof b.levelIsConstant?b.levelIsConstant:1)?0:c.level),name:q(a&&a.name,""),visible:h===d.id||("boolean"===typeof b.visible?b.visible:!1)});"function"===typeof e&&(d=e(d,b));d.children.forEach(function(a,c){var f=p({},b);p(f,{index:c,siblings:d.children.length,visible:d.visible});a=k(a,f);m.push(a);a.visible&&(g+=a.val)});d.visible=0<g||d.visible;e=q(f.value,g);p(d,{children:m,childrenTotal:g,isLeaf:d.visible&&!g,val:e});return d},
updateRootId:function(b){var d;m(b)&&(d=m(b.options)?b.options:{},d=q(b.rootNode,d.rootId,""),m(b.userOptions)&&(b.userOptions.rootId=d),b.rootNode=d);return d}}}(y);(function(b){var p=b.addEvent,t=b.pick,m=b.extend,v=b.isArray,w=b.fireEvent,q=b.Axis,n=b.Series;m(q.prototype,{isInBreak:function(b,d){var e=b.repeat||Infinity,k=b.from,h=b.to-b.from;d=d>=k?(d-k)%e:e-(k-d)%e;return b.inclusive?d<=h:d<h&&0!==d},isInAnyBreak:function(b,d){var e=this.options.breaks,k=e&&e.length,h,c,a;if(k){for(;k--;)this.isInBreak(e[k],
b)&&(h=!0,c||(c=t(e[k].showPoints,!this.isXAxis)));a=h&&d?h&&!c:h}return a}});p(q,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});p(q,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,d=this.tickPositions.info,e=[],l;for(l=0;l<b.length;l++)this.isInAnyBreak(b[l])||e.push(b[l]);this.tickPositions=e;this.tickPositions.info=d}});p(q,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});q.prototype.setBreaks=
function(b,d){function e(a){var b=a,c,d;for(d=0;d<h.breakArray.length;d++)if(c=h.breakArray[d],c.to<=a)b-=c.len;else if(c.from>=a)break;else if(h.isInBreak(c,a)){b-=a-c.from;break}return b}function k(a){var b,c;for(c=0;c<h.breakArray.length&&!(b=h.breakArray[c],b.from>=a);c++)b.to<a?a+=b.len:h.isInBreak(b,a)&&(a+=b.len);return a}var h=this,c=v(b)&&!!b.length;h.isDirty=h.isBroken!==c;h.isBroken=c;h.options.breaks=h.userOptions.breaks=b;h.forceRedraw=!0;c||h.val2lin!==e||(delete h.val2lin,delete h.lin2val);
c&&(h.userOptions.ordinal=!1,h.val2lin=e,h.lin2val=k,h.setExtremes=function(a,b,c,h,d){if(this.isBroken){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange}q.prototype.setExtremes.call(this,a,b,c,h,d)},h.setAxisTranslation=function(a){q.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=h.options.breaks;var b=[],c=[],d=0,e,k,l=h.userMin||h.min,n=h.userMax||h.max,p=t(h.pointRangePadding,0),m,u;a.forEach(function(a){k=
a.repeat||Infinity;h.isInBreak(a,l)&&(l+=a.to%k-l%k);h.isInBreak(a,n)&&(n-=n%k-a.from%k)});a.forEach(function(a){m=a.from;for(k=a.repeat||Infinity;m-k>l;)m-=k;for(;m<l;)m+=k;for(u=m;u<n;u+=k)b.push({value:u,move:"in"}),b.push({value:u+(a.to-a.from),move:"out",size:a.breakSize})});b.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});e=0;m=l;b.forEach(function(a){e+="in"===a.move?1:-1;1===e&&"in"===a.move&&(m=a.value);0===e&&(c.push({from:m,to:a.value,
len:a.value-m-(a.size||0)}),d+=a.value-m-(a.size||0))});h.breakArray=c;h.unitLength=n-l-d+p;w(h,"afterBreaks");h.staticScale?h.transA=h.staticScale:h.unitLength&&(h.transA*=(n-h.min+p)/h.unitLength);p&&(h.minPixelPadding=h.transA*h.minPointOffset);h.min=l;h.max=n}});t(d,!0)&&this.chart.redraw()};p(n,"afterGeneratePoints",function(){var b=this.xAxis,d=this.yAxis,e=this.points,l,h=e.length,c=this.options.connectNulls,a;if(b&&d&&(b.options.breaks||d.options.breaks))for(;h--;)l=e[h],a=null===l.y&&!1===
c,a||!b.isInAnyBreak(l.x,!0)&&!d.isInAnyBreak(l.y,!0)||(e.splice(h,1),this.data[h]&&this.data[h].destroyElements())});p(n,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,t(this.pointArrayMap,["y"]))});b.Series.prototype.drawBreaks=function(b,d){var e=this,k=e.points,h,c,a,f;b&&d.forEach(function(d){h=b.breakArray||[];c=b.isXAxis?b.min:t(e.options.threshold,b.min);k.forEach(function(g){f=t(g["stack"+d.toUpperCase()],g[d]);h.forEach(function(d){a=!1;if(c<d.from&&
f>d.to||c>d.from&&f<d.from)a="pointBreak";else if(c<d.from&&f>d.from&&f<d.to||c>d.from&&f>d.to&&f<d.from)a="pointInBreak";a&&w(b,a,{point:g,brk:d})})})})};b.Series.prototype.gappedPath=function(){var k=this.currentDataGrouping,d=k&&k.gapSize,k=this.options.gapSize,e=this.points.slice(),l=e.length-1,h=this.yAxis;if(k&&0<l)for("value"!==this.options.gapUnit&&(k*=this.closestPointRange),d&&d>k&&(k=d);l--;)e[l+1].x-e[l].x>k&&(d=(e[l].x+e[l+1].x)/2,e.splice(l+1,0,{isNull:!0,x:d}),this.options.stacking&&
(d=h.stacks[this.stackKey][d]=new b.StackItem(h,h.options.stackLabels,!1,d,this.stack),d.total=0));return this.getGraphPath(e)}})(y);(function(b,p,t){var m=b.addEvent,v=function(a){return Array.prototype.slice.call(a,1)},w=b.defined,q=b.extend,n=b.find,k=b.fireEvent,d=t.getLevelOptions,e=b.merge,l=b.isNumber,h=function(a){return b.isObject(a,!0)},c=b.isString,a=b.pick,f=b.wrap;t=b.Axis;var g=b.Tick,y=function(a,b){var c,d;for(c in b)b.hasOwnProperty(c)&&(d=b[c],f(a,c,d))},C=function(a,b){var c=a.collapseStart;
a=a.collapseEnd;a>=b&&(c-=.5);return{from:c,to:a,showPoints:!1}},D=function(a){return Object.keys(a.mapOfPosToGridNode).reduce(function(b,c){c=+c;a.min<=c&&a.max>=c&&!a.isInAnyBreak(c)&&b.push(c);return b},[])},x=function(a,b){var c=a.options.breaks||[],d=C(b,a.max);return c.some(function(a){return a.from===d.from&&a.to===d.to})},E=function(a,b){var c=a.options.breaks||[];a=C(b,a.max);c.push(a);return c},F=function(a,b){var c=a.options.breaks||[],d=C(b,a.max);return c.reduce(function(a,b){b.to===
d.to&&b.from===d.from||a.push(b);return a},[])},z=function(c,d){var h=c.labelIcon,g=!h,f=d.renderer,e=d.xy,k=d.options,B=k.width,l=k.height,n=e.x-B/2-k.padding,e=e.y-l/2,r=d.collapsed?90:180,m=d.show&&b.isNumber(e);g&&(c.labelIcon=h=f.path(f.symbols[k.type](k.x,k.y,B,l)).addClass("highcharts-label-icon").add(d.group));m||h.attr({y:-9999});f.styledMode||h.attr({"stroke-width":1,fill:a(d.color,"#666666")}).css({cursor:"pointer",stroke:k.lineColor,strokeWidth:k.lineWidth});h[g?"attr":"animate"]({translateX:n,
translateY:e,rotation:r})},u=function(a){a.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(a){var c=a.options&&a.options.labels,h;a.updateYNames();a.series.forEach(function(a){a.yData=a.options.data.map(function(a){return a.y})});a.mapOptionsToLevel=d({defaults:c,from:1,levels:c.levels,to:a.tree.height});h=b.addEvent(a,"foundExtremes",function(){a.collapsedNodes.forEach(function(b){b=E(a,b);a.setBreaks(b,!1)});h()})})},A=function(a,b,d){var f=[],g=[],e={},k={},
l=-1,B="boolean"===typeof b?b:!1;a=p.getTree(a,{after:function(a){a=k[a.pos];var b=0,c=0;a.children.forEach(function(a){c+=a.descendants+1;b=Math.max(a.height+1,b)});a.descendants=c;a.height=b;a.collapsed&&g.push(a)},before:function(a){var b=h(a.data)?a.data:{},d=c(b.name)?b.name:"",g=e[a.parent],g=h(g)?k[g.pos]:null,m=function(a){return a.name===d},r;B&&h(g)&&(r=n(g.children,m))?(m=r.pos,r.nodes.push(a)):m=l++;k[m]||(k[m]=r={depth:g?g.depth+1:0,name:d,nodes:[a],children:[],pos:m},-1!==m&&f.push(d),
h(g)&&g.children.push(r));c(a.id)&&(e[a.id]=a);!0===b.collapsed&&(r.collapsed=!0);a.pos=m}});k=function(a,b){var c=function(a,d,g){var f=d+(-1===d?0:b-1),e=(f-d)/2,k=d+e;a.nodes.forEach(function(a){var b=a.data;h(b)&&(b.y=d+b.seriesIndex,delete b.seriesIndex);a.pos=k});g[k]=a;a.pos=k;a.tickmarkOffset=e+.5;a.collapseStart=f+.5;a.children.forEach(function(a){c(a,f+1,g);f=a.collapseEnd-.5});a.collapseEnd=f+.5;return g};return c(a["-1"],-1,{})}(k,d);return{categories:f,mapOfIdToNode:e,mapOfPosToGridNode:k,
collapsedNodes:g,tree:a}};y(t.prototype,{init:function(a,b,c){var d="treegrid"===c.type;d&&(m(b,"beforeRender",u),m(b,"beforeRedraw",u),c=e({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},c,{reversed:!0,grid:{columns:void 0}}));a.apply(this,[b,c]);d&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(a){var b=this.options,c=b&&b.labels,
b=c&&l(c.indentation)?b.labels.indentation:0,c=a.apply(this,v(arguments)),d;"treegrid"===this.options.type&&this.mapOfPosToGridNode&&(d=this.mapOfPosToGridNode[-1].height,c.width+=b*(d-1));return c},generateTick:function(a,b){var c=h(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},d=this.ticks,f=d[b],k,e;"treegrid"===this.options.type?(e=this.mapOfPosToGridNode[b],(c=c[e.depth])&&(k={labels:c}),f?(f.parameters.category=e.name,f.options=k,f.addLabel()):d[b]=new g(this,b,null,void 0,{category:e.name,
tickmarkOffset:e.tickmarkOffset,options:k})):a.apply(this,v(arguments))},setTickInterval:function(b){var c=this.options;"treegrid"===c.type?(this.min=a(this.userMin,c.min,this.dataMin),this.max=a(this.userMax,c.max,this.dataMax),k(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?D(this):[]):b.apply(this,v(arguments))}});y(g.prototype,{getLabelPosition:function(b,c,d,g,f,e,k,m,n){var p=a(this.options&&this.options.labels,
e);e=this.pos;var r=this.axis,B="treegrid"===r.options.type;b=b.apply(this,[c,d,g,f,p,k,m,n]);B&&(c=p&&h(p.symbol)?p.symbol:{},p=p&&l(p.indentation)?p.indentation:0,e=(e=(r=r.mapOfPosToGridNode)&&r[e])&&e.depth||1,b.x+=c.width+2*c.padding+(e-1)*p);return b},renderLabel:function(c){var d=this,g=d.pos,f=d.axis,e=d.label,k=f.mapOfPosToGridNode,l=f.options,m=a(d.options&&d.options.labels,l&&l.labels),n=m&&h(m.symbol)?m.symbol:{},p=(k=k&&k[g])&&k.depth,l="treegrid"===l.type,r=!(!e||!e.element),q=-1<f.tickPositions.indexOf(g),
g=f.chart.styledMode;l&&k&&r&&e.addClass("highcharts-treegrid-node-level-"+p);c.apply(d,v(arguments));l&&k&&r&&0<k.descendants&&(f=x(f,k),z(d,{color:!g&&e.styles.color,collapsed:f,group:e.parentGroup,options:n,renderer:e.renderer,show:q,xy:e.xy}),n="highcharts-treegrid-node-"+(f?"expanded":"collapsed"),e.addClass("highcharts-treegrid-node-"+(f?"collapsed":"expanded")).removeClass(n),g||e.css({cursor:"pointer"}),[e,d.labelIcon].forEach(function(a){a.attachedTreeGridEvents||(b.addEvent(a.element,"mouseover",
function(){var a=e;a.addClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:"underline"})}),b.addEvent(a.element,"mouseout",function(){var a=e,b=m,b=w(b.style)?b.style:{};a.removeClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:b.textDecoration})}),b.addEvent(a.element,"click",function(){d.toggleCollapse()}),a.attachedTreeGridEvents=!0)}))}});q(g.prototype,{collapse:function(b){var c=this.axis,d=E(c,c.mapOfPosToGridNode[this.pos]);
c.setBreaks(d,a(b,!0))},expand:function(b){var c=this.axis,d=F(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,a(b,!0))},toggleCollapse:function(b){var c=this.axis,d;d=c.mapOfPosToGridNode[this.pos];d=x(c,d)?F(c,d):E(c,d);c.setBreaks(d,a(b,!0))}});t.prototype.updateYNames=function(){var a=this.options,b=a.uniqueNames,c=!this.isXAxis,d=this.series,e=0;"treegrid"===a.type&&c&&(a=d.reduce(function(a,c){c.visible&&(c.options.data.forEach(function(b){h(b)&&(b.seriesIndex=e,a.push(b))}),!0===b&&e++);return a},
[]),a=A(a,b,!0===b?e:1),this.categories=a.categories,this.mapOfPosToGridNode=a.mapOfPosToGridNode,this.collapsedNodes=a.collapsedNodes,this.hasNames=!0,this.tree=a.tree)};t.prototype.utils={getNode:p.getNode}})(y,G,H)});
//# sourceMappingURL=treegrid.js.map
