@omg-dev/app 0.1.308

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 (423) hide show
  1. package/LICENSE +21 -0
  2. package/dist-lib/BrowserProfiles-BKqSwtW3.js +650 -0
  3. package/dist-lib/ChangelogPage-DUF8wn1F.js +2978 -0
  4. package/dist-lib/File-BszRWhXA.js +5866 -0
  5. package/dist-lib/FileEditor-ByMnm-sa.js +6892 -0
  6. package/dist-lib/FileTreePane-BG2k7gTc.js +8422 -0
  7. package/dist-lib/FileViewer-DgjR_OJp.js +18 -0
  8. package/dist-lib/SessionFilesPanel-Brfp2niD.js +336 -0
  9. package/dist-lib/TermView-BNcp4mex.js +4000 -0
  10. package/dist-lib/__vite-browser-external-2447137e-DYxpcVy9.js +4 -0
  11. package/dist-lib/_commonjsHelpers-C6fGbg64.js +6 -0
  12. package/dist-lib/abap-Y8Dl9g_6.js +6 -0
  13. package/dist-lib/abnfDiagram-VRR7QNED-Chn1Z_p9.js +87 -0
  14. package/dist-lib/actionscript-3-DQVEcJUW.js +6 -0
  15. package/dist-lib/ada-vP6ak0IW.js +6 -0
  16. package/dist-lib/agent-claude.svg +1 -0
  17. package/dist-lib/agent-codex.svg +1 -0
  18. package/dist-lib/agent-copilot.svg +1 -0
  19. package/dist-lib/agent-cursor.svg +4 -0
  20. package/dist-lib/agent-grok.svg +1 -0
  21. package/dist-lib/agent-hermes.svg +9 -0
  22. package/dist-lib/agent-opencode.svg +1 -0
  23. package/dist-lib/agent-pi.svg +7 -0
  24. package/dist-lib/andromeeda-BbmzSJq1.js +4 -0
  25. package/dist-lib/angular-html-DPB4Rf0C.js +32 -0
  26. package/dist-lib/angular-ts-CTOR2ofC.js +21 -0
  27. package/dist-lib/apache-BUjz-sD2.js +6 -0
  28. package/dist-lib/apex-OyTfjCYK.js +6 -0
  29. package/dist-lib/apl-CjNiDgad.js +16 -0
  30. package/dist-lib/apple-touch-icon.png +0 -0
  31. package/dist-lib/applescript-BPx7YFFu.js +6 -0
  32. package/dist-lib/ara-Z2fSOxSw.js +6 -0
  33. package/dist-lib/arc-B652oHQ-.js +83 -0
  34. package/dist-lib/architectureDiagram-ZJ3FMSHR-CMatArpz.js +4762 -0
  35. package/dist-lib/asciidoc-C1T9ziH6.js +6 -0
  36. package/dist-lib/asm-BTWLY5ym.js +6 -0
  37. package/dist-lib/astro-CFFExE8Q.js +18 -0
  38. package/dist-lib/aurora-x-BwoVEUWZ.js +4 -0
  39. package/dist-lib/awk-Fb0P9dkn.js +6 -0
  40. package/dist-lib/ayu-dark-DJoqd4M9.js +4 -0
  41. package/dist-lib/ayu-light-BzXEJRJ-.js +4 -0
  42. package/dist-lib/ayu-mirage-BJ2oZGzi.js +4 -0
  43. package/dist-lib/badge-CgdKT4o8.js +46 -0
  44. package/dist-lib/ballerina-oZK-YekG.js +6 -0
  45. package/dist-lib/bat-0FvbqU9S.js +6 -0
  46. package/dist-lib/beancount-DqJEb89h.js +6 -0
  47. package/dist-lib/berry-DODBq_Ff.js +6 -0
  48. package/dist-lib/bibtex-EULQRLY5.js +6 -0
  49. package/dist-lib/bicep-BorU73w0.js +6 -0
  50. package/dist-lib/bird2-CIjBSNj3.js +6 -0
  51. package/dist-lib/blade-D0HyNvCw.js +20 -0
  52. package/dist-lib/blockDiagram-677ZJIJ3-CEOPfI9A.js +2429 -0
  53. package/dist-lib/bsl-NkNNwerW.js +8 -0
  54. package/dist-lib/c-eeMepfLm.js +6 -0
  55. package/dist-lib/c3-BY5XW5ym.js +6 -0
  56. package/dist-lib/c4Diagram-LMCZKHZV-DcUHrESL.js +1578 -0
  57. package/dist-lib/cadence-02UX7mW8.js +6 -0
  58. package/dist-lib/cairo-DM6WF2e3.js +8 -0
  59. package/dist-lib/catppuccin-frappe-D3cH2rXe.js +4 -0
  60. package/dist-lib/catppuccin-latte-C0LRGUW4.js +4 -0
  61. package/dist-lib/catppuccin-macchiato-c5wQ11TT.js +4 -0
  62. package/dist-lib/catppuccin-mocha-WMD6Qvya.js +4 -0
  63. package/dist-lib/channel-B5lJFbed.js +5 -0
  64. package/dist-lib/chat-engine-BeMpvOlJ.js +7272 -0
  65. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +15 -0
  66. package/dist-lib/chunk-32BRIVSS-IYmNSvH8.js +68 -0
  67. package/dist-lib/chunk-5VM5RSS4-DO2g-xIj.js +19 -0
  68. package/dist-lib/chunk-EX3LRPZG-N96wfks9.js +1421 -0
  69. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +9 -0
  70. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +664 -0
  71. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +315 -0
  72. package/dist-lib/chunk-V7JOEXUC-DQwf2vkP.js +1534 -0
  73. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +20 -0
  74. package/dist-lib/chunk-XXDRQBXY-Ccv4aRcn.js +8 -0
  75. package/dist-lib/clarity-PKm5CwqM.js +6 -0
  76. package/dist-lib/classDiagram-OUVF2IWQ-DOn-rhuL.js +16 -0
  77. package/dist-lib/classDiagram-v2-EOCWNBFH-DOn-rhuL.js +16 -0
  78. package/dist-lib/clipboard-paste-Cq1hNjMN.js +17 -0
  79. package/dist-lib/clojure-CXJfHrL3.js +6 -0
  80. package/dist-lib/cmake-BJz8BOTU.js +6 -0
  81. package/dist-lib/cobol-HihOMwht.js +10 -0
  82. package/dist-lib/codeowners-Bt9yU6NX.js +6 -0
  83. package/dist-lib/codeql-DHkodjjI.js +6 -0
  84. package/dist-lib/coding-agents-page-7V7PKijy.js +209 -0
  85. package/dist-lib/coffee-DGBR_nr_.js +8 -0
  86. package/dist-lib/common-lisp-EVqT9Zhp.js +6 -0
  87. package/dist-lib/coq-B0L9upzn.js +6 -0
  88. package/dist-lib/cose-bilkent-JH36ORCC-C-tACTrT.js +2609 -0
  89. package/dist-lib/cpp-Cj177cuW.js +18 -0
  90. package/dist-lib/create-BrnHvSDE.js +306 -0
  91. package/dist-lib/crystal-CRJyc4G-.js +18 -0
  92. package/dist-lib/csharp-CCgA4A09.js +6 -0
  93. package/dist-lib/css-CECN5uSL.js +6 -0
  94. package/dist-lib/csv-CmYOceLb.js +6 -0
  95. package/dist-lib/cue-ZzumE7IT.js +6 -0
  96. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +23853 -0
  97. package/dist-lib/cynefinDiagram-TSTJHNR4-Be7CamD2.js +299 -0
  98. package/dist-lib/cypher-jpdmjtA6.js +6 -0
  99. package/dist-lib/cytoscape.esm-B0ledd6M.js +18786 -0
  100. package/dist-lib/d-CBagWSwH.js +6 -0
  101. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +346 -0
  102. package/dist-lib/dark-plus-pUHDTVV0.js +4 -0
  103. package/dist-lib/dart-6ObCrKr9.js +6 -0
  104. package/dist-lib/dax-CcDT-8dH.js +6 -0
  105. package/dist-lib/defaultLocale-BgPVtth8.js +171 -0
  106. package/dist-lib/desktop-B93p9R9O.js +6 -0
  107. package/dist-lib/diagram-FQU43EPY-Jg12ow4Z.js +466 -0
  108. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +530 -0
  109. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +143 -0
  110. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +353 -0
  111. package/dist-lib/diagram-WEI45ONY-D1kKPOc_.js +221 -0
  112. package/dist-lib/diff-BxzP2J8R.js +6 -0
  113. package/dist-lib/docker-CsHqm9tx.js +6 -0
  114. package/dist-lib/dotenv-BMjVjUL1.js +6 -0
  115. package/dist-lib/dracula-BtZx2Kac.js +4 -0
  116. package/dist-lib/dracula-soft-BKa-aqBv.js +4 -0
  117. package/dist-lib/dream-maker-PAx17jaB.js +6 -0
  118. package/dist-lib/ebnfDiagram-CCIWWBDH-BhQWrGMc.js +109 -0
  119. package/dist-lib/edge-BYQkOzbF.js +12 -0
  120. package/dist-lib/elixir-Dh036GMp.js +8 -0
  121. package/dist-lib/elm-BtNbw_Cd.js +8 -0
  122. package/dist-lib/emacs-lisp-Cfxdx5D-.js +6 -0
  123. package/dist-lib/embedded-DS7udW2I.js +41876 -0
  124. package/dist-lib/engine-compile-BeZvvx0I.js +10442 -0
  125. package/dist-lib/erDiagram-Q63AITRT-D2q6Nmwa.js +911 -0
  126. package/dist-lib/erb-ScVOXVpH.js +10 -0
  127. package/dist-lib/erlang-DNcDT8Hi.js +8 -0
  128. package/dist-lib/everforest-dark-DMCBqXCK.js +4 -0
  129. package/dist-lib/everforest-light-BbXl82Em.js +4 -0
  130. package/dist-lib/fennel-N4WcXuKx.js +6 -0
  131. package/dist-lib/fish-BTDEUgqH.js +6 -0
  132. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +1645 -0
  133. package/dist-lib/fluent-BMXUxfv1.js +6 -0
  134. package/dist-lib/fortran-fixed-form-B67KFkXH.js +8 -0
  135. package/dist-lib/fortran-free-form-CwqYvCLJ.js +6 -0
  136. package/dist-lib/fsharp-CYOiIVNx.js +8 -0
  137. package/dist-lib/ganttDiagram-NO4QXBWP-C_Lj-cJB.js +2712 -0
  138. package/dist-lib/gdresource-CvCIUjhi.js +10 -0
  139. package/dist-lib/gdscript-DSAxJ_aS.js +6 -0
  140. package/dist-lib/gdshader-Bk8fF6yr.js +6 -0
  141. package/dist-lib/genie-DzUvd7U9.js +6 -0
  142. package/dist-lib/gherkin-DHRaV0YP.js +6 -0
  143. package/dist-lib/git-commit-Bd32YZ0K.js +8 -0
  144. package/dist-lib/git-rebase-ZWUFO_T4.js +8 -0
  145. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +828 -0
  146. package/dist-lib/github-dark-DenFmJkN.js +4 -0
  147. package/dist-lib/github-dark-default-BJPUVz4H.js +4 -0
  148. package/dist-lib/github-dark-dimmed-DUshB20C.js +4 -0
  149. package/dist-lib/github-dark-high-contrast-D3aGCnF8.js +4 -0
  150. package/dist-lib/github-light-JYsPkUQd.js +4 -0
  151. package/dist-lib/github-light-default-D99KPAby.js +4 -0
  152. package/dist-lib/github-light-high-contrast-BbmZE-Mp.js +4 -0
  153. package/dist-lib/gleam-Bv284lvN.js +6 -0
  154. package/dist-lib/glimmer-js-DkxNrfPT.js +14 -0
  155. package/dist-lib/glimmer-ts-D6YZEmK_.js +14 -0
  156. package/dist-lib/glsl-CkUcVZNK.js +8 -0
  157. package/dist-lib/gn-XtJxiLa4.js +6 -0
  158. package/dist-lib/gnuplot-yPG9-sE_.js +6 -0
  159. package/dist-lib/go-CvFNMTvu.js +6 -0
  160. package/dist-lib/graph-B68L3K2T.js +1545 -0
  161. package/dist-lib/graphql-CBu2ehBn.js +14 -0
  162. package/dist-lib/groovy-CJQTphOW.js +6 -0
  163. package/dist-lib/gruvbox-dark-hard-C5HOtKIh.js +4 -0
  164. package/dist-lib/gruvbox-dark-medium-FVgwJHuz.js +4 -0
  165. package/dist-lib/gruvbox-dark-soft-B46F314v.js +4 -0
  166. package/dist-lib/gruvbox-light-hard-CJD38wDZ.js +4 -0
  167. package/dist-lib/gruvbox-light-medium-BlIhMYTA.js +4 -0
  168. package/dist-lib/gruvbox-light-soft-DoPHyLVZ.js +4 -0
  169. package/dist-lib/hack-ItRNKiEb.js +10 -0
  170. package/dist-lib/haml-NZLVzu_R.js +10 -0
  171. package/dist-lib/handlebars-mxStpSE7.js +14 -0
  172. package/dist-lib/haskell-WeIwNIP6.js +6 -0
  173. package/dist-lib/haxe-TztHsm5T.js +6 -0
  174. package/dist-lib/hcl-D438OF-I.js +6 -0
  175. package/dist-lib/highlighted-body-OFNGDK62-B2IXPhCU.js +19 -0
  176. package/dist-lib/hjson-DYBUbqOl.js +6 -0
  177. package/dist-lib/hlsl-Bk8TCZNL.js +6 -0
  178. package/dist-lib/horizon-CJQ10nlf.js +4 -0
  179. package/dist-lib/horizon-bright-CdkBZOMB.js +4 -0
  180. package/dist-lib/houston-BDYrDoDW.js +4 -0
  181. package/dist-lib/html-B50bmoVb.js +10 -0
  182. package/dist-lib/html-derivative-C6bxFbFW.js +8 -0
  183. package/dist-lib/http-DLvAkeD-.js +14 -0
  184. package/dist-lib/hurl-CgkFN90t.js +12 -0
  185. package/dist-lib/hxml-GbqSQCLa.js +8 -0
  186. package/dist-lib/hy-Brt5EZ7-.js +6 -0
  187. package/dist-lib/icon-192.png +0 -0
  188. package/dist-lib/icon-512.png +0 -0
  189. package/dist-lib/icon-maskable-512.png +0 -0
  190. package/dist-lib/icon-maskable.svg +16 -0
  191. package/dist-lib/icon-small.svg +19 -0
  192. package/dist-lib/icon.svg +19 -0
  193. package/dist-lib/imba-CimUv-Uh.js +6 -0
  194. package/dist-lib/index-DhYD46ms.js +5062 -0
  195. package/dist-lib/index-JkCQXUYs.js +16566 -0
  196. package/dist-lib/index-npuLMlPS.js +746 -0
  197. package/dist-lib/index.d.ts +95 -0
  198. package/dist-lib/index.js +8 -0
  199. package/dist-lib/infoDiagram-FWYZ7A6U-BbUkT0KS.js +24 -0
  200. package/dist-lib/ini-BZIuRIvJ.js +6 -0
  201. package/dist-lib/init-DjUOC4st.js +16 -0
  202. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +622 -0
  203. package/dist-lib/java-DY6VlHhP.js +6 -0
  204. package/dist-lib/javascript-C25yR2R2.js +6 -0
  205. package/dist-lib/jinja-CFW5uAwY.js +11 -0
  206. package/dist-lib/jison-DdreslRX.js +8 -0
  207. package/dist-lib/journeyDiagram-5HDEW3XC-CgykmVSC.js +834 -0
  208. package/dist-lib/json-DxJze_jm.js +6 -0
  209. package/dist-lib/json5-BT4Fjg39.js +6 -0
  210. package/dist-lib/jsonc-CHjZD8gR.js +6 -0
  211. package/dist-lib/jsonl-BGuvDmy9.js +6 -0
  212. package/dist-lib/jsonnet-Bx2cfsXg.js +6 -0
  213. package/dist-lib/jssm-BcADi6EI.js +6 -0
  214. package/dist-lib/jsx-BtKADgXT.js +6 -0
  215. package/dist-lib/julia-CZiKXNNP.js +16 -0
  216. package/dist-lib/just-CEK2SJ_k.js +18 -0
  217. package/dist-lib/kanagawa-dragon-CiKur4Hl.js +4 -0
  218. package/dist-lib/kanagawa-lotus-BKu-smKu.js +4 -0
  219. package/dist-lib/kanagawa-wave-CQwozSzG.js +4 -0
  220. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +726 -0
  221. package/dist-lib/katex-jHfnQmlp.js +11682 -0
  222. package/dist-lib/kdl-BNOv9TC3.js +6 -0
  223. package/dist-lib/kotlin-ByBMgTeR.js +6 -0
  224. package/dist-lib/kusto-DH_XitHS.js +6 -0
  225. package/dist-lib/laserwave-6a00oqik.js +4 -0
  226. package/dist-lib/latex-B8Egmqc5.js +8 -0
  227. package/dist-lib/layout-BGrtsiRL.js +1519 -0
  228. package/dist-lib/lean-BnVxaZxY.js +6 -0
  229. package/dist-lib/less-B1GLI2Di.js +6 -0
  230. package/dist-lib/light-plus-CZuVqSLX.js +4 -0
  231. package/dist-lib/linear-B5ZSwawJ.js +259 -0
  232. package/dist-lib/liquid-CHzkx3jT.js +14 -0
  233. package/dist-lib/llvm-Bk2XctFf.js +6 -0
  234. package/dist-lib/log-Al8wyEFV.js +6 -0
  235. package/dist-lib/logo-DBa4JDzV.js +6 -0
  236. package/dist-lib/lua-Bp3IRv7I.js +8 -0
  237. package/dist-lib/luau-UQyhudEE.js +6 -0
  238. package/dist-lib/make-CsMclxtr.js +6 -0
  239. package/dist-lib/manifest.webmanifest +19 -0
  240. package/dist-lib/map-hbfFlSln.js +224 -0
  241. package/dist-lib/markdown-CrScaQ96.js +6 -0
  242. package/dist-lib/marko-CJBA24Ri.js +14 -0
  243. package/dist-lib/material-theme-D6KBX41T.js +4 -0
  244. package/dist-lib/material-theme-darker-CkRroheE.js +4 -0
  245. package/dist-lib/material-theme-lighter-BUBw43Yz.js +4 -0
  246. package/dist-lib/material-theme-ocean-ClGX14Ja.js +4 -0
  247. package/dist-lib/material-theme-palenight-C1RVm8K1.js +4 -0
  248. package/dist-lib/matlab-BOAaUVP0.js +6 -0
  249. package/dist-lib/mdc-C9YSUwVC.js +12 -0
  250. package/dist-lib/mdx-BOhZZUJ8.js +6 -0
  251. package/dist-lib/mermaid-C3rz4dYh.js +6 -0
  252. package/dist-lib/mermaid-GHXKKRXX-BepkNUDb.js +4 -0
  253. package/dist-lib/min-dark-C7ak0t6c.js +4 -0
  254. package/dist-lib/min-light-CKFxVcPp.js +4 -0
  255. package/dist-lib/mindmap-definition-LN4V7U3C-CfhfeEht.js +831 -0
  256. package/dist-lib/mipsasm-CTx18fBl.js +6 -0
  257. package/dist-lib/mojo-EIZIZRTQ.js +6 -0
  258. package/dist-lib/monokai-C1KBYcO0.js +4 -0
  259. package/dist-lib/moonbit-B1TV0fG3.js +6 -0
  260. package/dist-lib/move-Db4ltDq1.js +6 -0
  261. package/dist-lib/narrat-DmhDCBs-.js +6 -0
  262. package/dist-lib/nextflow-47kAzSl1.js +8 -0
  263. package/dist-lib/nextflow-groovy-Drz_2V0j.js +6 -0
  264. package/dist-lib/nginx-D7O4WoB1.js +8 -0
  265. package/dist-lib/night-owl-Bm2rzalh.js +4 -0
  266. package/dist-lib/night-owl-light-CBI5u5kw.js +4 -0
  267. package/dist-lib/nim-QAjRdh9w.js +20 -0
  268. package/dist-lib/nix-fTRXMGic.js +9 -0
  269. package/dist-lib/nord-CC5OiUXg.js +4 -0
  270. package/dist-lib/nushell-BGCPRlV5.js +6 -0
  271. package/dist-lib/objective-c-Itk8tzmv.js +6 -0
  272. package/dist-lib/objective-cpp-DGt5UKRO.js +6 -0
  273. package/dist-lib/ocaml-eSVK32Eg.js +6 -0
  274. package/dist-lib/odin-BItnF517.js +6 -0
  275. package/dist-lib/one-dark-pro-DTA3VF0_.js +4 -0
  276. package/dist-lib/one-light-LkMrt1Cf.js +4 -0
  277. package/dist-lib/openscad-Sp5uZ6f2.js +6 -0
  278. package/dist-lib/ordinal-DfAQgscy.js +61 -0
  279. package/dist-lib/pascal-xy8pJNns.js +6 -0
  280. package/dist-lib/pegDiagram-2B236MQR-CYDAJHPF.js +95 -0
  281. package/dist-lib/perl-DkVrgJBg.js +16 -0
  282. package/dist-lib/php-BIzsF_5x.js +18 -0
  283. package/dist-lib/pieDiagram-ENE6RG2P-udKxQm4p.js +209 -0
  284. package/dist-lib/pierre-dark-D52vmD1t.js +4 -0
  285. package/dist-lib/pierre-dark-protanopia-deuteranopia-Coza2ydH.js +4 -0
  286. package/dist-lib/pierre-dark-soft-D0o08Lfm.js +4 -0
  287. package/dist-lib/pierre-dark-tritanopia-BP-A_WyN.js +4 -0
  288. package/dist-lib/pierre-dark-vibrant-BjUzbiGn.js +4 -0
  289. package/dist-lib/pierre-light-CzM3AfLn.js +4 -0
  290. package/dist-lib/pierre-light-protanopia-deuteranopia-DFclCKch.js +4 -0
  291. package/dist-lib/pierre-light-soft-m3tr_5b6.js +4 -0
  292. package/dist-lib/pierre-light-tritanopia-Dh0MAsTp.js +4 -0
  293. package/dist-lib/pierre-light-vibrant-BZSORskK.js +4 -0
  294. package/dist-lib/pkl-C-zSNmaA.js +6 -0
  295. package/dist-lib/plastic-CSTz3KZp.js +4 -0
  296. package/dist-lib/plsql-pVbGZfOv.js +6 -0
  297. package/dist-lib/po-BNfHvqmm.js +6 -0
  298. package/dist-lib/poimandres-C-VADXHD.js +4 -0
  299. package/dist-lib/polar-CAZahv3u.js +6 -0
  300. package/dist-lib/postcss-05aHdL-n.js +6 -0
  301. package/dist-lib/powerquery-DI9HkTvs.js +6 -0
  302. package/dist-lib/powershell-Clc4ydu-.js +6 -0
  303. package/dist-lib/prisma-FZjmVtSl.js +6 -0
  304. package/dist-lib/prolog-C5-yg4TO.js +6 -0
  305. package/dist-lib/proto-C7QgialS.js +6 -0
  306. package/dist-lib/pug-XOw9Q1Ho.js +12 -0
  307. package/dist-lib/puppet-CUJHmnxV.js +6 -0
  308. package/dist-lib/purescript-rUfGld-4.js +6 -0
  309. package/dist-lib/python-BFNSHbwJ.js +6 -0
  310. package/dist-lib/qml-rTNXsquU.js +8 -0
  311. package/dist-lib/qmldir-BInDYbpo.js +6 -0
  312. package/dist-lib/qss-AeJTysr_.js +6 -0
  313. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +1025 -0
  314. package/dist-lib/r-CSmzDPi7.js +6 -0
  315. package/dist-lib/racket-B83wSAja.js +6 -0
  316. package/dist-lib/railroadDiagram-RFXS5EU6-q0Svkmuy.js +77 -0
  317. package/dist-lib/raku-nEQ4ZJJ7.js +6 -0
  318. package/dist-lib/razor-Ci8D0dQK.js +10 -0
  319. package/dist-lib/red-7y8PH7HH.js +4 -0
  320. package/dist-lib/reg-m_s_Kiip.js +6 -0
  321. package/dist-lib/regexp-BazyLpPg.js +6 -0
  322. package/dist-lib/rel-BcRfyd6Q.js +6 -0
  323. package/dist-lib/requirementDiagram-TGXJPOKE-tNxRI1gc.js +884 -0
  324. package/dist-lib/resume-session-sheet-YCOfKuXl.js +316 -0
  325. package/dist-lib/riscv-Ce8MAQLP.js +6 -0
  326. package/dist-lib/ron-DCEEQypA.js +6 -0
  327. package/dist-lib/rose-pine-BKc3yVeu.js +4 -0
  328. package/dist-lib/rose-pine-dawn-BulJcPZT.js +4 -0
  329. package/dist-lib/rose-pine-moon-j6jiXKV8.js +4 -0
  330. package/dist-lib/rosmsg-Cz0w1km8.js +6 -0
  331. package/dist-lib/rst-DM32Wy3O.js +22 -0
  332. package/dist-lib/ruby-BeqCs27h.js +30 -0
  333. package/dist-lib/rust-CLzF9zIN.js +6 -0
  334. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +847 -0
  335. package/dist-lib/sas-fpEvgATw.js +8 -0
  336. package/dist-lib/sass-DxHp5rTx.js +6 -0
  337. package/dist-lib/scala-D4grkFkl.js +6 -0
  338. package/dist-lib/scheme-BCRWuEm4.js +6 -0
  339. package/dist-lib/scss-B1FaCqwR.js +8 -0
  340. package/dist-lib/sdbl-B7T8abf4.js +6 -0
  341. package/dist-lib/sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js +2898 -0
  342. package/dist-lib/session-token-usage-DIMXh6Pi.js +236 -0
  343. package/dist-lib/shaderlab-Cr62-Wb4.js +8 -0
  344. package/dist-lib/shadow-text-size-CBCTdbYU.js +39 -0
  345. package/dist-lib/shellscript-InADTalH.js +6 -0
  346. package/dist-lib/shellsession-DiDJNQdy.js +8 -0
  347. package/dist-lib/shipped-page-D51HiXpe.js +574 -0
  348. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +47 -0
  349. package/dist-lib/slack-dark-i7wN4OET.js +4 -0
  350. package/dist-lib/slack-ochin-ndHf0LoP.js +4 -0
  351. package/dist-lib/smalltalk-BlI1_OkM.js +6 -0
  352. package/dist-lib/snazzy-light-BlSJXAu4.js +4 -0
  353. package/dist-lib/solarized-dark-UTmkh7lw.js +4 -0
  354. package/dist-lib/solarized-light-BheCkDPT.js +4 -0
  355. package/dist-lib/solidity-DUWnFhS6.js +6 -0
  356. package/dist-lib/soy-C1-6njHa.js +8 -0
  357. package/dist-lib/sparql-B0KWFEri.js +8 -0
  358. package/dist-lib/splunk-CRXR8A9s.js +6 -0
  359. package/dist-lib/sql-Cn_v3PB0.js +6 -0
  360. package/dist-lib/ssh-config-DP-hNVbF.js +6 -0
  361. package/dist-lib/stata-B8c5fTjX.js +8 -0
  362. package/dist-lib/stateDiagram-2N3HPSRC-CnWB7HvU.js +263 -0
  363. package/dist-lib/stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js +16 -0
  364. package/dist-lib/streamdown-response-DPrve_Vt.js +20929 -0
  365. package/dist-lib/styles.css +1 -0
  366. package/dist-lib/stylus-CyKEU1Ej.js +6 -0
  367. package/dist-lib/surrealql-CQi7GQN7.js +8 -0
  368. package/dist-lib/svelte-rYri41WT.js +14 -0
  369. package/dist-lib/sw.js +215 -0
  370. package/dist-lib/swift-DJpUqPLg.js +6 -0
  371. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +5353 -0
  372. package/dist-lib/swimlanesDiagram-G3AALYLV-CKyOeqF_.js +13 -0
  373. package/dist-lib/synthwave-84-NU3C_KFZ.js +4 -0
  374. package/dist-lib/system-verilog-BCm7smPJ.js +6 -0
  375. package/dist-lib/systemd-C-4qm6XH.js +6 -0
  376. package/dist-lib/talonscript-CFF3LF_O.js +6 -0
  377. package/dist-lib/tasl-Cg_WBUAe.js +6 -0
  378. package/dist-lib/tcl-DN7buRTF.js +6 -0
  379. package/dist-lib/templ-Crs9Ui8q.js +12 -0
  380. package/dist-lib/terraform-DGvcn9zM.js +6 -0
  381. package/dist-lib/tex-AHxmLTL0.js +8 -0
  382. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +1066 -0
  383. package/dist-lib/tokyo-night-DP4TmcQl.js +4 -0
  384. package/dist-lib/toml-DY62mUL_.js +6 -0
  385. package/dist-lib/ts-tags-ioVe2PKw.js +41 -0
  386. package/dist-lib/tsv-BtvSkaG0.js +6 -0
  387. package/dist-lib/tsx-B8rCNbgL.js +6 -0
  388. package/dist-lib/turtle-_H59FV7D.js +6 -0
  389. package/dist-lib/twig-DwV2Fi4L.js +18 -0
  390. package/dist-lib/types-BSXdE6DF.js +4 -0
  391. package/dist-lib/typescript-RycA9KXf.js +6 -0
  392. package/dist-lib/typespec-DWqp-kUU.js +6 -0
  393. package/dist-lib/typst-D_1QKWns.js +6 -0
  394. package/dist-lib/v-BPCNiyYe.js +6 -0
  395. package/dist-lib/vala-uxaPR7d1.js +6 -0
  396. package/dist-lib/vb-D8_c5-KN.js +6 -0
  397. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +1585 -0
  398. package/dist-lib/verilog-B-bybjPF.js +6 -0
  399. package/dist-lib/vesper-BckBta1U.js +4 -0
  400. package/dist-lib/vhdl-CUlNa8ac.js +6 -0
  401. package/dist-lib/viml-DsfA-sWm.js +6 -0
  402. package/dist-lib/vitesse-black-BoGvW84i.js +4 -0
  403. package/dist-lib/vitesse-dark-Cym-eLtO.js +4 -0
  404. package/dist-lib/vitesse-light-CcmG315c.js +4 -0
  405. package/dist-lib/vue-DXEmyXn9.js +31 -0
  406. package/dist-lib/vue-html-j9xNEdu3.js +8 -0
  407. package/dist-lib/vue-vine-D41-N99t.js +18 -0
  408. package/dist-lib/vyper-CPQuu50u.js +6 -0
  409. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +684 -0
  410. package/dist-lib/wasm-BBXxrAl7.js +6 -0
  411. package/dist-lib/wasm-DQxwEHae.js +7 -0
  412. package/dist-lib/wenyan-pbVjoM9_.js +6 -0
  413. package/dist-lib/wgsl-DY4iK1q1.js +6 -0
  414. package/dist-lib/wikitext-Z-MoUasO.js +6 -0
  415. package/dist-lib/wit-CQMQOlTg.js +6 -0
  416. package/dist-lib/wolfram-Dz4KXISs.js +6 -0
  417. package/dist-lib/xml-C2J0sS9M.js +8 -0
  418. package/dist-lib/xsl-BmSZphgC.js +8 -0
  419. package/dist-lib/xychartDiagram-FW5EYKEG-m3s7caPv.js +1385 -0
  420. package/dist-lib/yaml-DaO7k5B1.js +6 -0
  421. package/dist-lib/zenscript-CxBjpf9c.js +6 -0
  422. package/dist-lib/zig-Vm0PO9wB.js +6 -0
  423. package/package.json +55 -0
