!/** * Highcharts JS v11.4.1 (2024-04-04) * Organization chart series type * * (c) 2019-2024 Torstein Honsi * * License: www.highcharts.com/license */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/organization",["highcharts","highcharts/modules/sankey"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/Organization/OrganizationPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{sankey:{prototype:{pointClass:i}}}=t.seriesTypes,{defined:n,find:s,pick:o}=e;return class extends i{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(!n(t.options.column)&&0!==t.linksTo.length&&e&&"hanging"===e.options.layout){let i=-1,n;t.options.layout=o(t.options.layout,"hanging"),t.hangsFrom=e,s(e.linksFrom,(e,n)=>{let s=e.toNode===t;return s&&(i=n),s});for(let s=0;s{e.id===e.toNode.linksTo[0].id?i+=t(e.toNode):i--}),i}(n.toNode);t.column=(t.column||0)+i}}}}),i(e,"Series/Organization/OrganizationSeriesDefaults.js",[],function(){return{borderColor:"#666666",borderRadius:3,link:{color:"#666666",lineWidth:1,radius:10,type:"default"},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 n(t){return Object.keys(t).reduce(function(e,i){return e+i+":"+t[i]+";"},'style="')+'"'}let{description:s,image:o,title:r}=this.point;o&&(e["max-width"]="30%",i.width="70%"),this.series.chart.renderer.forExport&&(t.display="block",i.position="absolute",i.left=o?"30%":0,i.top=0);let a="
";return o&&(a+='"),a+="
",this.point.name&&(a+="

"+this.point.name+"

"),r&&(a+="

"+(r||"")+"

"),s&&(a+="

"+s+"

"),a+="
"},style:{fontWeight:"normal",fontSize:"0.9em"},useHTML:!0,linkTextPath:{attributes:{startOffset:"95%",textAnchor:"end"}}},hangingIndent:20,hangingIndentTranslation:"inherit",hangingSide:"left",minNodeLength:10,nodeWidth:50,tooltip:{nodeFormat:"{point.name}
{point.title}
{point.description}"}}}),i(e,"Series/PathUtilities.js",[],function(){function t(t,e){let i=[];for(let n=0;n({width:i,height:s,x:0,y:0}),e.width=i,e.height=s}super.alignDataLabel.apply(this,arguments)}createNode(t){let e=super.createNode.call(this,t);return e.getSum=()=>1,e}pointAttribs(t,e){let i=o.prototype.pointAttribs.call(this,t,e),n=t.isNode?t.level:t.fromNode.level,s=this.mapOptionsToLevel[n||0]||{},r=t.options,a=s.states&&s.states[e]||{},l=d(a.borderRadius,r.borderRadius,s.borderRadius,this.options.borderRadius),p=d(a.linkColor,r.linkColor,s.linkColor,this.options.linkColor,a.link&&a.link.color,r.link&&r.link.color,s.link&&s.link.color,this.options.link&&this.options.link.color),g=d(a.linkLineWidth,r.linkLineWidth,s.linkLineWidth,this.options.linkLineWidth,a.link&&a.link.lineWidth,r.link&&r.link.lineWidth,s.link&&s.link.lineWidth,this.options.link&&this.options.link.lineWidth),u=d(a.linkOpacity,r.linkOpacity,s.linkOpacity,this.options.linkOpacity,a.link&&a.link.linkOpacity,r.link&&r.link.linkOpacity,s.link&&s.link.linkOpacity,this.options.link&&this.options.link.linkOpacity);return t.isNode?h(l)&&(i.r=l):(i.stroke=p,i["stroke-width"]=g,i.opacity=u,delete i.fill),i}translateLink(t){let e=this.chart,i=this.options,s=t.fromNode,o=t.toNode,r=d(i.linkLineWidth,i.link.lineWidth),a=Math.round(r)%2/2,h=d(i.link.offset,.5),l=d(t.options.link&&t.options.link.type,i.link.type);if(s.shapeArgs&&o.shapeArgs){let p=i.hangingIndent,g="right"===i.hangingSide,u=o.options.offset,f=/%$/.test(u)&&parseInt(u,10),c=e.inverted,k=Math.floor((s.shapeArgs.x||0)+(s.shapeArgs.width||0))+a,m=Math.floor((s.shapeArgs.y||0)+(s.shapeArgs.height||0)/2)+a,y=Math.floor(o.shapeArgs.x||0)+a,L=Math.floor((o.shapeArgs.y||0)+(o.shapeArgs.height||0)/2)+a,b;if(c&&(k-=s.shapeArgs.width||0,y+=o.shapeArgs.width||0),b=this.colDistance?Math.floor(y+(c?1:-1)*(this.colDistance-this.nodeWidth)/2)+a:Math.floor((y+k)/2)+a,f&&(f>=50||f<=-50)&&(b=y=Math.floor(y+(c?-.5:.5)*(o.shapeArgs.width||0))+a,L=o.shapeArgs.y||0,f>0&&(L+=o.shapeArgs.height||0)),o.hangsFrom===s&&(e.inverted?(m=g?Math.floor((s.shapeArgs.y||0)+p/2)+a:Math.floor((s.shapeArgs.y||0)+(s.shapeArgs.height||0)-p/2)+a,L=g?(o.shapeArgs.y||0)+p/2:(o.shapeArgs.y||0)+(o.shapeArgs.height||0)):m=Math.floor((s.shapeArgs.y||0)+p/2)+a,b=y=Math.floor((o.shapeArgs.x||0)+(o.shapeArgs.width||0)/2)+a),t.plotX=b,t.plotY=(m+L)/2,t.shapeType="path","straight"===l)t.shapeArgs={d:[["M",k,m],["L",y,L]]};else if("curved"===l){let e=Math.abs(y-k)*h*(c?-1:1);t.shapeArgs={d:[["M",k,m],["C",k+e,m,y-e,L,y,L]]}}else t.shapeArgs={d:n.applyRadius([["M",k,m],["L",b,m],["L",b,L],["L",y,L]],d(i.linkRadius,i.link.radius))};t.dlBox={x:(k+y)/2,y:(m+L)/2,height:r,width:0}}}translateNode(t,e){super.translateNode(t,e);let i=this.chart,n=this.options,s=Math.max(Math.round(t.getSum()*this.translationFactor),n.minLinkWidth||0),o="right"===n.hangingSide,r=n.hangingIndent||0,a=n.hangingIndentTranslation,h=n.minNodeLength||10,d=Math.round(this.nodeWidth),p=t.shapeArgs,g=i.inverted?-1:1,u=t.hangsFrom;if(u){if("cumulative"===a)for(p.height-=r,i.inverted&&!o&&(p.y-=g*r);u;)p.y+=(o?1:g)*r,u=u.hangsFrom;else if("shrink"===a)for(;u&&p.height>r+h;)p.height-=r,(!i.inverted||o)&&(p.y+=r),u=u.hangsFrom;else p.height-=r,(!i.inverted||o)&&(p.y+=r)}t.nodeHeight=i.inverted?p.width:p.height,t.shapeArgs&&!t.hangsFrom&&(t.shapeArgs=l(t.shapeArgs,{x:(t.shapeArgs.x||0)+d/2-(t.shapeArgs.width||0)/2,y:(t.shapeArgs.y||0)+s/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=l(t.options.dataLabels,{useHTML:!1});super.drawDataLabels()}}return p.defaultOptions=l(o.defaultOptions,e),a(p.prototype,{pointClass:t}),i.registerSeriesType("organization",p),p}),i(e,"masters/modules/organization.src.js",[e["Core/Globals.js"]],function(t){return t})});