/*
 Highcharts JS v8.2.0 (2020-08-20)

 Force directed graph module

 (c) 2010-2019 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/networkgraph",["highcharts"],function(m){e(m);e.Highcharts=m;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function m(e,b,a,c){e.hasOwnProperty(b)||(e[b]=c.apply(null,a))}e=e?e._modules:{};m(e,"Mixins/Nodes.js",[e["Core/Globals.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.defined,
d=a.extend,h=a.find,k=a.pick;return e.NodesMixin={createNode:function(b){function a(f,g){return h(f,function(f){return f.id===g})}var c=a(this.nodes,b),f=this.pointClass;if(!c){var g=this.options.nodes&&a(this.options.nodes,b);c=(new f).init(this,d({className:"highcharts-node",isNode:!0,id:b,y:1},g));c.linksTo=[];c.linksFrom=[];c.formatPrefix="node";c.name=c.name||c.options.id||"";c.mass=k(c.options.mass,c.options.marker&&c.options.marker.radius,this.options.marker&&this.options.marker.radius,4);
c.getSum=function(){var f=0,g=0;c.linksTo.forEach(function(g){f+=g.weight});c.linksFrom.forEach(function(f){g+=f.weight});return Math.max(f,g)};c.offset=function(f,g){for(var q=0,b=0;b<c[g].length;b++){if(c[g][b]===f)return q;q+=c[g][b].weight}};c.hasShape=function(){var f=0;c.linksTo.forEach(function(g){g.outgoing&&f++});return!c.linksTo.length||f!==c.linksTo.length};this.nodes.push(c)}return c},generatePoints:function(){var b=this.chart,d={};e.Series.prototype.generatePoints.call(this);this.nodes||
(this.nodes=[]);this.colorCounter=0;this.nodes.forEach(function(c){c.linksFrom.length=0;c.linksTo.length=0;c.level=c.options.level});this.points.forEach(function(a){c(a.from)&&(d[a.from]||(d[a.from]=this.createNode(a.from)),d[a.from].linksFrom.push(a),a.fromNode=d[a.from],b.styledMode?a.colorIndex=k(a.options.colorIndex,d[a.from].colorIndex):a.color=a.options.color||d[a.from].color);c(a.to)&&(d[a.to]||(d[a.to]=this.createNode(a.to)),d[a.to].linksTo.push(a),a.toNode=d[a.to]);a.name=a.name||a.id},this);
this.nodeLookup=d},setData:function(){this.nodes&&(this.nodes.forEach(function(c){c.destroy()}),this.nodes.length=0);e.Series.prototype.setData.apply(this,arguments)},destroy:function(){this.data=[].concat(this.points||[],this.nodes);return e.Series.prototype.destroy.apply(this,arguments)},setNodeState:function(c){var a=arguments,d=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==c&&d.forEach(function(f){f&&f.series&&(b.prototype.setState.apply(f,a),f.isNode||
(f.fromNode.graphic&&b.prototype.setState.apply(f.fromNode,a),f.toNode&&f.toNode.graphic&&b.prototype.setState.apply(f.toNode,a)))});b.prototype.setState.apply(this,a)}}});m(e,"Series/Networkgraph/Integrations.js",[e["Core/Globals.js"]],function(e){e.networkgraphIntegrations={verlet:{attractiveForceFunction:function(b,a){return(a-b)/b},repulsiveForceFunction:function(b,a){return(a-b)/b*(a>b?1:0)},barycenter:function(){var b=this.options.gravitationalConstant,a=this.barycenter.xFactor,c=this.barycenter.yFactor;
a=(a-(this.box.left+this.box.width)/2)*b;c=(c-(this.box.top+this.box.height)/2)*b;this.nodes.forEach(function(d){d.fixedPosition||(d.plotX-=a/d.mass/d.degree,d.plotY-=c/d.mass/d.degree)})},repulsive:function(b,a,c){a=a*this.diffTemperature/b.mass/b.degree;b.fixedPosition||(b.plotX+=c.x*a,b.plotY+=c.y*a)},attractive:function(b,a,c){var d=b.getMass(),h=-c.x*a*this.diffTemperature;a=-c.y*a*this.diffTemperature;b.fromNode.fixedPosition||(b.fromNode.plotX-=h*d.fromNode/b.fromNode.degree,b.fromNode.plotY-=
a*d.fromNode/b.fromNode.degree);b.toNode.fixedPosition||(b.toNode.plotX+=h*d.toNode/b.toNode.degree,b.toNode.plotY+=a*d.toNode/b.toNode.degree)},integrate:function(b,a){var c=-b.options.friction,d=b.options.maxSpeed,h=(a.plotX+a.dispX-a.prevX)*c;c*=a.plotY+a.dispY-a.prevY;var e=Math.abs,n=e(h)/(h||1);e=e(c)/(c||1);h=n*Math.min(d,Math.abs(h));c=e*Math.min(d,Math.abs(c));a.prevX=a.plotX+a.dispX;a.prevY=a.plotY+a.dispY;a.plotX+=h;a.plotY+=c;a.temperature=b.vectorLength({x:h,y:c})},getK:function(b){return Math.pow(b.box.width*
b.box.height/b.nodes.length,.5)}},euler:{attractiveForceFunction:function(b,a){return b*b/a},repulsiveForceFunction:function(b,a){return a*a/b},barycenter:function(){var b=this.options.gravitationalConstant,a=this.barycenter.xFactor,c=this.barycenter.yFactor;this.nodes.forEach(function(d){if(!d.fixedPosition){var h=d.getDegree();h*=1+h/2;d.dispX+=(a-d.plotX)*b*h/d.degree;d.dispY+=(c-d.plotY)*b*h/d.degree}})},repulsive:function(b,a,c,d){b.dispX+=c.x/d*a/b.degree;b.dispY+=c.y/d*a/b.degree},attractive:function(b,
a,c,d){var h=b.getMass(),e=c.x/d*a;a*=c.y/d;b.fromNode.fixedPosition||(b.fromNode.dispX-=e*h.fromNode/b.fromNode.degree,b.fromNode.dispY-=a*h.fromNode/b.fromNode.degree);b.toNode.fixedPosition||(b.toNode.dispX+=e*h.toNode/b.toNode.degree,b.toNode.dispY+=a*h.toNode/b.toNode.degree)},integrate:function(b,a){a.dispX+=a.dispX*b.options.friction;a.dispY+=a.dispY*b.options.friction;var c=a.temperature=b.vectorLength({x:a.dispX,y:a.dispY});0!==c&&(a.plotX+=a.dispX/c*Math.min(Math.abs(a.dispX),b.temperature),
a.plotY+=a.dispY/c*Math.min(Math.abs(a.dispY),b.temperature))},getK:function(b){return Math.pow(b.box.width*b.box.height/b.nodes.length,.3)}}}});m(e,"Series/Networkgraph/QuadTree.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b){b=b.extend;var a=e.QuadTreeNode=function(a){this.box=a;this.boxSize=Math.min(a.width,a.height);this.nodes=[];this.body=this.isInternal=!1;this.isEmpty=!0};b(a.prototype,{insert:function(c,d){this.isInternal?this.nodes[this.getBoxPosition(c)].insert(c,d-1):(this.isEmpty=
!1,this.body?d?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,d-1),this.body=!0),this.nodes[this.getBoxPosition(c)].insert(c,d-1)):(d=new a({top:c.plotX,left:c.plotY,width:.1,height:.1}),d.body=c,d.isInternal=!1,this.nodes.push(d)):(this.isInternal=!1,this.body=c))},updateMassAndCenter:function(){var a=0,d=0,b=0;this.isInternal?(this.nodes.forEach(function(c){c.isEmpty||(a+=c.mass,d+=c.plotX*c.mass,b+=c.plotY*c.mass)}),d/=a,b/=a):
this.body&&(a=this.body.mass,d=this.body.plotX,b=this.body.plotY);this.mass=a;this.plotX=d;this.plotY=b},divideBox:function(){var c=this.box.width/2,b=this.box.height/2;this.nodes[0]=new a({left:this.box.left,top:this.box.top,width:c,height:b});this.nodes[1]=new a({left:this.box.left+c,top:this.box.top,width:c,height:b});this.nodes[2]=new a({left:this.box.left+c,top:this.box.top+b,width:c,height:b});this.nodes[3]=new a({left:this.box.left,top:this.box.top+b,width:c,height:b})},getBoxPosition:function(a){var b=
a.plotY<this.box.top+this.box.height/2;return a.plotX<this.box.left+this.box.width/2?b?0:3:b?1:2}});e=e.QuadTree=function(b,d,e,k){this.box={left:b,top:d,width:e,height:k};this.maxDepth=25;this.root=new a(this.box,"0");this.root.isInternal=!0;this.root.isRoot=!0;this.root.divideBox()};b(e.prototype,{insertNodes:function(a){a.forEach(function(a){this.root.insert(a,this.maxDepth)},this)},visitNodeRecursive:function(a,b,e){var c;a||(a=this.root);a===this.root&&b&&(c=b(a));!1!==c&&(a.nodes.forEach(function(a){if(a.isInternal){b&&
(c=b(a));if(!1===c)return;this.visitNodeRecursive(a,b,e)}else a.body&&b&&b(a.body);e&&e(a)},this),a===this.root&&e&&e(a))},calculateMassAndCenter:function(){this.visitNodeRecursive(null,null,function(a){a.updateMassAndCenter()})}})});m(e,"Series/Networkgraph/Layouts.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.addEvent,d=a.clamp,h=a.defined,k=a.extend,n=a.isFunction,p=a.pick,l=a.setAnimation;b.layouts={"reingold-fruchterman":function(){}};k(b.layouts["reingold-fruchterman"].prototype,
{init:function(f){this.options=f;this.nodes=[];this.links=[];this.series=[];this.box={x:0,y:0,width:0,height:0};this.setInitialRendering(!0);this.integration=b.networkgraphIntegrations[f.integration];this.enableSimulation=f.enableSimulation;this.attractiveForce=p(f.attractiveForce,this.integration.attractiveForceFunction);this.repulsiveForce=p(f.repulsiveForce,this.integration.repulsiveForceFunction);this.approximation=f.approximation},updateSimulation:function(f){this.enableSimulation=p(f,this.options.enableSimulation)},
start:function(){var f=this.series,a=this.options;this.currentStep=0;this.forces=f[0]&&f[0].forces||[];this.chart=f[0]&&f[0].chart;this.initialRendering&&(this.initPositions(),f.forEach(function(a){a.finishedAnimating=!0;a.render()}));this.setK();this.resetSimulation(a);this.enableSimulation&&this.step()},step:function(){var a=this,g=this.series;a.currentStep++;"barnes-hut"===a.approximation&&(a.createQuadTree(),a.quadTree.calculateMassAndCenter());a.forces.forEach(function(g){a[g+"Forces"](a.temperature)});
a.applyLimits(a.temperature);a.temperature=a.coolDown(a.startTemperature,a.diffTemperature,a.currentStep);a.prevSystemTemperature=a.systemTemperature;a.systemTemperature=a.getSystemTemperature();a.enableSimulation&&(g.forEach(function(a){a.chart&&a.render()}),a.maxIterations--&&isFinite(a.temperature)&&!a.isStable()?(a.simulation&&b.win.cancelAnimationFrame(a.simulation),a.simulation=b.win.requestAnimationFrame(function(){a.step()})):a.simulation=!1)},stop:function(){this.simulation&&b.win.cancelAnimationFrame(this.simulation)},
setArea:function(a,g,b,c){this.box={left:a,top:g,width:b,height:c}},setK:function(){this.k=this.options.linkLength||this.integration.getK(this)},addElementsToCollection:function(a,g){a.forEach(function(a){-1===g.indexOf(a)&&g.push(a)})},removeElementFromCollection:function(a,g){a=g.indexOf(a);-1!==a&&g.splice(a,1)},clear:function(){this.nodes.length=0;this.links.length=0;this.series.length=0;this.resetSimulation()},resetSimulation:function(){this.forcedStop=!1;this.systemTemperature=0;this.setMaxIterations();
this.setTemperature();this.setDiffTemperature()},restartSimulation:function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},setMaxIterations:function(a){this.maxIterations=p(a,this.options.maxIterations)},setTemperature:function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},setDiffTemperature:function(){this.diffTemperature=this.startTemperature/
(this.options.maxIterations+1)},setInitialRendering:function(a){this.initialRendering=a},createQuadTree:function(){this.quadTree=new b.QuadTree(this.box.left,this.box.top,this.box.width,this.box.height);this.quadTree.insertNodes(this.nodes)},initPositions:function(){var a=this.options.initialPositions;n(a)?(a.call(this),this.nodes.forEach(function(a){h(a.prevX)||(a.prevX=a.plotX);h(a.prevY)||(a.prevY=a.plotY);a.dispX=0;a.dispY=0})):"circle"===a?this.setCircularPositions():this.setRandomPositions()},
setCircularPositions:function(){function a(b){b.linksFrom.forEach(function(b){l[b.toNode.id]||(l[b.toNode.id]=!0,h.push(b.toNode),a(b.toNode))})}var b=this.box,c=this.nodes,d=2*Math.PI/(c.length+1),e=c.filter(function(a){return 0===a.linksTo.length}),h=[],l={},k=this.options.initialPositionRadius;e.forEach(function(b){h.push(b);a(b)});h.length?c.forEach(function(a){-1===h.indexOf(a)&&h.push(a)}):h=c;h.forEach(function(a,g){a.plotX=a.prevX=p(a.plotX,b.width/2+k*Math.cos(g*d));a.plotY=a.prevY=p(a.plotY,
b.height/2+k*Math.sin(g*d));a.dispX=0;a.dispY=0})},setRandomPositions:function(){function a(a){a=a*a/Math.PI;return a-=Math.floor(a)}var b=this.box,c=this.nodes,d=c.length+1;c.forEach(function(g,c){g.plotX=g.prevX=p(g.plotX,b.width*a(c));g.plotY=g.prevY=p(g.plotY,b.height*a(d+c));g.dispX=0;g.dispY=0})},force:function(a){this.integration[a].apply(this,Array.prototype.slice.call(arguments,1))},barycenterForces:function(){this.getBarycenter();this.force("barycenter")},getBarycenter:function(){var a=
0,b=0,c=0;this.nodes.forEach(function(g){b+=g.plotX*g.mass;c+=g.plotY*g.mass;a+=g.mass});return this.barycenter={x:b,y:c,xFactor:b/a,yFactor:c/a}},barnesHutApproximation:function(a,b){var g=this.getDistXY(a,b),c=this.vectorLength(g);if(a!==b&&0!==c)if(b.isInternal)if(b.boxSize/c<this.options.theta&&0!==c){var d=this.repulsiveForce(c,this.k);this.force("repulsive",a,d*b.mass,g,c);var f=!1}else f=!0;else d=this.repulsiveForce(c,this.k),this.force("repulsive",a,d*b.mass,g,c);return f},repulsiveForces:function(){var a=
this;"barnes-hut"===a.approximation?a.nodes.forEach(function(b){a.quadTree.visitNodeRecursive(null,function(g){return a.barnesHutApproximation(b,g)})}):a.nodes.forEach(function(b){a.nodes.forEach(function(g){if(b!==g&&!b.fixedPosition){var c=a.getDistXY(b,g);var d=a.vectorLength(c);if(0!==d){var f=a.repulsiveForce(d,a.k);a.force("repulsive",b,f*g.mass,c,d)}}})})},attractiveForces:function(){var a=this,b,c,d;a.links.forEach(function(g){g.fromNode&&g.toNode&&(b=a.getDistXY(g.fromNode,g.toNode),c=a.vectorLength(b),
0!==c&&(d=a.attractiveForce(c,a.k),a.force("attractive",g,d,b,c)))})},applyLimits:function(){var a=this;a.nodes.forEach(function(b){b.fixedPosition||(a.integration.integrate(a,b),a.applyLimitBox(b,a.box),b.dispX=0,b.dispY=0)})},applyLimitBox:function(a,b){var c=a.radius;a.plotX=d(a.plotX,b.left+c,b.width-c);a.plotY=d(a.plotY,b.top+c,b.height-c)},coolDown:function(a,b,c){return a-b*c},isStable:function(){return.00001>Math.abs(this.systemTemperature-this.prevSystemTemperature)||0>=this.temperature},
getSystemTemperature:function(){return this.nodes.reduce(function(a,b){return a+b.temperature},0)},vectorLength:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},getDistR:function(a,b){a=this.getDistXY(a,b);return this.vectorLength(a)},getDistXY:function(a,b){var c=a.plotX-b.plotX;a=a.plotY-b.plotY;return{x:c,y:a,absX:Math.abs(c),absY:Math.abs(a)}}});c(e,"predraw",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(a){a.stop()})});c(e,"render",function(){function a(a){a.maxIterations--&&
isFinite(a.temperature)&&!a.isStable()&&!a.enableSimulation&&(a.beforeStep&&a.beforeStep(),a.step(),c=!1,b=!0)}var b=!1;if(this.graphLayoutsLookup){l(!1,this);for(this.graphLayoutsLookup.forEach(function(a){a.start()});!c;){var c=!0;this.graphLayoutsLookup.forEach(a)}b&&this.series.forEach(function(a){a&&a.layout&&a.render()})}});c(e,"beforePrint",function(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(a){a.updateSimulation(!1)}),this.redraw())});c(e,"afterPrint",function(){this.graphLayoutsLookup&&
this.graphLayoutsLookup.forEach(function(a){a.updateSimulation()});this.redraw()})});m(e,"Series/Networkgraph/DraggableNodes.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.addEvent;b.dragNodesMixin={onMouseDown:function(a,b){b=this.chart.pointer.normalize(b);a.fixedPosition={chartX:b.chartX,chartY:b.chartY,plotX:a.plotX,plotY:a.plotY};a.inDragMode=!0},onMouseMove:function(a,b){if(a.fixedPosition&&a.inDragMode){var c=this.chart;b=c.pointer.normalize(b);
var d=a.fixedPosition.chartX-b.chartX,e=a.fixedPosition.chartY-b.chartY;b=c.graphLayoutsLookup;if(5<Math.abs(d)||5<Math.abs(e))d=a.fixedPosition.plotX-d,e=a.fixedPosition.plotY-e,c.isInsidePlot(d,e)&&(a.plotX=d,a.plotY=e,a.hasDragged=!0,this.redrawHalo(a),b.forEach(function(a){a.restartSimulation()}))}},onMouseUp:function(a,b){a.fixedPosition&&a.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw(),a.inDragMode=a.hasDragged=!1,this.options.fixedDraggable||delete a.fixedPosition)},
redrawHalo:function(a){a&&this.halo&&this.halo.attr({d:a.haloPath(this.options.states.hover.halo.size)})}};c(e,"load",function(){var a=this,b,e,n;a.container&&(b=c(a.container,"mousedown",function(b){var d=a.hoverPoint;d&&d.series&&d.series.hasDraggableNodes&&d.series.options.draggable&&(d.series.onMouseDown(d,b),e=c(a.container,"mousemove",function(a){return d&&d.series&&d.series.onMouseMove(d,a)}),n=c(a.container.ownerDocument,"mouseup",function(a){e();n();return d&&d.series&&d.series.onMouseUp(d,
a)}))}));c(a,"destroy",function(){b()})})});m(e,"Series/Networkgraph/Networkgraph.js",[e["Core/Globals.js"],e["Mixins/Nodes.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,b,a,c){var d=c.addEvent,h=c.css,k=c.defined,n=c.pick;c=c.seriesType;"";var m=e.seriesTypes,l=e.Series,f=e.dragNodesMixin;c("networkgraph","line",{stickyTracking:!1,inactiveOtherPoints:!0,marker:{enabled:!0,states:{inactive:{opacity:.3,animation:{duration:50}}}},states:{inactive:{linkOpacity:.3,animation:{duration:50}}},
dataLabels:{formatter:function(){return this.key},linkFormatter:function(){return this.point.fromNode.name+"<br>"+this.point.toNode.name},linkTextPath:{enabled:!0},textPath:{enabled:!1},style:{transition:"opacity 2000ms"}},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},{forces:["barycenter","repulsive","attractive"],hasDraggableNodes:!0,drawGraph:null,isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,pointArrayMap:["from","to"],trackerGroups:["group","markerGroup","dataLabelsGroup"],drawTracker:e.TrackerMixin.drawTrackerPoint,animate:null,buildKDTree:e.noop,createNode:b.createNode,destroy:function(){this.layout&&this.layout.removeElementFromCollection(this,this.layout.series);b.destroy.call(this)},init:function(){l.prototype.init.apply(this,
arguments);d(this,"updatedData",function(){this.layout&&this.layout.stop()});return this},generatePoints:function(){var a;b.generatePoints.apply(this,arguments);this.options.nodes&&this.options.nodes.forEach(function(a){this.nodeLookup[a.id]||(this.nodeLookup[a.id]=this.createNode(a.id))},this);for(a=this.nodes.length-1;0<=a;a--){var c=this.nodes[a];c.degree=c.getDegree();c.radius=n(c.marker&&c.marker.radius,this.options.marker&&this.options.marker.radius,0);this.nodeLookup[c.id]||c.remove()}this.data.forEach(function(a){a.formatPrefix=
"link"});this.indexateNodes()},getPointsCollection:function(){return this.nodes||[]},indexateNodes:function(){this.nodes.forEach(function(a,b){a.index=b})},markerAttribs:function(a,b){b=l.prototype.markerAttribs.call(this,a,b);k(a.plotY)||(b.y=0);b.x=(a.plotX||0)-(b.width/2||0);return b},translate:function(){this.processedXData||this.processData();this.generatePoints();this.deferLayout();this.nodes.forEach(function(a){a.isInside=!0;a.linksFrom.forEach(function(a){a.shapeType="path";a.y=1})})},deferLayout:function(){var a=
this.options.layoutAlgorithm,b=this.chart.graphLayoutsStorage,c=this.chart.graphLayoutsLookup,d=this.chart.options.chart;if(this.visible){b||(this.chart.graphLayoutsStorage=b={},this.chart.graphLayoutsLookup=c=[]);var f=b[a.type];f||(a.enableSimulation=k(d.forExport)?!d.forExport:a.enableSimulation,b[a.type]=f=new e.layouts[a.type],f.init(a),c.splice(f.index,0,f));this.layout=f;f.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight);f.addElementsToCollection([this],f.series);f.addElementsToCollection(this.nodes,
f.nodes);f.addElementsToCollection(this.points,f.links)}},render:function(){var a=this.points,b=this.chart.hoverPoint,c=[];this.points=this.nodes;m.line.prototype.render.call(this);this.points=a;a.forEach(function(a){a.fromNode&&a.toNode&&(a.renderLink(),a.redrawLink())});b&&b.series===this&&this.redrawHalo(b);this.chart.hasRendered&&!this.options.dataLabels.allowOverlap&&(this.nodes.concat(this.points).forEach(function(a){a.dataLabel&&c.push(a.dataLabel)}),this.chart.hideOverlappingLabels(c))},drawDataLabels:function(){var a=
this.options.dataLabels.textPath;l.prototype.drawDataLabels.apply(this,arguments);this.points=this.data;this.options.dataLabels.textPath=this.options.dataLabels.linkTextPath;l.prototype.drawDataLabels.apply(this,arguments);this.points=this.nodes;this.options.dataLabels.textPath=a},pointAttribs:function(a,b){var c=b||a&&a.state||"normal";b=l.prototype.pointAttribs.call(this,a,c);c=this.options.states[c];a&&!a.isNode&&(b=a.getLinkAttributes(),c&&(b={stroke:c.linkColor||b.stroke,dashstyle:c.linkDashStyle||
b.dashstyle,opacity:n(c.linkOpacity,b.opacity),"stroke-width":c.linkColor||b["stroke-width"]}));return b},redrawHalo:f.redrawHalo,onMouseDown:f.onMouseDown,onMouseMove:f.onMouseMove,onMouseUp:f.onMouseUp,setState:function(a,b){b?(this.points=this.nodes.concat(this.data),l.prototype.setState.apply(this,arguments),this.points=this.data):l.prototype.setState.apply(this,arguments);this.layout.simulation||a||this.render()}},{setState:b.setNodeState,init:function(){a.prototype.init.apply(this,arguments);
this.series.options.draggable&&!this.series.chart.styledMode&&(d(this,"mouseOver",function(){h(this.series.chart.container,{cursor:"move"})}),d(this,"mouseOut",function(){h(this.series.chart.container,{cursor:"default"})}));return this},getDegree:function(){var a=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===a?1:a},getLinkAttributes:function(){var a=this.series.options.link,b=this.options;return{"stroke-width":n(b.width,a.width),stroke:b.color||a.color,dashstyle:b.dashStyle||
a.dashStyle,opacity:n(b.opacity,a.opacity,1)}},renderLink:function(){if(!this.graphic&&(this.graphic=this.series.chart.renderer.path(this.getLinkPath()).add(this.series.group),!this.series.chart.styledMode)){var a=this.series.pointAttribs(this);this.graphic.attr(a);(this.dataLabels||[]).forEach(function(b){b&&b.attr({opacity:a.opacity})})}},redrawLink:function(){var a=this.getLinkPath();if(this.graphic){this.shapeArgs={d:a};if(!this.series.chart.styledMode){var b=this.series.pointAttribs(this);this.graphic.attr(b);
(this.dataLabels||[]).forEach(function(a){a&&a.attr({opacity:b.opacity})})}this.graphic.animate(this.shapeArgs);var c=a[0];a=a[1];"M"===c[0]&&"L"===a[0]&&(this.plotX=(c[1]+a[1])/2,this.plotY=(c[2]+a[2])/2)}},getMass:function(){var a=this.fromNode.mass,b=this.toNode.mass,c=a+b;return{fromNode:1-a/c,toNode:1-b/c}},getLinkPath:function(){var a=this.fromNode,b=this.toNode;a.plotX>b.plotX&&(a=this.toNode,b=this.fromNode);return[["M",a.plotX||0,a.plotY||0],["L",b.plotX||0,b.plotY||0]]},isValid:function(){return!this.isNode||
k(this.id)},remove:function(a,b){var c=this.series,d=c.options.nodes||[],e,f=d.length;if(this.isNode){c.points=[];[].concat(this.linksFrom).concat(this.linksTo).forEach(function(a){e=a.fromNode.linksFrom.indexOf(a);-1<e&&a.fromNode.linksFrom.splice(e,1);e=a.toNode.linksTo.indexOf(a);-1<e&&a.toNode.linksTo.splice(e,1);l.prototype.removePoint.call(c,c.data.indexOf(a),!1,!1)});c.points=c.data.slice();for(c.nodes.splice(c.nodes.indexOf(this),1);f--;)if(d[f].id===this.options.id){c.options.nodes.splice(f,
1);break}this&&this.destroy();c.isDirty=!0;c.isDirtyData=!0;a&&c.chart.redraw(a)}else c.removePoint(c.data.indexOf(this),a,b)},destroy:function(){this.isNode&&this.linksFrom.concat(this.linksTo).forEach(function(a){a.destroyElements&&a.destroyElements()});this.series.layout.removeElementFromCollection(this,this.series.layout[this.isNode?"nodes":"links"]);return a.prototype.destroy.apply(this,arguments)}});""});m(e,"masters/modules/networkgraph.src.js",[],function(){})});
//# sourceMappingURL=networkgraph.js.map