react-native-bundle-discovery 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.discoveryrc.js CHANGED
@@ -2,7 +2,7 @@ const path = require("path");
2
2
 
3
3
  module.exports = {
4
4
  name: "react-native-bundle-discovery",
5
- data: () => require("./tmp/rainbow-metro-stats.json"),
5
+ data: () => require("./tmp/metro-stats.json"),
6
6
  setup: path.resolve(__dirname, "setup.js"),
7
7
  view: {
8
8
  assets: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bundle-discovery",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "index.js",
5
5
  "bin": "lib/bin.js",
6
6
  "repository": "git@github.com:retyui/react-native-bundle-discovery.git",
@@ -12,11 +12,9 @@
12
12
  "build": "npx discovery-build --config .discoveryrc.js --output build --serve-only-assets --single-file"
13
13
  },
14
14
  "dependencies": {
15
- "@babel/parser": "^7.0.0",
16
15
  "@discoveryjs/cli": "2.14.7",
17
16
  "@discoveryjs/discovery": "1.0.0-beta.99",
18
17
  "chalk": "^4.1.2",
19
- "highcharts": "12.2.0",
20
18
  "minimist": "^1.2.8",
21
19
  "prettier": "^3.8.1"
22
20
  },
package/queryHelpers.js CHANGED
@@ -42,10 +42,6 @@ Please do the following:
42
42
  postfix: helpers.plural(count, [singular, plural]),
43
43
  };
44
44
  },
