Icard/angular-clarity-master(work.../node_modules/highcharts/modules/networkgraph.js

9 lines
25 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Force directed graph module
*
* (c) 2010-2024 Torstein Honsi
*
* 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/networkgraph",["highcharts"],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 i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/DragNodesComposition.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{composed:i}=t,{addEvent:s,pushUnique:o}=e;function r(){let t,e,i;let o=this;o.container&&(t=s(o.container,"mousedown",t=>{let r=o.hoverPoint;r&&r.series&&r.series.hasDraggableNodes&&r.series.options.draggable&&(r.series.onMouseDown(r,t),e=s(o.container,"mousemove",t=>r&&r.series&&r.series.onMouseMove(r,t)),i=s(o.container.ownerDocument,"mouseup",t=>(e(),i(),r&&r.series&&r.series.onMouseUp(r,t))))})),s(o,"destroy",function(){t()})}return{compose:function(t){o(i,"DragNodes")&&s(t,"load",r)},onMouseDown:function(t,e){let i=this.chart.pointer?.normalize(e)||e;t.fixedPosition={chartX:i.chartX,chartY:i.chartY,plotX:t.plotX,plotY:t.plotY},t.inDragMode=!0},onMouseMove:function(t,e){if(t.fixedPosition&&t.inDragMode){let i,s;let o=this.chart,r=o.pointer?.normalize(e)||e,n=t.fixedPosition.chartX-r.chartX,a=t.fixedPosition.chartY-r.chartY,h=o.graphLayoutsLookup;(Math.abs(n)>5||Math.abs(a)>5)&&(i=t.fixedPosition.plotX-n,s=t.fixedPosition.plotY-a,o.isInsidePlot(i,s)&&(t.plotX=i,t.plotY=s,t.hasDragged=!0,this.redrawHalo(t),h.forEach(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)})}}}),i(e,"Series/GraphLayoutComposition.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){let{setAnimation:s}=t,{composed:o}=e,{addEvent:r,pushUnique:n}=i;function a(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(t=>{t.updateSimulation()}),this.redraw())}function h(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(t=>{t.updateSimulation(!1)}),this.redraw())}function l(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(t=>{t.stop()})}function d(){let t,e=!1,i=i=>{i.maxIterations--&&isFinite(i.temperature)&&!i.isStable()&&!i.enableSimulation&&(i.beforeStep&&i.beforeStep(),i.step(),t=!1,e=!0)};if(this.graphLayoutsLookup){for(s(!1,this),this.graphLayoutsLookup.forEach(t=>t.start());!t;)t=!0,this.graphLayoutsLookup.forEach(i);e&&this.series.forEach(t=>{t&&t.layout&&t.render()})}}return{compose:function(t){n(o,"GraphLayout")&&(r(t,"afterPrint",a),r(t,"beforePrint",h),r(t,"predraw",l),r(t,"render",d))},integrations:{},layouts:{}}}),i(e,"Series/NodesComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i;let{series:{prototype:s,prototype:{pointClass:{prototype:o}}}}=t,{defined:r,extend:n,find:a,merge:h,pick:l}=e;return function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),s.destroy.apply(this,arguments)}function i(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),s.setData.apply(this,arguments)}function d(t){let e=arguments,i=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&i.forEach(t=>{t&&t.series&&(o.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&o.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&o.setState.apply(t.toNode,e)))}),o.setState.apply(this,e)}function p(t,e,i,s){let r=this.series.options.nodes,n=this.series.options.data,a=n&&n.length||0,d=n&&n[this.index];if(o.update.call(this,t,!this.isNode&&e,i,s),this.isNode){let t=(r||[]).reduce((t,e,i)=>this.id===e.id?i:t,-1),s=h(r&&r[t]||{},n&&n[this.index]||{});n&&(d?n[this.index]=d:n.length=a