@altimateai/ui-components 0.0.77-beta.7 → 0.0.77

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.
Files changed (405) hide show
  1. package/dist/CoachForm.css +1 -1
  2. package/dist/CoachForm.js +24114 -67797
  3. package/dist/DbtDocsRenderer.js +1 -1
  4. package/dist/Stack.js +2274 -2824
  5. package/dist/Switch.js +87 -128
  6. package/dist/ToggleGroup.js +4788 -5963
  7. package/dist/_basePickBy.js +60 -60
  8. package/dist/_baseUniq.js +152 -152
  9. package/dist/arc.js +53 -53
  10. package/dist/architectureDiagram-VXUJARFQ.js +4315 -480
  11. package/dist/assets/icons/index.js +1 -1
  12. package/dist/blockDiagram-VD42YOAC.js +1 -1
  13. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  14. package/dist/channel.js +2 -2
  15. package/dist/chatbotV2/index.d.ts +19 -57
  16. package/dist/chatbotV2/index.js +56 -91
  17. package/dist/chunk-4BX2VUAB.js +1 -1
  18. package/dist/chunk-55IACEB6.js +2 -2
  19. package/dist/chunk-B4BG7PRW.js +1 -1
  20. package/dist/chunk-DI55MBZ5.js +14 -14
  21. package/dist/chunk-FMBD7UC4.js +1 -1
  22. package/dist/chunk-QN33PNHL.js +5 -5
  23. package/dist/chunk-QZHKN3VN.js +1 -1
  24. package/dist/chunk-TZMSLE5B.js +1 -1
  25. package/dist/classDiagram-2ON5EDUG.js +1 -1
  26. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  27. package/dist/cose-bilkent-S5V4N54A.js +2535 -160
  28. package/dist/dagre-6UL2VRFP.js +101 -101
  29. package/dist/dayjs.min.js +2 -2
  30. package/dist/defaultLocale.js +3 -3
  31. package/dist/diagram-PSM6KHXK.js +414 -198
  32. package/dist/diagram-QEK2KX5R.js +26 -26
  33. package/dist/diagram-S2PKOQOG.js +12 -12
  34. package/dist/erDiagram-Q2GNP2WA.js +1 -1
  35. package/dist/flowDiagram-NV44I4VS.js +6 -6
  36. package/dist/ganttDiagram-LVOFAZNH.js +1718 -843
  37. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  38. package/dist/graph.js +18 -17
  39. package/dist/index.d.ts +6 -101
  40. package/dist/index.js +37 -37
  41. package/dist/index2.js +684 -216
  42. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  43. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  44. package/dist/kanban-definition-3W4ZIXB7.js +42 -42
  45. package/dist/layout.js +678 -567
  46. package/dist/lineage/index.js +1315 -1308
  47. package/dist/linear.js +1 -1
  48. package/dist/main.css +1 -1
  49. package/dist/main.js +151 -151
  50. package/dist/mermaid-parser.core.js +155 -155
  51. package/dist/mindmap-definition-VGOIOE7T.js +28 -28
  52. package/dist/pieDiagram-ADFJNKIX.js +108 -68
  53. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  54. package/dist/redux-toolkit.modern.js +555 -563
  55. package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
  56. package/dist/sankeyDiagram-TZEHDZUN.js +622 -229
  57. package/dist/sequenceDiagram-WL72ISMW.js +1 -1
  58. package/dist/shadcn/index.d.ts +40 -24
  59. package/dist/shadcn/index.js +4733 -6547
  60. package/dist/stateDiagram-FKZM4ZOC.js +33 -33
  61. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  62. package/dist/storybook/Typography.stories.tsx +120 -93
  63. package/dist/timeline-definition-IT6M3QCI.js +63 -63
  64. package/dist/{types-UHJCpYj0.d.ts → types-ByRPUpXR.d.ts} +116 -25
  65. package/dist/xychartDiagram-PRI3JC2R.js +491 -449
  66. package/package.json +1 -1
  67. package/dist/abap.js +0 -6
  68. package/dist/actionscript-3.js +0 -6
  69. package/dist/ada.js +0 -6
  70. package/dist/andromeeda.js +0 -4
  71. package/dist/angular-html.js +0 -32
  72. package/dist/angular-ts.js +0 -21
  73. package/dist/apache.js +0 -6
  74. package/dist/apex.js +0 -6
  75. package/dist/apl.js +0 -16
  76. package/dist/applescript.js +0 -6
  77. package/dist/ara.js +0 -6
  78. package/dist/architectureDiagram-VXUJARFQ2.js +0 -831
  79. package/dist/asciidoc.js +0 -6
  80. package/dist/asm.js +0 -6
  81. package/dist/astro.js +0 -18
  82. package/dist/aurora-x.js +0 -4
  83. package/dist/awk.js +0 -6
  84. package/dist/ayu-dark.js +0 -4
  85. package/dist/ballerina.js +0 -6
  86. package/dist/band.js +0 -46
  87. package/dist/bat.js +0 -6
  88. package/dist/beancount.js +0 -6
  89. package/dist/berry.js +0 -6
  90. package/dist/bibtex.js +0 -6
  91. package/dist/bicep.js +0 -6
  92. package/dist/blade.js +0 -20
  93. package/dist/blockDiagram-VD42YOAC2.js +0 -2266
  94. package/dist/bsl.js +0 -8
  95. package/dist/c.js +0 -6
  96. package/dist/c3.js +0 -6
  97. package/dist/c4Diagram-YG6GDRKO2.js +0 -1582
  98. package/dist/cadence.js +0 -6
  99. package/dist/cairo.js +0 -8
  100. package/dist/catppuccin-frappe.js +0 -4
  101. package/dist/catppuccin-latte.js +0 -4
  102. package/dist/catppuccin-macchiato.js +0 -4
  103. package/dist/catppuccin-mocha.js +0 -4
  104. package/dist/chunk-4BX2VUAB2.js +0 -9
  105. package/dist/chunk-55IACEB62.js +0 -9
  106. package/dist/chunk-B4BG7PRW2.js +0 -1377
  107. package/dist/chunk-DI55MBZ52.js +0 -1382
  108. package/dist/chunk-FMBD7UC42.js +0 -19
  109. package/dist/chunk-QN33PNHL2.js +0 -20
  110. package/dist/chunk-QZHKN3VN2.js +0 -15
  111. package/dist/chunk-TZMSLE5B2.js +0 -64
  112. package/dist/clarity.js +0 -6
  113. package/dist/classDiagram-2ON5EDUG2.js +0 -17
  114. package/dist/classDiagram-v2-WZHVMYZB2.js +0 -17
  115. package/dist/clojure.js +0 -6
  116. package/dist/cmake.js +0 -6
  117. package/dist/cobol.js +0 -10
  118. package/dist/code-block-37QAKDTI.js +0 -27
  119. package/dist/codeowners.js +0 -6
  120. package/dist/codeql.js +0 -6
  121. package/dist/coffee.js +0 -8
  122. package/dist/common-lisp.js +0 -6
  123. package/dist/coq.js +0 -6
  124. package/dist/cose-bilkent-S5V4N54A2.js +0 -231
  125. package/dist/cpp.js +0 -18
  126. package/dist/crystal.js +0 -18
  127. package/dist/csharp.js +0 -6
  128. package/dist/css.js +0 -6
  129. package/dist/csv.js +0 -6
  130. package/dist/cue.js +0 -6
  131. package/dist/cypher.js +0 -6
  132. package/dist/cytoscape-cose-bilkent.js +0 -2380
  133. package/dist/cytoscape-fcose.js +0 -3840
  134. package/dist/d.js +0 -6
  135. package/dist/dagre-6UL2VRFP2.js +0 -447
  136. package/dist/dark-plus.js +0 -4
  137. package/dist/dart.js +0 -6
  138. package/dist/dax.js +0 -6
  139. package/dist/desktop.js +0 -6
  140. package/dist/diagram-PSM6KHXK2.js +0 -319
  141. package/dist/diagram-QEK2KX5R2.js +0 -221
  142. package/dist/diagram-S2PKOQOG2.js +0 -143
  143. package/dist/diff.js +0 -6
  144. package/dist/docker.js +0 -6
  145. package/dist/dotenv.js +0 -6
  146. package/dist/dracula-soft.js +0 -4
  147. package/dist/dracula.js +0 -4
  148. package/dist/dream-maker.js +0 -6
  149. package/dist/edge.js +0 -12
  150. package/dist/elixir.js +0 -8
  151. package/dist/elm.js +0 -8
  152. package/dist/emacs-lisp.js +0 -6
  153. package/dist/erDiagram-Q2GNP2WA2.js +0 -843
  154. package/dist/erb.js +0 -10
  155. package/dist/erlang.js +0 -8
  156. package/dist/everforest-dark.js +0 -4
  157. package/dist/everforest-light.js +0 -4
  158. package/dist/fennel.js +0 -6
  159. package/dist/fish.js +0 -6
  160. package/dist/flowDiagram-NV44I4VS2.js +0 -1628
  161. package/dist/fluent.js +0 -6
  162. package/dist/fortran-fixed-form.js +0 -8
  163. package/dist/fortran-free-form.js +0 -6
  164. package/dist/fsharp.js +0 -8
  165. package/dist/ganttDiagram-JELNMOA3.js +0 -1788
  166. package/dist/gdresource.js +0 -10
  167. package/dist/gdscript.js +0 -6
  168. package/dist/gdshader.js +0 -6
  169. package/dist/genie.js +0 -6
  170. package/dist/gherkin.js +0 -6
  171. package/dist/git-commit.js +0 -8
  172. package/dist/git-rebase.js +0 -8
  173. package/dist/gitGraphDiagram-NY62KEGX2.js +0 -713
  174. package/dist/github-dark-default.js +0 -4
  175. package/dist/github-dark-dimmed.js +0 -4
  176. package/dist/github-dark-high-contrast.js +0 -4
  177. package/dist/github-dark.js +0 -4
  178. package/dist/github-light-default.js +0 -4
  179. package/dist/github-light-high-contrast.js +0 -4
  180. package/dist/github-light.js +0 -4
  181. package/dist/gleam.js +0 -6
  182. package/dist/glimmer-js.js +0 -14
  183. package/dist/glimmer-ts.js +0 -14
  184. package/dist/glsl.js +0 -8
  185. package/dist/gn.js +0 -6
  186. package/dist/gnuplot.js +0 -6
  187. package/dist/go.js +0 -6
  188. package/dist/graph2.js +0 -246
  189. package/dist/graphql.js +0 -14
  190. package/dist/groovy.js +0 -6
  191. package/dist/gruvbox-dark-hard.js +0 -4
  192. package/dist/gruvbox-dark-medium.js +0 -4
  193. package/dist/gruvbox-dark-soft.js +0 -4
  194. package/dist/gruvbox-light-hard.js +0 -4
  195. package/dist/gruvbox-light-medium.js +0 -4
  196. package/dist/gruvbox-light-soft.js +0 -4
  197. package/dist/hack.js +0 -10
  198. package/dist/haml.js +0 -10
  199. package/dist/handlebars.js +0 -14
  200. package/dist/haskell.js +0 -6
  201. package/dist/haxe.js +0 -6
  202. package/dist/hcl.js +0 -6
  203. package/dist/hjson.js +0 -6
  204. package/dist/hlsl.js +0 -6
  205. package/dist/houston.js +0 -4
  206. package/dist/html-derivative.js +0 -8
  207. package/dist/html.js +0 -10
  208. package/dist/http.js +0 -14
  209. package/dist/hurl.js +0 -12
  210. package/dist/hxml.js +0 -8
  211. package/dist/hy.js +0 -6
  212. package/dist/imba.js +0 -6
  213. package/dist/index3.js +0 -689
  214. package/dist/infoDiagram-WHAUD3N6.js +0 -24
  215. package/dist/ini.js +0 -6
  216. package/dist/java.js +0 -6
  217. package/dist/javascript.js +0 -6
  218. package/dist/jinja.js +0 -11
  219. package/dist/jison.js +0 -8
  220. package/dist/journeyDiagram-XKPGCS4Q2.js +0 -837
  221. package/dist/json.js +0 -6
  222. package/dist/json5.js +0 -6
  223. package/dist/jsonc.js +0 -6
  224. package/dist/jsonl.js +0 -6
  225. package/dist/jsonnet.js +0 -6
  226. package/dist/jssm.js +0 -6
  227. package/dist/jsx.js +0 -6
  228. package/dist/julia.js +0 -16
  229. package/dist/kanagawa-dragon.js +0 -4
  230. package/dist/kanagawa-lotus.js +0 -4
  231. package/dist/kanagawa-wave.js +0 -4
  232. package/dist/kanban-definition-3W4ZIXB72.js +0 -720
  233. package/dist/katex2.js +0 -11691
  234. package/dist/kdl.js +0 -6
  235. package/dist/kotlin.js +0 -6
  236. package/dist/kusto.js +0 -6
  237. package/dist/laserwave.js +0 -4
  238. package/dist/latex.js +0 -8
  239. package/dist/layout2.js +0 -1224
  240. package/dist/lean.js +0 -6
  241. package/dist/less.js +0 -6
  242. package/dist/light-plus.js +0 -4
  243. package/dist/liquid.js +0 -14
  244. package/dist/llvm.js +0 -6
  245. package/dist/log.js +0 -6
  246. package/dist/logo.js +0 -6
  247. package/dist/lua.js +0 -8
  248. package/dist/luau.js +0 -6
  249. package/dist/make.js +0 -6
  250. package/dist/markdown.js +0 -6
  251. package/dist/marko.js +0 -14
  252. package/dist/material-theme-darker.js +0 -4
  253. package/dist/material-theme-lighter.js +0 -4
  254. package/dist/material-theme-ocean.js +0 -4
  255. package/dist/material-theme-palenight.js +0 -4
  256. package/dist/material-theme.js +0 -4
  257. package/dist/matlab.js +0 -6
  258. package/dist/mdc.js +0 -12
  259. package/dist/mdx.js +0 -6
  260. package/dist/mermaid-4DMBBIKO.js +0 -4
  261. package/dist/mermaid.js +0 -6
  262. package/dist/min-dark.js +0 -4
  263. package/dist/min-light.js +0 -4
  264. package/dist/mindmap-definition-VGOIOE7T2.js +0 -786
  265. package/dist/mipsasm.js +0 -6
  266. package/dist/mojo.js +0 -6
  267. package/dist/monokai.js +0 -4
  268. package/dist/moonbit.js +0 -6
  269. package/dist/move.js +0 -6
  270. package/dist/narrat.js +0 -6
  271. package/dist/nextflow.js +0 -6
  272. package/dist/nginx.js +0 -8
  273. package/dist/night-owl.js +0 -4
  274. package/dist/nim.js +0 -20
  275. package/dist/nix.js +0 -9
  276. package/dist/nord.js +0 -4
  277. package/dist/nushell.js +0 -6
  278. package/dist/objective-c.js +0 -6
  279. package/dist/objective-cpp.js +0 -6
  280. package/dist/ocaml.js +0 -6
  281. package/dist/one-dark-pro.js +0 -4
  282. package/dist/one-light.js +0 -4
  283. package/dist/openscad.js +0 -6
  284. package/dist/pascal.js +0 -6
  285. package/dist/perl.js +0 -16
  286. package/dist/php.js +0 -18
  287. package/dist/pie.js +0 -45
  288. package/dist/pieDiagram-ADFJNKIX2.js +0 -123
  289. package/dist/pkl.js +0 -6
  290. package/dist/plastic.js +0 -4
  291. package/dist/plsql.js +0 -6
  292. package/dist/po.js +0 -6
  293. package/dist/poimandres.js +0 -4
  294. package/dist/polar.js +0 -6
  295. package/dist/postcss.js +0 -6
  296. package/dist/powerquery.js +0 -6
  297. package/dist/powershell.js +0 -6
  298. package/dist/prisma.js +0 -6
  299. package/dist/prolog.js +0 -6
  300. package/dist/proto.js +0 -6
  301. package/dist/pug.js +0 -12
  302. package/dist/puppet.js +0 -6
  303. package/dist/purescript.js +0 -6
  304. package/dist/python.js +0 -6
  305. package/dist/qml.js +0 -8
  306. package/dist/qmldir.js +0 -6
  307. package/dist/qss.js +0 -6
  308. package/dist/quadrantDiagram-AYHSOK5B2.js +0 -1025
  309. package/dist/r.js +0 -6
  310. package/dist/racket.js +0 -6
  311. package/dist/raku.js +0 -6
  312. package/dist/razor.js +0 -10
  313. package/dist/red.js +0 -4
  314. package/dist/reg.js +0 -6
  315. package/dist/regexp.js +0 -6
  316. package/dist/rel.js +0 -6
  317. package/dist/requirementDiagram-UZGBJVZJ2.js +0 -852
  318. package/dist/riscv.js +0 -6
  319. package/dist/rose-pine-dawn.js +0 -4
  320. package/dist/rose-pine-moon.js +0 -4
  321. package/dist/rose-pine.js +0 -4
  322. package/dist/rosmsg.js +0 -6
  323. package/dist/rst.js +0 -22
  324. package/dist/ruby.js +0 -30
  325. package/dist/rust.js +0 -6
  326. package/dist/sankeyDiagram-TZEHDZUN2.js +0 -418
  327. package/dist/sankeyLinkHorizontal.js +0 -403
  328. package/dist/sas.js +0 -8
  329. package/dist/sass.js +0 -6
  330. package/dist/scala.js +0 -6
  331. package/dist/scheme.js +0 -6
  332. package/dist/scss.js +0 -8
  333. package/dist/sdbl.js +0 -6
  334. package/dist/sequenceDiagram-WL72ISMW2.js +0 -2523
  335. package/dist/shaderlab.js +0 -8
  336. package/dist/shellscript.js +0 -6
  337. package/dist/shellsession.js +0 -8
  338. package/dist/slack-dark.js +0 -4
  339. package/dist/slack-ochin.js +0 -4
  340. package/dist/smalltalk.js +0 -6
  341. package/dist/snazzy-light.js +0 -4
  342. package/dist/solarized-dark.js +0 -4
  343. package/dist/solarized-light.js +0 -4
  344. package/dist/solidity.js +0 -6
  345. package/dist/soy.js +0 -8
  346. package/dist/sparql.js +0 -8
  347. package/dist/splunk.js +0 -6
  348. package/dist/sql.js +0 -6
  349. package/dist/ssh-config.js +0 -6
  350. package/dist/stata.js +0 -8
  351. package/dist/stateDiagram-FKZM4ZOC2.js +0 -264
  352. package/dist/stateDiagram-v2-4FDKWEC32.js +0 -17
  353. package/dist/stylus.js +0 -6
  354. package/dist/svelte.js +0 -14
  355. package/dist/swift.js +0 -6
  356. package/dist/synthwave-84.js +0 -4
  357. package/dist/system-verilog.js +0 -6
  358. package/dist/systemd.js +0 -6
  359. package/dist/talonscript.js +0 -6
  360. package/dist/tasl.js +0 -6
  361. package/dist/tcl.js +0 -6
  362. package/dist/templ.js +0 -12
  363. package/dist/terraform.js +0 -6
  364. package/dist/tex.js +0 -8
  365. package/dist/time.js +0 -900
  366. package/dist/timeline-definition-IT6M3QCI2.js +0 -802
  367. package/dist/tokyo-night.js +0 -4
  368. package/dist/toml.js +0 -6
  369. package/dist/ts-tags.js +0 -41
  370. package/dist/tsv.js +0 -6
  371. package/dist/tsx.js +0 -6
  372. package/dist/turtle.js +0 -6
  373. package/dist/twig.js +0 -18
  374. package/dist/typescript.js +0 -6
  375. package/dist/typespec.js +0 -6
  376. package/dist/typst.js +0 -6
  377. package/dist/union.js +0 -8
  378. package/dist/v.js +0 -6
  379. package/dist/vala.js +0 -6
  380. package/dist/vb.js +0 -6
  381. package/dist/verilog.js +0 -6
  382. package/dist/vesper.js +0 -4
  383. package/dist/vhdl.js +0 -6
  384. package/dist/viml.js +0 -6
  385. package/dist/vitesse-black.js +0 -4
  386. package/dist/vitesse-dark.js +0 -4
  387. package/dist/vitesse-light.js +0 -4
  388. package/dist/vue-html.js +0 -8
  389. package/dist/vue-vine.js +0 -18
  390. package/dist/vue.js +0 -31
  391. package/dist/vyper.js +0 -6
  392. package/dist/wasm.js +0 -7
  393. package/dist/wasm2.js +0 -6
  394. package/dist/wenyan.js +0 -6
  395. package/dist/wgsl.js +0 -6
  396. package/dist/wikitext.js +0 -6
  397. package/dist/wit.js +0 -6
  398. package/dist/wolfram.js +0 -6
  399. package/dist/xml.js +0 -8
  400. package/dist/xsl.js +0 -8
  401. package/dist/xychartDiagram-PRI3JC2R2.js +0 -1299
  402. package/dist/yaml.js +0 -6
  403. package/dist/zenscript.js +0 -6
  404. package/dist/zig.js +0 -6
  405. package/dist/zipObject.js +0 -128
