highcharts
Version:
JavaScript charting framework
13 lines • 18.9 kB
JavaScript
!/**
* Highcharts JS v12.6.0 (2026-04-13)
* @module highcharts/modules/sankey
* @requires highcharts
*
* Sankey diagram module
*
* (c) 2010-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.Point,t._Highcharts.Color,t._Highcharts.SVGElement):"function"==typeof define&&define.amd?define("highcharts/modules/sankey",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.Point,t.Color,t.SVGElement)}):"object"==typeof exports?exports["highcharts/modules/sankey"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Point,t._Highcharts.Color,t._Highcharts.SVGElement):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.Point,t.Highcharts.Color,t.Highcharts.SVGElement)}("u"<typeof window?this:window,(t,e,o,i,n)=>(()=>{"use strict";var s,r,l={28:t=>{t.exports=n},260:t=>{t.exports=o},512:t=>{t.exports=e},620:t=>{t.exports=i},944:e=>{e.exports=t}},a={};function h(t){var e=a[t];if(void 0!==e)return e.exports;var o=a[t]={exports:{}};return l[t](o,o.exports,h),o.exports}h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var o in e)h.o(e,o)&&!h.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var d={};h.d(d,{default:()=>tt});var p=h(944),c=h.n(p),u=h(512),f=h.n(u);let{doc:m,win:g}=c();function y(t,e,o,i={}){let n="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let s=n.hcEvents;c().Point&&t instanceof c().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let r=t.addEventListener;r&&r.call(t,e,o,!!c().supportsPassiveEvents&&{passive:void 0===i.passive?-1!==e.indexOf("touch"):i.passive,capture:!1}),s[e]||(s[e]=[]);let l={fn:o,order:"number"==typeof i.order?i.order:1/0};return s[e].push(l),s[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,o){function i(e,o){let i=t.removeEventListener;i&&i.call(t,e,o,!1)}function n(o){let n,s;t.nodeName&&(e?(n={})[e]=!0:n=o,S(n,function(t,e){if(o[e])for(s=o[e].length;s--;)i(e,o[e][s].fn)}))}let s="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(s,"hcEvents")){let t=s.hcEvents;if(e){let s=t[e]||[];o?(t[e]=s.filter(function(t){return o!==t.fn}),i(e,o)):(n(t),t[e]=[])}else n(t),delete s.hcEvents}}(t,e,o)}}function v(t,e=0,o){let i=e%2/2,n=o?-1:1;return(Math.round(t*n-i)+i)*n}function b(t){return null!=t}function x(t,e){let o;for(o in t||(t={}),e)t[o]=e[o];return t}let k=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let o,i=t.length;for(o=0;o<i;o++)if(e(t[o],o))return t[o]};function N(t){return L(t)&&"number"==typeof t.nodeType}function C(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function P(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function L(t,e){return!!t&&"object"==typeof t&&(!e||!P(t))}function T(t,...e){let o,i=[t,...e],n={},s=function(t,e){return"object"!=typeof t&&(t={}),S(e,function(o,i){if("__proto__"!==i&&"constructor"!==i){let n;!L(o,!0)||(n=o?.constructor,L(o,!0)&&!N(o)&&n?.name&&"Object"!==n.name)||N(o)?t[i]=e[i]:t[i]=s(t[i]||{},o)}}),t};!0===t&&(n=i[1],i=Array.prototype.slice.call(i,2));let r=i.length;for(o=0;o<r;o++)n=s(n,i[o]);return n}function S(t,e,o){for(let i in t)Object.hasOwnProperty.call(t,i)&&e.call(o||t[i],t[i],i,t)}function O(){let t=arguments,e=t.length;for(let o=0;o<e;o++){let e=t[o];if(null!=e)return e}}function w(t,e,o){return/%$/.test(t)?e*parseFloat(t)/100+(o||0):parseFloat(t)}let{series:{prototype:M,prototype:{pointClass:{prototype:F}}}}=f();!function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),M.destroy.apply(this,arguments)}function o(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),M.setData.apply(this,arguments)}function i(t){let e=arguments,o=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&o.forEach(t=>{t&&t.series&&(F.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&F.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&F.setState.apply(t.toNode,e)))}),F.setState.apply(this,e)}function n(t,e,o,i){let n=this.series.options.nodes,s=this.series.options.data,r=s?.length||0,l=s?.[this.index];if(F.update.call(this,t,!this.isNode&&e,o,i),this.isNode){let t=(n||[]).reduce((t,e,o)=>this.id===e.id?o:t,-1),i=T(n&&n[t]||{},s?.[this.index]||{});s&&(l?s[this.index]=l:s.length=r),n?t>=0?n[t]=i:n.push(i):this.series.options.nodes=[i],O(e,!0)&&this.series.chart.redraw(o)}}t.compose=function(t,s){let r=t.prototype,l=s.prototype;return r.setNodeState=i,r.setState=i,r.update=n,l.destroy=e,l.setData=o,s},t.createNode=function(t){let e=this.pointClass,o=(t,e)=>k(t,t=>t.id===e),i=o(this.nodes,t),n;if(!i){n=this.options.nodes&&o(this.options.nodes,t);let s=new e(this,x({className:"highcharts-node",isNode:!0,id:t,y:1},n));s.linksTo=[],s.linksFrom=[],s.getSum=function(){let t=0,e=0;return s.linksTo.forEach(e=>{t+=e.weight||0}),s.linksFrom.forEach(t=>{e+=t.weight||0}),Math.max(t,e)},s.offset=function(t,e){let o=0;for(let i=0;i<s[e].length;i++){if(s[e][i]===t)return o;o+=s[e][i].weight}},s.hasShape=function(){let t=0;return s.linksTo.forEach(e=>{e.outgoing&&t++}),!s.linksTo.length||t!==s.linksTo.length},s.index=this.nodes.push(s)-1,i=s}return i.formatPrefix="node",i.name=i.name||i.options.id||"",i.mass=O(i.options.mass,i.options.marker&&i.options.marker.radius,this.options.marker&&this.options.marker.radius,4),i},t.destroy=e,t.generatePoints=function(){let t=this.chart,e={};M.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(t=>{t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(o=>{b(o.from)&&(e[o.from]||(e[o.from]=this.createNode(o.from)),e[o.from].linksFrom.push(o),o.fromNode=e[o.from],t.styledMode?o.colorIndex=O(o.options.colorIndex,e[o.from].colorIndex):o.color=o.options.color||e[o.from].color),b(o.to)&&(e[o.to]||(e[o.to]=this.createNode(o.to)),e[o.to].linksTo.push(o),o.toNode=e[o.to]),o.name=o.name||o.id},this),this.nodeLookup=e},t.setNodeState=i,t.updateNode=n}(s||(s={}));let I=s;var W=h(260),E=h.n(W);let{column:H}=f().seriesTypes;class z extends H.prototype.pointClass{applyOptions(t,e){return E().prototype.applyOptions.call(this,t,e),b(this.options.level)&&(this.options.column=this.column=this.options.level),this}getClassName(){return(this.isNode?"highcharts-node ":"highcharts-link ")+E().prototype.getClassName.call(this)}getFromNode(){let t=-1,e;for(let o=0;o<this.linksTo.length;o++){let i=this.linksTo[o];i.fromNode.column>t&&i.fromNode!==this&&(t=(e=i.fromNode).column)}return{fromNode:e,fromColumn:t}}setNodeColumn(){b(this.options.column)||(0===this.linksTo.length?this.column=0:this.column=this.getFromNode().fromColumn+1)}isValid(){return this.isNode||"number"==typeof this.weight}}var A=r||(r={});A.compose=function(t,e){return t.sankeyColumn=new D(t,e),t};class D{constructor(t,e){this.points=t,this.series=e}getTranslationFactor(t){let e=this.points,o=e.slice(),i=t.chart,n=t.options.minLinkWidth||0,s,r=0,l,a=(i.plotSizeY||0)-(t.options.borderWidth||0)-(e.length-1)*t.nodePadding;for(;e.length;){for(r=a/e.sankeyColumn.sum(),s=!1,l=e.length;l--;)e[l].getSum()*r<n&&(e.splice(l,1),a=Math.max(0,a-n),s=!0);if(!s)break}for(let t of(e.length=0,o))e.push(t);return r}top(t){let e=this.series,o=e.nodePadding,i=this.points.reduce((i,n)=>(i>0&&(i+=o),i+=Math.max(n.getSum()*t,e.options.minLinkWidth||0)),0);return((t="")=>({center:.5,right:1,middle:.5,bottom:1})[t]||0)(e.options.nodeAlignment||"center")*((e.chart.plotSizeY||0)-i)}left(t){let e=this.series,o=e.chart,i=e.options.equalNodes,n=o.inverted?o.plotHeight:o.plotWidth,s=e.nodePadding,r=this.points.reduce((o,r)=>(o>0&&(o+=s),o+=i?n/r.series.nodes.length-s:Math.max(r.getSum()*t,e.options.minLinkWidth||0)),0);return((o.plotSizeX||0)-Math.round(r))/2}sum(){return this.points.reduce((t,e)=>t+e.getSum(),0)}offset(t,e){let o=this.points,i=this.series,n=i.nodePadding,s=0,r;if(i.is("organization")&&t.hangsFrom)return{absoluteTop:t.hangsFrom.nodeY};for(let l=0;l<o.length;l++){let a=o[l].getSum(),h=Math.max(a*e,i.options.minLinkWidth||0),d=t.options[i.chart.inverted?"offsetHorizontal":"offsetVertical"],p=t.options.offset||0;if(r=a?h+n:0,o[l]===t)return{relativeTop:s+(b(d)?w(d,h):w(p,r))};s+=r}}}A.SankeyColumnAdditions=D;let _=r;var j=h(620),B=h.n(j),Y=h(28),R=h.n(Y);let{deg2rad:X}=c();function V(t,e){e=T(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let o=this.renderer.url,i=this.text||this,n=i.textPath,{attributes:s,enabled:r}=e;if(t=t||n&&n.path,n&&n.undo(),t&&r){let e=y(i,"afterModifyTree",e=>{if(t&&r){let n=t.attr("id");n||t.attr("id",n=(0,p.uniqueKey)());let r={x:0,y:0};b(s.dx)&&(r.dx=s.dx,delete s.dx),b(s.dy)&&(r.dy=s.dy,delete s.dy),i.attr(r),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let l=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:x(s,{"text-anchor":s.textAnchor,href:`${o}#${n}`}),children:l}}});i.textPath={path:t,undo:e}}else i.attr({dx:0,dy:0}),delete i.textPath;return this.added&&(i.textCache="",this.renderer.buildText(i)),this}function G(t){let e=t.bBox,o=this.element?.querySelector("textPath");if(o){let t=[],{b:i,h:n}=this.renderer.fontMetrics(this.element),s=n-i,r=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),l=o.innerHTML.replace(r,"").split(/<tspan class="highcharts-br"[^>]*>/),a=l.length,h=(t,e)=>{let{x:n,y:r}=e,l=(o.getRotationOfChar(t)-90)*X,a=Math.cos(l),h=Math.sin(l);return[[n-s*a,r-s*h],[n+i*a,r+i*h]]};for(let e=0,i=0;i<a;i++){let n=l[i].length;for(let s=0;s<n;s+=5)try{let n=e+s+i,[r,l]=h(n,o.getStartPositionOfChar(n));0===s?(t.push(l),t.push(r)):(0===i&&t.unshift(l),i===a-1&&t.push(r))}catch{break}e+=n-1;try{let n=e+i,s=o.getEndPositionOfChar(n),[r,l]=h(n,s);t.unshift(l),t.unshift(r)}catch{break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function $(t){let e=t.labelOptions,o=t.point,i=e[o.formatPrefix+"TextPath"]||e.textPath;i&&!e.useHTML&&(this.setTextPath(o.getDataLabelPath?.(this)||o.graphic,i),o.dataLabelPath&&!i.enabled&&(o.dataLabelPath=o.dataLabelPath.destroy()))}let{column:q,line:Z}=f().seriesTypes,{parse:K}=B(),{getLevelOptions:J,getNodeWidth:Q}={getColor:function(t,e){let o,i,n,s,r,l,a=e.index,h=e.mapOptionsToLevel,d=e.parentColor,p=e.parentColorIndex,c=e.series,u=e.colors,f=e.siblings,m=c.points,g=c.chart.options.chart;if(t){let y;o=m[t.i],i=h[t.level]||{},o&&i.colorByPoint&&(s=o.index%(u?u.length:g.colorCount),n=u&&u[s]),c.chart.styledMode||(r=O(o&&o.options.color,i&&i.color,n,d&&((y=i&&i.colorVariation)&&"brightness"===y.key&&a&&f?B().parse(d).brighten(y.to*(a/f)).get():d),c.color)),l=O(o&&o.options.colorIndex,i&&i.colorIndex,s,p,e.colorIndex)}return{color:r,colorIndex:l}},getLevelOptions:function(t){let e,o,i,n,s,r,l={};if(L(t))for(n=C(t.from)?t.from:1,r=t.levels,o={},e=L(t.defaults)?t.defaults:{},P(r)&&(o=r.reduce((t,o)=>{let i,s,r;return L(o)&&C(o.level)&&(s=O((r=T({},o)).levelIsConstant,e.levelIsConstant),delete r.levelIsConstant,delete r.level,L(t[i=o.level+(s?0:n-1)])?T(!0,t[i],r):t[i]=r),t},{})),s=C(t.to)?t.to:1,i=0;i<=s;i++)l[i]=T({},e,L(o[i])?o[i]:{});return l},getNodeWidth:function(t,e){let{chart:o,options:i}=t,{nodeDistance:n=0,nodeWidth:s=0}=i,{plotSizeX:r=1}=o;if("auto"===s){if("string"==typeof n&&/%$/.test(n))return r/(e+parseFloat(n)/100*(e-1));let t=Number(n);return(r+t)/(e||1)-t}return w(s,r)},setTreeValues:function t(e,o){let i=o.before,n=o.idRoot,s=o.mapIdToNode[n],r=!1!==o.levelIsConstant,l=o.points[e.i],a=l&&l.options||{},h=[],d=0;e.levelDynamic=e.level-(r?0:s.level),e.name=O(l&&l.name,""),e.visible=n===e.id||!0===o.visible,"function"==typeof i&&(e=i(e,o)),e.children.forEach((i,n)=>{let s=x({},o);x(s,{index:n,siblings:e.children.length,visible:e.visible}),i=t(i,s),h.push(i),i.visible&&(d+=i.val)});let p=O(a.value,d);return e.visible=p>=0&&(d>0||e.visible),e.children=h,e.childrenTotal=d,e.isLeaf=e.visible&&!d,e.val=p,e},updateRootId:function(t){let e,o;return L(t)&&(o=L(t.options)?t.options:{},e=O(t.rootNode,o.rootId,""),L(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}};({compose:function(t){y(t,"afterGetBBox",G),y(t,"beforeAddingDataLabel",$);let e=t.prototype;e.setTextPath||(e.setTextPath=V)}}).compose(R());class U extends q{static getDLOptions(t){let e=L(t.optionsPoint)?t.optionsPoint.dataLabels:{},o=L(t.level)?t.level.dataLabels:{};return T({style:{}},o,e,{zIndex:o?.zIndex})}createNodeColumns(){let t=[];for(let e of this.nodes)e.setNodeColumn(),t[e.column]||(t[e.column]=_.compose([],this)),t[e.column].push(e);for(let e=0;e<t.length;e++)void 0===t[e]&&(t[e]=_.compose([],this));return t}order(t,e){if(void 0===t.level)for(let o of(t.level=e,t.linksFrom))o.toNode&&this.order(o.toNode,e+1)}generatePoints(){if(I.generatePoints.apply(this,arguments),this.orderNodes){for(let t of this.nodes)0===t.linksTo.length&&this.order(t,0);!function(t,e){let o,i,n=t.length;for(i=0;i<n;i++)t[i].safeI=i;for(t.sort(function(t,i){return 0===(o=e(t,i))?t.safeI-i.safeI:o}),i=0;i<n;i++)delete t[i].safeI}(this.nodes,(t,e)=>t.level-e.level)}}getNodePadding(){let t=this.options.nodePadding||0;if(this.nodeColumns){let e=this.nodeColumns.reduce((t,e)=>Math.max(t,e.length),0);e*t>this.chart.plotSizeY&&(t=this.chart.plotSizeY/e)}return t}hasData(){return!!this.dataTable.rowCount}pointAttribs(t,e){if(!t)return{};let o=this,i=t.isNode?t.level:t.fromNode.level,n=o.mapOptionsToLevel[i||0]||{},s=t.options,r=n.states&&n.states[e||""]||{},l=["colorByPoint","borderColor","borderWidth","linkOpacity","opacity"].reduce((t,e)=>(t[e]=O(r[e],s[e],n[e],o.options[e]),t),{}),a=O(r.color,s.color,l.colorByPoint?t.color:n.color);return t.isNode?{fill:a,stroke:l.borderColor,"stroke-width":l.borderWidth,opacity:l.opacity}:{fill:a,"fill-opacity":l.linkOpacity}}drawTracker(){q.prototype.drawTracker.call(this,this.points),q.prototype.drawTracker.call(this,this.nodes)}drawPoints(){q.prototype.drawPoints.call(this,this.points),q.prototype.drawPoints.call(this,this.nodes)}drawDataLabels(){q.prototype.drawDataLabels.call(this,this.points),q.prototype.drawDataLabels.call(this,this.nodes)}translate(){this.generatePoints(),this.nodeColumns=this.createNodeColumns();let t=this,e=this.chart,o=this.options,i=this.nodeColumns,n=i.length;for(let s of(this.nodeWidth=Q(this,n),this.nodePadding=this.getNodePadding(),this.translationFactor=i.reduce((e,o)=>Math.min(e,o.sankeyColumn.getTranslationFactor(t)),1/0),this.colDistance=(e.plotSizeX-this.nodeWidth-o.borderWidth)/Math.max(1,i.length-1),t.mapOptionsToLevel=J({from:1,levels:o.levels,to:i.length-1,defaults:{borderColor:o.borderColor,borderRadius:o.borderRadius,borderWidth:o.borderWidth,color:t.color,colorByPoint:o.colorByPoint,levelIsConstant:!0,linkColor:o.linkColor,linkLineWidth:o.linkLineWidth,linkOpacity:o.linkOpacity,states:o.states}}),i))for(let e of s)t.translateNode(e,s);for(let e of this.nodes)for(let o of e.linksFrom)(o.weight||o.isNull)&&o.to&&(t.translateLink(o),o.allowShadow=!1)}translateLink(t){let e=(e,o)=>{let i=e.offset(t,o)*r;return Math.min(e.nodeY+i,e.nodeY+(e.shapeArgs&&e.shapeArgs.height||0)-u)},o=t.fromNode,i=t.toNode,n=this.chart,{inverted:s}=n,r=this.translationFactor,l=this.options,a=O(t.linkColorMode,l.linkColorMode),h=(n.inverted?-this.colDistance:this.colDistance)*l.curveFactor,d=o.nodeX,p=i.nodeX,c=t.outgoing,u=Math.max(t.weight*r,this.options.minLinkWidth),f=e(o,"linksFrom"),m=e(i,"linksTo"),g=this.nodeWidth,y=p>d+g;if(n.inverted&&(f=n.plotSizeY-f,m=(n.plotSizeY||0)-m,g=-g,u=-u,y=d>p),t.shapeType="path",t.linkBase=[f,f+u,m,m+u],y&&"number"==typeof m)t.shapeArgs={d:[["M",d+g,f],["C",d+g+h,f,p-h,m,p,m],["L",p+(c?g:0),m+u/2],["L",p,m+u],["C",p-h,m+u,d+g+h,f+u,d+g,f+u],["Z"]]};else if("number"==typeof m){let e=n.plotHeight-f-u,o=p-20-u,i=p-20,s=d+g,r=s+20,l=r+u,a=f,h=f+u,c=h+20,y=c+e,v=y+20,b=v+u,x=m,k=x+u,N=k+20,C=h-.7*u,P=v+.7*u,L=k-.7*u,T=p-.7*u,S=s+.7*u;t.shapeArgs={d:[["M",s,a],["C",S,a,l,C,l,c],["L",l,y],["C",l,P,S,b,s,b],["L",p,b],["C",T,b,o,P,o,y],["L",o,N],["C",o,L,T,x,p,x],["L",p,k],["C",i,k,i,k,i,N],["L",i,y],["C",i,v,i,v,p,v],["L",s,v],["C",r,v,r,v,r,y],["L",r,c],["C",r,h,r,h,s,h],["Z"]]}}if(t.dlBox={x:d+(p-d+g)/2,y:f+(m-f)/2,height:u,width:0},t.tooltipPos=n.inverted?[n.plotSizeY-t.dlBox.y-u/2,n.plotSizeX-t.dlBox.x]:[t.dlBox.x,t.dlBox.y+u/2],t.y=t.plotY=1,t.x=t.plotX=1,!t.options.color){if("from"===a)t.color=o.color;else if("to"===a)t.color=i.color;else if("gradient"===a){let e=K(o.color).get(),n=K(i.color).get();t.color={linearGradient:{x1:1,x2:0,y1:0,y2:0},stops:[[0,s?e:n],[1,s?n:e]]}}}}translateNode(t,e){let o=this.translationFactor,i=this.chart,n=this.options,{borderRadius:s,borderWidth:r=0}=n,l=t.getSum(),a=Math.max(Math.round(l*o),this.options.minLinkWidth),h=Math.round(this.nodeWidth),d=e.sankeyColumn.offset(t,o),p=v(O(d.absoluteTop,e.sankeyColumn.top(o)+d.relativeTop),r),c=v(this.colDistance*t.column+r/2,r)+w(t.options[i.inverted?"offsetVertical":"offsetHorizontal"]||0,h),u=i.inverted?i.plotSizeX-c:c;if(t.sum=l,l){var f,m;t.shapeType="roundedRect",t.nodeX=u,t.nodeY=p;let e=u,o=p,r=t.options.width||n.width||h,l=t.options.height||n.height||a,d=(f=w("object"==typeof s?s.radius:s||0,r),m=a/2,f>0?f<m?f:m:0);i.inverted&&(e=u-h,o=i.plotSizeY-p-a,r=t.options.height||n.height||h,l=t.options.width||n.width||a),t.dlOptions={...U.getDLOptions({level:this.mapOptionsToLevel[t.level],optionsPoint:t.options}),zIndex:void 0},t.plotX=1,t.plotY=1,t.tooltipPos=i.inverted?[i.plotSizeY-o-l/2,i.plotSizeX-e-r/2]:[e+r/2,o+l/2],t.shapeArgs={x:e,y:o,width:r,height:l,r:d,display:t.hasShape()?"":"none"}}else t.dlOptions={enabled:!1}}}U.defaultOptions=T(q.defaultOptions,{borderWidth:0,colorByPoint:!0,curveFactor:.33,dataLabels:{enabled:!0,backgroundColor:"none",crop:!1,nodeFormat:void 0,nodeFormatter:function(){return this.point.name},format:void 0,formatter:function(){},inside:!0},inactiveOtherPoints:!0,linkColorMode:"from",linkOpacity:.5,opacity:1,minLinkWidth:0,nodeAlignment:"center",nodeWidth:20,nodePadding:10,nodeDistance:30,showInLegend:!1,states:{hover:{linkOpacity:1,opacity:1},inactive:{linkOpacity:.1,opacity:.1,animation:{duration:50}}},tooltip:{followPointer:!0,headerFormat:'<span style="font-size: 0.8em">{series.name}</span><br/>',pointFormat:"{point.fromNode.name} → {point.toNode.name}: <b>{point.weight}</b><br/>",nodeFormat:"{point.name}: <b>{point.sum}</b><br/>"}}),I.compose(z,U),x(U.prototype,{animate:Z.prototype.animate,createNode:I.createNode,forceDL:!0,invertible:!0,isCartesian:!1,orderNodes:!0,noSharedTooltip:!0,pointArrayMap:["from","to","weight"],pointClass:z,searchPoint:c().noop}),f().registerSeriesType("sankey",U);let tt=c();return d.default})());