/*
 Highcharts JS v7.0.3 (2019-02-06)
 Gantt series

 (c) 2016-2019 Lars A. V. Cabrera

 License: www.highcharts.com/license
*/
(function(B){"object"===typeof module&&module.exports?(B["default"]=B,module.exports=B):"function"===typeof define&&define.amd?define(function(){return B}):B("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(B){(function(b){var k=b.addEvent,u=b.PlotLineOrBand,t=b.merge,r={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};k(b.Axis,"afterSetOptions",function(){var b=this.options,q=b.currentDateIndicator;
q&&("object"===typeof q?(q.label&&q.label.format&&(q.label.formatter=void 0),q=t(r,q)):q=t(r),q.value=new Date,b.plotLines||(b.plotLines=[]),b.plotLines.push(q))});k(u,"render",function(){var n=this.options,q,p;n.currentDateIndicator&&n.label&&(q=n.label.format,p=n.label.formatter,n.value=new Date,n.label.text="function"===typeof p?p(this):b.dateFormat(q,new Date),this.label&&this.label.attr({text:n.label.text}))})})(B);(function(b){var k=b.addEvent,u=b.dateFormat,t=b.defined,r=b.isArray,n=b.isNumber,
q=function(a){return b.isObject(a,!0)},p=b.merge,m=b.pick,a=b.wrap,f=b.Axis,e=b.Tick,h={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,g=-1,c=!0;a.chart.axes.forEach(function(d,l){d.side!==a.side||d.isNavigatorAxis()||(d===a?g=l:0<=g&&l>g&&(c=!1))});return c};f.prototype.getMaxLabelDimensions=function(a,g){var c={width:0,height:0};
g.forEach(function(d){d=a[d];var g;q(d)&&(g=q(d.label)?d.label:{},d=g.getBBox?g.getBBox().height:0,g=n(g.textPxLength)?g.textPxLength:0,c.height=Math.max(d,c.height),c.width=Math.max(g,c.width))});return c};b.dateFormats={W:function(a){a=new Date(a);var g;a.setHours(0,0,0,0);a.setDate(a.getDate()-(a.getDay()||7));g=new Date(a.getFullYear(),0,1);return Math.ceil(((a-g)/864E5+1)/7)},E:function(a){return u("%a",a,!0).charAt(0)}};k(e,"afterGetLabelPosition",function(a){var g=this.label,c=this.axis,d=
c.reversed,l=c.chart,v=c.options,f=v&&q(v.grid)?v.grid:{},v=c.options.labels,b=v.align,e=h[c.side],x=a.tickmarkOffset,m=c.tickPositions,p=this.pos-x,m=n(m[a.index+1])?m[a.index+1]-x:c.max+x,C=c.tickSize("tick",!0),x=r(C)?C[0]:0,C=C&&C[1]/2,D;!0===f.enabled&&("top"===e?(f=c.top+c.offset,D=f-x):"bottom"===e?(D=l.chartHeight-c.bottom+c.offset,f=D+x):(f=c.top+c.len-c.translate(d?m:p),D=c.top+c.len-c.translate(d?p:m)),"right"===e?(e=l.chartWidth-c.right+c.offset,d=e+x):"left"===e?(d=c.left+c.offset,e=
d-x):(e=Math.round(c.left+c.translate(d?m:p))-C,d=Math.round(c.left+c.translate(d?p:m))-C),this.slotWidth=d-e,a.pos.x="left"===b?e:"right"===b?d:e+(d-e)/2,a.pos.y=D+(f-D)/2,l=l.renderer.fontMetrics(v.style.fontSize,g.element),g=g.getBBox().height,v.useHTML?a.pos.y+=l.b+-(g/2):(g=Math.round(g/l.h),a.pos.y+=(l.b-(l.h-l.f))/2+-((g-1)*l.h/2)),a.pos.x+=c.horiz&&v.x||0)});k(f,"afterTickSize",function(a){var g=this.maxLabelDimensions,c=this.options;!0===(c&&q(c.grid)?c.grid:{}).enabled&&(c=2*Math.abs(this.defaultLeftAxisOptions.labels.x),
g=c+(this.horiz?g.height:g.width),r(a.tickSize)?a.tickSize[0]=g:a.tickSize=[g])});k(f,"afterGetTitlePosition",function(a){var g=this.options;if(!0===(g&&q(g.grid)?g.grid:{}).enabled){var c=this.axisTitle,d=c&&c.getBBox().width,l=this.horiz,v=this.left,f=this.top,e=this.width,b=this.height,x=g.title,g=this.opposite,p=this.offset,n=this.tickSize()||[0],C=x.x||0,D=x.y||0,z=m(x.margin,l?5:10),c=this.chart.renderer.fontMetrics(x.style&&x.style.fontSize,c).f,n=(l?f+b:v)+n[0]/2*(g?-1:1)*(l?1:-1)+(this.side===
h.bottom?c:0);a.titlePosition.x=l?v-d/2-z+C:n+(g?e:0)+p+C;a.titlePosition.y=l?n-(g?b:0)+(g?c:-c)/2+p+D:f-z+D}});a(f.prototype,"unsquish",function(a){var g=this.options;return!0===(g&&q(g.grid)?g.grid:{}).enabled&&this.categories?this.tickInterval:a.apply(this,Array.prototype.slice.call(arguments,1))});k(f,"afterSetOptions",function(a){var g=this.options;a=a.userOptions;var c,d=g&&q(g.grid)?g.grid:{};!0===d.enabled&&(c=p(!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(d,g){var a=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(a){var l,f,v,e,h=c.units;for(e=0;e<h.length;e++)if(h[e][0]===a.unitName){l=e;break}if(h[l][1])return h[l+1]&&(v=h[l+1][0],f=(h[l+1][1]||[1])[0]),a=b.timeUnits[v],this.tickInterval=a*f,this.getTimeTicks({unitRange:a,count:f,unitName:v},d,g,this.options.startOfWeek)}})),p(!0,this.options,c),this.horiz&&(g.minPadding=m(a.minPadding,
0),g.maxPadding=m(a.maxPadding,0)),n(g.grid.borderWidth)&&(g.tickWidth=g.lineWidth=d.borderWidth))});k(f,"afterSetAxisTranslation",function(){var a=this.options,g=a&&q(a.grid)?a.grid:{},c=this.tickPositions&&this.tickPositions.info,d=this.userOptions.labels||{};this.horiz&&(!0===g.enabled&&this.series.forEach(function(c){c.options.pointRange=0}),c&&(!1===a.dateTimeLabelFormats[c.unitName].range||1<c.count)&&!t(d.align)&&(a.labels.align="left",t(d.x)||(a.labels.x=3)))});k(f,"trimTicks",function(){var a=
this.options,g=a&&q(a.grid)?a.grid:{},c=this.categories,d=this.tickPositions,l=d[0],f=d[d.length-1],e=this.linkedParent&&this.linkedParent.min||this.min,h=this.linkedParent&&this.linkedParent.max||this.max,b=this.tickInterval;!0!==g.enabled||c||!this.horiz&&!this.isLinked||((l>e||l<e&&l+b>e)&&!a.startOnTick&&(d[0]=e),(f<h||f>h&&f-b<h)&&!a.endOnTick&&(d[d.length-1]=h))});k(f,"afterRender",function(){var a=this.options,g=a&&q(a.grid)?a.grid:{},c,d,l,f,e,b,m=this.chart.renderer,A=this.horiz;if(!0===
g.enabled&&(g=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),g=this.maxLabelDimensions.width+g,c=a.lineWidth,this.rightWall&&this.rightWall.destroy(),d=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(A&&(g=d.height-1),c))){d=this.getLinePath(c);e=d.indexOf("M")+1;b=d.indexOf("L")+1;l=d.indexOf("M")+2;f=d.indexOf("L")+2;if(this.side===h.top||this.side===h.left)g=-g;A?(d[l]+=g,d[f]+=g):(d[e]+=g,d[b]+=g);
this.axisLineExtra?this.axisLineExtra.animate({d:d}):this.axisLineExtra=m.path(d).attr({stroke:a.lineColor,"stroke-width":c,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});k(f,"init",function(e){function g(){var d=c.options,a=25/11,g=c.chart.renderer.fontMetrics(d.labels.style.fontSize);d.labels||(d.labels={});d.labels.align=m(d.labels.align,"center");c.categories||(d.showLastLabel=!1);c.horiz&&(d.tickLength=l.cellHeight||g.h*a);c.labelRotation=
0;d.labels.rotation=0}var c=this,d=c.chart,l=(e=e.userOptions)&&q(e.grid)?e.grid:{},h,w,y;if(l.enabled)if(t(l.borderColor)&&(e.tickColor=e.lineColor=l.borderColor),r(l.columns)){w=0;for(y=l.columns.length;y--;)h=p(e,l.columns[y],{type:"category"}),delete h.grid.columns,h=new f(c.chart,h),h.isColumn=!0,h.columnIndex=w,a(h,"labelFormatter",function(c){var d=this.axis,a=d.tickPositions,g=this.value,l=g===a[0],a=g===a[a.length-1],e=b.find(d.series[0].options.data,function(c){return c[d.isXAxis?"x":"y"]===
g});this.isFirst=l;this.isLast=a;this.point=e;return c.call(this)}),w++;k(this,"afterInit",function(){b.erase(d.axes,this);b.erase(d[c.coll],this)})}else k(this,"afterInit",g)})})(B);(function(b){var k=b.Chart,u=b.pick;b.addEvent(b.Axis,"afterSetOptions",function(){this.horiz||!b.isNumber(this.options.staticScale)||this.chart.options.chart.height||(this.staticScale=this.options.staticScale)});k.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(k){var r=
k.chart,n=!!r.initiatedScale&&r.options.animation,q=k.options.staticScale,p;k.staticScale&&b.defined(k.min)&&(p=u(k.unitLength,k.max+k.tickInterval-k.min)*q,p=Math.max(p,q),q=p-r.plotHeight,1<=Math.abs(q)&&(r.plotHeight=p,r.redrawTrigger="adjustHeight",r.setSize(void 0,r.chartHeight+q,n)),k.series.forEach(function(b){(b=b.sharedClipKey&&r[b.sharedClipKey])&&b.attr({height:r.plotHeight})}))}),this.initiatedScale=!0);this.redrawTrigger=null};b.addEvent(k,"render",k.prototype.adjustHeight)})(B);var H=
function(b){var k=b.extend,u=b.isNumber,t=b.pick,r=function(b,p){var m=b.reduce(function(a,f){var e=t(f.parent,"");void 0===a[e]&&(a[e]=[]);a[e].push(f);return a},{});Object.keys(m).forEach(function(a,f){var e=m[a];""!==a&&-1===p.indexOf(a)&&(e.forEach(function(a){f[""].push(a)}),delete f[a])});return m},n=function(b,p,m,a,f,e){var h=0,x=0,g=e&&e.after,c=e&&e.before;p={data:a,depth:m-1,id:b,level:m,parent:p};var d,l;"function"===typeof c&&c(p,e);c=(f[b]||[]).map(function(c){var a=n(c.id,b,m+1,c,f,
e),g=c.start;c=!0===c.milestone?g:c.end;d=!u(d)||g<d?g:d;l=!u(l)||c>l?c:l;h=h+1+a.descendants;x=Math.max(a.height+1,x);return a});a&&(a.start=t(a.start,d),a.end=t(a.end,l));k(p,{children:c,descendants:h,height:x});"function"===typeof g&&g(p,e);return p};return{getListOfParents:r,getNode:n,getTree:function(b,p){var m=b.map(function(a){return a.id});b=r(b,m);return n("",null,1,null,b,p)}}}(B),I=function(b){var k=b.extend,u=b.isArray,t=b.isObject,r=b.isNumber,n=b.merge,q=b.pick;return{getColor:function(p,
m){var a=m.index,f=m.mapOptionsToLevel,e=m.parentColor,h=m.parentColorIndex,x=m.series,g=m.colors,c=m.siblings,d=x.points,l=x.chart.options.chart,v,w,y,k;if(p){d=d[p.i];p=f[p.level]||{};if(f=d&&p.colorByPoint)w=d.index%(g?g.length:l.colorCount),v=g&&g[w];if(!x.chart.styledMode){g=d&&d.options.color;l=p&&p.color;if(y=e)y=(y=p&&p.colorVariation)&&"brightness"===y.key?b.color(e).brighten(a/c*y.to).get():e;y=q(g,l,v,y,x.color)}k=q(d&&d.options.colorIndex,p&&p.colorIndex,w,h,m.colorIndex)}return{color:y,
colorIndex:k}},getLevelOptions:function(b){var m=null,a,f,e,h;if(t(b))for(m={},e=r(b.from)?b.from:1,h=b.levels,f={},a=t(b.defaults)?b.defaults:{},u(h)&&(f=h.reduce(function(b,g){var c,d;t(g)&&r(g.level)&&(d=n({},g),c="boolean"===typeof d.levelIsConstant?d.levelIsConstant:a.levelIsConstant,delete d.levelIsConstant,delete d.level,g=g.level+(c?0:e-1),t(b[g])?k(b[g],d):b[g]=d);return b},{})),h=r(b.to)?b.to:1,b=0;b<=h;b++)m[b]=n({},a,t(f[b])?f[b]:{});return m},setTreeValues:function m(a,b){var e=b.before,
f=b.idRoot,x=b.mapIdToNode[f],g=b.points[a.i],c=g&&g.options||{},d=0,l=[];k(a,{levelDynamic:a.level-(("boolean"===typeof b.levelIsConstant?b.levelIsConstant:1)?0:x.level),name:q(g&&g.name,""),visible:f===a.id||("boolean"===typeof b.visible?b.visible:!1)});"function"===typeof e&&(a=e(a,b));a.children.forEach(function(c,g){var e=k({},b);k(e,{index:g,siblings:a.children.length,visible:a.visible});c=m(c,e);l.push(c);c.visible&&(d+=c.val)});a.visible=0<d||a.visible;e=q(c.value,d);k(a,{children:l,childrenTotal:d,
isLeaf:a.visible&&!d,val:e});return a},updateRootId:function(b){var a;t(b)&&(a=t(b.options)?b.options:{},a=q(b.rootNode,a.rootId,""),t(b.userOptions)&&(b.userOptions.rootId=a),b.rootNode=a);return a}}}(B);(function(b){var k=b.addEvent,u=b.pick,t=b.extend,r=b.isArray,n=b.fireEvent,q=b.Axis,p=b.Series;t(q.prototype,{isInBreak:function(b,a){var f=b.repeat||Infinity,e=b.from,h=b.to-b.from;a=a>=e?(a-e)%f:f-(e-a)%f;return b.inclusive?a<=h:a<h&&0!==a},isInAnyBreak:function(b,a){var f=this.options.breaks,
e=f&&f.length,h,m,g;if(e){for(;e--;)this.isInBreak(f[e],b)&&(h=!0,m||(m=u(f[e].showPoints,!this.isXAxis)));g=h&&a?h&&!m:h}return g}});k(q,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});k(q,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,a=this.tickPositions.info,f=[],e;for(e=0;e<b.length;e++)this.isInAnyBreak(b[e])||f.push(b[e]);this.tickPositions=f;this.tickPositions.info=a}});k(q,"afterSetOptions",function(){this.isBroken&&
(this.options.ordinal=!1)});q.prototype.setBreaks=function(b,a){function f(a){var c=a,d,g;for(g=0;g<h.breakArray.length;g++)if(d=h.breakArray[g],d.to<=a)c-=d.len;else if(d.from>=a)break;else if(h.isInBreak(d,a)){c-=a-d.from;break}return c}function e(a){var c,d;for(d=0;d<h.breakArray.length&&!(c=h.breakArray[d],c.from>=a);d++)c.to<a?a+=c.len:h.isInBreak(c,a)&&(a+=c.len);return a}var h=this,m=r(b)&&!!b.length;h.isDirty=h.isBroken!==m;h.isBroken=m;h.options.breaks=h.userOptions.breaks=b;h.forceRedraw=
!0;m||h.val2lin!==f||(delete h.val2lin,delete h.lin2val);m&&(h.userOptions.ordinal=!1,h.val2lin=f,h.lin2val=e,h.setExtremes=function(a,c,d,b,e){if(this.isBroken){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange}q.prototype.setExtremes.call(this,a,c,d,b,e)},h.setAxisTranslation=function(a){q.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=h.options.breaks;var c=[],d=[],g=0,b,e,f=h.userMin||h.min,m=h.userMax||
h.max,A=u(h.pointRangePadding,0),k,p;a.forEach(function(c){e=c.repeat||Infinity;h.isInBreak(c,f)&&(f+=c.to%e-f%e);h.isInBreak(c,m)&&(m-=m%e-c.from%e)});a.forEach(function(a){k=a.from;for(e=a.repeat||Infinity;k-e>f;)k-=e;for(;k<f;)k+=e;for(p=k;p<m;p+=e)c.push({value:p,move:"in"}),c.push({value:p+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(c,a){return c.value===a.value?("in"===c.move?0:1)-("in"===a.move?0:1):c.value-a.value});b=0;k=f;c.forEach(function(c){b+="in"===c.move?1:-1;1===
b&&"in"===c.move&&(k=c.value);0===b&&(d.push({from:k,to:c.value,len:c.value-k-(c.size||0)}),g+=c.value-k-(c.size||0))});h.breakArray=d;h.unitLength=m-f-g+A;n(h,"afterBreaks");h.staticScale?h.transA=h.staticScale:h.unitLength&&(h.transA*=(m-h.min+A)/h.unitLength);A&&(h.minPixelPadding=h.transA*h.minPointOffset);h.min=f;h.max=m}});u(a,!0)&&this.chart.redraw()};k(p,"afterGeneratePoints",function(){var b=this.xAxis,a=this.yAxis,f=this.points,e,h=f.length,k=this.options.connectNulls,g;if(b&&a&&(b.options.breaks||
a.options.breaks))for(;h--;)e=f[h],g=null===e.y&&!1===k,g||!b.isInAnyBreak(e.x,!0)&&!a.isInAnyBreak(e.y,!0)||(f.splice(h,1),this.data[h]&&this.data[h].destroyElements())});k(p,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,u(this.pointArrayMap,["y"]))});b.Series.prototype.drawBreaks=function(b,a){var f=this,e=f.points,h,k,g,c;b&&a.forEach(function(a){h=b.breakArray||[];k=b.isXAxis?b.min:u(f.options.threshold,b.min);e.forEach(function(d){c=u(d["stack"+a.toUpperCase()],
d[a]);h.forEach(function(a){g=!1;if(k<a.from&&c>a.to||k>a.from&&c<a.from)g="pointBreak";else if(k<a.from&&c>a.from&&c<a.to||k>a.from&&c>a.to&&c<a.from)g="pointInBreak";g&&n(b,g,{point:d,brk:a})})})})};b.Series.prototype.gappedPath=function(){var k=this.currentDataGrouping,a=k&&k.gapSize,k=this.options.gapSize,f=this.points.slice(),e=f.length-1,h=this.yAxis;if(k&&0<e)for("value"!==this.options.gapUnit&&(k*=this.closestPointRange),a&&a>k&&(k=a);e--;)f[e+1].x-f[e].x>k&&(a=(f[e].x+f[e+1].x)/2,f.splice(e+
1,0,{isNull:!0,x:a}),this.options.stacking&&(a=h.stacks[this.stackKey][a]=new b.StackItem(h,h.options.stackLabels,!1,a,this.stack),a.total=0));return this.getGraphPath(f)}})(B);(function(b,k,u){var t=b.addEvent,r=function(a){return Array.prototype.slice.call(a,1)},n=b.defined,q=b.extend,p=b.find,m=b.fireEvent,a=u.getLevelOptions,f=b.merge,e=b.isNumber,h=function(a){return b.isObject(a,!0)},x=b.isString,g=b.pick,c=b.wrap;u=b.Axis;var d=b.Tick,l=function(a,d){var g,b;for(g in d)d.hasOwnProperty(g)&&
(b=d[g],c(a,g,b))},v=function(a,c){var d=a.collapseStart;a=a.collapseEnd;a>=c&&(d-=.5);return{from:d,to:a,showPoints:!1}},w=function(a){return Object.keys(a.mapOfPosToGridNode).reduce(function(c,d){d=+d;a.min<=d&&a.max>=d&&!a.isInAnyBreak(d)&&c.push(d);return c},[])},y=function(a,c){var d=a.options.breaks||[],g=v(c,a.max);return d.some(function(a){return a.from===g.from&&a.to===g.to})},E=function(a,c){var d=a.options.breaks||[];a=v(c,a.max);d.push(a);return d},A=function(a,c){var d=a.options.breaks||
[],g=v(c,a.max);return d.reduce(function(a,c){c.to===g.to&&c.from===g.from||a.push(c);return a},[])},G=function(a,c){var d=a.labelIcon,e=!d,f=c.renderer,l=c.xy,h=c.options,v=h.width,z=h.height,k=l.x-v/2-h.padding,l=l.y-z/2,w=c.collapsed?90:180,y=c.show&&b.isNumber(l);e&&(a.labelIcon=d=f.path(f.symbols[h.type](h.x,h.y,v,z)).addClass("highcharts-label-icon").add(c.group));y||d.attr({y:-9999});f.styledMode||d.attr({"stroke-width":1,fill:g(c.color,"#666666")}).css({cursor:"pointer",stroke:h.lineColor,
strokeWidth:h.lineWidth});d[e?"attr":"animate"]({translateX:k,translateY:l,rotation:w})},F=function(c){c.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(c){var d=c.options&&c.options.labels,g;c.updateYNames();c.series.forEach(function(a){a.yData=a.options.data.map(function(a){return a.y})});c.mapOptionsToLevel=a({defaults:d,from:1,levels:d.levels,to:c.tree.height});g=b.addEvent(c,"foundExtremes",function(){c.collapsedNodes.forEach(function(a){a=E(c,a);c.setBreaks(a,
!1)});g()})})},C=function(a,c,d){var g=[],b=[],e={},l={},f=-1,v="boolean"===typeof c?c:!1;a=k.getTree(a,{after:function(a){a=l[a.pos];var c=0,d=0;a.children.forEach(function(a){d+=a.descendants+1;c=Math.max(a.height+1,c)});a.descendants=d;a.height=c;a.collapsed&&b.push(a)},before:function(a){var c=h(a.data)?a.data:{},d=x(c.name)?c.name:"",b=e[a.parent],b=h(b)?l[b.pos]:null,k=function(a){return a.name===d},w;v&&h(b)&&(w=p(b.children,k))?(k=w.pos,w.nodes.push(a)):k=f++;l[k]||(l[k]=w={depth:b?b.depth+
1:0,name:d,nodes:[a],children:[],pos:k},-1!==k&&g.push(d),h(b)&&b.children.push(w));x(a.id)&&(e[a.id]=a);!0===c.collapsed&&(w.collapsed=!0);a.pos=k}});l=function(a,c){var d=function(a,g,b){var e=g+(-1===g?0:c-1),l=(e-g)/2,f=g+l;a.nodes.forEach(function(a){var c=a.data;h(c)&&(c.y=g+c.seriesIndex,delete c.seriesIndex);a.pos=f});b[f]=a;a.pos=f;a.tickmarkOffset=l+.5;a.collapseStart=e+.5;a.children.forEach(function(a){d(a,e+1,b);e=a.collapseEnd-.5});a.collapseEnd=e+.5;return b};return d(a["-1"],-1,{})}(l,
d);return{categories:g,mapOfIdToNode:e,mapOfPosToGridNode:l,collapsedNodes:b,tree:a}};l(u.prototype,{init:function(a,c,d){var g="treegrid"===d.type;g&&(t(c,"beforeRender",F),t(c,"beforeRedraw",F),d=f({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},d,{reversed:!0,grid:{columns:void 0}}));a.apply(this,[c,d]);g&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(a){var c=
this.options,d=c&&c.labels,c=d&&e(d.indentation)?c.labels.indentation:0,d=a.apply(this,r(arguments)),g;"treegrid"===this.options.type&&this.mapOfPosToGridNode&&(g=this.mapOfPosToGridNode[-1].height,d.width+=c*(g-1));return d},generateTick:function(a,c){var g=h(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},b=this.ticks,e=b[c],l,f;"treegrid"===this.options.type?(f=this.mapOfPosToGridNode[c],(g=g[f.depth])&&(l={labels:g}),e?(e.parameters.category=f.name,e.options=l,e.addLabel()):b[c]=new d(this,
c,null,void 0,{category:f.name,tickmarkOffset:f.tickmarkOffset,options:l})):a.apply(this,r(arguments))},setTickInterval:function(a){var c=this.options;"treegrid"===c.type?(this.min=g(this.userMin,c.min,this.dataMin),this.max=g(this.userMax,c.max,this.dataMax),m(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?w(this):[]):a.apply(this,r(arguments))}});l(d.prototype,{getLabelPosition:function(a,c,d,b,l,f,v,k,w){var y=
g(this.options&&this.options.labels,f);f=this.pos;var A=this.axis,J="treegrid"===A.options.type;a=a.apply(this,[c,d,b,l,y,v,k,w]);J&&(c=y&&h(y.symbol)?y.symbol:{},y=y&&e(y.indentation)?y.indentation:0,f=(f=(A=A.mapOfPosToGridNode)&&A[f])&&f.depth||1,a.x+=c.width+2*c.padding+(f-1)*y);return a},renderLabel:function(a){var c=this,d=c.pos,e=c.axis,f=c.label,l=e.mapOfPosToGridNode,v=e.options,k=g(c.options&&c.options.labels,v&&v.labels),w=k&&h(k.symbol)?k.symbol:{},A=(l=l&&l[d])&&l.depth,v="treegrid"===
v.type,p=!(!f||!f.element),m=-1<e.tickPositions.indexOf(d),d=e.chart.styledMode;v&&l&&p&&f.addClass("highcharts-treegrid-node-level-"+A);a.apply(c,r(arguments));v&&l&&p&&0<l.descendants&&(e=y(e,l),G(c,{color:!d&&f.styles.color,collapsed:e,group:f.parentGroup,options:w,renderer:f.renderer,show:m,xy:f.xy}),w="highcharts-treegrid-node-"+(e?"expanded":"collapsed"),f.addClass("highcharts-treegrid-node-"+(e?"collapsed":"expanded")).removeClass(w),d||f.css({cursor:"pointer"}),[f,c.labelIcon].forEach(function(a){a.attachedTreeGridEvents||
(b.addEvent(a.element,"mouseover",function(){var a=f;a.addClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:"underline"})}),b.addEvent(a.element,"mouseout",function(){var a=f,c=k,c=n(c.style)?c.style:{};a.removeClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:c.textDecoration})}),b.addEvent(a.element,"click",function(){c.toggleCollapse()}),a.attachedTreeGridEvents=!0)}))}});q(d.prototype,{collapse:function(a){var c=this.axis,
d=E(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,g(a,!0))},expand:function(a){var c=this.axis,d=A(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,g(a,!0))},toggleCollapse:function(a){var c=this.axis,d;d=c.mapOfPosToGridNode[this.pos];d=y(c,d)?A(c,d):E(c,d);c.setBreaks(d,g(a,!0))}});u.prototype.updateYNames=function(){var a=this.options,c=a.uniqueNames,d=!this.isXAxis,g=this.series,b=0;"treegrid"===a.type&&d&&(a=g.reduce(function(a,d){d.visible&&(d.options.data.forEach(function(c){h(c)&&(c.seriesIndex=
b,a.push(c))}),!0===c&&b++);return a},[]),a=C(a,c,!0===c?b:1),this.categories=a.categories,this.mapOfPosToGridNode=a.mapOfPosToGridNode,this.collapsedNodes=a.collapsedNodes,this.hasNames=!0,this.tree=a.tree)};u.prototype.utils={getNode:k.getNode}})(B,H,I);H=function(b){function k(a,b,e){e=e||0;var f=a.length-1;b-=1e-7;for(var k,g;e<=f;)if(k=f+e>>1,g=b-a[k].xMin,0<g)e=k+1;else if(0>g)f=k-1;else return k;return 0<e?e-1:0}function u(a,b){for(var e=k(a,b.x+1)+1;e--;){var f;if(f=a[e].xMax>=b.x)f=a[e],
f=b.x<=f.xMax&&b.x>=f.xMin&&b.y<=f.yMax&&b.y>=f.yMin;if(f)return e}return-1}function t(a){var b=[];if(a.length){b.push("M",a[0].start.x,a[0].start.y);for(var e=0;e<a.length;++e)b.push("L",a[e].end.x,a[e].end.y)}return b}function r(a,b){a.yMin=q(a.yMin,b.yMin);a.yMax=n(a.yMax,b.yMax);a.xMin=q(a.xMin,b.xMin);a.xMax=n(a.xMax,b.xMax)}var n=Math.min,q=Math.max,p=Math.abs,m=b.pick;return{straight:function(a,b){return{path:["M",a.x,a.y,"L",b.x,b.y],obstacles:[{start:a,end:b}]}},simpleConnect:b.extend(function(a,
b,e){function f(a,c,d,b,g){a={x:a.x,y:a.y};a[c]=d[b||c]+(g||0);return a}function k(a,c,d){var b=p(c[d]-a[d+"Min"])>p(c[d]-a[d+"Max"]);return f(c,d,a,d+(b?"Max":"Min"),b?1:-1)}var g=[],c,d=m(e.startDirectionX,p(b.x-a.x)>p(b.y-a.y))?"x":"y",l=e.chartObstacles,v=u(l,a);e=u(l,b);var w;-1<e?(c=l[e],e=k(c,b,d),c={start:e,end:b},w=e):w=b;-1<v&&(l=l[v],e=k(l,a,d),g.push({start:a,end:e}),e[d]>a[d]===e[d]>w[d]&&(d="y"===d?"x":"y",b=a[d]<b[d],g.push({start:e,end:f(e,d,l,d+(b?"Max":"Min"),b?1:-1)}),d="y"===d?
"x":"y"));a=g.length?g[g.length-1].end:a;e=f(a,d,w);g.push({start:a,end:e});d=f(e,"y"===d?"x":"y",w);g.push({start:e,end:d});g.push(c);return{path:t(g),obstacles:g}},{requiresObstacles:!0}),fastAvoid:b.extend(function(a,b,e){function f(a,c,d){var b,g,e,l,f,h=a.x<c.x?1:-1;a.x<c.x?(b=a,g=c):(b=c,g=a);a.y<c.y?(l=a,e=c):(l=c,e=a);for(f=0>h?n(k(z,g.x),z.length-1):0;z[f]&&(0<h&&z[f].xMin<=g.x||0>h&&z[f].xMax>=b.x);){if(z[f].xMin<=g.x&&z[f].xMax>=b.x&&z[f].yMin<=e.y&&z[f].yMax>=l.y)return d?{y:a.y,x:a.x<
c.x?z[f].xMin-1:z[f].xMax+1,obstacle:z[f]}:{x:a.x,y:a.y<c.y?z[f].yMin-1:z[f].yMax+1,obstacle:z[f]};f+=h}return c}function x(a,c,d,b,g){var e=g.soft,l=g.hard,h=b?"x":"y",k={x:c.x,y:c.y},v={x:c.x,y:c.y};g=a[h+"Max"]>=e[h+"Max"];var e=a[h+"Min"]<=e[h+"Min"],w=a[h+"Max"]>=l[h+"Max"],l=a[h+"Min"]<=l[h+"Min"],y=p(a[h+"Min"]-c[h]),A=p(a[h+"Max"]-c[h]);d=10>p(y-A)?c[h]<d[h]:A<y;v[h]=a[h+"Min"];k[h]=a[h+"Max"];a=f(c,v,b)[h]!==v[h];c=f(c,k,b)[h]!==k[h];d=a?c?d:!0:c?!1:d;d=e?g?d:!0:g?!1:d;return l?w?d:!0:w?
!1:d}function g(a,c,d){if(a.x===c.x&&a.y===c.y)return[];var b=d?"x":"y",l,h,k,v,w=e.obstacleOptions.margin;l={soft:{xMin:G,xMax:F,yMin:C,yMax:D},hard:e.hardBounds};h=u(z,a);-1<h?(h=z[h],l=x(h,a,c,d,l),r(h,e.hardBounds),v=d?{y:a.y,x:h[l?"xMax":"xMin"]+(l?1:-1)}:{x:a.x,y:h[l?"yMax":"yMin"]+(l?1:-1)},k=u(z,v),-1<k&&(k=z[k],r(k,e.hardBounds),v[b]=l?q(h[b+"Max"]-w+1,(k[b+"Min"]+h[b+"Max"])/2):n(h[b+"Min"]+w-1,(k[b+"Max"]+h[b+"Min"])/2),a.x===v.x&&a.y===v.y?(E&&(v[b]=l?q(h[b+"Max"],k[b+"Max"])+1:n(h[b+
"Min"],k[b+"Min"])-1),E=!E):E=!1),a=[{start:a,end:v}]):(b=f(a,{x:d?c.x:a.x,y:d?a.y:c.y},d),a=[{start:a,end:{x:b.x,y:b.y}}],b[d?"x":"y"]!==c[d?"x":"y"]&&(l=x(b.obstacle,b,c,!d,l),r(b.obstacle,e.hardBounds),l={x:d?b.x:b.obstacle[l?"xMax":"xMin"]+(l?1:-1),y:d?b.obstacle[l?"yMax":"yMin"]+(l?1:-1):b.y},d=!d,a=a.concat(g({x:b.x,y:b.y},l,d))));return a=a.concat(g(a[a.length-1].end,c,!d))}function c(a,c,d){var b=n(a.xMax-c.x,c.x-a.xMin)<n(a.yMax-c.y,c.y-a.yMin);d=x(a,c,d,b,{soft:e.hardBounds,hard:e.hardBounds});
return b?{y:c.y,x:a[d?"xMax":"xMin"]+(d?1:-1)}:{x:c.x,y:a[d?"yMax":"yMin"]+(d?1:-1)}}var d=m(e.startDirectionX,p(b.x-a.x)>p(b.y-a.y)),l=d?"x":"y",v,w,y=[],E=!1,A=e.obstacleMetrics,G=n(a.x,b.x)-A.maxWidth-10,F=q(a.x,b.x)+A.maxWidth+10,C=n(a.y,b.y)-A.maxHeight-10,D=q(a.y,b.y)+A.maxHeight+10,z=e.chartObstacles;v=k(z,G);A=k(z,F);z=z.slice(v,A+1);-1<(A=u(z,b))&&(w=c(z[A],b,a),y.push({end:b,start:w}),b=w);for(;-1<(A=u(z,b));)v=0>b[l]-a[l],w={x:b.x,y:b.y},w[l]=z[A][v?l+"Max":l+"Min"]+(v?1:-1),y.push({end:b,
start:w}),b=w;a=g(a,b,d);a=a.concat(y.reverse());return{path:t(a),obstacles:a}},{requiresObstacles:!0})}}(B);(function(b){b.SVGRenderer.prototype.symbols.arrow=function(b,u,t,r){return["M",b,u+r/2,"L",b+t,u,"L",b,u+r/2,"L",b+t,u+r]};b.SVGRenderer.prototype.symbols["arrow-half"]=function(k,u,t,r){return b.SVGRenderer.prototype.symbols.arrow(k,u,t/2,r)};b.SVGRenderer.prototype.symbols["triangle-left"]=function(b,u,t,r){return["M",b+t,u,"L",b,u+r/2,"L",b+t,u+r,"Z"]};b.SVGRenderer.prototype.symbols["arrow-filled"]=
b.SVGRenderer.prototype.symbols["triangle-left"];b.SVGRenderer.prototype.symbols["triangle-left-half"]=function(k,u,t,r){return b.SVGRenderer.prototype.symbols["triangle-left"](k,u,t/2,r)};b.SVGRenderer.prototype.symbols["arrow-filled-half"]=b.SVGRenderer.prototype.symbols["triangle-left-half"]})(B);(function(b,k){function u(a){var c=a.shapeArgs;return c?{xMin:c.x,xMax:c.x+c.width,yMin:c.y,yMax:c.y+c.height}:(c=a.graphic&&a.graphic.getBBox())?{xMin:a.plotX-c.width/2,xMax:a.plotX+c.width/2,yMin:a.plotY-
c.height/2,yMax:a.plotY+c.height/2}:null}function t(a){for(var c=a.length,b=0,e,f,k=[],p=function(a,c,d){d=h(d,10);var b=a.yMax+d>c.yMin-d&&a.yMin-d<c.yMax+d,e=a.xMax+d>c.xMin-d&&a.xMin-d<c.xMax+d,l=b?a.xMin>c.xMax?a.xMin-c.xMax:c.xMin-a.xMax:Infinity,f=e?a.yMin>c.yMax?a.yMin-c.yMax:c.yMin-a.yMax:Infinity;return e&&b?d?p(a,c,Math.floor(d/2)):Infinity:g(l,f)};b<c;++b)for(e=b+1;e<c;++e)f=p(a[b],a[e]),80>f&&k.push(f);k.push(80);return x(Math.floor(k.sort(function(a,c){return a-c})[Math.floor(k.length/
10)]/2-1),1)}function r(a,d,b){this.init(a,d,b)}function n(a){this.init(a)}function q(a){if(a.options.pathfinder||a.series.reduce(function(a,c){c.options&&e(!0,c.options.connectors=c.options.connectors||{},c.options.pathfinder);return a||c.options&&c.options.pathfinder},!1))e(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder),b.error('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}var p=b.defined,m=b.deg2rad,a=b.extend,f=
b.addEvent,e=b.merge,h=b.pick,x=Math.max,g=Math.min;a(b.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});r.prototype={init:function(a,d,b){this.fromPoint=a;this.toPoint=d;this.options=b;this.chart=a.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(a,d,b){var c=this.chart,g=c.styledMode,e=c.pathfinder,l=!c.options.chart.forExport&&
!1!==b,f=this.graphics&&this.graphics.path;e.group||(e.group=c.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(c.seriesGroup));e.group.translate(c.plotLeft,c.plotTop);f&&f.renderer||(f=c.renderer.path().add(e.group),g||f.attr({opacity:0}));f.attr(d);a={d:a};g||(a.opacity=1);f[l?"animate":"attr"](a,b);this.graphics=this.graphics||{};this.graphics.path=f},addMarker:function(a,d,b){var c=this.fromPoint.series.chart,g=c.pathfinder,c=c.renderer,e="start"===a?this.fromPoint:this.toPoint,
f=e.getPathfinderAnchorPoint(d),l,h;d.enabled&&(b="start"===a?{x:b[4],y:b[5]}:{x:b[b.length-5],y:b[b.length-4]},b=e.getRadiansToVector(b,f),f=e.getMarkerVector(b,d.radius,f),b=-b/m,d.width&&d.height?(l=d.width,h=d.height):l=h=2*d.radius,this.graphics=this.graphics||{},f={x:f.x-l/2,y:f.y-h/2,width:l,height:h,rotation:b,rotationOriginX:f.x,rotationOriginY:f.y},this.graphics[a]?this.graphics[a].animate(f):(this.graphics[a]=c.symbol(d.symbol).addClass("highcharts-point-connecting-path-"+a+"-marker").attr(f).add(g.group),
c.styledMode||this.graphics[a].attr({fill:d.color||this.fromPoint.color,stroke:d.lineColor,"stroke-width":d.lineWidth,opacity:0}).animate({opacity:1},e.series.options.animation)))},getPath:function(a){var c=this.pathfinder,g=this.chart,f=c.algorithms[a.type],h=c.chartObstacles;if("function"!==typeof f)b.error('"'+a.type+'" is not a Pathfinder algorithm.');else return f.requiresObstacles&&!h&&(h=c.chartObstacles=c.getChartObstacles(a),g.options.connectors.algorithmMargin=a.algorithmMargin,c.chartObstacleMetrics=
c.getObstacleMetrics(h)),f(this.fromPoint.getPathfinderAnchorPoint(a.startMarker),this.toPoint.getPathfinderAnchorPoint(a.endMarker),e({chartObstacles:h,lineObstacles:c.lineObstacles||[],obstacleMetrics:c.chartObstacleMetrics,hardBounds:{xMin:0,xMax:g.plotWidth,yMin:0,yMax:g.plotHeight},obstacleOptions:{margin:a.algorithmMargin},startDirectionX:c.getAlgorithmStartDirection(a.startMarker)},a))},render:function(){var a=this.fromPoint,b=a.series,f=b.chart,h=f.pathfinder,k=e(f.options.connectors,b.options.connectors,
a.options.connectors,this.options),m={};f.styledMode||(m.stroke=k.lineColor||a.color,m["stroke-width"]=k.lineWidth,k.dashStyle&&(m.dashstyle=k.dashStyle));m.class="highcharts-point-connecting-path highcharts-color-"+a.colorIndex;k=e(m,k);p(k.marker.radius)||(k.marker.radius=g(x(Math.ceil((k.algorithmMargin||8)/2)-1,1),5));a=this.getPath(k);f=a.path;a.obstacles&&(h.lineObstacles=h.lineObstacles||[],h.lineObstacles=h.lineObstacles.concat(a.obstacles));this.renderPath(f,m,b.options.animation);this.addMarker("start",
e(k.marker,k.startMarker),f);this.addMarker("end",e(k.marker,k.endMarker),f)},destroy:function(){this.graphics&&(b.objectEach(this.graphics,function(a){a.destroy()}),delete this.graphics)}};n.prototype={algorithms:k,init:function(a){this.chart=a;this.connections=[];f(a,"redraw",function(){this.pathfinder.update()})},update:function(a){var c=this.chart,g=this,e=g.connections;g.connections=[];c.series.forEach(function(a){a.visible&&a.points.forEach(function(a){var d,e=a.options&&a.options.connect&&
b.splat(a.options.connect);a.visible&&!1!==a.isInside&&e&&e.forEach(function(e){d=c.get("string"===typeof e?e:e.to);d instanceof b.Point&&d.series.visible&&d.visible&&!1!==d.isInside&&g.connections.push(new r(a,d,"string"===typeof e?{}:e))})})});for(var f=0,h,k,p=e.length,m=g.connections.length;f<p;++f){k=!1;for(h=0;h<m;++h)if(e[f].fromPoint===g.connections[h].fromPoint&&e[f].toPoint===g.connections[h].toPoint){g.connections[h].graphics=e[f].graphics;k=!0;break}k||e[f].destroy()}delete this.chartObstacles;
delete this.lineObstacles;g.renderConnections(a)},renderConnections:function(a){a?this.chart.series.forEach(function(a){var c=function(){var c=a.chart.pathfinder;(c&&c.connections||[]).forEach(function(c){c.fromPoint&&c.fromPoint.series===a&&c.render()});a.pathfinderRemoveRenderEvent&&(a.pathfinderRemoveRenderEvent(),delete a.pathfinderRemoveRenderEvent)};!1===a.options.animation?c():a.pathfinderRemoveRenderEvent=f(a,"afterAnimate",c)}):this.connections.forEach(function(a){a.render()})},getChartObstacles:function(a){for(var c=
[],b=this.chart.series,g=h(a.algorithmMargin,0),e,f=0,k=b.length;f<k;++f)if(b[f].visible)for(var m=0,n=b[f].points.length,q;m<n;++m)q=b[f].points[m],q.visible&&(q=u(q))&&c.push({xMin:q.xMin-g,xMax:q.xMax+g,yMin:q.yMin-g,yMax:q.yMax+g});c=c.sort(function(a,c){return a.xMin-c.xMin});p(a.algorithmMargin)||(e=a.algorithmMargin=t(c),c.forEach(function(a){a.xMin-=e;a.xMax+=e;a.yMin-=e;a.yMax+=e}));return c},getObstacleMetrics:function(a){for(var c=0,b=0,g,e,f=a.length;f--;)g=a[f].xMax-a[f].xMin,e=a[f].yMax-
a[f].yMin,c<g&&(c=g),b<e&&(b=e);return{maxHeight:b,maxWidth:c}},getAlgorithmStartDirection:function(a){var c="top"!==a.verticalAlign&&"bottom"!==a.verticalAlign;return"left"!==a.align&&"right"!==a.align?c?void 0:!1:c?!0:void 0}};b.Connection=r;b.Pathfinder=n;a(b.Point.prototype,{getPathfinderAnchorPoint:function(a){var c=u(this),b,g;switch(a.align){case "right":b="xMax";break;case "left":b="xMin"}switch(a.verticalAlign){case "top":g="yMin";break;case "bottom":g="yMax"}return{x:b?c[b]:(c.xMin+c.xMax)/
2,y:g?c[g]:(c.yMin+c.yMax)/2}},getRadiansToVector:function(a,b){p(b)||(b=u(this),b={x:(b.xMin+b.xMax)/2,y:(b.yMin+b.yMax)/2});return Math.atan2(b.y-a.y,a.x-b.x)},getMarkerVector:function(a,b,g){for(var c=2*Math.PI,d=u(this),e=d.xMax-d.xMin,f=d.yMax-d.yMin,h=Math.atan2(f,e),l=!1,e=e/2,k=f/2,m=d.xMin+e,d=d.yMin+k,p=m,n=d,q={},r=1,t=1;a<-Math.PI;)a+=c;for(;a>Math.PI;)a-=c;c=Math.tan(a);a>-h&&a<=h?(t=-1,l=!0):a>h&&a<=Math.PI-h?t=-1:a>Math.PI-h||a<=-(Math.PI-h)?(r=-1,l=!0):r=-1;l?(p+=r*e,n+=t*e*c):(p+=
f/(2*c)*r,n+=t*k);g.x!==m&&(p=g.x);g.y!==d&&(n=g.y);q.x=p+b*Math.cos(a);q.y=n-b*Math.sin(a);return q}});b.Chart.prototype.callbacks.push(function(a){!1!==a.options.connectors.enabled&&(q(a),this.pathfinder=new n(this),this.pathfinder.update(!0))})})(B,H);(function(b){var k=b.addEvent,u=b.defined,t=b.Color,r=b.seriesTypes.column,n=b.correctFloat,q=b.isNumber,p=b.isObject,m=b.merge,a=b.pick,f=b.seriesType,e=b.Axis,h=b.Point,x=b.Series;f("xrange","column",{colorByPoint:!0,dataLabels:{verticalAlign:"middle",
inside:!0,formatter:function(){var a=this.point.partialFill;p(a)&&(a=a.amount);u(a)||(a=0);return n(100*a)+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:b.seriesTypes.line.prototype.animate,
cropShoulder:1,getExtremesFromAll:!0,autoIncrement:b.noop,getColumnMetrics:function(){function a(){b.series.forEach(function(a){var c=a.xAxis;a.xAxis=a.yAxis;a.yAxis=c})}var c,b=this.chart;a();c=r.prototype.getColumnMetrics.call(this);a();return c},cropData:function(a,c,b,e){c=x.prototype.cropData.call(this,this.x2Data,c,b,e);c.xData=a.slice(c.start,c.end);return c},translatePoint:function(b){var c=this.xAxis,d=this.yAxis,g=this.columnMetrics,e=this.options,f=e.minPointLength||0,h=b.plotX,k=a(b.x2,
b.x+(b.len||0)),n=c.translate(k,0,0,0,1),k=Math.abs(n-h),r=this.chart.inverted,t=a(e.borderWidth,1)%2/2,x=g.offset,B=Math.round(g.width);f&&(f-=k,0>f&&(f=0),h-=f/2,n+=f/2);h=Math.max(h,-10);n=Math.min(Math.max(n,-10),c.len+10);u(b.options.pointWidth)&&(x-=(Math.ceil(b.options.pointWidth)-B)/2,B=Math.ceil(b.options.pointWidth));e.pointPlacement&&q(b.plotY)&&d.categories&&(b.plotY=d.translate(b.y,0,1,0,1,e.pointPlacement));b.shapeArgs={x:Math.floor(Math.min(h,n))+t,y:Math.floor(b.plotY+x)+t,width:Math.round(Math.abs(n-
h)),height:B,r:this.options.borderRadius};e=b.shapeArgs.x;f=e+b.shapeArgs.width;0>e||f>c.len?(e=Math.min(c.len,Math.max(0,e)),f=Math.max(0,Math.min(f,c.len)),n=f-e,b.dlBox=m(b.shapeArgs,{x:e,width:f-e,centerX:n?n/2:null})):b.dlBox=null;r?(b.tooltipPos[1]+=k/2*(c.reversed?1:-1),b.tooltipPos[0]+=g.width/2,b.tooltipPos[1]=Math.max(Math.min(b.tooltipPos[1],c.len-1),0),b.tooltipPos[0]=Math.max(Math.min(b.tooltipPos[0],d.len-1),0)):(b.tooltipPos[0]+=k/2*(c.reversed?-1:1),b.tooltipPos[1]-=g.width/2,b.tooltipPos[0]=
Math.max(Math.min(b.tooltipPos[0],c.len-1),0),b.tooltipPos[1]=Math.max(Math.min(b.tooltipPos[1],d.len-1),0));if(d=b.partialFill)p(d)&&(d=d.amount),q(d)||(d=0),c=b.shapeArgs,b.partShapeArgs={x:c.x,y:c.y,width:c.width,height:c.height,r:this.options.borderRadius},b.clipRectArgs={x:c.x,y:c.y,width:Math.max(Math.round(k*d+(b.plotX-h)),0),height:c.height}},translate:function(){r.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,
c){var b=this.options,e=this.chart.renderer,g=a.graphic,f=a.shapeType,h=a.shapeArgs,k=a.partShapeArgs,n=a.clipRectArgs,q=a.partialFill,r=a.selected&&"select",u=b.stacking&&!b.borderRadius;if(a.isNull)g&&(a.graphic=g.destroy());else{if(g)a.graphicOriginal[c](m(h));else a.graphic=g=e.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=e[f](h).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(g);k&&(a.graphicOverlay?(a.graphicOverlay[c](m(k)),a.clipRect.animate(m(n))):
(a.clipRect=e.clipRect(n.x,n.y,n.width,n.height),a.graphicOverlay=e[f](k).addClass("highcharts-partfill-overlay").add(g).clip(a.clipRect)));this.chart.styledMode||(a.graphicOriginal.attr(this.pointAttribs(a,r)).shadow(b.shadow,null,u),k&&(p(q)||(q={}),p(b.partialFill)&&(q=m(q,b.partialFill)),c=q.fill||t(a.color||this.color).brighten(-.3).get(),a.graphicOverlay.attr(this.pointAttribs(a,r)).attr({fill:c}).shadow(b.shadow,null,u)))}},drawPoints:function(){var a=this,c=a.getAnimationVerb();a.points.forEach(function(b){a.drawPoint(b,
c)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{applyOptions:function(){var a,c=h.prototype.applyOptions.apply(this,arguments),b=c.series;if(b.options.colorByPoint&&!c.options.color){a=b.options.colors||b.chart.options.colors;var e=c.y%(a?a.length:b.chart.options.chart.colorCount);a=a&&a[e];b.chart.styledMode||(c.color=a);c.options.colorIndex||(c.colorIndex=e)}return c},init:function(){h.prototype.init.apply(this,arguments);this.y||
(this.y=0);return this},setState:function(){h.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=h.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});k(e,"afterGetSeriesExtremes",function(){var b=this.series,c,d;this.isXAxis&&(c=a(this.dataMax,
-Number.MAX_VALUE),b.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>c&&(c=a,d=!0)})}),d&&(this.dataMax=c))})})(B);(function(b){var k=b.dateFormat,u=b.isObject,t=b.isNumber,r=b.merge,n=b.pick,q=b.seriesType,p=b.stop,m=b.seriesTypes.xrange;q("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0,formatter:function(){var a=this.point.partialFill;u(a)&&(a=a.amount);if(t(a)&&0<a)return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{series.name}\x3c/span\x3e\x3cbr/\x3e',
pointFormat:null,pointFormatter:function(){var a=this.series,f=a.chart.tooltip,e=a.xAxis,h=e.options.dateTimeLabelFormats,m=e.options.startOfWeek,g=a.tooltipOptions,c=g.xDateFormat,d=this.end?this.end-this.start:0,a=this.options.milestone,e="\x3cb\x3e"+(this.name||this.yCategory)+"\x3c/b\x3e";if(g.pointFormat)return this.tooltipFormatter(g.pointFormat);c||(c=b.splat(f.getDateFormat(d,this.start,m,h))[0]);f=k(c,this.start);h=k(c,this.end);e+="\x3cbr/\x3e";return a?e+("Date "+f+"\x3cbr/\x3e"):e+("Start: "+
f+"\x3cbr/\x3e")+("End: "+h+"\x3cbr/\x3e")}},connectors:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{pointArrayMap:["start","end","y"],keyboardMoveVertical:!1,translatePoint:function(a){var b,e;m.prototype.translatePoint.call(this,a);a.options.milestone&&(b=a.shapeArgs,e=b.height,a.shapeArgs={x:b.x-e/2,y:b.y,width:e,height:e})},drawPoint:function(a,b){var e=this.options,f=this.chart.renderer,
k=a.shapeArgs,g=a.plotY,c=a.graphic,d=a.selected&&"select",l=e.stacking&&!e.borderRadius;a.options.milestone?t(g)&&null!==a.y?(k=f.symbols.diamond(k.x,k.y,k.width,k.height),c?(p(c),c[b]({d:k})):a.graphic=f.path(k).addClass(a.getClassName(),!0).add(a.group||this.group),this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,d)).shadow(e.shadow,null,l)):c&&(a.graphic=c.destroy()):m.prototype.drawPoint.call(this,a,b)},setData:b.Series.prototype.setData,setGanttPointAliases:function(a){function b(b,
f){void 0!==f&&(a[b]=f)}b("x",n(a.start,a.x));b("x2",n(a.end,a.x2));b("partialFill",n(a.completed,a.partialFill));b("connect",n(a.dependency,a.connect))}},r(m.prototype.pointClass.prototype,{applyOptions:function(a,f){a=r(a);b.seriesTypes.gantt.prototype.setGanttPointAliases(a);return a=m.prototype.pointClass.prototype.applyOptions.call(this,a,f)}}))})(B);(function(b){var k=b.merge,u=b.splat,t=b.Chart;b.ganttChart=function(r,n,q){var p="string"===typeof r||r.nodeName,m=n.series,a=b.getOptions(),f,
e=n;n=arguments[p?1:0];b.isArray(n.xAxis)||(n.xAxis=[n.xAxis||{},{}]);n.xAxis=n.xAxis.map(function(b,e){1===e&&(f=0);return k(a.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:f},b,{type:"datetime"})});n.yAxis=u(n.yAxis||{}).map(function(b){return k(a.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:b.categories?b.type:"treegrid"},b)});n.series=null;n=k(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},n,{isGantt:!0});n.series=e.series=m;n.series.forEach(function(a){a.data.forEach(function(a){b.seriesTypes.gantt.prototype.setGanttPointAliases(a)})});
return p?new t(r,n,q):new t(n,n)}})(B)});
//# sourceMappingURL=gantt.js.map
