/*
 Highcharts JS v10.2.1 (2022-08-29)
 Organization chart series type

 (c) 2019-2021 Torstein Honsi

 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/organization",["highcharts","highcharts/modules/sankey"],function(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,m,h,g){a.hasOwnProperty(m)||(a[m]=g.apply(null,h),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:m,module:a[m]}})))}
a=a?a._modules:{};g(a,"Series/Organization/OrganizationPoint.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,m){function h(a){var f=a.linksFrom.length;a.linksFrom.forEach(function(d){d.id===d.toNode.linksTo[0].id?f+=h(d.toNode):f--});return f}var g=this&&this.__extends||function(){var a=function(f,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var b in c)c.hasOwnProperty(b)&&(d[b]=c[b])};return a(f,d)};return function(f,
d){function n(){this.constructor=f}a(f,d);f.prototype=null===d?Object.create(d):(n.prototype=d.prototype,new n)}}(),t=m.defined,u=m.find,w=m.pick;return function(a){function f(){var d=null!==a&&a.apply(this,arguments)||this;d.fromNode=void 0;d.linksFrom=void 0;d.linksTo=void 0;d.options=void 0;d.series=void 0;d.toNode=void 0;return d}g(f,a);f.prototype.getSum=function(){return 1};f.prototype.setNodeColumn=function(){a.prototype.setNodeColumn.call(this);var d=this,n=d.getFromNode().fromNode;if(!t(d.options.column)&&
0!==d.linksTo.length&&n&&"hanging"===n.options.layout){d.options.layout=w(d.options.layout,"hanging");d.hangsFrom=n;var c=-1;u(n.linksFrom,function(b,q){(b=b.toNode===d)&&(c=q);return b});for(var b=0;b<n.linksFrom.length;b++){var q=n.linksFrom[b];q.toNode.id===d.id?b=n.linksFrom.length:c+=h(q.toNode)}d.column=(d.column||0)+c}};return f}(a.seriesTypes.sankey.prototype.pointClass)});g(a,"Series/Organization/OrganizationSeries.js",[a["Series/Organization/OrganizationPoint.js"],a["Core/Series/SeriesRegistry.js"],
a["Core/Utilities.js"]],function(a,m,h){var g=this&&this.__extends||function(){var d=function(a,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,c){b.__proto__=c}||function(b,c){for(var k in c)c.hasOwnProperty(k)&&(b[k]=c[k])};return d(a,c)};return function(a,c){function b(){this.constructor=a}d(a,c);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),t=m.seriesTypes.sankey,u=h.css,w=h.extend,x=h.merge,f=h.pick;h=function(a){function d(){var c=null!==a&&
a.apply(this,arguments)||this;c.data=void 0;c.options=void 0;c.points=void 0;return c}g(d,a);d.curvedPath=function(c,b){for(var a=[],d=0;d<c.length;d++){var e=c[d][1],l=c[d][2];if("number"===typeof e&&"number"===typeof l)if(0===d)a.push(["M",e,l]);else if(d===c.length-1)a.push(["L",e,l]);else if(b){var r=c[d-1],p=c[d+1];if(r&&p){var f=r[1];r=r[2];var v=p[1];p=p[2];if("number"===typeof f&&"number"===typeof v&&"number"===typeof r&&"number"===typeof p&&f!==v&&r!==p){var h=f<v?1:-1,g=r<p?1:-1;a.push(["L",
e-h*Math.min(Math.abs(e-f),b),l-g*Math.min(Math.abs(l-r),b)],["C",e,l,e,l,e+h*Math.min(Math.abs(e-v),b),l+g*Math.min(Math.abs(l-p),b)])}}}else a.push(["L",e,l])}return a};d.prototype.alignDataLabel=function(c,b,d){if(d.useHTML){var k=c.shapeArgs.width,e=c.shapeArgs.height,q=this.options.borderWidth+2*this.options.dataLabels.padding;this.chart.inverted&&(k=e,e=c.shapeArgs.width);e-=q;k-=q;if(q=b.text)u(q.element.parentNode,{width:k+"px",height:e+"px"}),u(q.element,{left:0,top:0,width:"100%",height:"100%",
overflow:"hidden"});b.getBBox=function(){return{width:k,height:e}};b.width=k;b.height=e}a.prototype.alignDataLabel.apply(this,arguments)};d.prototype.createNode=function(c){c=a.prototype.createNode.call(this,c);c.getSum=function(){return 1};return c};d.prototype.pointAttribs=function(c,b){var d=this,a=t.prototype.pointAttribs.call(d,c,b),e=d.mapOptionsToLevel[(c.isNode?c.level:c.fromNode.level)||0]||{},l=c.options,r=e.states&&e.states[b]||{};b=["borderRadius","linkColor","linkLineWidth","linkOpacity"].reduce(function(b,
c){b[c]=f(r[c],l[c],e[c],d.options[c]);return b},{});c.isNode?b.borderRadius&&(a.r=b.borderRadius):(a.stroke=b.linkColor,a["stroke-width"]=b.linkLineWidth,a.opacity=b.linkOpacity,delete a.fill);return a};d.prototype.translateLink=function(c){var b=c.fromNode,a=c.toNode,k=Math.round(this.options.linkLineWidth)%2/2,e=Math.floor(b.shapeArgs.x+b.shapeArgs.width)+k,l=Math.floor(b.shapeArgs.y+b.shapeArgs.height/2)+k,f=Math.floor(a.shapeArgs.x)+k,p=Math.floor(a.shapeArgs.y+a.shapeArgs.height/2)+k,h=this.options.hangingIndent;
var g=a.options.offset;var m=/%$/.test(g)&&parseInt(g,10),n=this.chart.inverted;n&&(e-=b.shapeArgs.width,f+=a.shapeArgs.width);g=Math.floor(f+(n?1:-1)*(this.colDistance-this.nodeWidth)/2)+k;m&&(50<=m||-50>=m)&&(g=f=Math.floor(f+(n?-.5:.5)*a.shapeArgs.width)+k,p=a.shapeArgs.y,0<m&&(p+=a.shapeArgs.height));a.hangsFrom===b&&(this.chart.inverted?(l=Math.floor(b.shapeArgs.y+b.shapeArgs.height-h/2)+k,p=a.shapeArgs.y+a.shapeArgs.height):l=Math.floor(b.shapeArgs.y+h/2)+k,g=f=Math.floor(a.shapeArgs.x+a.shapeArgs.width/
2)+k);c.plotY=1;c.shapeType="path";c.shapeArgs={d:d.curvedPath([["M",e,l],["L",g,l],["L",g,p],["L",f,p]],this.options.linkRadius)}};d.prototype.translateNode=function(a,b){t.prototype.translateNode.call(this,a,b);b=a.hangsFrom;var c=this.options.hangingIndent||0,d=this.chart.inverted?-1:1,e=a.shapeArgs,f=this.options.hangingIndentTranslation,g=this.options.minNodeLength||10;if(b)if("cumulative"===f)for(e.height-=c,e.y-=d*c;b;)e.y+=d*c,b=b.hangsFrom;else if("shrink"===f)for(;b&&e.height>c+g;)e.height-=
c,b=b.hangsFrom;else e.height-=c,this.chart.inverted||(e.y+=c);a.nodeHeight=this.chart.inverted?e.width:e.height};d.defaultOptions=x(t.defaultOptions,{borderColor:"#666666",borderRadius:3,linkRadius:10,borderWidth:1,dataLabels:{nodeFormatter:function(){function a(a){return Object.keys(a).reduce(function(b,c){return b+c+":"+a[c]+";"},'style="')+'"'}var b={width:"100%",height:"100%",display:"flex","flex-direction":"row","align-items":"center","justify-content":"center"},d={"max-height":"100%","border-radius":"50%"},
f={width:"100%",padding:0,"text-align":"center","white-space":"normal"},e={margin:0},g={margin:0},h={opacity:.75,margin:"5px"};this.point.image&&(d["max-width"]="30%",f.width="70%");this.series.chart.renderer.forExport&&(b.display="block",f.position="absolute",f.left=this.point.image?"30%":0,f.top=0);b="<div "+a(b)+">";this.point.image&&(b+='<img src="'+this.point.image+'" '+a(d)+">");b+="<div "+a(f)+">";this.point.name&&(b+="<h4 "+a(e)+">"+this.point.name+"</h4>");this.point.title&&(b+="<p "+a(g)+
">"+(this.point.title||"")+"</p>");this.point.description&&(b+="<p "+a(h)+">"+this.point.description+"</p>");return b+"</div></div>"},style:{fontWeight:"normal",fontSize:"13px"},useHTML:!0},hangingIndent:20,hangingIndentTranslation:"inherit",linkColor:"#666666",linkLineWidth:1,minNodeLength:10,nodeWidth:50,tooltip:{nodeFormat:"{point.name}<br>{point.title}<br>{point.description}"}});return d}(t);w(h.prototype,{pointClass:a});m.registerSeriesType("organization",h);"";"";return h});g(a,"masters/modules/organization.src.js",
[],function(){})});
//# sourceMappingURL=organization.js.map