@@ -1,2380 +0,0 @@
1
- import { c as k, g as q } from "./redux-toolkit.modern.js";
2
- var z = { exports: {} }, B = { exports: {} }, V = { exports: {} }, J;
3
- function tt() {
4
- return J || (J = 1, function(W, Z) {
5
- (function(M, T) {
6
- W.exports = T();
7
- })(k, function() {
8
- return (
9
- /******/
10
- function(R) {
11
- var M = {};
12
- function T(o) {
13
- if (M[o])
14
- return M[o].exports;
15
- var e = M[o] = {
16
- /******/
17
- i: o,
18
- /******/
19
- l: !1,
20
- /******/
21
- exports: {}
22
- /******/
23
- };
24
- return R[o].call(e.exports, e, e.exports, T), e.l = !0, e.exports;
25
- }
26
- return T.m = R, T.c = M, T.i = function(o) {
27
- return o;
28
- }, T.d = function(o, e, t) {
29
- T.o(o, e) || Object.defineProperty(o, e, {
30
- /******/
31
- configurable: !1,
32
- /******/
33
- enumerable: !0,
34
- /******/
35
- get: t
36
- /******/
37
- });
38
- }, T.n = function(o) {
39
- var e = o && o.__esModule ? (
40
- /******/
41
- function() {
42
- return o.default;
43
- }
44
- ) : (
45
- /******/
46
- function() {
47
- return o;
48
- }
49
- );
50
- return T.d(e, "a", e), e;
51
- }, T.o = function(o, e) {
52
- return Object.prototype.hasOwnProperty.call(o, e);
53
- }, T.p = "", T(T.s = 26);
54
- }([
55
- /* 0 */
56
- /***/
57
- function(R, M, T) {
58
- function o() {
59
- }
60
- o.QUALITY = 1, o.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, o.DEFAULT_INCREMENTAL = !1, o.DEFAULT_ANIMATION_ON_LAYOUT = !0, o.DEFAULT_ANIMATION_DURING_LAYOUT = !1, o.DEFAULT_ANIMATION_PERIOD = 50, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, o.DEFAULT_GRAPH_MARGIN = 15, o.NODE_DIMENSIONS_INCLUDE_LABELS = !1, o.SIMPLE_NODE_SIZE = 40, o.SIMPLE_NODE_HALF_SIZE = o.SIMPLE_NODE_SIZE / 2, o.EMPTY_COMPOUND_NODE_SIZE = 40, o.MIN_EDGE_LENGTH = 1, o.WORLD_BOUNDARY = 1e6, o.INITIAL_WORLD_BOUNDARY = o.WORLD_BOUNDARY / 1e3, o.WORLD_CENTER_X = 1200, o.WORLD_CENTER_Y = 900, R.exports = o;
61
- },
62
- /* 1 */
63
- /***/
64
- function(R, M, T) {
65
- var o = T(2), e = T(8), t = T(9);
66
- function i(g, n, d) {
67
- o.call(this, d), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = d, this.bendpoints = [], this.source = g, this.target = n;
68
- }
69
- i.prototype = Object.create(o.prototype);
70
- for (var h in o)
71
- i[h] = o[h];
72
- i.prototype.getSource = function() {
73
- return this.source;
74
- }, i.prototype.getTarget = function() {
75
- return this.target;
76
- }, i.prototype.isInterGraph = function() {
77
- return this.isInterGraph;
78
- }, i.prototype.getLength = function() {
79
- return this.length;
80
- }, i.prototype.isOverlapingSourceAndTarget = function() {
81
- return this.isOverlapingSourceAndTarget;
82
- }, i.prototype.getBendpoints = function() {
83
- return this.bendpoints;
84
- }, i.prototype.getLca = function() {
85
- return this.lca;
86
- }, i.prototype.getSourceInLca = function() {
87
- return this.sourceInLca;
88
- }, i.prototype.getTargetInLca = function() {
89
- return this.targetInLca;
90
- }, i.prototype.getOtherEnd = function(g) {
91
- if (this.source === g)
92
- return this.target;
93
- if (this.target === g)
94
- return this.source;
95
- throw "Node is not incident with this edge";
96
- }, i.prototype.getOtherEndInGraph = function(g, n) {
97
- for (var d = this.getOtherEnd(g), r = n.getGraphManager().getRoot(); ; ) {
98
- if (d.getOwner() == n)
99
- return d;
100
- if (d.getOwner() == r)
101
- break;
102
- d = d.getOwner().getParent();
103
- }
104
- return null;
105
- }, i.prototype.updateLength = function() {
106
- var g = new Array(4);
107
- this.isOverlapingSourceAndTarget = e.getIntersection(this.target.getRect(), this.source.getRect(), g), this.isOverlapingSourceAndTarget || (this.lengthX = g[0] - g[2], this.lengthY = g[1] - g[3], Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
108
- }, i.prototype.updateLengthSimple = function() {
109
- this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
110
- }, R.exports = i;
111
- },
112
- /* 2 */
113
- /***/
114
- function(R, M, T) {
115
- function o(e) {
116
- this.vGraphObject = e;
117
- }
118
- R.exports = o;
119
- },
120
- /* 3 */
121
- /***/
122
- function(R, M, T) {
123
- var o = T(2), e = T(10), t = T(13), i = T(0), h = T(16), g = T(4);
124
- function n(r, l, s, c) {
125
- s == null && c == null && (c = l), o.call(this, c), r.graphManager != null && (r = r.graphManager), this.estimatedSize = e.MIN_VALUE, this.inclusionTreeDepth = e.MAX_VALUE, this.vGraphObject = c, this.edges = [], this.graphManager = r, s != null && l != null ? this.rect = new t(l.x, l.y, s.width, s.height) : this.rect = new t();
126
- }
127
- n.prototype = Object.create(o.prototype);
128
- for (var d in o)
129
- n[d] = o[d];
130
- n.prototype.getEdges = function() {
131
- return this.edges;
132
- }, n.prototype.getChild = function() {
133
- return this.child;
134
- }, n.prototype.getOwner = function() {
135
- return this.owner;
136
- }, n.prototype.getWidth = function() {
137
- return this.rect.width;
138
- }, n.prototype.setWidth = function(r) {
139
- this.rect.width = r;
140
- }, n.prototype.getHeight = function() {
141
- return this.rect.height;
142
- }, n.prototype.setHeight = function(r) {
143
- this.rect.height = r;
144
- }, n.prototype.getCenterX = function() {
145
- return this.rect.x + this.rect.width / 2;
146
- }, n.prototype.getCenterY = function() {
147
- return this.rect.y + this.rect.height / 2;
148
- }, n.prototype.getCenter = function() {
149
- return new g(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
150
- }, n.prototype.getLocation = function() {
151
- return new g(this.rect.x, this.rect.y);
152
- }, n.prototype.getRect = function() {
153
- return this.rect;
154
- }, n.prototype.getDiagonal = function() {
155
- return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
156
- }, n.prototype.getHalfTheDiagonal = function() {
157
- return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
158
- }, n.prototype.setRect = function(r, l) {
159
- this.rect.x = r.x, this.rect.y = r.y, this.rect.width = l.width, this.rect.height = l.height;
160
- }, n.prototype.setCenter = function(r, l) {
161
- this.rect.x = r - this.rect.width / 2, this.rect.y = l - this.rect.height / 2;
162
- }, n.prototype.setLocation = function(r, l) {
163
- this.rect.x = r, this.rect.y = l;
164
- }, n.prototype.moveBy = function(r, l) {
165
- this.rect.x += r, this.rect.y += l;
166
- }, n.prototype.getEdgeListToNode = function(r) {
167
- var l = [], s = this;
168
- return s.edges.forEach(function(c) {
169
- if (c.target == r) {
170
- if (c.source != s) throw "Incorrect edge source!";
171
- l.push(c);
172
- }
173
- }), l;
174
- }, n.prototype.getEdgesBetween = function(r) {
175
- var l = [], s = this;
176
- return s.edges.forEach(function(c) {
177
- if (!(c.source == s || c.target == s)) throw "Incorrect edge source and/or target";
178
- (c.target == r || c.source == r) && l.push(c);
179
- }), l;
180
- }, n.prototype.getNeighborsList = function() {
181
- var r = /* @__PURE__ */ new Set(), l = this;
182
- return l.edges.forEach(function(s) {
183
- if (s.source == l)
184
- r.add(s.target);
185
- else {
186
- if (s.target != l)
187
- throw "Incorrect incidency!";
188
- r.add(s.source);
189
- }
190
- }), r;
191
- }, n.prototype.withChildren = function() {
192
- var r = /* @__PURE__ */ new Set(), l, s;
193
- if (r.add(this), this.child != null)
194
- for (var c = this.child.getNodes(), v = 0; v < c.length; v++)
195
- l = c[v], s = l.withChildren(), s.forEach(function(L) {
196
- r.add(L);
197
- });
198
- return r;
199
- }, n.prototype.getNoOfChildren = function() {
200
- var r = 0, l;
201
- if (this.child == null)
202
- r = 1;
203
- else
204
- for (var s = this.child.getNodes(), c = 0; c < s.length; c++)
205
- l = s[c], r += l.getNoOfChildren();
206
- return r == 0 && (r = 1), r;
207
- }, n.prototype.getEstimatedSize = function() {
208
- if (this.estimatedSize == e.MIN_VALUE)
209
- throw "assert failed";
210
- return this.estimatedSize;
211
- }, n.prototype.calcEstimatedSize = function() {
212
- return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
213
- }, n.prototype.scatter = function() {
214
- var r, l, s = -i.INITIAL_WORLD_BOUNDARY, c = i.INITIAL_WORLD_BOUNDARY;
215
- r = i.WORLD_CENTER_X + h.nextDouble() * (c - s) + s;
216
- var v = -i.INITIAL_WORLD_BOUNDARY, L = i.INITIAL_WORLD_BOUNDARY;
217
- l = i.WORLD_CENTER_Y + h.nextDouble() * (L - v) + v, this.rect.x = r, this.rect.y = l;
218
- }, n.prototype.updateBounds = function() {
219
- if (this.getChild() == null)
220
- throw "assert failed";
221
- if (this.getChild().getNodes().length != 0) {
222
- var r = this.getChild();
223
- if (r.updateBounds(!0), this.rect.x = r.getLeft(), this.rect.y = r.getTop(), this.setWidth(r.getRight() - r.getLeft()), this.setHeight(r.getBottom() - r.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
224
- var l = r.getRight() - r.getLeft(), s = r.getBottom() - r.getTop();
225
- this.labelWidth > l && (this.rect.x -= (this.labelWidth - l) / 2, this.setWidth(this.labelWidth)), this.labelHeight > s && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - s) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - s), this.setHeight(this.labelHeight));
226
- }
227
- }
228
- }, n.prototype.getInclusionTreeDepth = function() {
229
- if (this.inclusionTreeDepth == e.MAX_VALUE)
230
- throw "assert failed";
231
- return this.inclusionTreeDepth;
232
- }, n.prototype.transform = function(r) {
233
- var l = this.rect.x;
234
- l > i.WORLD_BOUNDARY ? l = i.WORLD_BOUNDARY : l < -i.WORLD_BOUNDARY && (l = -i.WORLD_BOUNDARY);
235
- var s = this.rect.y;
236
- s > i.WORLD_BOUNDARY ? s = i.WORLD_BOUNDARY : s < -i.WORLD_BOUNDARY && (s = -i.WORLD_BOUNDARY);
237
- var c = new g(l, s), v = r.inverseTransformPoint(c);
238
- this.setLocation(v.x, v.y);
239
- }, n.prototype.getLeft = function() {
240
- return this.rect.x;
241
- }, n.prototype.getRight = function() {
242
- return this.rect.x + this.rect.width;
243
- }, n.prototype.getTop = function() {
244
- return this.rect.y;
245
- }, n.prototype.getBottom = function() {
246
- return this.rect.y + this.rect.height;
247
- }, n.prototype.getParent = function() {
248
- return this.owner == null ? null : this.owner.getParent();
249
- }, R.exports = n;
250
- },
251
- /* 4 */
252
- /***/
253
- function(R, M, T) {
254
- function o(e, t) {
255
- e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
256
- }
257
- o.prototype.getX = function() {
258
- return this.x;
259
- }, o.prototype.getY = function() {
260
- return this.y;
261
- }, o.prototype.setX = function(e) {
262
- this.x = e;
263
- }, o.prototype.setY = function(e) {
264
- this.y = e;
265
- }, o.prototype.getDifference = function(e) {
266
- return new DimensionD(this.x - e.x, this.y - e.y);
267
- }, o.prototype.getCopy = function() {
268
- return new o(this.x, this.y);
269
- }, o.prototype.translate = function(e) {
270
- return this.x += e.width, this.y += e.height, this;
271
- }, R.exports = o;
272
- },
273
- /* 5 */
274
- /***/
275
- function(R, M, T) {
276
- var o = T(2), e = T(10), t = T(0), i = T(6), h = T(3), g = T(1), n = T(13), d = T(12), r = T(11);
277
- function l(c, v, L) {
278
- o.call(this, L), this.estimatedSize = e.MIN_VALUE, this.margin = t.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = c, v != null && v instanceof i ? this.graphManager = v : v != null && v instanceof Layout && (this.graphManager = v.graphManager);
279
- }
280
- l.prototype = Object.create(o.prototype);
281
- for (var s in o)
282
- l[s] = o[s];
283
- l.prototype.getNodes = function() {
284
- return this.nodes;
285
- }, l.prototype.getEdges = function() {
286
- return this.edges;
287
- }, l.prototype.getGraphManager = function() {
288
- return this.graphManager;
289
- }, l.prototype.getParent = function() {
290
- return this.parent;
291
- }, l.prototype.getLeft = function() {
292
- return this.left;
293
- }, l.prototype.getRight = function() {
294
- return this.right;
295
- }, l.prototype.getTop = function() {
296
- return this.top;
297
- }, l.prototype.getBottom = function() {
298
- return this.bottom;
299
- }, l.prototype.isConnected = function() {
300
- return this.isConnected;
301
- }, l.prototype.add = function(c, v, L) {
302
- if (v == null && L == null) {
303
- var p = c;
304
- if (this.graphManager == null)
305
- throw "Graph has no graph mgr!";
306
- if (this.getNodes().indexOf(p) > -1)
307
- throw "Node already in graph!";
308
- return p.owner = this, this.getNodes().push(p), p;
309
- } else {
310
- var A = c;
311
- if (!(this.getNodes().indexOf(v) > -1 && this.getNodes().indexOf(L) > -1))
312
- throw "Source or target not in graph!";
313
- if (!(v.owner == L.owner && v.owner == this))
314
- throw "Both owners must be this graph!";
315
- return v.owner != L.owner ? null : (A.source = v, A.target = L, A.isInterGraph = !1, this.getEdges().push(A), v.edges.push(A), L != v && L.edges.push(A), A);
316
- }
317
- }, l.prototype.remove = function(c) {
318
- var v = c;
319
- if (c instanceof h) {
320
- if (v == null)
321
- throw "Node is null!";
322
- if (!(v.owner != null && v.owner == this))
323
- throw "Owner graph is invalid!";
324
- if (this.graphManager == null)
325
- throw "Owner graph manager is invalid!";
326
- for (var L = v.edges.slice(), p, A = L.length, E = 0; E < A; E++)
327
- p = L[E], p.isInterGraph ? this.graphManager.remove(p) : p.source.owner.remove(p);
328
- var O = this.nodes.indexOf(v);
329
- if (O == -1)
330
- throw "Node not in owner node list!";
331
- this.nodes.splice(O, 1);
332
- } else if (c instanceof g) {
333
- var p = c;
334
- if (p == null)
335
- throw "Edge is null!";
336
- if (!(p.source != null && p.target != null))
337
- throw "Source and/or target is null!";
338
- if (!(p.source.owner != null && p.target.owner != null && p.source.owner == this && p.target.owner == this))
339
- throw "Source and/or target owner is invalid!";
340
- var a = p.source.edges.indexOf(p), u = p.target.edges.indexOf(p);
341
- if (!(a > -1 && u > -1))
342
- throw "Source and/or target doesn't know this edge!";
343
- p.source.edges.splice(a, 1), p.target != p.source && p.target.edges.splice(u, 1);
344
- var O = p.source.owner.getEdges().indexOf(p);
345
- if (O == -1)
346
- throw "Not in owner's edge list!";
347
- p.source.owner.getEdges().splice(O, 1);
348
- }
349
- }, l.prototype.updateLeftTop = function() {
350
- for (var c = e.MAX_VALUE, v = e.MAX_VALUE, L, p, A, E = this.getNodes(), O = E.length, a = 0; a < O; a++) {
351
- var u = E[a];
352
- L = u.getTop(), p = u.getLeft(), c > L && (c = L), v > p && (v = p);
353
- }
354
- return c == e.MAX_VALUE ? null : (E[0].getParent().paddingLeft != null ? A = E[0].getParent().paddingLeft : A = this.margin, this.left = v - A, this.top = c - A, new d(this.left, this.top));
355
- }, l.prototype.updateBounds = function(c) {
356
- for (var v = e.MAX_VALUE, L = -e.MAX_VALUE, p = e.MAX_VALUE, A = -e.MAX_VALUE, E, O, a, u, f, y = this.nodes, D = y.length, N = 0; N < D; N++) {
357
- var I = y[N];
358
- c && I.child != null && I.updateBounds(), E = I.getLeft(), O = I.getRight(), a = I.getTop(), u = I.getBottom(), v > E && (v = E), L < O && (L = O), p > a && (p = a), A < u && (A = u);
359
- }
360
- var m = new n(v, p, L - v, A - p);
361
- v == e.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), y[0].getParent().paddingLeft != null ? f = y[0].getParent().paddingLeft : f = this.margin, this.left = m.x - f, this.right = m.x + m.width + f, this.top = m.y - f, this.bottom = m.y + m.height + f;
362
- }, l.calculateBounds = function(c) {
363
- for (var v = e.MAX_VALUE, L = -e.MAX_VALUE, p = e.MAX_VALUE, A = -e.MAX_VALUE, E, O, a, u, f = c.length, y = 0; y < f; y++) {
364
- var D = c[y];
365
- E = D.getLeft(), O = D.getRight(), a = D.getTop(), u = D.getBottom(), v > E && (v = E), L < O && (L = O), p > a && (p = a), A < u && (A = u);
366
- }
367
- var N = new n(v, p, L - v, A - p);
368
- return N;
369
- }, l.prototype.getInclusionTreeDepth = function() {
370
- return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
371
- }, l.prototype.getEstimatedSize = function() {
372
- if (this.estimatedSize == e.MIN_VALUE)
373
- throw "assert failed";
374
- return this.estimatedSize;
375
- }, l.prototype.calcEstimatedSize = function() {
376
- for (var c = 0, v = this.nodes, L = v.length, p = 0; p < L; p++) {
377
- var A = v[p];
378
- c += A.calcEstimatedSize();
379
- }
380
- return c == 0 ? this.estimatedSize = t.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = c / Math.sqrt(this.nodes.length), this.estimatedSize;
381
- }, l.prototype.updateConnected = function() {
382
- var c = this;
383
- if (this.nodes.length == 0) {
384
- this.isConnected = !0;
385
- return;
386
- }
387
- var v = new r(), L = /* @__PURE__ */ new Set(), p = this.nodes[0], A, E, O = p.withChildren();
388
- for (O.forEach(function(N) {
389
- v.push(N), L.add(N);
390
- }); v.length !== 0; ) {
391
- p = v.shift(), A = p.getEdges();
392
- for (var a = A.length, u = 0; u < a; u++) {
393
- var f = A[u];
394
- if (E = f.getOtherEndInGraph(p, this), E != null && !L.has(E)) {
395
- var y = E.withChildren();
396
- y.forEach(function(N) {
397
- v.push(N), L.add(N);
398
- });
399
- }
400
- }
401
- }
402
- if (this.isConnected = !1, L.size >= this.nodes.length) {
403
- var D = 0;
404
- L.forEach(function(N) {
405
- N.owner == c && D++;
406
- }), D == this.nodes.length && (this.isConnected = !0);
407
- }
408
- }, R.exports = l;
409
- },
410
- /* 6 */
411
- /***/
412
- function(R, M, T) {
413
- var o, e = T(1);
414
- function t(i) {
415
- o = T(5), this.layout = i, this.graphs = [], this.edges = [];
416
- }
417
- t.prototype.addRoot = function() {
418
- var i = this.layout.newGraph(), h = this.layout.newNode(null), g = this.add(i, h);
419
- return this.setRootGraph(g), this.rootGraph;
420
- }, t.prototype.add = function(i, h, g, n, d) {
421
- if (g == null && n == null && d == null) {
422
- if (i == null)
423
- throw "Graph is null!";
424
- if (h == null)
425
- throw "Parent node is null!";
426
- if (this.graphs.indexOf(i) > -1)
427
- throw "Graph already in this graph mgr!";
428
- if (this.graphs.push(i), i.parent != null)
429
- throw "Already has a parent!";
430
- if (h.child != null)
431
- throw "Already has a child!";
432
- return i.parent = h, h.child = i, i;
433
- } else {
434
- d = g, n = h, g = i;
435
- var r = n.getOwner(), l = d.getOwner();
436
- if (!(r != null && r.getGraphManager() == this))
437
- throw "Source not in this graph mgr!";
438
- if (!(l != null && l.getGraphManager() == this))
439
- throw "Target not in this graph mgr!";
440
- if (r == l)
441
- return g.isInterGraph = !1, r.add(g, n, d);
442
- if (g.isInterGraph = !0, g.source = n, g.target = d, this.edges.indexOf(g) > -1)
443
- throw "Edge already in inter-graph edge list!";
444
- if (this.edges.push(g), !(g.source != null && g.target != null))
445
- throw "Edge source and/or target is null!";
446
- if (!(g.source.edges.indexOf(g) == -1 && g.target.edges.indexOf(g) == -1))
447
- throw "Edge already in source and/or target incidency list!";
448
- return g.source.edges.push(g), g.target.edges.push(g), g;
449
- }
450
- }, t.prototype.remove = function(i) {
451
- if (i instanceof o) {
452
- var h = i;
453
- if (h.getGraphManager() != this)
454
- throw "Graph not in this graph mgr";
455
- if (!(h == this.rootGraph || h.parent != null && h.parent.graphManager == this))
456
- throw "Invalid parent node!";
457
- var g = [];
458
- g = g.concat(h.getEdges());
459
- for (var n, d = g.length, r = 0; r < d; r++)
460
- n = g[r], h.remove(n);
461
- var l = [];
462
- l = l.concat(h.getNodes());
463
- var s;
464
- d = l.length;
465
- for (var r = 0; r < d; r++)
466
- s = l[r], h.remove(s);
467
- h == this.rootGraph && this.setRootGraph(null);
468
- var c = this.graphs.indexOf(h);
469
- this.graphs.splice(c, 1), h.parent = null;
470
- } else if (i instanceof e) {
471
- if (n = i, n == null)
472
- throw "Edge is null!";
473
- if (!n.isInterGraph)
474
- throw "Not an inter-graph edge!";
475
- if (!(n.source != null && n.target != null))
476
- throw "Source and/or target is null!";
477
- if (!(n.source.edges.indexOf(n) != -1 && n.target.edges.indexOf(n) != -1))
478
- throw "Source and/or target doesn't know this edge!";
479
- var c = n.source.edges.indexOf(n);
480
- if (n.source.edges.splice(c, 1), c = n.target.edges.indexOf(n), n.target.edges.splice(c, 1), !(n.source.owner != null && n.source.owner.getGraphManager() != null))
481
- throw "Edge owner graph or owner graph manager is null!";
482
- if (n.source.owner.getGraphManager().edges.indexOf(n) == -1)
483
- throw "Not in owner graph manager's edge list!";
484
- var c = n.source.owner.getGraphManager().edges.indexOf(n);
485
- n.source.owner.getGraphManager().edges.splice(c, 1);
486
- }
487
- }, t.prototype.updateBounds = function() {
488
- this.rootGraph.updateBounds(!0);
489
- }, t.prototype.getGraphs = function() {
490
- return this.graphs;
491
- }, t.prototype.getAllNodes = function() {
492
- if (this.allNodes == null) {
493
- for (var i = [], h = this.getGraphs(), g = h.length, n = 0; n < g; n++)
494
- i = i.concat(h[n].getNodes());
495
- this.allNodes = i;
496
- }
497
- return this.allNodes;
498
- }, t.prototype.resetAllNodes = function() {
499
- this.allNodes = null;
500
- }, t.prototype.resetAllEdges = function() {
501
- this.allEdges = null;
502
- }, t.prototype.resetAllNodesToApplyGravitation = function() {
503
- this.allNodesToApplyGravitation = null;
504
- }, t.prototype.getAllEdges = function() {
505
- if (this.allEdges == null) {
506
- var i = [], h = this.getGraphs();
507
- h.length;
508
- for (var g = 0; g < h.length; g++)
509
- i = i.concat(h[g].getEdges());
510
- i = i.concat(this.edges), this.allEdges = i;
511
- }
512
- return this.allEdges;
513
- }, t.prototype.getAllNodesToApplyGravitation = function() {
514
- return this.allNodesToApplyGravitation;
515
- }, t.prototype.setAllNodesToApplyGravitation = function(i) {
516
- if (this.allNodesToApplyGravitation != null)
517
- throw "assert failed";
518
- this.allNodesToApplyGravitation = i;
519
- }, t.prototype.getRoot = function() {
520
- return this.rootGraph;
521
- }, t.prototype.setRootGraph = function(i) {
522
- if (i.getGraphManager() != this)
523
- throw "Root not in this graph mgr!";
524
- this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
525
- }, t.prototype.getLayout = function() {
526
- return this.layout;
527
- }, t.prototype.isOneAncestorOfOther = function(i, h) {
528
- if (!(i != null && h != null))
529
- throw "assert failed";
530
- if (i == h)
531
- return !0;
532
- var g = i.getOwner(), n;
533
- do {
534
- if (n = g.getParent(), n == null)
535
- break;
536
- if (n == h)
537
- return !0;
538
- if (g = n.getOwner(), g == null)
539
- break;
540
- } while (!0);
541
- g = h.getOwner();
542
- do {
543
- if (n = g.getParent(), n == null)
544
- break;
545
- if (n == i)
546
- return !0;
547
- if (g = n.getOwner(), g == null)
548
- break;
549
- } while (!0);
550
- return !1;
551
- }, t.prototype.calcLowestCommonAncestors = function() {
552
- for (var i, h, g, n, d, r = this.getAllEdges(), l = r.length, s = 0; s < l; s++) {
553
- if (i = r[s], h = i.source, g = i.target, i.lca = null, i.sourceInLca = h, i.targetInLca = g, h == g) {
554
- i.lca = h.getOwner();
555
- continue;
556
- }
557
- for (n = h.getOwner(); i.lca == null; ) {
558
- for (i.targetInLca = g, d = g.getOwner(); i.lca == null; ) {
559
- if (d == n) {
560
- i.lca = d;
561
- break;
562
- }
563
- if (d == this.rootGraph)
564
- break;
565
- if (i.lca != null)
566
- throw "assert failed";
567
- i.targetInLca = d.getParent(), d = i.targetInLca.getOwner();
568
- }
569
- if (n == this.rootGraph)
570
- break;
571
- i.lca == null && (i.sourceInLca = n.getParent(), n = i.sourceInLca.getOwner());
572
- }
573
- if (i.lca == null)
574
- throw "assert failed";
575
- }
576
- }, t.prototype.calcLowestCommonAncestor = function(i, h) {
577
- if (i == h)
578
- return i.getOwner();
579
- var g = i.getOwner();
580
- do {
581
- if (g == null)
582
- break;
583
- var n = h.getOwner();
584
- do {
585
- if (n == null)
586
- break;
587
- if (n == g)
588
- return n;
589
- n = n.getParent().getOwner();
590
- } while (!0);
591
- g = g.getParent().getOwner();
592
- } while (!0);
593
- return g;
594
- }, t.prototype.calcInclusionTreeDepths = function(i, h) {
595
- i == null && h == null && (i = this.rootGraph, h = 1);
596
- for (var g, n = i.getNodes(), d = n.length, r = 0; r < d; r++)
597
- g = n[r], g.inclusionTreeDepth = h, g.child != null && this.calcInclusionTreeDepths(g.child, h + 1);
598
- }, t.prototype.includesInvalidEdge = function() {
599
- for (var i, h = this.edges.length, g = 0; g < h; g++)
600
- if (i = this.edges[g], this.isOneAncestorOfOther(i.source, i.target))
601
- return !0;
602
- return !1;
603
- }, R.exports = t;
604
- },
605
- /* 7 */
606
- /***/
607
- function(R, M, T) {
608
- var o = T(0);
609
- function e() {
610
- }
611
- for (var t in o)
612
- e[t] = o[t];
613
- e.MAX_ITERATIONS = 2500, e.DEFAULT_EDGE_LENGTH = 50, e.DEFAULT_SPRING_STRENGTH = 0.45, e.DEFAULT_REPULSION_STRENGTH = 4500, e.DEFAULT_GRAVITY_STRENGTH = 0.4, e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, e.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, e.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, e.COOLING_ADAPTATION_FACTOR = 0.33, e.ADAPTATION_LOWER_NODE_LIMIT = 1e3, e.ADAPTATION_UPPER_NODE_LIMIT = 5e3, e.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, e.MAX_NODE_DISPLACEMENT = e.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, e.MIN_REPULSION_DIST = e.DEFAULT_EDGE_LENGTH / 10, e.CONVERGENCE_CHECK_PERIOD = 100, e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, e.MIN_EDGE_LENGTH = 1, e.GRID_CALCULATION_CHECK_PERIOD = 10, R.exports = e;
614
- },
615
- /* 8 */
616
- /***/
617
- function(R, M, T) {
618
- var o = T(12);
619
- function e() {
620
- }
621
- e.calcSeparationAmount = function(t, i, h, g) {
622
- if (!t.intersects(i))
623
- throw "assert failed";
624
- var n = new Array(2);
625
- this.decideDirectionsForOverlappingNodes(t, i, n), h[0] = Math.min(t.getRight(), i.getRight()) - Math.max(t.x, i.x), h[1] = Math.min(t.getBottom(), i.getBottom()) - Math.max(t.y, i.y), t.getX() <= i.getX() && t.getRight() >= i.getRight() ? h[0] += Math.min(i.getX() - t.getX(), t.getRight() - i.getRight()) : i.getX() <= t.getX() && i.getRight() >= t.getRight() && (h[0] += Math.min(t.getX() - i.getX(), i.getRight() - t.getRight())), t.getY() <= i.getY() && t.getBottom() >= i.getBottom() ? h[1] += Math.min(i.getY() - t.getY(), t.getBottom() - i.getBottom()) : i.getY() <= t.getY() && i.getBottom() >= t.getBottom() && (h[1] += Math.min(t.getY() - i.getY(), i.getBottom() - t.getBottom()));
626
- var d = Math.abs((i.getCenterY() - t.getCenterY()) / (i.getCenterX() - t.getCenterX()));
627
- i.getCenterY() === t.getCenterY() && i.getCenterX() === t.getCenterX() && (d = 1);
628
- var r = d * h[0], l = h[1] / d;
629
- h[0] < l ? l = h[0] : r = h[1], h[0] = -1 * n[0] * (l / 2 + g), h[1] = -1 * n[1] * (r / 2 + g);
630
- }, e.decideDirectionsForOverlappingNodes = function(t, i, h) {
631
- t.getCenterX() < i.getCenterX() ? h[0] = -1 : h[0] = 1, t.getCenterY() < i.getCenterY() ? h[1] = -1 : h[1] = 1;
632
- }, e.getIntersection2 = function(t, i, h) {
633
- var g = t.getCenterX(), n = t.getCenterY(), d = i.getCenterX(), r = i.getCenterY();
634
- if (t.intersects(i))
635
- return h[0] = g, h[1] = n, h[2] = d, h[3] = r, !0;
636
- var l = t.getX(), s = t.getY(), c = t.getRight(), v = t.getX(), L = t.getBottom(), p = t.getRight(), A = t.getWidthHalf(), E = t.getHeightHalf(), O = i.getX(), a = i.getY(), u = i.getRight(), f = i.getX(), y = i.getBottom(), D = i.getRight(), N = i.getWidthHalf(), I = i.getHeightHalf(), m = !1, C = !1;
637
- if (g === d) {
638
- if (n > r)
639
- return h[0] = g, h[1] = s, h[2] = d, h[3] = y, !1;
640
- if (n < r)
641
- return h[0] = g, h[1] = L, h[2] = d, h[3] = a, !1;
642
- } else if (n === r) {
643
- if (g > d)
644
- return h[0] = l, h[1] = n, h[2] = u, h[3] = r, !1;
645
- if (g < d)
646
- return h[0] = c, h[1] = n, h[2] = O, h[3] = r, !1;
647
- } else {
648
- var F = t.height / t.width, Y = i.height / i.width, w = (r - n) / (d - g), G = void 0, x = void 0, S = void 0, U = void 0, P = void 0, _ = void 0;
649
- if (-F === w ? g > d ? (h[0] = v, h[1] = L, m = !0) : (h[0] = c, h[1] = s, m = !0) : F === w && (g > d ? (h[0] = l, h[1] = s, m = !0) : (h[0] = p, h[1] = L, m = !0)), -Y === w ? d > g ? (h[2] = f, h[3] = y, C = !0) : (h[2] = u, h[3] = a, C = !0) : Y === w && (d > g ? (h[2] = O, h[3] = a, C = !0) : (h[2] = D, h[3] = y, C = !0)), m && C)
650
- return !1;
651
- if (g > d ? n > r ? (G = this.getCardinalDirection(F, w, 4), x = this.getCardinalDirection(Y, w, 2)) : (G = this.getCardinalDirection(-F, w, 3), x = this.getCardinalDirection(-Y, w, 1)) : n > r ? (G = this.getCardinalDirection(-F, w, 1), x = this.getCardinalDirection(-Y, w, 3)) : (G = this.getCardinalDirection(F, w, 2), x = this.getCardinalDirection(Y, w, 4)), !m)
652
- switch (G) {
653
- case 1:
654
- U = s, S = g + -E / w, h[0] = S, h[1] = U;
655
- break;
656
- case 2:
657
- S = p, U = n + A * w, h[0] = S, h[1] = U;
658
- break;
659
- case 3:
660
- U = L, S = g + E / w, h[0] = S, h[1] = U;
661
- break;
662
- case 4:
663
- S = v, U = n + -A * w, h[0] = S, h[1] = U;
664
- break;
665
- }
666
- if (!C)
667
- switch (x) {
668
- case 1:
669
- _ = a, P = d + -I / w, h[2] = P, h[3] = _;
670
- break;
671
- case 2:
672
- P = D, _ = r + N * w, h[2] = P, h[3] = _;
673
- break;
674
- case 3:
675
- _ = y, P = d + I / w, h[2] = P, h[3] = _;
676
- break;
677
- case 4:
678
- P = f, _ = r + -N * w, h[2] = P, h[3] = _;
679
- break;
680
- }
681
- }
682
- return !1;
683
- }, e.getCardinalDirection = function(t, i, h) {
684
- return t > i ? h : 1 + h % 4;
685
- }, e.getIntersection = function(t, i, h, g) {
686
- if (g == null)
687
- return this.getIntersection2(t, i, h);
688
- var n = t.x, d = t.y, r = i.x, l = i.y, s = h.x, c = h.y, v = g.x, L = g.y, p = void 0, A = void 0, E = void 0, O = void 0, a = void 0, u = void 0, f = void 0, y = void 0, D = void 0;
689
- return E = l - d, a = n - r, f = r * d - n * l, O = L - c, u = s - v, y = v * c - s * L, D = E * u - O * a, D === 0 ? null : (p = (a * y - u * f) / D, A = (O * f - E * y) / D, new o(p, A));
690
- }, e.angleOfVector = function(t, i, h, g) {
691
- var n = void 0;
692
- return t !== h ? (n = Math.atan((g - i) / (h - t)), h < t ? n += Math.PI : g < i && (n += this.TWO_PI)) : g < i ? n = this.ONE_AND_HALF_PI : n = this.HALF_PI, n;
693
- }, e.doIntersect = function(t, i, h, g) {
694
- var n = t.x, d = t.y, r = i.x, l = i.y, s = h.x, c = h.y, v = g.x, L = g.y, p = (r - n) * (L - c) - (v - s) * (l - d);
695
- if (p === 0)
696
- return !1;
697
- var A = ((L - c) * (v - n) + (s - v) * (L - d)) / p, E = ((d - l) * (v - n) + (r - n) * (L - d)) / p;
698
- return 0 < A && A < 1 && 0 < E && E < 1;
699
- }, e.HALF_PI = 0.5 * Math.PI, e.ONE_AND_HALF_PI = 1.5 * Math.PI, e.TWO_PI = 2 * Math.PI, e.THREE_PI = 3 * Math.PI, R.exports = e;
700
- },
701
- /* 9 */
702
- /***/
703
- function(R, M, T) {
704
- function o() {
705
- }
706
- o.sign = function(e) {
707
- return e > 0 ? 1 : e < 0 ? -1 : 0;
708
- }, o.floor = function(e) {
709
- return e < 0 ? Math.ceil(e) : Math.floor(e);
710
- }, o.ceil = function(e) {
711
- return e < 0 ? Math.floor(e) : Math.ceil(e);
712
- }, R.exports = o;
713
- },
714
- /* 10 */
715
- /***/
716
- function(R, M, T) {
717
- function o() {
718
- }
719
- o.MAX_VALUE = 2147483647, o.MIN_VALUE = -2147483648, R.exports = o;
720
- },
721
- /* 11 */
722
- /***/
723
- function(R, M, T) {
724
- var o = /* @__PURE__ */ function() {
725
- function n(d, r) {
726
- for (var l = 0; l < r.length; l++) {
727
- var s = r[l];
728
- s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(d, s.key, s);
729
- }
730
- }
731
- return function(d, r, l) {
732
- return r && n(d.prototype, r), l && n(d, l), d;
733
- };
734
- }();
735
- function e(n, d) {
736
- if (!(n instanceof d))
737
- throw new TypeError("Cannot call a class as a function");
738
- }
739
- var t = function(d) {
740
- return { value: d, next: null, prev: null };
741
- }, i = function(d, r, l, s) {
742
- return d !== null ? d.next = r : s.head = r, l !== null ? l.prev = r : s.tail = r, r.prev = d, r.next = l, s.length++, r;
743
- }, h = function(d, r) {
744
- var l = d.prev, s = d.next;
745
- return l !== null ? l.next = s : r.head = s, s !== null ? s.prev = l : r.tail = l, d.prev = d.next = null, r.length--, d;
746
- }, g = function() {
747
- function n(d) {
748
- var r = this;
749
- e(this, n), this.length = 0, this.head = null, this.tail = null, d != null && d.forEach(function(l) {
750
- return r.push(l);
751
- });
752
- }
753
- return o(n, [{
754
- key: "size",
755
- value: function() {
756
- return this.length;
757
- }
758
- }, {
759
- key: "insertBefore",
760
- value: function(r, l) {
761
- return i(l.prev, t(r), l, this);
762
- }
763
- }, {
764
- key: "insertAfter",
765
- value: function(r, l) {
766
- return i(l, t(r), l.next, this);
767
- }
768
- }, {
769
- key: "insertNodeBefore",
770
- value: function(r, l) {
771
- return i(l.prev, r, l, this);
772
- }
773
- }, {
774
- key: "insertNodeAfter",
775
- value: function(r, l) {
776
- return i(l, r, l.next, this);
777
- }
778
- }, {
779
- key: "push",
780
- value: function(r) {
781
- return i(this.tail, t(r), null, this);
782
- }
783
- }, {
784
- key: "unshift",
785
- value: function(r) {
786
- return i(null, t(r), this.head, this);
787
- }
788
- }, {
789
- key: "remove",
790
- value: function(r) {
791
- return h(r, this);
792
- }
793
- }, {
794
- key: "pop",
795
- value: function() {
796
- return h(this.tail, this).value;
797
- }
798
- }, {
799
- key: "popNode",
800
- value: function() {
801
- return h(this.tail, this);
802
- }
803
- }, {
804
- key: "shift",
805
- value: function() {
806
- return h(this.head, this).value;
807
- }
808
- }, {
809
- key: "shiftNode",
810
- value: function() {
811
- return h(this.head, this);
812
- }
813
- }, {
814
- key: "get_object_at",
815
- value: function(r) {
816
- if (r <= this.length()) {
817
- for (var l = 1, s = this.head; l < r; )
818
- s = s.next, l++;
819
- return s.value;
820
- }
821
- }
822
- }, {
823
- key: "set_object_at",
824
- value: function(r, l) {
825
- if (r <= this.length()) {
826
- for (var s = 1, c = this.head; s < r; )
827
- c = c.next, s++;
828
- c.value = l;
829
- }
830
- }
831
- }]), n;
832
- }();
833
- R.exports = g;
834
- },
835
- /* 12 */
836
- /***/
837
- function(R, M, T) {
838
- function o(e, t, i) {
839
- this.x = null, this.y = null, e == null && t == null && i == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && i == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && i == null && (i = e, this.x = i.x, this.y = i.y);
840
- }
841
- o.prototype.getX = function() {
842
- return this.x;
843
- }, o.prototype.getY = function() {
844
- return this.y;
845
- }, o.prototype.getLocation = function() {
846
- return new o(this.x, this.y);
847
- }, o.prototype.setLocation = function(e, t, i) {
848
- e.constructor.name == "Point" && t == null && i == null ? (i = e, this.setLocation(i.x, i.y)) : typeof e == "number" && typeof t == "number" && i == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + 0.5), this.y = Math.floor(t + 0.5)));
849
- }, o.prototype.move = function(e, t) {
850
- this.x = e, this.y = t;
851
- }, o.prototype.translate = function(e, t) {
852
- this.x += e, this.y += t;
853
- }, o.prototype.equals = function(e) {
854
- if (e.constructor.name == "Point") {
855
- var t = e;
856
- return this.x == t.x && this.y == t.y;
857
- }
858
- return this == e;
859
- }, o.prototype.toString = function() {
860
- return new o().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
861
- }, R.exports = o;
862
- },
863
- /* 13 */
864
- /***/
865
- function(R, M, T) {
866
- function o(e, t, i, h) {
867
- this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && i != null && h != null && (this.x = e, this.y = t, this.width = i, this.height = h);
868
- }
869
- o.prototype.getX = function() {
870
- return this.x;
871
- }, o.prototype.setX = function(e) {
872
- this.x = e;
873
- }, o.prototype.getY = function() {
874
- return this.y;
875
- }, o.prototype.setY = function(e) {
876
- this.y = e;
877
- }, o.prototype.getWidth = function() {
878
- return this.width;
879
- }, o.prototype.setWidth = function(e) {
880
- this.width = e;
881
- }, o.prototype.getHeight = function() {
882
- return this.height;
883
- }, o.prototype.setHeight = function(e) {
884
- this.height = e;
885
- }, o.prototype.getRight = function() {
886
- return this.x + this.width;
887
- }, o.prototype.getBottom = function() {
888
- return this.y + this.height;
889
- }, o.prototype.intersects = function(e) {
890
- return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
891
- }, o.prototype.getCenterX = function() {
892
- return this.x + this.width / 2;
893
- }, o.prototype.getMinX = function() {
894
- return this.getX();
895
- }, o.prototype.getMaxX = function() {
896
- return this.getX() + this.width;
897
- }, o.prototype.getCenterY = function() {
898
- return this.y + this.height / 2;
899
- }, o.prototype.getMinY = function() {
900
- return this.getY();
901
- }, o.prototype.getMaxY = function() {
902
- return this.getY() + this.height;
903
- }, o.prototype.getWidthHalf = function() {
904
- return this.width / 2;
905
- }, o.prototype.getHeightHalf = function() {
906
- return this.height / 2;
907
- }, R.exports = o;
908
- },
909
- /* 14 */
910
- /***/
911
- function(R, M, T) {
912
- var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
913
- return typeof t;
914
- } : function(t) {
915
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
916
- };
917
- function e() {
918
- }
919
- e.lastID = 0, e.createID = function(t) {
920
- return e.isPrimitive(t) ? t : (t.uniqueID != null || (t.uniqueID = e.getString(), e.lastID++), t.uniqueID);
921
- }, e.getString = function(t) {
922
- return t == null && (t = e.lastID), "Object#" + t;
923
- }, e.isPrimitive = function(t) {
924
- var i = typeof t > "u" ? "undefined" : o(t);
925
- return t == null || i != "object" && i != "function";
926
- }, R.exports = e;
927
- },
928
- /* 15 */
929
- /***/
930
- function(R, M, T) {
931
- function o(s) {
932
- if (Array.isArray(s)) {
933
- for (var c = 0, v = Array(s.length); c < s.length; c++)
934
- v[c] = s[c];
935
- return v;
936
- } else
937
- return Array.from(s);
938
- }
939
- var e = T(0), t = T(6), i = T(3), h = T(1), g = T(5), n = T(4), d = T(17), r = T(27);
940
- function l(s) {
941
- r.call(this), this.layoutQuality = e.QUALITY, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = e.DEFAULT_INCREMENTAL, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new t(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, s != null && (this.isRemoteUse = s);
942
- }
943
- l.RANDOM_SEED = 1, l.prototype = Object.create(r.prototype), l.prototype.getGraphManager = function() {
944
- return this.graphManager;
945
- }, l.prototype.getAllNodes = function() {
946
- return this.graphManager.getAllNodes();
947
- }, l.prototype.getAllEdges = function() {
948
- return this.graphManager.getAllEdges();
949
- }, l.prototype.getAllNodesToApplyGravitation = function() {
950
- return this.graphManager.getAllNodesToApplyGravitation();
951
- }, l.prototype.newGraphManager = function() {
952
- var s = new t(this);
953
- return this.graphManager = s, s;
954
- }, l.prototype.newGraph = function(s) {
955
- return new g(null, this.graphManager, s);
956
- }, l.prototype.newNode = function(s) {
957
- return new i(this.graphManager, s);
958
- }, l.prototype.newEdge = function(s) {
959
- return new h(null, null, s);
960
- }, l.prototype.checkLayoutSuccess = function() {
961
- return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
962
- }, l.prototype.runLayout = function() {
963
- this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
964
- var s;
965
- return this.checkLayoutSuccess() ? s = !1 : s = this.layout(), e.ANIMATE === "during" ? !1 : (s && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, s);
966
- }, l.prototype.doPostLayout = function() {
967
- this.incremental || this.transform(), this.update();
968
- }, l.prototype.update2 = function() {
969
- if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
970
- for (var s = this.graphManager.getAllEdges(), c = 0; c < s.length; c++)
971
- s[c];
972
- for (var v = this.graphManager.getRoot().getNodes(), c = 0; c < v.length; c++)
973
- v[c];
974
- this.update(this.graphManager.getRoot());
975
- }
976
- }, l.prototype.update = function(s) {
977
- if (s == null)
978
- this.update2();
979
- else if (s instanceof i) {
980
- var c = s;
981
- if (c.getChild() != null)
982
- for (var v = c.getChild().getNodes(), L = 0; L < v.length; L++)
983
- update(v[L]);
984
- if (c.vGraphObject != null) {
985
- var p = c.vGraphObject;
986
- p.update(c);
987
- }
988
- } else if (s instanceof h) {
989
- var A = s;
990
- if (A.vGraphObject != null) {
991
- var E = A.vGraphObject;
992
- E.update(A);
993
- }
994
- } else if (s instanceof g) {
995
- var O = s;
996
- if (O.vGraphObject != null) {
997
- var a = O.vGraphObject;
998
- a.update(O);
999
- }
1000
- }
1001
- }, l.prototype.initParameters = function() {
1002
- this.isSubLayout || (this.layoutQuality = e.QUALITY, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = e.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1003
- }, l.prototype.transform = function(s) {
1004
- if (s == null)
1005
- this.transform(new n(0, 0));
1006
- else {
1007
- var c = new d(), v = this.graphManager.getRoot().updateLeftTop();
1008
- if (v != null) {
1009
- c.setWorldOrgX(s.x), c.setWorldOrgY(s.y), c.setDeviceOrgX(v.x), c.setDeviceOrgY(v.y);
1010
- for (var L = this.getAllNodes(), p, A = 0; A < L.length; A++)
1011
- p = L[A], p.transform(c);
1012
- }
1013
- }
1014
- }, l.prototype.positionNodesRandomly = function(s) {
1015
- if (s == null)
1016
- this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1017
- else
1018
- for (var c, v, L = s.getNodes(), p = 0; p < L.length; p++)
1019
- c = L[p], v = c.getChild(), v == null || v.getNodes().length == 0 ? c.scatter() : (this.positionNodesRandomly(v), c.updateBounds());
1020
- }, l.prototype.getFlatForest = function() {
1021
- for (var s = [], c = !0, v = this.graphManager.getRoot().getNodes(), L = !0, p = 0; p < v.length; p++)
1022
- v[p].getChild() != null && (L = !1);
1023
- if (!L)
1024
- return s;
1025
- var A = /* @__PURE__ */ new Set(), E = [], O = /* @__PURE__ */ new Map(), a = [];
1026
- for (a = a.concat(v); a.length > 0 && c; ) {
1027
- for (E.push(a[0]); E.length > 0 && c; ) {
1028
- var u = E[0];
1029
- E.splice(0, 1), A.add(u);
1030
- for (var f = u.getEdges(), p = 0; p < f.length; p++) {
1031
- var y = f[p].getOtherEnd(u);
1032
- if (O.get(u) != y)
1033
- if (!A.has(y))
1034
- E.push(y), O.set(y, u);
1035
- else {
1036
- c = !1;
1037
- break;
1038
- }
1039
- }
1040
- }
1041
- if (!c)
1042
- s = [];
1043
- else {
1044
- var D = [].concat(o(A));
1045
- s.push(D);
1046
- for (var p = 0; p < D.length; p++) {
1047
- var N = D[p], I = a.indexOf(N);
1048
- I > -1 && a.splice(I, 1);
1049
- }
1050
- A = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Map();
1051
- }
1052
- }
1053
- return s;
1054
- }, l.prototype.createDummyNodesForBendpoints = function(s) {
1055
- for (var c = [], v = s.source, L = this.graphManager.calcLowestCommonAncestor(s.source, s.target), p = 0; p < s.bendpoints.length; p++) {
1056
- var A = this.newNode(null);
1057
- A.setRect(new Point(0, 0), new Dimension(1, 1)), L.add(A);
1058
- var E = this.newEdge(null);
1059
- this.graphManager.add(E, v, A), c.add(A), v = A;
1060
- }
1061
- var E = this.newEdge(null);
1062
- return this.graphManager.add(E, v, s.target), this.edgeToDummyNodes.set(s, c), s.isInterGraph() ? this.graphManager.remove(s) : L.remove(s), c;
1063
- }, l.prototype.createBendpointsFromDummyNodes = function() {
1064
- var s = [];
1065
- s = s.concat(this.graphManager.getAllEdges()), s = [].concat(o(this.edgeToDummyNodes.keys())).concat(s);
1066
- for (var c = 0; c < s.length; c++) {
1067
- var v = s[c];
1068
- if (v.bendpoints.length > 0) {
1069
- for (var L = this.edgeToDummyNodes.get(v), p = 0; p < L.length; p++) {
1070
- var A = L[p], E = new n(A.getCenterX(), A.getCenterY()), O = v.bendpoints.get(p);
1071
- O.x = E.x, O.y = E.y, A.getOwner().remove(A);
1072
- }
1073
- this.graphManager.add(v, v.source, v.target);
1074
- }
1075
- }
1076
- }, l.transform = function(s, c, v, L) {
1077
- if (v != null && L != null) {
1078
- var p = c;
1079
- if (s <= 50) {
1080
- var A = c / v;
1081
- p -= (c - A) / 50 * (50 - s);
1082
- } else {
1083
- var E = c * L;
1084
- p += (E - c) / 50 * (s - 50);
1085
- }
1086
- return p;
1087
- } else {
1088
- var O, a;
1089
- return s <= 50 ? (O = 9 * c / 500, a = c / 10) : (O = 9 * c / 50, a = -8 * c), O * s + a;
1090
- }
1091
- }, l.findCenterOfTree = function(s) {
1092
- var c = [];
1093
- c = c.concat(s);
1094
- var v = [], L = /* @__PURE__ */ new Map(), p = !1, A = null;
1095
- (c.length == 1 || c.length == 2) && (p = !0, A = c[0]);
1096
- for (var E = 0; E < c.length; E++) {
1097
- var O = c[E], a = O.getNeighborsList().size;
1098
- L.set(O, O.getNeighborsList().size), a == 1 && v.push(O);
1099
- }
1100
- var u = [];
1101
- for (u = u.concat(v); !p; ) {
1102
- var f = [];
1103
- f = f.concat(u), u = [];
1104
- for (var E = 0; E < c.length; E++) {
1105
- var O = c[E], y = c.indexOf(O);
1106
- y >= 0 && c.splice(y, 1);
1107
- var D = O.getNeighborsList();
1108
- D.forEach(function(m) {
1109
- if (v.indexOf(m) < 0) {
1110
- var C = L.get(m), F = C - 1;
1111
- F == 1 && u.push(m), L.set(m, F);
1112
- }
1113
- });
1114
- }
1115
- v = v.concat(u), (c.length == 1 || c.length == 2) && (p = !0, A = c[0]);
1116
- }
1117
- return A;
1118
- }, l.prototype.setGraphManager = function(s) {
1119
- this.graphManager = s;
1120
- }, R.exports = l;
1121
- },
1122
- /* 16 */
1123
- /***/
1124
- function(R, M, T) {
1125
- function o() {
1126
- }
1127
- o.seed = 1, o.x = 0, o.nextDouble = function() {
1128
- return o.x = Math.sin(o.seed++) * 1e4, o.x - Math.floor(o.x);
1129
- }, R.exports = o;
1130
- },
1131
- /* 17 */
1132
- /***/
1133
- function(R, M, T) {
1134
- var o = T(4);
1135
- function e(t, i) {
1136
- this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1137
- }
1138
- e.prototype.getWorldOrgX = function() {
1139
- return this.lworldOrgX;
1140
- }, e.prototype.setWorldOrgX = function(t) {
1141
- this.lworldOrgX = t;
1142
- }, e.prototype.getWorldOrgY = function() {
1143
- return this.lworldOrgY;
1144
- }, e.prototype.setWorldOrgY = function(t) {
1145
- this.lworldOrgY = t;
1146
- }, e.prototype.getWorldExtX = function() {
1147
- return this.lworldExtX;
1148
- }, e.prototype.setWorldExtX = function(t) {
1149
- this.lworldExtX = t;
1150
- }, e.prototype.getWorldExtY = function() {
1151
- return this.lworldExtY;
1152
- }, e.prototype.setWorldExtY = function(t) {
1153
- this.lworldExtY = t;
1154
- }, e.prototype.getDeviceOrgX = function() {
1155
- return this.ldeviceOrgX;
1156
- }, e.prototype.setDeviceOrgX = function(t) {
1157
- this.ldeviceOrgX = t;
1158
- }, e.prototype.getDeviceOrgY = function() {
1159
- return this.ldeviceOrgY;
1160
- }, e.prototype.setDeviceOrgY = function(t) {
1161
- this.ldeviceOrgY = t;
1162
- }, e.prototype.getDeviceExtX = function() {
1163
- return this.ldeviceExtX;
1164
- }, e.prototype.setDeviceExtX = function(t) {
1165
- this.ldeviceExtX = t;
1166
- }, e.prototype.getDeviceExtY = function() {
1167
- return this.ldeviceExtY;
1168
- }, e.prototype.setDeviceExtY = function(t) {
1169
- this.ldeviceExtY = t;
1170
- }, e.prototype.transformX = function(t) {
1171
- var i = 0, h = this.lworldExtX;
1172
- return h != 0 && (i = this.ldeviceOrgX + (t - this.lworldOrgX) * this.ldeviceExtX / h), i;
1173
- }, e.prototype.transformY = function(t) {
1174
- var i = 0, h = this.lworldExtY;
1175
- return h != 0 && (i = this.ldeviceOrgY + (t - this.lworldOrgY) * this.ldeviceExtY / h), i;
1176
- }, e.prototype.inverseTransformX = function(t) {
1177
- var i = 0, h = this.ldeviceExtX;
1178
- return h != 0 && (i = this.lworldOrgX + (t - this.ldeviceOrgX) * this.lworldExtX / h), i;
1179
- }, e.prototype.inverseTransformY = function(t) {
1180
- var i = 0, h = this.ldeviceExtY;
1181
- return h != 0 && (i = this.lworldOrgY + (t - this.ldeviceOrgY) * this.lworldExtY / h), i;
1182
- }, e.prototype.inverseTransformPoint = function(t) {
1183
- var i = new o(this.inverseTransformX(t.x), this.inverseTransformY(t.y));
1184
- return i;
1185
- }, R.exports = e;
1186
- },
1187
- /* 18 */
1188
- /***/
1189
- function(R, M, T) {
1190
- function o(r) {
1191
- if (Array.isArray(r)) {
1192
- for (var l = 0, s = Array(r.length); l < r.length; l++)
1193
- s[l] = r[l];
1194
- return s;
1195
- } else
1196
- return Array.from(r);
1197
- }
1198
- var e = T(15), t = T(7), i = T(0), h = T(8), g = T(9);
1199
- function n() {
1200
- e.call(this), this.useSmartIdealEdgeLengthCalculation = t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = t.DEFAULT_EDGE_LENGTH, this.springConstant = t.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = t.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = t.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = t.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * t.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = t.MAX_ITERATIONS;
1201
- }
1202
- n.prototype = Object.create(e.prototype);
1203
- for (var d in e)
1204
- n[d] = e[d];
1205
- n.prototype.initParameters = function() {
1206
- e.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1207
- }, n.prototype.calcIdealEdgeLengths = function() {
1208
- for (var r, l, s, c, v, L, p = this.getGraphManager().getAllEdges(), A = 0; A < p.length; A++)
1209
- r = p[A], r.idealLength = this.idealEdgeLength, r.isInterGraph && (s = r.getSource(), c = r.getTarget(), v = r.getSourceInLca().getEstimatedSize(), L = r.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (r.idealLength += v + L - 2 * i.SIMPLE_NODE_SIZE), l = r.getLca().getInclusionTreeDepth(), r.idealLength += t.DEFAULT_EDGE_LENGTH * t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (s.getInclusionTreeDepth() + c.getInclusionTreeDepth() - 2 * l));
1210
- }, n.prototype.initSpringEmbedder = function() {
1211
- var r = this.getAllNodes().length;
1212
- this.incremental ? (r > t.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * t.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - t.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (r > t.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(t.COOLING_ADAPTATION_FACTOR, 1 - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * (1 - t.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1213
- }, n.prototype.calcSpringForces = function() {
1214
- for (var r = this.getAllEdges(), l, s = 0; s < r.length; s++)
1215
- l = r[s], this.calcSpringForce(l, l.idealLength);
1216
- }, n.prototype.calcRepulsionForces = function() {
1217
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, s, c, v, L, p = this.getAllNodes(), A;
1218
- if (this.useFRGridVariant)
1219
- for (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && r && this.updateGrid(), A = /* @__PURE__ */ new Set(), s = 0; s < p.length; s++)
1220
- v = p[s], this.calculateRepulsionForceOfANode(v, A, r, l), A.add(v);
1221
- else
1222
- for (s = 0; s < p.length; s++)
1223
- for (v = p[s], c = s + 1; c < p.length; c++)
1224
- L = p[c], v.getOwner() == L.getOwner() && this.calcRepulsionForce(v, L);
1225
- }, n.prototype.calcGravitationalForces = function() {
1226
- for (var r, l = this.getAllNodesToApplyGravitation(), s = 0; s < l.length; s++)
1227
- r = l[s], this.calcGravitationalForce(r);
1228
- }, n.prototype.moveNodes = function() {
1229
- for (var r = this.getAllNodes(), l, s = 0; s < r.length; s++)
1230
- l = r[s], l.move();
1231
- }, n.prototype.calcSpringForce = function(r, l) {
1232
- var s = r.getSource(), c = r.getTarget(), v, L, p, A;
1233
- if (this.uniformLeafNodeSizes && s.getChild() == null && c.getChild() == null)
1234
- r.updateLengthSimple();
1235
- else if (r.updateLength(), r.isOverlapingSourceAndTarget)
1236
- return;
1237
- v = r.getLength(), v != 0 && (L = this.springConstant * (v - l), p = L * (r.lengthX / v), A = L * (r.lengthY / v), s.springForceX += p, s.springForceY += A, c.springForceX -= p, c.springForceY -= A);
1238
- }, n.prototype.calcRepulsionForce = function(r, l) {
1239
- var s = r.getRect(), c = l.getRect(), v = new Array(2), L = new Array(4), p, A, E, O, a, u, f;
1240
- if (s.intersects(c)) {
1241
- h.calcSeparationAmount(s, c, v, t.DEFAULT_EDGE_LENGTH / 2), u = 2 * v[0], f = 2 * v[1];
1242
- var y = r.noOfChildren * l.noOfChildren / (r.noOfChildren + l.noOfChildren);
1243
- r.repulsionForceX -= y * u, r.repulsionForceY -= y * f, l.repulsionForceX += y * u, l.repulsionForceY += y * f;
1244
- } else
1245
- this.uniformLeafNodeSizes && r.getChild() == null && l.getChild() == null ? (p = c.getCenterX() - s.getCenterX(), A = c.getCenterY() - s.getCenterY()) : (h.getIntersection(s, c, L), p = L[2] - L[0], A = L[3] - L[1]), Math.abs(p) < t.MIN_REPULSION_DIST && (p = g.sign(p) * t.MIN_REPULSION_DIST), Math.abs(A) < t.MIN_REPULSION_DIST && (A = g.sign(A) * t.MIN_REPULSION_DIST), E = p * p + A * A, O = Math.sqrt(E), a = this.repulsionConstant * r.noOfChildren * l.noOfChildren / E, u = a * p / O, f = a * A / O, r.repulsionForceX -= u, r.repulsionForceY -= f, l.repulsionForceX += u, l.repulsionForceY += f;
1246
- }, n.prototype.calcGravitationalForce = function(r) {
1247
- var l, s, c, v, L, p, A, E;
1248
- l = r.getOwner(), s = (l.getRight() + l.getLeft()) / 2, c = (l.getTop() + l.getBottom()) / 2, v = r.getCenterX() - s, L = r.getCenterY() - c, p = Math.abs(v) + r.getWidth() / 2, A = Math.abs(L) + r.getHeight() / 2, r.getOwner() == this.graphManager.getRoot() ? (E = l.getEstimatedSize() * this.gravityRangeFactor, (p > E || A > E) && (r.gravitationForceX = -this.gravityConstant * v, r.gravitationForceY = -this.gravityConstant * L)) : (E = l.getEstimatedSize() * this.compoundGravityRangeFactor, (p > E || A > E) && (r.gravitationForceX = -this.gravityConstant * v * this.compoundGravityConstant, r.gravitationForceY = -this.gravityConstant * L * this.compoundGravityConstant));
1249
- }, n.prototype.isConverged = function() {
1250
- var r, l = !1;
1251
- return this.totalIterations > this.maxIterations / 3 && (l = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), r = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, r || l;
1252
- }, n.prototype.animate = function() {
1253
- this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1254
- }, n.prototype.calcNoOfChildrenForAllNodes = function() {
1255
- for (var r, l = this.graphManager.getAllNodes(), s = 0; s < l.length; s++)
1256
- r = l[s], r.noOfChildren = r.getNoOfChildren();
1257
- }, n.prototype.calcGrid = function(r) {
1258
- var l = 0, s = 0;
1259
- l = parseInt(Math.ceil((r.getRight() - r.getLeft()) / this.repulsionRange)), s = parseInt(Math.ceil((r.getBottom() - r.getTop()) / this.repulsionRange));
1260
- for (var c = new Array(l), v = 0; v < l; v++)
1261
- c[v] = new Array(s);
1262
- for (var v = 0; v < l; v++)
1263
- for (var L = 0; L < s; L++)
1264
- c[v][L] = new Array();
1265
- return c;
1266
- }, n.prototype.addNodeToGrid = function(r, l, s) {
1267
- var c = 0, v = 0, L = 0, p = 0;
1268
- c = parseInt(Math.floor((r.getRect().x - l) / this.repulsionRange)), v = parseInt(Math.floor((r.getRect().width + r.getRect().x - l) / this.repulsionRange)), L = parseInt(Math.floor((r.getRect().y - s) / this.repulsionRange)), p = parseInt(Math.floor((r.getRect().height + r.getRect().y - s) / this.repulsionRange));
1269
- for (var A = c; A <= v; A++)
1270
- for (var E = L; E <= p; E++)
1271
- this.grid[A][E].push(r), r.setGridCoordinates(c, v, L, p);
1272
- }, n.prototype.updateGrid = function() {
1273
- var r, l, s = this.getAllNodes();
1274
- for (this.grid = this.calcGrid(this.graphManager.getRoot()), r = 0; r < s.length; r++)
1275
- l = s[r], this.addNodeToGrid(l, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1276
- }, n.prototype.calculateRepulsionForceOfANode = function(r, l, s, c) {
1277
- if (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && s || c) {
1278
- var v = /* @__PURE__ */ new Set();
1279
- r.surrounding = new Array();
1280
- for (var L, p = this.grid, A = r.startX - 1; A < r.finishX + 2; A++)
1281
- for (var E = r.startY - 1; E < r.finishY + 2; E++)
1282
- if (!(A < 0 || E < 0 || A >= p.length || E >= p[0].length)) {
1283
- for (var O = 0; O < p[A][E].length; O++)
1284
- if (L = p[A][E][O], !(r.getOwner() != L.getOwner() || r == L) && !l.has(L) && !v.has(L)) {
1285
- var a = Math.abs(r.getCenterX() - L.getCenterX()) - (r.getWidth() / 2 + L.getWidth() / 2), u = Math.abs(r.getCenterY() - L.getCenterY()) - (r.getHeight() / 2 + L.getHeight() / 2);
1286
- a <= this.repulsionRange && u <= this.repulsionRange && v.add(L);
1287
- }
1288
- }
1289
- r.surrounding = [].concat(o(v));
1290
- }
1291
- for (A = 0; A < r.surrounding.length; A++)
1292
- this.calcRepulsionForce(r, r.surrounding[A]);
1293
- }, n.prototype.calcRepulsionRange = function() {
1294
- return 0;
1295
- }, R.exports = n;
1296
- },
1297
- /* 19 */
1298
- /***/
1299
- function(R, M, T) {
1300
- var o = T(1), e = T(7);
1301
- function t(h, g, n) {
1302
- o.call(this, h, g, n), this.idealLength = e.DEFAULT_EDGE_LENGTH;
1303
- }
1304
- t.prototype = Object.create(o.prototype);
1305
- for (var i in o)
1306
- t[i] = o[i];
1307
- R.exports = t;
1308
- },
1309
- /* 20 */
1310
- /***/
1311
- function(R, M, T) {
1312
- var o = T(3);
1313
- function e(i, h, g, n) {
1314
- o.call(this, i, h, g, n), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1315
- }
1316
- e.prototype = Object.create(o.prototype);
1317
- for (var t in o)
1318
- e[t] = o[t];
1319
- e.prototype.setGridCoordinates = function(i, h, g, n) {
1320
- this.startX = i, this.finishX = h, this.startY = g, this.finishY = n;
1321
- }, R.exports = e;
1322
- },
1323
- /* 21 */
1324
- /***/
1325
- function(R, M, T) {
1326
- function o(e, t) {
1327
- this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1328
- }
1329
- o.prototype.getWidth = function() {
1330
- return this.width;
1331
- }, o.prototype.setWidth = function(e) {
1332
- this.width = e;
1333
- }, o.prototype.getHeight = function() {
1334
- return this.height;
1335
- }, o.prototype.setHeight = function(e) {
1336
- this.height = e;
1337
- }, R.exports = o;
1338
- },
1339
- /* 22 */
1340
- /***/
1341
- function(R, M, T) {
1342
- var o = T(14);
1343
- function e() {
1344
- this.map = {}, this.keys = [];
1345
- }
1346
- e.prototype.put = function(t, i) {
1347
- var h = o.createID(t);
1348
- this.contains(h) || (this.map[h] = i, this.keys.push(t));
1349
- }, e.prototype.contains = function(t) {
1350
- return o.createID(t), this.map[t] != null;
1351
- }, e.prototype.get = function(t) {
1352
- var i = o.createID(t);
1353
- return this.map[i];
1354
- }, e.prototype.keySet = function() {
1355
- return this.keys;
1356
- }, R.exports = e;
1357
- },
1358
- /* 23 */
1359
- /***/
1360
- function(R, M, T) {
1361
- var o = T(14);
1362
- function e() {
1363
- this.set = {};
1364
- }
1365
- e.prototype.add = function(t) {
1366
- var i = o.createID(t);
1367
- this.contains(i) || (this.set[i] = t);
1368
- }, e.prototype.remove = function(t) {
1369
- delete this.set[o.createID(t)];
1370
- }, e.prototype.clear = function() {
1371
- this.set = {};
1372
- }, e.prototype.contains = function(t) {
1373
- return this.set[o.createID(t)] == t;
1374
- }, e.prototype.isEmpty = function() {
1375
- return this.size() === 0;
1376
- }, e.prototype.size = function() {
1377
- return Object.keys(this.set).length;
1378
- }, e.prototype.addAllTo = function(t) {
1379
- for (var i = Object.keys(this.set), h = i.length, g = 0; g < h; g++)
1380
- t.push(this.set[i[g]]);
1381
- }, e.prototype.size = function() {
1382
- return Object.keys(this.set).length;
1383
- }, e.prototype.addAll = function(t) {
1384
- for (var i = t.length, h = 0; h < i; h++) {
1385
- var g = t[h];
1386
- this.add(g);
1387
- }
1388
- }, R.exports = e;
1389
- },
1390
- /* 24 */
1391
- /***/
1392
- function(R, M, T) {
1393
- var o = /* @__PURE__ */ function() {
1394
- function h(g, n) {
1395
- for (var d = 0; d < n.length; d++) {
1396
- var r = n[d];
1397
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(g, r.key, r);
1398
- }
1399
- }
1400
- return function(g, n, d) {
1401
- return n && h(g.prototype, n), d && h(g, d), g;
1402
- };
1403
- }();
1404
- function e(h, g) {
1405
- if (!(h instanceof g))
1406
- throw new TypeError("Cannot call a class as a function");
1407
- }
1408
- var t = T(11), i = function() {
1409
- function h(g, n) {
1410
- e(this, h), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1411
- var d = void 0;
1412
- g instanceof t ? d = g.size() : d = g.length, this._quicksort(g, 0, d - 1);
1413
- }
1414
- return o(h, [{
1415
- key: "_quicksort",
1416
- value: function(n, d, r) {
1417
- if (d < r) {
1418
- var l = this._partition(n, d, r);
1419
- this._quicksort(n, d, l), this._quicksort(n, l + 1, r);
1420
- }
1421
- }
1422
- }, {
1423
- key: "_partition",
1424
- value: function(n, d, r) {
1425
- for (var l = this._get(n, d), s = d, c = r; ; ) {
1426
- for (; this.compareFunction(l, this._get(n, c)); )
1427
- c--;
1428
- for (; this.compareFunction(this._get(n, s), l); )
1429
- s++;
1430
- if (s < c)
1431
- this._swap(n, s, c), s++, c--;
1432
- else return c;
1433
- }
1434
- }
1435
- }, {
1436
- key: "_get",
1437
- value: function(n, d) {
1438
- return n instanceof t ? n.get_object_at(d) : n[d];
1439
- }
1440
- }, {
1441
- key: "_set",
1442
- value: function(n, d, r) {
1443
- n instanceof t ? n.set_object_at(d, r) : n[d] = r;
1444
- }
1445
- }, {
1446
- key: "_swap",
1447
- value: function(n, d, r) {
1448
- var l = this._get(n, d);
1449
- this._set(n, d, this._get(n, r)), this._set(n, r, l);
1450
- }
1451
- }, {
1452
- key: "_defaultCompareFunction",
1453
- value: function(n, d) {
1454
- return d > n;
1455
- }
1456
- }]), h;
1457
- }();
1458
- R.exports = i;
1459
- },
1460
- /* 25 */
1461
- /***/
1462
- function(R, M, T) {
1463
- var o = /* @__PURE__ */ function() {
1464
- function i(h, g) {
1465
- for (var n = 0; n < g.length; n++) {
1466
- var d = g[n];
1467
- d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(h, d.key, d);
1468
- }
1469
- }
1470
- return function(h, g, n) {
1471
- return g && i(h.prototype, g), n && i(h, n), h;
1472
- };
1473
- }();
1474
- function e(i, h) {
1475
- if (!(i instanceof h))
1476
- throw new TypeError("Cannot call a class as a function");
1477
- }
1478
- var t = function() {
1479
- function i(h, g) {
1480
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, d = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1481
- e(this, i), this.sequence1 = h, this.sequence2 = g, this.match_score = n, this.mismatch_penalty = d, this.gap_penalty = r, this.iMax = h.length + 1, this.jMax = g.length + 1, this.grid = new Array(this.iMax);
1482
- for (var l = 0; l < this.iMax; l++) {
1483
- this.grid[l] = new Array(this.jMax);
1484
- for (var s = 0; s < this.jMax; s++)
1485
- this.grid[l][s] = 0;
1486
- }
1487
- this.tracebackGrid = new Array(this.iMax);
1488
- for (var c = 0; c < this.iMax; c++) {
1489
- this.tracebackGrid[c] = new Array(this.jMax);
1490
- for (var v = 0; v < this.jMax; v++)
1491
- this.tracebackGrid[c][v] = [null, null, null];
1492
- }
1493
- this.alignments = [], this.score = -1, this.computeGrids();
1494
- }
1495
- return o(i, [{
1496
- key: "getScore",
1497
- value: function() {
1498
- return this.score;
1499
- }
1500
- }, {
1501
- key: "getAlignments",
1502
- value: function() {
1503
- return this.alignments;
1504
- }
1505
- // Main dynamic programming procedure
1506
- }, {
1507
- key: "computeGrids",
1508
- value: function() {
1509
- for (var g = 1; g < this.jMax; g++)
1510
- this.grid[0][g] = this.grid[0][g - 1] + this.gap_penalty, this.tracebackGrid[0][g] = [!1, !1, !0];
1511
- for (var n = 1; n < this.iMax; n++)
1512
- this.grid[n][0] = this.grid[n - 1][0] + this.gap_penalty, this.tracebackGrid[n][0] = [!1, !0, !1];
1513
- for (var d = 1; d < this.iMax; d++)
1514
- for (var r = 1; r < this.jMax; r++) {
1515
- var l = void 0;
1516
- this.sequence1[d - 1] === this.sequence2[r - 1] ? l = this.grid[d - 1][r - 1] + this.match_score : l = this.grid[d - 1][r - 1] + this.mismatch_penalty;
1517
- var s = this.grid[d - 1][r] + this.gap_penalty, c = this.grid[d][r - 1] + this.gap_penalty, v = [l, s, c], L = this.arrayAllMaxIndexes(v);
1518
- this.grid[d][r] = v[L[0]], this.tracebackGrid[d][r] = [L.includes(0), L.includes(1), L.includes(2)];
1519
- }
1520
- this.score = this.grid[this.iMax - 1][this.jMax - 1];
1521
- }
1522
- // Gets all possible valid sequence combinations
1523
- }, {
1524
- key: "alignmentTraceback",
1525
- value: function() {
1526
- var g = [];
1527
- for (g.push({
1528
- pos: [this.sequence1.length, this.sequence2.length],
1529
- seq1: "",
1530
- seq2: ""
1531
- }); g[0]; ) {
1532
- var n = g[0], d = this.tracebackGrid[n.pos[0]][n.pos[1]];
1533
- d[0] && g.push({
1534
- pos: [n.pos[0] - 1, n.pos[1] - 1],
1535
- seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1536
- seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1537
- }), d[1] && g.push({
1538
- pos: [n.pos[0] - 1, n.pos[1]],
1539
- seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1540
- seq2: "-" + n.seq2
1541
- }), d[2] && g.push({
1542
- pos: [n.pos[0], n.pos[1] - 1],
1543
- seq1: "-" + n.seq1,
1544
- seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1545
- }), n.pos[0] === 0 && n.pos[1] === 0 && this.alignments.push({
1546
- sequence1: n.seq1,
1547
- sequence2: n.seq2
1548
- }), g.shift();
1549
- }
1550
- return this.alignments;
1551
- }
1552
- // Helper Functions
1553
- }, {
1554
- key: "getAllIndexes",
1555
- value: function(g, n) {
1556
- for (var d = [], r = -1; (r = g.indexOf(n, r + 1)) !== -1; )
1557
- d.push(r);
1558
- return d;
1559
- }
1560
- }, {
1561
- key: "arrayAllMaxIndexes",
1562
- value: function(g) {
1563
- return this.getAllIndexes(g, Math.max.apply(null, g));
1564
- }
1565
- }]), i;
1566
- }();
1567
- R.exports = t;
1568
- },
1569
- /* 26 */
1570
- /***/
1571
- function(R, M, T) {
1572
- var o = function() {
1573
- };
1574
- o.FDLayout = T(18), o.FDLayoutConstants = T(7), o.FDLayoutEdge = T(19), o.FDLayoutNode = T(20), o.DimensionD = T(21), o.HashMap = T(22), o.HashSet = T(23), o.IGeometry = T(8), o.IMath = T(9), o.Integer = T(10), o.Point = T(12), o.PointD = T(4), o.RandomSeed = T(16), o.RectangleD = T(13), o.Transform = T(17), o.UniqueIDGeneretor = T(14), o.Quicksort = T(24), o.LinkedList = T(11), o.LGraphObject = T(2), o.LGraph = T(5), o.LEdge = T(1), o.LGraphManager = T(6), o.LNode = T(3), o.Layout = T(15), o.LayoutConstants = T(0), o.NeedlemanWunsch = T(25), R.exports = o;
1575
- },
1576
- /* 27 */
1577
- /***/
1578
- function(R, M, T) {
1579
- function o() {
1580
- this.listeners = [];
1581
- }
1582
- var e = o.prototype;
1583
- e.addListener = function(t, i) {
1584
- this.listeners.push({
1585
- event: t,
1586
- callback: i
1587
- });
1588
- }, e.removeListener = function(t, i) {
1589
- for (var h = this.listeners.length; h >= 0; h--) {
1590
- var g = this.listeners[h];
1591
- g.event === t && g.callback === i && this.listeners.splice(h, 1);
1592
- }
1593
- }, e.emit = function(t, i) {
1594
- for (var h = 0; h < this.listeners.length; h++) {
1595
- var g = this.listeners[h];
1596
- t === g.event && g.callback(i);
1597
- }
1598
- }, R.exports = o;
1599
- }
1600
- /******/
1601
- ])
1602
- );
1603
- });
1604
- }(V)), V.exports;
1605
- }
1606
- var $;
1607
- function et() {
1608
- return $ || ($ = 1, function(W, Z) {
1609
- (function(M, T) {
1610
- W.exports = T(tt());
1611
- })(k, function(R) {
1612
- return (
1613
- /******/
1614
- function(M) {
1615
- var T = {};
1616
- function o(e) {
1617
- if (T[e])
1618
- return T[e].exports;
1619
- var t = T[e] = {
1620
- /******/
1621
- i: e,
1622
- /******/
1623
- l: !1,
1624
- /******/
1625
- exports: {}
1626
- /******/
1627
- };
1628
- return M[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
1629
- }
1630
- return o.m = M, o.c = T, o.i = function(e) {
1631
- return e;
1632
- }, o.d = function(e, t, i) {
1633
- o.o(e, t) || Object.defineProperty(e, t, {
1634
- /******/
1635
- configurable: !1,
1636
- /******/
1637
- enumerable: !0,
1638
- /******/
1639
- get: i
1640
- /******/
1641
- });
1642
- }, o.n = function(e) {
1643
- var t = e && e.__esModule ? (
1644
- /******/
1645
- function() {
1646
- return e.default;
1647
- }
1648
- ) : (
1649
- /******/
1650
- function() {
1651
- return e;
1652
- }
1653
- );
1654
- return o.d(t, "a", t), t;
1655
- }, o.o = function(e, t) {
1656
- return Object.prototype.hasOwnProperty.call(e, t);
1657
- }, o.p = "", o(o.s = 7);
1658
- }([
1659
- /* 0 */
1660
- /***/
1661
- function(M, T) {
1662
- M.exports = R;
1663
- },
1664
- /* 1 */
1665
- /***/
1666
- function(M, T, o) {
1667
- var e = o(0).FDLayoutConstants;
1668
- function t() {
1669
- }
1670
- for (var i in e)
1671
- t[i] = e[i];
1672
- t.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, t.DEFAULT_RADIAL_SEPARATION = e.DEFAULT_EDGE_LENGTH, t.DEFAULT_COMPONENT_SEPERATION = 60, t.TILE = !0, t.TILING_PADDING_VERTICAL = 10, t.TILING_PADDING_HORIZONTAL = 10, t.TREE_REDUCTION_ON_INCREMENTAL = !1, M.exports = t;
1673
- },
1674
- /* 2 */
1675
- /***/
1676
- function(M, T, o) {
1677
- var e = o(0).FDLayoutEdge;
1678
- function t(h, g, n) {
1679
- e.call(this, h, g, n);
1680
- }
1681
- t.prototype = Object.create(e.prototype);
1682
- for (var i in e)
1683
- t[i] = e[i];
1684
- M.exports = t;
1685
- },
1686
- /* 3 */
1687
- /***/
1688
- function(M, T, o) {
1689
- var e = o(0).LGraph;
1690
- function t(h, g, n) {
1691
- e.call(this, h, g, n);
1692
- }
1693
- t.prototype = Object.create(e.prototype);
1694
- for (var i in e)
1695
- t[i] = e[i];
1696
- M.exports = t;
1697
- },
1698
- /* 4 */
1699
- /***/
1700
- function(M, T, o) {
1701
- var e = o(0).LGraphManager;
1702
- function t(h) {
1703
- e.call(this, h);
1704
- }
1705
- t.prototype = Object.create(e.prototype);
1706
- for (var i in e)
1707
- t[i] = e[i];
1708
- M.exports = t;
1709
- },
1710
- /* 5 */
1711
- /***/
1712
- function(M, T, o) {
1713
- var e = o(0).FDLayoutNode, t = o(0).IMath;
1714
- function i(g, n, d, r) {
1715
- e.call(this, g, n, d, r);
1716
- }
1717
- i.prototype = Object.create(e.prototype);
1718
- for (var h in e)
1719
- i[h] = e[h];
1720
- i.prototype.move = function() {
1721
- var g = this.graphManager.getLayout();
1722
- this.displacementX = g.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = g.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementX = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementX)), Math.abs(this.displacementY) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementY = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), g.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1723
- }, i.prototype.propogateDisplacementToChildren = function(g, n) {
1724
- for (var d = this.getChild().getNodes(), r, l = 0; l < d.length; l++)
1725
- r = d[l], r.getChild() == null ? (r.moveBy(g, n), r.displacementX += g, r.displacementY += n) : r.propogateDisplacementToChildren(g, n);
1726
- }, i.prototype.setPred1 = function(g) {
1727
- this.pred1 = g;
1728
- }, i.prototype.getPred1 = function() {
1729
- return pred1;
1730
- }, i.prototype.getPred2 = function() {
1731
- return pred2;
1732
- }, i.prototype.setNext = function(g) {
1733
- this.next = g;
1734
- }, i.prototype.getNext = function() {
1735
- return next;
1736
- }, i.prototype.setProcessed = function(g) {
1737
- this.processed = g;
1738
- }, i.prototype.isProcessed = function() {
1739
- return processed;
1740
- }, M.exports = i;
1741
- },
1742
- /* 6 */
1743
- /***/
1744
- function(M, T, o) {
1745
- var e = o(0).FDLayout, t = o(4), i = o(3), h = o(5), g = o(2), n = o(1), d = o(0).FDLayoutConstants, r = o(0).LayoutConstants, l = o(0).Point, s = o(0).PointD, c = o(0).Layout, v = o(0).Integer, L = o(0).IGeometry, p = o(0).LGraph, A = o(0).Transform;
1746
- function E() {
1747
- e.call(this), this.toBeTiled = {};
1748
- }
1749
- E.prototype = Object.create(e.prototype);
1750
- for (var O in e)
1751
- E[O] = e[O];
1752
- E.prototype.newGraphManager = function() {
1753
- var a = new t(this);
1754
- return this.graphManager = a, a;
1755
- }, E.prototype.newGraph = function(a) {
1756
- return new i(null, this.graphManager, a);
1757
- }, E.prototype.newNode = function(a) {
1758
- return new h(this.graphManager, a);
1759
- }, E.prototype.newEdge = function(a) {
1760
- return new g(null, null, a);
1761
- }, E.prototype.initParameters = function() {
1762
- e.prototype.initParameters.call(this, arguments), this.isSubLayout || (n.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = n.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = d.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = d.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = d.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = d.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = d.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / d.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = d.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1763
- }, E.prototype.layout = function() {
1764
- var a = r.DEFAULT_CREATE_BENDS_AS_NEEDED;
1765
- return a && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1766
- }, E.prototype.classicLayout = function() {
1767
- if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
1768
- if (n.TREE_REDUCTION_ON_INCREMENTAL) {
1769
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1770
- var u = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(N) {
1771
- return u.has(N);
1772
- });
1773
- this.graphManager.setAllNodesToApplyGravitation(f);
1774
- }
1775
- } else {
1776
- var a = this.getFlatForest();
1777
- if (a.length > 0)
1778
- this.positionNodesRadially(a);
1779
- else {
1780
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1781
- var u = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(y) {
1782
- return u.has(y);
1783
- });
1784
- this.graphManager.setAllNodesToApplyGravitation(f), this.positionNodesRandomly();
1785
- }
1786
- }
1787
- return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1788
- }, E.prototype.tick = function() {
1789
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1790
- if (this.prunedNodesAll.length > 0)
1791
- this.isTreeGrowing = !0;
1792
- else
1793
- return !0;
1794
- if (this.totalIterations % d.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1795
- if (this.isConverged())
1796
- if (this.prunedNodesAll.length > 0)
1797
- this.isTreeGrowing = !0;
1798
- else
1799
- return !0;
1800
- this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1801
- }
1802
- if (this.isTreeGrowing) {
1803
- if (this.growTreeIterations % 10 == 0)
1804
- if (this.prunedNodesAll.length > 0) {
1805
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1806
- var a = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(D) {
1807
- return a.has(D);
1808
- });
1809
- this.graphManager.setAllNodesToApplyGravitation(u), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = d.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1810
- } else
1811
- this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1812
- this.growTreeIterations++;
1813
- }
1814
- if (this.isGrowthFinished) {
1815
- if (this.isConverged())
1816
- return !0;
1817
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = d.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1818
- }
1819
- var f = !this.isTreeGrowing && !this.isGrowthFinished, y = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1820
- return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(f, y), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1821
- }, E.prototype.getPositionsData = function() {
1822
- for (var a = this.graphManager.getAllNodes(), u = {}, f = 0; f < a.length; f++) {
1823
- var y = a[f].rect, D = a[f].id;
1824
- u[D] = {
1825
- id: D,
1826
- x: y.getCenterX(),
1827
- y: y.getCenterY(),
1828
- w: y.width,
1829
- h: y.height
1830
- };
1831
- }
1832
- return u;
1833
- }, E.prototype.runSpringEmbedder = function() {
1834
- this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1835
- var a = !1;
1836
- if (d.ANIMATE === "during")
1837
- this.emit("layoutstarted");
1838
- else {
1839
- for (; !a; )
1840
- a = this.tick();
1841
- this.graphManager.updateBounds();
1842
- }
1843
- }, E.prototype.calculateNodesToApplyGravitationTo = function() {
1844
- var a = [], u, f = this.graphManager.getGraphs(), y = f.length, D;
1845
- for (D = 0; D < y; D++)
1846
- u = f[D], u.updateConnected(), u.isConnected || (a = a.concat(u.getNodes()));
1847
- return a;
1848
- }, E.prototype.createBendpoints = function() {
1849
- var a = [];
1850
- a = a.concat(this.graphManager.getAllEdges());
1851
- var u = /* @__PURE__ */ new Set(), f;
1852
- for (f = 0; f < a.length; f++) {
1853
- var y = a[f];
1854
- if (!u.has(y)) {
1855
- var D = y.getSource(), N = y.getTarget();
1856
- if (D == N)
1857
- y.getBendpoints().push(new s()), y.getBendpoints().push(new s()), this.createDummyNodesForBendpoints(y), u.add(y);
1858
- else {
1859
- var I = [];
1860
- if (I = I.concat(D.getEdgeListToNode(N)), I = I.concat(N.getEdgeListToNode(D)), !u.has(I[0])) {
1861
- if (I.length > 1) {
1862
- var m;
1863
- for (m = 0; m < I.length; m++) {
1864
- var C = I[m];
1865
- C.getBendpoints().push(new s()), this.createDummyNodesForBendpoints(C);
1866
- }
1867
- }
1868
- I.forEach(function(F) {
1869
- u.add(F);
1870
- });
1871
- }
1872
- }
1873
- }
1874
- if (u.size == a.length)
1875
- break;
1876
- }
1877
- }, E.prototype.positionNodesRadially = function(a) {
1878
- for (var u = new l(0, 0), f = Math.ceil(Math.sqrt(a.length)), y = 0, D = 0, N = 0, I = new s(0, 0), m = 0; m < a.length; m++) {
1879
- m % f == 0 && (N = 0, D = y, m != 0 && (D += n.DEFAULT_COMPONENT_SEPERATION), y = 0);
1880
- var C = a[m], F = c.findCenterOfTree(C);
1881
- u.x = N, u.y = D, I = E.radialLayout(C, F, u), I.y > y && (y = Math.floor(I.y)), N = Math.floor(I.x + n.DEFAULT_COMPONENT_SEPERATION);
1882
- }
1883
- this.transform(new s(r.WORLD_CENTER_X - I.x / 2, r.WORLD_CENTER_Y - I.y / 2));
1884
- }, E.radialLayout = function(a, u, f) {
1885
- var y = Math.max(this.maxDiagonalInTree(a), n.DEFAULT_RADIAL_SEPARATION);
1886
- E.branchRadialLayout(u, null, 0, 359, 0, y);
1887
- var D = p.calculateBounds(a), N = new A();
1888
- N.setDeviceOrgX(D.getMinX()), N.setDeviceOrgY(D.getMinY()), N.setWorldOrgX(f.x), N.setWorldOrgY(f.y);
1889
- for (var I = 0; I < a.length; I++) {
1890
- var m = a[I];
1891
- m.transform(N);
1892
- }
1893
- var C = new s(D.getMaxX(), D.getMaxY());
1894
- return N.inverseTransformPoint(C);
1895
- }, E.branchRadialLayout = function(a, u, f, y, D, N) {
1896
- var I = (y - f + 1) / 2;
1897
- I < 0 && (I += 180);
1898
- var m = (I + f) % 360, C = m * L.TWO_PI / 360, F = D * Math.cos(C), Y = D * Math.sin(C);
1899
- a.setCenter(F, Y);
1900
- var w = [];
1901
- w = w.concat(a.getEdges());
1902
- var G = w.length;
1903
- u != null && G--;
1904
- for (var x = 0, S = w.length, U, P = a.getEdgesBetween(u); P.length > 1; ) {
1905
- var _ = P[0];
1906
- P.splice(0, 1);
1907
- var X = w.indexOf(_);
1908
- X >= 0 && w.splice(X, 1), S--, G--;
1909
- }
1910
- u != null ? U = (w.indexOf(P[0]) + 1) % S : U = 0;
1911
- for (var b = Math.abs(y - f) / G, H = U; x != G; H = ++H % S) {
1912
- var Q = w[H].getOtherEnd(a);
1913
- if (Q != u) {
1914
- var K = (f + x * b) % 360, j = (K + b) % 360;
1915
- E.branchRadialLayout(Q, a, K, j, D + N, N), x++;
1916
- }
1917
- }
1918
- }, E.maxDiagonalInTree = function(a) {
1919
- for (var u = v.MIN_VALUE, f = 0; f < a.length; f++) {
1920
- var y = a[f], D = y.getDiagonal();
1921
- D > u && (u = D);
1922
- }
1923
- return u;
1924
- }, E.prototype.calcRepulsionRange = function() {
1925
- return 2 * (this.level + 1) * this.idealEdgeLength;
1926
- }, E.prototype.groupZeroDegreeMembers = function() {
1927
- var a = this, u = {};
1928
- this.memberGroups = {}, this.idToDummyNode = {};
1929
- for (var f = [], y = this.graphManager.getAllNodes(), D = 0; D < y.length; D++) {
1930
- var N = y[D], I = N.getParent();
1931
- this.getNodeDegreeWithChildren(N) === 0 && (I.id == null || !this.getToBeTiled(I)) && f.push(N);
1932
- }
1933
- for (var D = 0; D < f.length; D++) {
1934
- var N = f[D], m = N.getParent().id;
1935
- typeof u[m] > "u" && (u[m] = []), u[m] = u[m].concat(N);
1936
- }
1937
- Object.keys(u).forEach(function(C) {
1938
- if (u[C].length > 1) {
1939
- var F = "DummyCompound_" + C;
1940
- a.memberGroups[F] = u[C];
1941
- var Y = u[C][0].getParent(), w = new h(a.graphManager);
1942
- w.id = F, w.paddingLeft = Y.paddingLeft || 0, w.paddingRight = Y.paddingRight || 0, w.paddingBottom = Y.paddingBottom || 0, w.paddingTop = Y.paddingTop || 0, a.idToDummyNode[F] = w;
1943
- var G = a.getGraphManager().add(a.newGraph(), w), x = Y.getChild();
1944
- x.add(w);
1945
- for (var S = 0; S < u[C].length; S++) {
1946
- var U = u[C][S];
1947
- x.remove(U), G.add(U);
1948
- }
1949
- }
1950
- });
1951
- }, E.prototype.clearCompounds = function() {
1952
- var a = {}, u = {};
1953
- this.performDFSOnCompounds();
1954
- for (var f = 0; f < this.compoundOrder.length; f++)
1955
- u[this.compoundOrder[f].id] = this.compoundOrder[f], a[this.compoundOrder[f].id] = [].concat(this.compoundOrder[f].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[f].getChild()), this.compoundOrder[f].child = null;
1956
- this.graphManager.resetAllNodes(), this.tileCompoundMembers(a, u);
1957
- }, E.prototype.clearZeroDegreeMembers = function() {
1958
- var a = this, u = this.tiledZeroDegreePack = [];
1959
- Object.keys(this.memberGroups).forEach(function(f) {
1960
- var y = a.idToDummyNode[f];
1961
- u[f] = a.tileNodes(a.memberGroups[f], y.paddingLeft + y.paddingRight), y.rect.width = u[f].width, y.rect.height = u[f].height;
1962
- });
1963
- }, E.prototype.repopulateCompounds = function() {
1964
- for (var a = this.compoundOrder.length - 1; a >= 0; a--) {
1965
- var u = this.compoundOrder[a], f = u.id, y = u.paddingLeft, D = u.paddingTop;
1966
- this.adjustLocations(this.tiledMemberPack[f], u.rect.x, u.rect.y, y, D);
1967
- }
1968
- }, E.prototype.repopulateZeroDegreeMembers = function() {
1969
- var a = this, u = this.tiledZeroDegreePack;
1970
- Object.keys(u).forEach(function(f) {
1971
- var y = a.idToDummyNode[f], D = y.paddingLeft, N = y.paddingTop;
1972
- a.adjustLocations(u[f], y.rect.x, y.rect.y, D, N);
1973
- });
1974
- }, E.prototype.getToBeTiled = function(a) {
1975
- var u = a.id;
1976
- if (this.toBeTiled[u] != null)
1977
- return this.toBeTiled[u];
1978
- var f = a.getChild();
1979
- if (f == null)
1980
- return this.toBeTiled[u] = !1, !1;
1981
- for (var y = f.getNodes(), D = 0; D < y.length; D++) {
1982
- var N = y[D];
1983
- if (this.getNodeDegree(N) > 0)
1984
- return this.toBeTiled[u] = !1, !1;
1985
- if (N.getChild() == null) {
1986
- this.toBeTiled[N.id] = !1;
1987
- continue;
1988
- }
1989
- if (!this.getToBeTiled(N))
1990
- return this.toBeTiled[u] = !1, !1;
1991
- }
1992
- return this.toBeTiled[u] = !0, !0;
1993
- }, E.prototype.getNodeDegree = function(a) {
1994
- a.id;
1995
- for (var u = a.getEdges(), f = 0, y = 0; y < u.length; y++) {
1996
- var D = u[y];
1997
- D.getSource().id !== D.getTarget().id && (f = f + 1);
1998
- }
1999
- return f;
2000
- }, E.prototype.getNodeDegreeWithChildren = function(a) {
2001
- var u = this.getNodeDegree(a);
2002
- if (a.getChild() == null)
2003
- return u;
2004
- for (var f = a.getChild().getNodes(), y = 0; y < f.length; y++) {
2005
- var D = f[y];
2006
- u += this.getNodeDegreeWithChildren(D);
2007
- }
2008
- return u;
2009
- }, E.prototype.performDFSOnCompounds = function() {
2010
- this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2011
- }, E.prototype.fillCompexOrderByDFS = function(a) {
2012
- for (var u = 0; u < a.length; u++) {
2013
- var f = a[u];
2014
- f.getChild() != null && this.fillCompexOrderByDFS(f.getChild().getNodes()), this.getToBeTiled(f) && this.compoundOrder.push(f);
2015
- }
2016
- }, E.prototype.adjustLocations = function(a, u, f, y, D) {
2017
- u += y, f += D;
2018
- for (var N = u, I = 0; I < a.rows.length; I++) {
2019
- var m = a.rows[I];
2020
- u = N;
2021
- for (var C = 0, F = 0; F < m.length; F++) {
2022
- var Y = m[F];
2023
- Y.rect.x = u, Y.rect.y = f, u += Y.rect.width + a.horizontalPadding, Y.rect.height > C && (C = Y.rect.height);
2024
- }
2025
- f += C + a.verticalPadding;
2026
- }
2027
- }, E.prototype.tileCompoundMembers = function(a, u) {
2028
- var f = this;
2029
- this.tiledMemberPack = [], Object.keys(a).forEach(function(y) {
2030
- var D = u[y];
2031
- f.tiledMemberPack[y] = f.tileNodes(a[y], D.paddingLeft + D.paddingRight), D.rect.width = f.tiledMemberPack[y].width, D.rect.height = f.tiledMemberPack[y].height;
2032
- });
2033
- }, E.prototype.tileNodes = function(a, u) {
2034
- var f = n.TILING_PADDING_VERTICAL, y = n.TILING_PADDING_HORIZONTAL, D = {
2035
- rows: [],
2036
- rowWidth: [],
2037
- rowHeight: [],
2038
- width: 0,
2039
- height: u,
2040
- // assume minHeight equals to minWidth
2041
- verticalPadding: f,
2042
- horizontalPadding: y
2043
- };
2044
- a.sort(function(m, C) {
2045
- return m.rect.width * m.rect.height > C.rect.width * C.rect.height ? -1 : m.rect.width * m.rect.height < C.rect.width * C.rect.height ? 1 : 0;
2046
- });
2047
- for (var N = 0; N < a.length; N++) {
2048
- var I = a[N];
2049
- D.rows.length == 0 ? this.insertNodeToRow(D, I, 0, u) : this.canAddHorizontal(D, I.rect.width, I.rect.height) ? this.insertNodeToRow(D, I, this.getShortestRowIndex(D), u) : this.insertNodeToRow(D, I, D.rows.length, u), this.shiftToLastRow(D);
2050
- }
2051
- return D;
2052
- }, E.prototype.insertNodeToRow = function(a, u, f, y) {
2053
- var D = y;
2054
- if (f == a.rows.length) {
2055
- var N = [];
2056
- a.rows.push(N), a.rowWidth.push(D), a.rowHeight.push(0);
2057
- }
2058
- var I = a.rowWidth[f] + u.rect.width;
2059
- a.rows[f].length > 0 && (I += a.horizontalPadding), a.rowWidth[f] = I, a.width < I && (a.width = I);
2060
- var m = u.rect.height;
2061
- f > 0 && (m += a.verticalPadding);
2062
- var C = 0;
2063
- m > a.rowHeight[f] && (C = a.rowHeight[f], a.rowHeight[f] = m, C = a.rowHeight[f] - C), a.height += C, a.rows[f].push(u);
2064
- }, E.prototype.getShortestRowIndex = function(a) {
2065
- for (var u = -1, f = Number.MAX_VALUE, y = 0; y < a.rows.length; y++)
2066
- a.rowWidth[y] < f && (u = y, f = a.rowWidth[y]);
2067
- return u;
2068
- }, E.prototype.getLongestRowIndex = function(a) {
2069
- for (var u = -1, f = Number.MIN_VALUE, y = 0; y < a.rows.length; y++)
2070
- a.rowWidth[y] > f && (u = y, f = a.rowWidth[y]);
2071
- return u;
2072
- }, E.prototype.canAddHorizontal = function(a, u, f) {
2073
- var y = this.getShortestRowIndex(a);
2074
- if (y < 0)
2075
- return !0;
2076
- var D = a.rowWidth[y];
2077
- if (D + a.horizontalPadding + u <= a.width) return !0;
2078
- var N = 0;
2079
- a.rowHeight[y] < f && y > 0 && (N = f + a.verticalPadding - a.rowHeight[y]);
2080
- var I;
2081
- a.width - D >= u + a.horizontalPadding ? I = (a.height + N) / (D + u + a.horizontalPadding) : I = (a.height + N) / a.width, N = f + a.verticalPadding;
2082
- var m;
2083
- return a.width < u ? m = (a.height + N) / u : m = (a.height + N) / a.width, m < 1 && (m = 1 / m), I < 1 && (I = 1 / I), I < m;
2084
- }, E.prototype.shiftToLastRow = function(a) {
2085
- var u = this.getLongestRowIndex(a), f = a.rowWidth.length - 1, y = a.rows[u], D = y[y.length - 1], N = D.width + a.horizontalPadding;
2086
- if (a.width - a.rowWidth[f] > N && u != f) {
2087
- y.splice(-1, 1), a.rows[f].push(D), a.rowWidth[u] = a.rowWidth[u] - N, a.rowWidth[f] = a.rowWidth[f] + N, a.width = a.rowWidth[instance.getLongestRowIndex(a)];
2088
- for (var I = Number.MIN_VALUE, m = 0; m < y.length; m++)
2089
- y[m].height > I && (I = y[m].height);
2090
- u > 0 && (I += a.verticalPadding);
2091
- var C = a.rowHeight[u] + a.rowHeight[f];
2092
- a.rowHeight[u] = I, a.rowHeight[f] < D.height + a.verticalPadding && (a.rowHeight[f] = D.height + a.verticalPadding);
2093
- var F = a.rowHeight[u] + a.rowHeight[f];
2094
- a.height += F - C, this.shiftToLastRow(a);
2095
- }
2096
- }, E.prototype.tilingPreLayout = function() {
2097
- n.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2098
- }, E.prototype.tilingPostLayout = function() {
2099
- n.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2100
- }, E.prototype.reduceTrees = function() {
2101
- for (var a = [], u = !0, f; u; ) {
2102
- var y = this.graphManager.getAllNodes(), D = [];
2103
- u = !1;
2104
- for (var N = 0; N < y.length; N++)
2105
- f = y[N], f.getEdges().length == 1 && !f.getEdges()[0].isInterGraph && f.getChild() == null && (D.push([f, f.getEdges()[0], f.getOwner()]), u = !0);
2106
- if (u == !0) {
2107
- for (var I = [], m = 0; m < D.length; m++)
2108
- D[m][0].getEdges().length == 1 && (I.push(D[m]), D[m][0].getOwner().remove(D[m][0]));
2109
- a.push(I), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2110
- }
2111
- }
2112
- this.prunedNodesAll = a;
2113
- }, E.prototype.growTree = function(a) {
2114
- for (var u = a.length, f = a[u - 1], y, D = 0; D < f.length; D++)
2115
- y = f[D], this.findPlaceforPrunedNode(y), y[2].add(y[0]), y[2].add(y[1], y[1].source, y[1].target);
2116
- a.splice(a.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2117
- }, E.prototype.findPlaceforPrunedNode = function(a) {
2118
- var u, f, y = a[0];
2119
- y == a[1].source ? f = a[1].target : f = a[1].source;
2120
- var D = f.startX, N = f.finishX, I = f.startY, m = f.finishY, C = 0, F = 0, Y = 0, w = 0, G = [C, Y, F, w];
2121
- if (I > 0)
2122
- for (var x = D; x <= N; x++)
2123
- G[0] += this.grid[x][I - 1].length + this.grid[x][I].length - 1;
2124
- if (N < this.grid.length - 1)
2125
- for (var x = I; x <= m; x++)
2126
- G[1] += this.grid[N + 1][x].length + this.grid[N][x].length - 1;
2127
- if (m < this.grid[0].length - 1)
2128
- for (var x = D; x <= N; x++)
2129
- G[2] += this.grid[x][m + 1].length + this.grid[x][m].length - 1;
2130
- if (D > 0)
2131
- for (var x = I; x <= m; x++)
2132
- G[3] += this.grid[D - 1][x].length + this.grid[D][x].length - 1;
2133
- for (var S = v.MAX_VALUE, U, P, _ = 0; _ < G.length; _++)
2134
- G[_] < S ? (S = G[_], U = 1, P = _) : G[_] == S && U++;
2135
- if (U == 3 && S == 0)
2136
- G[0] == 0 && G[1] == 0 && G[2] == 0 ? u = 1 : G[0] == 0 && G[1] == 0 && G[3] == 0 ? u = 0 : G[0] == 0 && G[2] == 0 && G[3] == 0 ? u = 3 : G[1] == 0 && G[2] == 0 && G[3] == 0 && (u = 2);
2137
- else if (U == 2 && S == 0) {
2138
- var X = Math.floor(Math.random() * 2);
2139
- G[0] == 0 && G[1] == 0 ? X == 0 ? u = 0 : u = 1 : G[0] == 0 && G[2] == 0 ? X == 0 ? u = 0 : u = 2 : G[0] == 0 && G[3] == 0 ? X == 0 ? u = 0 : u = 3 : G[1] == 0 && G[2] == 0 ? X == 0 ? u = 1 : u = 2 : G[1] == 0 && G[3] == 0 ? X == 0 ? u = 1 : u = 3 : X == 0 ? u = 2 : u = 3;
2140
- } else if (U == 4 && S == 0) {
2141
- var X = Math.floor(Math.random() * 4);
2142
- u = X;
2143
- } else
2144
- u = P;
2145
- u == 0 ? y.setCenter(f.getCenterX(), f.getCenterY() - f.getHeight() / 2 - d.DEFAULT_EDGE_LENGTH - y.getHeight() / 2) : u == 1 ? y.setCenter(f.getCenterX() + f.getWidth() / 2 + d.DEFAULT_EDGE_LENGTH + y.getWidth() / 2, f.getCenterY()) : u == 2 ? y.setCenter(f.getCenterX(), f.getCenterY() + f.getHeight() / 2 + d.DEFAULT_EDGE_LENGTH + y.getHeight() / 2) : y.setCenter(f.getCenterX() - f.getWidth() / 2 - d.DEFAULT_EDGE_LENGTH - y.getWidth() / 2, f.getCenterY());
2146
- }, M.exports = E;
2147
- },
2148
- /* 7 */
2149
- /***/
2150
- function(M, T, o) {
2151
- var e = {};
2152
- e.layoutBase = o(0), e.CoSEConstants = o(1), e.CoSEEdge = o(2), e.CoSEGraph = o(3), e.CoSEGraphManager = o(4), e.CoSELayout = o(6), e.CoSENode = o(5), M.exports = e;
2153
- }
2154
- /******/
2155
- ])
2156
- );
2157
- });
2158
- }(B)), B.exports;
2159
- }
2160
- (function(W, Z) {
2161
- (function(M, T) {
2162
- W.exports = T(et());
2163
- })(k, function(R) {
2164
- return (
2165
- /******/
2166
- function(M) {
2167
- var T = {};
2168
- function o(e) {
2169
- if (T[e])
2170
- return T[e].exports;
2171
- var t = T[e] = {
2172
- /******/
2173
- i: e,
2174
- /******/
2175
- l: !1,
2176
- /******/
2177
- exports: {}
2178
- /******/
2179
- };
2180
- return M[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
2181
- }
2182
- return o.m = M, o.c = T, o.i = function(e) {
2183
- return e;
2184
- }, o.d = function(e, t, i) {
2185
- o.o(e, t) || Object.defineProperty(e, t, {
2186
- /******/
2187
- configurable: !1,
2188
- /******/
2189
- enumerable: !0,
2190
- /******/
2191
- get: i
2192
- /******/
2193
- });
2194
- }, o.n = function(e) {
2195
- var t = e && e.__esModule ? (
2196
- /******/
2197
- function() {
2198
- return e.default;
2199
- }
2200
- ) : (
2201
- /******/
2202
- function() {
2203
- return e;
2204
- }
2205
- );
2206
- return o.d(t, "a", t), t;
2207
- }, o.o = function(e, t) {
2208
- return Object.prototype.hasOwnProperty.call(e, t);
2209
- }, o.p = "", o(o.s = 1);
2210
- }([
2211
- /* 0 */
2212
- /***/
2213
- function(M, T) {
2214
- M.exports = R;
2215
- },
2216
- /* 1 */
2217
- /***/
2218
- function(M, T, o) {
2219
- var e = o(0).layoutBase.LayoutConstants, t = o(0).layoutBase.FDLayoutConstants, i = o(0).CoSEConstants, h = o(0).CoSELayout, g = o(0).CoSENode, n = o(0).layoutBase.PointD, d = o(0).layoutBase.DimensionD, r = {
2220
- // Called on `layoutready`
2221
- ready: function() {
2222
- },
2223
- // Called on `layoutstop`
2224
- stop: function() {
2225
- },
2226
- // 'draft', 'default' or 'proof"
2227
- // - 'draft' fast cooling rate
2228
- // - 'default' moderate cooling rate
2229
- // - "proof" slow cooling rate
2230
- quality: "default",
2231
- // include labels in node dimensions
2232
- nodeDimensionsIncludeLabels: !1,
2233
- // number of ticks per frame; higher is faster but more jerky
2234
- refresh: 30,
2235
- // Whether to fit the network view after when done
2236
- fit: !0,
2237
- // Padding on fit
2238
- padding: 10,
2239
- // Whether to enable incremental mode
2240
- randomize: !0,
2241
- // Node repulsion (non overlapping) multiplier
2242
- nodeRepulsion: 4500,
2243
- // Ideal edge (non nested) length
2244
- idealEdgeLength: 50,
2245
- // Divisor to compute edge forces
2246
- edgeElasticity: 0.45,
2247
- // Nesting factor (multiplier) to compute ideal edge length for nested edges
2248
- nestingFactor: 0.1,
2249
- // Gravity force (constant)
2250
- gravity: 0.25,
2251
- // Maximum number of iterations to perform
2252
- numIter: 2500,
2253
- // For enabling tiling
2254
- tile: !0,
2255
- // Type of layout animation. The option set is {'during', 'end', false}
2256
- animate: "end",
2257
- // Duration for animate:end
2258
- animationDuration: 500,
2259
- // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2260
- tilingPaddingVertical: 10,
2261
- // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2262
- tilingPaddingHorizontal: 10,
2263
- // Gravity range (constant) for compounds
2264
- gravityRangeCompound: 1.5,
2265
- // Gravity force (constant) for compounds
2266
- gravityCompound: 1,
2267
- // Gravity range (constant)
2268
- gravityRange: 3.8,
2269
- // Initial cooling factor for incremental layout
2270
- initialEnergyOnIncremental: 0.5
2271
- };
2272
- function l(L, p) {
2273
- var A = {};
2274
- for (var E in L)
2275
- A[E] = L[E];
2276
- for (var E in p)
2277
- A[E] = p[E];
2278
- return A;
2279
- }
2280
- function s(L) {
2281
- this.options = l(r, L), c(this.options);
2282
- }
2283
- var c = function(p) {
2284
- p.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = t.DEFAULT_REPULSION_STRENGTH = p.nodeRepulsion), p.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = t.DEFAULT_EDGE_LENGTH = p.idealEdgeLength), p.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = t.DEFAULT_SPRING_STRENGTH = p.edgeElasticity), p.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = p.nestingFactor), p.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = t.DEFAULT_GRAVITY_STRENGTH = p.gravity), p.numIter != null && (i.MAX_ITERATIONS = t.MAX_ITERATIONS = p.numIter), p.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = t.DEFAULT_GRAVITY_RANGE_FACTOR = p.gravityRange), p.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = p.gravityCompound), p.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = p.gravityRangeCompound), p.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = t.DEFAULT_COOLING_FACTOR_INCREMENTAL = p.initialEnergyOnIncremental), p.quality == "draft" ? e.QUALITY = 0 : p.quality == "proof" ? e.QUALITY = 2 : e.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = p.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = !p.randomize, i.ANIMATE = t.ANIMATE = e.ANIMATE = p.animate, i.TILE = p.tile, i.TILING_PADDING_VERTICAL = typeof p.tilingPaddingVertical == "function" ? p.tilingPaddingVertical.call() : p.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof p.tilingPaddingHorizontal == "function" ? p.tilingPaddingHorizontal.call() : p.tilingPaddingHorizontal;
2285
- };
2286
- s.prototype.run = function() {
2287
- var L, p, A = this.options;
2288
- this.idToLNode = {};
2289
- var E = this.layout = new h(), O = this;
2290
- O.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2291
- var a = E.newGraphManager();
2292
- this.gm = a;
2293
- var u = this.options.eles.nodes(), f = this.options.eles.edges();
2294
- this.root = a.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(u), E);
2295
- for (var y = 0; y < f.length; y++) {
2296
- var D = f[y], N = this.idToLNode[D.data("source")], I = this.idToLNode[D.data("target")];
2297
- if (N !== I && N.getEdgesBetween(I).length == 0) {
2298
- var m = a.add(E.newEdge(), N, I);
2299
- m.id = D.id();
2300
- }
2301
- }
2302
- var C = function(w, G) {
2303
- typeof w == "number" && (w = G);
2304
- var x = w.data("id"), S = O.idToLNode[x];
2305
- return {
2306
- x: S.getRect().getCenterX(),
2307
- y: S.getRect().getCenterY()
2308
- };
2309
- }, F = function Y() {
2310
- for (var w = function() {
2311
- A.fit && A.cy.fit(A.eles, A.padding), L || (L = !0, O.cy.one("layoutready", A.ready), O.cy.trigger({ type: "layoutready", layout: O }));
2312
- }, G = O.options.refresh, x, S = 0; S < G && !x; S++)
2313
- x = O.stopped || O.layout.tick();
2314
- if (x) {
2315
- E.checkLayoutSuccess() && !E.isSubLayout && E.doPostLayout(), E.tilingPostLayout && E.tilingPostLayout(), E.isLayoutFinished = !0, O.options.eles.nodes().positions(C), w(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({ type: "layoutstop", layout: O }), p && cancelAnimationFrame(p), L = !1;
2316
- return;
2317
- }
2318
- var U = O.layout.getPositionsData();
2319
- A.eles.nodes().positions(function(P, _) {
2320
- if (typeof P == "number" && (P = _), !P.isParent()) {
2321
- for (var X = P.id(), b = U[X], H = P; b == null && (b = U[H.data("parent")] || U["DummyCompound_" + H.data("parent")], U[X] = b, H = H.parent()[0], H != null); )
2322
- ;
2323
- return b != null ? {
2324
- x: b.x,
2325
- y: b.y
2326
- } : {
2327
- x: P.position("x"),
2328
- y: P.position("y")
2329
- };
2330
- }
2331
- }), w(), p = requestAnimationFrame(Y);
2332
- };
2333
- return E.addListener("layoutstarted", function() {
2334
- O.options.animate === "during" && (p = requestAnimationFrame(F));
2335
- }), E.runLayout(), this.options.animate !== "during" && (O.options.eles.nodes().not(":parent").layoutPositions(O, O.options, C), L = !1), this;
2336
- }, s.prototype.getTopMostNodes = function(L) {
2337
- for (var p = {}, A = 0; A < L.length; A++)
2338
- p[L[A].id()] = !0;
2339
- var E = L.filter(function(O, a) {
2340
- typeof O == "number" && (O = a);
2341
- for (var u = O.parent()[0]; u != null; ) {
2342
- if (p[u.id()])
2343
- return !1;
2344
- u = u.parent()[0];
2345
- }
2346
- return !0;
2347
- });
2348
- return E;
2349
- }, s.prototype.processChildrenList = function(L, p, A) {
2350
- for (var E = p.length, O = 0; O < E; O++) {
2351
- var a = p[O], u = a.children(), f, y = a.layoutDimensions({
2352
- nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2353
- });
2354
- if (a.outerWidth() != null && a.outerHeight() != null ? f = L.add(new g(A.graphManager, new n(a.position("x") - y.w / 2, a.position("y") - y.h / 2), new d(parseFloat(y.w), parseFloat(y.h)))) : f = L.add(new g(this.graphManager)), f.id = a.data("id"), f.paddingLeft = parseInt(a.css("padding")), f.paddingTop = parseInt(a.css("padding")), f.paddingRight = parseInt(a.css("padding")), f.paddingBottom = parseInt(a.css("padding")), this.options.nodeDimensionsIncludeLabels && a.isParent()) {
2355
- var D = a.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, N = a.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, I = a.css("text-halign");
2356
- f.labelWidth = D, f.labelHeight = N, f.labelPos = I;
2357
- }
2358
- if (this.idToLNode[a.data("id")] = f, isNaN(f.rect.x) && (f.rect.x = 0), isNaN(f.rect.y) && (f.rect.y = 0), u != null && u.length > 0) {
2359
- var m;
2360
- m = A.getGraphManager().add(A.newGraph(), f), this.processChildrenList(m, u, A);
2361
- }
2362
- }
2363
- }, s.prototype.stop = function() {
2364
- return this.stopped = !0, this;
2365
- };
2366
- var v = function(p) {
2367
- p("layout", "cose-bilkent", s);
2368
- };
2369
- typeof cytoscape < "u" && v(cytoscape), M.exports = v;
2370
- }
2371
- /******/
2372
- ])
2373
- );
2374
- });
2375
- })(z);
2376
- var rt = z.exports;
2377
- const nt = /* @__PURE__ */ q(rt);
2378
- export {
2379
- nt as c
2380
- };