45
- getHighchartsColors() {
46
- const Highcharts = require("highcharts");
47
- return Highcharts.getOptions().colors;
48
- },
49
45
  getModulesName(path) {
50
46
  const modules = path.split("node_modules/");
51
47
  const lastModule = modules[modules.length - 1];
@@ -0,0 +1 @@
1
+ !function(o,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(o._Highcharts):"function"==typeof define&&define.amd?define("highcharts/themes/high-contrast-dark",["highcharts/highcharts"],function(o){return r(o)}):"object"==typeof exports?exports["highcharts/themes/high-contrast-dark"]=r(o._Highcharts):o.Highcharts=r(o.Highcharts)}("undefined"==typeof window?this:window,o=>(()=>{"use strict";var r,e={944:r=>{r.exports=o}},t={};function l(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,l),i.exports}l.n=o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return l.d(r,{a:r}),r},l.d=(o,r)=>{for(var e in r)l.o(r,e)&&!l.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:r[e]})},l.o=(o,r)=>Object.prototype.hasOwnProperty.call(o,r);var i={};l.d(i,{default:()=>d});var n=l(944),a=l.n(n);let{setOptions:s}=a();!function(o){let r="#F0F0F3";o.options={colors:["#67B9EE","#CEEDA5","#9F6AE1","#FEA26E","#6BA48F","#EA3535","#8D96B7","#ECCA15","#20AA09","#E0C3E4"],chart:{backgroundColor:"#1f1f20",plotBorderColor:"#606063"},title:{style:{color:r}},subtitle:{style:{color:r}},xAxis:{gridLineColor:"#707073",labels:{style:{color:r}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:r}}},yAxis:{gridLineColor:"#707073",labels:{style:{color:r}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:r}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.85)",style:{color:r}},plotOptions:{series:{dataLabels:{color:r},marker:{lineColor:"#333"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:"white"},errorbar:{color:"white"},map:{nullColor:"#353535"}},legend:{backgroundColor:"transparent",itemStyle:{color:r},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#606063"},title:{style:{color:"#D0D0D0"}}},credits:{style:{color:r}},drilldown:{activeAxisLabelStyle:{color:r},activeDataLabelStyle:{color:r}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",theme:{fill:"#505053"}}},rangeSelector:{buttonTheme:{fill:"#505053",stroke:"#000000",style:{color:"#eee"},states:{hover:{fill:"#707073",stroke:"#000000",style:{color:r}},select:{fill:"#303030",stroke:"#101010",style:{color:r}}}},inputBoxBorderColor:"#505053",inputStyle:{backgroundColor:"#333",color:r},labelStyle:{color:r}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(180,180,255,0.2)",series:{color:"#7798BF",lineColor:"#A6C7ED"},xAxis:{gridLineColor:"#505053"}},scrollbar:{barBackgroundColor:"#808083",barBorderColor:"#808083",buttonArrowColor:"#CCC",buttonBackgroundColor:"#606063",buttonBorderColor:"#606063",rifleColor:"#FFF",trackBackgroundColor:"#404043",trackBorderColor:"#404043"}},o.apply=function(){s(o.options)}}(r||(r={}));let c=r;a().theme=c.options,c.apply();let d=a();return i.default})());
@@ -0,0 +1,13 @@
1
+ !/**
2
+ * Highcharts JS v12.5.0 (2026-01-12)
3
+ * @module highcharts/modules/exporting
4
+ * @requires highcharts
5
+ *
6
+ * Exporting module
7
+ *
8
+ * (c) 2010-2026 Highsoft AS
9
+ * Author: Torstein Honsi
10
+ *
11
+ * A commercial license may be required depending on use.
12
+ * See www.highcharts.com/license
13
+ */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.AST,e._Highcharts.Chart):"function"==typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts/highcharts"],function(e){return t(e,e.AST,e.Chart)}):"object"==typeof exports?exports["highcharts/modules/exporting"]=t(e._Highcharts,e._Highcharts.AST,e._Highcharts.Chart):e.Highcharts=t(e.Highcharts,e.Highcharts.AST,e.Highcharts.Chart)}("u"<typeof window?this:window,(e,t,n)=>(()=>{"use strict";var i,o,r={660:e=>{e.exports=t},944:t=>{t.exports=e},960:e=>{e.exports=n}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};s.d(l,{default:()=>eu});var c=s(944),h=s.n(c),p=s(660),d=s.n(p),u=s(960),g=s.n(u),f=i||(i={});f.compose=function(e){return e.navigation||(e.navigation=new m(e)),e};class m{constructor(e){this.updates=[],this.chart=e}addUpdate(e){this.chart.navigation.updates.push(e)}update(e,t){this.updates.forEach(n=>{n.call(this.chart,e,t)})}}f.Additions=m;let y=i,{isSafari:x,win:w,win:{document:b}}=h(),{error:v}=h(),S=w.URL||w.webkitURL||w;function C(e,t){let n=w.navigator,i=b.createElement("a");if("string"!=typeof e&&!(e instanceof String)&&n.msSaveOrOpenBlob)return void n.msSaveOrOpenBlob(e,t);if(e=""+e,n.userAgent.length>1e3)throw Error("Input too long");let o=/Edge\/\d+/.test(n.userAgent);if((x&&"string"==typeof e&&0===e.indexOf("data:application/pdf")||o||e.length>2e6)&&!(e=function(e){let t=e.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);if(t&&t.length>3&&w.atob&&w.ArrayBuffer&&w.Uint8Array&&w.Blob&&S.createObjectURL){let e=w.atob(t[3]),n=new w.ArrayBuffer(e.length),i=new w.Uint8Array(n);for(let t=0;t<i.length;++t)i[t]=e.charCodeAt(t);return S.createObjectURL(new w.Blob([i],{type:t[1]}))}}(e)||""))throw Error("Failed to convert to blob");if(void 0!==i.download)i.href=e,i.download=t,b.body.appendChild(i),i.click(),b.body.removeChild(i);else try{if(!w.open(e,"chart"))throw Error("Failed to open window")}catch{w.location.href=e}}let{isTouchDevice:E}=h(),O={exporting:{allowTableSorting:!0,libURL:"https://code.highcharts.com/12.5.0/lib/",local:!0,type:"image/png",url:`https://export-svg.highcharts.com?v=${h().version}`,pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadSVG"]}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen?.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.exporting?.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:async function(){await this.exporting?.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:async function(){await this.exporting?.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:async function(){await this.exporting?.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:async function(){await this.exporting?.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:5,height:28,y:-5,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:E?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}};!function(e){let t=[];function n(e,t,n,i){return[["M",e,t+2.5],["L",e+n,t+2.5],["M",e,t+i/2+.5],["L",e+n,t+i/2+.5],["M",e,t+i-1.5],["L",e+n,t+i-1.5]]}function i(e,t,n,i){let o=i/3-2,r=[];return r.concat(this.circle(n-o,t,o,o),this.circle(n-o,t+o+4,o,o),this.circle(n-o,t+2*(o+4),o,o))}e.compose=function(e){if(-1===t.indexOf(e)){t.push(e);let o=e.prototype.symbols;o.menu=n,o.menuball=i.bind(o)}}}(o||(o={}));let T=o,{composed:k}=h(),{addEvent:F,fireEvent:R,pushUnique:N}=h();function P(){this.fullscreen=new H(this)}class H{static compose(e){N(k,"Fullscreen")&&F(e,"beforeRender",P)}constructor(e){this.chart=e,this.isOpen=!1;const t=e.renderTo;!this.browserProps&&("function"==typeof t.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:t.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:t.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:t.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let e=this,t=e.chart,n=t.options.chart;R(t,"fullscreenClose",void 0,function(){e.isOpen&&e.browserProps&&t.container.ownerDocument instanceof Document&&t.container.ownerDocument[e.browserProps.exitFullscreen](),e.unbindFullscreenEvent&&(e.unbindFullscreenEvent=e.unbindFullscreenEvent()),t.setSize(e.origWidth,e.origHeight,!1),e.origWidth=void 0,e.origHeight=void 0,n.width=e.origWidthOption,n.height=e.origHeightOption,e.origWidthOption=void 0,e.origHeightOption=void 0,e.isOpen=!1,e.setButtonText()})}open(){let e=this,t=e.chart,n=t.options.chart;R(t,"fullscreenOpen",void 0,function(){if(n&&(e.origWidthOption=n.width,e.origHeightOption=n.height),e.origWidth=t.chartWidth,e.origHeight=t.chartHeight,e.browserProps){let n=F(t.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(t.setSize(null,null,!1),e.isOpen=!0,e.setButtonText())}),i=F(t,"destroy",n);e.unbindFullscreenEvent=()=>{n(),i()};let o=t.renderTo[e.browserProps.requestFullscreen]();o&&o.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let e=this.chart,t=e.exporting?.divElements,n=e.options.exporting,i=n&&n.buttons&&n.buttons.contextButton.menuItems,o=e.options.lang;if(n?.menuItemDefinitions&&o?.exitFullscreen&&o.viewFullscreen&&i&&t){let e=t[i.indexOf("viewFullscreen")];e&&d().setElementHTML(e,this.isOpen?o.exitFullscreen:n.menuItemDefinitions.viewFullscreen?.textKey||o.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}let{win:L}=h(),{discardElement:M,objectEach:A}=h(),D={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},n=new XMLHttpRequest;function i(t,n){e.error&&e.error(t,n)}if(!e.url)return!1;n.open((e.type||"get").toUpperCase(),e.url,!0),e.headers?.["Content-Type"]||n.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),A(e.headers,function(e,t){n.setRequestHeader(t,e)}),e.responseType&&(n.responseType=e.responseType),n.onreadystatechange=function(){let t;if(4===n.readyState){if(200===n.status){if("blob"!==e.responseType&&(t=n.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return i(n,e)}return e.success?.(t,n)}i(n,n.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),n.send(e.data)},getJSON:function(e,t){D.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})}};D.post=async function(e,t,n){let i=new L.FormData;A(t,function(e,t){i.append(t,e)}),i.append("b64","true");let o=await L.fetch(e,{method:"POST",body:i,...n});if(o.ok){let e=await o.text(),n=document.createElement("a");n.href=`data:${t.type};base64,${e}`,n.download=t.filename,n.click(),M(n)}};let{defaultOptions:I,setOptions:U}=h(),{composed:j,doc:B,isFirefox:G,isMS:$,isSafari:V,SVG_NS:W,win:q}=h(),{addEvent:z,clearTimeout:K,createElement:J,css:_,discardElement:X,error:Y,extend:Z,find:Q,fireEvent:ee,isObject:et,merge:en,objectEach:ei,pick:eo,pushUnique:er,removeEvent:ea,splat:es,uniqueKey:el}=h();d().allowedAttributes.push("data-z-index","fill-opacity","filter","preserveAspectRatio","rx","ry","stroke-dasharray","stroke-linejoin","stroke-opacity","text-anchor","transform","transform-origin","version","viewBox","visibility","xmlns","xmlns:xlink"),d().allowedTags.push("desc","clippath","fedropshadow","femorphology","g","image");let ec=q.URL||q.webkitURL||q;class eh{constructor(e,t){this.options={},this.chart=e,this.options=t,this.btnCount=0,this.buttonOffset=0,this.divElements=[],this.svgElements=[]}static hyphenate(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})}static async imageToDataURL(e,t,n){let i=await eh.loadImage(e),o=B.createElement("canvas"),r=o?.getContext("2d");if(r)return o.height=i.height*t,o.width=i.width*t,r.drawImage(i,0,0,o.width,o.height),o.toDataURL(n);throw Error("No canvas found!")}static async fetchCSS(e){let t=await fetch(e).then(e=>e.text()),n=new CSSStyleSheet;return n.replaceSync(t),n}static async handleStyleSheet(e,t){try{for(let n of Array.from(e.cssRules)){if(n instanceof CSSImportRule){let e=await eh.fetchCSS(n.href);await eh.handleStyleSheet(e,t)}if(n instanceof CSSFontFaceRule){let i=n.cssText;if(e.href){let t=e.href,n=/url\(\s*(['"]?)(?![a-z]+:|\/\/)([^'")]+?)\1\s*\)/gi;i=i.replace(n,(e,n,i)=>{let o=new URL(i,t).href;return`url(${n}${o}${n})`})}t.push(i)}}}catch{if(e.href){let n=await eh.fetchCSS(e.href);await eh.handleStyleSheet(n,t)}}}static async fetchStyleSheets(){let e=[];for(let t of Array.from(B.styleSheets))await eh.handleStyleSheet(t,e);return e}static async inlineFonts(e){let t=await eh.fetchStyleSheets(),n=/url\(([^)]+)\)/g,i=[],o=t.join("\n"),r;for(;r=n.exec(o);){let e=r[1].replace(/['"]/g,"");i.includes(e)||i.push(e)}let a=e=>{let t="",n=new Uint8Array(e);for(let e=0;e<n.byteLength;e++)t+=String.fromCharCode(n[e]);return btoa(t)},s={};for(let e of i)try{let t=await fetch(e),n=t.headers.get("Content-Type")||"",i=a(await t.arrayBuffer());s[e]=`data:${n};base64,${i}`}catch{}o=o.replace(n,(e,t)=>{let n=t.replace(/['"]/g,"");return`url(${s[n]||n})`});let l=document.createElementNS("http://www.w3.org/2000/svg","style");return l.textContent=o,e.append(l),e}static loadImage(e){return new Promise((t,n)=>{let i=new q.Image;i.crossOrigin="Anonymous",i.onload=()=>{setTimeout(()=>{t(i)},eh.loadEventDeferDelay)},i.onerror=e=>{n(e)},i.src=e})}static prepareImageOptions(e){let t=e?.type||"image/png",n=e?.libURL||I.exporting?.libURL;return{type:t,filename:(e?.filename||"chart")+"."+("image/svg+xml"===t?"svg":t.split("/")[1]),scale:e?.scale||1,libURL:n?.slice(-1)!=="/"?n+"/":n}}static sanitizeSVG(e,t){let n=e.indexOf("</svg>")+6,i=e.indexOf("<foreignObject")>-1,o=e.substr(n);return e=e.substr(0,n),i?e=e.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />"):o&&t?.exporting?.allowHTML&&(o='<foreignObject x="0" y="0" width="'+t.chart.width+'" height="'+t.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+o.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"</body></foreignObject>",e=e.replace("</svg>",o+"</svg>")),e=e.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery\d+="[^"]+"/g,"").replace(/url\(("|&quot;)(.*?)("|&quot;)\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g," xlink:href=").replace(/\n+/g," ").replace(/&nbsp;/g,"\xa0").replace(/&shy;/g,"\xad")}static svgToDataURL(e){let t=q.navigator.userAgent,n=t.indexOf("WebKit")>-1&&0>t.indexOf("Chrome");try{if(!n&&-1===e.indexOf("<foreignObject"))return ec.createObjectURL(new q.Blob([e],{type:"image/svg+xml;charset-utf-16"}))}catch{}return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(e)}addButton(e){let t,n=this,i=n.chart,o=i.renderer,r=en(i.options.navigation?.buttonOptions,e),a=r.onclick,s=r.menuItems,l=r.symbolSize||12;if(!1===r.enabled||!r.theme)return;let c=i.styledMode?{}:r.theme,h=()=>{};a?h=function(e){e&&e.stopPropagation(),a.call(i,e)}:s&&(h=function(e){e&&e.stopPropagation(),n.contextMenu(p.menuClassName,s,p.translateX||0,p.translateY||0,p.width||0,p.height||0,p),p.setState(2)}),r.text&&r.symbol?c.paddingLeft=eo(c.paddingLeft,30):r.text||Z(c,{width:r.width,height:r.height,padding:0});let p=o.button(r.text||"",0,0,h,c,void 0,void 0,void 0,void 0,r.useHTML).addClass(e.className||"").attr({title:eo(i.options.lang[r._titleKey||r.titleKey],"")});p.menuClassName=e.menuClassName||"highcharts-menu-"+n.btnCount++,r.symbol&&(t=o.symbol(r.symbol,Math.round((r.symbolX||0)-l/2),Math.round((r.symbolY||0)-l/2),l,l,{width:l,height:l}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(p),i.styledMode||t.attr({stroke:r.symbolStroke,fill:r.symbolFill,"stroke-width":r.symbolStrokeWidth||1})),p.add(n.group).align(Z(r,{width:p.width,x:eo(r.x,n.buttonOffset)}),!0,"spacingBox"),n.buttonOffset+=((p.width||0)+(r.buttonSpacing||0))*("right"===r.align?-1:1),n.svgElements.push(p,t)}afterPrint(){let e=this.chart;if(!this.printReverseInfo)return;let{childNodes:t,origDisplay:n,resetParams:i}=this.printReverseInfo;this.moveContainers(e.renderTo),[].forEach.call(t,function(e,t){1===e.nodeType&&(e.style.display=n[t]||"")}),this.isPrinting=!1,i&&e.setSize.apply(e,i),delete this.printReverseInfo,eh.printingChart=void 0,ee(e,"afterPrint")}beforePrint(){let e=this.chart,t=B.body,n=this.options.printMaxWidth,i={childNodes:t.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,e.pointer?.reset(void 0,0),ee(e,"beforePrint"),n&&e.chartWidth>n&&(i.resetParams=[e.options.chart.width,void 0,!1],e.setSize(n,void 0,!1)),[].forEach.call(i.childNodes,function(e,t){1===e.nodeType&&(i.origDisplay[t]=e.style.display,e.style.display="none")}),this.moveContainers(t),this.printReverseInfo=i}contextMenu(e,t,n,i,o,r,a){let s=this,l=s.chart,c=l.options.navigation,h=l.chartWidth,p=l.chartHeight,u="cache-"+e,g=Math.max(o,r),f,m=l[u];m||(s.contextMenuEl=l[u]=m=J("div",{className:e},{position:"absolute",zIndex:1e3,padding:g+"px",pointerEvents:"auto",...l.renderer.style},l.scrollablePlotArea?.fixedDiv||l.container),f=J("ul",{className:"highcharts-menu"},l.styledMode?{}:{listStyle:"none",margin:0,padding:0},m),l.styledMode||_(f,Z({MozBoxShadow:"3px 3px 10px #0008",WebkitBoxShadow:"3px 3px 10px #0008",boxShadow:"3px 3px 10px #0008"},c?.menuStyle||{})),m.hideMenu=function(){_(m,{display:"none"}),a&&a.setState(0),l.exporting&&(l.exporting.openMenu=!1),_(l.renderTo,{overflow:"hidden"}),_(l.container,{overflow:"hidden"}),K(m.hideTimer),ee(l,"exportMenuHidden")},s.events?.push(z(m,"mouseleave",function(){m.hideTimer=q.setTimeout(m.hideMenu,500)}),z(m,"mouseenter",function(){K(m.hideTimer)}),z(B,"mouseup",function(t){l.pointer?.inClass(t.target,e)||m.hideMenu()}),z(m,"click",function(){l.exporting?.openMenu&&m.hideMenu()})),t.forEach(function(e){if("string"==typeof e&&s.options.menuItemDefinitions?.[e]&&(e=s.options.menuItemDefinitions[e]),et(e,!0)){let t;e.separator?t=J("hr",void 0,void 0,f):("viewData"===e.textKey&&s.isDataTableVisible&&(e.textKey="hideData"),t=J("li",{className:"highcharts-menu-item",onclick:function(t){t&&t.stopPropagation(),m.hideMenu(),"string"!=typeof e&&e.onclick&&e.onclick.apply(l,arguments)}},void 0,f),d().setElementHTML(t,e.text||l.options.lang[e.textKey]),l.styledMode||(t.onmouseover=function(){_(this,c?.menuItemHoverStyle||{})},t.onmouseout=function(){_(this,c?.menuItemStyle||{})},_(t,Z({cursor:"pointer"},c?.menuItemStyle||{})))),s.divElements.push(t)}}),s.divElements.push(f,m),s.menuHeight=m.offsetHeight,s.menuWidth=m.offsetWidth);let y={display:"block"};n+(s.menuWidth||0)>h?y.right=h-n-o-g+"px":y.left=n-g+"px",i+r+(s.menuHeight||0)>p&&a.alignOptions?.verticalAlign!=="top"?y.bottom=p-i-g+"px":y.top=i+r-g+"px",_(m,y),_(l.renderTo,{overflow:""}),_(l.container,{overflow:""}),l.exporting&&(l.exporting.openMenu=!0),ee(l,"exportMenuShown")}destroy(e){let t,n=e?e.target:this.chart,{divElements:i,events:o,svgElements:r}=this;r.forEach((e,i)=>{e&&(e.onclick=e.ontouchstart=null,n[t="cache-"+e.menuClassName]&&delete n[t],r[i]=e.destroy())}),r.length=0,this.group&&(this.group.destroy(),delete this.group),i.forEach(function(e,t){e&&(K(e.hideTimer),ea(e,"mouseleave"),i[t]=e.onmouseout=e.onmouseover=e.ontouchstart=e.onclick=null,X(e))}),i.length=0,o&&(o.forEach(function(e){e()}),o.length=0)}async downloadSVG(e,t){let n,i={svg:e,exportingOptions:t,exporting:this};if(ee(eh.prototype,"downloadSVG",i),i.defaultPrevented)return;let{type:o,filename:r,scale:a,libURL:s}=eh.prepareImageOptions(t);if("application/pdf"===o)throw Error("Offline exporting logic for PDF type is not found.");if("image/svg+xml"===o){if(void 0!==q.MSBlobBuilder){let t=new q.MSBlobBuilder;t.append(e),n=t.getBlob("image/svg+xml")}else n=eh.svgToDataURL(e);C(n,r)}else{n=eh.svgToDataURL(e);try{eh.objectURLRevoke=!0;let e=await eh.imageToDataURL(n,a,o);C(e,r)}catch(h){if("No canvas found!"===h.message)throw h;if(e.length>1e8)throw Error("Input too long");let t=B.createElement("canvas"),n=t.getContext("2d"),i=e.match(/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/),c=e.match(/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);if(n&&i&&c){let h=i[1]*a,p=c[1]*a;if(t.width=h,t.height=p,!q.canvg){var l;eh.objectURLRevoke=!0,await (l=s+"canvg.js",new Promise((e,t)=>{let n=b.getElementsByTagName("head")[0],i=b.createElement("script");i.type="text/javascript",i.src=l,i.onload=()=>{e()},i.onerror=()=>{let e=`Error loading script ${l}`;v(e),t(Error(e))},n.appendChild(i)}))}q.canvg.Canvg.fromString(n,e).start(),C(q.navigator.msSaveOrOpenBlob?t.msToBlob():t.toDataURL(o),r)}}finally{if(eh.objectURLRevoke)try{ec.revokeObjectURL(n)}catch{}}}}async exportChart(e,t){if((e=en(this.options,e)).local)await this.localExport(e,t||{});else{let n=this.getSVGForExport(e,t);e.url&&await D.post(e.url,{filename:e.filename?e.filename.replace(/\//g,"-"):this.getFilename(),type:e.type,width:e.width,scale:e.scale,svg:n},e.fetchOptions)}}async fallbackToServer(e,t){!1===e.fallbackToExportServer?e.error?e.error(e,t):Y(28,!0):"application/pdf"===e.type&&(e.local=!1,await this.exportChart(e))}getChartHTML(e){let t=this.chart;return e&&this.inlineStyles(),this.resolveCSSVariables(),t.container.innerHTML}getFilename(){let e=this.chart.userOptions.title?.text,t=this.options.filename;return t?t.replace(/\//g,"-"):("string"==typeof e&&(t=e.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z\d\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!t||t.length<5)&&(t="chart"),t)}getSVG(e){let t=this.chart,n,i,o=en(t.options,e);o.plotOptions=en(t.userOptions.plotOptions,e?.plotOptions),o.time=en(t.userOptions.time,e?.time);let r=J("div",void 0,{position:"absolute",top:"-9999em",width:t.chartWidth+"px",height:t.chartHeight+"px"},B.body),a=t.renderTo.style.width,s=t.renderTo.style.height,l=o.exporting?.sourceWidth||o.chart.width||/px$/.test(a)&&parseInt(a,10)||(o.isGantt?800:600),c=o.exporting?.sourceHeight||o.chart.height||/px$/.test(s)&&parseInt(s,10)||400;Z(o.chart,{animation:!1,renderTo:r,forExport:!0,renderer:"SVGRenderer",width:l,height:c}),o.exporting&&(o.exporting.enabled=!1),delete o.data,o.series=[],t.series.forEach(function(e){(i=en(e.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:e.visible})).isInternal||o?.series?.push(i)});let h={};t.axes.forEach(function(e){e.userOptions.internalKey||(e.userOptions.internalKey=el()),o&&!e.options.isInternal&&(h[e.coll]||(h[e.coll]=!0,o[e.coll]=[]),o[e.coll].push(en(e.userOptions,{visible:e.visible,type:e.type,uniqueNames:e.uniqueNames})))}),o.colorAxis=t.userOptions.colorAxis;let p=new t.constructor(o,t.callback);return e&&["xAxis","yAxis","series"].forEach(function(t){e[t]&&p.update({[t]:e[t]})}),t.axes.forEach(function(t){let n=Q(p.axes,e=>e.options.internalKey===t.userOptions.internalKey);if(n){let i=t.getExtremes(),o=es(e?.[t.coll]||{})[0],r="min"in o?o.min:i.userMin,a="max"in o?o.max:i.userMax;(void 0!==r&&r!==n.min||void 0!==a&&a!==n.max)&&n.setExtremes(r??void 0,a??void 0,!0,!1)}}),n=p.exporting?.getChartHTML(t.styledMode||o.exporting?.applyStyleSheets)||"",ee(t,"getSVG",{chartCopy:p}),n=eh.sanitizeSVG(n,o),o=void 0,p.destroy(),X(r),n}getSVGForExport(e,t){let n=this.options;return this.getSVG(en({chart:{borderRadius:0}},n.chartOptions,t,{exporting:{sourceWidth:e?.sourceWidth||n.sourceWidth,sourceHeight:e?.sourceHeight||n.sourceHeight}}))}inlineStyles(){let e,t=eh.inlineDenylist,n=eh.inlineAllowlist,i={},o=J("iframe",void 0,{width:"1px",height:"1px",visibility:"hidden"},B.body),r=o.contentWindow?.document;r&&r.body.appendChild(r.createElementNS(W,"svg")),!function o(a){let s,l,c,h,p,d,u={};if(r&&1===a.nodeType&&-1===eh.unstyledElements.indexOf(a.nodeName)){if(s=q.getComputedStyle(a,null),l="svg"===a.nodeName?{}:q.getComputedStyle(a.parentNode,null),!i[a.nodeName]){e=r.getElementsByTagName("svg")[0],c=r.createElementNS(a.namespaceURI,a.nodeName),e.appendChild(c);let t=q.getComputedStyle(c,null),n={};for(let e in t)e.length<1e3&&"string"==typeof t[e]&&!/^\d+$/.test(e)&&(n[e]=t[e]);i[a.nodeName]=n,"text"===a.nodeName&&delete i.text.fill,e.removeChild(c)}for(let e in s)(G||$||V||Object.hasOwnProperty.call(s,e))&&function(e,o){if(h=p=!1,n.length){for(d=n.length;d--&&!p;)p=n[d].test(o);h=!p}for("transform"===o&&"none"===e&&(h=!0),d=t.length;d--&&!h;){if(o.length>1e3)throw Error("Input too long");h=t[d].test(o)||"function"==typeof e}!h&&(l[o]!==e||"svg"===a.nodeName)&&i[a.nodeName][o]!==e&&(eh.inlineToAttributes&&-1===eh.inlineToAttributes.indexOf(o)?u[o]=e:e&&a.setAttribute(eh.hyphenate(o),e))}(s[e],e);if(_(a,u),"svg"===a.nodeName&&a.setAttribute("stroke-width","1px"),"text"===a.nodeName)return;[].forEach.call(a.children||a.childNodes,o)}}(this.chart.container.querySelector("svg")),e.parentNode.removeChild(e),o.parentNode.removeChild(o)}async localExport(e,t){let n=this.chart,i,o,r=null,a;if($&&n.styledMode&&!eh.inlineAllowlist.length&&eh.inlineAllowlist.push(/^blockSize/,/^border/,/^caretColor/,/^color/,/^columnRule/,/^columnRuleColor/,/^cssFloat/,/^cursor/,/^fill$/,/^fillOpacity/,/^font/,/^inlineSize/,/^length/,/^lineHeight/,/^opacity/,/^outline/,/^parentRule/,/^rx$/,/^ry$/,/^stroke/,/^textAlign/,/^textAnchor/,/^textDecoration/,/^transform/,/^vectorEffect/,/^visibility/,/^x$/,/^y$/),$&&("application/pdf"===e.type||n.container.getElementsByTagName("image").length&&"image/svg+xml"!==e.type)||"application/pdf"===e.type&&[].some.call(n.container.getElementsByTagName("image"),function(e){let t=e.getAttribute("href");return""!==t&&"string"==typeof t&&0!==t.indexOf("data:")}))return void await this.fallbackToServer(e,Error("Image type not supported for this chart/browser."));let s=z(n,"getSVG",e=>{o=e.chartCopy.options,a=(i=e.chartCopy.container.cloneNode(!0))&&i.getElementsByTagName("image")||[]});try{let n;for(let n of(this.getSVGForExport(e,t),a?Array.from(a):[]))if(r=n.getAttributeNS("http://www.w3.org/1999/xlink","href")){eh.objectURLRevoke=!1;let t=await eh.imageToDataURL(r,e?.scale||1,e?.type||"image/png");n.setAttributeNS("http://www.w3.org/1999/xlink","href",t)}else n.parentNode.removeChild(n);let s=i?.querySelector("svg");s&&!e.chartOptions?.chart?.style?.fontFamily&&await eh.inlineFonts(s);let l=(n=i?.innerHTML,eh.sanitizeSVG(n||"",o));if(l.indexOf("<foreignObject")>-1&&"image/svg+xml"!==e.type&&($||"application/pdf"===e.type))throw Error("Image type not supported for charts with embedded HTML");return await this.downloadSVG(l,Z({filename:this.getFilename()},e)),l}catch(t){await this.fallbackToServer(e,t)}finally{s()}}moveContainers(e){let t=this.chart,{scrollablePlotArea:n}=t;(n?[n.fixedDiv,n.scrollingContainer]:[t.container]).forEach(function(t){e.appendChild(t)})}print(){let e=this.chart;this.isPrinting||(eh.printingChart=e,V||this.beforePrint(),setTimeout(()=>{q.focus(),q.print(),V||setTimeout(()=>{e.exporting?.afterPrint()},1e3)},1))}render(){let e=this,{chart:t,options:n}=e,i=e?.isDirty||!e?.svgElements.length;e.buttonOffset=0,e.isDirty&&e.destroy(),i&&!1!==n.enabled&&(e.events=[],e.group||(e.group=t.renderer.g("exporting-group").attr({zIndex:3}).add()),ei(n?.buttons,function(t){e.addButton(t)}),e.isDirty=!1)}resolveCSSVariables(){Array.from(this.chart.container.querySelectorAll("*")).forEach(e=>{["color","fill","stop-color","stroke"].forEach(t=>{let n=e.getAttribute(t);n?.includes("var(")&&e.setAttribute(t,getComputedStyle(e).getPropertyValue(t));let i=e.style?.[t];i?.includes("var(")&&(e.style[t]=getComputedStyle(e).getPropertyValue(t))})})}update(e,t){this.isDirty=!0,en(!0,this.options,e),eo(t,!0)&&this.chart.redraw()}}eh.inlineAllowlist=[],eh.inlineDenylist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^\d+$/],eh.inlineToAttributes=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"],eh.loadEventDeferDelay=150*!!$,eh.unstyledElements=["clipPath","defs","desc"],function(e){function t(e){let t=e.exporting;t&&(t.render(),z(e,"redraw",function(){this.exporting?.render()}),z(e,"destroy",function(){this.exporting?.destroy()}))}function n(){let t=this;t.options.exporting&&(t.exporting=new e(t,t.options.exporting),y.compose(t).navigation.addUpdate((e,n)=>{t.exporting&&(t.exporting.isDirty=!0,en(!0,t.options.navigation,e),eo(n,!0)&&t.redraw())}))}function i({alignTo:e,key:t,textPxLength:n}){let i=this.options.exporting,{align:o,buttonSpacing:r=0,verticalAlign:a,width:s=0}=en(this.options.navigation?.buttonOptions,i?.buttons?.contextButton),l=e.width-n,c=s+r;(i?.enabled??!0)&&"title"===t&&"right"===o&&"top"===a&&l<2*c&&(l<c?e.width-=c:this.title?.alignValue!=="left"&&(e.x-=c-l/2))}e.compose=function(o,r){T.compose(r),H.compose(o),er(j,"Exporting")&&(Z(g().prototype,{exportChart:async function(e,t){await this.exporting?.exportChart(e,t)},getChartHTML:function(e){return this.exporting?.getChartHTML(e)},getFilename:function(){return this.exporting?.getFilename()},getSVG:function(e){return this.exporting?.getSVG(e)},print:function(){return this.exporting?.print()}}),o.prototype.callbacks.push(t),z(o,"afterInit",n),z(o,"layOutTitle",i),V&&q.matchMedia("print").addListener(function(t){e.printingChart&&(t.matches?e.printingChart.exporting?.beforePrint():e.printingChart.exporting?.afterPrint())}),U(O))}}(eh||(eh={}));let ep=eh,ed=h();ed.Exporting=ep,ed.HttpUtilities=ed.HttpUtilities||D,ed.ajax=ed.HttpUtilities.ajax,ed.getJSON=ed.HttpUtilities.getJSON,ed.post=ed.HttpUtilities.post,ep.compose(ed.Chart,ed.Renderer);let eu=h();return l.default})());
@@ -0,0 +1 @@
1
+ !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)}("undefined"==typeof window?this:window,(t,e,i)=>(()=>{"use strict";var s,o={28:t=>{t.exports=e},512:t=>{t.exports=i},563:e=>{e.exports=t}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return o[t](i,i.exports,a),i.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};a.d(n,{default:()=>tS});var h=a(563),l=a.n(h),d=a(28),p=a.n(d);let{composed:c}=l(),{addEvent:u,pushUnique:f}=l();function m(){let t,e,i,s,o=this;o.container&&(t=u(o.container,"mousedown",t=>{e&&e(),i&&i(),(s=o.hoverPoint)&&s.series&&s.series.hasDraggableNodes&&s.series.options.draggable&&(s.series.onMouseDown(s,t),e=u(o.container,"mousemove",t=>s&&s.series&&s.series.onMouseMove(s,t)),i=u(o.container.ownerDocument,"mouseup",t=>(e(),i(),s&&s.series&&s.series.onMouseUp(s,t))))})),u(o,"destroy",function(){t()})}let g={compose:function(t){f(c,"DragNodes")&&u(t,"load",m)},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,o=this.chart,r=o.pointer?.normalize(e)||e,a=t.fixedPosition.chartX-r.chartX,n=t.fixedPosition.chartY-r.chartY,h=o.graphLayoutsLookup;(Math.abs(a)>5||Math.abs(n)>5)&&(i=t.fixedPosition.plotX-a,s=t.fixedPosition.plotY-n,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)})}},{setAnimation:y}=l(),{composed:x}=l(),{addEvent:b,pushUnique:k}=l();function v(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(t=>{t.updateSimulation()}),this.redraw())}function N(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(t=>{t.updateSimulation(!1)}),this.redraw())}function L(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(t=>{t.stop()})}function P(){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(y(!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()})}}let w={compose:function(t){k(x,"GraphLayout")&&(b(t,"afterPrint",v),b(t,"beforePrint",N),b(t,"predraw",L),b(t,"render",P))},integrations:{},layouts:{}};var S=a(512),M=a.n(S);let{series:{prototype:X,prototype:{pointClass:{prototype:T}}}}=M(),{defined:Y,extend:D,find:E,merge:F,pick:C}=l();!function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),X.destroy.apply(this,arguments)}function i(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),X.setData.apply(this,arguments)}function s(t){let e=arguments,i=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&i.forEach(t=>{t&&t.series&&(T.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&T.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&T.setState.apply(t.toNode,e)))}),T.setState.apply(this,e)}function o(t,e,i,s){let o=this.series.options.nodes,r=this.series.options.data,a=r?.length||0,n=r?.[this.index];if(T.update.call(this,t,!this.isNode&&e,i,s),this.isNode){let t=(o||[]).reduce((t,e,i)=>this.id===e.id?i:t,-1),s=F(o&&o[t]||{},r?.[this.index]||{});r&&(n?r[this.index]=n:r.length=a),o?t>=0?o[t]=s:o.push(s):this.series.options.nodes=[s],C(e,!0)&&this.series.chart.redraw(i)}}t.compose=function(t,r){let a=t.prototype,n=r.prototype;return a.setNodeState=s,a.setState=s,a.update=o,n.destroy=e,n.setData=i,r},t.createNode=function(t){let e=this.pointClass,i=(t,e)=>E(t,t=>t.id===e),s=i(this.nodes,t),o;if(!s){o=this.options.nodes&&i(this.options.nodes,t);let r=new e(this,D({className:"highcharts-node",isNode:!0,id:t,y:1},o));r.linksTo=[],r.linksFrom=[],r.getSum=function(){let t=0,e=0;return r.linksTo.forEach(e=>{t+=e.weight||0}),r.linksFrom.forEach(t=>{e+=t.weight||0}),Math.max(t,e)},r.offset=function(t,e){let i=0;for(let s=0;s<r[e].length;s++){if(r[e][s]===t)return i;i+=r[e][s].weight}},r.hasShape=function(){let t=0;return r.linksTo.forEach(e=>{e.outgoing&&t++}),!r.linksTo.length||t!==r.linksTo.length},r.index=this.nodes.push(r)-1,s=r}return s.formatPrefix="node",s.name=s.name||s.options.id||"",s.mass=C(s.options.mass,s.options.marker&&s.options.marker.radius,this.options.marker&&this.options.marker.radius,4),s},t.destroy=e,t.generatePoints=function(){let t=this.chart,e={};X.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(i=>{Y(i.from)&&(e[i.from]||(e[i.from]=this.createNode(i.from)),e[i.from].linksFrom.push(i),i.fromNode=e[i.from],t.styledMode?i.colorIndex=C(i.options.colorIndex,e[i.from].colorIndex):i.color=i.options.color||e[i.from].color),Y(i.to)&&(e[i.to]||(e[i.to]=this.createNode(i.to)),e[i.to].linksTo.push(i),i.toNode=e[i.to]),i.name=i.name||i.id},this),this.nodeLookup=e},t.setNodeState=s,t.updateNode=o}(s||(s={}));let I=s,{series:{prototype:A,prototype:{pointClass:O}}}=M(),{addEvent:R,css:H,defined:B,extend:G,pick:q}=l();class _ extends O{destroy(){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"]),O.prototype.destroy.apply(this,arguments)}getDegree(){let t=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===t?1:t}getLinkAttributes(){let t=this.series.options.link,e=this.options;return{"stroke-width":q(e.width,t.width),stroke:e.color||t.color,dashstyle:e.dashStyle||t.dashStyle,opacity:q(e.opacity,t.opacity,1)}}getLinkPath(){let 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]]}getMass(){let t=this.fromNode.mass,e=this.toNode.mass,i=t+e;return{fromNode:1-t/i,toNode:1-e/i}}constructor(t,e,i){super(t,e,i),this.series.options.draggable&&!this.series.chart.styledMode&&(R(this,"mouseOver",function(){H(this.series.chart.container,{cursor:"move"})}),R(this,"mouseOut",function(){H(this.series.chart.container,{cursor:"default"})}))}isValid(){return!this.isNode||B(this.id)}redrawLink(){let 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);let i=e[0],s=e[1];"M"===i[0]&&"L"===s[0]&&(this.plotX=(i[1]+s[1])/2,this.plotY=(i[2]+s[2])/2)}}remove(t,e){let i=this.series,s=i.options.nodes||[],o,r=s.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),A.removePoint.call(i,i.data.indexOf(t),!1,!1)}),i.points=i.data.slice(),i.nodes.splice(i.nodes.indexOf(this),1);r--;)if(s[r].id===this.options.id){i.options.nodes.splice(r,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)}renderLink(){let 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})})))}}G(_.prototype,{setState:I.setNodeState});let K={attractive:function(t,e,i,s){let o=t.getMass(),r=i.x/s*e,a=i.y/s*e;t.fromNode.fixedPosition||(t.fromNode.dispX-=r*o.fromNode/t.fromNode.degree,t.fromNode.dispY-=a*o.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.dispX+=r*o.toNode/t.toNode.degree,t.toNode.dispY+=a*o.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return t*t/e},barycenter:function(){let t=this.options.gravitationalConstant,e=this.barycenter.xFactor,i=this.barycenter.yFactor;this.nodes.forEach(function(s){if(!s.fixedPosition){let o=s.getDegree(),r=o*(1+o/2);s.dispX+=(e-s.plotX)*t*r/s.degree,s.dispY+=(i-s.plotY)*t*r/s.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;let i=e.temperature=t.vectorLength({x:e.dispX,y:e.dispY});0!==i&&(e.plotX+=e.dispX/i*Math.min(Math.abs(e.dispX),t.temperature),e.plotY+=e.dispY/i*Math.min(Math.abs(e.dispY),t.temperature))},repulsive:function(t,e,i,s){t.dispX+=i.x/s*e/t.degree,t.dispY+=i.y/s*e/t.degree},repulsiveForceFunction:function(t,e){return e*e/t}};class U{constructor(t){this.body=!1,this.isEmpty=!1,this.isInternal=!1,this.nodes=[],this.box=t,this.boxSize=Math.min(t.width,t.height)}divideBox(){let t=this.box.width/2,e=this.box.height/2;this.nodes[0]=new U({left:this.box.left,top:this.box.top,width:t,height:e}),this.nodes[1]=new U({left:this.box.left+t,top:this.box.top,width:t,height:e}),this.nodes[2]=new U({left:this.box.left+t,top:this.box.top+e,width:t,height:e}),this.nodes[3]=new U({left:this.box.left,top:this.box.top+e,width:t,height:e})}getBoxPosition(t){let e=t.plotX<this.box.left+this.box.width/2,i=t.plotY<this.box.top+this.box.height/2;return e?3*!i:i?1:2}insert(t,e){let i;this.isInternal?this.nodes[this.getBoxPosition(t)].insert(t,e-1):(this.isEmpty=!1,this.body?e?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,e-1),this.body=!0),this.nodes[this.getBoxPosition(t)].insert(t,e-1)):((i=new U({top:t.plotX||NaN,left:t.plotY||NaN,width:.1,height:.1})).body=t,i.isInternal=!1,this.nodes.push(i)):(this.isInternal=!1,this.body=t))}updateMassAndCenter(){let t=0,e=0,i=0;if(this.isInternal){for(let s of this.nodes)s.isEmpty||(t+=s.mass,e+=s.plotX*s.mass,i+=s.plotY*s.mass);e/=t,i/=t}else this.body&&(t=this.body.mass,e=this.body.plotX,i=this.body.plotY);this.mass=t,this.plotX=e,this.plotY=i}}let j=class{constructor(t,e,i,s){this.box={left:t,top:e,width:i,height:s},this.maxDepth=25,this.root=new U(this.box),this.root.isInternal=!0,this.root.isRoot=!0,this.root.divideBox()}calculateMassAndCenter(){this.visitNodeRecursive(null,null,function(t){t.updateMassAndCenter()})}insertNodes(t){for(let e of t)this.root.insert(e,this.maxDepth)}visitNodeRecursive(t,e,i){let s;if(t||(t=this.root),t===this.root&&e&&(s=e(t)),!1!==s){for(let o of t.nodes){if(o.isInternal){if(e&&(s=e(o)),!1===s)continue;this.visitNodeRecursive(o,e,i)}else o.body&&e&&e(o.body);i&&i(o)}t===this.root&&i&&i(t)}}},z={attractive:function(t,e,i){let s=t.getMass(),o=-i.x*e*this.diffTemperature,r=-i.y*e*this.diffTemperature;t.fromNode.fixedPosition||(t.fromNode.plotX-=o*s.fromNode/t.fromNode.degree,t.fromNode.plotY-=r*s.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.plotX+=o*s.toNode/t.toNode.degree,t.toNode.plotY+=r*s.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return(e-t)/t},barycenter:function(){let t=this.options.gravitationalConstant||0,e=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*t,i=(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-=i/t.mass/t.degree)})},getK:function(t){return Math.pow(t.box.width*t.box.height/t.nodes.length,.5)},integrate:function(t,e){let i=-t.options.friction,s=t.options.maxSpeed,o=e.prevX,r=e.prevY,a=(e.plotX+e.dispX-o)*i,n=(e.plotY+e.dispY-r)*i,h=Math.abs,l=h(a)/(a||1),d=h(n)/(n||1),p=l*Math.min(s,Math.abs(a)),c=d*Math.min(s,Math.abs(n));e.prevX=e.plotX+e.dispX,e.prevY=e.plotY+e.dispY,e.plotX+=p,e.plotY+=c,e.temperature=t.vectorLength({x:p,y:c})},repulsive:function(t,e,i){let s=e*this.diffTemperature/t.mass/t.degree;t.fixedPosition||(t.plotX+=i.x*s,t.plotY+=i.y*s)},repulsiveForceFunction:function(t,e){return(e-t)/t*+(e>t)}},{win:V}=l(),{clamp:Q,defined:$,isFunction:W,fireEvent:J,pick:Z}=l();class tt{constructor(){this.box={},this.currentStep=0,this.initialRendering=!0,this.links=[],this.nodes=[],this.series=[],this.simulation=!1}static compose(t){w.compose(t),w.integrations.euler=K,w.integrations.verlet=z,w.layouts["reingold-fruchterman"]=tt}init(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=w.integrations[t.integration],this.enableSimulation=t.enableSimulation,this.attractiveForce=Z(t.attractiveForce,this.integration.attractiveForceFunction),this.repulsiveForce=Z(t.repulsiveForce,this.integration.repulsiveForceFunction),this.approximation=t.approximation}updateSimulation(t){this.enableSimulation=Z(t,this.options.enableSimulation)}start(){let 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()}step(){let t=this.series;for(let t of(this.currentStep++,"barnes-hut"===this.approximation&&(this.createQuadTree(),this.quadTree.calculateMassAndCenter()),this.forces||[]))this[t+"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(let e of t)e.chart&&e.render();this.maxIterations--&&isFinite(this.temperature)&&!this.isStable()?(this.simulation&&V.cancelAnimationFrame(this.simulation),this.simulation=V.requestAnimationFrame(()=>this.step())):(this.simulation=!1,this.series.forEach(t=>{J(t,"afterSimulation")}))}}stop(){this.simulation&&V.cancelAnimationFrame(this.simulation)}setArea(t,e,i,s){this.box={left:t,top:e,width:i,height:s}}setK(){this.k=this.options.linkLength||this.integration.getK(this)}addElementsToCollection(t,e){for(let i of t)-1===e.indexOf(i)&&e.push(i)}removeElementFromCollection(t,e){let i=e.indexOf(t);-1!==i&&e.splice(i,1)}clear(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()}resetSimulation(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()}restartSimulation(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))}setMaxIterations(t){this.maxIterations=Z(t,this.options.maxIterations)}setTemperature(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)}setDiffTemperature(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)}setInitialRendering(t){this.initialRendering=t}createQuadTree(){this.quadTree=new j(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)}initPositions(){let t=this.options.initialPositions;if(W(t))for(let e of(t.call(this),this.nodes))$(e.prevX)||(e.prevX=e.plotX),$(e.prevY)||(e.prevY=e.plotY),e.dispX=0,e.dispY=0;else"circle"===t?this.setCircularPositions():this.setRandomPositions()}setCircularPositions(){let t,e=this.box,i=this.nodes,s=2*Math.PI/(i.length+1),o=i.filter(function(t){return 0===t.linksTo.length}),r={},a=this.options.initialPositionRadius,n=t=>{for(let e of t.linksFrom||[])r[e.toNode.id]||(r[e.toNode.id]=!0,h.push(e.toNode),n(e.toNode))},h=[];for(let t of o)h.push(t),n(t);if(h.length)for(let t of i)-1===h.indexOf(t)&&h.push(t);else h=i;for(let i=0,o=h.length;i<o;++i)(t=h[i]).plotX=t.prevX=Z(t.plotX,e.width/2+a*Math.cos(i*s)),t.plotY=t.prevY=Z(t.plotY,e.height/2+a*Math.sin(i*s)),t.dispX=0,t.dispY=0}setRandomPositions(){let t,e=this.box,i=this.nodes,s=i.length+1,o=t=>{let e=t*t/Math.PI;return e-Math.floor(e)};for(let r=0,a=i.length;r<a;++r)(t=i[r]).plotX=t.prevX=Z(t.plotX,e.width*o(r)),t.plotY=t.prevY=Z(t.plotY,e.height*o(s+r)),t.dispX=0,t.dispY=0}force(t,...e){this.integration[t].apply(this,e)}barycenterForces(){this.getBarycenter(),this.force("barycenter")}getBarycenter(){let t=0,e=0,i=0;for(let s of this.nodes)e+=s.plotX*s.mass,i+=s.plotY*s.mass,t+=s.mass;return this.barycenter={x:e,y:i,xFactor:e/t,yFactor:i/t},this.barycenter}barnesHutApproximation(t,e){let i,s,o=this.getDistXY(t,e),r=this.vectorLength(o);return t!==e&&0!==r&&(e.isInternal?e.boxSize/r<this.options.theta&&0!==r?(s=this.repulsiveForce(r,this.k),this.force("repulsive",t,s*e.mass,o,r),i=!1):i=!0:(s=this.repulsiveForce(r,this.k),this.force("repulsive",t,s*e.mass,o,r))),i}repulsiveForces(){if("barnes-hut"===this.approximation)for(let t of this.nodes)this.quadTree.visitNodeRecursive(null,e=>this.barnesHutApproximation(t,e));else{let t,e,i;for(let s of this.nodes)for(let o of this.nodes)s===o||s.fixedPosition||(i=this.getDistXY(s,o),0!==(e=this.vectorLength(i))&&(t=this.repulsiveForce(e,this.k),this.force("repulsive",s,t*o.mass,i,e)))}}attractiveForces(){let t,e,i;for(let s of this.links)s.fromNode&&s.toNode&&(t=this.getDistXY(s.fromNode,s.toNode),0!==(e=this.vectorLength(t))&&(i=this.attractiveForce(e,this.k),this.force("attractive",s,i,t,e)))}applyLimits(){for(let t of this.nodes)!t.fixedPosition&&(this.integration.integrate(this,t),this.applyLimitBox(t,this.box),t.dispX=0,t.dispY=0)}applyLimitBox(t,e){let i=t.radius;t.plotX=Q(t.plotX,e.left+i,e.width-i),t.plotY=Q(t.plotY,e.top+i,e.height-i)}coolDown(t,e,i){return t-e*i}isStable(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0}getSystemTemperature(){let t=0;for(let e of this.nodes)t+=e.temperature;return t}vectorLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}getDistR(t,e){let i=this.getDistXY(t,e);return this.vectorLength(i)}getDistXY(t,e){let i=t.plotX-e.plotX,s=t.plotY-e.plotY;return{x:i,y:s,absX:Math.abs(i),absY:Math.abs(s)}}}let{merge:te,syncTimeout:ti}=l(),{animObject:ts}=l(),{deg2rad:to}=l(),{addEvent:tr,merge:ta,uniqueKey:tn,defined:th,extend:tl}=l();function td(t,e){e=ta(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let i=this.renderer.url,s=this.text||this,o=s.textPath,{attributes:r,enabled:a}=e;if(t=t||o&&o.path,o&&o.undo(),t&&a){let e=tr(s,"afterModifyTree",e=>{if(t&&a){let o=t.attr("id");o||t.attr("id",o=tn());let a={x:0,y:0};th(r.dx)&&(a.dx=r.dx,delete r.dx),th(r.dy)&&(a.dy=r.dy,delete r.dy),s.attr(a),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let n=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:tl(r,{"text-anchor":r.textAnchor,href:`${i}#${o}`}),children:n}}});s.textPath={path:t,undo:e}}else s.attr({dx:0,dy:0}),delete s.textPath;return this.added&&(s.textCache="",this.renderer.buildText(s)),this}function tp(t){let e=t.bBox,i=this.element?.querySelector("textPath");if(i){let t=[],{b:s,h:o}=this.renderer.fontMetrics(this.element),r=o-s,a=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),n=i.innerHTML.replace(a,"").split(/<tspan class="highcharts-br"[^>]*>/),h=n.length,l=(t,e)=>{let{x:o,y:a}=e,n=(i.getRotationOfChar(t)-90)*to,h=Math.cos(n),l=Math.sin(n);return[[o-r*h,a-r*l],[o+s*h,a+s*l]]};for(let e=0,s=0;s<h;s++){let o=n[s].length;for(let r=0;r<o;r+=5)try{let o=e+r+s,[a,n]=l(o,i.getStartPositionOfChar(o));0===r?(t.push(n),t.push(a)):(0===s&&t.unshift(n),s===h-1&&t.push(a))}catch(t){break}e+=o-1;try{let o=e+s,r=i.getEndPositionOfChar(o),[a,n]=l(o,r);t.unshift(n),t.unshift(a)}catch(t){break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function tc(t){let e=t.labelOptions,i=t.point,s=e[i.formatPrefix+"TextPath"]||e.textPath;s&&!e.useHTML&&(this.setTextPath(i.getDataLabelPath?.(this)||i.graphic,s),i.dataLabelPath&&!s.enabled&&(i.dataLabelPath=i.dataLabelPath.destroy()))}let{noop:tu}=l(),{series:tf,seriesTypes:{column:{prototype:tm},line:{prototype:tg}}}=M(),{initDataLabels:ty,initDataLabelsDefer:tx}={initDataLabels:function(){let t=this.options.dataLabels;if(!this.dataLabelsGroup){let e=this.initDataLabelsGroup();return!this.chart.styledMode&&t?.style&&e.css(t.style),e.attr({opacity:0}),this.visible&&e.show(),e}return this.dataLabelsGroup.attr(te({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){let t=this.options.dataLabels;t?.defer&&this.options.layoutAlgorithm?.enableSimulation?ti(()=>{this.deferDataLabels=!1},t?ts(t.animation).defer:0):this.deferDataLabels=!1}},{addEvent:tb,defined:tk,extend:tv,merge:tN,pick:tL}=l();({compose:function(t){tr(t,"afterGetBBox",tp),tr(t,"beforeAddingDataLabel",tc);let e=t.prototype;e.setTextPath||(e.setTextPath=td)}}).compose(p());class tP extends tf{constructor(){super(...arguments),this.deferDataLabels=!0}static compose(t){g.compose(t),tt.compose(t)}deferLayout(){let t=this.options.layoutAlgorithm,e=this.chart.options.chart,i,s=this.chart.graphLayoutsStorage,o=this.chart.graphLayoutsLookup;this.visible&&(s||(this.chart.graphLayoutsStorage=s={},this.chart.graphLayoutsLookup=o=[]),(i=s[t.type])||(t.enableSimulation=tk(e.forExport)?!e.forExport:t.enableSimulation,s[t.type]=i=new w.layouts[t.type],i.init(t),o.splice(i.index,0,i)),this.layout=i,i.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),i.addElementsToCollection([this],i.series),i.addElementsToCollection(this.nodes,i.nodes),i.addElementsToCollection(this.points,i.links))}destroy(){this.layout&&this.layout.removeElementFromCollection(this,this.layout.series),I.destroy.call(this)}drawDataLabels(){let t;if(this.deferDataLabels)return;let e=this.options.dataLabels;e?.textPath&&(t=e.textPath),tf.prototype.drawDataLabels.call(this,this.nodes),e?.linkTextPath&&(e.textPath=e.linkTextPath),tf.prototype.drawDataLabels.call(this,this.data),e?.textPath&&(e.textPath=t)}generatePoints(){let t,e;for(I.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=tL(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()}getPointsCollection(){return this.nodes||[]}indexateNodes(){this.nodes.forEach(function(t,e){t.index=e})}init(t,e){return super.init(t,e),tx.call(this),tb(this,"updatedData",()=>{this.layout&&this.layout.stop()}),tb(this,"afterUpdate",()=>{this.nodes.forEach(t=>{t&&t.series&&t.resolveColor()})}),tb(this,"afterSimulation",function(){this.deferDataLabels=!1,this.drawDataLabels()}),this}markerAttribs(t,e){let i=tf.prototype.markerAttribs.call(this,t,e);return tk(t.plotY)||(i.y=0),i.x=(t.plotX||0)-(i.width||0)/2,i}pointAttribs(t,e){let i=e||t&&t.state||"normal",s=this.options.states[i],o=tf.prototype.pointAttribs.call(this,t,i);return t&&!t.isNode&&(o=t.getLinkAttributes(),s&&(o={stroke:s.linkColor||o.stroke,dashstyle:s.linkDashStyle||o.dashstyle,opacity:tL(s.linkOpacity,o.opacity),"stroke-width":s.linkColor||o["stroke-width"]})),o}render(){let t=this.points,e=this.chart.hoverPoint,i=[];this.points=this.nodes,tg.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&&i.push(t.dataLabel)}),this.chart.hideOverlappingLabels(i))}setState(t,e){e?(this.points=this.nodes.concat(this.data),tf.prototype.setState.apply(this,arguments),this.points=this.data):tf.prototype.setState.apply(this,arguments),this.layout.simulation||t||this.render()}translate(){this.generatePoints(),this.deferLayout(),this.nodes.forEach(function(t){t.isInside=!0,t.linksFrom.forEach(function(t){t.shapeType="path",t.y=1})})}}tP.defaultOptions=tN(tf.defaultOptions,{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 String(this.key??"")},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}),tv(tP.prototype,{pointClass:_,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:tu,createNode:I.createNode,drawTracker:tm.drawTracker,onMouseDown:g.onMouseDown,onMouseMove:g.onMouseMove,onMouseUp:g.onMouseUp,redrawHalo:g.redrawHalo}),M().registerSeriesType("networkgraph",tP);let tw=l();tP.compose(tw.Chart);let tS=l();return n.default})());