/*
 Highcharts JS v7.2.1 (2019-10-31)

 Timeline series

 (c) 2010-2019 Highsoft AS
 Author: Daniel Studencki

 License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/timeline",["highcharts"],function(l){b(l);b.Highcharts=l;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function l(b,k,l,r){b.hasOwnProperty(k)||(b[k]=r.apply(null,l))}b=b?b._modules:{};l(b,"modules/timeline.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,k){var l=k.arrayMax,r=k.arrayMin,u=k.defined,
w=k.isNumber,x=k.objectEach,p=k.pick,q=b.addEvent,t=b.merge,y=b.Point,n=b.Series;k=b.seriesType;var v=b.seriesTypes;k("timeline","line",{colorByPoint:!0,stickyTracking:!1,ignoreHiddenPoint:!0,legendType:"point",lineWidth:4,tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {point.key}</span><br/>',pointFormat:"{point.description}"},states:{hover:{lineWidthPlus:0}},dataLabels:{enabled:!0,allowOverlap:!0,connectorWidth:1,backgroundColor:"#ffffff",formatter:function(){var a=
this.series.chart.styledMode?"<span>\u25cf </span>":'<span style="color:'+this.point.color+'">\u25cf </span>';return a+='<span class="highcharts-strong">'+(this.key||"")+"</span><br/>"+(this.point.label||"")},borderWidth:1,borderColor:"#999999",borderRadius:3,distance:100,alternate:!0,verticalAlign:"middle",color:"#333333",style:{textOutline:"none",fontWeight:"normal",fontSize:"12px"},shadow:!1},marker:{enabledThreshold:0,symbol:"square",radius:6,lineWidth:2,height:15},showInLegend:!1,colorKey:"x"},
{trackerGroups:["markerGroup","dataLabelsGroup"],drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,drawTracker:b.TrackerMixin.drawTrackerPoint,init:function(){var a=this;n.prototype.init.apply(a,arguments);q(a,"afterTranslate",function(){var c,m=Number.MAX_VALUE;a.points.forEach(function(a){a.isInside=a.isInside&&a.visible;a.visible&&!a.isNull&&(u(c)&&(m=Math.min(m,Math.abs(a.plotX-c))),c=a.plotX)});a.closestPointRangePx=m});q(a,"drawDataLabels",function(){a.distributeDL()});q(a,"afterDrawDataLabels",
function(){var c;a.points.forEach(function(a){if(c=a.dataLabel)return c.animate=function(a){this.targetPosition&&(this.targetPosition=a);return b.SVGElement.prototype.animate.apply(this,arguments)},c.targetPosition||(c.targetPosition={}),a.drawConnector()})});q(a.chart,"afterHideOverlappingLabels",function(){a.points.forEach(function(a){a.connector&&a.dataLabel&&a.dataLabel.oldOpacity!==a.dataLabel.newOpacity&&a.alignConnector()})})},alignDataLabel:function(a,c,m,b){var d=this.chart.inverted,f=this.visibilityMap.filter(function(a){return a}),
e=this.visiblePointsCount,g=f.indexOf(a);f=this.options.dataLabels;var h=a.userDLOptions||{};g=f.alternate?g&&g!==e-1?2:1.5:1;e=Math.floor(this.xAxis.len/e);var k=c.padding;if(a.visible){var l=Math.abs(h.x||a.options.dataLabels.x);d?(d=2*(l-k)-a.itemHeight/2,d={width:d,textOverflow:c.width/d*c.height/2>e*g?"ellipsis":"none"}):d={width:h.width||f.width||e*g-2*k};c.css(d);this.chart.styledMode||c.shadow(f.shadow)}n.prototype.alignDataLabel.apply(this,arguments)},processData:function(){var a=0,c;this.visibilityMap=
this.getVisibilityMap();this.visibilityMap.forEach(function(c){c&&a++});this.visiblePointsCount=a;for(c=0;c<this.xData.length;c++)this.yData[c]=1;n.prototype.processData.call(this,arguments)},getXExtremes:function(a){var c=this;a=a.filter(function(a,b){return c.points[b].isValid()&&c.points[b].visible});return{min:r(a),max:l(a)}},generatePoints:function(){var a=this;n.prototype.generatePoints.apply(a);a.points.forEach(function(c,m){c.applyOptions({x:a.xData[m]},a.xData[m])})},getVisibilityMap:function(){return(this.data.length?
this.data:this.userOptions.data).map(function(a){return a&&!1!==a.visible&&!a.isNull?a:!1})},distributeDL:function(){var a=this,c=a.options.dataLabels,m,b,d={},f=1,e=c.distance;a.points.forEach(function(g){g.visible&&!g.isNull&&(m=g.options,b=g.options.dataLabels,a.hasRendered||(g.userDLOptions=t({},b)),d[a.chart.inverted?"x":"y"]=c.alternate&&f%2?-e:e,m.dataLabels=t(d,g.userDLOptions),f++)})},markerAttribs:function(a,c){var b=this.options.marker,h=a.marker||{},d=h.symbol||b.symbol,f=p(h.width,b.width,
this.closestPointRangePx),e=p(h.height,b.height),g=0;if(this.xAxis.isDatetimeAxis)return v.line.prototype.markerAttribs.call(this,a,c);c&&(b=b.states[c]||{},c=h.states&&h.states[c]||{},g=p(c.radius,b.radius,g+(b.radiusPlus||0)));a.hasImage=d&&0===d.indexOf("url");return{x:Math.floor(a.plotX)-f/2-g/2,y:a.plotY-e/2-g/2,width:f+g,height:e+g}},bindAxes:function(){var a=this;n.prototype.bindAxes.call(a);["xAxis","yAxis"].forEach(function(c){"xAxis"!==c||a[c].userOptions.type||(a[c].categories=a[c].hasNames=
!0)})}},{init:function(){var a=y.prototype.init.apply(this,arguments);a.name=p(a.name,"Event");a.y=1;return a},isValid:function(){return null!==this.options.y},setVisible:function(a,c){var b=this.series;c=p(c,b.options.ignoreHiddenPoint);v.pie.prototype.pointClass.prototype.setVisible.call(this,a,!1);b.processData();c&&b.chart.redraw()},setState:function(){var a=n.prototype.pointClass.prototype.setState;this.isNull||a.apply(this,arguments)},getConnectorPath:function(){var a=this.series.chart,c=this.series.xAxis.len,
b=a.inverted,h=b?"x2":"y2",d=this.dataLabel,f=d.targetPosition,e={x1:this.plotX,y1:this.plotY,x2:this.plotX,y2:w(f.y)?f.y:d.y},g=(d.alignAttr||d)[h[0]]<this.series.yAxis.len/2;b&&(e={x1:this.plotY,y1:c-this.plotX,x2:f.x||d.x,y2:c-this.plotX});g&&(e[h]+=d[b?"width":"height"]);x(e,function(a,c){e[c]-=(d.alignAttr||d)[c[0]]});return a.renderer.crispLine(["M",e.x1,e.y1,"L",e.x2,e.y2],d.options.connectorWidth)},drawConnector:function(){var a=this.series;this.connector||(this.connector=a.chart.renderer.path(this.getConnectorPath()).attr({zIndex:-1}).add(this.dataLabel));
this.series.chart.isInsidePlot(this.dataLabel.x,this.dataLabel.y)&&this.alignConnector()},alignConnector:function(){var a=this.series,c=this.connector,b=this.dataLabel,h=this.dataLabel.options=t(a.options.dataLabels,this.options.dataLabels),d=this.series.chart,f=c.getBBox(),e=f.x+b.translateX;f=f.y+b.translateY;d.inverted?f-=b.options.connectorWidth/2:e+=b.options.connectorWidth/2;d=d.isInsidePlot(e,f);c[d?"animate":"attr"]({d:this.getConnectorPath()});a.chart.styledMode||c.attr({stroke:h.connectorColor||
this.color,"stroke-width":h.connectorWidth,opacity:b[u(b.newOpacity)?"newOpacity":"opacity"]})}});""});l(b,"masters/modules/timeline.src.js",[],function(){})});
//# sourceMappingURL=timeline.js.map