/*
 Highcharts JS v10.1.0 (2022-04-29)

 Timeline series

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

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/timeline",["highcharts"],function(l){a(l);a.Highcharts=l;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function l(a,f,p,l){a.hasOwnProperty(f)||(a[f]=l.apply(null,p),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:f,module:a[f]}})))}a=a?a._modules:{};l(a,
"Series/Timeline/TimelinePoint.js",[a["Core/Series/Point.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,f,p){var l=this&&this.__extends||function(){var a=function(c,h){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,a){h.__proto__=a}||function(h,a){for(var n in a)a.hasOwnProperty(n)&&(h[n]=a[n])};return a(c,h)};return function(c,h){function t(){this.constructor=c}a(c,h);c.prototype=null===h?Object.create(h):(t.prototype=h.prototype,new t)}}(),k=f.seriesTypes.pie.prototype.pointClass,
z=p.defined,r=p.isNumber,v=p.merge,w=p.objectEach,q=p.pick;return function(f){function c(){var a=null!==f&&f.apply(this,arguments)||this;a.options=void 0;a.series=void 0;return a}l(c,f);c.prototype.alignConnector=function(){var a=this.series,c=this.connector,g=this.dataLabel,n=this.dataLabel.options=v(a.options.dataLabels,this.options.dataLabels),e=this.series.chart,b=c.getBBox(),d=b.x+g.translateX;b=b.y+g.translateY;e.inverted?b-=g.options.connectorWidth/2:d+=g.options.connectorWidth/2;e=e.isInsidePlot(d,
b);c[e?"animate":"attr"]({d:this.getConnectorPath()});a.chart.styledMode||c.attr({stroke:n.connectorColor||this.color,"stroke-width":n.connectorWidth,opacity:g[z(g.newOpacity)?"newOpacity":"opacity"]})};c.prototype.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()};c.prototype.getConnectorPath=function(){var a=
this.series.chart,c=this.series.xAxis.len,g=a.inverted,n=g?"x2":"y2",e=this.dataLabel,b=e.targetPosition,d={x1:this.plotX,y1:this.plotY,x2:this.plotX,y2:r(b.y)?b.y:e.y},m=(e.alignAttr||e)[n[0]]<this.series.yAxis.len/2;g&&(d={x1:this.plotY,y1:c-this.plotX,x2:b.x||e.x,y2:c-this.plotX});m&&(d[n]+=e[g?"width":"height"]);w(d,function(b,a){d[a]-=(e.alignAttr||e)[a[0]]});return a.renderer.crispLine([["M",d.x1,d.y1],["L",d.x2,d.y2]],e.options.connectorWidth)};c.prototype.init=function(){var a=f.prototype.init.apply(this,
arguments);a.name=q(a.name,"Event");a.y=1;return a};c.prototype.isValid=function(){return null!==this.options.y};c.prototype.setState=function(){var a=f.prototype.setState;this.isNull||a.apply(this,arguments)};c.prototype.setVisible=function(a,c){var g=this.series;c=q(c,g.options.ignoreHiddenPoint);k.prototype.setVisible.call(this,a,!1);g.processData();c&&g.chart.redraw()};c.prototype.applyOptions=function(c,k){c=a.prototype.optionsToObject.call(this,c);this.userDLOptions=v(this.userDLOptions,c.dataLabels);
return f.prototype.applyOptions.call(this,c,k)};return c}(f.series.prototype.pointClass)});l(a,"Series/Timeline/TimelineSeries.js",[a["Core/Legend/LegendSymbol.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Renderer/SVG/SVGElement.js"],a["Series/Timeline/TimelinePoint.js"],a["Core/Utilities.js"]],function(a,f,l,x,k){var p=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&
(b[d]=a[d])};return a(c,b)};return function(c,b){function d(){this.constructor=c}a(c,b);c.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)}}(),r=f.seriesTypes,v=r.column,w=r.line,q=k.addEvent,y=k.arrayMax,c=k.arrayMin,h=k.defined;r=k.extend;var t=k.merge,g=k.pick;k=function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;b.userOptions=void 0;b.visibilityMap=void 0;return b}p(e,a);e.prototype.alignDataLabel=function(b,
d,c,e){var m=this.chart.inverted,u=this.visibilityMap.filter(function(a){return a}),g=this.visiblePointsCount,f=u.indexOf(b);u=this.options.dataLabels;var k=b.userDLOptions||{};f=u.alternate?f&&f!==g-1?2:1.5:1;g=Math.floor(this.xAxis.len/g);var l=d.padding;if(b.visible){var h=Math.abs(k.x||b.options.dataLabels.x);m?(m=2*(h-l)-b.itemHeight/2,m={width:m+"px",textOverflow:d.width/m*d.height/2>g*f?"ellipsis":"none"}):m={width:(k.width||u.width||g*f-2*l)+"px"};d.css(m);this.chart.styledMode||d.shadow(u.shadow)}a.prototype.alignDataLabel.apply(this,
arguments)};e.prototype.bindAxes=function(){var b=this;a.prototype.bindAxes.call(b);["xAxis","yAxis"].forEach(function(a){"xAxis"!==a||b[a].userOptions.type||(b[a].categories=b[a].hasNames=!0)})};e.prototype.distributeDL=function(){var a=this,d=a.options.dataLabels,c=1;if(d){var e=d.distance||0;a.points.forEach(function(b){var m;b.options.dataLabels=t((m={},m[a.chart.inverted?"x":"y"]=d.alternate&&c%2?-e:e,m),b.userDLOptions);c++})}};e.prototype.generatePoints=function(){var b=this;a.prototype.generatePoints.apply(b);
b.points.forEach(function(a,c){a.applyOptions({x:b.xData[c]},b.xData[c])})};e.prototype.getVisibilityMap=function(){return(this.data.length?this.data:this.userOptions.data).map(function(a){return a&&!1!==a.visible&&!a.isNull?a:!1})};e.prototype.getXExtremes=function(a){var b=this;a=a.filter(function(a,d){return b.points[d].isValid()&&b.points[d].visible});return{min:c(a),max:y(a)}};e.prototype.init=function(){var b=this;a.prototype.init.apply(b,arguments);b.eventsToUnbind.push(q(b,"afterTranslate",
function(){var a,c=Number.MAX_VALUE;b.points.forEach(function(b){b.isInside=b.isInside&&b.visible;b.visible&&!b.isNull&&(h(a)&&(c=Math.min(c,Math.abs(b.plotX-a))),a=b.plotX)});b.closestPointRangePx=c}));b.eventsToUnbind.push(q(b,"drawDataLabels",function(){b.distributeDL()}));b.eventsToUnbind.push(q(b,"afterDrawDataLabels",function(){var a;b.points.forEach(function(b){if(a=b.dataLabel)return a.animate=function(a){this.targetPosition&&(this.targetPosition=a);return l.prototype.animate.apply(this,arguments)},
a.targetPosition||(a.targetPosition={}),b.drawConnector()})}));b.eventsToUnbind.push(q(b.chart,"afterHideOverlappingLabel",function(){b.points.forEach(function(a){a.connector&&a.dataLabel&&a.dataLabel.oldOpacity!==a.dataLabel.newOpacity&&a.alignConnector()})}))};e.prototype.markerAttribs=function(b,c){var d=this.options.marker,e=b.marker||{},f=e.symbol||d.symbol,k=g(e.width,d.width,this.closestPointRangePx),l=g(e.height,d.height),h=0;if(this.xAxis.dateTime)return a.prototype.markerAttribs.call(this,
b,c);c&&(d=d.states[c]||{},c=e.states&&e.states[c]||{},h=g(c.radius,d.radius,h+(d.radiusPlus||0)));b.hasImage=f&&0===f.indexOf("url");return{x:Math.floor(b.plotX)-k/2-h/2,y:b.plotY-l/2-h/2,width:k+h,height:l+h}};e.prototype.processData=function(){var b=0,c;this.visibilityMap=this.getVisibilityMap();this.visibilityMap.forEach(function(a){a&&b++});this.visiblePointsCount=b;for(c=0;c<this.xData.length;c++)this.yData[c]=1;a.prototype.processData.call(this,arguments)};e.defaultOptions=t(w.defaultOptions,
{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,alternate:!0,backgroundColor:"#ffffff",borderWidth:1,borderColor:"#999999",borderRadius:3,color:"#333333",connectorWidth:1,distance:100,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||"")},style:{textOutline:"none",fontWeight:"normal",fontSize:"12px"},shadow:!1,verticalAlign:"middle"},marker:{enabledThreshold:0,symbol:"square",radius:6,lineWidth:2,height:15},showInLegend:!1,colorKey:"x"});return e}(w);r(k.prototype,{drawLegendSymbol:a.drawRectangle,drawTracker:v.prototype.drawTracker,pointClass:x,trackerGroups:["markerGroup",
"dataLabelsGroup"]});f.registerSeriesType("timeline",k);"";"";return k});l(a,"masters/modules/timeline.src.js",[],function(){})});
//# sourceMappingURL=timeline.js.map