/**
 * Highcharts JS v11.2.0 (2023-10-30)
 *
 * Dependency wheel module
 *
 * (c) 2010-2021 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */!function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/dependency-wheel",["highcharts","highcharts/modules/sankey"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function s(e,t,s,i){e.hasOwnProperty(t)||(e[t]=i.apply(null,s),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}s(t,"Series/DependencyWheel/DependencyWheelPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sankey:{prototype:{pointClass:s}}}=e.seriesTypes,{pInt:i,wrap:o}=t;return class extends s{constructor(){super(...arguments),this.angle=void 0,this.fromNode=void 0,this.index=void 0,this.linksFrom=void 0,this.linksTo=void 0,this.options=void 0,this.series=void 0,this.shapeArgs=void 0,this.toNode=void 0}getDataLabelPath(e){let t=this,s=t.series.chart.renderer,n=t.shapeArgs,a=t.angle<0||t.angle>Math.PI,r=n.start||0,d=n.end||0;return t.dataLabelPath?(t.dataLabelPath=t.dataLabelPath.destroy(),delete t.dataLabelPath):o(e,"destroy",function(e){return t.dataLabelPath&&(t.dataLabelPath=t.dataLabelPath.destroy()),e.call(this)}),t.dataLabelPath=s.arc({open:!0,longArc:Math.abs(Math.abs(r)-Math.abs(d))<Math.PI?0:1}).attr({x:n.x,y:n.y,r:(n.r||0)+i(e.options?.distance||0),start:a?r:d,end:a?d:r,clockwise:+a}).add(s.defs),t.dataLabelPath}isValid(){return!0}}}),s(t,"Series/DependencyWheel/DependencyWheelSeriesDefaults.js",[],function(){return{center:[null,null],curveFactor:.6,startAngle:0,dataLabels:{textPath:{enabled:!1,attributes:{dy:5}}}}}),s(t,"Series/DependencyWheel/DependencyWheelSeries.js",[t["Core/Animation/AnimationUtilities.js"],t["Series/DependencyWheel/DependencyWheelPoint.js"],t["Series/DependencyWheel/DependencyWheelSeriesDefaults.js"],t["Core/Globals.js"],t["Series/Sankey/SankeyColumnComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s,i,o,n,a){let{animObject:r}=e,{deg2rad:d}=i,{pie:l,sankey:h}=n.seriesTypes,{extend:c,merge:p}=a;class u extends h{constructor(){super(...arguments),this.data=void 0,this.options=void 0,this.nodeColumns=void 0,this.nodes=void 0,this.points=void 0}animate(e){if(!e){let e=r(this.options.animation).duration,t=e/2/this.nodes.length,s=0;for(let e of this.nodes){let i=e.graphic;i&&(i.attr({opacity:0}),setTimeout(()=>{e.graphic&&e.graphic.animate({opacity:1},{duration:t})},t*s++))}for(let e of this.points){let t=e.graphic;!e.isNode&&t&&t.attr({opacity:0}).animate({opacity:1},this.options.animation)}}}createNode(e){let t=super.createNode(e);return t.getSum=()=>t.linksFrom.concat(t.linksTo).reduce((e,t)=>e+t.weight,0),t.offset=e=>{let s=e=>e.fromNode===t?e.toNode:e.fromNode,i=0,o=t.linksFrom.concat(t.linksTo),n;o.sort((e,t)=>s(e).index-s(t).index);for(let e=0;e<o.length;e++)if(s(o[e]).index>t.index){o=o.slice(0,e).reverse().concat(o.slice(e).reverse()),n=!0;break}n||o.reverse();for(let t=0;t<o.length;t++){if(o[t]===e)return i;i+=o[t].weight}},t}createNodeColumns(){let e=[o.compose([],this)];for(let t of this.nodes)t.column=0,e[0].push(t);return e}getNodePadding(){return this.options.nodePadding/Math.PI}translate(){let e=this.options,t=2*Math.PI/(this.chart.plotHeight+this.getNodePadding()),s=this.getCenter(),i=(e.startAngle-90)*d,o=e.borderRadius,n="object"==typeof o?o.radius:o;for(let o of(super.translate(),this.nodeColumns[0]))if(o.sum){let a=o.shapeArgs,r=s[0],d=s[1],l=s[2]/2,h=l-e.nodeWidth,c=i+t*(a.y||0),p=i+t*((a.y||0)+(a.height||0));for(let s of(o.angle=c+(p-c)/2,o.shapeType="arc",o.shapeArgs={x:r,y:d,r:l,innerR:h,start:c,end:p,borderRadius:n},o.dlBox={x:r+Math.cos((c+p)/2)*(l+h)/2,y:d+Math.sin((c+p)/2)*(l+h)/2,width:1,height:1},o.linksFrom))if(s.linkBase){let o,n;let a=s.linkBase.map((a,l)=>{let c=t*a,p=Math.cos(i+c)*(h+1),u=Math.sin(i+c)*(h+1);return o=e.curveFactor||0,(n=Math.abs(s.linkBase[3-l]*t-c))>Math.PI&&(n=2*Math.PI-n),(n*=h)<h&&(o*=n/h),{x:r+p,y:d+u,cpX:r+(1-o)*p,cpY:d+(1-o)*u}});s.shapeArgs={d:[["M",a[0].x,a[0].y],["A",h,h,0,0,1,a[1].x,a[1].y],["C",a[1].cpX,a[1].cpY,a[2].cpX,a[2].cpY,a[2].x,a[2].y],["A",h,h,0,0,1,a[3].x,a[3].y],["C",a[3].cpX,a[3].cpY,a[0].cpX,a[0].cpY,a[0].x,a[0].y]]}}}}}return u.defaultOptions=p(h.defaultOptions,s),c(u.prototype,{orderNodes:!1,getCenter:l.prototype.getCenter}),u.prototype.pointClass=t,n.registerSeriesType("dependencywheel",u),u}),s(t,"masters/modules/dependency-wheel.src.js",[],function(){})});//# sourceMappingURL=dependency-wheel.js.map