!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * Organization chart series type
 * @module highcharts/modules/organization
 * @requires highcharts
 * @requires highcharts/modules/sankey
 *
 * (c) 2019-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.SVGElement):"function"==typeof define&&define.amd?define("highcharts/modules/organization",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.SVGElement)}):"object"==typeof exports?exports["highcharts/modules/organization"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.SVGElement):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.SVGElement)}("u"<typeof window?this:window,(t,e,i)=>(()=>{"use strict";var s,n={28:t=>{t.exports=i},512:t=>{t.exports=e},944:e=>{e.exports=t}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a={};o.d(a,{default:()=>A});var h=o(944),l=o.n(h),d=o(512),p=o.n(d);let{sankey:{prototype:{pointClass:g}}}=p().seriesTypes,c=class extends g{constructor(t,e,i){super(t,e,i),this.isNode||(this.dataLabelOnNull=!0,this.formatPrefix="link")}getSum(){return 1}setNodeColumn(){super.setNodeColumn();let t=this,e=t.getFromNode().fromNode;if(!(0,h.defined)(t.options.column)&&0!==t.linksTo.length&&e&&"hanging"===e.options.layout){let i=-1,s;t.options.layout=(0,h.pick)(t.options.layout,"hanging"),t.hangsFrom=e,(0,h.find)(e.linksFrom,(e,s)=>{let n=e.toNode===t;return n&&(i=s),n});for(let n=0;n<e.linksFrom.length;++n)(s=e.linksFrom[n]).toNode.id===t.id?n=e.linksFrom.length:i+=function t(e){let i=e.linksFrom.length;return e.linksFrom.forEach(e=>{e.id===e.toNode.linksTo[0].id?i+=t(e.toNode):i--}),i}(s.toNode);t.column=(t.column||0)+i}}};function u(t,e){let i=[];for(let s=0;s<t.length;s++){let n=t[s][1],r=t[s][2];if("number"==typeof n&&"number"==typeof r)if(0===s)i.push(["M",n,r]);else if(s===t.length-1)i.push(["L",n,r]);else if(e){let o=t[s-1],a=t[s+1];if(o&&a){let t=o[1],s=o[2],h=a[1],l=a[2];if("number"==typeof t&&"number"==typeof h&&"number"==typeof s&&"number"==typeof l&&t!==h&&s!==l){let o=t<h?1:-1,a=s<l?1:-1;i.push(["L",n-o*Math.min(Math.abs(n-t),e),r-a*Math.min(Math.abs(r-s),e)],["C",n,r,n,r,n+o*Math.min(Math.abs(n-h),e),r+a*Math.min(Math.abs(r-l),e)])}}}else i.push(["L",n,r])}return i}var f=o(28),y=o.n(f);let{composed:k,deg2rad:m}=l(),{sankey:x}=p().seriesTypes;s=y(),(0,h.pushUnique)(k,"TextPath")&&((0,h.addEvent)(s,"afterGetBBox",function(t){let e=t.bBox,i=this.element?.querySelector("textPath");if(i){let t=[],{b:s,h:n}=this.renderer.fontMetrics(this.element),r=n-s,o=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),a=i.innerHTML.replace(o,"").split(/<tspan class="highcharts-br"[^>]*>/),h=a.length,l=(t,e)=>{let{x:n,y:o}=e,a=(i.getRotationOfChar(t)-90)*m,h=Math.cos(a),l=Math.sin(a);return[[n-r*h,o-r*l],[n+s*h,o+s*l]]};for(let e=0,s=0;s<h;s++){let n=a[s].length;for(let r=0;r<n;r+=5)try{let n=e+r+s,[o,a]=l(n,i.getStartPositionOfChar(n));0===r?(t.push(a),t.push(o)):(0===s&&t.unshift(a),s===h-1&&t.push(o))}catch{break}e+=n-1;try{let n=e+s,r=i.getEndPositionOfChar(n),[o,a]=l(n,r);t.unshift(a),t.unshift(o)}catch{break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}),(0,h.addEvent)(s,"beforeAddingDataLabel",function(t){let e=t.labelOptions,i=t.point,s=e[i.formatPrefix+"TextPath"]||e.textPath;s&&!e.useHTML&&(this.setTextPath(i.getDataLabelPath?.(this)||i.graphic,s),i.dataLabelPath&&!s.enabled&&(i.dataLabelPath=i.dataLabelPath.destroy()))}),s.prototype.setTextPath=s.prototype.setTextPath??function(t,e){let i=this.renderer.url,s=this.text||this,n=s.textPath,{attributes:r,enabled:o}=(0,h.merge)({enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);if(t=t||n&&n.path,n?.undo(),t&&o){let e=(0,h.addEvent)(s,"afterModifyTree",e=>{if(t&&o){let n=t.attr("id");n||t.attr("id",n=(0,h.uniqueKey)());let o={x:0,y:0};(0,h.defined)(r.dx)&&(o.dx=r.dx,delete r.dx),(0,h.defined)(r.dy)&&(o.dy=r.dy,delete r.dy),s.attr(o),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let a=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:(0,h.extend)(r,{"text-anchor":r.textAnchor,href:`${i}#${n}`}),children:a}}});s.textPath={path:t,undo:e}}else s.attr({dx:0,dy:0}),delete s.textPath;return this.added&&(s.textCache="",this.renderer.buildText(s)),this});class b extends x{alignDataLabel(t,e,i){let s=t.shapeArgs,n=e.text;if(i.useHTML&&s){let t=(0,h.splat)(this.options.dataLabels.padding||0),i=this.options.borderWidth||0,r=i+2*t[3%t.length],o=i+2*t[0%t.length],a=s.width||0,l=s.height||0;this.chart.inverted&&(a=l,l=s.width||0),a-=r,l-=o,n.foreignObject?.attr({x:0,y:0,width:a,height:l}),(0,h.css)(n.element.parentNode,{width:a+"px",height:l+"px"}),(0,h.css)(n.element,{left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}),e.getBBox=()=>({width:a,height:l,x:0,y:0}),e.width=a,e.height=l}super.alignDataLabel.apply(this,arguments)}createNode(t){let e=super.createNode.call(this,t);return e.getSum=()=>1,e}pointAttribs(t,e){let i=x.prototype.pointAttribs.call(this,t,e),s=t.isNode?t.level:t.fromNode.level,n=this.mapOptionsToLevel[s||0]||{},r=t.options,o=n.states&&n.states[e]||{},a=(0,h.pick)(o.borderRadius,r.borderRadius,n.borderRadius,this.options.borderRadius),l=(0,h.pick)(o.linkColor,r.linkColor,n.linkColor,this.options.linkColor,o.link&&o.link.color,r.link&&r.link.color,n.link&&n.link.color,this.options.link&&this.options.link.color),d=(0,h.pick)(o.linkLineWidth,r.linkLineWidth,n.linkLineWidth,this.options.linkLineWidth,o.link&&o.link.lineWidth,r.link&&r.link.lineWidth,n.link&&n.link.lineWidth,this.options.link&&this.options.link.lineWidth),p=(0,h.pick)(o.linkOpacity,r.linkOpacity,n.linkOpacity,this.options.linkOpacity,o.link&&o.link.linkOpacity,r.link&&r.link.linkOpacity,n.link&&n.link.linkOpacity,this.options.link&&this.options.link.linkOpacity);return t.isNode?(0,h.isNumber)(a)&&(i.r=a):(i.stroke=l,i["stroke-width"]=d,i.opacity=p,delete i.fill),i}translateLink(t){let e=this.chart,i=this.options,s=t.fromNode,n=t.toNode,r=(0,h.pick)(i.linkLineWidth,i.link.lineWidth,0),o=(0,h.pick)(i.link.offset,.5),a=(0,h.pick)(t.options.link&&t.options.link.type,i.link.type);if(s.shapeArgs&&n.shapeArgs){let l=i.hangingIndent,d="right"===i.hangingSide,p=n.options.offset,g=/%$/.test(p)&&parseInt(p,10),c=e.inverted,f=(0,h.crisp)((s.shapeArgs.x||0)+(s.shapeArgs.width||0),r),y=(0,h.crisp)((s.shapeArgs.y||0)+(s.shapeArgs.height||0)/2,r),k=(0,h.crisp)(n.shapeArgs.x||0,r),m=(0,h.crisp)((n.shapeArgs.y||0)+(n.shapeArgs.height||0)/2,r),x;if(c&&(f-=s.shapeArgs.width||0,k+=n.shapeArgs.width||0),x=this.colDistance?(0,h.crisp)(k+(c?1:-1)*(this.colDistance-this.nodeWidth)/2,r):(0,h.crisp)((k+f)/2,r),g&&(g>=50||g<=-50)&&(x=k=(0,h.crisp)(k+(c?-.5:.5)*(n.shapeArgs.width||0),r),m=n.shapeArgs.y||0,g>0&&(m+=n.shapeArgs.height||0)),n.hangsFrom===s&&(e.inverted?(y=d?(0,h.crisp)((s.shapeArgs.y||0)+l/2,r):(0,h.crisp)((s.shapeArgs.y||0)+(s.shapeArgs.height||0)-l/2,r),m=d?(n.shapeArgs.y||0)+l/2:(n.shapeArgs.y||0)+(n.shapeArgs.height||0)):y=(0,h.crisp)((s.shapeArgs.y||0)+l/2,r),x=k=(0,h.crisp)((n.shapeArgs.x||0)+(n.shapeArgs.width||0)/2,r)),t.plotX=x,t.plotY=(y+m)/2,t.shapeType="path","straight"===a)t.shapeArgs={d:[["M",f,y],["L",k,m]]};else if("curved"===a){let e=Math.abs(k-f)*o*(c?-1:1);t.shapeArgs={d:[["M",f,y],["C",f+e,y,k-e,m,k,m]]}}else t.shapeArgs={d:u([["M",f,y],["L",x,y],["L",x,m],["L",k,m]],(0,h.pick)(i.linkRadius,i.link.radius))};t.dlBox={x:(f+k)/2,y:(y+m)/2,height:r,width:0}}}translateNode(t,e){super.translateNode(t,e);let i=this.chart,s=this.options,n=Math.max(Math.round(t.getSum()*this.translationFactor),s.minLinkWidth||0),r="right"===s.hangingSide,o=s.hangingIndent||0,a=s.hangingIndentTranslation,l=s.minNodeLength||10,d=Math.round(this.nodeWidth),p=t.shapeArgs,g=i.inverted?-1:1,c=t.hangsFrom;if(c)if("cumulative"===a)for(p.height-=o,i.inverted&&!r&&(p.y-=g*o);c;)p.y+=(r?1:g)*o,c=c.hangsFrom;else if("shrink"===a)for(;c&&p.height>o+l;)p.height-=o,(!i.inverted||r)&&(p.y+=o),c=c.hangsFrom;else p.height-=o,(!i.inverted||r)&&(p.y+=o);t.nodeHeight=i.inverted?p.width:p.height,t.shapeArgs&&!t.hangsFrom&&(t.shapeArgs=(0,h.merge)(t.shapeArgs,{x:(t.shapeArgs.x||0)+d/2-(t.shapeArgs.width||0)/2,y:(t.shapeArgs.y||0)+n/2-(t.shapeArgs.height||0)/2}))}drawDataLabels(){let t=this.options.dataLabels;if(t.linkTextPath&&t.linkTextPath.enabled)for(let t of this.points)t.options.dataLabels=(0,h.merge)(t.options.dataLabels,{useHTML:!1});super.drawDataLabels()}}b.defaultOptions=(0,h.merge)(x.defaultOptions,{borderColor:"var(--highcharts-neutral-color-60)",borderRadius:3,link:{color:"var(--highcharts-neutral-color-60)",lineWidth:1,radius:10,type:"orthogonal"},borderWidth:1,dataLabels:{nodeFormatter:function(){let t={width:"100%",height:"100%",display:"flex","flex-direction":"row","align-items":"center","justify-content":"center"},e={"max-height":"100%","border-radius":"50%"},i={width:"100%",padding:0,"text-align":"center","white-space":"normal"};function s(t){return Object.keys(t).reduce(function(e,i){return e+i+":"+t[i]+";"},'style="')+'"'}let{description:n,image:r,title:o}=this.point;r&&(e["max-width"]="30%",i.width="70%"),this.series.chart.renderer.forExport&&(t.display="block",i.position="absolute",i.left=r?"30%":0,i.top=0);let a="<div "+s(t)+">";return r&&(a+='<img src="'+r+'" '+s(e)+">"),a+="<div "+s(i)+">",this.point.name&&(a+="<h4 "+s({margin:0})+">"+this.point.name+"</h4>"),o&&(a+="<p "+s({margin:0})+">"+(o||"")+"</p>"),n&&(a+="<p "+s({opacity:.75,margin:"5px"})+">"+n+"</p>"),a+="</div></div>"},style:{fontWeight:"normal",fontSize:"0.9em",textAlign:"left"},useHTML:!0,linkTextPath:{attributes:{startOffset:"95%",textAnchor:"end"}}},hangingIndent:20,hangingIndentTranslation:"inherit",hangingSide:"left",minNodeLength:10,nodeWidth:50,tooltip:{nodeFormat:"{point.name}<br>{point.title}<br>{point.description}"}}),(0,h.extend)(b.prototype,{pointClass:c}),p().registerSeriesType("organization",b);let A=l();return a.default})());