!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/networkgraph
 * @requires highcharts
 *
 * Force directed graph 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.SVGElement,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/networkgraph",["highcharts/highcharts"],function(t){return e(t,t.SVGElement,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/networkgraph"]=e(t._Highcharts,t._Highcharts.SVGElement,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SVGElement,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e,o){return function(){"use strict";var i,r,s,n={28:function(t){t.exports=e},512:function(t){t.exports=o},944:function(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 n[t](o,o.exports,h),o.exports}h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(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=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var p={};h.d(p,{default:function(){return tb}});var l=h(944),c=h.n(l),u=h(28),d=h.n(u),f=function(t,e,o){if(o||2==arguments.length)for(var i,r=0,s=e.length;r<s;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},y=c().doc;function v(t,e,o,i){void 0===i&&(i={});var r="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});var s=r.hcEvents;c().Point&&t instanceof c().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var n=t.addEventListener;n&&n.call(t,e,o,!!c().supportsPassiveEvents&&{passive:void 0===i.passive?-1!==e.indexOf("touch"):i.passive,capture:!1}),s[e]||(s[e]=[]);var a={fn:o,order:"number"==typeof i.order?i.order:1/0};return s[e].push(a),s[e].sort(function(t,e){return t.order-e.order}),function(){!function(t,e,o){function i(e,o){var i=t.removeEventListener;i&&i.call(t,e,o,!1)}function r(o){var r,s;t.nodeName&&(e?(r={})[e]=!0:r=o,P(r,function(t,e){if(o[e])for(s=o[e].length;s--;)i(e,o[e][s].fn)}))}var s="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(s,"hcEvents")){var n=s.hcEvents;if(e){var a=n[e]||[];o?(n[e]=a.filter(function(t){return o!==t.fn}),i(e,o)):(r(n),n[e]=[])}else r(n),delete s.hcEvents}}(t,e,o)}}function m(t){return null!=t}function g(t,e){var o;for(o in t||(t={}),e)t[o]=e[o];return t}c().win;var b=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var o,i=t.length;for(o=0;o<i;o++)if(e(t[o],o))return t[o]};function x(t){return k(t)&&"number"==typeof t.nodeType}function k(t,e){var o;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(o=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==o)}function N(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];var i,r=f([t],e,!0),s={},n=function(t,e){return"object"!=typeof t&&(t={}),P(e,function(o,i){if("__proto__"!==i&&"constructor"!==i){var r;!k(o,!0)||(r=null==o?void 0:o.constructor,k(o,!0)&&!x(o)&&(null==r?void 0:r.name)&&"Object"!==r.name)||x(o)?t[i]=e[i]:t[i]=n(t[i]||{},o)}}),t};!0===t&&(s=r[1],r=Array.prototype.slice.call(r,2));var a=r.length;for(i=0;i<a;i++)s=n(s,r[i]);return s}function P(t,e,o){for(var i in t)Object.hasOwnProperty.call(t,i)&&e.call(o||t[i],t[i],i,t)}function L(){for(var t=arguments,e=t.length,o=0;o<e;o++){var i=t[o];if(null!=i)return i}}function w(t,e){return 0>t.indexOf(e)&&!!t.push(e)}var S=c().composed;function E(){var t,e,o,i,r=this;r.container&&(t=v(r.container,"mousedown",function(t){e&&e(),o&&o(),(i=r.hoverPoint)&&i.series&&i.series.hasDraggableNodes&&i.series.options.draggable&&(i.series.onMouseDown(i,t),e=v(r.container,"mousemove",function(t){return i&&i.series&&i.series.onMouseMove(i,t)}),o=v(r.container.ownerDocument,"mouseup",function(t){return e(),o(),i&&i.series&&i.series.onMouseUp(i,t)}))})),v(r,"destroy",function(){t()})}var M={compose:function(t){w(S,"DragNodes")&&v(t,"load",E)},onMouseDown:function(t,e){var o,i=this.chart.options.chart.panKey;if(!(i&&e[""+i+"Key"])){var r=(null==(o=this.chart.pointer)?void 0:o.normalize(e))||e;t.fixedPosition={chartX:r.chartX,chartY:r.chartY,plotX:t.plotX,plotY:t.plotY},t.inDragMode=!0}},onMouseMove:function(t,e){var o;if(t.fixedPosition&&t.inDragMode){var i=this.chart,r=(null==(o=i.pointer)?void 0:o.normalize(e))||e,s=t.fixedPosition.chartX-r.chartX,n=t.fixedPosition.chartY-r.chartY,a=i.graphLayoutsLookup,h=void 0,p=void 0;(Math.abs(s)>5||Math.abs(n)>5)&&(h=t.fixedPosition.plotX-s,p=t.fixedPosition.plotY-n,i.isInsidePlot(h,p)&&(t.plotX=h,t.plotY=p,t.hasDragged=!0,this.redrawHalo(t),a.forEach(function(t){t.restartSimulation()})))}},onMouseUp:function(t){t.fixedPosition&&(t.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),t.inDragMode=t.hasDragged=!1,this.options.fixedDraggable||delete t.fixedPosition)},redrawHalo:function(t){t&&this.halo&&this.halo.attr({d:t.haloPath(this.options.states.hover.halo.size)})}},T=c().setAnimation,X=c().composed;function Y(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(t){t.updateSimulation()}),this.redraw())}function D(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(t){t.updateSimulation(!1)}),this.redraw())}function O(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(t){t.stop()})}function F(){var t,e,o=!1,i=function(t){t.maxIterations--&&isFinite(t.temperature)&&!t.isStable()&&!t.enableSimulation&&(t.beforeStep&&t.beforeStep(),t.step(),e=!1,o=!0)};if(this.graphLayoutsLookup&&!(null==(t=this.pointer)?void 0:t.hasDragged)){for(T(!1,this),this.graphLayoutsLookup.forEach(function(t){return t.start()});!e;)e=!0,this.graphLayoutsLookup.forEach(i);o&&this.series.forEach(function(t){t&&t.layout&&t.render()})}}var A=function(t){w(X,"GraphLayout")&&(v(t,"afterPrint",Y),v(t,"beforePrint",D),v(t,"predraw",O),v(t,"render",F))},C={},I={},_=h(512),j=h.n(_),R=j().series,H=R.prototype,B=R.prototype.pointClass.prototype;!function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),H.destroy.apply(this,arguments)}function o(){this.nodes&&(this.nodes.forEach(function(t){t.destroy()}),this.nodes.length=0),H.setData.apply(this,arguments)}function i(t){var e=arguments,o=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&o.forEach(function(t){t&&t.series&&(B.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&B.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&B.setState.apply(t.toNode,e)))}),B.setState.apply(this,e)}function r(t,e,o,i){var r=this,s=this.series.options.nodes,n=this.series.options.data,a=(null==n?void 0:n.length)||0,h=null==n?void 0:n[this.index];if(B.update.call(this,t,!this.isNode&&e,o,i),this.isNode){var p=(s||[]).reduce(function(t,e,o){return r.id===e.id?o:t},-1),l=N(s&&s[p]||{},(null==n?void 0:n[this.index])||{});n&&(h?n[this.index]=h:n.length=a),s?p>=0?s[p]=l:s.push(l):this.series.options.nodes=[l],L(e,!0)&&this.series.chart.redraw(o)}}t.compose=function(t,s){var n=t.prototype,a=s.prototype;return n.setNodeState=i,n.setState=i,n.update=r,a.destroy=e,a.setData=o,s},t.createNode=function(t){var e,o=this.pointClass,i=function(t,e){return b(t,function(t){return t.id===e})},r=i(this.nodes,t);if(!r){e=this.options.nodes&&i(this.options.nodes,t);var s=new o(this,g({className:"highcharts-node",isNode:!0,id:t,y:1},e));s.linksTo=[],s.linksFrom=[],s.getSum=function(){var t=0,e=0;return s.linksTo.forEach(function(e){t+=e.weight||0}),s.linksFrom.forEach(function(t){e+=t.weight||0}),Math.max(t,e)},s.offset=function(t,e){for(var o=0,i=0;i<s[e].length;i++){if(s[e][i]===t)return o;o+=s[e][i].weight}},s.hasShape=function(){var t=0;return s.linksTo.forEach(function(e){e.outgoing&&t++}),!s.linksTo.length||t!==s.linksTo.length},s.index=this.nodes.push(s)-1,r=s}return r.formatPrefix="node",r.name=r.name||r.options.id||"",r.mass=L(r.options.mass,r.options.marker&&r.options.marker.radius,this.options.marker&&this.options.marker.radius,4),r},t.destroy=e,t.generatePoints=function(){var t=this,e=this.chart,o={};H.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(function(t){t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(function(i){m(i.from)&&(o[i.from]||(o[i.from]=t.createNode(i.from)),o[i.from].linksFrom.push(i),i.fromNode=o[i.from],e.styledMode?i.colorIndex=L(i.options.colorIndex,o[i.from].colorIndex):i.color=i.options.color||o[i.from].color),m(i.to)&&(o[i.to]||(o[i.to]=t.createNode(i.to)),o[i.to].linksTo.push(i),i.toNode=o[i.to]),i.name=i.name||i.id},this),this.nodeLookup=o},t.setNodeState=i,t.updateNode=r}(s||(s={}));var G=s,q=(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)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),K=j().series,z=K.prototype,U=K.prototype.pointClass,V=function(t){function e(e,o,i){var r=t.call(this,e,o,i)||this;return r.series.options.draggable&&!r.series.chart.styledMode&&(v(r,"mouseOver",function(){var t;t=this.series.chart.container,g(t.style,{cursor:"move"})}),v(r,"mouseOut",function(){var t;t=this.series.chart.container,g(t.style,{cursor:"default"})})),r}return q(e,t),e.prototype.destroy=function(){return this.isNode&&this.linksFrom.concat(this.linksTo).forEach(function(t){t.destroyElements&&t.destroyElements()}),this.series.layout.removeElementFromCollection(this,this.series.layout[this.isNode?"nodes":"links"]),U.prototype.destroy.apply(this,arguments)},e.prototype.getDegree=function(){var t=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===t?1:t},e.prototype.getLinkAttributes=function(){var t=this.series.options.link,e=this.options;return{"stroke-width":L(e.width,t.width),stroke:e.color||t.color,dashstyle:e.dashStyle||t.dashStyle,opacity:L(e.opacity,t.opacity,1)}},e.prototype.getLinkPath=function(){var t=this.fromNode,e=this.toNode;return t.plotX>e.plotX&&(t=this.toNode,e=this.fromNode),[["M",t.plotX||0,t.plotY||0],["L",e.plotX||0,e.plotY||0]]},e.prototype.getMass=function(){var t=this.fromNode.mass,e=this.toNode.mass,o=t+e;return{fromNode:1-t/o,toNode:1-e/o}},e.prototype.isValid=function(){return!this.isNode||m(this.id)},e.prototype.redrawLink=function(){var t,e=this.getLinkPath();if(this.graphic){this.shapeArgs={d:e},this.series.chart.styledMode||(t=this.series.pointAttribs(this),this.graphic.attr(t),(this.dataLabels||[]).forEach(function(e){e&&e.attr({opacity:t.opacity})})),this.graphic.animate(this.shapeArgs);var o=e[0],i=e[1];"M"===o[0]&&"L"===i[0]&&(this.plotX=(o[1]+i[1])/2,this.plotY=(o[2]+i[2])/2)}},e.prototype.remove=function(t,e){var o,i=this.series,r=i.options.nodes||[],s=r.length;if(this.isNode){for(i.points=[],[].concat(this.linksFrom).concat(this.linksTo).forEach(function(t){(o=t.fromNode.linksFrom.indexOf(t))>-1&&t.fromNode.linksFrom.splice(o,1),(o=t.toNode.linksTo.indexOf(t))>-1&&t.toNode.linksTo.splice(o,1),z.removePoint.call(i,i.data.indexOf(t),!1,!1)}),i.points=i.data.slice(),i.nodes.splice(i.nodes.indexOf(this),1);s--;)if(r[s].id===this.options.id){i.options.nodes.splice(s,1);break}this&&this.destroy(),i.isDirty=!0,i.isDirtyData=!0,t&&i.chart.redraw(t)}else i.removePoint(i.data.indexOf(this),t,e)},e.prototype.renderLink=function(){var t;!this.graphic&&(this.graphic=this.series.chart.renderer.path(this.getLinkPath()).addClass(this.getClassName(),!0).add(this.series.group),this.series.chart.styledMode||(t=this.series.pointAttribs(this),this.graphic.attr(t),(this.dataLabels||[]).forEach(function(e){e&&e.attr({opacity:t.opacity})})))},e}(U);g(V.prototype,{setState:G.setNodeState});var Q={stickyTracking:!1,inactiveOtherPoints:!0,marker:{enabled:!0,states:{inactive:{opacity:.3,animation:{duration:50}}}},states:{inactive:{linkOpacity:.3,animation:{duration:50}}},dataLabels:{formatter:function(){var t;return String(null!=(t=this.key)?t:"")},linkFormatter:function(){return this.fromNode.name+"<br>"+this.toNode.name},linkTextPath:{enabled:!0},textPath:{enabled:!1},style:{transition:"opacity 2000ms"},defer:!0,animation:{defer:1e3}},link:{color:"rgba(100, 100, 100, 0.5)",width:1},draggable:!0,layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:1,enableSimulation:!1,theta:.5,maxSpeed:10,approximation:"none",type:"reingold-fruchterman",integration:"euler",maxIterations:1e3,gravitationalConstant:.0625,friction:-.981},showInLegend:!1},W={attractive:function(t,e,o,i){var r=t.getMass(),s=o.x/i*e,n=o.y/i*e;t.fromNode.fixedPosition||(t.fromNode.dispX-=s*r.fromNode/t.fromNode.degree,t.fromNode.dispY-=n*r.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.dispX+=s*r.toNode/t.toNode.degree,t.toNode.dispY+=n*r.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return t*t/e},barycenter:function(){var t=this.options.gravitationalConstant,e=this.barycenter.xFactor,o=this.barycenter.yFactor;this.nodes.forEach(function(i){if(!i.fixedPosition){var r=i.getDegree(),s=r*(1+r/2);i.dispX+=(e-i.plotX)*t*s/i.degree,i.dispY+=(o-i.plotY)*t*s/i.degree}})},getK:function(t){return Math.pow(t.box.width*t.box.height/t.nodes.length,.3)},integrate:function(t,e){e.dispX+=e.dispX*t.options.friction,e.dispY+=e.dispY*t.options.friction;var o=e.temperature=t.vectorLength({x:e.dispX,y:e.dispY});0!==o&&(e.plotX+=e.dispX/o*Math.min(Math.abs(e.dispX),t.temperature),e.plotY+=e.dispY/o*Math.min(Math.abs(e.dispY),t.temperature))},repulsive:function(t,e,o,i){t.dispX+=o.x/i*e/t.degree,t.dispY+=o.y/i*e/t.degree},repulsiveForceFunction:function(t,e){return e*e/t}},J=function(){function t(t){this.body=!1,this.isEmpty=!1,this.isInternal=!1,this.nodes=[],this.box=t,this.boxSize=Math.min(t.width,t.height)}return t.prototype.divideBox=function(){var e=this.box.width/2,o=this.box.height/2;this.nodes[0]=new t({left:this.box.left,top:this.box.top,width:e,height:o}),this.nodes[1]=new t({left:this.box.left+e,top:this.box.top,width:e,height:o}),this.nodes[2]=new t({left:this.box.left+e,top:this.box.top+o,width:e,height:o}),this.nodes[3]=new t({left:this.box.left,top:this.box.top+o,width:e,height:o})},t.prototype.getBoxPosition=function(t){var e=t.plotX<this.box.left+this.box.width/2,o=t.plotY<this.box.top+this.box.height/2;return e?3*!o:o?1:2},t.prototype.insert=function(e,o){var i;this.isInternal?this.nodes[this.getBoxPosition(e)].insert(e,o-1):(this.isEmpty=!1,this.body?o?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,o-1),this.body=!0),this.nodes[this.getBoxPosition(e)].insert(e,o-1)):((i=new t({top:e.plotX||NaN,left:e.plotY||NaN,width:.1,height:.1})).body=e,i.isInternal=!1,this.nodes.push(i)):(this.isInternal=!1,this.body=e))},t.prototype.updateMassAndCenter=function(){var t=0,e=0,o=0;if(this.isInternal){for(var i=0,r=this.nodes;i<r.length;i++){var s=r[i];s.isEmpty||(t+=s.mass,e+=s.plotX*s.mass,o+=s.plotY*s.mass)}e/=t,o/=t}else this.body&&(t=this.body.mass,e=this.body.plotX,o=this.body.plotY);this.mass=t,this.plotX=e,this.plotY=o},t}(),Z=function(){function t(t,e,o,i){this.box={left:t,top:e,width:o,height:i},this.maxDepth=25,this.root=new J(this.box),this.root.isInternal=!0,this.root.isRoot=!0,this.root.divideBox()}return t.prototype.calculateMassAndCenter=function(){this.visitNodeRecursive(null,null,function(t){t.updateMassAndCenter()})},t.prototype.insertNodes=function(t){for(var e=0;e<t.length;e++){var o=t[e];this.root.insert(o,this.maxDepth)}},t.prototype.visitNodeRecursive=function(t,e,o){var i;if(t||(t=this.root),t===this.root&&e&&(i=e(t)),!1!==i){for(var r=0,s=t.nodes;r<s.length;r++){var n=s[r];if(n.isInternal){if(e&&(i=e(n)),!1===i)continue;this.visitNodeRecursive(n,e,o)}else n.body&&e&&e(n.body);o&&o(n)}t===this.root&&o&&o(t)}},t}(),$={attractive:function(t,e,o){var i=t.getMass(),r=-o.x*e*this.diffTemperature,s=-o.y*e*this.diffTemperature;t.fromNode.fixedPosition||(t.fromNode.plotX-=r*i.fromNode/t.fromNode.degree,t.fromNode.plotY-=s*i.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.plotX+=r*i.toNode/t.toNode.degree,t.toNode.plotY+=s*i.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return(e-t)/t},barycenter:function(){var t=this.options.gravitationalConstant||0,e=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*t,o=(this.barycenter.yFactor-(this.box.top+this.box.height)/2)*t;this.nodes.forEach(function(t){t.fixedPosition||(t.plotX-=e/t.mass/t.degree,t.plotY-=o/t.mass/t.degree)})},getK:function(t){return Math.pow(t.box.width*t.box.height/t.nodes.length,.5)},integrate:function(t,e){var o=-t.options.friction,i=t.options.maxSpeed,r=e.prevX,s=e.prevY,n=(e.plotX+e.dispX-r)*o,a=(e.plotY+e.dispY-s)*o,h=Math.abs,p=h(n)/(n||1),l=h(a)/(a||1),c=p*Math.min(i,Math.abs(n)),u=l*Math.min(i,Math.abs(a));e.prevX=e.plotX+e.dispX,e.prevY=e.plotY+e.dispY,e.plotX+=c,e.plotY+=u,e.temperature=t.vectorLength({x:c,y:u})},repulsive:function(t,e,o){var i=e*this.diffTemperature/t.mass/t.degree;t.fixedPosition||(t.plotX+=o.x*i,t.plotY+=o.y*i)},repulsiveForceFunction:function(t,e){return(e-t)/t*(e>t)}},tt=c().win,te=function(){function t(){this.box={},this.currentStep=0,this.initialRendering=!0,this.links=[],this.nodes=[],this.series=[],this.simulation=!1}return t.compose=function(e){A(e),C.euler=W,C.verlet=$,I["reingold-fruchterman"]=t},t.prototype.init=function(t){this.options=t,this.nodes=[],this.links=[],this.series=[],this.box={x:0,y:0,width:0,height:0},this.setInitialRendering(!0),this.integration=C[t.integration],this.enableSimulation=t.enableSimulation,this.attractiveForce=L(t.attractiveForce,this.integration.attractiveForceFunction),this.repulsiveForce=L(t.repulsiveForce,this.integration.repulsiveForceFunction),this.approximation=t.approximation},t.prototype.updateSimulation=function(t){this.enableSimulation=L(t,this.options.enableSimulation)},t.prototype.start=function(){var t=this.series,e=this.options;this.currentStep=0,this.forces=t[0]&&t[0].forces||[],this.chart=t[0]&&t[0].chart,this.initialRendering&&(this.initPositions(),t.forEach(function(t){t.finishedAnimating=!0,t.render()})),this.setK(),this.resetSimulation(e),this.enableSimulation&&this.step()},t.prototype.step=function(){var t=this,e=this.series;this.currentStep++,"barnes-hut"===this.approximation&&(this.createQuadTree(),this.quadTree.calculateMassAndCenter());for(var o=0,i=this.forces||[];o<i.length;o++)this[i[o]+"Forces"](this.temperature);if(this.applyLimits(),this.temperature=this.coolDown(this.startTemperature,this.diffTemperature,this.currentStep),this.prevSystemTemperature=this.systemTemperature,this.systemTemperature=this.getSystemTemperature(),this.enableSimulation){for(var r=0;r<e.length;r++){var s=e[r];s.chart&&s.render()}this.maxIterations--&&isFinite(this.temperature)&&!this.isStable()?(this.simulation&&tt.cancelAnimationFrame(this.simulation),this.simulation=tt.requestAnimationFrame(function(){return t.step()})):(this.simulation=!1,this.series.forEach(function(t){!function(t,e,o,i){if(o=o||{},(null==y?void 0:y.createEvent)&&(t.dispatchEvent||t.fireEvent&&t!==c())){var r=y.createEvent("Events");r.initEvent(e,!0,!0),o=g(r,o),t.dispatchEvent?t.dispatchEvent(o):t.fireEvent(e,o)}else if(t.hcEvents){o.target||g(o,{preventDefault:function(){o.defaultPrevented=!0},target:t,type:e});for(var s=[],n=t,a=!1;n.hcEvents;)Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents[e]&&(s.length&&(a=!0),s.unshift.apply(s,n.hcEvents[e])),n=Object.getPrototypeOf(n);a&&s.sort(function(t,e){return t.order-e.order}),s.forEach(function(e){!1===e.fn.call(t,o,t)&&o.preventDefault()})}}(t,"afterSimulation")}))}},t.prototype.stop=function(){this.simulation&&tt.cancelAnimationFrame(this.simulation)},t.prototype.setArea=function(t,e,o,i){this.box={left:t,top:e,width:o,height:i}},t.prototype.setK=function(){this.k=this.options.linkLength||this.integration.getK(this)},t.prototype.addElementsToCollection=function(t,e){for(var o=0;o<t.length;o++){var i=t[o];-1===e.indexOf(i)&&e.push(i)}},t.prototype.removeElementFromCollection=function(t,e){var o=e.indexOf(t);-1!==o&&e.splice(o,1)},t.prototype.clear=function(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()},t.prototype.resetSimulation=function(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()},t.prototype.restartSimulation=function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},t.prototype.setMaxIterations=function(t){this.maxIterations=L(t,this.options.maxIterations)},t.prototype.setTemperature=function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},t.prototype.setDiffTemperature=function(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)},t.prototype.setInitialRendering=function(t){this.initialRendering=t},t.prototype.createQuadTree=function(){this.quadTree=new Z(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)},t.prototype.initPositions=function(){var t=this.options.initialPositions;if("function"==typeof t){t.call(this);for(var e=0,o=this.nodes;e<o.length;e++){var i=o[e];m(i.prevX)||(i.prevX=i.plotX),m(i.prevY)||(i.prevY=i.plotY),i.dispX=0,i.dispY=0}}else"circle"===t?this.setCircularPositions():this.setRandomPositions()},t.prototype.setCircularPositions=function(){for(var t,e=this.box,o=this.nodes,i=2*Math.PI/(o.length+1),r=o.filter(function(t){return 0===t.linksTo.length}),s={},n=this.options.initialPositionRadius,a=function(t){for(var e=0,o=t.linksFrom||[];e<o.length;e++){var i=o[e];s[i.toNode.id]||(s[i.toNode.id]=!0,h.push(i.toNode),a(i.toNode))}},h=[],p=0;p<r.length;p++){var l=r[p];h.push(l),a(l)}if(h.length)for(var c=0;c<o.length;c++){var u=o[c];-1===h.indexOf(u)&&h.push(u)}else h=o;for(var d=0,f=h.length;d<f;++d)(t=h[d]).plotX=t.prevX=L(t.plotX,e.width/2+n*Math.cos(d*i)),t.plotY=t.prevY=L(t.plotY,e.height/2+n*Math.sin(d*i)),t.dispX=0,t.dispY=0},t.prototype.setRandomPositions=function(){for(var t,e=this.box,o=this.nodes,i=o.length+1,r=function(t){var e=t*t/Math.PI;return e-Math.floor(e)},s=0,n=o.length;s<n;++s)(t=o[s]).plotX=t.prevX=L(t.plotX,e.width*r(s)),t.plotY=t.prevY=L(t.plotY,e.height*r(i+s)),t.dispX=0,t.dispY=0},t.prototype.force=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];this.integration[t].apply(this,e)},t.prototype.barycenterForces=function(){this.getBarycenter(),this.force("barycenter")},t.prototype.getBarycenter=function(){for(var t=0,e=0,o=0,i=0,r=this.nodes;i<r.length;i++){var s=r[i];e+=s.plotX*s.mass,o+=s.plotY*s.mass,t+=s.mass}return this.barycenter={x:e,y:o,xFactor:e/t,yFactor:o/t},this.barycenter},t.prototype.barnesHutApproximation=function(t,e){var o,i,r=this.getDistXY(t,e),s=this.vectorLength(r);return t!==e&&0!==s&&(e.isInternal?e.boxSize/s<this.options.theta&&0!==s?(i=this.repulsiveForce(s,this.k),this.force("repulsive",t,i*e.mass,r,s),o=!1):o=!0:(i=this.repulsiveForce(s,this.k),this.force("repulsive",t,i*e.mass,r,s))),o},t.prototype.repulsiveForces=function(){var t=this;if("barnes-hut"===this.approximation)for(var e=function(e){o.quadTree.visitNodeRecursive(null,function(o){return t.barnesHutApproximation(e,o)})},o=this,i=0,r=this.nodes;i<r.length;i++){var s=r[i];e(s)}else for(var n=void 0,a=void 0,h=void 0,p=0,l=this.nodes;p<l.length;p++)for(var s=l[p],c=0,u=this.nodes;c<u.length;c++){var d=u[c];s===d||s.fixedPosition||(h=this.getDistXY(s,d),0!==(a=this.vectorLength(h))&&(n=this.repulsiveForce(a,this.k),this.force("repulsive",s,n*d.mass,h,a)))}},t.prototype.attractiveForces=function(){for(var t,e,o,i=0,r=this.links;i<r.length;i++){var s=r[i];s.fromNode&&s.toNode&&(t=this.getDistXY(s.fromNode,s.toNode),0!==(e=this.vectorLength(t))&&(o=this.attractiveForce(e,this.k),this.force("attractive",s,o,t,e)))}},t.prototype.applyLimits=function(){for(var t=this.nodes,e=0;e<t.length;e++){var o=t[e];o.fixedPosition||(this.integration.integrate(this,o),this.applyLimitBox(o,this.box),o.dispX=0,o.dispY=0)}},t.prototype.applyLimitBox=function(t,e){var o,i,r,s,n,a,h=t.radius;o=t.plotX,i=e.left+h,r=e.width-h,t.plotX=o>i?o<r?o:r:i,s=t.plotY,n=e.top+h,a=e.height-h,t.plotY=s>n?s<a?s:a:n},t.prototype.coolDown=function(t,e,o){return t-e*o},t.prototype.isStable=function(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0},t.prototype.getSystemTemperature=function(){for(var t=0,e=0,o=this.nodes;e<o.length;e++)t+=o[e].temperature;return t},t.prototype.vectorLength=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.prototype.getDistR=function(t,e){var o=this.getDistXY(t,e);return this.vectorLength(o)},t.prototype.getDistXY=function(t,e){var o=t.plotX-e.plotX,i=t.plotY-e.plotY;return{x:o,y:i,absX:Math.abs(o),absY:Math.abs(i)}},t}(),to=function(){return(to=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ti=c().animObject,tr={initDataLabels:function(){var t=this.options.dataLabels;if(!this.dataLabelsGroup){var e=this.initDataLabelsGroup(0,t);return!this.chart.styledMode&&(null==t?void 0:t.style)&&e.css(t.style),e.attr({opacity:0}),this.visible&&(this.options.animation&&(null==t?void 0:t.animation)?e.animate({opacity:1},t.animation):e.attr({opacity:1}),e.show()),e}return this.dataLabelsGroup.attr(to({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){var t,e,o,i=this,r=this.options.dataLabels;(null==r?void 0:r.defer)&&(null==(o=this.options.layoutAlgorithm)?void 0:o.enableSimulation)?(t=function(){i.deferDataLabels=!1},(e=r?ti(r.animation).defer:0)>0?setTimeout(t,e,void 0):t.call(0,void 0)):this.deferDataLabels=!1}},ts=c().deg2rad;function tn(t,e){var o=this;e=N(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var i=this.renderer.url,r=this.text||this,s=r.textPath,n=e.attributes,a=e.enabled;if(t=t||s&&s.path,s&&s.undo(),t&&a){var h=v(r,"afterModifyTree",function(e){if(t&&a){var s=t.attr("id");s||t.attr("id",s=(0,l.uniqueKey)());var h={x:0,y:0};m(n.dx)&&(h.dx=n.dx,delete n.dx),m(n.dy)&&(h.dy=n.dy,delete n.dy),r.attr(h),o.attr({transform:""}),o.box&&(o.box=o.box.destroy());var p=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:g(n,{"text-anchor":n.textAnchor,href:""+i+"#".concat(s)}),children:p}}});r.textPath={path:t,undo:h}}else r.attr({dx:0,dy:0}),delete r.textPath;return this.added&&(r.textCache="",this.renderer.buildText(r)),this}function ta(t){var e,o=t.bBox,i=null==(e=this.element)?void 0:e.querySelector("textPath");if(i){for(var r=[],s=this.renderer.fontMetrics(this.element),n=s.b,a=s.h-n,h=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),p=i.innerHTML.replace(h,"").split(/<tspan class="highcharts-br"[^>]*>/),l=p.length,c=function(t,e){var o=e.x,r=e.y,s=(i.getRotationOfChar(t)-90)*ts,h=Math.cos(s),p=Math.sin(s);return[[o-a*h,r-a*p],[o+n*h,r+n*p]]},u=0,d=0;d<l;d++){for(var f=p[d].length,y=0;y<f;y+=5)try{var v=u+y+d,m=c(v,i.getStartPositionOfChar(v)),g=m[0],b=m[1];0===y?(r.push(b),r.push(g)):(0===d&&r.unshift(b),d===l-1&&r.push(g))}catch(t){break}u+=f-1;try{var v=u+d,x=i.getEndPositionOfChar(v),k=c(v,x),g=k[0],b=k[1];r.unshift(b),r.unshift(g)}catch(t){break}}r.length&&r.push(r[0].slice()),o.polygon=r}return o}function th(t){var e,o=t.labelOptions,i=t.point,r=o[i.formatPrefix+"TextPath"]||o.textPath;r&&!o.useHTML&&(this.setTextPath((null==(e=i.getDataLabelPath)?void 0:e.call(i,this))||i.graphic,r),i.dataLabelPath&&!r.enabled&&(i.dataLabelPath=i.dataLabelPath.destroy()))}var tp=(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)}),tl=c().noop,tc=j().series,tu=j().seriesTypes,td=tu.column.prototype,tf=tu.line.prototype,ty=tr.initDataLabels,tv=tr.initDataLabelsDefer;({compose:function(t){v(t,"afterGetBBox",ta),v(t,"beforeAddingDataLabel",th);var e=t.prototype;e.setTextPath||(e.setTextPath=tn)}}).compose(d());var tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.deferDataLabels=!0,e}return tp(e,t),e.compose=function(t){M.compose(t),te.compose(t)},e.prototype.deferLayout=function(){var t,e=this.options.layoutAlgorithm,o=this.chart.options.chart,i=this.chart.graphLayoutsStorage,r=this.chart.graphLayoutsLookup;this.visible&&(i||(this.chart.graphLayoutsStorage=i={},this.chart.graphLayoutsLookup=r=[]),(t=i[e.type])||(e.enableSimulation=m(o.forExport)?!o.forExport:e.enableSimulation,i[e.type]=t=new I[e.type],t.init(e),r.splice(t.index,0,t)),this.layout=t,t.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),t.addElementsToCollection([this],t.series),t.addElementsToCollection(this.nodes,t.nodes),t.addElementsToCollection(this.points,t.links))},e.prototype.destroy=function(){this.layout&&this.layout.removeElementFromCollection(this,this.layout.series),G.destroy.call(this)},e.prototype.drawDataLabels=function(){if(!this.deferDataLabels){var t,e=this.options.dataLabels;(null==e?void 0:e.textPath)&&(t=e.textPath),tc.prototype.drawDataLabels.call(this,this.nodes),(null==e?void 0:e.linkTextPath)&&(e.textPath=e.linkTextPath),tc.prototype.drawDataLabels.call(this,this.data),(null==e?void 0:e.textPath)&&(e.textPath=t)}},e.prototype.generatePoints=function(){var t,e;for(G.generatePoints.apply(this,arguments),this.options.nodes&&this.options.nodes.forEach(function(t){this.nodeLookup[t.id]||(this.nodeLookup[t.id]=this.createNode(t.id))},this),e=this.nodes.length-1;e>=0;e--)(t=this.nodes[e]).degree=t.getDegree(),t.radius=L(t.marker&&t.marker.radius,this.options.marker&&this.options.marker.radius,0),t.key=t.name,this.nodeLookup[t.id]||t.remove();this.data.forEach(function(t){t.formatPrefix="link"}),this.indexateNodes()},e.prototype.getPointsCollection=function(){return this.nodes||[]},e.prototype.indexateNodes=function(){this.nodes.forEach(function(t,e){t.index=e})},e.prototype.init=function(e,o){var i=this;return t.prototype.init.call(this,e,o),tv.call(this),v(this,"updatedData",function(){i.layout&&i.layout.stop()}),v(this,"afterUpdate",function(){i.nodes.forEach(function(t){t&&t.series&&t.resolveColor()})}),v(this,"afterSimulation",function(){this.deferDataLabels=!1,this.drawDataLabels()}),this},e.prototype.markerAttribs=function(t,e){var o=tc.prototype.markerAttribs.call(this,t,e);return m(t.plotY)||(o.y=0),o.x=(t.plotX||0)-(o.width||0)/2,o},e.prototype.pointAttribs=function(t,e){var o=e||t&&t.state||"normal",i=this.options.states[o],r=tc.prototype.pointAttribs.call(this,t,o);return t&&!t.isNode&&(r=t.getLinkAttributes(),i&&(r={stroke:i.linkColor||r.stroke,dashstyle:i.linkDashStyle||r.dashstyle,opacity:L(i.linkOpacity,r.opacity),"stroke-width":i.linkColor||r["stroke-width"]})),r},e.prototype.render=function(){var t=this.points,e=this.chart.hoverPoint,o=[];this.points=this.nodes,tf.render.call(this),this.points=t,t.forEach(function(t){t.fromNode&&t.toNode&&(t.renderLink(),t.redrawLink())}),e&&e.series===this&&this.redrawHalo(e),this.chart.hasRendered&&!this.options.dataLabels.allowOverlap&&(this.nodes.concat(this.points).forEach(function(t){t.dataLabel&&o.push(t.dataLabel)}),this.chart.hideOverlappingLabels(o))},e.prototype.setState=function(t,e){e?(this.points=this.nodes.concat(this.data),tc.prototype.setState.apply(this,arguments),this.points=this.data):tc.prototype.setState.apply(this,arguments),this.layout.simulation||t||this.render()},e.prototype.translate=function(){this.generatePoints(),this.deferLayout(),this.nodes.forEach(function(t){t.isInside=!0,t.linksFrom.forEach(function(t){t.shapeType="path",t.y=1})})},e.defaultOptions=N(tc.defaultOptions,Q),e}(tc);g(tm.prototype,{pointClass:V,animate:void 0,directTouch:!0,drawGraph:void 0,forces:["barycenter","repulsive","attractive"],hasDraggableNodes:!0,isCartesian:!1,noSharedTooltip:!0,pointArrayMap:["from","to"],requireSorting:!1,trackerGroups:["group","markerGroup","dataLabelsGroup"],initDataLabels:ty,buildKDTree:tl,createNode:G.createNode,drawTracker:td.drawTracker,onMouseDown:M.onMouseDown,onMouseMove:M.onMouseMove,onMouseUp:M.onMouseUp,redrawHalo:M.redrawHalo}),j().registerSeriesType("networkgraph",tm);var tg=c();tm.compose(tg.Chart);var tb=c();return p.default}()});