@@ -0,0 +1,4762 @@
1
+ import { p as Ze } from "./chunk-JWPE2WC7-DFPBClX_.js";
2
+ import { _ as gt, F as qe, ad as Qe, l as Fe, b as Je, a as Ke, o as je, p as _e, g as tr, s as er, q as rr, B as ir, z as ar, D as nr, c as Ee, a$ as Te, ai as pe, i as or, d as sr, r as hr, aj as lr, b7 as fr } from "./index-JkCQXUYs.js";
3
+ import { p as cr } from "./cynefin-VYW2F7L2-DQXPWaog.js";
4
+ import { c as be } from "./cytoscape.esm-B0ledd6M.js";
5
+ import { g as gr } from "./_commonjsHelpers-C6fGbg64.js";
6
+ var he = { exports: {} }, le = { exports: {} }, fe = { exports: {} }, ur = fe.exports, Oe;
7
+ function dr() {
8
+ return Oe || (Oe = 1, (function(I, M) {
9
+ (function(x, N) {
10
+ I.exports = N();
11
+ })(ur, function() {
12
+ return (
13
+ /******/
14
+ (function(w) {
15
+ var x = {};
16
+ function N(d) {
17
+ if (x[d])
18
+ return x[d].exports;
19
+ var l = x[d] = {
20
+ /******/
21
+ i: d,
22
+ /******/
23
+ l: !1,
24
+ /******/
25
+ exports: {}
26
+ /******/
27
+ };
28
+ return w[d].call(l.exports, l, l.exports, N), l.l = !0, l.exports;
29
+ }
30
+ return N.m = w, N.c = x, N.i = function(d) {
31
+ return d;
32
+ }, N.d = function(d, l, a) {
33
+ N.o(d, l) || Object.defineProperty(d, l, {
34
+ /******/
35
+ configurable: !1,
36
+ /******/
37
+ enumerable: !0,
38
+ /******/
39
+ get: a
40
+ /******/
41
+ });
42
+ }, N.n = function(d) {
43
+ var l = d && d.__esModule ? (
44
+ /******/
45
+ function() {
46
+ return d.default;
47
+ }
48
+ ) : (
49
+ /******/
50
+ function() {
51
+ return d;
52
+ }
53
+ );
54
+ return N.d(l, "a", l), l;
55
+ }, N.o = function(d, l) {
56
+ return Object.prototype.hasOwnProperty.call(d, l);
57
+ }, N.p = "", N(N.s = 28);
58
+ })([
59
+ /* 0 */
60
+ /***/
61
+ (function(w, x, N) {
62
+ function d() {
63
+ }
64
+ d.QUALITY = 1, d.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, d.DEFAULT_INCREMENTAL = !1, d.DEFAULT_ANIMATION_ON_LAYOUT = !0, d.DEFAULT_ANIMATION_DURING_LAYOUT = !1, d.DEFAULT_ANIMATION_PERIOD = 50, d.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, d.DEFAULT_GRAPH_MARGIN = 15, d.NODE_DIMENSIONS_INCLUDE_LABELS = !1, d.SIMPLE_NODE_SIZE = 40, d.SIMPLE_NODE_HALF_SIZE = d.SIMPLE_NODE_SIZE / 2, d.EMPTY_COMPOUND_NODE_SIZE = 40, d.MIN_EDGE_LENGTH = 1, d.WORLD_BOUNDARY = 1e6, d.INITIAL_WORLD_BOUNDARY = d.WORLD_BOUNDARY / 1e3, d.WORLD_CENTER_X = 1200, d.WORLD_CENTER_Y = 900, w.exports = d;
65
+ }),
66
+ /* 1 */
67
+ /***/
68
+ (function(w, x, N) {
69
+ var d = N(2), l = N(8), a = N(9);
70
+ function r(f, e, g) {
71
+ d.call(this, g), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = g, this.bendpoints = [], this.source = f, this.target = e;
72
+ }
73
+ r.prototype = Object.create(d.prototype);
74
+ for (var i in d)
75
+ r[i] = d[i];
76
+ r.prototype.getSource = function() {
77
+ return this.source;
78
+ }, r.prototype.getTarget = function() {
79
+ return this.target;
80
+ }, r.prototype.isInterGraph = function() {
81
+ return this.isInterGraph;
82
+ }, r.prototype.getLength = function() {
83
+ return this.length;
84
+ }, r.prototype.isOverlapingSourceAndTarget = function() {
85
+ return this.isOverlapingSourceAndTarget;
86
+ }, r.prototype.getBendpoints = function() {
87
+ return this.bendpoints;
88
+ }, r.prototype.getLca = function() {
89
+ return this.lca;
90
+ }, r.prototype.getSourceInLca = function() {
91
+ return this.sourceInLca;
92
+ }, r.prototype.getTargetInLca = function() {
93
+ return this.targetInLca;
94
+ }, r.prototype.getOtherEnd = function(f) {
95
+ if (this.source === f)
96
+ return this.target;
97
+ if (this.target === f)
98
+ return this.source;
99
+ throw "Node is not incident with this edge";
100
+ }, r.prototype.getOtherEndInGraph = function(f, e) {
101
+ for (var g = this.getOtherEnd(f), t = e.getGraphManager().getRoot(); ; ) {
102
+ if (g.getOwner() == e)
103
+ return g;
104
+ if (g.getOwner() == t)
105
+ break;
106
+ g = g.getOwner().getParent();
107
+ }
108
+ return null;
109
+ }, r.prototype.updateLength = function() {
110
+ var f = new Array(4);
111
+ this.isOverlapingSourceAndTarget = l.getIntersection(this.target.getRect(), this.source.getRect(), f), this.isOverlapingSourceAndTarget || (this.lengthX = f[0] - f[2], this.lengthY = f[1] - f[3], Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
112
+ }, r.prototype.updateLengthSimple = function() {
113
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
114
+ }, w.exports = r;
115
+ }),
116
+ /* 2 */
117
+ /***/
118
+ (function(w, x, N) {
119
+ function d(l) {
120
+ this.vGraphObject = l;
121
+ }
122
+ w.exports = d;
123
+ }),
124
+ /* 3 */
125
+ /***/
126
+ (function(w, x, N) {
127
+ var d = N(2), l = N(10), a = N(13), r = N(0), i = N(16), f = N(5);
128
+ function e(t, s, o, c) {
129
+ o == null && c == null && (c = s), d.call(this, c), t.graphManager != null && (t = t.graphManager), this.estimatedSize = l.MIN_VALUE, this.inclusionTreeDepth = l.MAX_VALUE, this.vGraphObject = c, this.edges = [], this.graphManager = t, o != null && s != null ? this.rect = new a(s.x, s.y, o.width, o.height) : this.rect = new a();
130
+ }
131
+ e.prototype = Object.create(d.prototype);
132
+ for (var g in d)
133
+ e[g] = d[g];
134
+ e.prototype.getEdges = function() {
135
+ return this.edges;
136
+ }, e.prototype.getChild = function() {
137
+ return this.child;
138
+ }, e.prototype.getOwner = function() {
139
+ return this.owner;
140
+ }, e.prototype.getWidth = function() {
141
+ return this.rect.width;
142
+ }, e.prototype.setWidth = function(t) {
143
+ this.rect.width = t;
144
+ }, e.prototype.getHeight = function() {
145
+ return this.rect.height;
146
+ }, e.prototype.setHeight = function(t) {
147
+ this.rect.height = t;
148
+ }, e.prototype.getCenterX = function() {
149
+ return this.rect.x + this.rect.width / 2;
150
+ }, e.prototype.getCenterY = function() {
151
+ return this.rect.y + this.rect.height / 2;
152
+ }, e.prototype.getCenter = function() {
153
+ return new f(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
154
+ }, e.prototype.getLocation = function() {
155
+ return new f(this.rect.x, this.rect.y);
156
+ }, e.prototype.getRect = function() {
157
+ return this.rect;
158
+ }, e.prototype.getDiagonal = function() {
159
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
160
+ }, e.prototype.getHalfTheDiagonal = function() {
161
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
162
+ }, e.prototype.setRect = function(t, s) {
163
+ this.rect.x = t.x, this.rect.y = t.y, this.rect.width = s.width, this.rect.height = s.height;
164
+ }, e.prototype.setCenter = function(t, s) {
165
+ this.rect.x = t - this.rect.width / 2, this.rect.y = s - this.rect.height / 2;
166
+ }, e.prototype.setLocation = function(t, s) {
167
+ this.rect.x = t, this.rect.y = s;
168
+ }, e.prototype.moveBy = function(t, s) {
169
+ this.rect.x += t, this.rect.y += s;
170
+ }, e.prototype.getEdgeListToNode = function(t) {
171
+ var s = [], o = this;
172
+ return o.edges.forEach(function(c) {
173
+ if (c.target == t) {
174
+ if (c.source != o) throw "Incorrect edge source!";
175
+ s.push(c);
176
+ }
177
+ }), s;
178
+ }, e.prototype.getEdgesBetween = function(t) {
179
+ var s = [], o = this;
180
+ return o.edges.forEach(function(c) {
181
+ if (!(c.source == o || c.target == o)) throw "Incorrect edge source and/or target";
182
+ (c.target == t || c.source == t) && s.push(c);
183
+ }), s;
184
+ }, e.prototype.getNeighborsList = function() {
185
+ var t = /* @__PURE__ */ new Set(), s = this;
186
+ return s.edges.forEach(function(o) {
187
+ if (o.source == s)
188
+ t.add(o.target);
189
+ else {
190
+ if (o.target != s)
191
+ throw "Incorrect incidency!";
192
+ t.add(o.source);
193
+ }
194
+ }), t;
195
+ }, e.prototype.withChildren = function() {
196
+ var t = /* @__PURE__ */ new Set(), s, o;
197
+ if (t.add(this), this.child != null)
198
+ for (var c = this.child.getNodes(), h = 0; h < c.length; h++)
199
+ s = c[h], o = s.withChildren(), o.forEach(function(T) {
200
+ t.add(T);
201
+ });
202
+ return t;
203
+ }, e.prototype.getNoOfChildren = function() {
204
+ var t = 0, s;
205
+ if (this.child == null)
206
+ t = 1;
207
+ else
208
+ for (var o = this.child.getNodes(), c = 0; c < o.length; c++)
209
+ s = o[c], t += s.getNoOfChildren();
210
+ return t == 0 && (t = 1), t;
211
+ }, e.prototype.getEstimatedSize = function() {
212
+ if (this.estimatedSize == l.MIN_VALUE)
213
+ throw "assert failed";
214
+ return this.estimatedSize;
215
+ }, e.prototype.calcEstimatedSize = function() {
216
+ 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);
217
+ }, e.prototype.scatter = function() {
218
+ var t, s, o = -r.INITIAL_WORLD_BOUNDARY, c = r.INITIAL_WORLD_BOUNDARY;
219
+ t = r.WORLD_CENTER_X + i.nextDouble() * (c - o) + o;
220
+ var h = -r.INITIAL_WORLD_BOUNDARY, T = r.INITIAL_WORLD_BOUNDARY;
221
+ s = r.WORLD_CENTER_Y + i.nextDouble() * (T - h) + h, this.rect.x = t, this.rect.y = s;
222
+ }, e.prototype.updateBounds = function() {
223
+ if (this.getChild() == null)
224
+ throw "assert failed";
225
+ if (this.getChild().getNodes().length != 0) {
226
+ var t = this.getChild();
227
+ if (t.updateBounds(!0), this.rect.x = t.getLeft(), this.rect.y = t.getTop(), this.setWidth(t.getRight() - t.getLeft()), this.setHeight(t.getBottom() - t.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
228
+ var s = t.getRight() - t.getLeft(), o = t.getBottom() - t.getTop();
229
+ this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(s + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > s ? (this.rect.x -= (this.labelWidth - s) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(s + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(o + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > o ? (this.rect.y -= (this.labelHeight - o) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(o + this.labelHeight));
230
+ }
231
+ }
232
+ }, e.prototype.getInclusionTreeDepth = function() {
233
+ if (this.inclusionTreeDepth == l.MAX_VALUE)
234
+ throw "assert failed";
235
+ return this.inclusionTreeDepth;
236
+ }, e.prototype.transform = function(t) {
237
+ var s = this.rect.x;
238
+ s > r.WORLD_BOUNDARY ? s = r.WORLD_BOUNDARY : s < -r.WORLD_BOUNDARY && (s = -r.WORLD_BOUNDARY);
239
+ var o = this.rect.y;
240
+ o > r.WORLD_BOUNDARY ? o = r.WORLD_BOUNDARY : o < -r.WORLD_BOUNDARY && (o = -r.WORLD_BOUNDARY);
241
+ var c = new f(s, o), h = t.inverseTransformPoint(c);
242
+ this.setLocation(h.x, h.y);
243
+ }, e.prototype.getLeft = function() {
244
+ return this.rect.x;
245
+ }, e.prototype.getRight = function() {
246
+ return this.rect.x + this.rect.width;
247
+ }, e.prototype.getTop = function() {
248
+ return this.rect.y;
249
+ }, e.prototype.getBottom = function() {
250
+ return this.rect.y + this.rect.height;
251
+ }, e.prototype.getParent = function() {
252
+ return this.owner == null ? null : this.owner.getParent();
253
+ }, w.exports = e;
254
+ }),
255
+ /* 4 */
256
+ /***/
257
+ (function(w, x, N) {
258
+ var d = N(0);
259
+ function l() {
260
+ }
261
+ for (var a in d)
262
+ l[a] = d[a];
263
+ l.MAX_ITERATIONS = 2500, l.DEFAULT_EDGE_LENGTH = 50, l.DEFAULT_SPRING_STRENGTH = 0.45, l.DEFAULT_REPULSION_STRENGTH = 4500, l.DEFAULT_GRAVITY_STRENGTH = 0.4, l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, l.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, l.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, l.COOLING_ADAPTATION_FACTOR = 0.33, l.ADAPTATION_LOWER_NODE_LIMIT = 1e3, l.ADAPTATION_UPPER_NODE_LIMIT = 5e3, l.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, l.MAX_NODE_DISPLACEMENT = l.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, l.CONVERGENCE_CHECK_PERIOD = 100, l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, l.MIN_EDGE_LENGTH = 1, l.GRID_CALCULATION_CHECK_PERIOD = 10, w.exports = l;
264
+ }),
265
+ /* 5 */
266
+ /***/
267
+ (function(w, x, N) {
268
+ function d(l, a) {
269
+ l == null && a == null ? (this.x = 0, this.y = 0) : (this.x = l, this.y = a);
270
+ }
271
+ d.prototype.getX = function() {
272
+ return this.x;
273
+ }, d.prototype.getY = function() {
274
+ return this.y;
275
+ }, d.prototype.setX = function(l) {
276
+ this.x = l;
277
+ }, d.prototype.setY = function(l) {
278
+ this.y = l;
279
+ }, d.prototype.getDifference = function(l) {
280
+ return new DimensionD(this.x - l.x, this.y - l.y);
281
+ }, d.prototype.getCopy = function() {
282
+ return new d(this.x, this.y);
283
+ }, d.prototype.translate = function(l) {
284
+ return this.x += l.width, this.y += l.height, this;
285
+ }, w.exports = d;
286
+ }),
287
+ /* 6 */
288
+ /***/
289
+ (function(w, x, N) {
290
+ var d = N(2), l = N(10), a = N(0), r = N(7), i = N(3), f = N(1), e = N(13), g = N(12), t = N(11);
291
+ function s(c, h, T) {
292
+ d.call(this, T), this.estimatedSize = l.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = c, h != null && h instanceof r ? this.graphManager = h : h != null && h instanceof Layout && (this.graphManager = h.graphManager);
293
+ }
294
+ s.prototype = Object.create(d.prototype);
295
+ for (var o in d)
296
+ s[o] = d[o];
297
+ s.prototype.getNodes = function() {
298
+ return this.nodes;
299
+ }, s.prototype.getEdges = function() {
300
+ return this.edges;
301
+ }, s.prototype.getGraphManager = function() {
302
+ return this.graphManager;
303
+ }, s.prototype.getParent = function() {
304
+ return this.parent;
305
+ }, s.prototype.getLeft = function() {
306
+ return this.left;
307
+ }, s.prototype.getRight = function() {
308
+ return this.right;
309
+ }, s.prototype.getTop = function() {
310
+ return this.top;
311
+ }, s.prototype.getBottom = function() {
312
+ return this.bottom;
313
+ }, s.prototype.isConnected = function() {
314
+ return this.isConnected;
315
+ }, s.prototype.add = function(c, h, T) {
316
+ if (h == null && T == null) {
317
+ var u = c;
318
+ if (this.graphManager == null)
319
+ throw "Graph has no graph mgr!";
320
+ if (this.getNodes().indexOf(u) > -1)
321
+ throw "Node already in graph!";
322
+ return u.owner = this, this.getNodes().push(u), u;
323
+ } else {
324
+ var v = c;
325
+ if (!(this.getNodes().indexOf(h) > -1 && this.getNodes().indexOf(T) > -1))
326
+ throw "Source or target not in graph!";
327
+ if (!(h.owner == T.owner && h.owner == this))
328
+ throw "Both owners must be this graph!";
329
+ return h.owner != T.owner ? null : (v.source = h, v.target = T, v.isInterGraph = !1, this.getEdges().push(v), h.edges.push(v), T != h && T.edges.push(v), v);
330
+ }
331
+ }, s.prototype.remove = function(c) {
332
+ var h = c;
333
+ if (c instanceof i) {
334
+ if (h == null)
335
+ throw "Node is null!";
336
+ if (!(h.owner != null && h.owner == this))
337
+ throw "Owner graph is invalid!";
338
+ if (this.graphManager == null)
339
+ throw "Owner graph manager is invalid!";
340
+ for (var T = h.edges.slice(), u, v = T.length, L = 0; L < v; L++)
341
+ u = T[L], u.isInterGraph ? this.graphManager.remove(u) : u.source.owner.remove(u);
342
+ var P = this.nodes.indexOf(h);
343
+ if (P == -1)
344
+ throw "Node not in owner node list!";
345
+ this.nodes.splice(P, 1);
346
+ } else if (c instanceof f) {
347
+ var u = c;
348
+ if (u == null)
349
+ throw "Edge is null!";
350
+ if (!(u.source != null && u.target != null))
351
+ throw "Source and/or target is null!";
352
+ if (!(u.source.owner != null && u.target.owner != null && u.source.owner == this && u.target.owner == this))
353
+ throw "Source and/or target owner is invalid!";
354
+ var C = u.source.edges.indexOf(u), G = u.target.edges.indexOf(u);
355
+ if (!(C > -1 && G > -1))
356
+ throw "Source and/or target doesn't know this edge!";
357
+ u.source.edges.splice(C, 1), u.target != u.source && u.target.edges.splice(G, 1);
358
+ var P = u.source.owner.getEdges().indexOf(u);
359
+ if (P == -1)
360
+ throw "Not in owner's edge list!";
361
+ u.source.owner.getEdges().splice(P, 1);
362
+ }
363
+ }, s.prototype.updateLeftTop = function() {
364
+ for (var c = l.MAX_VALUE, h = l.MAX_VALUE, T, u, v, L = this.getNodes(), P = L.length, C = 0; C < P; C++) {
365
+ var G = L[C];
366
+ T = G.getTop(), u = G.getLeft(), c > T && (c = T), h > u && (h = u);
367
+ }
368
+ return c == l.MAX_VALUE ? null : (L[0].getParent().paddingLeft != null ? v = L[0].getParent().paddingLeft : v = this.margin, this.left = h - v, this.top = c - v, new g(this.left, this.top));
369
+ }, s.prototype.updateBounds = function(c) {
370
+ for (var h = l.MAX_VALUE, T = -l.MAX_VALUE, u = l.MAX_VALUE, v = -l.MAX_VALUE, L, P, C, G, V, Y = this.nodes, $ = Y.length, A = 0; A < $; A++) {
371
+ var j = Y[A];
372
+ c && j.child != null && j.updateBounds(), L = j.getLeft(), P = j.getRight(), C = j.getTop(), G = j.getBottom(), h > L && (h = L), T < P && (T = P), u > C && (u = C), v < G && (v = G);
373
+ }
374
+ var n = new e(h, u, T - h, v - u);
375
+ h == l.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 ? V = Y[0].getParent().paddingLeft : V = this.margin, this.left = n.x - V, this.right = n.x + n.width + V, this.top = n.y - V, this.bottom = n.y + n.height + V;
376
+ }, s.calculateBounds = function(c) {
377
+ for (var h = l.MAX_VALUE, T = -l.MAX_VALUE, u = l.MAX_VALUE, v = -l.MAX_VALUE, L, P, C, G, V = c.length, Y = 0; Y < V; Y++) {
378
+ var $ = c[Y];
379
+ L = $.getLeft(), P = $.getRight(), C = $.getTop(), G = $.getBottom(), h > L && (h = L), T < P && (T = P), u > C && (u = C), v < G && (v = G);
380
+ }
381
+ var A = new e(h, u, T - h, v - u);
382
+ return A;
383
+ }, s.prototype.getInclusionTreeDepth = function() {
384
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
385
+ }, s.prototype.getEstimatedSize = function() {
386
+ if (this.estimatedSize == l.MIN_VALUE)
387
+ throw "assert failed";
388
+ return this.estimatedSize;
389
+ }, s.prototype.calcEstimatedSize = function() {
390
+ for (var c = 0, h = this.nodes, T = h.length, u = 0; u < T; u++) {
391
+ var v = h[u];
392
+ c += v.calcEstimatedSize();
393
+ }
394
+ return c == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = c / Math.sqrt(this.nodes.length), this.estimatedSize;
395
+ }, s.prototype.updateConnected = function() {
396
+ var c = this;
397
+ if (this.nodes.length == 0) {
398
+ this.isConnected = !0;
399
+ return;
400
+ }
401
+ var h = new t(), T = /* @__PURE__ */ new Set(), u = this.nodes[0], v, L, P = u.withChildren();
402
+ for (P.forEach(function(A) {
403
+ h.push(A), T.add(A);
404
+ }); h.length !== 0; ) {
405
+ u = h.shift(), v = u.getEdges();
406
+ for (var C = v.length, G = 0; G < C; G++) {
407
+ var V = v[G];
408
+ if (L = V.getOtherEndInGraph(u, this), L != null && !T.has(L)) {
409
+ var Y = L.withChildren();
410
+ Y.forEach(function(A) {
411
+ h.push(A), T.add(A);
412
+ });
413
+ }
414
+ }
415
+ }
416
+ if (this.isConnected = !1, T.size >= this.nodes.length) {
417
+ var $ = 0;
418
+ T.forEach(function(A) {
419
+ A.owner == c && $++;
420
+ }), $ == this.nodes.length && (this.isConnected = !0);
421
+ }
422
+ }, w.exports = s;
423
+ }),
424
+ /* 7 */
425
+ /***/
426
+ (function(w, x, N) {
427
+ var d, l = N(1);
428
+ function a(r) {
429
+ d = N(6), this.layout = r, this.graphs = [], this.edges = [];
430
+ }
431
+ a.prototype.addRoot = function() {
432
+ var r = this.layout.newGraph(), i = this.layout.newNode(null), f = this.add(r, i);
433
+ return this.setRootGraph(f), this.rootGraph;
434
+ }, a.prototype.add = function(r, i, f, e, g) {
435
+ if (f == null && e == null && g == null) {
436
+ if (r == null)
437
+ throw "Graph is null!";
438
+ if (i == null)
439
+ throw "Parent node is null!";
440
+ if (this.graphs.indexOf(r) > -1)
441
+ throw "Graph already in this graph mgr!";
442
+ if (this.graphs.push(r), r.parent != null)
443
+ throw "Already has a parent!";
444
+ if (i.child != null)
445
+ throw "Already has a child!";
446
+ return r.parent = i, i.child = r, r;
447
+ } else {
448
+ g = f, e = i, f = r;
449
+ var t = e.getOwner(), s = g.getOwner();
450
+ if (!(t != null && t.getGraphManager() == this))
451
+ throw "Source not in this graph mgr!";
452
+ if (!(s != null && s.getGraphManager() == this))
453
+ throw "Target not in this graph mgr!";
454
+ if (t == s)
455
+ return f.isInterGraph = !1, t.add(f, e, g);
456
+ if (f.isInterGraph = !0, f.source = e, f.target = g, this.edges.indexOf(f) > -1)
457
+ throw "Edge already in inter-graph edge list!";
458
+ if (this.edges.push(f), !(f.source != null && f.target != null))
459
+ throw "Edge source and/or target is null!";
460
+ if (!(f.source.edges.indexOf(f) == -1 && f.target.edges.indexOf(f) == -1))
461
+ throw "Edge already in source and/or target incidency list!";
462
+ return f.source.edges.push(f), f.target.edges.push(f), f;
463
+ }
464
+ }, a.prototype.remove = function(r) {
465
+ if (r instanceof d) {
466
+ var i = r;
467
+ if (i.getGraphManager() != this)
468
+ throw "Graph not in this graph mgr";
469
+ if (!(i == this.rootGraph || i.parent != null && i.parent.graphManager == this))
470
+ throw "Invalid parent node!";
471
+ var f = [];
472
+ f = f.concat(i.getEdges());
473
+ for (var e, g = f.length, t = 0; t < g; t++)
474
+ e = f[t], i.remove(e);
475
+ var s = [];
476
+ s = s.concat(i.getNodes());
477
+ var o;
478
+ g = s.length;
479
+ for (var t = 0; t < g; t++)
480
+ o = s[t], i.remove(o);
481
+ i == this.rootGraph && this.setRootGraph(null);
482
+ var c = this.graphs.indexOf(i);
483
+ this.graphs.splice(c, 1), i.parent = null;
484
+ } else if (r instanceof l) {
485
+ if (e = r, e == null)
486
+ throw "Edge is null!";
487
+ if (!e.isInterGraph)
488
+ throw "Not an inter-graph edge!";
489
+ if (!(e.source != null && e.target != null))
490
+ throw "Source and/or target is null!";
491
+ if (!(e.source.edges.indexOf(e) != -1 && e.target.edges.indexOf(e) != -1))
492
+ throw "Source and/or target doesn't know this edge!";
493
+ var c = e.source.edges.indexOf(e);
494
+ if (e.source.edges.splice(c, 1), c = e.target.edges.indexOf(e), e.target.edges.splice(c, 1), !(e.source.owner != null && e.source.owner.getGraphManager() != null))
495
+ throw "Edge owner graph or owner graph manager is null!";
496
+ if (e.source.owner.getGraphManager().edges.indexOf(e) == -1)
497
+ throw "Not in owner graph manager's edge list!";
498
+ var c = e.source.owner.getGraphManager().edges.indexOf(e);
499
+ e.source.owner.getGraphManager().edges.splice(c, 1);
500
+ }
501
+ }, a.prototype.updateBounds = function() {
502
+ this.rootGraph.updateBounds(!0);
503
+ }, a.prototype.getGraphs = function() {
504
+ return this.graphs;
505
+ }, a.prototype.getAllNodes = function() {
506
+ if (this.allNodes == null) {
507
+ for (var r = [], i = this.getGraphs(), f = i.length, e = 0; e < f; e++)
508
+ r = r.concat(i[e].getNodes());
509
+ this.allNodes = r;
510
+ }
511
+ return this.allNodes;
512
+ }, a.prototype.resetAllNodes = function() {
513
+ this.allNodes = null;
514
+ }, a.prototype.resetAllEdges = function() {
515
+ this.allEdges = null;
516
+ }, a.prototype.resetAllNodesToApplyGravitation = function() {
517
+ this.allNodesToApplyGravitation = null;
518
+ }, a.prototype.getAllEdges = function() {
519
+ if (this.allEdges == null) {
520
+ var r = [], i = this.getGraphs();
521
+ i.length;
522
+ for (var f = 0; f < i.length; f++)
523
+ r = r.concat(i[f].getEdges());
524
+ r = r.concat(this.edges), this.allEdges = r;
525
+ }
526
+ return this.allEdges;
527
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
528
+ return this.allNodesToApplyGravitation;
529
+ }, a.prototype.setAllNodesToApplyGravitation = function(r) {
530
+ if (this.allNodesToApplyGravitation != null)
531
+ throw "assert failed";
532
+ this.allNodesToApplyGravitation = r;
533
+ }, a.prototype.getRoot = function() {
534
+ return this.rootGraph;
535
+ }, a.prototype.setRootGraph = function(r) {
536
+ if (r.getGraphManager() != this)
537
+ throw "Root not in this graph mgr!";
538
+ this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
539
+ }, a.prototype.getLayout = function() {
540
+ return this.layout;
541
+ }, a.prototype.isOneAncestorOfOther = function(r, i) {
542
+ if (!(r != null && i != null))
543
+ throw "assert failed";
544
+ if (r == i)
545
+ return !0;
546
+ var f = r.getOwner(), e;
547
+ do {
548
+ if (e = f.getParent(), e == null)
549
+ break;
550
+ if (e == i)
551
+ return !0;
552
+ if (f = e.getOwner(), f == null)
553
+ break;
554
+ } while (!0);
555
+ f = i.getOwner();
556
+ do {
557
+ if (e = f.getParent(), e == null)
558
+ break;
559
+ if (e == r)
560
+ return !0;
561
+ if (f = e.getOwner(), f == null)
562
+ break;
563
+ } while (!0);
564
+ return !1;
565
+ }, a.prototype.calcLowestCommonAncestors = function() {
566
+ for (var r, i, f, e, g, t = this.getAllEdges(), s = t.length, o = 0; o < s; o++) {
567
+ if (r = t[o], i = r.source, f = r.target, r.lca = null, r.sourceInLca = i, r.targetInLca = f, i == f) {
568
+ r.lca = i.getOwner();
569
+ continue;
570
+ }
571
+ for (e = i.getOwner(); r.lca == null; ) {
572
+ for (r.targetInLca = f, g = f.getOwner(); r.lca == null; ) {
573
+ if (g == e) {
574
+ r.lca = g;
575
+ break;
576
+ }
577
+ if (g == this.rootGraph)
578
+ break;
579
+ if (r.lca != null)
580
+ throw "assert failed";
581
+ r.targetInLca = g.getParent(), g = r.targetInLca.getOwner();
582
+ }
583
+ if (e == this.rootGraph)
584
+ break;
585
+ r.lca == null && (r.sourceInLca = e.getParent(), e = r.sourceInLca.getOwner());
586
+ }
587
+ if (r.lca == null)
588
+ throw "assert failed";
589
+ }
590
+ }, a.prototype.calcLowestCommonAncestor = function(r, i) {
591
+ if (r == i)
592
+ return r.getOwner();
593
+ var f = r.getOwner();
594
+ do {
595
+ if (f == null)
596
+ break;
597
+ var e = i.getOwner();
598
+ do {
599
+ if (e == null)
600
+ break;
601
+ if (e == f)
602
+ return e;
603
+ e = e.getParent().getOwner();
604
+ } while (!0);
605
+ f = f.getParent().getOwner();
606
+ } while (!0);
607
+ return f;
608
+ }, a.prototype.calcInclusionTreeDepths = function(r, i) {
609
+ r == null && i == null && (r = this.rootGraph, i = 1);
610
+ for (var f, e = r.getNodes(), g = e.length, t = 0; t < g; t++)
611
+ f = e[t], f.inclusionTreeDepth = i, f.child != null && this.calcInclusionTreeDepths(f.child, i + 1);
612
+ }, a.prototype.includesInvalidEdge = function() {
613
+ for (var r, i = [], f = this.edges.length, e = 0; e < f; e++)
614
+ r = this.edges[e], this.isOneAncestorOfOther(r.source, r.target) && i.push(r);
615
+ for (var e = 0; e < i.length; e++)
616
+ this.remove(i[e]);
617
+ return !1;
618
+ }, w.exports = a;
619
+ }),
620
+ /* 8 */
621
+ /***/
622
+ (function(w, x, N) {
623
+ var d = N(12);
624
+ function l() {
625
+ }
626
+ l.calcSeparationAmount = function(a, r, i, f) {
627
+ if (!a.intersects(r))
628
+ throw "assert failed";
629
+ var e = new Array(2);
630
+ this.decideDirectionsForOverlappingNodes(a, r, e), i[0] = Math.min(a.getRight(), r.getRight()) - Math.max(a.x, r.x), i[1] = Math.min(a.getBottom(), r.getBottom()) - Math.max(a.y, r.y), a.getX() <= r.getX() && a.getRight() >= r.getRight() ? i[0] += Math.min(r.getX() - a.getX(), a.getRight() - r.getRight()) : r.getX() <= a.getX() && r.getRight() >= a.getRight() && (i[0] += Math.min(a.getX() - r.getX(), r.getRight() - a.getRight())), a.getY() <= r.getY() && a.getBottom() >= r.getBottom() ? i[1] += Math.min(r.getY() - a.getY(), a.getBottom() - r.getBottom()) : r.getY() <= a.getY() && r.getBottom() >= a.getBottom() && (i[1] += Math.min(a.getY() - r.getY(), r.getBottom() - a.getBottom()));
631
+ var g = Math.abs((r.getCenterY() - a.getCenterY()) / (r.getCenterX() - a.getCenterX()));
632
+ r.getCenterY() === a.getCenterY() && r.getCenterX() === a.getCenterX() && (g = 1);
633
+ var t = g * i[0], s = i[1] / g;
634
+ i[0] < s ? s = i[0] : t = i[1], i[0] = -1 * e[0] * (s / 2 + f), i[1] = -1 * e[1] * (t / 2 + f);
635
+ }, l.decideDirectionsForOverlappingNodes = function(a, r, i) {
636
+ a.getCenterX() < r.getCenterX() ? i[0] = -1 : i[0] = 1, a.getCenterY() < r.getCenterY() ? i[1] = -1 : i[1] = 1;
637
+ }, l.getIntersection2 = function(a, r, i) {
638
+ var f = a.getCenterX(), e = a.getCenterY(), g = r.getCenterX(), t = r.getCenterY();
639
+ if (a.intersects(r))
640
+ return i[0] = f, i[1] = e, i[2] = g, i[3] = t, !0;
641
+ var s = a.getX(), o = a.getY(), c = a.getRight(), h = a.getX(), T = a.getBottom(), u = a.getRight(), v = a.getWidthHalf(), L = a.getHeightHalf(), P = r.getX(), C = r.getY(), G = r.getRight(), V = r.getX(), Y = r.getBottom(), $ = r.getRight(), A = r.getWidthHalf(), j = r.getHeightHalf(), n = !1, E = !1;
642
+ if (f === g) {
643
+ if (e > t)
644
+ return i[0] = f, i[1] = o, i[2] = g, i[3] = Y, !1;
645
+ if (e < t)
646
+ return i[0] = f, i[1] = T, i[2] = g, i[3] = C, !1;
647
+ } else if (e === t) {
648
+ if (f > g)
649
+ return i[0] = s, i[1] = e, i[2] = G, i[3] = t, !1;
650
+ if (f < g)
651
+ return i[0] = c, i[1] = e, i[2] = P, i[3] = t, !1;
652
+ } else {
653
+ var p = a.height / a.width, m = r.height / r.width, y = (t - e) / (g - f), S = void 0, O = void 0, F = void 0, W = void 0, R = void 0, Q = void 0;
654
+ if (-p === y ? f > g ? (i[0] = h, i[1] = T, n = !0) : (i[0] = c, i[1] = o, n = !0) : p === y && (f > g ? (i[0] = s, i[1] = o, n = !0) : (i[0] = u, i[1] = T, n = !0)), -m === y ? g > f ? (i[2] = V, i[3] = Y, E = !0) : (i[2] = G, i[3] = C, E = !0) : m === y && (g > f ? (i[2] = P, i[3] = C, E = !0) : (i[2] = $, i[3] = Y, E = !0)), n && E)
655
+ return !1;
656
+ if (f > g ? e > t ? (S = this.getCardinalDirection(p, y, 4), O = this.getCardinalDirection(m, y, 2)) : (S = this.getCardinalDirection(-p, y, 3), O = this.getCardinalDirection(-m, y, 1)) : e > t ? (S = this.getCardinalDirection(-p, y, 1), O = this.getCardinalDirection(-m, y, 3)) : (S = this.getCardinalDirection(p, y, 2), O = this.getCardinalDirection(m, y, 4)), !n)
657
+ switch (S) {
658
+ case 1:
659
+ W = o, F = f + -L / y, i[0] = F, i[1] = W;
660
+ break;
661
+ case 2:
662
+ F = u, W = e + v * y, i[0] = F, i[1] = W;
663
+ break;
664
+ case 3:
665
+ W = T, F = f + L / y, i[0] = F, i[1] = W;
666
+ break;
667
+ case 4:
668
+ F = h, W = e + -v * y, i[0] = F, i[1] = W;
669
+ break;
670
+ }
671
+ if (!E)
672
+ switch (O) {
673
+ case 1:
674
+ Q = C, R = g + -j / y, i[2] = R, i[3] = Q;
675
+ break;
676
+ case 2:
677
+ R = $, Q = t + A * y, i[2] = R, i[3] = Q;
678
+ break;
679
+ case 3:
680
+ Q = Y, R = g + j / y, i[2] = R, i[3] = Q;
681
+ break;
682
+ case 4:
683
+ R = V, Q = t + -A * y, i[2] = R, i[3] = Q;
684
+ break;
685
+ }
686
+ }
687
+ return !1;
688
+ }, l.getCardinalDirection = function(a, r, i) {
689
+ return a > r ? i : 1 + i % 4;
690
+ }, l.getIntersection = function(a, r, i, f) {
691
+ if (f == null)
692
+ return this.getIntersection2(a, r, i);
693
+ var e = a.x, g = a.y, t = r.x, s = r.y, o = i.x, c = i.y, h = f.x, T = f.y, u = void 0, v = void 0, L = void 0, P = void 0, C = void 0, G = void 0, V = void 0, Y = void 0, $ = void 0;
694
+ return L = s - g, C = e - t, V = t * g - e * s, P = T - c, G = o - h, Y = h * c - o * T, $ = L * G - P * C, $ === 0 ? null : (u = (C * Y - G * V) / $, v = (P * V - L * Y) / $, new d(u, v));
695
+ }, l.angleOfVector = function(a, r, i, f) {
696
+ var e = void 0;
697
+ return a !== i ? (e = Math.atan((f - r) / (i - a)), i < a ? e += Math.PI : f < r && (e += this.TWO_PI)) : f < r ? e = this.ONE_AND_HALF_PI : e = this.HALF_PI, e;
698
+ }, l.doIntersect = function(a, r, i, f) {
699
+ var e = a.x, g = a.y, t = r.x, s = r.y, o = i.x, c = i.y, h = f.x, T = f.y, u = (t - e) * (T - c) - (h - o) * (s - g);
700
+ if (u === 0)
701
+ return !1;
702
+ var v = ((T - c) * (h - e) + (o - h) * (T - g)) / u, L = ((g - s) * (h - e) + (t - e) * (T - g)) / u;
703
+ return 0 < v && v < 1 && 0 < L && L < 1;
704
+ }, l.findCircleLineIntersections = function(a, r, i, f, e, g, t) {
705
+ var s = (i - a) * (i - a) + (f - r) * (f - r), o = 2 * ((a - e) * (i - a) + (r - g) * (f - r)), c = (a - e) * (a - e) + (r - g) * (r - g) - t * t, h = o * o - 4 * s * c;
706
+ if (h >= 0) {
707
+ var T = (-o + Math.sqrt(o * o - 4 * s * c)) / (2 * s), u = (-o - Math.sqrt(o * o - 4 * s * c)) / (2 * s), v = null;
708
+ return T >= 0 && T <= 1 ? [T] : u >= 0 && u <= 1 ? [u] : v;
709
+ } else return null;
710
+ }, l.HALF_PI = 0.5 * Math.PI, l.ONE_AND_HALF_PI = 1.5 * Math.PI, l.TWO_PI = 2 * Math.PI, l.THREE_PI = 3 * Math.PI, w.exports = l;
711
+ }),
712
+ /* 9 */
713
+ /***/
714
+ (function(w, x, N) {
715
+ function d() {
716
+ }
717
+ d.sign = function(l) {
718
+ return l > 0 ? 1 : l < 0 ? -1 : 0;
719
+ }, d.floor = function(l) {
720
+ return l < 0 ? Math.ceil(l) : Math.floor(l);
721
+ }, d.ceil = function(l) {
722
+ return l < 0 ? Math.floor(l) : Math.ceil(l);
723
+ }, w.exports = d;
724
+ }),
725
+ /* 10 */
726
+ /***/
727
+ (function(w, x, N) {
728
+ function d() {
729
+ }
730
+ d.MAX_VALUE = 2147483647, d.MIN_VALUE = -2147483648, w.exports = d;
731
+ }),
732
+ /* 11 */
733
+ /***/
734
+ (function(w, x, N) {
735
+ var d = /* @__PURE__ */ (function() {
736
+ function e(g, t) {
737
+ for (var s = 0; s < t.length; s++) {
738
+ var o = t[s];
739
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(g, o.key, o);
740
+ }
741
+ }
742
+ return function(g, t, s) {
743
+ return t && e(g.prototype, t), s && e(g, s), g;
744
+ };
745
+ })();
746
+ function l(e, g) {
747
+ if (!(e instanceof g))
748
+ throw new TypeError("Cannot call a class as a function");
749
+ }
750
+ var a = function(g) {
751
+ return { value: g, next: null, prev: null };
752
+ }, r = function(g, t, s, o) {
753
+ return g !== null ? g.next = t : o.head = t, s !== null ? s.prev = t : o.tail = t, t.prev = g, t.next = s, o.length++, t;
754
+ }, i = function(g, t) {
755
+ var s = g.prev, o = g.next;
756
+ return s !== null ? s.next = o : t.head = o, o !== null ? o.prev = s : t.tail = s, g.prev = g.next = null, t.length--, g;
757
+ }, f = (function() {
758
+ function e(g) {
759
+ var t = this;
760
+ l(this, e), this.length = 0, this.head = null, this.tail = null, g != null && g.forEach(function(s) {
761
+ return t.push(s);
762
+ });
763
+ }
764
+ return d(e, [{
765
+ key: "size",
766
+ value: function() {
767
+ return this.length;
768
+ }
769
+ }, {
770
+ key: "insertBefore",
771
+ value: function(t, s) {
772
+ return r(s.prev, a(t), s, this);
773
+ }
774
+ }, {
775
+ key: "insertAfter",
776
+ value: function(t, s) {
777
+ return r(s, a(t), s.next, this);
778
+ }
779
+ }, {
780
+ key: "insertNodeBefore",
781
+ value: function(t, s) {
782
+ return r(s.prev, t, s, this);
783
+ }
784
+ }, {
785
+ key: "insertNodeAfter",
786
+ value: function(t, s) {
787
+ return r(s, t, s.next, this);
788
+ }
789
+ }, {
790
+ key: "push",
791
+ value: function(t) {
792
+ return r(this.tail, a(t), null, this);
793
+ }
794
+ }, {
795
+ key: "unshift",
796
+ value: function(t) {
797
+ return r(null, a(t), this.head, this);
798
+ }
799
+ }, {
800
+ key: "remove",
801
+ value: function(t) {
802
+ return i(t, this);
803
+ }
804
+ }, {
805
+ key: "pop",
806
+ value: function() {
807
+ return i(this.tail, this).value;
808
+ }
809
+ }, {
810
+ key: "popNode",
811
+ value: function() {
812
+ return i(this.tail, this);
813
+ }
814
+ }, {
815
+ key: "shift",
816
+ value: function() {
817
+ return i(this.head, this).value;
818
+ }
819
+ }, {
820
+ key: "shiftNode",
821
+ value: function() {
822
+ return i(this.head, this);
823
+ }
824
+ }, {
825
+ key: "get_object_at",
826
+ value: function(t) {
827
+ if (t <= this.length()) {
828
+ for (var s = 1, o = this.head; s < t; )
829
+ o = o.next, s++;
830
+ return o.value;
831
+ }
832
+ }
833
+ }, {
834
+ key: "set_object_at",
835
+ value: function(t, s) {
836
+ if (t <= this.length()) {
837
+ for (var o = 1, c = this.head; o < t; )
838
+ c = c.next, o++;
839
+ c.value = s;
840
+ }
841
+ }
842
+ }]), e;
843
+ })();
844
+ w.exports = f;
845
+ }),
846
+ /* 12 */
847
+ /***/
848
+ (function(w, x, N) {
849
+ function d(l, a, r) {
850
+ this.x = null, this.y = null, l == null && a == null && r == null ? (this.x = 0, this.y = 0) : typeof l == "number" && typeof a == "number" && r == null ? (this.x = l, this.y = a) : l.constructor.name == "Point" && a == null && r == null && (r = l, this.x = r.x, this.y = r.y);
851
+ }
852
+ d.prototype.getX = function() {
853
+ return this.x;
854
+ }, d.prototype.getY = function() {
855
+ return this.y;
856
+ }, d.prototype.getLocation = function() {
857
+ return new d(this.x, this.y);
858
+ }, d.prototype.setLocation = function(l, a, r) {
859
+ l.constructor.name == "Point" && a == null && r == null ? (r = l, this.setLocation(r.x, r.y)) : typeof l == "number" && typeof a == "number" && r == null && (parseInt(l) == l && parseInt(a) == a ? this.move(l, a) : (this.x = Math.floor(l + 0.5), this.y = Math.floor(a + 0.5)));
860
+ }, d.prototype.move = function(l, a) {
861
+ this.x = l, this.y = a;
862
+ }, d.prototype.translate = function(l, a) {
863
+ this.x += l, this.y += a;
864
+ }, d.prototype.equals = function(l) {
865
+ if (l.constructor.name == "Point") {
866
+ var a = l;
867
+ return this.x == a.x && this.y == a.y;
868
+ }
869
+ return this == l;
870
+ }, d.prototype.toString = function() {
871
+ return new d().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
872
+ }, w.exports = d;
873
+ }),
874
+ /* 13 */
875
+ /***/
876
+ (function(w, x, N) {
877
+ function d(l, a, r, i) {
878
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, l != null && a != null && r != null && i != null && (this.x = l, this.y = a, this.width = r, this.height = i);
879
+ }
880
+ d.prototype.getX = function() {
881
+ return this.x;
882
+ }, d.prototype.setX = function(l) {
883
+ this.x = l;
884
+ }, d.prototype.getY = function() {
885
+ return this.y;
886
+ }, d.prototype.setY = function(l) {
887
+ this.y = l;
888
+ }, d.prototype.getWidth = function() {
889
+ return this.width;
890
+ }, d.prototype.setWidth = function(l) {
891
+ this.width = l;
892
+ }, d.prototype.getHeight = function() {
893
+ return this.height;
894
+ }, d.prototype.setHeight = function(l) {
895
+ this.height = l;
896
+ }, d.prototype.getRight = function() {
897
+ return this.x + this.width;
898
+ }, d.prototype.getBottom = function() {
899
+ return this.y + this.height;
900
+ }, d.prototype.intersects = function(l) {
901
+ return !(this.getRight() < l.x || this.getBottom() < l.y || l.getRight() < this.x || l.getBottom() < this.y);
902
+ }, d.prototype.getCenterX = function() {
903
+ return this.x + this.width / 2;
904
+ }, d.prototype.getMinX = function() {
905
+ return this.getX();
906
+ }, d.prototype.getMaxX = function() {
907
+ return this.getX() + this.width;
908
+ }, d.prototype.getCenterY = function() {
909
+ return this.y + this.height / 2;
910
+ }, d.prototype.getMinY = function() {
911
+ return this.getY();
912
+ }, d.prototype.getMaxY = function() {
913
+ return this.getY() + this.height;
914
+ }, d.prototype.getWidthHalf = function() {
915
+ return this.width / 2;
916
+ }, d.prototype.getHeightHalf = function() {
917
+ return this.height / 2;
918
+ }, w.exports = d;
919
+ }),
920
+ /* 14 */
921
+ /***/
922
+ (function(w, x, N) {
923
+ var d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
924
+ return typeof a;
925
+ } : function(a) {
926
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
927
+ };
928
+ function l() {
929
+ }
930
+ l.lastID = 0, l.createID = function(a) {
931
+ return l.isPrimitive(a) ? a : (a.uniqueID != null || (a.uniqueID = l.getString(), l.lastID++), a.uniqueID);
932
+ }, l.getString = function(a) {
933
+ return a == null && (a = l.lastID), "Object#" + a;
934
+ }, l.isPrimitive = function(a) {
935
+ var r = typeof a > "u" ? "undefined" : d(a);
936
+ return a == null || r != "object" && r != "function";
937
+ }, w.exports = l;
938
+ }),
939
+ /* 15 */
940
+ /***/
941
+ (function(w, x, N) {
942
+ function d(o) {
943
+ if (Array.isArray(o)) {
944
+ for (var c = 0, h = Array(o.length); c < o.length; c++)
945
+ h[c] = o[c];
946
+ return h;
947
+ } else
948
+ return Array.from(o);
949
+ }
950
+ var l = N(0), a = N(7), r = N(3), i = N(1), f = N(6), e = N(5), g = N(17), t = N(29);
951
+ function s(o) {
952
+ t.call(this), this.layoutQuality = l.QUALITY, this.createBendsAsNeeded = l.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = l.DEFAULT_INCREMENTAL, this.animationOnLayout = l.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = l.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = l.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = l.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, o != null && (this.isRemoteUse = o);
953
+ }
954
+ s.RANDOM_SEED = 1, s.prototype = Object.create(t.prototype), s.prototype.getGraphManager = function() {
955
+ return this.graphManager;
956
+ }, s.prototype.getAllNodes = function() {
957
+ return this.graphManager.getAllNodes();
958
+ }, s.prototype.getAllEdges = function() {
959
+ return this.graphManager.getAllEdges();
960
+ }, s.prototype.getAllNodesToApplyGravitation = function() {
961
+ return this.graphManager.getAllNodesToApplyGravitation();
962
+ }, s.prototype.newGraphManager = function() {
963
+ var o = new a(this);
964
+ return this.graphManager = o, o;
965
+ }, s.prototype.newGraph = function(o) {
966
+ return new f(null, this.graphManager, o);
967
+ }, s.prototype.newNode = function(o) {
968
+ return new r(this.graphManager, o);
969
+ }, s.prototype.newEdge = function(o) {
970
+ return new i(null, null, o);
971
+ }, s.prototype.checkLayoutSuccess = function() {
972
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
973
+ }, s.prototype.runLayout = function() {
974
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
975
+ var o;
976
+ return this.checkLayoutSuccess() ? o = !1 : o = this.layout(), l.ANIMATE === "during" ? !1 : (o && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, o);
977
+ }, s.prototype.doPostLayout = function() {
978
+ this.incremental || this.transform(), this.update();
979
+ }, s.prototype.update2 = function() {
980
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
981
+ for (var o = this.graphManager.getAllEdges(), c = 0; c < o.length; c++)
982
+ o[c];
983
+ for (var h = this.graphManager.getRoot().getNodes(), c = 0; c < h.length; c++)
984
+ h[c];
985
+ this.update(this.graphManager.getRoot());
986
+ }
987
+ }, s.prototype.update = function(o) {
988
+ if (o == null)
989
+ this.update2();
990
+ else if (o instanceof r) {
991
+ var c = o;
992
+ if (c.getChild() != null)
993
+ for (var h = c.getChild().getNodes(), T = 0; T < h.length; T++)
994
+ update(h[T]);
995
+ if (c.vGraphObject != null) {
996
+ var u = c.vGraphObject;
997
+ u.update(c);
998
+ }
999
+ } else if (o instanceof i) {
1000
+ var v = o;
1001
+ if (v.vGraphObject != null) {
1002
+ var L = v.vGraphObject;
1003
+ L.update(v);
1004
+ }
1005
+ } else if (o instanceof f) {
1006
+ var P = o;
1007
+ if (P.vGraphObject != null) {
1008
+ var C = P.vGraphObject;
1009
+ C.update(P);
1010
+ }
1011
+ }
1012
+ }, s.prototype.initParameters = function() {
1013
+ this.isSubLayout || (this.layoutQuality = l.QUALITY, this.animationDuringLayout = l.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = l.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = l.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = l.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = l.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = l.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1014
+ }, s.prototype.transform = function(o) {
1015
+ if (o == null)
1016
+ this.transform(new e(0, 0));
1017
+ else {
1018
+ var c = new g(), h = this.graphManager.getRoot().updateLeftTop();
1019
+ if (h != null) {
1020
+ c.setWorldOrgX(o.x), c.setWorldOrgY(o.y), c.setDeviceOrgX(h.x), c.setDeviceOrgY(h.y);
1021
+ for (var T = this.getAllNodes(), u, v = 0; v < T.length; v++)
1022
+ u = T[v], u.transform(c);
1023
+ }
1024
+ }
1025
+ }, s.prototype.positionNodesRandomly = function(o) {
1026
+ if (o == null)
1027
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1028
+ else
1029
+ for (var c, h, T = o.getNodes(), u = 0; u < T.length; u++)
1030
+ c = T[u], h = c.getChild(), h == null || h.getNodes().length == 0 ? c.scatter() : (this.positionNodesRandomly(h), c.updateBounds());
1031
+ }, s.prototype.getFlatForest = function() {
1032
+ for (var o = [], c = !0, h = this.graphManager.getRoot().getNodes(), T = !0, u = 0; u < h.length; u++)
1033
+ h[u].getChild() != null && (T = !1);
1034
+ if (!T)
1035
+ return o;
1036
+ var v = /* @__PURE__ */ new Set(), L = [], P = /* @__PURE__ */ new Map(), C = [];
1037
+ for (C = C.concat(h); C.length > 0 && c; ) {
1038
+ for (L.push(C[0]); L.length > 0 && c; ) {
1039
+ var G = L[0];
1040
+ L.splice(0, 1), v.add(G);
1041
+ for (var V = G.getEdges(), u = 0; u < V.length; u++) {
1042
+ var Y = V[u].getOtherEnd(G);
1043
+ if (P.get(G) != Y)
1044
+ if (!v.has(Y))
1045
+ L.push(Y), P.set(Y, G);
1046
+ else {
1047
+ c = !1;
1048
+ break;
1049
+ }
1050
+ }
1051
+ }
1052
+ if (!c)
1053
+ o = [];
1054
+ else {
1055
+ var $ = [].concat(d(v));
1056
+ o.push($);
1057
+ for (var u = 0; u < $.length; u++) {
1058
+ var A = $[u], j = C.indexOf(A);
1059
+ j > -1 && C.splice(j, 1);
1060
+ }
1061
+ v = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Map();
1062
+ }
1063
+ }
1064
+ return o;
1065
+ }, s.prototype.createDummyNodesForBendpoints = function(o) {
1066
+ for (var c = [], h = o.source, T = this.graphManager.calcLowestCommonAncestor(o.source, o.target), u = 0; u < o.bendpoints.length; u++) {
1067
+ var v = this.newNode(null);
1068
+ v.setRect(new Point(0, 0), new Dimension(1, 1)), T.add(v);
1069
+ var L = this.newEdge(null);
1070
+ this.graphManager.add(L, h, v), c.add(v), h = v;
1071
+ }
1072
+ var L = this.newEdge(null);
1073
+ return this.graphManager.add(L, h, o.target), this.edgeToDummyNodes.set(o, c), o.isInterGraph() ? this.graphManager.remove(o) : T.remove(o), c;
1074
+ }, s.prototype.createBendpointsFromDummyNodes = function() {
1075
+ var o = [];
1076
+ o = o.concat(this.graphManager.getAllEdges()), o = [].concat(d(this.edgeToDummyNodes.keys())).concat(o);
1077
+ for (var c = 0; c < o.length; c++) {
1078
+ var h = o[c];
1079
+ if (h.bendpoints.length > 0) {
1080
+ for (var T = this.edgeToDummyNodes.get(h), u = 0; u < T.length; u++) {
1081
+ var v = T[u], L = new e(v.getCenterX(), v.getCenterY()), P = h.bendpoints.get(u);
1082
+ P.x = L.x, P.y = L.y, v.getOwner().remove(v);
1083
+ }
1084
+ this.graphManager.add(h, h.source, h.target);
1085
+ }
1086
+ }
1087
+ }, s.transform = function(o, c, h, T) {
1088
+ if (h != null && T != null) {
1089
+ var u = c;
1090
+ if (o <= 50) {
1091
+ var v = c / h;
1092
+ u -= (c - v) / 50 * (50 - o);
1093
+ } else {
1094
+ var L = c * T;
1095
+ u += (L - c) / 50 * (o - 50);
1096
+ }
1097
+ return u;
1098
+ } else {
1099
+ var P, C;
1100
+ return o <= 50 ? (P = 9 * c / 500, C = c / 10) : (P = 9 * c / 50, C = -8 * c), P * o + C;
1101
+ }
1102
+ }, s.findCenterOfTree = function(o) {
1103
+ var c = [];
1104
+ c = c.concat(o);
1105
+ var h = [], T = /* @__PURE__ */ new Map(), u = !1, v = null;
1106
+ (c.length == 1 || c.length == 2) && (u = !0, v = c[0]);
1107
+ for (var L = 0; L < c.length; L++) {
1108
+ var P = c[L], C = P.getNeighborsList().size;
1109
+ T.set(P, P.getNeighborsList().size), C == 1 && h.push(P);
1110
+ }
1111
+ var G = [];
1112
+ for (G = G.concat(h); !u; ) {
1113
+ var V = [];
1114
+ V = V.concat(G), G = [];
1115
+ for (var L = 0; L < c.length; L++) {
1116
+ var P = c[L], Y = c.indexOf(P);
1117
+ Y >= 0 && c.splice(Y, 1);
1118
+ var $ = P.getNeighborsList();
1119
+ $.forEach(function(n) {
1120
+ if (h.indexOf(n) < 0) {
1121
+ var E = T.get(n), p = E - 1;
1122
+ p == 1 && G.push(n), T.set(n, p);
1123
+ }
1124
+ });
1125
+ }
1126
+ h = h.concat(G), (c.length == 1 || c.length == 2) && (u = !0, v = c[0]);
1127
+ }
1128
+ return v;
1129
+ }, s.prototype.setGraphManager = function(o) {
1130
+ this.graphManager = o;
1131
+ }, w.exports = s;
1132
+ }),
1133
+ /* 16 */
1134
+ /***/
1135
+ (function(w, x, N) {
1136
+ function d() {
1137
+ }
1138
+ d.seed = 1, d.x = 0, d.nextDouble = function() {
1139
+ return d.x = Math.sin(d.seed++) * 1e4, d.x - Math.floor(d.x);
1140
+ }, w.exports = d;
1141
+ }),
1142
+ /* 17 */
1143
+ /***/
1144
+ (function(w, x, N) {
1145
+ var d = N(5);
1146
+ function l(a, r) {
1147
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1148
+ }
1149
+ l.prototype.getWorldOrgX = function() {
1150
+ return this.lworldOrgX;
1151
+ }, l.prototype.setWorldOrgX = function(a) {
1152
+ this.lworldOrgX = a;
1153
+ }, l.prototype.getWorldOrgY = function() {
1154
+ return this.lworldOrgY;
1155
+ }, l.prototype.setWorldOrgY = function(a) {
1156
+ this.lworldOrgY = a;
1157
+ }, l.prototype.getWorldExtX = function() {
1158
+ return this.lworldExtX;
1159
+ }, l.prototype.setWorldExtX = function(a) {
1160
+ this.lworldExtX = a;
1161
+ }, l.prototype.getWorldExtY = function() {
1162
+ return this.lworldExtY;
1163
+ }, l.prototype.setWorldExtY = function(a) {
1164
+ this.lworldExtY = a;
1165
+ }, l.prototype.getDeviceOrgX = function() {
1166
+ return this.ldeviceOrgX;
1167
+ }, l.prototype.setDeviceOrgX = function(a) {
1168
+ this.ldeviceOrgX = a;
1169
+ }, l.prototype.getDeviceOrgY = function() {
1170
+ return this.ldeviceOrgY;
1171
+ }, l.prototype.setDeviceOrgY = function(a) {
1172
+ this.ldeviceOrgY = a;
1173
+ }, l.prototype.getDeviceExtX = function() {
1174
+ return this.ldeviceExtX;
1175
+ }, l.prototype.setDeviceExtX = function(a) {
1176
+ this.ldeviceExtX = a;
1177
+ }, l.prototype.getDeviceExtY = function() {
1178
+ return this.ldeviceExtY;
1179
+ }, l.prototype.setDeviceExtY = function(a) {
1180
+ this.ldeviceExtY = a;
1181
+ }, l.prototype.transformX = function(a) {
1182
+ var r = 0, i = this.lworldExtX;
1183
+ return i != 0 && (r = this.ldeviceOrgX + (a - this.lworldOrgX) * this.ldeviceExtX / i), r;
1184
+ }, l.prototype.transformY = function(a) {
1185
+ var r = 0, i = this.lworldExtY;
1186
+ return i != 0 && (r = this.ldeviceOrgY + (a - this.lworldOrgY) * this.ldeviceExtY / i), r;
1187
+ }, l.prototype.inverseTransformX = function(a) {
1188
+ var r = 0, i = this.ldeviceExtX;
1189
+ return i != 0 && (r = this.lworldOrgX + (a - this.ldeviceOrgX) * this.lworldExtX / i), r;
1190
+ }, l.prototype.inverseTransformY = function(a) {
1191
+ var r = 0, i = this.ldeviceExtY;
1192
+ return i != 0 && (r = this.lworldOrgY + (a - this.ldeviceOrgY) * this.lworldExtY / i), r;
1193
+ }, l.prototype.inverseTransformPoint = function(a) {
1194
+ var r = new d(this.inverseTransformX(a.x), this.inverseTransformY(a.y));
1195
+ return r;
1196
+ }, w.exports = l;
1197
+ }),
1198
+ /* 18 */
1199
+ /***/
1200
+ (function(w, x, N) {
1201
+ function d(t) {
1202
+ if (Array.isArray(t)) {
1203
+ for (var s = 0, o = Array(t.length); s < t.length; s++)
1204
+ o[s] = t[s];
1205
+ return o;
1206
+ } else
1207
+ return Array.from(t);
1208
+ }
1209
+ var l = N(15), a = N(4), r = N(0), i = N(8), f = N(9);
1210
+ function e() {
1211
+ l.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
1212
+ }
1213
+ e.prototype = Object.create(l.prototype);
1214
+ for (var g in l)
1215
+ e[g] = l[g];
1216
+ e.prototype.initParameters = function() {
1217
+ l.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1218
+ }, e.prototype.calcIdealEdgeLengths = function() {
1219
+ for (var t, s, o, c, h, T, u, v = this.getGraphManager().getAllEdges(), L = 0; L < v.length; L++)
1220
+ t = v[L], s = t.idealLength, t.isInterGraph && (c = t.getSource(), h = t.getTarget(), T = t.getSourceInLca().getEstimatedSize(), u = t.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (t.idealLength += T + u - 2 * r.SIMPLE_NODE_SIZE), o = t.getLca().getInclusionTreeDepth(), t.idealLength += s * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + h.getInclusionTreeDepth() - 2 * o));
1221
+ }, e.prototype.initSpringEmbedder = function() {
1222
+ var t = this.getAllNodes().length;
1223
+ this.incremental ? (t > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (t - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (t > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (t - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1224
+ }, e.prototype.calcSpringForces = function() {
1225
+ for (var t = this.getAllEdges(), s, o = 0; o < t.length; o++)
1226
+ s = t[o], this.calcSpringForce(s, s.idealLength);
1227
+ }, e.prototype.calcRepulsionForces = function() {
1228
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o, c, h, T, u = this.getAllNodes(), v;
1229
+ if (this.useFRGridVariant)
1230
+ for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && t && this.updateGrid(), v = /* @__PURE__ */ new Set(), o = 0; o < u.length; o++)
1231
+ h = u[o], this.calculateRepulsionForceOfANode(h, v, t, s), v.add(h);
1232
+ else
1233
+ for (o = 0; o < u.length; o++)
1234
+ for (h = u[o], c = o + 1; c < u.length; c++)
1235
+ T = u[c], h.getOwner() == T.getOwner() && this.calcRepulsionForce(h, T);
1236
+ }, e.prototype.calcGravitationalForces = function() {
1237
+ for (var t, s = this.getAllNodesToApplyGravitation(), o = 0; o < s.length; o++)
1238
+ t = s[o], this.calcGravitationalForce(t);
1239
+ }, e.prototype.moveNodes = function() {
1240
+ for (var t = this.getAllNodes(), s, o = 0; o < t.length; o++)
1241
+ s = t[o], s.move();
1242
+ }, e.prototype.calcSpringForce = function(t, s) {
1243
+ var o = t.getSource(), c = t.getTarget(), h, T, u, v;
1244
+ if (this.uniformLeafNodeSizes && o.getChild() == null && c.getChild() == null)
1245
+ t.updateLengthSimple();
1246
+ else if (t.updateLength(), t.isOverlapingSourceAndTarget)
1247
+ return;
1248
+ h = t.getLength(), h != 0 && (T = t.edgeElasticity * (h - s), u = T * (t.lengthX / h), v = T * (t.lengthY / h), o.springForceX += u, o.springForceY += v, c.springForceX -= u, c.springForceY -= v);
1249
+ }, e.prototype.calcRepulsionForce = function(t, s) {
1250
+ var o = t.getRect(), c = s.getRect(), h = new Array(2), T = new Array(4), u, v, L, P, C, G, V;
1251
+ if (o.intersects(c)) {
1252
+ i.calcSeparationAmount(o, c, h, a.DEFAULT_EDGE_LENGTH / 2), G = 2 * h[0], V = 2 * h[1];
1253
+ var Y = t.noOfChildren * s.noOfChildren / (t.noOfChildren + s.noOfChildren);
1254
+ t.repulsionForceX -= Y * G, t.repulsionForceY -= Y * V, s.repulsionForceX += Y * G, s.repulsionForceY += Y * V;
1255
+ } else
1256
+ this.uniformLeafNodeSizes && t.getChild() == null && s.getChild() == null ? (u = c.getCenterX() - o.getCenterX(), v = c.getCenterY() - o.getCenterY()) : (i.getIntersection(o, c, T), u = T[2] - T[0], v = T[3] - T[1]), Math.abs(u) < a.MIN_REPULSION_DIST && (u = f.sign(u) * a.MIN_REPULSION_DIST), Math.abs(v) < a.MIN_REPULSION_DIST && (v = f.sign(v) * a.MIN_REPULSION_DIST), L = u * u + v * v, P = Math.sqrt(L), C = (t.nodeRepulsion / 2 + s.nodeRepulsion / 2) * t.noOfChildren * s.noOfChildren / L, G = C * u / P, V = C * v / P, t.repulsionForceX -= G, t.repulsionForceY -= V, s.repulsionForceX += G, s.repulsionForceY += V;
1257
+ }, e.prototype.calcGravitationalForce = function(t) {
1258
+ var s, o, c, h, T, u, v, L;
1259
+ s = t.getOwner(), o = (s.getRight() + s.getLeft()) / 2, c = (s.getTop() + s.getBottom()) / 2, h = t.getCenterX() - o, T = t.getCenterY() - c, u = Math.abs(h) + t.getWidth() / 2, v = Math.abs(T) + t.getHeight() / 2, t.getOwner() == this.graphManager.getRoot() ? (L = s.getEstimatedSize() * this.gravityRangeFactor, (u > L || v > L) && (t.gravitationForceX = -this.gravityConstant * h, t.gravitationForceY = -this.gravityConstant * T)) : (L = s.getEstimatedSize() * this.compoundGravityRangeFactor, (u > L || v > L) && (t.gravitationForceX = -this.gravityConstant * h * this.compoundGravityConstant, t.gravitationForceY = -this.gravityConstant * T * this.compoundGravityConstant));
1260
+ }, e.prototype.isConverged = function() {
1261
+ var t, s = !1;
1262
+ return this.totalIterations > this.maxIterations / 3 && (s = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), t = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, t || s;
1263
+ }, e.prototype.animate = function() {
1264
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1265
+ }, e.prototype.calcNoOfChildrenForAllNodes = function() {
1266
+ for (var t, s = this.graphManager.getAllNodes(), o = 0; o < s.length; o++)
1267
+ t = s[o], t.noOfChildren = t.getNoOfChildren();
1268
+ }, e.prototype.calcGrid = function(t) {
1269
+ var s = 0, o = 0;
1270
+ s = parseInt(Math.ceil((t.getRight() - t.getLeft()) / this.repulsionRange)), o = parseInt(Math.ceil((t.getBottom() - t.getTop()) / this.repulsionRange));
1271
+ for (var c = new Array(s), h = 0; h < s; h++)
1272
+ c[h] = new Array(o);
1273
+ for (var h = 0; h < s; h++)
1274
+ for (var T = 0; T < o; T++)
1275
+ c[h][T] = new Array();
1276
+ return c;
1277
+ }, e.prototype.addNodeToGrid = function(t, s, o) {
1278
+ var c = 0, h = 0, T = 0, u = 0;
1279
+ c = parseInt(Math.floor((t.getRect().x - s) / this.repulsionRange)), h = parseInt(Math.floor((t.getRect().width + t.getRect().x - s) / this.repulsionRange)), T = parseInt(Math.floor((t.getRect().y - o) / this.repulsionRange)), u = parseInt(Math.floor((t.getRect().height + t.getRect().y - o) / this.repulsionRange));
1280
+ for (var v = c; v <= h; v++)
1281
+ for (var L = T; L <= u; L++)
1282
+ this.grid[v][L].push(t), t.setGridCoordinates(c, h, T, u);
1283
+ }, e.prototype.updateGrid = function() {
1284
+ var t, s, o = this.getAllNodes();
1285
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), t = 0; t < o.length; t++)
1286
+ s = o[t], this.addNodeToGrid(s, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1287
+ }, e.prototype.calculateRepulsionForceOfANode = function(t, s, o, c) {
1288
+ if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && o || c) {
1289
+ var h = /* @__PURE__ */ new Set();
1290
+ t.surrounding = new Array();
1291
+ for (var T, u = this.grid, v = t.startX - 1; v < t.finishX + 2; v++)
1292
+ for (var L = t.startY - 1; L < t.finishY + 2; L++)
1293
+ if (!(v < 0 || L < 0 || v >= u.length || L >= u[0].length)) {
1294
+ for (var P = 0; P < u[v][L].length; P++)
1295
+ if (T = u[v][L][P], !(t.getOwner() != T.getOwner() || t == T) && !s.has(T) && !h.has(T)) {
1296
+ var C = Math.abs(t.getCenterX() - T.getCenterX()) - (t.getWidth() / 2 + T.getWidth() / 2), G = Math.abs(t.getCenterY() - T.getCenterY()) - (t.getHeight() / 2 + T.getHeight() / 2);
1297
+ C <= this.repulsionRange && G <= this.repulsionRange && h.add(T);
1298
+ }
1299
+ }
1300
+ t.surrounding = [].concat(d(h));
1301
+ }
1302
+ for (v = 0; v < t.surrounding.length; v++)
1303
+ this.calcRepulsionForce(t, t.surrounding[v]);
1304
+ }, e.prototype.calcRepulsionRange = function() {
1305
+ return 0;
1306
+ }, w.exports = e;
1307
+ }),
1308
+ /* 19 */
1309
+ /***/
1310
+ (function(w, x, N) {
1311
+ var d = N(1), l = N(4);
1312
+ function a(i, f, e) {
1313
+ d.call(this, i, f, e), this.idealLength = l.DEFAULT_EDGE_LENGTH, this.edgeElasticity = l.DEFAULT_SPRING_STRENGTH;
1314
+ }
1315
+ a.prototype = Object.create(d.prototype);
1316
+ for (var r in d)
1317
+ a[r] = d[r];
1318
+ w.exports = a;
1319
+ }),
1320
+ /* 20 */
1321
+ /***/
1322
+ (function(w, x, N) {
1323
+ var d = N(3), l = N(4);
1324
+ function a(i, f, e, g) {
1325
+ d.call(this, i, f, e, g), this.nodeRepulsion = l.DEFAULT_REPULSION_STRENGTH, 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 = [];
1326
+ }
1327
+ a.prototype = Object.create(d.prototype);
1328
+ for (var r in d)
1329
+ a[r] = d[r];
1330
+ a.prototype.setGridCoordinates = function(i, f, e, g) {
1331
+ this.startX = i, this.finishX = f, this.startY = e, this.finishY = g;
1332
+ }, w.exports = a;
1333
+ }),
1334
+ /* 21 */
1335
+ /***/
1336
+ (function(w, x, N) {
1337
+ function d(l, a) {
1338
+ this.width = 0, this.height = 0, l !== null && a !== null && (this.height = a, this.width = l);
1339
+ }
1340
+ d.prototype.getWidth = function() {
1341
+ return this.width;
1342
+ }, d.prototype.setWidth = function(l) {
1343
+ this.width = l;
1344
+ }, d.prototype.getHeight = function() {
1345
+ return this.height;
1346
+ }, d.prototype.setHeight = function(l) {
1347
+ this.height = l;
1348
+ }, w.exports = d;
1349
+ }),
1350
+ /* 22 */
1351
+ /***/
1352
+ (function(w, x, N) {
1353
+ var d = N(14);
1354
+ function l() {
1355
+ this.map = {}, this.keys = [];
1356
+ }
1357
+ l.prototype.put = function(a, r) {
1358
+ var i = d.createID(a);
1359
+ this.contains(i) || (this.map[i] = r, this.keys.push(a));
1360
+ }, l.prototype.contains = function(a) {
1361
+ return d.createID(a), this.map[a] != null;
1362
+ }, l.prototype.get = function(a) {
1363
+ var r = d.createID(a);
1364
+ return this.map[r];
1365
+ }, l.prototype.keySet = function() {
1366
+ return this.keys;
1367
+ }, w.exports = l;
1368
+ }),
1369
+ /* 23 */
1370
+ /***/
1371
+ (function(w, x, N) {
1372
+ var d = N(14);
1373
+ function l() {
1374
+ this.set = {};
1375
+ }
1376
+ l.prototype.add = function(a) {
1377
+ var r = d.createID(a);
1378
+ this.contains(r) || (this.set[r] = a);
1379
+ }, l.prototype.remove = function(a) {
1380
+ delete this.set[d.createID(a)];
1381
+ }, l.prototype.clear = function() {
1382
+ this.set = {};
1383
+ }, l.prototype.contains = function(a) {
1384
+ return this.set[d.createID(a)] == a;
1385
+ }, l.prototype.isEmpty = function() {
1386
+ return this.size() === 0;
1387
+ }, l.prototype.size = function() {
1388
+ return Object.keys(this.set).length;
1389
+ }, l.prototype.addAllTo = function(a) {
1390
+ for (var r = Object.keys(this.set), i = r.length, f = 0; f < i; f++)
1391
+ a.push(this.set[r[f]]);
1392
+ }, l.prototype.size = function() {
1393
+ return Object.keys(this.set).length;
1394
+ }, l.prototype.addAll = function(a) {
1395
+ for (var r = a.length, i = 0; i < r; i++) {
1396
+ var f = a[i];
1397
+ this.add(f);
1398
+ }
1399
+ }, w.exports = l;
1400
+ }),
1401
+ /* 24 */
1402
+ /***/
1403
+ (function(w, x, N) {
1404
+ function d() {
1405
+ }
1406
+ d.multMat = function(l, a) {
1407
+ for (var r = [], i = 0; i < l.length; i++) {
1408
+ r[i] = [];
1409
+ for (var f = 0; f < a[0].length; f++) {
1410
+ r[i][f] = 0;
1411
+ for (var e = 0; e < l[0].length; e++)
1412
+ r[i][f] += l[i][e] * a[e][f];
1413
+ }
1414
+ }
1415
+ return r;
1416
+ }, d.transpose = function(l) {
1417
+ for (var a = [], r = 0; r < l[0].length; r++) {
1418
+ a[r] = [];
1419
+ for (var i = 0; i < l.length; i++)
1420
+ a[r][i] = l[i][r];
1421
+ }
1422
+ return a;
1423
+ }, d.multCons = function(l, a) {
1424
+ for (var r = [], i = 0; i < l.length; i++)
1425
+ r[i] = l[i] * a;
1426
+ return r;
1427
+ }, d.minusOp = function(l, a) {
1428
+ for (var r = [], i = 0; i < l.length; i++)
1429
+ r[i] = l[i] - a[i];
1430
+ return r;
1431
+ }, d.dotProduct = function(l, a) {
1432
+ for (var r = 0, i = 0; i < l.length; i++)
1433
+ r += l[i] * a[i];
1434
+ return r;
1435
+ }, d.mag = function(l) {
1436
+ return Math.sqrt(this.dotProduct(l, l));
1437
+ }, d.normalize = function(l) {
1438
+ for (var a = [], r = this.mag(l), i = 0; i < l.length; i++)
1439
+ a[i] = l[i] / r;
1440
+ return a;
1441
+ }, d.multGamma = function(l) {
1442
+ for (var a = [], r = 0, i = 0; i < l.length; i++)
1443
+ r += l[i];
1444
+ r *= -1 / l.length;
1445
+ for (var f = 0; f < l.length; f++)
1446
+ a[f] = r + l[f];
1447
+ return a;
1448
+ }, d.multL = function(l, a, r) {
1449
+ for (var i = [], f = [], e = [], g = 0; g < a[0].length; g++) {
1450
+ for (var t = 0, s = 0; s < a.length; s++)
1451
+ t += -0.5 * a[s][g] * l[s];
1452
+ f[g] = t;
1453
+ }
1454
+ for (var o = 0; o < r.length; o++) {
1455
+ for (var c = 0, h = 0; h < r.length; h++)
1456
+ c += r[o][h] * f[h];
1457
+ e[o] = c;
1458
+ }
1459
+ for (var T = 0; T < a.length; T++) {
1460
+ for (var u = 0, v = 0; v < a[0].length; v++)
1461
+ u += a[T][v] * e[v];
1462
+ i[T] = u;
1463
+ }
1464
+ return i;
1465
+ }, w.exports = d;
1466
+ }),
1467
+ /* 25 */
1468
+ /***/
1469
+ (function(w, x, N) {
1470
+ var d = /* @__PURE__ */ (function() {
1471
+ function i(f, e) {
1472
+ for (var g = 0; g < e.length; g++) {
1473
+ var t = e[g];
1474
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(f, t.key, t);
1475
+ }
1476
+ }
1477
+ return function(f, e, g) {
1478
+ return e && i(f.prototype, e), g && i(f, g), f;
1479
+ };
1480
+ })();
1481
+ function l(i, f) {
1482
+ if (!(i instanceof f))
1483
+ throw new TypeError("Cannot call a class as a function");
1484
+ }
1485
+ var a = N(11), r = (function() {
1486
+ function i(f, e) {
1487
+ l(this, i), (e !== null || e !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1488
+ var g = void 0;
1489
+ f instanceof a ? g = f.size() : g = f.length, this._quicksort(f, 0, g - 1);
1490
+ }
1491
+ return d(i, [{
1492
+ key: "_quicksort",
1493
+ value: function(e, g, t) {
1494
+ if (g < t) {
1495
+ var s = this._partition(e, g, t);
1496
+ this._quicksort(e, g, s), this._quicksort(e, s + 1, t);
1497
+ }
1498
+ }
1499
+ }, {
1500
+ key: "_partition",
1501
+ value: function(e, g, t) {
1502
+ for (var s = this._get(e, g), o = g, c = t; ; ) {
1503
+ for (; this.compareFunction(s, this._get(e, c)); )
1504
+ c--;
1505
+ for (; this.compareFunction(this._get(e, o), s); )
1506
+ o++;
1507
+ if (o < c)
1508
+ this._swap(e, o, c), o++, c--;
1509
+ else return c;
1510
+ }
1511
+ }
1512
+ }, {
1513
+ key: "_get",
1514
+ value: function(e, g) {
1515
+ return e instanceof a ? e.get_object_at(g) : e[g];
1516
+ }
1517
+ }, {
1518
+ key: "_set",
1519
+ value: function(e, g, t) {
1520
+ e instanceof a ? e.set_object_at(g, t) : e[g] = t;
1521
+ }
1522
+ }, {
1523
+ key: "_swap",
1524
+ value: function(e, g, t) {
1525
+ var s = this._get(e, g);
1526
+ this._set(e, g, this._get(e, t)), this._set(e, t, s);
1527
+ }
1528
+ }, {
1529
+ key: "_defaultCompareFunction",
1530
+ value: function(e, g) {
1531
+ return g > e;
1532
+ }
1533
+ }]), i;
1534
+ })();
1535
+ w.exports = r;
1536
+ }),
1537
+ /* 26 */
1538
+ /***/
1539
+ (function(w, x, N) {
1540
+ function d() {
1541
+ }
1542
+ d.svd = function(l) {
1543
+ this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = l.length, this.n = l[0].length;
1544
+ var a = Math.min(this.m, this.n);
1545
+ this.s = (function(Tt) {
1546
+ for (var Ct = []; Tt-- > 0; )
1547
+ Ct.push(0);
1548
+ return Ct;
1549
+ })(Math.min(this.m + 1, this.n)), this.U = (function(Tt) {
1550
+ var Ct = function Bt(bt) {
1551
+ if (bt.length == 0)
1552
+ return 0;
1553
+ for (var zt = [], St = 0; St < bt[0]; St++)
1554
+ zt.push(Bt(bt.slice(1)));
1555
+ return zt;
1556
+ };
1557
+ return Ct(Tt);
1558
+ })([this.m, a]), this.V = (function(Tt) {
1559
+ var Ct = function Bt(bt) {
1560
+ if (bt.length == 0)
1561
+ return 0;
1562
+ for (var zt = [], St = 0; St < bt[0]; St++)
1563
+ zt.push(Bt(bt.slice(1)));
1564
+ return zt;
1565
+ };
1566
+ return Ct(Tt);
1567
+ })([this.n, this.n]);
1568
+ for (var r = (function(Tt) {
1569
+ for (var Ct = []; Tt-- > 0; )
1570
+ Ct.push(0);
1571
+ return Ct;
1572
+ })(this.n), i = (function(Tt) {
1573
+ for (var Ct = []; Tt-- > 0; )
1574
+ Ct.push(0);
1575
+ return Ct;
1576
+ })(this.m), f = !0, e = Math.min(this.m - 1, this.n), g = Math.max(0, Math.min(this.n - 2, this.m)), t = 0; t < Math.max(e, g); t++) {
1577
+ if (t < e) {
1578
+ this.s[t] = 0;
1579
+ for (var s = t; s < this.m; s++)
1580
+ this.s[t] = d.hypot(this.s[t], l[s][t]);
1581
+ if (this.s[t] !== 0) {
1582
+ l[t][t] < 0 && (this.s[t] = -this.s[t]);
1583
+ for (var o = t; o < this.m; o++)
1584
+ l[o][t] /= this.s[t];
1585
+ l[t][t] += 1;
1586
+ }
1587
+ this.s[t] = -this.s[t];
1588
+ }
1589
+ for (var c = t + 1; c < this.n; c++) {
1590
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1591
+ return Tt && Ct;
1592
+ })(t < e, this.s[t] !== 0)) {
1593
+ for (var h = 0, T = t; T < this.m; T++)
1594
+ h += l[T][t] * l[T][c];
1595
+ h = -h / l[t][t];
1596
+ for (var u = t; u < this.m; u++)
1597
+ l[u][c] += h * l[u][t];
1598
+ }
1599
+ r[c] = l[t][c];
1600
+ }
1601
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1602
+ return Ct;
1603
+ })(f, t < e))
1604
+ for (var v = t; v < this.m; v++)
1605
+ this.U[v][t] = l[v][t];
1606
+ if (t < g) {
1607
+ r[t] = 0;
1608
+ for (var L = t + 1; L < this.n; L++)
1609
+ r[t] = d.hypot(r[t], r[L]);
1610
+ if (r[t] !== 0) {
1611
+ r[t + 1] < 0 && (r[t] = -r[t]);
1612
+ for (var P = t + 1; P < this.n; P++)
1613
+ r[P] /= r[t];
1614
+ r[t + 1] += 1;
1615
+ }
1616
+ if (r[t] = -r[t], /* @__PURE__ */ (function(Tt, Ct) {
1617
+ return Tt && Ct;
1618
+ })(t + 1 < this.m, r[t] !== 0)) {
1619
+ for (var C = t + 1; C < this.m; C++)
1620
+ i[C] = 0;
1621
+ for (var G = t + 1; G < this.n; G++)
1622
+ for (var V = t + 1; V < this.m; V++)
1623
+ i[V] += r[G] * l[V][G];
1624
+ for (var Y = t + 1; Y < this.n; Y++)
1625
+ for (var $ = -r[Y] / r[t + 1], A = t + 1; A < this.m; A++)
1626
+ l[A][Y] += $ * i[A];
1627
+ }
1628
+ for (var j = t + 1; j < this.n; j++)
1629
+ this.V[j][t] = r[j];
1630
+ }
1631
+ }
1632
+ var n = Math.min(this.n, this.m + 1);
1633
+ e < this.n && (this.s[e] = l[e][e]), this.m < n && (this.s[n - 1] = 0), g + 1 < n && (r[g] = l[g][n - 1]), r[n - 1] = 0;
1634
+ {
1635
+ for (var E = e; E < a; E++) {
1636
+ for (var p = 0; p < this.m; p++)
1637
+ this.U[p][E] = 0;
1638
+ this.U[E][E] = 1;
1639
+ }
1640
+ for (var m = e - 1; m >= 0; m--)
1641
+ if (this.s[m] !== 0) {
1642
+ for (var y = m + 1; y < a; y++) {
1643
+ for (var S = 0, O = m; O < this.m; O++)
1644
+ S += this.U[O][m] * this.U[O][y];
1645
+ S = -S / this.U[m][m];
1646
+ for (var F = m; F < this.m; F++)
1647
+ this.U[F][y] += S * this.U[F][m];
1648
+ }
1649
+ for (var W = m; W < this.m; W++)
1650
+ this.U[W][m] = -this.U[W][m];
1651
+ this.U[m][m] = 1 + this.U[m][m];
1652
+ for (var R = 0; R < m - 1; R++)
1653
+ this.U[R][m] = 0;
1654
+ } else {
1655
+ for (var Q = 0; Q < this.m; Q++)
1656
+ this.U[Q][m] = 0;
1657
+ this.U[m][m] = 1;
1658
+ }
1659
+ }
1660
+ for (var z = this.n - 1; z >= 0; z--) {
1661
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1662
+ return Tt && Ct;
1663
+ })(z < g, r[z] !== 0))
1664
+ for (var X = z + 1; X < a; X++) {
1665
+ for (var rt = 0, B = z + 1; B < this.n; B++)
1666
+ rt += this.V[B][z] * this.V[B][X];
1667
+ rt = -rt / this.V[z + 1][z];
1668
+ for (var D = z + 1; D < this.n; D++)
1669
+ this.V[D][X] += rt * this.V[D][z];
1670
+ }
1671
+ for (var H = 0; H < this.n; H++)
1672
+ this.V[H][z] = 0;
1673
+ this.V[z][z] = 1;
1674
+ }
1675
+ for (var k = n - 1, tt = Math.pow(2, -52), ht = Math.pow(2, -966); n > 0; ) {
1676
+ var J = void 0, It = void 0;
1677
+ for (J = n - 2; J >= -1 && J !== -1; J--)
1678
+ if (Math.abs(r[J]) <= ht + tt * (Math.abs(this.s[J]) + Math.abs(this.s[J + 1]))) {
1679
+ r[J] = 0;
1680
+ break;
1681
+ }
1682
+ if (J === n - 2)
1683
+ It = 4;
1684
+ else {
1685
+ var Nt = void 0;
1686
+ for (Nt = n - 1; Nt >= J && Nt !== J; Nt--) {
1687
+ var vt = (Nt !== n ? Math.abs(r[Nt]) : 0) + (Nt !== J + 1 ? Math.abs(r[Nt - 1]) : 0);
1688
+ if (Math.abs(this.s[Nt]) <= ht + tt * vt) {
1689
+ this.s[Nt] = 0;
1690
+ break;
1691
+ }
1692
+ }
1693
+ Nt === J ? It = 3 : Nt === n - 1 ? It = 1 : (It = 2, J = Nt);
1694
+ }
1695
+ switch (J++, It) {
1696
+ case 1:
1697
+ {
1698
+ var it = r[n - 2];
1699
+ r[n - 2] = 0;
1700
+ for (var ut = n - 2; ut >= J; ut--) {
1701
+ var Et = d.hypot(this.s[ut], it), wt = this.s[ut] / Et, Ot = it / Et;
1702
+ this.s[ut] = Et, ut !== J && (it = -Ot * r[ut - 1], r[ut - 1] = wt * r[ut - 1]);
1703
+ for (var mt = 0; mt < this.n; mt++)
1704
+ Et = wt * this.V[mt][ut] + Ot * this.V[mt][n - 1], this.V[mt][n - 1] = -Ot * this.V[mt][ut] + wt * this.V[mt][n - 1], this.V[mt][ut] = Et;
1705
+ }
1706
+ }
1707
+ break;
1708
+ case 2:
1709
+ {
1710
+ var Dt = r[J - 1];
1711
+ r[J - 1] = 0;
1712
+ for (var Rt = J; Rt < n; Rt++) {
1713
+ var Ht = d.hypot(this.s[Rt], Dt), Ut = this.s[Rt] / Ht, Pt = Dt / Ht;
1714
+ this.s[Rt] = Ht, Dt = -Pt * r[Rt], r[Rt] = Ut * r[Rt];
1715
+ for (var Ft = 0; Ft < this.m; Ft++)
1716
+ Ht = Ut * this.U[Ft][Rt] + Pt * this.U[Ft][J - 1], this.U[Ft][J - 1] = -Pt * this.U[Ft][Rt] + Ut * this.U[Ft][J - 1], this.U[Ft][Rt] = Ht;
1717
+ }
1718
+ }
1719
+ break;
1720
+ case 3:
1721
+ {
1722
+ var Yt = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n - 1]), Math.abs(this.s[n - 2])), Math.abs(r[n - 2])), Math.abs(this.s[J])), Math.abs(r[J])), Vt = this.s[n - 1] / Yt, b = this.s[n - 2] / Yt, U = r[n - 2] / Yt, Z = this.s[J] / Yt, K = r[J] / Yt, q = ((b + Vt) * (b - Vt) + U * U) / 2, at = Vt * U * (Vt * U), ct = 0;
1723
+ /* @__PURE__ */ (function(Tt, Ct) {
1724
+ return Tt || Ct;
1725
+ })(q !== 0, at !== 0) && (ct = Math.sqrt(q * q + at), q < 0 && (ct = -ct), ct = at / (q + ct));
1726
+ for (var nt = (Z + Vt) * (Z - Vt) + ct, et = Z * K, _ = J; _ < n - 1; _++) {
1727
+ var dt = d.hypot(nt, et), Mt = nt / dt, pt = et / dt;
1728
+ _ !== J && (r[_ - 1] = dt), nt = Mt * this.s[_] + pt * r[_], r[_] = Mt * r[_] - pt * this.s[_], et = pt * this.s[_ + 1], this.s[_ + 1] = Mt * this.s[_ + 1];
1729
+ for (var xt = 0; xt < this.n; xt++)
1730
+ dt = Mt * this.V[xt][_] + pt * this.V[xt][_ + 1], this.V[xt][_ + 1] = -pt * this.V[xt][_] + Mt * this.V[xt][_ + 1], this.V[xt][_] = dt;
1731
+ if (dt = d.hypot(nt, et), Mt = nt / dt, pt = et / dt, this.s[_] = dt, nt = Mt * r[_] + pt * this.s[_ + 1], this.s[_ + 1] = -pt * r[_] + Mt * this.s[_ + 1], et = pt * r[_ + 1], r[_ + 1] = Mt * r[_ + 1], _ < this.m - 1)
1732
+ for (var lt = 0; lt < this.m; lt++)
1733
+ dt = Mt * this.U[lt][_] + pt * this.U[lt][_ + 1], this.U[lt][_ + 1] = -pt * this.U[lt][_] + Mt * this.U[lt][_ + 1], this.U[lt][_] = dt;
1734
+ }
1735
+ r[n - 2] = nt;
1736
+ }
1737
+ break;
1738
+ case 4:
1739
+ {
1740
+ if (this.s[J] <= 0) {
1741
+ this.s[J] = this.s[J] < 0 ? -this.s[J] : 0;
1742
+ for (var ot = 0; ot <= k; ot++)
1743
+ this.V[ot][J] = -this.V[ot][J];
1744
+ }
1745
+ for (; J < k && !(this.s[J] >= this.s[J + 1]); ) {
1746
+ var Lt = this.s[J];
1747
+ if (this.s[J] = this.s[J + 1], this.s[J + 1] = Lt, J < this.n - 1)
1748
+ for (var ft = 0; ft < this.n; ft++)
1749
+ Lt = this.V[ft][J + 1], this.V[ft][J + 1] = this.V[ft][J], this.V[ft][J] = Lt;
1750
+ if (J < this.m - 1)
1751
+ for (var st = 0; st < this.m; st++)
1752
+ Lt = this.U[st][J + 1], this.U[st][J + 1] = this.U[st][J], this.U[st][J] = Lt;
1753
+ J++;
1754
+ }
1755
+ n--;
1756
+ }
1757
+ break;
1758
+ }
1759
+ }
1760
+ var Xt = { U: this.U, V: this.V, S: this.s };
1761
+ return Xt;
1762
+ }, d.hypot = function(l, a) {
1763
+ var r = void 0;
1764
+ return Math.abs(l) > Math.abs(a) ? (r = a / l, r = Math.abs(l) * Math.sqrt(1 + r * r)) : a != 0 ? (r = l / a, r = Math.abs(a) * Math.sqrt(1 + r * r)) : r = 0, r;
1765
+ }, w.exports = d;
1766
+ }),
1767
+ /* 27 */
1768
+ /***/
1769
+ (function(w, x, N) {
1770
+ var d = /* @__PURE__ */ (function() {
1771
+ function r(i, f) {
1772
+ for (var e = 0; e < f.length; e++) {
1773
+ var g = f[e];
1774
+ g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(i, g.key, g);
1775
+ }
1776
+ }
1777
+ return function(i, f, e) {
1778
+ return f && r(i.prototype, f), e && r(i, e), i;
1779
+ };
1780
+ })();
1781
+ function l(r, i) {
1782
+ if (!(r instanceof i))
1783
+ throw new TypeError("Cannot call a class as a function");
1784
+ }
1785
+ var a = (function() {
1786
+ function r(i, f) {
1787
+ var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, g = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1788
+ l(this, r), this.sequence1 = i, this.sequence2 = f, this.match_score = e, this.mismatch_penalty = g, this.gap_penalty = t, this.iMax = i.length + 1, this.jMax = f.length + 1, this.grid = new Array(this.iMax);
1789
+ for (var s = 0; s < this.iMax; s++) {
1790
+ this.grid[s] = new Array(this.jMax);
1791
+ for (var o = 0; o < this.jMax; o++)
1792
+ this.grid[s][o] = 0;
1793
+ }
1794
+ this.tracebackGrid = new Array(this.iMax);
1795
+ for (var c = 0; c < this.iMax; c++) {
1796
+ this.tracebackGrid[c] = new Array(this.jMax);
1797
+ for (var h = 0; h < this.jMax; h++)
1798
+ this.tracebackGrid[c][h] = [null, null, null];
1799
+ }
1800
+ this.alignments = [], this.score = -1, this.computeGrids();
1801
+ }
1802
+ return d(r, [{
1803
+ key: "getScore",
1804
+ value: function() {
1805
+ return this.score;
1806
+ }
1807
+ }, {
1808
+ key: "getAlignments",
1809
+ value: function() {
1810
+ return this.alignments;
1811
+ }
1812
+ // Main dynamic programming procedure
1813
+ }, {
1814
+ key: "computeGrids",
1815
+ value: function() {
1816
+ for (var f = 1; f < this.jMax; f++)
1817
+ this.grid[0][f] = this.grid[0][f - 1] + this.gap_penalty, this.tracebackGrid[0][f] = [!1, !1, !0];
1818
+ for (var e = 1; e < this.iMax; e++)
1819
+ this.grid[e][0] = this.grid[e - 1][0] + this.gap_penalty, this.tracebackGrid[e][0] = [!1, !0, !1];
1820
+ for (var g = 1; g < this.iMax; g++)
1821
+ for (var t = 1; t < this.jMax; t++) {
1822
+ var s = void 0;
1823
+ this.sequence1[g - 1] === this.sequence2[t - 1] ? s = this.grid[g - 1][t - 1] + this.match_score : s = this.grid[g - 1][t - 1] + this.mismatch_penalty;
1824
+ var o = this.grid[g - 1][t] + this.gap_penalty, c = this.grid[g][t - 1] + this.gap_penalty, h = [s, o, c], T = this.arrayAllMaxIndexes(h);
1825
+ this.grid[g][t] = h[T[0]], this.tracebackGrid[g][t] = [T.includes(0), T.includes(1), T.includes(2)];
1826
+ }
1827
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1828
+ }
1829
+ // Gets all possible valid sequence combinations
1830
+ }, {
1831
+ key: "alignmentTraceback",
1832
+ value: function() {
1833
+ var f = [];
1834
+ for (f.push({
1835
+ pos: [this.sequence1.length, this.sequence2.length],
1836
+ seq1: "",
1837
+ seq2: ""
1838
+ }); f[0]; ) {
1839
+ var e = f[0], g = this.tracebackGrid[e.pos[0]][e.pos[1]];
1840
+ g[0] && f.push({
1841
+ pos: [e.pos[0] - 1, e.pos[1] - 1],
1842
+ seq1: this.sequence1[e.pos[0] - 1] + e.seq1,
1843
+ seq2: this.sequence2[e.pos[1] - 1] + e.seq2
1844
+ }), g[1] && f.push({
1845
+ pos: [e.pos[0] - 1, e.pos[1]],
1846
+ seq1: this.sequence1[e.pos[0] - 1] + e.seq1,
1847
+ seq2: "-" + e.seq2
1848
+ }), g[2] && f.push({
1849
+ pos: [e.pos[0], e.pos[1] - 1],
1850
+ seq1: "-" + e.seq1,
1851
+ seq2: this.sequence2[e.pos[1] - 1] + e.seq2
1852
+ }), e.pos[0] === 0 && e.pos[1] === 0 && this.alignments.push({
1853
+ sequence1: e.seq1,
1854
+ sequence2: e.seq2
1855
+ }), f.shift();
1856
+ }
1857
+ return this.alignments;
1858
+ }
1859
+ // Helper Functions
1860
+ }, {
1861
+ key: "getAllIndexes",
1862
+ value: function(f, e) {
1863
+ for (var g = [], t = -1; (t = f.indexOf(e, t + 1)) !== -1; )
1864
+ g.push(t);
1865
+ return g;
1866
+ }
1867
+ }, {
1868
+ key: "arrayAllMaxIndexes",
1869
+ value: function(f) {
1870
+ return this.getAllIndexes(f, Math.max.apply(null, f));
1871
+ }
1872
+ }]), r;
1873
+ })();
1874
+ w.exports = a;
1875
+ }),
1876
+ /* 28 */
1877
+ /***/
1878
+ (function(w, x, N) {
1879
+ var d = function() {
1880
+ };
1881
+ d.FDLayout = N(18), d.FDLayoutConstants = N(4), d.FDLayoutEdge = N(19), d.FDLayoutNode = N(20), d.DimensionD = N(21), d.HashMap = N(22), d.HashSet = N(23), d.IGeometry = N(8), d.IMath = N(9), d.Integer = N(10), d.Point = N(12), d.PointD = N(5), d.RandomSeed = N(16), d.RectangleD = N(13), d.Transform = N(17), d.UniqueIDGeneretor = N(14), d.Quicksort = N(25), d.LinkedList = N(11), d.LGraphObject = N(2), d.LGraph = N(6), d.LEdge = N(1), d.LGraphManager = N(7), d.LNode = N(3), d.Layout = N(15), d.LayoutConstants = N(0), d.NeedlemanWunsch = N(27), d.Matrix = N(24), d.SVD = N(26), w.exports = d;
1882
+ }),
1883
+ /* 29 */
1884
+ /***/
1885
+ (function(w, x, N) {
1886
+ function d() {
1887
+ this.listeners = [];
1888
+ }
1889
+ var l = d.prototype;
1890
+ l.addListener = function(a, r) {
1891
+ this.listeners.push({
1892
+ event: a,
1893
+ callback: r
1894
+ });
1895
+ }, l.removeListener = function(a, r) {
1896
+ for (var i = this.listeners.length; i >= 0; i--) {
1897
+ var f = this.listeners[i];
1898
+ f.event === a && f.callback === r && this.listeners.splice(i, 1);
1899
+ }
1900
+ }, l.emit = function(a, r) {
1901
+ for (var i = 0; i < this.listeners.length; i++) {
1902
+ var f = this.listeners[i];
1903
+ a === f.event && f.callback(r);
1904
+ }
1905
+ }, w.exports = d;
1906
+ })
1907
+ /******/
1908
+ ])
1909
+ );
1910
+ });
1911
+ })(fe)), fe.exports;
1912
+ }
1913
+ var vr = le.exports, De;
1914
+ function pr() {
1915
+ return De || (De = 1, (function(I, M) {
1916
+ (function(x, N) {
1917
+ I.exports = N(dr());
1918
+ })(vr, function(w) {
1919
+ return (
1920
+ /******/
1921
+ (() => {
1922
+ var x = {
1923
+ /***/
1924
+ 45: (
1925
+ /***/
1926
+ ((a, r, i) => {
1927
+ var f = {};
1928
+ f.layoutBase = i(551), f.CoSEConstants = i(806), f.CoSEEdge = i(767), f.CoSEGraph = i(880), f.CoSEGraphManager = i(578), f.CoSELayout = i(765), f.CoSENode = i(991), f.ConstraintHandler = i(902), a.exports = f;
1929
+ })
1930
+ ),
1931
+ /***/
1932
+ 806: (
1933
+ /***/
1934
+ ((a, r, i) => {
1935
+ var f = i(551).FDLayoutConstants;
1936
+ function e() {
1937
+ }
1938
+ for (var g in f)
1939
+ e[g] = f[g];
1940
+ e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = f.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, e.ENFORCE_CONSTRAINTS = !0, e.APPLY_LAYOUT = !0, e.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, e.TREE_REDUCTION_ON_INCREMENTAL = !0, e.PURE_INCREMENTAL = e.DEFAULT_INCREMENTAL, a.exports = e;
1941
+ })
1942
+ ),
1943
+ /***/
1944
+ 767: (
1945
+ /***/
1946
+ ((a, r, i) => {
1947
+ var f = i(551).FDLayoutEdge;
1948
+ function e(t, s, o) {
1949
+ f.call(this, t, s, o);
1950
+ }
1951
+ e.prototype = Object.create(f.prototype);
1952
+ for (var g in f)
1953
+ e[g] = f[g];
1954
+ a.exports = e;
1955
+ })
1956
+ ),
1957
+ /***/
1958
+ 880: (
1959
+ /***/
1960
+ ((a, r, i) => {
1961
+ var f = i(551).LGraph;
1962
+ function e(t, s, o) {
1963
+ f.call(this, t, s, o);
1964
+ }
1965
+ e.prototype = Object.create(f.prototype);
1966
+ for (var g in f)
1967
+ e[g] = f[g];
1968
+ a.exports = e;
1969
+ })
1970
+ ),
1971
+ /***/
1972
+ 578: (
1973
+ /***/
1974
+ ((a, r, i) => {
1975
+ var f = i(551).LGraphManager;
1976
+ function e(t) {
1977
+ f.call(this, t);
1978
+ }
1979
+ e.prototype = Object.create(f.prototype);
1980
+ for (var g in f)
1981
+ e[g] = f[g];
1982
+ a.exports = e;
1983
+ })
1984
+ ),
1985
+ /***/
1986
+ 765: (
1987
+ /***/
1988
+ ((a, r, i) => {
1989
+ var f = i(551).FDLayout, e = i(578), g = i(880), t = i(991), s = i(767), o = i(806), c = i(902), h = i(551).FDLayoutConstants, T = i(551).LayoutConstants, u = i(551).Point, v = i(551).PointD, L = i(551).DimensionD, P = i(551).Layout, C = i(551).Integer, G = i(551).IGeometry, V = i(551).LGraph, Y = i(551).Transform, $ = i(551).LinkedList;
1990
+ function A() {
1991
+ f.call(this), this.toBeTiled = {}, this.constraints = {};
1992
+ }
1993
+ A.prototype = Object.create(f.prototype);
1994
+ for (var j in f)
1995
+ A[j] = f[j];
1996
+ A.prototype.newGraphManager = function() {
1997
+ var n = new e(this);
1998
+ return this.graphManager = n, n;
1999
+ }, A.prototype.newGraph = function(n) {
2000
+ return new g(null, this.graphManager, n);
2001
+ }, A.prototype.newNode = function(n) {
2002
+ return new t(this.graphManager, n);
2003
+ }, A.prototype.newEdge = function(n) {
2004
+ return new s(null, null, n);
2005
+ }, A.prototype.initParameters = function() {
2006
+ f.prototype.initParameters.call(this, arguments), this.isSubLayout || (o.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = o.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = h.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = h.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = h.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
2007
+ }, A.prototype.initSpringEmbedder = function() {
2008
+ f.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / h.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = 0.04, this.coolingAdjuster = 1;
2009
+ }, A.prototype.layout = function() {
2010
+ var n = T.DEFAULT_CREATE_BENDS_AS_NEEDED;
2011
+ return n && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
2012
+ }, A.prototype.classicLayout = function() {
2013
+ 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) {
2014
+ if (o.TREE_REDUCTION_ON_INCREMENTAL) {
2015
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2016
+ var E = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(S) {
2017
+ return E.has(S);
2018
+ });
2019
+ this.graphManager.setAllNodesToApplyGravitation(p);
2020
+ }
2021
+ } else {
2022
+ var n = this.getFlatForest();
2023
+ if (n.length > 0)
2024
+ this.positionNodesRadially(n);
2025
+ else {
2026
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2027
+ var E = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(m) {
2028
+ return E.has(m);
2029
+ });
2030
+ this.graphManager.setAllNodesToApplyGravitation(p), this.positionNodesRandomly();
2031
+ }
2032
+ }
2033
+ return Object.keys(this.constraints).length > 0 && (c.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), o.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
2034
+ }, A.prototype.tick = function() {
2035
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
2036
+ if (this.prunedNodesAll.length > 0)
2037
+ this.isTreeGrowing = !0;
2038
+ else
2039
+ return !0;
2040
+ if (this.totalIterations % h.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
2041
+ if (this.isConverged())
2042
+ if (this.prunedNodesAll.length > 0)
2043
+ this.isTreeGrowing = !0;
2044
+ else
2045
+ return !0;
2046
+ 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));
2047
+ }
2048
+ if (this.isTreeGrowing) {
2049
+ if (this.growTreeIterations % 10 == 0)
2050
+ if (this.prunedNodesAll.length > 0) {
2051
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
2052
+ var n = new Set(this.getAllNodes()), E = this.nodesWithGravity.filter(function(y) {
2053
+ return n.has(y);
2054
+ });
2055
+ this.graphManager.setAllNodesToApplyGravitation(E), this.graphManager.updateBounds(), this.updateGrid(), o.PURE_INCREMENTAL ? this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2056
+ } else
2057
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
2058
+ this.growTreeIterations++;
2059
+ }
2060
+ if (this.isGrowthFinished) {
2061
+ if (this.isConverged())
2062
+ return !0;
2063
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), o.PURE_INCREMENTAL ? this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
2064
+ }
2065
+ var p = !this.isTreeGrowing && !this.isGrowthFinished, m = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
2066
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(p, m), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
2067
+ }, A.prototype.getPositionsData = function() {
2068
+ for (var n = this.graphManager.getAllNodes(), E = {}, p = 0; p < n.length; p++) {
2069
+ var m = n[p].rect, y = n[p].id;
2070
+ E[y] = {
2071
+ id: y,
2072
+ x: m.getCenterX(),
2073
+ y: m.getCenterY(),
2074
+ w: m.width,
2075
+ h: m.height
2076
+ };
2077
+ }
2078
+ return E;
2079
+ }, A.prototype.runSpringEmbedder = function() {
2080
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
2081
+ var n = !1;
2082
+ if (h.ANIMATE === "during")
2083
+ this.emit("layoutstarted");
2084
+ else {
2085
+ for (; !n; )
2086
+ n = this.tick();
2087
+ this.graphManager.updateBounds();
2088
+ }
2089
+ }, A.prototype.moveNodes = function() {
2090
+ for (var n = this.getAllNodes(), E, p = 0; p < n.length; p++)
2091
+ E = n[p], E.calculateDisplacement();
2092
+ Object.keys(this.constraints).length > 0 && this.updateDisplacements();
2093
+ for (var p = 0; p < n.length; p++)
2094
+ E = n[p], E.move();
2095
+ }, A.prototype.initConstraintVariables = function() {
2096
+ var n = this;
2097
+ this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
2098
+ for (var E = this.graphManager.getAllNodes(), p = 0; p < E.length; p++) {
2099
+ var m = E[p];
2100
+ this.idToNodeMap.set(m.id, m);
2101
+ }
2102
+ var y = function D(H) {
2103
+ for (var k = H.getChild().getNodes(), tt, ht = 0, J = 0; J < k.length; J++)
2104
+ tt = k[J], tt.getChild() == null ? n.fixedNodeSet.has(tt.id) && (ht += 100) : ht += D(tt);
2105
+ return ht;
2106
+ };
2107
+ if (this.constraints.fixedNodeConstraint) {
2108
+ this.constraints.fixedNodeConstraint.forEach(function(k) {
2109
+ n.fixedNodeSet.add(k.nodeId);
2110
+ });
2111
+ for (var E = this.graphManager.getAllNodes(), m, p = 0; p < E.length; p++)
2112
+ if (m = E[p], m.getChild() != null) {
2113
+ var S = y(m);
2114
+ S > 0 && (m.fixedNodeWeight = S);
2115
+ }
2116
+ }
2117
+ if (this.constraints.relativePlacementConstraint) {
2118
+ var O = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
2119
+ if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(D) {
2120
+ n.fixedNodesOnHorizontal.add(D), n.fixedNodesOnVertical.add(D);
2121
+ }), this.constraints.alignmentConstraint) {
2122
+ if (this.constraints.alignmentConstraint.vertical)
2123
+ for (var W = this.constraints.alignmentConstraint.vertical, p = 0; p < W.length; p++)
2124
+ this.dummyToNodeForVerticalAlignment.set("dummy" + p, []), W[p].forEach(function(H) {
2125
+ O.set(H, "dummy" + p), n.dummyToNodeForVerticalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnHorizontal.add("dummy" + p);
2126
+ });
2127
+ if (this.constraints.alignmentConstraint.horizontal)
2128
+ for (var R = this.constraints.alignmentConstraint.horizontal, p = 0; p < R.length; p++)
2129
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + p, []), R[p].forEach(function(H) {
2130
+ F.set(H, "dummy" + p), n.dummyToNodeForHorizontalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnVertical.add("dummy" + p);
2131
+ });
2132
+ }
2133
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2134
+ this.shuffle = function(D) {
2135
+ var H, k, tt;
2136
+ for (tt = D.length - 1; tt >= 2 * D.length / 3; tt--)
2137
+ H = Math.floor(Math.random() * (tt + 1)), k = D[tt], D[tt] = D[H], D[H] = k;
2138
+ return D;
2139
+ }, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(D) {
2140
+ if (D.left) {
2141
+ var H = O.has(D.left) ? O.get(D.left) : D.left, k = O.has(D.right) ? O.get(D.right) : D.right;
2142
+ n.nodesInRelativeHorizontal.includes(H) || (n.nodesInRelativeHorizontal.push(H), n.nodeToRelativeConstraintMapHorizontal.set(H, []), n.dummyToNodeForVerticalAlignment.has(H) ? n.nodeToTempPositionMapHorizontal.set(H, n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()) : n.nodeToTempPositionMapHorizontal.set(H, n.idToNodeMap.get(H).getCenterX())), n.nodesInRelativeHorizontal.includes(k) || (n.nodesInRelativeHorizontal.push(k), n.nodeToRelativeConstraintMapHorizontal.set(k, []), n.dummyToNodeForVerticalAlignment.has(k) ? n.nodeToTempPositionMapHorizontal.set(k, n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()) : n.nodeToTempPositionMapHorizontal.set(k, n.idToNodeMap.get(k).getCenterX())), n.nodeToRelativeConstraintMapHorizontal.get(H).push({ right: k, gap: D.gap }), n.nodeToRelativeConstraintMapHorizontal.get(k).push({ left: H, gap: D.gap });
2143
+ } else {
2144
+ var tt = F.has(D.top) ? F.get(D.top) : D.top, ht = F.has(D.bottom) ? F.get(D.bottom) : D.bottom;
2145
+ n.nodesInRelativeVertical.includes(tt) || (n.nodesInRelativeVertical.push(tt), n.nodeToRelativeConstraintMapVertical.set(tt, []), n.dummyToNodeForHorizontalAlignment.has(tt) ? n.nodeToTempPositionMapVertical.set(tt, n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()) : n.nodeToTempPositionMapVertical.set(tt, n.idToNodeMap.get(tt).getCenterY())), n.nodesInRelativeVertical.includes(ht) || (n.nodesInRelativeVertical.push(ht), n.nodeToRelativeConstraintMapVertical.set(ht, []), n.dummyToNodeForHorizontalAlignment.has(ht) ? n.nodeToTempPositionMapVertical.set(ht, n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()) : n.nodeToTempPositionMapVertical.set(ht, n.idToNodeMap.get(ht).getCenterY())), n.nodeToRelativeConstraintMapVertical.get(tt).push({ bottom: ht, gap: D.gap }), n.nodeToRelativeConstraintMapVertical.get(ht).push({ top: tt, gap: D.gap });
2146
+ }
2147
+ });
2148
+ else {
2149
+ var Q = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
2150
+ this.constraints.relativePlacementConstraint.forEach(function(D) {
2151
+ if (D.left) {
2152
+ var H = O.has(D.left) ? O.get(D.left) : D.left, k = O.has(D.right) ? O.get(D.right) : D.right;
2153
+ Q.has(H) ? Q.get(H).push(k) : Q.set(H, [k]), Q.has(k) ? Q.get(k).push(H) : Q.set(k, [H]);
2154
+ } else {
2155
+ var tt = F.has(D.top) ? F.get(D.top) : D.top, ht = F.has(D.bottom) ? F.get(D.bottom) : D.bottom;
2156
+ z.has(tt) ? z.get(tt).push(ht) : z.set(tt, [ht]), z.has(ht) ? z.get(ht).push(tt) : z.set(ht, [tt]);
2157
+ }
2158
+ });
2159
+ var X = function(H, k) {
2160
+ var tt = [], ht = [], J = new $(), It = /* @__PURE__ */ new Set(), Nt = 0;
2161
+ return H.forEach(function(vt, it) {
2162
+ if (!It.has(it)) {
2163
+ tt[Nt] = [], ht[Nt] = !1;
2164
+ var ut = it;
2165
+ for (J.push(ut), It.add(ut), tt[Nt].push(ut); J.length != 0; ) {
2166
+ ut = J.shift(), k.has(ut) && (ht[Nt] = !0);
2167
+ var Et = H.get(ut);
2168
+ Et.forEach(function(wt) {
2169
+ It.has(wt) || (J.push(wt), It.add(wt), tt[Nt].push(wt));
2170
+ });
2171
+ }
2172
+ Nt++;
2173
+ }
2174
+ }), { components: tt, isFixed: ht };
2175
+ }, rt = X(Q, n.fixedNodesOnHorizontal);
2176
+ this.componentsOnHorizontal = rt.components, this.fixedComponentsOnHorizontal = rt.isFixed;
2177
+ var B = X(z, n.fixedNodesOnVertical);
2178
+ this.componentsOnVertical = B.components, this.fixedComponentsOnVertical = B.isFixed;
2179
+ }
2180
+ }
2181
+ }, A.prototype.updateDisplacements = function() {
2182
+ var n = this;
2183
+ if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(B) {
2184
+ var D = n.idToNodeMap.get(B.nodeId);
2185
+ D.displacementX = 0, D.displacementY = 0;
2186
+ }), this.constraints.alignmentConstraint) {
2187
+ if (this.constraints.alignmentConstraint.vertical)
2188
+ for (var E = this.constraints.alignmentConstraint.vertical, p = 0; p < E.length; p++) {
2189
+ for (var m = 0, y = 0; y < E[p].length; y++) {
2190
+ if (this.fixedNodeSet.has(E[p][y])) {
2191
+ m = 0;
2192
+ break;
2193
+ }
2194
+ m += this.idToNodeMap.get(E[p][y]).displacementX;
2195
+ }
2196
+ for (var S = m / E[p].length, y = 0; y < E[p].length; y++)
2197
+ this.idToNodeMap.get(E[p][y]).displacementX = S;
2198
+ }
2199
+ if (this.constraints.alignmentConstraint.horizontal)
2200
+ for (var O = this.constraints.alignmentConstraint.horizontal, p = 0; p < O.length; p++) {
2201
+ for (var F = 0, y = 0; y < O[p].length; y++) {
2202
+ if (this.fixedNodeSet.has(O[p][y])) {
2203
+ F = 0;
2204
+ break;
2205
+ }
2206
+ F += this.idToNodeMap.get(O[p][y]).displacementY;
2207
+ }
2208
+ for (var W = F / O[p].length, y = 0; y < O[p].length; y++)
2209
+ this.idToNodeMap.get(O[p][y]).displacementY = W;
2210
+ }
2211
+ }
2212
+ if (this.constraints.relativePlacementConstraint)
2213
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2214
+ this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(B) {
2215
+ if (!n.fixedNodesOnHorizontal.has(B)) {
2216
+ var D = 0;
2217
+ n.dummyToNodeForVerticalAlignment.has(B) ? D = n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX : D = n.idToNodeMap.get(B).displacementX, n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(H) {
2218
+ if (H.right) {
2219
+ var k = n.nodeToTempPositionMapHorizontal.get(H.right) - n.nodeToTempPositionMapHorizontal.get(B) - D;
2220
+ k < H.gap && (D -= H.gap - k);
2221
+ } else {
2222
+ var k = n.nodeToTempPositionMapHorizontal.get(B) - n.nodeToTempPositionMapHorizontal.get(H.left) + D;
2223
+ k < H.gap && (D += H.gap - k);
2224
+ }
2225
+ }), n.nodeToTempPositionMapHorizontal.set(B, n.nodeToTempPositionMapHorizontal.get(B) + D), n.dummyToNodeForVerticalAlignment.has(B) ? n.dummyToNodeForVerticalAlignment.get(B).forEach(function(H) {
2226
+ n.idToNodeMap.get(H).displacementX = D;
2227
+ }) : n.idToNodeMap.get(B).displacementX = D;
2228
+ }
2229
+ }), this.nodesInRelativeVertical.forEach(function(B) {
2230
+ if (!n.fixedNodesOnHorizontal.has(B)) {
2231
+ var D = 0;
2232
+ n.dummyToNodeForHorizontalAlignment.has(B) ? D = n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY : D = n.idToNodeMap.get(B).displacementY, n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(H) {
2233
+ if (H.bottom) {
2234
+ var k = n.nodeToTempPositionMapVertical.get(H.bottom) - n.nodeToTempPositionMapVertical.get(B) - D;
2235
+ k < H.gap && (D -= H.gap - k);
2236
+ } else {
2237
+ var k = n.nodeToTempPositionMapVertical.get(B) - n.nodeToTempPositionMapVertical.get(H.top) + D;
2238
+ k < H.gap && (D += H.gap - k);
2239
+ }
2240
+ }), n.nodeToTempPositionMapVertical.set(B, n.nodeToTempPositionMapVertical.get(B) + D), n.dummyToNodeForHorizontalAlignment.has(B) ? n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(H) {
2241
+ n.idToNodeMap.get(H).displacementY = D;
2242
+ }) : n.idToNodeMap.get(B).displacementY = D;
2243
+ }
2244
+ });
2245
+ else {
2246
+ for (var p = 0; p < this.componentsOnHorizontal.length; p++) {
2247
+ var R = this.componentsOnHorizontal[p];
2248
+ if (this.fixedComponentsOnHorizontal[p])
2249
+ for (var y = 0; y < R.length; y++)
2250
+ this.dummyToNodeForVerticalAlignment.has(R[y]) ? this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H) {
2251
+ n.idToNodeMap.get(H).displacementX = 0;
2252
+ }) : this.idToNodeMap.get(R[y]).displacementX = 0;
2253
+ else {
2254
+ for (var Q = 0, z = 0, y = 0; y < R.length; y++)
2255
+ if (this.dummyToNodeForVerticalAlignment.has(R[y])) {
2256
+ var X = this.dummyToNodeForVerticalAlignment.get(R[y]);
2257
+ Q += X.length * this.idToNodeMap.get(X[0]).displacementX, z += X.length;
2258
+ } else
2259
+ Q += this.idToNodeMap.get(R[y]).displacementX, z++;
2260
+ for (var rt = Q / z, y = 0; y < R.length; y++)
2261
+ this.dummyToNodeForVerticalAlignment.has(R[y]) ? this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H) {
2262
+ n.idToNodeMap.get(H).displacementX = rt;
2263
+ }) : this.idToNodeMap.get(R[y]).displacementX = rt;
2264
+ }
2265
+ }
2266
+ for (var p = 0; p < this.componentsOnVertical.length; p++) {
2267
+ var R = this.componentsOnVertical[p];
2268
+ if (this.fixedComponentsOnVertical[p])
2269
+ for (var y = 0; y < R.length; y++)
2270
+ this.dummyToNodeForHorizontalAlignment.has(R[y]) ? this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(k) {
2271
+ n.idToNodeMap.get(k).displacementY = 0;
2272
+ }) : this.idToNodeMap.get(R[y]).displacementY = 0;
2273
+ else {
2274
+ for (var Q = 0, z = 0, y = 0; y < R.length; y++)
2275
+ if (this.dummyToNodeForHorizontalAlignment.has(R[y])) {
2276
+ var X = this.dummyToNodeForHorizontalAlignment.get(R[y]);
2277
+ Q += X.length * this.idToNodeMap.get(X[0]).displacementY, z += X.length;
2278
+ } else
2279
+ Q += this.idToNodeMap.get(R[y]).displacementY, z++;
2280
+ for (var rt = Q / z, y = 0; y < R.length; y++)
2281
+ this.dummyToNodeForHorizontalAlignment.has(R[y]) ? this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(J) {
2282
+ n.idToNodeMap.get(J).displacementY = rt;
2283
+ }) : this.idToNodeMap.get(R[y]).displacementY = rt;
2284
+ }
2285
+ }
2286
+ }
2287
+ }, A.prototype.calculateNodesToApplyGravitationTo = function() {
2288
+ var n = [], E, p = this.graphManager.getGraphs(), m = p.length, y;
2289
+ for (y = 0; y < m; y++)
2290
+ E = p[y], E.updateConnected(), E.isConnected || (n = n.concat(E.getNodes()));
2291
+ return n;
2292
+ }, A.prototype.createBendpoints = function() {
2293
+ var n = [];
2294
+ n = n.concat(this.graphManager.getAllEdges());
2295
+ var E = /* @__PURE__ */ new Set(), p;
2296
+ for (p = 0; p < n.length; p++) {
2297
+ var m = n[p];
2298
+ if (!E.has(m)) {
2299
+ var y = m.getSource(), S = m.getTarget();
2300
+ if (y == S)
2301
+ m.getBendpoints().push(new v()), m.getBendpoints().push(new v()), this.createDummyNodesForBendpoints(m), E.add(m);
2302
+ else {
2303
+ var O = [];
2304
+ if (O = O.concat(y.getEdgeListToNode(S)), O = O.concat(S.getEdgeListToNode(y)), !E.has(O[0])) {
2305
+ if (O.length > 1) {
2306
+ var F;
2307
+ for (F = 0; F < O.length; F++) {
2308
+ var W = O[F];
2309
+ W.getBendpoints().push(new v()), this.createDummyNodesForBendpoints(W);
2310
+ }
2311
+ }
2312
+ O.forEach(function(R) {
2313
+ E.add(R);
2314
+ });
2315
+ }
2316
+ }
2317
+ }
2318
+ if (E.size == n.length)
2319
+ break;
2320
+ }
2321
+ }, A.prototype.positionNodesRadially = function(n) {
2322
+ for (var E = new u(0, 0), p = Math.ceil(Math.sqrt(n.length)), m = 0, y = 0, S = 0, O = new v(0, 0), F = 0; F < n.length; F++) {
2323
+ F % p == 0 && (S = 0, y = m, F != 0 && (y += o.DEFAULT_COMPONENT_SEPERATION), m = 0);
2324
+ var W = n[F], R = P.findCenterOfTree(W);
2325
+ E.x = S, E.y = y, O = A.radialLayout(W, R, E), O.y > m && (m = Math.floor(O.y)), S = Math.floor(O.x + o.DEFAULT_COMPONENT_SEPERATION);
2326
+ }
2327
+ this.transform(new v(T.WORLD_CENTER_X - O.x / 2, T.WORLD_CENTER_Y - O.y / 2));
2328
+ }, A.radialLayout = function(n, E, p) {
2329
+ var m = Math.max(this.maxDiagonalInTree(n), o.DEFAULT_RADIAL_SEPARATION);
2330
+ A.branchRadialLayout(E, null, 0, 359, 0, m);
2331
+ var y = V.calculateBounds(n), S = new Y();
2332
+ S.setDeviceOrgX(y.getMinX()), S.setDeviceOrgY(y.getMinY()), S.setWorldOrgX(p.x), S.setWorldOrgY(p.y);
2333
+ for (var O = 0; O < n.length; O++) {
2334
+ var F = n[O];
2335
+ F.transform(S);
2336
+ }
2337
+ var W = new v(y.getMaxX(), y.getMaxY());
2338
+ return S.inverseTransformPoint(W);
2339
+ }, A.branchRadialLayout = function(n, E, p, m, y, S) {
2340
+ var O = (m - p + 1) / 2;
2341
+ O < 0 && (O += 180);
2342
+ var F = (O + p) % 360, W = F * G.TWO_PI / 360, R = y * Math.cos(W), Q = y * Math.sin(W);
2343
+ n.setCenter(R, Q);
2344
+ var z = [];
2345
+ z = z.concat(n.getEdges());
2346
+ var X = z.length;
2347
+ E != null && X--;
2348
+ for (var rt = 0, B = z.length, D, H = n.getEdgesBetween(E); H.length > 1; ) {
2349
+ var k = H[0];
2350
+ H.splice(0, 1);
2351
+ var tt = z.indexOf(k);
2352
+ tt >= 0 && z.splice(tt, 1), B--, X--;
2353
+ }
2354
+ E != null ? D = (z.indexOf(H[0]) + 1) % B : D = 0;
2355
+ for (var ht = Math.abs(m - p) / X, J = D; rt != X; J = ++J % B) {
2356
+ var It = z[J].getOtherEnd(n);
2357
+ if (It != E) {
2358
+ var Nt = (p + rt * ht) % 360, vt = (Nt + ht) % 360;
2359
+ A.branchRadialLayout(It, n, Nt, vt, y + S, S), rt++;
2360
+ }
2361
+ }
2362
+ }, A.maxDiagonalInTree = function(n) {
2363
+ for (var E = C.MIN_VALUE, p = 0; p < n.length; p++) {
2364
+ var m = n[p], y = m.getDiagonal();
2365
+ y > E && (E = y);
2366
+ }
2367
+ return E;
2368
+ }, A.prototype.calcRepulsionRange = function() {
2369
+ return 2 * (this.level + 1) * this.idealEdgeLength;
2370
+ }, A.prototype.groupZeroDegreeMembers = function() {
2371
+ var n = this, E = {};
2372
+ this.memberGroups = {}, this.idToDummyNode = {};
2373
+ for (var p = [], m = this.graphManager.getAllNodes(), y = 0; y < m.length; y++) {
2374
+ var S = m[y], O = S.getParent();
2375
+ this.getNodeDegreeWithChildren(S) === 0 && (O.id == null || !this.getToBeTiled(O)) && p.push(S);
2376
+ }
2377
+ for (var y = 0; y < p.length; y++) {
2378
+ var S = p[y], F = S.getParent().id;
2379
+ typeof E[F] > "u" && (E[F] = []), E[F] = E[F].concat(S);
2380
+ }
2381
+ Object.keys(E).forEach(function(W) {
2382
+ if (E[W].length > 1) {
2383
+ var R = "DummyCompound_" + W;
2384
+ n.memberGroups[R] = E[W];
2385
+ var Q = E[W][0].getParent(), z = new t(n.graphManager);
2386
+ z.id = R, z.paddingLeft = Q.paddingLeft || 0, z.paddingRight = Q.paddingRight || 0, z.paddingBottom = Q.paddingBottom || 0, z.paddingTop = Q.paddingTop || 0, n.idToDummyNode[R] = z;
2387
+ var X = n.getGraphManager().add(n.newGraph(), z), rt = Q.getChild();
2388
+ rt.add(z);
2389
+ for (var B = 0; B < E[W].length; B++) {
2390
+ var D = E[W][B];
2391
+ rt.remove(D), X.add(D);
2392
+ }
2393
+ }
2394
+ });
2395
+ }, A.prototype.clearCompounds = function() {
2396
+ var n = {}, E = {};
2397
+ this.performDFSOnCompounds();
2398
+ for (var p = 0; p < this.compoundOrder.length; p++)
2399
+ E[this.compoundOrder[p].id] = this.compoundOrder[p], n[this.compoundOrder[p].id] = [].concat(this.compoundOrder[p].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[p].getChild()), this.compoundOrder[p].child = null;
2400
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(n, E);
2401
+ }, A.prototype.clearZeroDegreeMembers = function() {
2402
+ var n = this, E = this.tiledZeroDegreePack = [];
2403
+ Object.keys(this.memberGroups).forEach(function(p) {
2404
+ var m = n.idToDummyNode[p];
2405
+ if (E[p] = n.tileNodes(n.memberGroups[p], m.paddingLeft + m.paddingRight), m.rect.width = E[p].width, m.rect.height = E[p].height, m.setCenter(E[p].centerX, E[p].centerY), m.labelMarginLeft = 0, m.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2406
+ var y = m.rect.width, S = m.rect.height;
2407
+ m.labelWidth && (m.labelPosHorizontal == "left" ? (m.rect.x -= m.labelWidth, m.setWidth(y + m.labelWidth), m.labelMarginLeft = m.labelWidth) : m.labelPosHorizontal == "center" && m.labelWidth > y ? (m.rect.x -= (m.labelWidth - y) / 2, m.setWidth(m.labelWidth), m.labelMarginLeft = (m.labelWidth - y) / 2) : m.labelPosHorizontal == "right" && m.setWidth(y + m.labelWidth)), m.labelHeight && (m.labelPosVertical == "top" ? (m.rect.y -= m.labelHeight, m.setHeight(S + m.labelHeight), m.labelMarginTop = m.labelHeight) : m.labelPosVertical == "center" && m.labelHeight > S ? (m.rect.y -= (m.labelHeight - S) / 2, m.setHeight(m.labelHeight), m.labelMarginTop = (m.labelHeight - S) / 2) : m.labelPosVertical == "bottom" && m.setHeight(S + m.labelHeight));
2408
+ }
2409
+ });
2410
+ }, A.prototype.repopulateCompounds = function() {
2411
+ for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
2412
+ var E = this.compoundOrder[n], p = E.id, m = E.paddingLeft, y = E.paddingTop, S = E.labelMarginLeft, O = E.labelMarginTop;
2413
+ this.adjustLocations(this.tiledMemberPack[p], E.rect.x, E.rect.y, m, y, S, O);
2414
+ }
2415
+ }, A.prototype.repopulateZeroDegreeMembers = function() {
2416
+ var n = this, E = this.tiledZeroDegreePack;
2417
+ Object.keys(E).forEach(function(p) {
2418
+ var m = n.idToDummyNode[p], y = m.paddingLeft, S = m.paddingTop, O = m.labelMarginLeft, F = m.labelMarginTop;
2419
+ n.adjustLocations(E[p], m.rect.x, m.rect.y, y, S, O, F);
2420
+ });
2421
+ }, A.prototype.getToBeTiled = function(n) {
2422
+ var E = n.id;
2423
+ if (this.toBeTiled[E] != null)
2424
+ return this.toBeTiled[E];
2425
+ var p = n.getChild();
2426
+ if (p == null)
2427
+ return this.toBeTiled[E] = !1, !1;
2428
+ for (var m = p.getNodes(), y = 0; y < m.length; y++) {
2429
+ var S = m[y];
2430
+ if (this.getNodeDegree(S) > 0)
2431
+ return this.toBeTiled[E] = !1, !1;
2432
+ if (S.getChild() == null) {
2433
+ this.toBeTiled[S.id] = !1;
2434
+ continue;
2435
+ }
2436
+ if (!this.getToBeTiled(S))
2437
+ return this.toBeTiled[E] = !1, !1;
2438
+ }
2439
+ return this.toBeTiled[E] = !0, !0;
2440
+ }, A.prototype.getNodeDegree = function(n) {
2441
+ n.id;
2442
+ for (var E = n.getEdges(), p = 0, m = 0; m < E.length; m++) {
2443
+ var y = E[m];
2444
+ y.getSource().id !== y.getTarget().id && (p = p + 1);
2445
+ }
2446
+ return p;
2447
+ }, A.prototype.getNodeDegreeWithChildren = function(n) {
2448
+ var E = this.getNodeDegree(n);
2449
+ if (n.getChild() == null)
2450
+ return E;
2451
+ for (var p = n.getChild().getNodes(), m = 0; m < p.length; m++) {
2452
+ var y = p[m];
2453
+ E += this.getNodeDegreeWithChildren(y);
2454
+ }
2455
+ return E;
2456
+ }, A.prototype.performDFSOnCompounds = function() {
2457
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2458
+ }, A.prototype.fillCompexOrderByDFS = function(n) {
2459
+ for (var E = 0; E < n.length; E++) {
2460
+ var p = n[E];
2461
+ p.getChild() != null && this.fillCompexOrderByDFS(p.getChild().getNodes()), this.getToBeTiled(p) && this.compoundOrder.push(p);
2462
+ }
2463
+ }, A.prototype.adjustLocations = function(n, E, p, m, y, S, O) {
2464
+ E += m + S, p += y + O;
2465
+ for (var F = E, W = 0; W < n.rows.length; W++) {
2466
+ var R = n.rows[W];
2467
+ E = F;
2468
+ for (var Q = 0, z = 0; z < R.length; z++) {
2469
+ var X = R[z];
2470
+ X.rect.x = E, X.rect.y = p, E += X.rect.width + n.horizontalPadding, X.rect.height > Q && (Q = X.rect.height);
2471
+ }
2472
+ p += Q + n.verticalPadding;
2473
+ }
2474
+ }, A.prototype.tileCompoundMembers = function(n, E) {
2475
+ var p = this;
2476
+ this.tiledMemberPack = [], Object.keys(n).forEach(function(m) {
2477
+ var y = E[m];
2478
+ if (p.tiledMemberPack[m] = p.tileNodes(n[m], y.paddingLeft + y.paddingRight), y.rect.width = p.tiledMemberPack[m].width, y.rect.height = p.tiledMemberPack[m].height, y.setCenter(p.tiledMemberPack[m].centerX, p.tiledMemberPack[m].centerY), y.labelMarginLeft = 0, y.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2479
+ var S = y.rect.width, O = y.rect.height;
2480
+ y.labelWidth && (y.labelPosHorizontal == "left" ? (y.rect.x -= y.labelWidth, y.setWidth(S + y.labelWidth), y.labelMarginLeft = y.labelWidth) : y.labelPosHorizontal == "center" && y.labelWidth > S ? (y.rect.x -= (y.labelWidth - S) / 2, y.setWidth(y.labelWidth), y.labelMarginLeft = (y.labelWidth - S) / 2) : y.labelPosHorizontal == "right" && y.setWidth(S + y.labelWidth)), y.labelHeight && (y.labelPosVertical == "top" ? (y.rect.y -= y.labelHeight, y.setHeight(O + y.labelHeight), y.labelMarginTop = y.labelHeight) : y.labelPosVertical == "center" && y.labelHeight > O ? (y.rect.y -= (y.labelHeight - O) / 2, y.setHeight(y.labelHeight), y.labelMarginTop = (y.labelHeight - O) / 2) : y.labelPosVertical == "bottom" && y.setHeight(O + y.labelHeight));
2481
+ }
2482
+ });
2483
+ }, A.prototype.tileNodes = function(n, E) {
2484
+ var p = this.tileNodesByFavoringDim(n, E, !0), m = this.tileNodesByFavoringDim(n, E, !1), y = this.getOrgRatio(p), S = this.getOrgRatio(m), O;
2485
+ return S < y ? O = m : O = p, O;
2486
+ }, A.prototype.getOrgRatio = function(n) {
2487
+ var E = n.width, p = n.height, m = E / p;
2488
+ return m < 1 && (m = 1 / m), m;
2489
+ }, A.prototype.calcIdealRowWidth = function(n, E) {
2490
+ var p = o.TILING_PADDING_VERTICAL, m = o.TILING_PADDING_HORIZONTAL, y = n.length, S = 0, O = 0, F = 0;
2491
+ n.forEach(function(B) {
2492
+ S += B.getWidth(), O += B.getHeight(), B.getWidth() > F && (F = B.getWidth());
2493
+ });
2494
+ var W = S / y, R = O / y, Q = Math.pow(p - m, 2) + 4 * (W + m) * (R + p) * y, z = (m - p + Math.sqrt(Q)) / (2 * (W + m)), X;
2495
+ E ? (X = Math.ceil(z), X == z && X++) : X = Math.floor(z);
2496
+ var rt = X * (W + m) - m;
2497
+ return F > rt && (rt = F), rt += m * 2, rt;
2498
+ }, A.prototype.tileNodesByFavoringDim = function(n, E, p) {
2499
+ var m = o.TILING_PADDING_VERTICAL, y = o.TILING_PADDING_HORIZONTAL, S = o.TILING_COMPARE_BY, O = {
2500
+ rows: [],
2501
+ rowWidth: [],
2502
+ rowHeight: [],
2503
+ width: 0,
2504
+ height: E,
2505
+ // assume minHeight equals to minWidth
2506
+ verticalPadding: m,
2507
+ horizontalPadding: y,
2508
+ centerX: 0,
2509
+ centerY: 0
2510
+ };
2511
+ S && (O.idealRowWidth = this.calcIdealRowWidth(n, p));
2512
+ var F = function(D) {
2513
+ return D.rect.width * D.rect.height;
2514
+ }, W = function(D, H) {
2515
+ return F(H) - F(D);
2516
+ };
2517
+ n.sort(function(B, D) {
2518
+ var H = W;
2519
+ return O.idealRowWidth ? (H = S, H(B.id, D.id)) : H(B, D);
2520
+ });
2521
+ for (var R = 0, Q = 0, z = 0; z < n.length; z++) {
2522
+ var X = n[z];
2523
+ R += X.getCenterX(), Q += X.getCenterY();
2524
+ }
2525
+ O.centerX = R / n.length, O.centerY = Q / n.length;
2526
+ for (var z = 0; z < n.length; z++) {
2527
+ var X = n[z];
2528
+ if (O.rows.length == 0)
2529
+ this.insertNodeToRow(O, X, 0, E);
2530
+ else if (this.canAddHorizontal(O, X.rect.width, X.rect.height)) {
2531
+ var rt = O.rows.length - 1;
2532
+ O.idealRowWidth || (rt = this.getShortestRowIndex(O)), this.insertNodeToRow(O, X, rt, E);
2533
+ } else
2534
+ this.insertNodeToRow(O, X, O.rows.length, E);
2535
+ this.shiftToLastRow(O);
2536
+ }
2537
+ return O;
2538
+ }, A.prototype.insertNodeToRow = function(n, E, p, m) {
2539
+ var y = m;
2540
+ if (p == n.rows.length) {
2541
+ var S = [];
2542
+ n.rows.push(S), n.rowWidth.push(y), n.rowHeight.push(0);
2543
+ }
2544
+ var O = n.rowWidth[p] + E.rect.width;
2545
+ n.rows[p].length > 0 && (O += n.horizontalPadding), n.rowWidth[p] = O, n.width < O && (n.width = O);
2546
+ var F = E.rect.height;
2547
+ p > 0 && (F += n.verticalPadding);
2548
+ var W = 0;
2549
+ F > n.rowHeight[p] && (W = n.rowHeight[p], n.rowHeight[p] = F, W = n.rowHeight[p] - W), n.height += W, n.rows[p].push(E);
2550
+ }, A.prototype.getShortestRowIndex = function(n) {
2551
+ for (var E = -1, p = Number.MAX_VALUE, m = 0; m < n.rows.length; m++)
2552
+ n.rowWidth[m] < p && (E = m, p = n.rowWidth[m]);
2553
+ return E;
2554
+ }, A.prototype.getLongestRowIndex = function(n) {
2555
+ for (var E = -1, p = Number.MIN_VALUE, m = 0; m < n.rows.length; m++)
2556
+ n.rowWidth[m] > p && (E = m, p = n.rowWidth[m]);
2557
+ return E;
2558
+ }, A.prototype.canAddHorizontal = function(n, E, p) {
2559
+ if (n.idealRowWidth) {
2560
+ var m = n.rows.length - 1, y = n.rowWidth[m];
2561
+ return y + E + n.horizontalPadding <= n.idealRowWidth;
2562
+ }
2563
+ var S = this.getShortestRowIndex(n);
2564
+ if (S < 0)
2565
+ return !0;
2566
+ var O = n.rowWidth[S];
2567
+ if (O + n.horizontalPadding + E <= n.width) return !0;
2568
+ var F = 0;
2569
+ n.rowHeight[S] < p && S > 0 && (F = p + n.verticalPadding - n.rowHeight[S]);
2570
+ var W;
2571
+ n.width - O >= E + n.horizontalPadding ? W = (n.height + F) / (O + E + n.horizontalPadding) : W = (n.height + F) / n.width, F = p + n.verticalPadding;
2572
+ var R;
2573
+ return n.width < E ? R = (n.height + F) / E : R = (n.height + F) / n.width, R < 1 && (R = 1 / R), W < 1 && (W = 1 / W), W < R;
2574
+ }, A.prototype.shiftToLastRow = function(n) {
2575
+ var E = this.getLongestRowIndex(n), p = n.rowWidth.length - 1, m = n.rows[E], y = m[m.length - 1], S = y.width + n.horizontalPadding;
2576
+ if (n.width - n.rowWidth[p] > S && E != p) {
2577
+ m.splice(-1, 1), n.rows[p].push(y), n.rowWidth[E] = n.rowWidth[E] - S, n.rowWidth[p] = n.rowWidth[p] + S, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
2578
+ for (var O = Number.MIN_VALUE, F = 0; F < m.length; F++)
2579
+ m[F].height > O && (O = m[F].height);
2580
+ E > 0 && (O += n.verticalPadding);
2581
+ var W = n.rowHeight[E] + n.rowHeight[p];
2582
+ n.rowHeight[E] = O, n.rowHeight[p] < y.height + n.verticalPadding && (n.rowHeight[p] = y.height + n.verticalPadding);
2583
+ var R = n.rowHeight[E] + n.rowHeight[p];
2584
+ n.height += R - W, this.shiftToLastRow(n);
2585
+ }
2586
+ }, A.prototype.tilingPreLayout = function() {
2587
+ o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2588
+ }, A.prototype.tilingPostLayout = function() {
2589
+ o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2590
+ }, A.prototype.reduceTrees = function() {
2591
+ for (var n = [], E = !0, p; E; ) {
2592
+ var m = this.graphManager.getAllNodes(), y = [];
2593
+ E = !1;
2594
+ for (var S = 0; S < m.length; S++)
2595
+ if (p = m[S], p.getEdges().length == 1 && !p.getEdges()[0].isInterGraph && p.getChild() == null) {
2596
+ if (o.PURE_INCREMENTAL) {
2597
+ var O = p.getEdges()[0].getOtherEnd(p), F = new L(p.getCenterX() - O.getCenterX(), p.getCenterY() - O.getCenterY());
2598
+ y.push([p, p.getEdges()[0], p.getOwner(), F]);
2599
+ } else
2600
+ y.push([p, p.getEdges()[0], p.getOwner()]);
2601
+ E = !0;
2602
+ }
2603
+ if (E == !0) {
2604
+ for (var W = [], R = 0; R < y.length; R++)
2605
+ y[R][0].getEdges().length == 1 && (W.push(y[R]), y[R][0].getOwner().remove(y[R][0]));
2606
+ n.push(W), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2607
+ }
2608
+ }
2609
+ this.prunedNodesAll = n;
2610
+ }, A.prototype.growTree = function(n) {
2611
+ for (var E = n.length, p = n[E - 1], m, y = 0; y < p.length; y++)
2612
+ m = p[y], this.findPlaceforPrunedNode(m), m[2].add(m[0]), m[2].add(m[1], m[1].source, m[1].target);
2613
+ n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2614
+ }, A.prototype.findPlaceforPrunedNode = function(n) {
2615
+ var E, p, m = n[0];
2616
+ if (m == n[1].source ? p = n[1].target : p = n[1].source, o.PURE_INCREMENTAL)
2617
+ m.setCenter(p.getCenterX() + n[3].getWidth(), p.getCenterY() + n[3].getHeight());
2618
+ else {
2619
+ var y = p.startX, S = p.finishX, O = p.startY, F = p.finishY, W = 0, R = 0, Q = 0, z = 0, X = [W, Q, R, z];
2620
+ if (O > 0)
2621
+ for (var rt = y; rt <= S; rt++)
2622
+ X[0] += this.grid[rt][O - 1].length + this.grid[rt][O].length - 1;
2623
+ if (S < this.grid.length - 1)
2624
+ for (var rt = O; rt <= F; rt++)
2625
+ X[1] += this.grid[S + 1][rt].length + this.grid[S][rt].length - 1;
2626
+ if (F < this.grid[0].length - 1)
2627
+ for (var rt = y; rt <= S; rt++)
2628
+ X[2] += this.grid[rt][F + 1].length + this.grid[rt][F].length - 1;
2629
+ if (y > 0)
2630
+ for (var rt = O; rt <= F; rt++)
2631
+ X[3] += this.grid[y - 1][rt].length + this.grid[y][rt].length - 1;
2632
+ for (var B = C.MAX_VALUE, D, H, k = 0; k < X.length; k++)
2633
+ X[k] < B ? (B = X[k], D = 1, H = k) : X[k] == B && D++;
2634
+ if (D == 3 && B == 0)
2635
+ X[0] == 0 && X[1] == 0 && X[2] == 0 ? E = 1 : X[0] == 0 && X[1] == 0 && X[3] == 0 ? E = 0 : X[0] == 0 && X[2] == 0 && X[3] == 0 ? E = 3 : X[1] == 0 && X[2] == 0 && X[3] == 0 && (E = 2);
2636
+ else if (D == 2 && B == 0) {
2637
+ var tt = Math.floor(Math.random() * 2);
2638
+ X[0] == 0 && X[1] == 0 ? tt == 0 ? E = 0 : E = 1 : X[0] == 0 && X[2] == 0 ? tt == 0 ? E = 0 : E = 2 : X[0] == 0 && X[3] == 0 ? tt == 0 ? E = 0 : E = 3 : X[1] == 0 && X[2] == 0 ? tt == 0 ? E = 1 : E = 2 : X[1] == 0 && X[3] == 0 ? tt == 0 ? E = 1 : E = 3 : tt == 0 ? E = 2 : E = 3;
2639
+ } else if (D == 4 && B == 0) {
2640
+ var tt = Math.floor(Math.random() * 4);
2641
+ E = tt;
2642
+ } else
2643
+ E = H;
2644
+ E == 0 ? m.setCenter(p.getCenterX(), p.getCenterY() - p.getHeight() / 2 - h.DEFAULT_EDGE_LENGTH - m.getHeight() / 2) : E == 1 ? m.setCenter(p.getCenterX() + p.getWidth() / 2 + h.DEFAULT_EDGE_LENGTH + m.getWidth() / 2, p.getCenterY()) : E == 2 ? m.setCenter(p.getCenterX(), p.getCenterY() + p.getHeight() / 2 + h.DEFAULT_EDGE_LENGTH + m.getHeight() / 2) : m.setCenter(p.getCenterX() - p.getWidth() / 2 - h.DEFAULT_EDGE_LENGTH - m.getWidth() / 2, p.getCenterY());
2645
+ }
2646
+ }, a.exports = A;
2647
+ })
2648
+ ),
2649
+ /***/
2650
+ 991: (
2651
+ /***/
2652
+ ((a, r, i) => {
2653
+ var f = i(551).FDLayoutNode, e = i(551).IMath;
2654
+ function g(s, o, c, h) {
2655
+ f.call(this, s, o, c, h);
2656
+ }
2657
+ g.prototype = Object.create(f.prototype);
2658
+ for (var t in f)
2659
+ g[t] = f[t];
2660
+ g.prototype.calculateDisplacement = function() {
2661
+ var s = this.graphManager.getLayout();
2662
+ this.getChild() != null && this.fixedNodeWeight ? (this.displacementX += s.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight, this.displacementY += s.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight) : (this.displacementX += s.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY += s.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren), Math.abs(this.displacementX) > s.coolingFactor * s.maxNodeDisplacement && (this.displacementX = s.coolingFactor * s.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > s.coolingFactor * s.maxNodeDisplacement && (this.displacementY = s.coolingFactor * s.maxNodeDisplacement * e.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2663
+ }, g.prototype.propogateDisplacementToChildren = function(s, o) {
2664
+ for (var c = this.getChild().getNodes(), h, T = 0; T < c.length; T++)
2665
+ h = c[T], h.getChild() == null ? (h.displacementX += s, h.displacementY += o) : h.propogateDisplacementToChildren(s, o);
2666
+ }, g.prototype.move = function() {
2667
+ var s = this.graphManager.getLayout();
2668
+ (this.child == null || this.child.getNodes().length == 0) && (this.moveBy(this.displacementX, this.displacementY), s.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;
2669
+ }, g.prototype.setPred1 = function(s) {
2670
+ this.pred1 = s;
2671
+ }, g.prototype.getPred1 = function() {
2672
+ return pred1;
2673
+ }, g.prototype.getPred2 = function() {
2674
+ return pred2;
2675
+ }, g.prototype.setNext = function(s) {
2676
+ this.next = s;
2677
+ }, g.prototype.getNext = function() {
2678
+ return next;
2679
+ }, g.prototype.setProcessed = function(s) {
2680
+ this.processed = s;
2681
+ }, g.prototype.isProcessed = function() {
2682
+ return processed;
2683
+ }, a.exports = g;
2684
+ })
2685
+ ),
2686
+ /***/
2687
+ 902: (
2688
+ /***/
2689
+ ((a, r, i) => {
2690
+ function f(c) {
2691
+ if (Array.isArray(c)) {
2692
+ for (var h = 0, T = Array(c.length); h < c.length; h++)
2693
+ T[h] = c[h];
2694
+ return T;
2695
+ } else
2696
+ return Array.from(c);
2697
+ }
2698
+ var e = i(806), g = i(551).LinkedList, t = i(551).Matrix, s = i(551).SVD;
2699
+ function o() {
2700
+ }
2701
+ o.handleConstraints = function(c) {
2702
+ var h = {};
2703
+ h.fixedNodeConstraint = c.constraints.fixedNodeConstraint, h.alignmentConstraint = c.constraints.alignmentConstraint, h.relativePlacementConstraint = c.constraints.relativePlacementConstraint;
2704
+ for (var T = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), v = [], L = [], P = c.getAllNodes(), C = 0, G = 0; G < P.length; G++) {
2705
+ var V = P[G];
2706
+ V.getChild() == null && (u.set(V.id, C++), v.push(V.getCenterX()), L.push(V.getCenterY()), T.set(V.id, V));
2707
+ }
2708
+ h.relativePlacementConstraint && h.relativePlacementConstraint.forEach(function(b) {
2709
+ !b.gap && b.gap != 0 && (b.left ? b.gap = e.DEFAULT_EDGE_LENGTH + T.get(b.left).getWidth() / 2 + T.get(b.right).getWidth() / 2 : b.gap = e.DEFAULT_EDGE_LENGTH + T.get(b.top).getHeight() / 2 + T.get(b.bottom).getHeight() / 2);
2710
+ });
2711
+ var Y = function(U, Z) {
2712
+ return { x: U.x - Z.x, y: U.y - Z.y };
2713
+ }, $ = function(U) {
2714
+ var Z = 0, K = 0;
2715
+ return U.forEach(function(q) {
2716
+ Z += v[u.get(q)], K += L[u.get(q)];
2717
+ }), { x: Z / U.size, y: K / U.size };
2718
+ }, A = function(U, Z, K, q, at) {
2719
+ function ct(lt, ot) {
2720
+ var Lt = new Set(lt), ft = !0, st = !1, Xt = void 0;
2721
+ try {
2722
+ for (var Tt = ot[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2723
+ var Bt = Ct.value;
2724
+ Lt.add(Bt);
2725
+ }
2726
+ } catch (bt) {
2727
+ st = !0, Xt = bt;
2728
+ } finally {
2729
+ try {
2730
+ !ft && Tt.return && Tt.return();
2731
+ } finally {
2732
+ if (st)
2733
+ throw Xt;
2734
+ }
2735
+ }
2736
+ return Lt;
2737
+ }
2738
+ var nt = /* @__PURE__ */ new Map();
2739
+ U.forEach(function(lt, ot) {
2740
+ nt.set(ot, 0);
2741
+ }), U.forEach(function(lt, ot) {
2742
+ lt.forEach(function(Lt) {
2743
+ nt.set(Lt.id, nt.get(Lt.id) + 1);
2744
+ });
2745
+ });
2746
+ var et = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), dt = new g();
2747
+ nt.forEach(function(lt, ot) {
2748
+ lt == 0 ? (dt.push(ot), K || (Z == "horizontal" ? et.set(ot, u.has(ot) ? v[u.get(ot)] : q.get(ot)) : et.set(ot, u.has(ot) ? L[u.get(ot)] : q.get(ot)))) : et.set(ot, Number.NEGATIVE_INFINITY), K && _.set(ot, /* @__PURE__ */ new Set([ot]));
2749
+ }), K && at.forEach(function(lt) {
2750
+ var ot = [];
2751
+ if (lt.forEach(function(st) {
2752
+ K.has(st) && ot.push(st);
2753
+ }), ot.length > 0) {
2754
+ var Lt = 0;
2755
+ ot.forEach(function(st) {
2756
+ Z == "horizontal" ? (et.set(st, u.has(st) ? v[u.get(st)] : q.get(st)), Lt += et.get(st)) : (et.set(st, u.has(st) ? L[u.get(st)] : q.get(st)), Lt += et.get(st));
2757
+ }), Lt = Lt / ot.length, lt.forEach(function(st) {
2758
+ K.has(st) || et.set(st, Lt);
2759
+ });
2760
+ } else {
2761
+ var ft = 0;
2762
+ lt.forEach(function(st) {
2763
+ Z == "horizontal" ? ft += u.has(st) ? v[u.get(st)] : q.get(st) : ft += u.has(st) ? L[u.get(st)] : q.get(st);
2764
+ }), ft = ft / lt.length, lt.forEach(function(st) {
2765
+ et.set(st, ft);
2766
+ });
2767
+ }
2768
+ });
2769
+ for (var Mt = function() {
2770
+ var ot = dt.shift(), Lt = U.get(ot);
2771
+ Lt.forEach(function(ft) {
2772
+ if (et.get(ft.id) < et.get(ot) + ft.gap)
2773
+ if (K && K.has(ft.id)) {
2774
+ var st = void 0;
2775
+ if (Z == "horizontal" ? st = u.has(ft.id) ? v[u.get(ft.id)] : q.get(ft.id) : st = u.has(ft.id) ? L[u.get(ft.id)] : q.get(ft.id), et.set(ft.id, st), st < et.get(ot) + ft.gap) {
2776
+ var Xt = et.get(ot) + ft.gap - st;
2777
+ _.get(ot).forEach(function(Tt) {
2778
+ et.set(Tt, et.get(Tt) - Xt);
2779
+ });
2780
+ }
2781
+ } else
2782
+ et.set(ft.id, et.get(ot) + ft.gap);
2783
+ nt.set(ft.id, nt.get(ft.id) - 1), nt.get(ft.id) == 0 && dt.push(ft.id), K && _.set(ft.id, ct(_.get(ot), _.get(ft.id)));
2784
+ });
2785
+ }; dt.length != 0; )
2786
+ Mt();
2787
+ if (K) {
2788
+ var pt = /* @__PURE__ */ new Set();
2789
+ U.forEach(function(lt, ot) {
2790
+ lt.length == 0 && pt.add(ot);
2791
+ });
2792
+ var xt = [];
2793
+ _.forEach(function(lt, ot) {
2794
+ if (pt.has(ot)) {
2795
+ var Lt = !1, ft = !0, st = !1, Xt = void 0;
2796
+ try {
2797
+ for (var Tt = lt[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2798
+ var Bt = Ct.value;
2799
+ K.has(Bt) && (Lt = !0);
2800
+ }
2801
+ } catch (St) {
2802
+ st = !0, Xt = St;
2803
+ } finally {
2804
+ try {
2805
+ !ft && Tt.return && Tt.return();
2806
+ } finally {
2807
+ if (st)
2808
+ throw Xt;
2809
+ }
2810
+ }
2811
+ if (!Lt) {
2812
+ var bt = !1, zt = void 0;
2813
+ xt.forEach(function(St, kt) {
2814
+ St.has([].concat(f(lt))[0]) && (bt = !0, zt = kt);
2815
+ }), bt ? lt.forEach(function(St) {
2816
+ xt[zt].add(St);
2817
+ }) : xt.push(new Set(lt));
2818
+ }
2819
+ }
2820
+ }), xt.forEach(function(lt, ot) {
2821
+ var Lt = Number.POSITIVE_INFINITY, ft = Number.POSITIVE_INFINITY, st = Number.NEGATIVE_INFINITY, Xt = Number.NEGATIVE_INFINITY, Tt = !0, Ct = !1, Bt = void 0;
2822
+ try {
2823
+ for (var bt = lt[Symbol.iterator](), zt; !(Tt = (zt = bt.next()).done); Tt = !0) {
2824
+ var St = zt.value, kt = void 0;
2825
+ Z == "horizontal" ? kt = u.has(St) ? v[u.get(St)] : q.get(St) : kt = u.has(St) ? L[u.get(St)] : q.get(St);
2826
+ var Kt = et.get(St);
2827
+ kt < Lt && (Lt = kt), kt > st && (st = kt), Kt < ft && (ft = Kt), Kt > Xt && (Xt = Kt);
2828
+ }
2829
+ } catch (ee) {
2830
+ Ct = !0, Bt = ee;
2831
+ } finally {
2832
+ try {
2833
+ !Tt && bt.return && bt.return();
2834
+ } finally {
2835
+ if (Ct)
2836
+ throw Bt;
2837
+ }
2838
+ }
2839
+ var ce = (Lt + st) / 2 - (ft + Xt) / 2, Qt = !0, jt = !1, _t = void 0;
2840
+ try {
2841
+ for (var Jt = lt[Symbol.iterator](), oe; !(Qt = (oe = Jt.next()).done); Qt = !0) {
2842
+ var te = oe.value;
2843
+ et.set(te, et.get(te) + ce);
2844
+ }
2845
+ } catch (ee) {
2846
+ jt = !0, _t = ee;
2847
+ } finally {
2848
+ try {
2849
+ !Qt && Jt.return && Jt.return();
2850
+ } finally {
2851
+ if (jt)
2852
+ throw _t;
2853
+ }
2854
+ }
2855
+ });
2856
+ }
2857
+ return et;
2858
+ }, j = function(U) {
2859
+ var Z = 0, K = 0, q = 0, at = 0;
2860
+ if (U.forEach(function(_) {
2861
+ _.left ? v[u.get(_.left)] - v[u.get(_.right)] >= 0 ? Z++ : K++ : L[u.get(_.top)] - L[u.get(_.bottom)] >= 0 ? q++ : at++;
2862
+ }), Z > K && q > at)
2863
+ for (var ct = 0; ct < u.size; ct++)
2864
+ v[ct] = -1 * v[ct], L[ct] = -1 * L[ct];
2865
+ else if (Z > K)
2866
+ for (var nt = 0; nt < u.size; nt++)
2867
+ v[nt] = -1 * v[nt];
2868
+ else if (q > at)
2869
+ for (var et = 0; et < u.size; et++)
2870
+ L[et] = -1 * L[et];
2871
+ }, n = function(U) {
2872
+ var Z = [], K = new g(), q = /* @__PURE__ */ new Set(), at = 0;
2873
+ return U.forEach(function(ct, nt) {
2874
+ if (!q.has(nt)) {
2875
+ Z[at] = [];
2876
+ var et = nt;
2877
+ for (K.push(et), q.add(et), Z[at].push(et); K.length != 0; ) {
2878
+ et = K.shift();
2879
+ var _ = U.get(et);
2880
+ _.forEach(function(dt) {
2881
+ q.has(dt.id) || (K.push(dt.id), q.add(dt.id), Z[at].push(dt.id));
2882
+ });
2883
+ }
2884
+ at++;
2885
+ }
2886
+ }), Z;
2887
+ }, E = function(U) {
2888
+ var Z = /* @__PURE__ */ new Map();
2889
+ return U.forEach(function(K, q) {
2890
+ Z.set(q, []);
2891
+ }), U.forEach(function(K, q) {
2892
+ K.forEach(function(at) {
2893
+ Z.get(q).push(at), Z.get(at.id).push({ id: q, gap: at.gap, direction: at.direction });
2894
+ });
2895
+ }), Z;
2896
+ }, p = function(U) {
2897
+ var Z = /* @__PURE__ */ new Map();
2898
+ return U.forEach(function(K, q) {
2899
+ Z.set(q, []);
2900
+ }), U.forEach(function(K, q) {
2901
+ K.forEach(function(at) {
2902
+ Z.get(at.id).push({ id: q, gap: at.gap, direction: at.direction });
2903
+ });
2904
+ }), Z;
2905
+ }, m = [], y = [], S = !1, O = !1, F = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), Q = [];
2906
+ if (h.fixedNodeConstraint && h.fixedNodeConstraint.forEach(function(b) {
2907
+ F.add(b.nodeId);
2908
+ }), h.relativePlacementConstraint && (h.relativePlacementConstraint.forEach(function(b) {
2909
+ b.left ? (W.has(b.left) ? W.get(b.left).push({ id: b.right, gap: b.gap, direction: "horizontal" }) : W.set(b.left, [{ id: b.right, gap: b.gap, direction: "horizontal" }]), W.has(b.right) || W.set(b.right, [])) : (W.has(b.top) ? W.get(b.top).push({ id: b.bottom, gap: b.gap, direction: "vertical" }) : W.set(b.top, [{ id: b.bottom, gap: b.gap, direction: "vertical" }]), W.has(b.bottom) || W.set(b.bottom, []));
2910
+ }), R = E(W), Q = n(R)), e.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2911
+ if (h.fixedNodeConstraint && h.fixedNodeConstraint.length > 1)
2912
+ h.fixedNodeConstraint.forEach(function(b, U) {
2913
+ m[U] = [b.position.x, b.position.y], y[U] = [v[u.get(b.nodeId)], L[u.get(b.nodeId)]];
2914
+ }), S = !0;
2915
+ else if (h.alignmentConstraint)
2916
+ (function() {
2917
+ var b = 0;
2918
+ if (h.alignmentConstraint.vertical) {
2919
+ for (var U = h.alignmentConstraint.vertical, Z = function(et) {
2920
+ var _ = /* @__PURE__ */ new Set();
2921
+ U[et].forEach(function(pt) {
2922
+ _.add(pt);
2923
+ });
2924
+ var dt = new Set([].concat(f(_)).filter(function(pt) {
2925
+ return F.has(pt);
2926
+ })), Mt = void 0;
2927
+ dt.size > 0 ? Mt = v[u.get(dt.values().next().value)] : Mt = $(_).x, U[et].forEach(function(pt) {
2928
+ m[b] = [Mt, L[u.get(pt)]], y[b] = [v[u.get(pt)], L[u.get(pt)]], b++;
2929
+ });
2930
+ }, K = 0; K < U.length; K++)
2931
+ Z(K);
2932
+ S = !0;
2933
+ }
2934
+ if (h.alignmentConstraint.horizontal) {
2935
+ for (var q = h.alignmentConstraint.horizontal, at = function(et) {
2936
+ var _ = /* @__PURE__ */ new Set();
2937
+ q[et].forEach(function(pt) {
2938
+ _.add(pt);
2939
+ });
2940
+ var dt = new Set([].concat(f(_)).filter(function(pt) {
2941
+ return F.has(pt);
2942
+ })), Mt = void 0;
2943
+ dt.size > 0 ? Mt = v[u.get(dt.values().next().value)] : Mt = $(_).y, q[et].forEach(function(pt) {
2944
+ m[b] = [v[u.get(pt)], Mt], y[b] = [v[u.get(pt)], L[u.get(pt)]], b++;
2945
+ });
2946
+ }, ct = 0; ct < q.length; ct++)
2947
+ at(ct);
2948
+ S = !0;
2949
+ }
2950
+ h.relativePlacementConstraint && (O = !0);
2951
+ })();
2952
+ else if (h.relativePlacementConstraint) {
2953
+ for (var z = 0, X = 0, rt = 0; rt < Q.length; rt++)
2954
+ Q[rt].length > z && (z = Q[rt].length, X = rt);
2955
+ if (z < R.size / 2)
2956
+ j(h.relativePlacementConstraint), S = !1, O = !1;
2957
+ else {
2958
+ var B = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), H = [];
2959
+ Q[X].forEach(function(b) {
2960
+ W.get(b).forEach(function(U) {
2961
+ U.direction == "horizontal" ? (B.has(b) ? B.get(b).push(U) : B.set(b, [U]), B.has(U.id) || B.set(U.id, []), H.push({ left: b, right: U.id })) : (D.has(b) ? D.get(b).push(U) : D.set(b, [U]), D.has(U.id) || D.set(U.id, []), H.push({ top: b, bottom: U.id }));
2962
+ });
2963
+ }), j(H), O = !1;
2964
+ var k = A(B, "horizontal"), tt = A(D, "vertical");
2965
+ Q[X].forEach(function(b, U) {
2966
+ y[U] = [v[u.get(b)], L[u.get(b)]], m[U] = [], k.has(b) ? m[U][0] = k.get(b) : m[U][0] = v[u.get(b)], tt.has(b) ? m[U][1] = tt.get(b) : m[U][1] = L[u.get(b)];
2967
+ }), S = !0;
2968
+ }
2969
+ }
2970
+ if (S) {
2971
+ for (var ht = void 0, J = t.transpose(m), It = t.transpose(y), Nt = 0; Nt < J.length; Nt++)
2972
+ J[Nt] = t.multGamma(J[Nt]), It[Nt] = t.multGamma(It[Nt]);
2973
+ var vt = t.multMat(J, t.transpose(It)), it = s.svd(vt);
2974
+ ht = t.multMat(it.V, t.transpose(it.U));
2975
+ for (var ut = 0; ut < u.size; ut++) {
2976
+ var Et = [v[ut], L[ut]], wt = [ht[0][0], ht[1][0]], Ot = [ht[0][1], ht[1][1]];
2977
+ v[ut] = t.dotProduct(Et, wt), L[ut] = t.dotProduct(Et, Ot);
2978
+ }
2979
+ O && j(h.relativePlacementConstraint);
2980
+ }
2981
+ }
2982
+ if (e.ENFORCE_CONSTRAINTS) {
2983
+ if (h.fixedNodeConstraint && h.fixedNodeConstraint.length > 0) {
2984
+ var mt = { x: 0, y: 0 };
2985
+ h.fixedNodeConstraint.forEach(function(b, U) {
2986
+ var Z = { x: v[u.get(b.nodeId)], y: L[u.get(b.nodeId)] }, K = b.position, q = Y(K, Z);
2987
+ mt.x += q.x, mt.y += q.y;
2988
+ }), mt.x /= h.fixedNodeConstraint.length, mt.y /= h.fixedNodeConstraint.length, v.forEach(function(b, U) {
2989
+ v[U] += mt.x;
2990
+ }), L.forEach(function(b, U) {
2991
+ L[U] += mt.y;
2992
+ }), h.fixedNodeConstraint.forEach(function(b) {
2993
+ v[u.get(b.nodeId)] = b.position.x, L[u.get(b.nodeId)] = b.position.y;
2994
+ });
2995
+ }
2996
+ if (h.alignmentConstraint) {
2997
+ if (h.alignmentConstraint.vertical)
2998
+ for (var Dt = h.alignmentConstraint.vertical, Rt = function(U) {
2999
+ var Z = /* @__PURE__ */ new Set();
3000
+ Dt[U].forEach(function(at) {
3001
+ Z.add(at);
3002
+ });
3003
+ var K = new Set([].concat(f(Z)).filter(function(at) {
3004
+ return F.has(at);
3005
+ })), q = void 0;
3006
+ K.size > 0 ? q = v[u.get(K.values().next().value)] : q = $(Z).x, Z.forEach(function(at) {
3007
+ F.has(at) || (v[u.get(at)] = q);
3008
+ });
3009
+ }, Ht = 0; Ht < Dt.length; Ht++)
3010
+ Rt(Ht);
3011
+ if (h.alignmentConstraint.horizontal)
3012
+ for (var Ut = h.alignmentConstraint.horizontal, Pt = function(U) {
3013
+ var Z = /* @__PURE__ */ new Set();
3014
+ Ut[U].forEach(function(at) {
3015
+ Z.add(at);
3016
+ });
3017
+ var K = new Set([].concat(f(Z)).filter(function(at) {
3018
+ return F.has(at);
3019
+ })), q = void 0;
3020
+ K.size > 0 ? q = L[u.get(K.values().next().value)] : q = $(Z).y, Z.forEach(function(at) {
3021
+ F.has(at) || (L[u.get(at)] = q);
3022
+ });
3023
+ }, Ft = 0; Ft < Ut.length; Ft++)
3024
+ Pt(Ft);
3025
+ }
3026
+ h.relativePlacementConstraint && (function() {
3027
+ var b = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), at = /* @__PURE__ */ new Map(), ct = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Set();
3028
+ if (F.forEach(function(Gt) {
3029
+ ct.add(Gt), nt.add(Gt);
3030
+ }), h.alignmentConstraint) {
3031
+ if (h.alignmentConstraint.vertical)
3032
+ for (var et = h.alignmentConstraint.vertical, _ = function(yt) {
3033
+ Z.set("dummy" + yt, []), et[yt].forEach(function(At) {
3034
+ b.set(At, "dummy" + yt), Z.get("dummy" + yt).push(At), F.has(At) && ct.add("dummy" + yt);
3035
+ }), q.set("dummy" + yt, v[u.get(et[yt][0])]);
3036
+ }, dt = 0; dt < et.length; dt++)
3037
+ _(dt);
3038
+ if (h.alignmentConstraint.horizontal)
3039
+ for (var Mt = h.alignmentConstraint.horizontal, pt = function(yt) {
3040
+ K.set("dummy" + yt, []), Mt[yt].forEach(function(At) {
3041
+ U.set(At, "dummy" + yt), K.get("dummy" + yt).push(At), F.has(At) && nt.add("dummy" + yt);
3042
+ }), at.set("dummy" + yt, L[u.get(Mt[yt][0])]);
3043
+ }, xt = 0; xt < Mt.length; xt++)
3044
+ pt(xt);
3045
+ }
3046
+ var lt = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map(), Lt = function(yt) {
3047
+ W.get(yt).forEach(function(At) {
3048
+ var Zt = void 0, $t = void 0;
3049
+ At.direction == "horizontal" ? (Zt = b.get(yt) ? b.get(yt) : yt, b.get(At.id) ? $t = { id: b.get(At.id), gap: At.gap, direction: At.direction } : $t = At, lt.has(Zt) ? lt.get(Zt).push($t) : lt.set(Zt, [$t]), lt.has($t.id) || lt.set($t.id, [])) : (Zt = U.get(yt) ? U.get(yt) : yt, U.get(At.id) ? $t = { id: U.get(At.id), gap: At.gap, direction: At.direction } : $t = At, ot.has(Zt) ? ot.get(Zt).push($t) : ot.set(Zt, [$t]), ot.has($t.id) || ot.set($t.id, []));
3050
+ });
3051
+ }, ft = !0, st = !1, Xt = void 0;
3052
+ try {
3053
+ for (var Tt = W.keys()[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
3054
+ var Bt = Ct.value;
3055
+ Lt(Bt);
3056
+ }
3057
+ } catch (Gt) {
3058
+ st = !0, Xt = Gt;
3059
+ } finally {
3060
+ try {
3061
+ !ft && Tt.return && Tt.return();
3062
+ } finally {
3063
+ if (st)
3064
+ throw Xt;
3065
+ }
3066
+ }
3067
+ var bt = E(lt), zt = E(ot), St = n(bt), kt = n(zt), Kt = p(lt), ce = p(ot), Qt = [], jt = [];
3068
+ St.forEach(function(Gt, yt) {
3069
+ Qt[yt] = [], Gt.forEach(function(At) {
3070
+ Kt.get(At).length == 0 && Qt[yt].push(At);
3071
+ });
3072
+ }), kt.forEach(function(Gt, yt) {
3073
+ jt[yt] = [], Gt.forEach(function(At) {
3074
+ ce.get(At).length == 0 && jt[yt].push(At);
3075
+ });
3076
+ });
3077
+ var _t = A(lt, "horizontal", ct, q, Qt), Jt = A(ot, "vertical", nt, at, jt), oe = function(yt) {
3078
+ Z.get(yt) ? Z.get(yt).forEach(function(At) {
3079
+ v[u.get(At)] = _t.get(yt);
3080
+ }) : v[u.get(yt)] = _t.get(yt);
3081
+ }, te = !0, ee = !1, Le = void 0;
3082
+ try {
3083
+ for (var ge = _t.keys()[Symbol.iterator](), Ce; !(te = (Ce = ge.next()).done); te = !0) {
3084
+ var ue = Ce.value;
3085
+ oe(ue);
3086
+ }
3087
+ } catch (Gt) {
3088
+ ee = !0, Le = Gt;
3089
+ } finally {
3090
+ try {
3091
+ !te && ge.return && ge.return();
3092
+ } finally {
3093
+ if (ee)
3094
+ throw Le;
3095
+ }
3096
+ }
3097
+ var ke = function(yt) {
3098
+ K.get(yt) ? K.get(yt).forEach(function(At) {
3099
+ L[u.get(At)] = Jt.get(yt);
3100
+ }) : L[u.get(yt)] = Jt.get(yt);
3101
+ }, de = !0, we = !1, Me = void 0;
3102
+ try {
3103
+ for (var ve = Jt.keys()[Symbol.iterator](), Ae; !(de = (Ae = ve.next()).done); de = !0) {
3104
+ var ue = Ae.value;
3105
+ ke(ue);
3106
+ }
3107
+ } catch (Gt) {
3108
+ we = !0, Me = Gt;
3109
+ } finally {
3110
+ try {
3111
+ !de && ve.return && ve.return();
3112
+ } finally {
3113
+ if (we)
3114
+ throw Me;
3115
+ }
3116
+ }
3117
+ })();
3118
+ }
3119
+ for (var Yt = 0; Yt < P.length; Yt++) {
3120
+ var Vt = P[Yt];
3121
+ Vt.getChild() == null && Vt.setCenter(v[u.get(Vt.id)], L[u.get(Vt.id)]);
3122
+ }
3123
+ }, a.exports = o;
3124
+ })
3125
+ ),
3126
+ /***/
3127
+ 551: (
3128
+ /***/
3129
+ ((a) => {
3130
+ a.exports = w;
3131
+ })
3132
+ )
3133
+ /******/
3134
+ }, N = {};
3135
+ function d(a) {
3136
+ var r = N[a];
3137
+ if (r !== void 0)
3138
+ return r.exports;
3139
+ var i = N[a] = {
3140
+ /******/
3141
+ // no module.id needed
3142
+ /******/
3143
+ // no module.loaded needed
3144
+ /******/
3145
+ exports: {}
3146
+ /******/
3147
+ };
3148
+ return x[a](i, i.exports, d), i.exports;
3149
+ }
3150
+ var l = d(45);
3151
+ return l;
3152
+ })()
3153
+ );
3154
+ });
3155
+ })(le)), le.exports;
3156
+ }
3157
+ var yr = he.exports, xe;
3158
+ function mr() {
3159
+ return xe || (xe = 1, (function(I, M) {
3160
+ (function(x, N) {
3161
+ I.exports = N(pr());
3162
+ })(yr, function(w) {
3163
+ return (
3164
+ /******/
3165
+ (() => {
3166
+ var x = {
3167
+ /***/
3168
+ 658: (
3169
+ /***/
3170
+ ((a) => {
3171
+ a.exports = Object.assign != null ? Object.assign.bind(Object) : function(r) {
3172
+ for (var i = arguments.length, f = Array(i > 1 ? i - 1 : 0), e = 1; e < i; e++)
3173
+ f[e - 1] = arguments[e];
3174
+ return f.forEach(function(g) {
3175
+ Object.keys(g).forEach(function(t) {
3176
+ return r[t] = g[t];
3177
+ });
3178
+ }), r;
3179
+ };
3180
+ })
3181
+ ),
3182
+ /***/
3183
+ 548: (
3184
+ /***/
3185
+ ((a, r, i) => {
3186
+ var f = /* @__PURE__ */ (function() {
3187
+ function t(s, o) {
3188
+ var c = [], h = !0, T = !1, u = void 0;
3189
+ try {
3190
+ for (var v = s[Symbol.iterator](), L; !(h = (L = v.next()).done) && (c.push(L.value), !(o && c.length === o)); h = !0)
3191
+ ;
3192
+ } catch (P) {
3193
+ T = !0, u = P;
3194
+ } finally {
3195
+ try {
3196
+ !h && v.return && v.return();
3197
+ } finally {
3198
+ if (T) throw u;
3199
+ }
3200
+ }
3201
+ return c;
3202
+ }
3203
+ return function(s, o) {
3204
+ if (Array.isArray(s))
3205
+ return s;
3206
+ if (Symbol.iterator in Object(s))
3207
+ return t(s, o);
3208
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
3209
+ };
3210
+ })(), e = i(140).layoutBase.LinkedList, g = {};
3211
+ g.getTopMostNodes = function(t) {
3212
+ for (var s = {}, o = 0; o < t.length; o++)
3213
+ s[t[o].id()] = !0;
3214
+ var c = t.filter(function(h, T) {
3215
+ typeof h == "number" && (h = T);
3216
+ for (var u = h.parent()[0]; u != null; ) {
3217
+ if (s[u.id()])
3218
+ return !1;
3219
+ u = u.parent()[0];
3220
+ }
3221
+ return !0;
3222
+ });
3223
+ return c;
3224
+ }, g.connectComponents = function(t, s, o, c) {
3225
+ var h = new e(), T = /* @__PURE__ */ new Set(), u = [], v = void 0, L = void 0, P = void 0, C = !1, G = 1, V = [], Y = [], $ = function() {
3226
+ var j = t.collection();
3227
+ Y.push(j);
3228
+ var n = o[0], E = t.collection();
3229
+ E.merge(n).merge(n.descendants().intersection(s)), u.push(n), E.forEach(function(y) {
3230
+ h.push(y), T.add(y), j.merge(y);
3231
+ });
3232
+ for (var p = function() {
3233
+ n = h.shift();
3234
+ var S = t.collection();
3235
+ n.neighborhood().nodes().forEach(function(R) {
3236
+ s.intersection(n.edgesWith(R)).length > 0 && S.merge(R);
3237
+ });
3238
+ for (var O = 0; O < S.length; O++) {
3239
+ var F = S[O];
3240
+ if (v = o.intersection(F.union(F.ancestors())), v != null && !T.has(v[0])) {
3241
+ var W = v.union(v.descendants());
3242
+ W.forEach(function(R) {
3243
+ h.push(R), T.add(R), j.merge(R), o.has(R) && u.push(R);
3244
+ });
3245
+ }
3246
+ }
3247
+ }; h.length != 0; )
3248
+ p();
3249
+ if (j.forEach(function(y) {
3250
+ s.intersection(y.connectedEdges()).forEach(function(S) {
3251
+ j.has(S.source()) && j.has(S.target()) && j.merge(S);
3252
+ });
3253
+ }), u.length == o.length && (C = !0), !C || C && G > 1) {
3254
+ L = u[0], P = L.connectedEdges().length, u.forEach(function(y) {
3255
+ y.connectedEdges().length < P && (P = y.connectedEdges().length, L = y);
3256
+ }), V.push(L.id());
3257
+ var m = t.collection();
3258
+ m.merge(u[0]), u.forEach(function(y) {
3259
+ m.merge(y);
3260
+ }), u = [], o = o.difference(m), G++;
3261
+ }
3262
+ };
3263
+ do
3264
+ $();
3265
+ while (!C);
3266
+ return c && V.length > 0 && c.set("dummy" + (c.size + 1), V), Y;
3267
+ }, g.relocateComponent = function(t, s, o) {
3268
+ if (!o.fixedNodeConstraint) {
3269
+ var c = Number.POSITIVE_INFINITY, h = Number.NEGATIVE_INFINITY, T = Number.POSITIVE_INFINITY, u = Number.NEGATIVE_INFINITY;
3270
+ if (o.quality == "draft") {
3271
+ var v = !0, L = !1, P = void 0;
3272
+ try {
3273
+ for (var C = s.nodeIndexes[Symbol.iterator](), G; !(v = (G = C.next()).done); v = !0) {
3274
+ var V = G.value, Y = f(V, 2), $ = Y[0], A = Y[1], j = o.cy.getElementById($);
3275
+ if (j) {
3276
+ var n = j.boundingBox(), E = s.xCoords[A] - n.w / 2, p = s.xCoords[A] + n.w / 2, m = s.yCoords[A] - n.h / 2, y = s.yCoords[A] + n.h / 2;
3277
+ E < c && (c = E), p > h && (h = p), m < T && (T = m), y > u && (u = y);
3278
+ }
3279
+ }
3280
+ } catch (R) {
3281
+ L = !0, P = R;
3282
+ } finally {
3283
+ try {
3284
+ !v && C.return && C.return();
3285
+ } finally {
3286
+ if (L)
3287
+ throw P;
3288
+ }
3289
+ }
3290
+ var S = t.x - (h + c) / 2, O = t.y - (u + T) / 2;
3291
+ s.xCoords = s.xCoords.map(function(R) {
3292
+ return R + S;
3293
+ }), s.yCoords = s.yCoords.map(function(R) {
3294
+ return R + O;
3295
+ });
3296
+ } else {
3297
+ Object.keys(s).forEach(function(R) {
3298
+ var Q = s[R], z = Q.getRect().x, X = Q.getRect().x + Q.getRect().width, rt = Q.getRect().y, B = Q.getRect().y + Q.getRect().height;
3299
+ z < c && (c = z), X > h && (h = X), rt < T && (T = rt), B > u && (u = B);
3300
+ });
3301
+ var F = t.x - (h + c) / 2, W = t.y - (u + T) / 2;
3302
+ Object.keys(s).forEach(function(R) {
3303
+ var Q = s[R];
3304
+ Q.setCenter(Q.getCenterX() + F, Q.getCenterY() + W);
3305
+ });
3306
+ }
3307
+ }
3308
+ }, g.calcBoundingBox = function(t, s, o, c) {
3309
+ for (var h = Number.MAX_SAFE_INTEGER, T = Number.MIN_SAFE_INTEGER, u = Number.MAX_SAFE_INTEGER, v = Number.MIN_SAFE_INTEGER, L = void 0, P = void 0, C = void 0, G = void 0, V = t.descendants().not(":parent"), Y = V.length, $ = 0; $ < Y; $++) {
3310
+ var A = V[$];
3311
+ L = s[c.get(A.id())] - A.width() / 2, P = s[c.get(A.id())] + A.width() / 2, C = o[c.get(A.id())] - A.height() / 2, G = o[c.get(A.id())] + A.height() / 2, h > L && (h = L), T < P && (T = P), u > C && (u = C), v < G && (v = G);
3312
+ }
3313
+ var j = {};
3314
+ return j.topLeftX = h, j.topLeftY = u, j.width = T - h, j.height = v - u, j;
3315
+ }, g.calcParentsWithoutChildren = function(t, s) {
3316
+ var o = t.collection();
3317
+ return s.nodes(":parent").forEach(function(c) {
3318
+ var h = !1;
3319
+ c.children().forEach(function(T) {
3320
+ T.css("display") != "none" && (h = !0);
3321
+ }), h || o.merge(c);
3322
+ }), o;
3323
+ }, a.exports = g;
3324
+ })
3325
+ ),
3326
+ /***/
3327
+ 816: (
3328
+ /***/
3329
+ ((a, r, i) => {
3330
+ var f = i(548), e = i(140).CoSELayout, g = i(140).CoSENode, t = i(140).layoutBase.PointD, s = i(140).layoutBase.DimensionD, o = i(140).layoutBase.LayoutConstants, c = i(140).layoutBase.FDLayoutConstants, h = i(140).CoSEConstants, T = function(v, L) {
3331
+ var P = v.cy, C = v.eles, G = C.nodes(), V = C.edges(), Y = void 0, $ = void 0, A = void 0, j = {};
3332
+ v.randomize && (Y = L.nodeIndexes, $ = L.xCoords, A = L.yCoords);
3333
+ var n = function(R) {
3334
+ return typeof R == "function";
3335
+ }, E = function(R, Q) {
3336
+ return n(R) ? R(Q) : R;
3337
+ }, p = f.calcParentsWithoutChildren(P, C), m = function W(R, Q, z, X) {
3338
+ for (var rt = Q.length, B = 0; B < rt; B++) {
3339
+ var D = Q[B], H = null;
3340
+ D.intersection(p).length == 0 && (H = D.children());
3341
+ var k = void 0, tt = D.layoutDimensions({
3342
+ nodeDimensionsIncludeLabels: X.nodeDimensionsIncludeLabels
3343
+ });
3344
+ if (D.outerWidth() != null && D.outerHeight() != null)
3345
+ if (X.randomize)
3346
+ if (!D.isParent())
3347
+ k = R.add(new g(z.graphManager, new t($[Y.get(D.id())] - tt.w / 2, A[Y.get(D.id())] - tt.h / 2), new s(parseFloat(tt.w), parseFloat(tt.h))));
3348
+ else {
3349
+ var ht = f.calcBoundingBox(D, $, A, Y);
3350
+ D.intersection(p).length == 0 ? k = R.add(new g(z.graphManager, new t(ht.topLeftX, ht.topLeftY), new s(ht.width, ht.height))) : k = R.add(new g(z.graphManager, new t(ht.topLeftX, ht.topLeftY), new s(parseFloat(tt.w), parseFloat(tt.h))));
3351
+ }
3352
+ else
3353
+ k = R.add(new g(z.graphManager, new t(D.position("x") - tt.w / 2, D.position("y") - tt.h / 2), new s(parseFloat(tt.w), parseFloat(tt.h))));
3354
+ else
3355
+ k = R.add(new g(this.graphManager));
3356
+ if (k.id = D.data("id"), k.nodeRepulsion = E(X.nodeRepulsion, D), k.paddingLeft = parseInt(D.css("padding")), k.paddingTop = parseInt(D.css("padding")), k.paddingRight = parseInt(D.css("padding")), k.paddingBottom = parseInt(D.css("padding")), X.nodeDimensionsIncludeLabels && (k.labelWidth = D.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).w, k.labelHeight = D.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).h, k.labelPosVertical = D.css("text-valign"), k.labelPosHorizontal = D.css("text-halign")), j[D.data("id")] = k, isNaN(k.rect.x) && (k.rect.x = 0), isNaN(k.rect.y) && (k.rect.y = 0), H != null && H.length > 0) {
3357
+ var J = void 0;
3358
+ J = z.getGraphManager().add(z.newGraph(), k), W(J, H, z, X);
3359
+ }
3360
+ }
3361
+ }, y = function(R, Q, z) {
3362
+ for (var X = 0, rt = 0, B = 0; B < z.length; B++) {
3363
+ var D = z[B], H = j[D.data("source")], k = j[D.data("target")];
3364
+ if (H && k && H !== k && H.getEdgesBetween(k).length == 0) {
3365
+ var tt = Q.add(R.newEdge(), H, k);
3366
+ tt.id = D.id(), tt.idealLength = E(v.idealEdgeLength, D), tt.edgeElasticity = E(v.edgeElasticity, D), X += tt.idealLength, rt++;
3367
+ }
3368
+ }
3369
+ v.idealEdgeLength != null && (rt > 0 ? h.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = X / rt : n(v.idealEdgeLength) ? h.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = 50 : h.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = v.idealEdgeLength, h.MIN_REPULSION_DIST = c.MIN_REPULSION_DIST = c.DEFAULT_EDGE_LENGTH / 10, h.DEFAULT_RADIAL_SEPARATION = c.DEFAULT_EDGE_LENGTH);
3370
+ }, S = function(R, Q) {
3371
+ Q.fixedNodeConstraint && (R.constraints.fixedNodeConstraint = Q.fixedNodeConstraint), Q.alignmentConstraint && (R.constraints.alignmentConstraint = Q.alignmentConstraint), Q.relativePlacementConstraint && (R.constraints.relativePlacementConstraint = Q.relativePlacementConstraint);
3372
+ };
3373
+ v.nestingFactor != null && (h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = v.nestingFactor), v.gravity != null && (h.DEFAULT_GRAVITY_STRENGTH = c.DEFAULT_GRAVITY_STRENGTH = v.gravity), v.numIter != null && (h.MAX_ITERATIONS = c.MAX_ITERATIONS = v.numIter), v.gravityRange != null && (h.DEFAULT_GRAVITY_RANGE_FACTOR = c.DEFAULT_GRAVITY_RANGE_FACTOR = v.gravityRange), v.gravityCompound != null && (h.DEFAULT_COMPOUND_GRAVITY_STRENGTH = c.DEFAULT_COMPOUND_GRAVITY_STRENGTH = v.gravityCompound), v.gravityRangeCompound != null && (h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = v.gravityRangeCompound), v.initialEnergyOnIncremental != null && (h.DEFAULT_COOLING_FACTOR_INCREMENTAL = c.DEFAULT_COOLING_FACTOR_INCREMENTAL = v.initialEnergyOnIncremental), v.tilingCompareBy != null && (h.TILING_COMPARE_BY = v.tilingCompareBy), v.quality == "proof" ? o.QUALITY = 2 : o.QUALITY = 0, h.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = o.NODE_DIMENSIONS_INCLUDE_LABELS = v.nodeDimensionsIncludeLabels, h.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !v.randomize, h.ANIMATE = c.ANIMATE = o.ANIMATE = v.animate, h.TILE = v.tile, h.TILING_PADDING_VERTICAL = typeof v.tilingPaddingVertical == "function" ? v.tilingPaddingVertical.call() : v.tilingPaddingVertical, h.TILING_PADDING_HORIZONTAL = typeof v.tilingPaddingHorizontal == "function" ? v.tilingPaddingHorizontal.call() : v.tilingPaddingHorizontal, h.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !0, h.PURE_INCREMENTAL = !v.randomize, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = v.uniformNodeDimensions, v.step == "transformed" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, h.ENFORCE_CONSTRAINTS = !1, h.APPLY_LAYOUT = !1), v.step == "enforced" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !0, h.APPLY_LAYOUT = !1), v.step == "cose" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !1, h.APPLY_LAYOUT = !0), v.step == "all" && (v.randomize ? h.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !0, h.APPLY_LAYOUT = !0), v.fixedNodeConstraint || v.alignmentConstraint || v.relativePlacementConstraint ? h.TREE_REDUCTION_ON_INCREMENTAL = !1 : h.TREE_REDUCTION_ON_INCREMENTAL = !0;
3374
+ var O = new e(), F = O.newGraphManager();
3375
+ return m(F.addRoot(), f.getTopMostNodes(G), O, v), y(O, F, V), S(O, v), O.runLayout(), j;
3376
+ };
3377
+ a.exports = { coseLayout: T };
3378
+ })
3379
+ ),
3380
+ /***/
3381
+ 212: (
3382
+ /***/
3383
+ ((a, r, i) => {
3384
+ var f = /* @__PURE__ */ (function() {
3385
+ function v(L, P) {
3386
+ for (var C = 0; C < P.length; C++) {
3387
+ var G = P[C];
3388
+ G.enumerable = G.enumerable || !1, G.configurable = !0, "value" in G && (G.writable = !0), Object.defineProperty(L, G.key, G);
3389
+ }
3390
+ }
3391
+ return function(L, P, C) {
3392
+ return P && v(L.prototype, P), C && v(L, C), L;
3393
+ };
3394
+ })();
3395
+ function e(v, L) {
3396
+ if (!(v instanceof L))
3397
+ throw new TypeError("Cannot call a class as a function");
3398
+ }
3399
+ var g = i(658), t = i(548), s = i(657), o = s.spectralLayout, c = i(816), h = c.coseLayout, T = Object.freeze({
3400
+ // 'draft', 'default' or 'proof'
3401
+ // - 'draft' only applies spectral layout
3402
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
3403
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
3404
+ quality: "default",
3405
+ // Use random node positions at beginning of layout
3406
+ // if this is set to false, then quality option must be "proof"
3407
+ randomize: !0,
3408
+ // Whether or not to animate the layout
3409
+ animate: !0,
3410
+ // Duration of animation in ms, if enabled
3411
+ animationDuration: 1e3,
3412
+ // Easing of animation, if enabled
3413
+ animationEasing: void 0,
3414
+ // Fit the viewport to the repositioned nodes
3415
+ fit: !0,
3416
+ // Padding around layout
3417
+ padding: 30,
3418
+ // Whether to include labels in node dimensions. Valid in "proof" quality
3419
+ nodeDimensionsIncludeLabels: !1,
3420
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
3421
+ uniformNodeDimensions: !1,
3422
+ // Whether to pack disconnected components - valid only if randomize: true
3423
+ packComponents: !0,
3424
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
3425
+ step: "all",
3426
+ /* spectral layout options */
3427
+ // False for random, true for greedy
3428
+ samplingType: !0,
3429
+ // Sample size to construct distance matrix
3430
+ sampleSize: 25,
3431
+ // Separation amount between nodes
3432
+ nodeSeparation: 75,
3433
+ // Power iteration tolerance
3434
+ piTol: 1e-7,
3435
+ /* CoSE layout options */
3436
+ // Node repulsion (non overlapping) multiplier
3437
+ nodeRepulsion: function(L) {
3438
+ return 4500;
3439
+ },
3440
+ // Ideal edge (non nested) length
3441
+ idealEdgeLength: function(L) {
3442
+ return 50;
3443
+ },
3444
+ // Divisor to compute edge forces
3445
+ edgeElasticity: function(L) {
3446
+ return 0.45;
3447
+ },
3448
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
3449
+ nestingFactor: 0.1,
3450
+ // Gravity force (constant)
3451
+ gravity: 0.25,
3452
+ // Maximum number of iterations to perform
3453
+ numIter: 2500,
3454
+ // For enabling tiling
3455
+ tile: !0,
3456
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
3457
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
3458
+ tilingCompareBy: void 0,
3459
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
3460
+ tilingPaddingVertical: 10,
3461
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
3462
+ tilingPaddingHorizontal: 10,
3463
+ // Gravity range (constant) for compounds
3464
+ gravityRangeCompound: 1.5,
3465
+ // Gravity force (constant) for compounds
3466
+ gravityCompound: 1,
3467
+ // Gravity range (constant)
3468
+ gravityRange: 3.8,
3469
+ // Initial cooling factor for incremental layout
3470
+ initialEnergyOnIncremental: 0.3,
3471
+ /* constraint options */
3472
+ // Fix required nodes to predefined positions
3473
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
3474
+ fixedNodeConstraint: void 0,
3475
+ // Align required nodes in vertical/horizontal direction
3476
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
3477
+ alignmentConstraint: void 0,
3478
+ // Place two nodes relatively in vertical/horizontal direction
3479
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
3480
+ relativePlacementConstraint: void 0,
3481
+ /* layout event callbacks */
3482
+ ready: function() {
3483
+ },
3484
+ // on layoutready
3485
+ stop: function() {
3486
+ }
3487
+ // on layoutstop
3488
+ }), u = (function() {
3489
+ function v(L) {
3490
+ e(this, v), this.options = g({}, T, L);
3491
+ }
3492
+ return f(v, [{
3493
+ key: "run",
3494
+ value: function() {
3495
+ var P = this, C = this.options, G = C.cy, V = C.eles, Y = [], $ = [], A = void 0, j = [];
3496
+ C.fixedNodeConstraint && (!Array.isArray(C.fixedNodeConstraint) || C.fixedNodeConstraint.length == 0) && (C.fixedNodeConstraint = void 0), C.alignmentConstraint && (C.alignmentConstraint.vertical && (!Array.isArray(C.alignmentConstraint.vertical) || C.alignmentConstraint.vertical.length == 0) && (C.alignmentConstraint.vertical = void 0), C.alignmentConstraint.horizontal && (!Array.isArray(C.alignmentConstraint.horizontal) || C.alignmentConstraint.horizontal.length == 0) && (C.alignmentConstraint.horizontal = void 0)), C.relativePlacementConstraint && (!Array.isArray(C.relativePlacementConstraint) || C.relativePlacementConstraint.length == 0) && (C.relativePlacementConstraint = void 0);
3497
+ var n = C.fixedNodeConstraint || C.alignmentConstraint || C.relativePlacementConstraint;
3498
+ n && (C.tile = !1, C.packComponents = !1);
3499
+ var E = void 0, p = !1;
3500
+ if (G.layoutUtilities && C.packComponents && (E = G.layoutUtilities("get"), E || (E = G.layoutUtilities()), p = !0), V.nodes().length > 0)
3501
+ if (p) {
3502
+ var S = t.getTopMostNodes(C.eles.nodes());
3503
+ if (A = t.connectComponents(G, C.eles, S), A.forEach(function(vt) {
3504
+ var it = vt.boundingBox();
3505
+ j.push({ x: it.x1 + it.w / 2, y: it.y1 + it.h / 2 });
3506
+ }), C.randomize && A.forEach(function(vt) {
3507
+ C.eles = vt, Y.push(o(C));
3508
+ }), C.quality == "default" || C.quality == "proof") {
3509
+ var O = G.collection();
3510
+ if (C.tile) {
3511
+ var F = /* @__PURE__ */ new Map(), W = [], R = [], Q = 0, z = { nodeIndexes: F, xCoords: W, yCoords: R }, X = [];
3512
+ if (A.forEach(function(vt, it) {
3513
+ vt.edges().length == 0 && (vt.nodes().forEach(function(ut, Et) {
3514
+ O.merge(vt.nodes()[Et]), ut.isParent() || (z.nodeIndexes.set(vt.nodes()[Et].id(), Q++), z.xCoords.push(vt.nodes()[0].position().x), z.yCoords.push(vt.nodes()[0].position().y));
3515
+ }), X.push(it));
3516
+ }), O.length > 1) {
3517
+ var rt = O.boundingBox();
3518
+ j.push({ x: rt.x1 + rt.w / 2, y: rt.y1 + rt.h / 2 }), A.push(O), Y.push(z);
3519
+ for (var B = X.length - 1; B >= 0; B--)
3520
+ A.splice(X[B], 1), Y.splice(X[B], 1), j.splice(X[B], 1);
3521
+ }
3522
+ }
3523
+ A.forEach(function(vt, it) {
3524
+ C.eles = vt, $.push(h(C, Y[it])), t.relocateComponent(j[it], $[it], C);
3525
+ });
3526
+ } else
3527
+ A.forEach(function(vt, it) {
3528
+ t.relocateComponent(j[it], Y[it], C);
3529
+ });
3530
+ var D = /* @__PURE__ */ new Set();
3531
+ if (A.length > 1) {
3532
+ var H = [], k = V.filter(function(vt) {
3533
+ return vt.css("display") == "none";
3534
+ });
3535
+ A.forEach(function(vt, it) {
3536
+ var ut = void 0;
3537
+ if (C.quality == "draft" && (ut = Y[it].nodeIndexes), vt.nodes().not(k).length > 0) {
3538
+ var Et = {};
3539
+ Et.edges = [], Et.nodes = [];
3540
+ var wt = void 0;
3541
+ vt.nodes().not(k).forEach(function(Ot) {
3542
+ if (C.quality == "draft")
3543
+ if (!Ot.isParent())
3544
+ wt = ut.get(Ot.id()), Et.nodes.push({ x: Y[it].xCoords[wt] - Ot.boundingbox().w / 2, y: Y[it].yCoords[wt] - Ot.boundingbox().h / 2, width: Ot.boundingbox().w, height: Ot.boundingbox().h });
3545
+ else {
3546
+ var mt = t.calcBoundingBox(Ot, Y[it].xCoords, Y[it].yCoords, ut);
3547
+ Et.nodes.push({ x: mt.topLeftX, y: mt.topLeftY, width: mt.width, height: mt.height });
3548
+ }
3549
+ else
3550
+ $[it][Ot.id()] && Et.nodes.push({ x: $[it][Ot.id()].getLeft(), y: $[it][Ot.id()].getTop(), width: $[it][Ot.id()].getWidth(), height: $[it][Ot.id()].getHeight() });
3551
+ }), vt.edges().forEach(function(Ot) {
3552
+ var mt = Ot.source(), Dt = Ot.target();
3553
+ if (mt.css("display") != "none" && Dt.css("display") != "none")
3554
+ if (C.quality == "draft") {
3555
+ var Rt = ut.get(mt.id()), Ht = ut.get(Dt.id()), Ut = [], Pt = [];
3556
+ if (mt.isParent()) {
3557
+ var Ft = t.calcBoundingBox(mt, Y[it].xCoords, Y[it].yCoords, ut);
3558
+ Ut.push(Ft.topLeftX + Ft.width / 2), Ut.push(Ft.topLeftY + Ft.height / 2);
3559
+ } else
3560
+ Ut.push(Y[it].xCoords[Rt]), Ut.push(Y[it].yCoords[Rt]);
3561
+ if (Dt.isParent()) {
3562
+ var Yt = t.calcBoundingBox(Dt, Y[it].xCoords, Y[it].yCoords, ut);
3563
+ Pt.push(Yt.topLeftX + Yt.width / 2), Pt.push(Yt.topLeftY + Yt.height / 2);
3564
+ } else
3565
+ Pt.push(Y[it].xCoords[Ht]), Pt.push(Y[it].yCoords[Ht]);
3566
+ Et.edges.push({ startX: Ut[0], startY: Ut[1], endX: Pt[0], endY: Pt[1] });
3567
+ } else
3568
+ $[it][mt.id()] && $[it][Dt.id()] && Et.edges.push({ startX: $[it][mt.id()].getCenterX(), startY: $[it][mt.id()].getCenterY(), endX: $[it][Dt.id()].getCenterX(), endY: $[it][Dt.id()].getCenterY() });
3569
+ }), Et.nodes.length > 0 && (H.push(Et), D.add(it));
3570
+ }
3571
+ });
3572
+ var tt = E.packComponents(H, C.randomize).shifts;
3573
+ if (C.quality == "draft")
3574
+ Y.forEach(function(vt, it) {
3575
+ var ut = vt.xCoords.map(function(wt) {
3576
+ return wt + tt[it].dx;
3577
+ }), Et = vt.yCoords.map(function(wt) {
3578
+ return wt + tt[it].dy;
3579
+ });
3580
+ vt.xCoords = ut, vt.yCoords = Et;
3581
+ });
3582
+ else {
3583
+ var ht = 0;
3584
+ D.forEach(function(vt) {
3585
+ Object.keys($[vt]).forEach(function(it) {
3586
+ var ut = $[vt][it];
3587
+ ut.setCenter(ut.getCenterX() + tt[ht].dx, ut.getCenterY() + tt[ht].dy);
3588
+ }), ht++;
3589
+ });
3590
+ }
3591
+ }
3592
+ } else {
3593
+ var m = C.eles.boundingBox();
3594
+ if (j.push({ x: m.x1 + m.w / 2, y: m.y1 + m.h / 2 }), C.randomize) {
3595
+ var y = o(C);
3596
+ Y.push(y);
3597
+ }
3598
+ C.quality == "default" || C.quality == "proof" ? ($.push(h(C, Y[0])), t.relocateComponent(j[0], $[0], C)) : t.relocateComponent(j[0], Y[0], C);
3599
+ }
3600
+ var J = function(it, ut) {
3601
+ if (C.quality == "default" || C.quality == "proof") {
3602
+ typeof it == "number" && (it = ut);
3603
+ var Et = void 0, wt = void 0, Ot = it.data("id");
3604
+ return $.forEach(function(Dt) {
3605
+ Ot in Dt && (Et = { x: Dt[Ot].getRect().getCenterX(), y: Dt[Ot].getRect().getCenterY() }, wt = Dt[Ot]);
3606
+ }), C.nodeDimensionsIncludeLabels && (wt.labelWidth && (wt.labelPosHorizontal == "left" ? Et.x += wt.labelWidth / 2 : wt.labelPosHorizontal == "right" && (Et.x -= wt.labelWidth / 2)), wt.labelHeight && (wt.labelPosVertical == "top" ? Et.y += wt.labelHeight / 2 : wt.labelPosVertical == "bottom" && (Et.y -= wt.labelHeight / 2))), Et == null && (Et = { x: it.position("x"), y: it.position("y") }), {
3607
+ x: Et.x,
3608
+ y: Et.y
3609
+ };
3610
+ } else {
3611
+ var mt = void 0;
3612
+ return Y.forEach(function(Dt) {
3613
+ var Rt = Dt.nodeIndexes.get(it.id());
3614
+ Rt != null && (mt = { x: Dt.xCoords[Rt], y: Dt.yCoords[Rt] });
3615
+ }), mt == null && (mt = { x: it.position("x"), y: it.position("y") }), {
3616
+ x: mt.x,
3617
+ y: mt.y
3618
+ };
3619
+ }
3620
+ };
3621
+ if (C.quality == "default" || C.quality == "proof" || C.randomize) {
3622
+ var It = t.calcParentsWithoutChildren(G, V), Nt = V.filter(function(vt) {
3623
+ return vt.css("display") == "none";
3624
+ });
3625
+ C.eles = V.not(Nt), V.nodes().not(":parent").not(Nt).layoutPositions(P, C, J), It.length > 0 && It.forEach(function(vt) {
3626
+ vt.position(J(vt));
3627
+ });
3628
+ } else
3629
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3630
+ }
3631
+ }]), v;
3632
+ })();
3633
+ a.exports = u;
3634
+ })
3635
+ ),
3636
+ /***/
3637
+ 657: (
3638
+ /***/
3639
+ ((a, r, i) => {
3640
+ var f = i(548), e = i(140).layoutBase.Matrix, g = i(140).layoutBase.SVD, t = function(o) {
3641
+ var c = o.cy, h = o.eles, T = h.nodes(), u = h.nodes(":parent"), v = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), C = [], G = [], V = [], Y = [], $ = [], A = [], j = [], n = [], E = void 0, p = 1e8, m = 1e-9, y = o.piTol, S = o.samplingType, O = o.nodeSeparation, F = void 0, W = function() {
3642
+ for (var U = 0, Z = 0, K = !1; Z < F; ) {
3643
+ U = Math.floor(Math.random() * E), K = !1;
3644
+ for (var q = 0; q < Z; q++)
3645
+ if (Y[q] == U) {
3646
+ K = !0;
3647
+ break;
3648
+ }
3649
+ if (!K)
3650
+ Y[Z] = U, Z++;
3651
+ else
3652
+ continue;
3653
+ }
3654
+ }, R = function(U, Z, K) {
3655
+ for (var q = [], at = 0, ct = 0, nt = 0, et = void 0, _ = [], dt = 0, Mt = 1, pt = 0; pt < E; pt++)
3656
+ _[pt] = p;
3657
+ for (q[ct] = U, _[U] = 0; ct >= at; ) {
3658
+ nt = q[at++];
3659
+ for (var xt = C[nt], lt = 0; lt < xt.length; lt++)
3660
+ et = L.get(xt[lt]), _[et] == p && (_[et] = _[nt] + 1, q[++ct] = et);
3661
+ A[nt][Z] = _[nt] * O;
3662
+ }
3663
+ if (K) {
3664
+ for (var ot = 0; ot < E; ot++)
3665
+ A[ot][Z] < $[ot] && ($[ot] = A[ot][Z]);
3666
+ for (var Lt = 0; Lt < E; Lt++)
3667
+ $[Lt] > dt && (dt = $[Lt], Mt = Lt);
3668
+ }
3669
+ return Mt;
3670
+ }, Q = function(U) {
3671
+ var Z = void 0;
3672
+ if (U) {
3673
+ Z = Math.floor(Math.random() * E);
3674
+ for (var q = 0; q < E; q++)
3675
+ $[q] = p;
3676
+ for (var at = 0; at < F; at++)
3677
+ Y[at] = Z, Z = R(Z, at, U);
3678
+ } else {
3679
+ W();
3680
+ for (var K = 0; K < F; K++)
3681
+ R(Y[K], K, U);
3682
+ }
3683
+ for (var ct = 0; ct < E; ct++)
3684
+ for (var nt = 0; nt < F; nt++)
3685
+ A[ct][nt] *= A[ct][nt];
3686
+ for (var et = 0; et < F; et++)
3687
+ j[et] = [];
3688
+ for (var _ = 0; _ < F; _++)
3689
+ for (var dt = 0; dt < F; dt++)
3690
+ j[_][dt] = A[Y[dt]][_];
3691
+ }, z = function() {
3692
+ for (var U = g.svd(j), Z = U.S, K = U.U, q = U.V, at = Z[0] * Z[0] * Z[0], ct = [], nt = 0; nt < F; nt++) {
3693
+ ct[nt] = [];
3694
+ for (var et = 0; et < F; et++)
3695
+ ct[nt][et] = 0, nt == et && (ct[nt][et] = Z[nt] / (Z[nt] * Z[nt] + at / (Z[nt] * Z[nt])));
3696
+ }
3697
+ n = e.multMat(e.multMat(q, ct), e.transpose(K));
3698
+ }, X = function() {
3699
+ for (var U = void 0, Z = void 0, K = [], q = [], at = [], ct = [], nt = 0; nt < E; nt++)
3700
+ K[nt] = Math.random(), q[nt] = Math.random();
3701
+ K = e.normalize(K), q = e.normalize(q);
3702
+ for (var et = m, _ = m, dt = void 0; ; ) {
3703
+ for (var Mt = 0; Mt < E; Mt++)
3704
+ at[Mt] = K[Mt];
3705
+ if (K = e.multGamma(e.multL(e.multGamma(at), A, n)), U = e.dotProduct(at, K), K = e.normalize(K), et = e.dotProduct(at, K), dt = Math.abs(et / _), dt <= 1 + y && dt >= 1)
3706
+ break;
3707
+ _ = et;
3708
+ }
3709
+ for (var pt = 0; pt < E; pt++)
3710
+ at[pt] = K[pt];
3711
+ for (_ = m; ; ) {
3712
+ for (var xt = 0; xt < E; xt++)
3713
+ ct[xt] = q[xt];
3714
+ if (ct = e.minusOp(ct, e.multCons(at, e.dotProduct(at, ct))), q = e.multGamma(e.multL(e.multGamma(ct), A, n)), Z = e.dotProduct(ct, q), q = e.normalize(q), et = e.dotProduct(ct, q), dt = Math.abs(et / _), dt <= 1 + y && dt >= 1)
3715
+ break;
3716
+ _ = et;
3717
+ }
3718
+ for (var lt = 0; lt < E; lt++)
3719
+ ct[lt] = q[lt];
3720
+ G = e.multCons(at, Math.sqrt(Math.abs(U))), V = e.multCons(ct, Math.sqrt(Math.abs(Z)));
3721
+ };
3722
+ f.connectComponents(c, h, f.getTopMostNodes(T), v), u.forEach(function(b) {
3723
+ f.connectComponents(c, h, f.getTopMostNodes(b.descendants().intersection(h)), v);
3724
+ });
3725
+ for (var rt = 0, B = 0; B < T.length; B++)
3726
+ T[B].isParent() || L.set(T[B].id(), rt++);
3727
+ var D = !0, H = !1, k = void 0;
3728
+ try {
3729
+ for (var tt = v.keys()[Symbol.iterator](), ht; !(D = (ht = tt.next()).done); D = !0) {
3730
+ var J = ht.value;
3731
+ L.set(J, rt++);
3732
+ }
3733
+ } catch (b) {
3734
+ H = !0, k = b;
3735
+ } finally {
3736
+ try {
3737
+ !D && tt.return && tt.return();
3738
+ } finally {
3739
+ if (H)
3740
+ throw k;
3741
+ }
3742
+ }
3743
+ for (var It = 0; It < L.size; It++)
3744
+ C[It] = [];
3745
+ u.forEach(function(b) {
3746
+ for (var U = b.children().intersection(h); U.nodes(":childless").length == 0; )
3747
+ U = U.nodes()[0].children().intersection(h);
3748
+ var Z = 0, K = U.nodes(":childless")[0].connectedEdges().length;
3749
+ U.nodes(":childless").forEach(function(q, at) {
3750
+ q.connectedEdges().length < K && (K = q.connectedEdges().length, Z = at);
3751
+ }), P.set(b.id(), U.nodes(":childless")[Z].id());
3752
+ }), T.forEach(function(b) {
3753
+ var U = void 0;
3754
+ b.isParent() ? U = L.get(P.get(b.id())) : U = L.get(b.id()), b.neighborhood().nodes().forEach(function(Z) {
3755
+ h.intersection(b.edgesWith(Z)).length > 0 && (Z.isParent() ? C[U].push(P.get(Z.id())) : C[U].push(Z.id()));
3756
+ });
3757
+ });
3758
+ var Nt = function(U) {
3759
+ var Z = L.get(U), K = void 0;
3760
+ v.get(U).forEach(function(q) {
3761
+ c.getElementById(q).isParent() ? K = P.get(q) : K = q, C[Z].push(K), C[L.get(K)].push(U);
3762
+ });
3763
+ }, vt = !0, it = !1, ut = void 0;
3764
+ try {
3765
+ for (var Et = v.keys()[Symbol.iterator](), wt; !(vt = (wt = Et.next()).done); vt = !0) {
3766
+ var Ot = wt.value;
3767
+ Nt(Ot);
3768
+ }
3769
+ } catch (b) {
3770
+ it = !0, ut = b;
3771
+ } finally {
3772
+ try {
3773
+ !vt && Et.return && Et.return();
3774
+ } finally {
3775
+ if (it)
3776
+ throw ut;
3777
+ }
3778
+ }
3779
+ E = L.size;
3780
+ var mt = void 0;
3781
+ if (E > 2) {
3782
+ F = E < o.sampleSize ? E : o.sampleSize;
3783
+ for (var Dt = 0; Dt < E; Dt++)
3784
+ A[Dt] = [];
3785
+ for (var Rt = 0; Rt < F; Rt++)
3786
+ n[Rt] = [];
3787
+ return o.quality == "draft" || o.step == "all" ? (Q(S), z(), X(), mt = { nodeIndexes: L, xCoords: G, yCoords: V }) : (L.forEach(function(b, U) {
3788
+ G.push(c.getElementById(U).position("x")), V.push(c.getElementById(U).position("y"));
3789
+ }), mt = { nodeIndexes: L, xCoords: G, yCoords: V }), mt;
3790
+ } else {
3791
+ var Ht = L.keys(), Ut = c.getElementById(Ht.next().value), Pt = Ut.position(), Ft = Ut.outerWidth();
3792
+ if (G.push(Pt.x), V.push(Pt.y), E == 2) {
3793
+ var Yt = c.getElementById(Ht.next().value), Vt = Yt.outerWidth();
3794
+ G.push(Pt.x + Ft / 2 + Vt / 2 + o.idealEdgeLength), V.push(Pt.y);
3795
+ }
3796
+ return mt = { nodeIndexes: L, xCoords: G, yCoords: V }, mt;
3797
+ }
3798
+ };
3799
+ a.exports = { spectralLayout: t };
3800
+ })
3801
+ ),
3802
+ /***/
3803
+ 579: (
3804
+ /***/
3805
+ ((a, r, i) => {
3806
+ var f = i(212), e = function(t) {
3807
+ t && t("layout", "fcose", f);
3808
+ };
3809
+ typeof cytoscape < "u" && e(cytoscape), a.exports = e;
3810
+ })
3811
+ ),
3812
+ /***/
3813
+ 140: (
3814
+ /***/
3815
+ ((a) => {
3816
+ a.exports = w;
3817
+ })
3818
+ )
3819
+ /******/
3820
+ }, N = {};
3821
+ function d(a) {
3822
+ var r = N[a];
3823
+ if (r !== void 0)
3824
+ return r.exports;
3825
+ var i = N[a] = {
3826
+ /******/
3827
+ // no module.id needed
3828
+ /******/
3829
+ // no module.loaded needed
3830
+ /******/
3831
+ exports: {}
3832
+ /******/
3833
+ };
3834
+ return x[a](i, i.exports, d), i.exports;
3835
+ }
3836
+ var l = d(579);
3837
+ return l;
3838
+ })()
3839
+ );
3840
+ });
3841
+ })(he)), he.exports;
3842
+ }
3843
+ var Er = mr();
3844
+ const Tr = /* @__PURE__ */ gr(Er);
3845
+ var Ie = {
3846
+ L: "left",
3847
+ R: "right",
3848
+ T: "top",
3849
+ B: "bottom"
3850
+ }, Re = {
3851
+ L: /* @__PURE__ */ gt((I) => `${I},${I / 2} 0,${I} 0,0`, "L"),
3852
+ R: /* @__PURE__ */ gt((I) => `0,${I / 2} ${I},0 ${I},${I}`, "R"),
3853
+ T: /* @__PURE__ */ gt((I) => `0,0 ${I},0 ${I / 2},${I}`, "T"),
3854
+ B: /* @__PURE__ */ gt((I) => `${I / 2},0 ${I},${I} 0,${I}`, "B")
3855
+ }, se = {
3856
+ L: /* @__PURE__ */ gt((I, M) => I - M + 2, "L"),
3857
+ R: /* @__PURE__ */ gt((I, M) => I - 2, "R"),
3858
+ T: /* @__PURE__ */ gt((I, M) => I - M + 2, "T"),
3859
+ B: /* @__PURE__ */ gt((I, M) => I - 2, "B")
3860
+ }, Nr = /* @__PURE__ */ gt(function(I) {
3861
+ return Wt(I) ? I === "L" ? "R" : "L" : I === "T" ? "B" : "T";
3862
+ }, "getOppositeArchitectureDirection"), Se = /* @__PURE__ */ gt(function(I) {
3863
+ const M = I;
3864
+ return M === "L" || M === "R" || M === "T" || M === "B";
3865
+ }, "isArchitectureDirection"), Wt = /* @__PURE__ */ gt(function(I) {
3866
+ const M = I;
3867
+ return M === "L" || M === "R";
3868
+ }, "isArchitectureDirectionX"), qt = /* @__PURE__ */ gt(function(I) {
3869
+ const M = I;
3870
+ return M === "T" || M === "B";
3871
+ }, "isArchitectureDirectionY"), Ne = /* @__PURE__ */ gt(function(I, M) {
3872
+ const w = Wt(I) && qt(M), x = qt(I) && Wt(M);
3873
+ return w || x;
3874
+ }, "isArchitectureDirectionXY"), Lr = /* @__PURE__ */ gt(function(I) {
3875
+ const M = I[0], w = I[1], x = Wt(M) && qt(w), N = qt(M) && Wt(w);
3876
+ return x || N;
3877
+ }, "isArchitecturePairXY"), Cr = /* @__PURE__ */ gt(function(I) {
3878
+ return I !== "LL" && I !== "RR" && I !== "TT" && I !== "BB";
3879
+ }, "isValidArchitectureDirectionPair"), ye = /* @__PURE__ */ gt(function(I, M) {
3880
+ const w = `${I}${M}`;
3881
+ return Cr(w) ? w : void 0;
3882
+ }, "getArchitectureDirectionPair"), wr = /* @__PURE__ */ gt(function([I, M], w) {
3883
+ const x = w[0], N = w[1];
3884
+ return Wt(x) ? qt(N) ? [I + (x === "L" ? -1 : 1), M + (N === "T" ? 1 : -1)] : [I + (x === "L" ? -1 : 1), M] : Wt(N) ? [I + (N === "L" ? 1 : -1), M + (x === "T" ? 1 : -1)] : [I, M + (x === "T" ? 1 : -1)];
3885
+ }, "shiftPositionByArchitectureDirectionPair"), Mr = /* @__PURE__ */ gt(function(I) {
3886
+ return I === "LT" || I === "TL" ? [1, 1] : I === "BL" || I === "LB" ? [1, -1] : I === "BR" || I === "RB" ? [-1, -1] : [-1, 1];
3887
+ }, "getArchitectureDirectionXYFactors"), Ar = /* @__PURE__ */ gt(function(I, M) {
3888
+ return Ne(I, M) ? "bend" : Wt(I) ? "horizontal" : "vertical";
3889
+ }, "getArchitectureDirectionAlignment"), Or = /* @__PURE__ */ gt(function(I) {
3890
+ return I.type === "service";
3891
+ }, "isArchitectureService"), Dr = /* @__PURE__ */ gt(function(I) {
3892
+ return I.type === "junction";
3893
+ }, "isArchitectureJunction"), Pe = /* @__PURE__ */ gt((I) => I.data(), "edgeData"), ie = /* @__PURE__ */ gt((I) => I.data(), "nodeData"), xr = nr.architecture, ae, Ge = (ae = class {
3894
+ constructor() {
3895
+ this.nodes = {}, this.groups = {}, this.edges = [], this.layoutHints = [], this.registeredIds = {}, this.elements = {}, this.diagramId = "", this.setAccTitle = Je, this.getAccTitle = Ke, this.setDiagramTitle = je, this.getDiagramTitle = _e, this.getAccDescription = tr, this.setAccDescription = er, this.clear();
3896
+ }
3897
+ setDiagramId(M) {
3898
+ this.diagramId = M;
3899
+ }
3900
+ getDiagramId() {
3901
+ return this.diagramId;
3902
+ }
3903
+ clear() {
3904
+ this.nodes = {}, this.groups = {}, this.edges = [], this.layoutHints = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", rr();
3905
+ }
3906
+ addService({
3907
+ id: M,
3908
+ icon: w,
3909
+ in: x,
3910
+ title: N,
3911
+ iconText: d
3912
+ }) {
3913
+ if (this.registeredIds[M] !== void 0)
3914
+ throw new Error(
3915
+ `The service id [${M}] is already in use by another ${this.registeredIds[M]}`
3916
+ );
3917
+ if (x !== void 0) {
3918
+ if (M === x)
3919
+ throw new Error(`The service [${M}] cannot be placed within itself`);
3920
+ if (this.registeredIds[x] === void 0)
3921
+ throw new Error(
3922
+ `The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`
3923
+ );
3924
+ if (this.registeredIds[x] === "node")
3925
+ throw new Error(`The service [${M}]'s parent is not a group`);
3926
+ }
3927
+ this.registeredIds[M] = "node", this.nodes[M] = {
3928
+ id: M,
3929
+ type: "service",
3930
+ icon: w,
3931
+ iconText: d,
3932
+ title: N,
3933
+ edges: [],
3934
+ in: x
3935
+ };
3936
+ }
3937
+ getServices() {
3938
+ return Object.values(this.nodes).filter(Or);
3939
+ }
3940
+ addJunction({ id: M, in: w }) {
3941
+ if (this.registeredIds[M] !== void 0)
3942
+ throw new Error(
3943
+ `The junction id [${M}] is already in use by another ${this.registeredIds[M]}`
3944
+ );
3945
+ if (w !== void 0) {
3946
+ if (M === w)
3947
+ throw new Error(`The junction [${M}] cannot be placed within itself`);
3948
+ if (this.registeredIds[w] === void 0)
3949
+ throw new Error(
3950
+ `The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`
3951
+ );
3952
+ if (this.registeredIds[w] === "node")
3953
+ throw new Error(`The junction [${M}]'s parent is not a group`);
3954
+ }
3955
+ this.registeredIds[M] = "node", this.nodes[M] = {
3956
+ id: M,
3957
+ type: "junction",
3958
+ edges: [],
3959
+ in: w
3960
+ };
3961
+ }
3962
+ getJunctions() {
3963
+ return Object.values(this.nodes).filter(Dr);
3964
+ }
3965
+ getNodes() {
3966
+ return Object.values(this.nodes);
3967
+ }
3968
+ getNode(M) {
3969
+ return this.nodes[M] ?? null;
3970
+ }
3971
+ addGroup({ id: M, icon: w, in: x, title: N }) {
3972
+ var d, l, a;
3973
+ if (((d = this.registeredIds) == null ? void 0 : d[M]) !== void 0)
3974
+ throw new Error(
3975
+ `The group id [${M}] is already in use by another ${this.registeredIds[M]}`
3976
+ );
3977
+ if (x !== void 0) {
3978
+ if (M === x)
3979
+ throw new Error(`The group [${M}] cannot be placed within itself`);
3980
+ if (((l = this.registeredIds) == null ? void 0 : l[x]) === void 0)
3981
+ throw new Error(
3982
+ `The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`
3983
+ );
3984
+ if (((a = this.registeredIds) == null ? void 0 : a[x]) === "node")
3985
+ throw new Error(`The group [${M}]'s parent is not a group`);
3986
+ }
3987
+ this.registeredIds[M] = "group", this.groups[M] = {
3988
+ id: M,
3989
+ icon: w,
3990
+ title: N,
3991
+ in: x
3992
+ };
3993
+ }
3994
+ getGroups() {
3995
+ return Object.values(this.groups);
3996
+ }
3997
+ addEdge({
3998
+ lhsId: M,
3999
+ rhsId: w,
4000
+ lhsDir: x,
4001
+ rhsDir: N,
4002
+ lhsInto: d,
4003
+ rhsInto: l,
4004
+ lhsGroup: a,
4005
+ rhsGroup: r,
4006
+ title: i
4007
+ }) {
4008
+ if (!Se(x))
4009
+ throw new Error(
4010
+ `Invalid direction given for left hand side of edge ${M}--${w}. Expected (L,R,T,B) got ${String(x)}`
4011
+ );
4012
+ if (!Se(N))
4013
+ throw new Error(
4014
+ `Invalid direction given for right hand side of edge ${M}--${w}. Expected (L,R,T,B) got ${String(N)}`
4015
+ );
4016
+ if (this.nodes[M] === void 0 && this.groups[M] === void 0)
4017
+ throw new Error(
4018
+ `The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`
4019
+ );
4020
+ if (this.nodes[w] === void 0 && this.groups[w] === void 0)
4021
+ throw new Error(
4022
+ `The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`
4023
+ );
4024
+ const f = this.nodes[M].in, e = this.nodes[w].in;
4025
+ if (a && f && e && f == e)
4026
+ throw new Error(
4027
+ `The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
4028
+ );
4029
+ if (r && f && e && f == e)
4030
+ throw new Error(
4031
+ `The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
4032
+ );
4033
+ const g = {
4034
+ lhsId: M,
4035
+ lhsDir: x,
4036
+ lhsInto: d,
4037
+ lhsGroup: a,
4038
+ rhsId: w,
4039
+ rhsDir: N,
4040
+ rhsInto: l,
4041
+ rhsGroup: r,
4042
+ title: i
4043
+ };
4044
+ this.edges.push(g), this.nodes[M] && this.nodes[w] && (this.nodes[M].edges.push(this.edges[this.edges.length - 1]), this.nodes[w].edges.push(this.edges[this.edges.length - 1]));
4045
+ }
4046
+ getEdges() {
4047
+ return this.edges;
4048
+ }
4049
+ addLayoutHint(M) {
4050
+ if (M.members.length < 2)
4051
+ throw new Error(
4052
+ `An align directive requires at least two members; got ${M.members.length}`
4053
+ );
4054
+ const w = /* @__PURE__ */ new Set();
4055
+ M.members.forEach((x) => {
4056
+ if (this.registeredIds[x] !== "node")
4057
+ throw new Error(
4058
+ `align ${M.direction} references [${x}], which is not a service or junction`
4059
+ );
4060
+ if (w.has(x))
4061
+ throw new Error(`align ${M.direction} lists [${x}] more than once`);
4062
+ w.add(x);
4063
+ }), this.layoutHints.push(M);
4064
+ }
4065
+ getLayoutHints() {
4066
+ return this.layoutHints;
4067
+ }
4068
+ /**
4069
+ * Returns the current diagram's adjacency list, spatial map, & group alignments.
4070
+ * If they have not been created, run the algorithms to generate them.
4071
+ * @returns
4072
+ */
4073
+ getDataStructures() {
4074
+ if (this.dataStructures === void 0) {
4075
+ const M = {}, w = Object.entries(this.nodes).reduce((r, [i, f]) => (r[i] = f.edges.reduce((e, g) => {
4076
+ var o, c;
4077
+ const t = (o = this.getNode(g.lhsId)) == null ? void 0 : o.in, s = (c = this.getNode(g.rhsId)) == null ? void 0 : c.in;
4078
+ if (t && s && t !== s) {
4079
+ const h = Ar(g.lhsDir, g.rhsDir);
4080
+ h !== "bend" && (M[t] ?? (M[t] = {}), M[t][s] = h, M[s] ?? (M[s] = {}), M[s][t] = h);
4081
+ }
4082
+ if (g.lhsId === i) {
4083
+ const h = ye(g.lhsDir, g.rhsDir);
4084
+ h && (e[h] = g.rhsId);
4085
+ } else {
4086
+ const h = ye(g.rhsDir, g.lhsDir);
4087
+ h && (e[h] = g.lhsId);
4088
+ }
4089
+ return e;
4090
+ }, {}), r), {}), x = Object.keys(w)[0], N = { [x]: 1 }, d = Object.keys(w).reduce(
4091
+ (r, i) => i === x ? r : { ...r, [i]: 1 },
4092
+ {}
4093
+ ), l = /* @__PURE__ */ gt((r) => {
4094
+ const i = { [r]: [0, 0] }, f = [r];
4095
+ for (; f.length > 0; ) {
4096
+ const e = f.shift();
4097
+ if (e) {
4098
+ N[e] = 1, delete d[e];
4099
+ const g = w[e], [t, s] = i[e];
4100
+ Object.entries(g).forEach(([o, c]) => {
4101
+ N[c] || (i[c] = wr(
4102
+ [t, s],
4103
+ o
4104
+ ), f.push(c));
4105
+ });
4106
+ }
4107
+ }
4108
+ return i;
4109
+ }, "BFS"), a = [l(x)];
4110
+ for (; Object.keys(d).length > 0; )
4111
+ a.push(l(Object.keys(d)[0]));
4112
+ this.dataStructures = {
4113
+ adjList: w,
4114
+ spatialMaps: a,
4115
+ groupAlignments: M
4116
+ };
4117
+ }
4118
+ return this.dataStructures;
4119
+ }
4120
+ setElementForId(M, w) {
4121
+ this.elements[M] = w;
4122
+ }
4123
+ getElementById(M) {
4124
+ return this.elements[M];
4125
+ }
4126
+ getConfig() {
4127
+ return ir({
4128
+ ...xr,
4129
+ ...ar().architecture
4130
+ });
4131
+ }
4132
+ getConfigField(M) {
4133
+ return this.getConfig()[M];
4134
+ }
4135
+ }, gt(ae, "ArchitectureDB"), ae), Ir = /* @__PURE__ */ gt((I, M) => {
4136
+ var w;
4137
+ Ze(I, M), I.groups.map((x) => M.addGroup(x)), I.services.map((x) => M.addService({ ...x, type: "service" })), I.junctions.map((x) => M.addJunction({ ...x, type: "junction" })), I.edges.map((x) => M.addEdge(x)), (w = I.alignments) == null || w.map(
4138
+ (x) => M.addLayoutHint({ direction: x.direction, members: [...x.members] })
4139
+ );
4140
+ }, "populateDb"), Ue = {
4141
+ parser: {
4142
+ // @ts-expect-error - ArchitectureDB is not assignable to DiagramDB
4143
+ yy: void 0
4144
+ },
4145
+ parse: /* @__PURE__ */ gt(async (I) => {
4146
+ var x;
4147
+ const M = await cr("architecture", I);
4148
+ Fe.debug(M);
4149
+ const w = (x = Ue.parser) == null ? void 0 : x.yy;
4150
+ if (!(w instanceof Ge))
4151
+ throw new Error(
4152
+ "parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
4153
+ );
4154
+ Ir(M, w);
4155
+ }, "parse")
4156
+ }, Rr = /* @__PURE__ */ gt((I) => `
4157
+ .edge {
4158
+ stroke-width: ${I.archEdgeWidth};
4159
+ stroke: ${I.archEdgeColor};
4160
+ fill: none;
4161
+ }
4162
+
4163
+ .arrow {
4164
+ fill: ${I.archEdgeArrowColor};
4165
+ }
4166
+
4167
+ .node-bkg {
4168
+ fill: none;
4169
+ stroke: ${I.archGroupBorderColor};
4170
+ stroke-width: ${I.archGroupBorderWidth};
4171
+ stroke-dasharray: 8;
4172
+ }
4173
+ .node-icon-text {
4174
+ display: flex;
4175
+ align-items: center;
4176
+ }
4177
+
4178
+ .node-icon-text > div {
4179
+ color: #fff;
4180
+ margin: 1px;
4181
+ height: fit-content;
4182
+ text-align: center;
4183
+ overflow: hidden;
4184
+ display: -webkit-box;
4185
+ -webkit-box-orient: vertical;
4186
+ }
4187
+ `, "getStyles"), Sr = Rr;
4188
+ function me(I, M) {
4189
+ if (I === 0)
4190
+ return M();
4191
+ const w = Math.random;
4192
+ let x = I >>> 0;
4193
+ Math.random = function() {
4194
+ x = x + 1831565813 >>> 0;
4195
+ let N = x;
4196
+ return N = Math.imul(N ^ N >>> 15, N | 1), N ^= N + Math.imul(N ^ N >>> 7, N | 61), ((N ^ N >>> 14) >>> 0) / 4294967296;
4197
+ };
4198
+ try {
4199
+ return M();
4200
+ } finally {
4201
+ Math.random = w;
4202
+ }
4203
+ }
4204
+ gt(me, "withSeededRandom");
4205
+ var re = /* @__PURE__ */ gt((I) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${I}</g>`, "wrapIcon"), ne = {
4206
+ prefix: "mermaid-architecture",
4207
+ height: 80,
4208
+ width: 80,
4209
+ icons: {
4210
+ database: {
4211
+ body: re(
4212
+ '<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4213
+ )
4214
+ },
4215
+ server: {
4216
+ body: re(
4217
+ '<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>'
4218
+ )
4219
+ },
4220
+ disk: {
4221
+ body: re(
4222
+ '<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>'
4223
+ )
4224
+ },
4225
+ internet: {
4226
+ body: re(
4227
+ '<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4228
+ )
4229
+ },
4230
+ cloud: {
4231
+ body: re(
4232
+ '<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4233
+ )
4234
+ },
4235
+ unknown: fr,
4236
+ blank: {
4237
+ body: re("")
4238
+ }
4239
+ }
4240
+ }, Fr = /* @__PURE__ */ gt(async function(I, M, w, x) {
4241
+ const N = w.getConfigField("padding"), d = w.getConfigField("iconSize"), l = d / 2, a = d / 6, r = a / 2;
4242
+ await Promise.all(
4243
+ M.edges().map(async (i) => {
4244
+ var Y, $;
4245
+ const {
4246
+ source: f,
4247
+ sourceDir: e,
4248
+ sourceArrow: g,
4249
+ sourceGroup: t,
4250
+ target: s,
4251
+ targetDir: o,
4252
+ targetArrow: c,
4253
+ targetGroup: h,
4254
+ label: T
4255
+ } = Pe(i);
4256
+ let { x: u, y: v } = i[0].sourceEndpoint();
4257
+ const { x: L, y: P } = i[0].midpoint();
4258
+ let { x: C, y: G } = i[0].targetEndpoint();
4259
+ const V = N + 4;
4260
+ if (t && (Wt(e) ? u += e === "L" ? -V : V : v += e === "T" ? -V : V + 18), h && (Wt(o) ? C += o === "L" ? -V : V : G += o === "T" ? -V : V + 18), !t && ((Y = w.getNode(f)) == null ? void 0 : Y.type) === "junction" && (Wt(e) ? u += e === "L" ? l : -l : v += e === "T" ? l : -l), !h && (($ = w.getNode(s)) == null ? void 0 : $.type) === "junction" && (Wt(o) ? C += o === "L" ? l : -l : G += o === "T" ? l : -l), i[0]._private.rscratch) {
4261
+ const A = I.insert("g");
4262
+ if (A.insert("path").attr("d", `M ${u},${v} L ${L},${P} L${C},${G} `).attr("class", "edge").attr("id", `${x}-${hr(f, s, { prefix: "L" })}`), g) {
4263
+ const j = Wt(e) ? se[e](u, a) : u - r, n = qt(e) ? se[e](v, a) : v - r;
4264
+ A.insert("polygon").attr("points", Re[e](a)).attr("transform", `translate(${j},${n})`).attr("class", "arrow");
4265
+ }
4266
+ if (c) {
4267
+ const j = Wt(o) ? se[o](C, a) : C - r, n = qt(o) ? se[o](G, a) : G - r;
4268
+ A.insert("polygon").attr("points", Re[o](a)).attr("transform", `translate(${j},${n})`).attr("class", "arrow");
4269
+ }
4270
+ if (T) {
4271
+ const j = Ne(e, o) ? "XY" : Wt(e) ? "X" : "Y";
4272
+ let n = 0;
4273
+ j === "X" ? n = Math.abs(u - C) : j === "Y" ? n = Math.abs(v - G) / 1.5 : n = Math.abs(u - C) / 2;
4274
+ const E = A.append("g");
4275
+ if (await Te(
4276
+ E,
4277
+ T,
4278
+ {
4279
+ useHtmlLabels: !1,
4280
+ width: n,
4281
+ classes: "architecture-service-label"
4282
+ },
4283
+ Ee()
4284
+ ), E.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), j === "X")
4285
+ E.attr("transform", "translate(" + L + ", " + P + ")");
4286
+ else if (j === "Y")
4287
+ E.attr("transform", "translate(" + L + ", " + P + ") rotate(-90)");
4288
+ else if (j === "XY") {
4289
+ const p = ye(e, o);
4290
+ if (p && Lr(p)) {
4291
+ const m = E.node().getBoundingClientRect(), [y, S] = Mr(p);
4292
+ E.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * y * S * 45})`);
4293
+ const O = E.node().getBoundingClientRect();
4294
+ E.attr(
4295
+ "transform",
4296
+ `
4297
+ translate(${L}, ${P - m.height / 2})
4298
+ translate(${y * O.width / 2}, ${S * O.height / 2})
4299
+ rotate(${-1 * y * S * 45}, 0, ${m.height / 2})
4300
+ `
4301
+ );
4302
+ }
4303
+ }
4304
+ }
4305
+ }
4306
+ })
4307
+ );
4308
+ }, "drawEdges"), br = /* @__PURE__ */ gt(async function(I, M, w, x) {
4309
+ const d = w.getConfigField("padding") * 0.75, l = w.getConfigField("fontSize"), r = w.getConfigField("iconSize") / 2;
4310
+ await Promise.all(
4311
+ M.nodes().map(async (i) => {
4312
+ const f = ie(i);
4313
+ if (f.type === "group") {
4314
+ const { h: e, w: g, x1: t, y1: s } = i.boundingBox(), o = I.append("rect");
4315
+ o.attr("id", `${x}-group-${f.id}`).attr("x", t + r).attr("y", s + r).attr("width", g).attr("height", e).attr("class", "node-bkg");
4316
+ const c = I.append("g");
4317
+ let h = t, T = s;
4318
+ if (f.icon) {
4319
+ const u = c.append("g");
4320
+ u.html(
4321
+ `<g>${await pe(f.icon, { height: d, width: d, fallbackPrefix: ne.prefix })}</g>`
4322
+ ), u.attr(
4323
+ "transform",
4324
+ "translate(" + (h + r + 1) + ", " + (T + r + 1) + ")"
4325
+ ), h += d, T += l / 2 - 1 - 2;
4326
+ }
4327
+ if (f.label) {
4328
+ const u = c.append("g");
4329
+ await Te(
4330
+ u,
4331
+ f.label,
4332
+ {
4333
+ useHtmlLabels: !1,
4334
+ width: g,
4335
+ classes: "architecture-service-label"
4336
+ },
4337
+ Ee()
4338
+ ), u.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), u.attr(
4339
+ "transform",
4340
+ "translate(" + (h + r + 4) + ", " + (T + r + 2) + ")"
4341
+ );
4342
+ }
4343
+ w.setElementForId(f.id, o);
4344
+ }
4345
+ })
4346
+ );
4347
+ }, "drawGroups"), Pr = /* @__PURE__ */ gt(async function(I, M, w, x) {
4348
+ const N = Ee();
4349
+ for (const d of w) {
4350
+ const l = M.append("g"), a = I.getConfigField("iconSize");
4351
+ if (d.title) {
4352
+ const e = l.append("g");
4353
+ await Te(
4354
+ e,
4355
+ d.title,
4356
+ {
4357
+ useHtmlLabels: !1,
4358
+ width: a * 1.5,
4359
+ classes: "architecture-service-label"
4360
+ },
4361
+ N
4362
+ ), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + a / 2 + ", " + a + ")");
4363
+ }
4364
+ const r = l.append("g");
4365
+ if (d.icon)
4366
+ r.html(
4367
+ `<g>${await pe(d.icon, { height: a, width: a, fallbackPrefix: ne.prefix })}</g>`
4368
+ );
4369
+ else if (d.iconText) {
4370
+ r.html(
4371
+ `<g>${await pe("blank", { height: a, width: a, fallbackPrefix: ne.prefix })}</g>`
4372
+ );
4373
+ const t = r.append("g").append("foreignObject").attr("width", a).attr("height", a).append("div").attr("class", "node-icon-text").attr("style", `height: ${a}px;`).append("div").html(or(d.iconText, N)), s = parseInt(
4374
+ window.getComputedStyle(t.node(), null).getPropertyValue("font-size").replace(/\D/g, "")
4375
+ ) ?? 16;
4376
+ t.attr("style", `-webkit-line-clamp: ${Math.floor((a - 2) / s)};`);
4377
+ } else
4378
+ r.append("path").attr("class", "node-bkg").attr("id", `${x}-node-${d.id}`).attr(
4379
+ "d",
4380
+ `M0,${a} V5 Q0,0 5,0 H${a - 5} Q${a},0 ${a},5 V${a} Z`
4381
+ );
4382
+ l.attr("id", `${x}-service-${d.id}`).attr("class", "architecture-service");
4383
+ const { width: i, height: f } = l.node().getBBox();
4384
+ d.width = i, d.height = f, I.setElementForId(d.id, l);
4385
+ }
4386
+ return 0;
4387
+ }, "drawServices"), Gr = /* @__PURE__ */ gt(function(I, M, w, x) {
4388
+ w.forEach((N) => {
4389
+ const d = M.append("g"), l = I.getConfigField("iconSize");
4390
+ d.append("g").append("rect").attr("id", `${x}-node-${N.id}`).attr("fill-opacity", "0").attr("width", l).attr("height", l), d.attr("class", "architecture-junction");
4391
+ const { width: r, height: i } = d._groups[0][0].getBBox();
4392
+ d.width = r, d.height = i, I.setElementForId(N.id, d);
4393
+ });
4394
+ }, "drawJunctions");
4395
+ lr([
4396
+ {
4397
+ name: ne.prefix,
4398
+ icons: ne
4399
+ }
4400
+ ]);
4401
+ be.use(Tr);
4402
+ function Ye(I, M, w) {
4403
+ I.forEach((x) => {
4404
+ M.add({
4405
+ group: "nodes",
4406
+ data: {
4407
+ type: "service",
4408
+ id: x.id,
4409
+ icon: x.icon,
4410
+ label: x.title,
4411
+ parent: x.in,
4412
+ width: w.getConfigField("iconSize"),
4413
+ height: w.getConfigField("iconSize")
4414
+ },
4415
+ classes: "node-service"
4416
+ });
4417
+ });
4418
+ }
4419
+ gt(Ye, "addServices");
4420
+ function Xe(I, M, w) {
4421
+ I.forEach((x) => {
4422
+ M.add({
4423
+ group: "nodes",
4424
+ data: {
4425
+ type: "junction",
4426
+ id: x.id,
4427
+ parent: x.in,
4428
+ width: w.getConfigField("iconSize"),
4429
+ height: w.getConfigField("iconSize")
4430
+ },
4431
+ classes: "node-junction"
4432
+ });
4433
+ });
4434
+ }
4435
+ gt(Xe, "addJunctions");
4436
+ function He(I, M) {
4437
+ M.nodes().map((w) => {
4438
+ const x = ie(w);
4439
+ if (x.type === "group")
4440
+ return;
4441
+ x.x = w.position().x, x.y = w.position().y, I.getElementById(x.id).attr("transform", "translate(" + (x.x || 0) + "," + (x.y || 0) + ")");
4442
+ });
4443
+ }
4444
+ gt(He, "positionNodes");
4445
+ function We(I, M) {
4446
+ I.forEach((w) => {
4447
+ M.add({
4448
+ group: "nodes",
4449
+ data: {
4450
+ type: "group",
4451
+ id: w.id,
4452
+ icon: w.icon,
4453
+ label: w.title,
4454
+ parent: w.in
4455
+ },
4456
+ classes: "node-group"
4457
+ });
4458
+ });
4459
+ }
4460
+ gt(We, "addGroups");
4461
+ function Ve(I, M) {
4462
+ I.forEach((w) => {
4463
+ const { lhsId: x, rhsId: N, lhsInto: d, lhsGroup: l, rhsInto: a, lhsDir: r, rhsDir: i, rhsGroup: f, title: e } = w, g = Ne(w.lhsDir, w.rhsDir) ? "segments" : "straight", t = {
4464
+ id: `${x}-${N}`,
4465
+ label: e,
4466
+ source: x,
4467
+ sourceDir: r,
4468
+ sourceArrow: d,
4469
+ sourceGroup: l,
4470
+ sourceEndpoint: r === "L" ? "0 50%" : r === "R" ? "100% 50%" : r === "T" ? "50% 0" : "50% 100%",
4471
+ target: N,
4472
+ targetDir: i,
4473
+ targetArrow: a,
4474
+ targetGroup: f,
4475
+ targetEndpoint: i === "L" ? "0 50%" : i === "R" ? "100% 50%" : i === "T" ? "50% 0" : "50% 100%"
4476
+ };
4477
+ M.add({
4478
+ group: "edges",
4479
+ data: t,
4480
+ classes: g
4481
+ });
4482
+ });
4483
+ }
4484
+ gt(Ve, "addEdges");
4485
+ function ze(I, M, w, x = []) {
4486
+ const N = /* @__PURE__ */ gt((g, t) => Object.entries(g).reduce(
4487
+ (s, [o, c]) => {
4488
+ var u;
4489
+ let h = 0;
4490
+ const T = Object.entries(c);
4491
+ if (T.length === 1)
4492
+ return s[o] = T[0][1], s;
4493
+ for (let v = 0; v < T.length - 1; v++)
4494
+ for (let L = v + 1; L < T.length; L++) {
4495
+ const [P, C] = T[v], [G, V] = T[L];
4496
+ if (((u = w[P]) == null ? void 0 : u[G]) === t)
4497
+ s[o] ?? (s[o] = []), s[o] = [...s[o], ...C, ...V];
4498
+ else if (P === "default" || G === "default")
4499
+ s[o] ?? (s[o] = []), s[o] = [...s[o], ...C, ...V];
4500
+ else {
4501
+ const $ = `${o}-${h++}`;
4502
+ s[$] = C;
4503
+ const A = `${o}-${h++}`;
4504
+ s[A] = V;
4505
+ }
4506
+ }
4507
+ return s;
4508
+ },
4509
+ {}
4510
+ ), "flattenAlignments"), d = M.map((g) => {
4511
+ const t = {}, s = {};
4512
+ return Object.entries(g).forEach(([o, [c, h]]) => {
4513
+ var u, v, L;
4514
+ const T = ((u = I.getNode(o)) == null ? void 0 : u.in) ?? "default";
4515
+ t[h] ?? (t[h] = {}), (v = t[h])[T] ?? (v[T] = []), t[h][T].push(o), s[c] ?? (s[c] = {}), (L = s[c])[T] ?? (L[T] = []), s[c][T].push(o);
4516
+ }), {
4517
+ horiz: Object.values(N(t, "horizontal")).filter(
4518
+ (o) => o.length > 1
4519
+ ),
4520
+ vert: Object.values(N(s, "vertical")).filter(
4521
+ (o) => o.length > 1
4522
+ )
4523
+ };
4524
+ }), [l, a] = d.reduce(
4525
+ ([g, t], { horiz: s, vert: o }) => [
4526
+ [...g, ...s],
4527
+ [...t, ...o]
4528
+ ],
4529
+ [[], []]
4530
+ ), r = /* @__PURE__ */ new Set();
4531
+ x.forEach((g) => g.members.forEach((t) => r.add(t)));
4532
+ const i = /* @__PURE__ */ gt((g) => g.filter((t) => !t.some((s) => r.has(s))), "dropOverlapping"), f = i(l), e = i(a);
4533
+ return x.forEach((g) => {
4534
+ g.members.length < 2 || (g.direction === "row" ? f.push([...g.members]) : e.push([...g.members]));
4535
+ }), {
4536
+ horizontal: f,
4537
+ vertical: e
4538
+ };
4539
+ }
4540
+ gt(ze, "getAlignments");
4541
+ function Be(I, M, w = []) {
4542
+ const x = [], N = M.getConfigField("iconSize"), d = M.getConfigField("idealEdgeLengthMultiplier"), l = d * N, a = /* @__PURE__ */ new Set();
4543
+ w.forEach((f) => {
4544
+ for (let e = 0; e < f.members.length - 1; e++) {
4545
+ const g = f.members[e], t = f.members[e + 1];
4546
+ a.add(`${g}|${t}`), a.add(`${t}|${g}`), f.direction === "row" ? x.push({ left: g, right: t, gap: l }) : x.push({ top: g, bottom: t, gap: l });
4547
+ }
4548
+ });
4549
+ const r = /* @__PURE__ */ gt((f) => `${f[0]},${f[1]}`, "posToStr"), i = /* @__PURE__ */ gt((f) => f.split(",").map((e) => parseInt(e)), "strToPos");
4550
+ return I.forEach((f) => {
4551
+ const e = Object.fromEntries(
4552
+ Object.entries(f).map(([o, c]) => [r(c), o])
4553
+ ), g = [r([0, 0])], t = {}, s = {
4554
+ L: [-1, 0],
4555
+ R: [1, 0],
4556
+ T: [0, 1],
4557
+ B: [0, -1]
4558
+ };
4559
+ for (; g.length > 0; ) {
4560
+ const o = g.shift();
4561
+ if (o) {
4562
+ t[o] = 1;
4563
+ const c = e[o];
4564
+ if (c) {
4565
+ const h = i(o);
4566
+ Object.entries(s).forEach(([T, u]) => {
4567
+ const v = r([h[0] + u[0], h[1] + u[1]]), L = e[v];
4568
+ if (L && !t[v]) {
4569
+ if (g.push(v), a.has(`${c}|${L}`))
4570
+ return;
4571
+ x.push({
4572
+ [Ie[T]]: L,
4573
+ [Ie[Nr(T)]]: c,
4574
+ gap: d * N
4575
+ });
4576
+ }
4577
+ });
4578
+ }
4579
+ }
4580
+ }
4581
+ }), x;
4582
+ }
4583
+ gt(Be, "getRelativeConstraints");
4584
+ function $e(I, M, w, x, N, { spatialMaps: d, groupAlignments: l }) {
4585
+ return new Promise((a) => {
4586
+ const r = sr("body").append("div").attr("id", "cy").attr("style", "display:none"), i = be({
4587
+ container: document.getElementById("cy"),
4588
+ style: [
4589
+ {
4590
+ selector: "edge",
4591
+ style: {
4592
+ "curve-style": "straight",
4593
+ "source-endpoint": "data(sourceEndpoint)",
4594
+ "target-endpoint": "data(targetEndpoint)"
4595
+ }
4596
+ },
4597
+ {
4598
+ selector: "edge[label]",
4599
+ style: {
4600
+ label: "data(label)"
4601
+ }
4602
+ },
4603
+ {
4604
+ selector: "edge.segments",
4605
+ style: {
4606
+ "curve-style": "segments",
4607
+ "segment-weights": "0",
4608
+ "segment-distances": [0.5],
4609
+ // @ts-ignore Incorrect library types
4610
+ "edge-distances": "endpoints",
4611
+ "source-endpoint": "data(sourceEndpoint)",
4612
+ "target-endpoint": "data(targetEndpoint)"
4613
+ }
4614
+ },
4615
+ {
4616
+ selector: "node",
4617
+ style: {
4618
+ // @ts-ignore Incorrect library types
4619
+ "compound-sizing-wrt-labels": "include"
4620
+ }
4621
+ },
4622
+ {
4623
+ selector: "node[label]",
4624
+ style: {
4625
+ "text-valign": "bottom",
4626
+ "text-halign": "center",
4627
+ "font-size": `${N.getConfigField("fontSize")}px`
4628
+ }
4629
+ },
4630
+ {
4631
+ selector: ".node-service",
4632
+ style: {
4633
+ label: "data(label)",
4634
+ width: "data(width)",
4635
+ height: "data(height)"
4636
+ }
4637
+ },
4638
+ {
4639
+ selector: ".node-junction",
4640
+ style: {
4641
+ width: "data(width)",
4642
+ height: "data(height)"
4643
+ }
4644
+ },
4645
+ {
4646
+ selector: ".node-group",
4647
+ style: {
4648
+ // @ts-ignore Incorrect library types
4649
+ padding: `${N.getConfigField("padding")}px`
4650
+ }
4651
+ }
4652
+ ],
4653
+ layout: {
4654
+ name: "grid",
4655
+ boundingBox: {
4656
+ x1: 0,
4657
+ x2: 100,
4658
+ y1: 0,
4659
+ y2: 100
4660
+ }
4661
+ }
4662
+ });
4663
+ r.remove(), We(w, i), Ye(I, i, N), Xe(M, i, N), Ve(x, i);
4664
+ const f = N.getLayoutHints(), e = ze(N, d, l, f), g = Be(d, N, f), t = N.getConfigField("iconSize"), s = N.getConfigField("idealEdgeLengthMultiplier") * t, o = 0.5 * t, c = N.getConfigField("edgeElasticity"), h = N.getConfigField("seed"), T = i.layout({
4665
+ name: "fcose",
4666
+ quality: "proof",
4667
+ randomize: N.getConfigField("randomize"),
4668
+ nodeSeparation: N.getConfigField("nodeSeparation"),
4669
+ numIter: N.getConfigField("numIter"),
4670
+ styleEnabled: !1,
4671
+ animate: !1,
4672
+ nodeDimensionsIncludeLabels: !1,
4673
+ // Adjust the edge parameters if it passes through the border of a group
4674
+ // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67
4675
+ idealEdgeLength(u) {
4676
+ const [v, L] = u.connectedNodes(), { parent: P } = ie(v), { parent: C } = ie(L);
4677
+ return P === C ? s : o;
4678
+ },
4679
+ edgeElasticity(u) {
4680
+ const [v, L] = u.connectedNodes(), { parent: P } = ie(v), { parent: C } = ie(L);
4681
+ return P === C ? c : 1e-3;
4682
+ },
4683
+ alignmentConstraint: e,
4684
+ relativePlacementConstraint: g
4685
+ });
4686
+ T.one("layoutstop", () => {
4687
+ var v;
4688
+ function u(L, P, C, G) {
4689
+ let V, Y;
4690
+ const { x: $, y: A } = L, { x: j, y: n } = P;
4691
+ Y = (G - A + ($ - C) * (A - n) / ($ - j)) / Math.sqrt(1 + Math.pow((A - n) / ($ - j), 2)), V = Math.sqrt(Math.pow(G - A, 2) + Math.pow(C - $, 2) - Math.pow(Y, 2));
4692
+ const E = Math.sqrt(Math.pow(j - $, 2) + Math.pow(n - A, 2));
4693
+ V = V / E;
4694
+ let p = (j - $) * (G - A) - (n - A) * (C - $);
4695
+ switch (!0) {
4696
+ case p >= 0:
4697
+ p = 1;
4698
+ break;
4699
+ case p < 0:
4700
+ p = -1;
4701
+ break;
4702
+ }
4703
+ let m = (j - $) * (C - $) + (n - A) * (G - A);
4704
+ switch (!0) {
4705
+ case m >= 0:
4706
+ m = 1;
4707
+ break;
4708
+ case m < 0:
4709
+ m = -1;
4710
+ break;
4711
+ }
4712
+ return Y = Math.abs(Y) * p, V = V * m, {
4713
+ distances: Y,
4714
+ weights: V
4715
+ };
4716
+ }
4717
+ gt(u, "getSegmentWeights"), i.startBatch();
4718
+ for (const L of Object.values(i.edges()))
4719
+ if ((v = L.data) != null && v.call(L)) {
4720
+ const { x: P, y: C } = L.source().position(), { x: G, y: V } = L.target().position();
4721
+ if (P !== G && C !== V) {
4722
+ const Y = L.sourceEndpoint(), $ = L.targetEndpoint(), { sourceDir: A } = Pe(L), [j, n] = qt(A) ? [Y.x, $.y] : [$.x, Y.y], { weights: E, distances: p } = u(Y, $, j, n);
4723
+ L.style("segment-distances", p), L.style("segment-weights", E);
4724
+ }
4725
+ }
4726
+ i.endBatch(), me(h, () => T.run());
4727
+ });
4728
+ try {
4729
+ me(h, () => T.run());
4730
+ } catch (u) {
4731
+ throw u instanceof RangeError && u.message.includes("Invalid array length") ? new Error(
4732
+ "Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."
4733
+ ) : u;
4734
+ }
4735
+ i.ready((u) => {
4736
+ Fe.info("Ready", u), a(i);
4737
+ });
4738
+ });
4739
+ }
4740
+ gt($e, "layoutArchitecture");
4741
+ var Ur = /* @__PURE__ */ gt(async (I, M, w, x) => {
4742
+ const N = x.db;
4743
+ N.setDiagramId(M);
4744
+ const d = N.getServices(), l = N.getJunctions(), a = N.getGroups(), r = N.getEdges(), i = N.getDataStructures(), f = qe(M), e = f.append("g");
4745
+ e.attr("class", "architecture-edges");
4746
+ const g = f.append("g");
4747
+ g.attr("class", "architecture-services");
4748
+ const t = f.append("g");
4749
+ t.attr("class", "architecture-groups"), await Pr(N, g, d, M), Gr(N, g, l, M);
4750
+ const s = await $e(d, l, a, r, N, i);
4751
+ await Fr(e, s, N, M), await br(t, s, N, M), He(N, s), Qe(void 0, f, N.getConfigField("padding"), N.getConfigField("useMaxWidth"));
4752
+ }, "draw"), Yr = { draw: Ur }, Br = {
4753
+ parser: Ue,
4754
+ get db() {
4755
+ return new Ge();
4756
+ },
4757
+ renderer: Yr,
4758
+ styles: Sr
4759
+ };
4760
+ export {
4761
+ Br as diagram
4762
+ };