/** * Highcharts JS v11.2.0 (2023-10-30) * * Arc diagram module * * (c) 2021 Piotr Madej * * 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/arc-diagram",["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 o(t,e,o,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Series/ArcDiagram/ArcDiagramPoint.js",[e["Series/NodesComposition.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),s=e.seriesTypes.sankey.prototype.pointClass,r=o.extend,a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fromNode=void 0,e.index=void 0,e.linksFrom=void 0,e.linksTo=void 0,e.options=void 0,e.series=void 0,e.scale=void 0,e.shapeArgs=void 0,e.toNode=void 0,e}return n(e,t),e.prototype.isValid=function(){return!0},e}(s);return r(a.prototype,{setState:t.setNodeState}),a}),o(e,"Series/ArcDiagram/ArcDiagramSeries.js",[e["Series/ArcDiagram/ArcDiagramPoint.js"],e["Series/Sankey/SankeyColumnComposition.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,o,i,n,s){var r,a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__rest||function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(t);ne.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(o[i[n]]=t[i[n]]);return o},p=n.prototype.symbols,h=i.seriesTypes,d=h.column,u=h.sankey,c=s.extend,f=s.merge,y=s.pick,m=s.relativeLength,g=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.nodeColumns=void 0,e.nodes=void 0,e.points=void 0,e}return a(i,t),i.prototype.createNodeColumns=function(){var t=this,o=this,i=o.chart,n=e.compose([],o);return n.sankeyColumn.maxLength=i.inverted?i.plotHeight:i.plotWidth,n.sankeyColumn.getTranslationFactor=function(e){for(var o,s,r,a=n.slice(),l=t.options.minLinkWidth||0,p=0,h=0,d=1,u=0,c=(i.plotSizeX||0)-(e.options.marker&&e.options.marker.lineWidth||0)-(n.length-1)*e.nodePadding;n.length;){for(p=c/n.sankeyColumn.sum(),o=!1,s=n.length;s--;){r=n[s].getSum()*p*d;var f=Math.min(i.plotHeight,i.plotWidth);r>f?d=Math.min(f/r,d):rf&&(c=(e=[f,c])[0],f=e[1]),l.reversed&&(c=(o=[f,c])[0],f=o[1],m=(s.plotSizeY||0)-m,g=-g),t.shapeType="path",t.linkBase=[c,c+p,f,f+p];var v=(f+p-c)/Math.abs(f+p-c)*y(l.linkRadius,Math.min(Math.abs(f+p-c)/2,i.nodeY-Math.abs(p)));t.shapeArgs={d:[["M",c,m],["A",(f+p-c)/2,v,0,0,1,f+p,m],["L",f,m],["A",(f-c-p)/2,v-p,0,0,0,c+p,m],["Z"]]},t.dlBox={x:c+(f-c)/2,y:m-v,height:p,width:0},t.tooltipPos=s.inverted?[(s.plotSizeY||0)-t.dlBox.y-p/2,(s.plotSizeX||0)-t.dlBox.x]:[t.dlBox.x,t.dlBox.y+p/2],t.y=t.plotY=1,t.x=t.plotX=1,t.color||(t.color=i.color)},i.prototype.translateNode=function(t,e){var o=this.translationFactor,i=this.chart,n=i.inverted?i.plotWidth:i.plotHeight,s=this.options,r=Math.min(i.plotWidth,i.plotHeight,n/t.series.nodes.length-this.nodePadding),a=t.getSum()*(e.sankeyColumn.scale||0),l=s.equalNodes?r:Math.max(a*o,this.options.minLinkWidth||0),h=Math.round(s.marker&&s.marker.lineWidth||0)%2/2,d=e.sankeyColumn.offset(t,o),c=Math.floor(y(d&&d.absoluteLeft,(e.sankeyColumn.left(o)||0)+(d&&d.relativeLeft||0)))+h,m=f(s.marker,t.options.marker),g=m.symbol,v=m.radius,k=parseInt(s.offset,10)*((i.inverted?i.plotWidth:i.plotHeight)-(Math.floor(this.colDistance*(t.column||0)+(m.lineWidth||0)/2)+h+(e.sankeyColumn.scale||0)*(e.sankeyColumn.maxRadius||0)/2))/100;if(t.sum=a,a){t.nodeX=c,t.nodeY=k;var b=t.options.width||s.width||l,S=t.options.height||s.height||l,x=k;s.reversed&&(x=(i.plotSizeY||0)-k,i.inverted&&(x=(i.plotSizeY||0)-k)),this.mapOptionsToLevel&&(t.dlOptions=u.getDLOptions({level:this.mapOptionsToLevel[t.level],optionsPoint:t.options})),t.plotX=1,t.plotY=1,t.tooltipPos=i.inverted?[(i.plotSizeY||0)-x-S/2,(i.plotSizeX||0)-c-b/2]:[c+b/2,x+S/2],t.shapeType="path",t.shapeArgs={d:p[g||"circle"](c,x-(v||S)/2,v||b,v||S),width:v||b,height:v||S},t.dlBox={x:c+b/2,y:x,height:0,width:0}}else t.dlOptions={enabled:!1}},i.prototype.drawDataLabels=function(){if(this.options.dataLabels){var t=this.options.dataLabels.textPath;d.prototype.drawDataLabels.call(this,this.nodes),this.options.dataLabels.textPath=this.options.dataLabels.linkTextPath,d.prototype.drawDataLabels.call(this,this.data),this.options.dataLabels.textPath=t}},i.prototype.pointAttribs=function(e,i){if(e&&e.isNode){var n=o.prototype.pointAttribs.apply(this,arguments);return n.opacity,l(n,["opacity"])}return t.prototype.pointAttribs.apply(this,arguments)},i.prototype.markerAttribs=function(e){return e.isNode?t.prototype.markerAttribs.apply(this,arguments):{}},i.defaultOptions=f(u.defaultOptions,{centeredLinks:!1,offset:"100%",equalNodes:!1,reversed:!1,dataLabels:{linkTextPath:{attributes:{startOffset:"25%"}}},marker:{symbol:"circle",fillOpacity:1,lineWidth:0,states:{}}}),i}(u);return c(g.prototype,{orderNodes:!1}),g.prototype.pointClass=t,i.registerSeriesType("arcdiagram",g),g}),o(e,"masters/modules/arc-diagram.src.js",[],function(){})});//# sourceMappingURL=arc-diagram.js.map