@belonguniverseai/react-sdk 0.1.0

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 (848) hide show
  1. package/README.md +47 -0
  2. package/dist/api/agent-grants.d.ts +61 -0
  3. package/dist/api/api-context.d.ts +9 -0
  4. package/dist/api/client.d.ts +2053 -0
  5. package/dist/api/mutations.d.ts +3 -0
  6. package/dist/api/queries.d.ts +21 -0
  7. package/dist/api/query-keys.d.ts +13 -0
  8. package/dist/api/report-client-error.d.ts +23 -0
  9. package/dist/api/skills.d.ts +23 -0
  10. package/dist/api/workspace-files.d.ts +9 -0
  11. package/dist/app/BelongDock.d.ts +29 -0
  12. package/dist/app/VoiceOverlay.d.ts +18 -0
  13. package/dist/app/providers.d.ts +12 -0
  14. package/dist/app/router.d.ts +2 -0
  15. package/dist/browser/control-channel.d.ts +29 -0
  16. package/dist/browser/dom-bridge.d.ts +6 -0
  17. package/dist/browser/spa-navigate.d.ts +87 -0
  18. package/dist/component/BelongWidget.d.ts +27 -0
  19. package/dist/component/abap-BqLfTM3_.js +9 -0
  20. package/dist/component/abap-Dosx9LfS.js +9 -0
  21. package/dist/component/actionscript-3-CFt6EqSB.js +9 -0
  22. package/dist/component/actionscript-3-CShGOdtT.js +9 -0
  23. package/dist/component/ada-8tCnwMXx.js +9 -0
  24. package/dist/component/ada-DaqFF2jd.js +9 -0
  25. package/dist/component/andromeeda-BxBtQ0rC.js +7 -0
  26. package/dist/component/andromeeda-Dx5fm3r-.js +7 -0
  27. package/dist/component/angular-html-CAoRrq6i.js +35 -0
  28. package/dist/component/angular-html-DG52iVg8.js +35 -0
  29. package/dist/component/angular-ts-BvOrReBc.js +24 -0
  30. package/dist/component/angular-ts-LQyiJZqb.js +24 -0
  31. package/dist/component/apache-HdVsAIQf.js +9 -0
  32. package/dist/component/apache-c3M5d5MN.js +9 -0
  33. package/dist/component/apex-B-y6HhVC.js +9 -0
  34. package/dist/component/apex-DXDfZUnb.js +9 -0
  35. package/dist/component/apl-BnXq3ZtQ.js +19 -0
  36. package/dist/component/apl-D7VFrOyT.js +19 -0
  37. package/dist/component/applescript-BZbrjHcY.js +9 -0
  38. package/dist/component/applescript-Bo1adDet.js +9 -0
  39. package/dist/component/ara-C1QNxHcU.js +9 -0
  40. package/dist/component/ara-ZjRpP-93.js +9 -0
  41. package/dist/component/arc-DGQIe3ON.js +86 -0
  42. package/dist/component/architectureDiagram-3BPJPVTR-C3uLEfb1.js +4697 -0
  43. package/dist/component/asciidoc-2fV_Cv2j.js +9 -0
  44. package/dist/component/asciidoc-D7PshqvO.js +9 -0
  45. package/dist/component/asm-ClEowkZP.js +9 -0
  46. package/dist/component/asm-DmyJawQj.js +9 -0
  47. package/dist/component/astro-9MHfKoOi.js +21 -0
  48. package/dist/component/astro-Bi3QRBCO.js +21 -0
  49. package/dist/component/aurora-x-BGO53J2I.js +7 -0
  50. package/dist/component/aurora-x-C98he-36.js +7 -0
  51. package/dist/component/awk-CIiDOfUC.js +9 -0
  52. package/dist/component/awk-DnzYQYUx.js +9 -0
  53. package/dist/component/ayu-dark-CK1VRikm.js +7 -0
  54. package/dist/component/ayu-dark-J6FX8oSr.js +7 -0
  55. package/dist/component/ayu-light-DIKBJiwH.js +7 -0
  56. package/dist/component/ayu-light-x4Q5N51d.js +7 -0
  57. package/dist/component/ayu-mirage-C5_fPLwf.js +7 -0
  58. package/dist/component/ayu-mirage-DhPHVcGJ.js +7 -0
  59. package/dist/component/ballerina-CeqVHW9D.js +9 -0
  60. package/dist/component/ballerina-epCf0_WV.js +9 -0
  61. package/dist/component/bat-Cuej7k1C.js +9 -0
  62. package/dist/component/bat-Dai7pznF.js +9 -0
  63. package/dist/component/beancount-CpREEZMl.js +9 -0
  64. package/dist/component/beancount-CwiYx9PE.js +9 -0
  65. package/dist/component/berry-BoYGiG42.js +9 -0
  66. package/dist/component/berry-DFo_i8CN.js +9 -0
  67. package/dist/component/bibtex-2bgmGv5w.js +9 -0
  68. package/dist/component/bibtex-BkTrlnvh.js +9 -0
  69. package/dist/component/bicep-C80YQkEm.js +9 -0
  70. package/dist/component/bicep-DYkQKpr8.js +9 -0
  71. package/dist/component/bird2-5AxdId5f.js +9 -0
  72. package/dist/component/bird2-CjcgWn0f.js +9 -0
  73. package/dist/component/blade-BdUlKesy.js +23 -0
  74. package/dist/component/blade-DNMMxdfa.js +23 -0
  75. package/dist/component/blockDiagram-GPEHLZMM-YerYvLm_.js +2421 -0
  76. package/dist/component/bsl-CYB_gPZn.js +11 -0
  77. package/dist/component/bsl-DJ4bR5oi.js +11 -0
  78. package/dist/component/c-C4AMyX3G.js +9 -0
  79. package/dist/component/c-C7DfT4H8.js +9 -0
  80. package/dist/component/c3-DDixCt0K.js +9 -0
  81. package/dist/component/c3-xeavH2G2.js +9 -0
  82. package/dist/component/c4Diagram-AAUBKEIU-p8UR34Zq.js +1586 -0
  83. package/dist/component/cadence-Cy8toSoU.js +9 -0
  84. package/dist/component/cadence-xq71MyIp.js +9 -0
  85. package/dist/component/cairo-B1qo5_uz.js +11 -0
  86. package/dist/component/cairo-CZSJv_Y_.js +11 -0
  87. package/dist/component/catppuccin-frappe-BGDzipYl.js +7 -0
  88. package/dist/component/catppuccin-frappe-DZ2VPnzg.js +7 -0
  89. package/dist/component/catppuccin-latte-9zQ0xneh.js +7 -0
  90. package/dist/component/catppuccin-latte-CK4XjBXq.js +7 -0
  91. package/dist/component/catppuccin-macchiato-CIKuiG5O.js +7 -0
  92. package/dist/component/catppuccin-macchiato-D1xBlgUI.js +7 -0
  93. package/dist/component/catppuccin-mocha-CQk3ku6b.js +7 -0
  94. package/dist/component/catppuccin-mocha-Dr22M_MR.js +7 -0
  95. package/dist/component/channel-ahmILYyG.js +8 -0
  96. package/dist/component/chunk-2J33WTMH-CGaAxoSO.js +22 -0
  97. package/dist/component/chunk-4BX2VUAB-gRTK7Di9.js +11 -0
  98. package/dist/component/chunk-55IACEB6-XfJuuv6Y.js +11 -0
  99. package/dist/component/chunk-727SXJPM-Cy0hXMuO.js +1537 -0
  100. package/dist/component/chunk-AQP2D5EJ-CZHGw4se.js +1396 -0
  101. package/dist/component/chunk-FMBD7UC4-CyqtPCO0.js +22 -0
  102. package/dist/component/chunk-ND2GUHAM-CzTviSBV.js +71 -0
  103. package/dist/component/chunk-QZHKN3VN-CHDEerWv.js +21 -0
  104. package/dist/component/clarity-Dmd3VcKv.js +9 -0
  105. package/dist/component/clarity-FR-MQPIo.js +9 -0
  106. package/dist/component/classDiagram-4FO5ZUOK-BDzl1OcC.js +19 -0
  107. package/dist/component/classDiagram-v2-Q7XG4LA2-BDzl1OcC.js +19 -0
  108. package/dist/component/clojure-CZ5pqCKI.js +9 -0
  109. package/dist/component/clojure-DUXXPerS.js +9 -0
  110. package/dist/component/cmake-DeSLuBit.js +9 -0
  111. package/dist/component/cmake-Dh5RXd_q.js +9 -0
  112. package/dist/component/cobol-B0R9veOS.js +13 -0
  113. package/dist/component/cobol-DayClXiO.js +13 -0
  114. package/dist/component/codeowners-C5Gg1qBb.js +9 -0
  115. package/dist/component/codeowners-RGJbf4XS.js +9 -0
  116. package/dist/component/codeql-1OtYEVEY.js +9 -0
  117. package/dist/component/codeql-CoCy8yp4.js +9 -0
  118. package/dist/component/coffee-kdLRO3eV.js +11 -0
  119. package/dist/component/coffee-tRjJZw7o.js +11 -0
  120. package/dist/component/common-lisp-BeJe0ab6.js +9 -0
  121. package/dist/component/common-lisp-GbfS1OBj.js +9 -0
  122. package/dist/component/coq-B0RJLsKz.js +9 -0
  123. package/dist/component/coq-DMlFNAl3.js +9 -0
  124. package/dist/component/cose-bilkent-S5V4N54A-4R0ErgrZ.js +2611 -0
  125. package/dist/component/cpp-BpiKH-9I.js +21 -0
  126. package/dist/component/cpp-BwGJQL2p.js +21 -0
  127. package/dist/component/crystal-Bb_LifhW.js +21 -0
  128. package/dist/component/crystal-D0cTXans.js +21 -0
  129. package/dist/component/csharp-5kMbpBNi.js +9 -0
  130. package/dist/component/csharp-UFMQzTVu.js +9 -0
  131. package/dist/component/css-B2ckPEoZ.js +9 -0
  132. package/dist/component/css-MDiv-Xmm.js +9 -0
  133. package/dist/component/csv-Ba1T94jM.js +9 -0
  134. package/dist/component/csv-DZ-mzuKa.js +9 -0
  135. package/dist/component/cue-CtGb6f31.js +9 -0
  136. package/dist/component/cue-DbYr629m.js +9 -0
  137. package/dist/component/cypher-7eGqJtNJ.js +9 -0
  138. package/dist/component/cypher-pD9MnYc_.js +9 -0
  139. package/dist/component/cytoscape.esm-C31R6JOv.js +18772 -0
  140. package/dist/component/d-BefBLeap.js +9 -0
  141. package/dist/component/d-Dij3nCx4.js +9 -0
  142. package/dist/component/dagre-BM42HDAG-BcJQXGn3.js +448 -0
  143. package/dist/component/dark-plus-C9nS7rhq.js +7 -0
  144. package/dist/component/dark-plus-L3JON0ir.js +7 -0
  145. package/dist/component/dart-BWNSliXX.js +9 -0
  146. package/dist/component/dart-DCRAsZQK.js +9 -0
  147. package/dist/component/dax-CWdGoxkM.js +9 -0
  148. package/dist/component/dax-pykceZLM.js +9 -0
  149. package/dist/component/defaultLocale-BXpxsZAK.js +174 -0
  150. package/dist/component/desktop-4j8jFU02.js +9 -0
  151. package/dist/component/desktop-B3AeStqn.js +9 -0
  152. package/dist/component/diagram-2AECGRRQ-Cld7-k7F.js +220 -0
  153. package/dist/component/diagram-5GNKFQAL-d7JtHVRK.js +126 -0
  154. package/dist/component/diagram-KO2AKTUF-Avxzz4xw.js +464 -0
  155. package/dist/component/diagram-LMA3HP47-Cy_E5-rU.js +148 -0
  156. package/dist/component/diagram-OG6HWLK6-DUsJK7Js.js +534 -0
  157. package/dist/component/diff-DuoPSmgL.js +9 -0
  158. package/dist/component/diff-IyCSM08A.js +9 -0
  159. package/dist/component/docker-BSrvy0o9.js +9 -0
  160. package/dist/component/docker-Ca4vT6OJ.js +9 -0
  161. package/dist/component/dotenv-CUP-PB19.js +9 -0
  162. package/dist/component/dotenv-aA3GGxJM.js +9 -0
  163. package/dist/component/dracula-2BaSCSav.js +7 -0
  164. package/dist/component/dracula-Lg7_DbOD.js +7 -0
  165. package/dist/component/dracula-soft-AsPqNBvZ.js +7 -0
  166. package/dist/component/dracula-soft-n6R-sBGM.js +7 -0
  167. package/dist/component/dream-maker-B2xERNvR.js +9 -0
  168. package/dist/component/dream-maker-Jadq_Ln7.js +9 -0
  169. package/dist/component/edge-B-amp2rn.js +15 -0
  170. package/dist/component/edge-Bol1lNG-.js +15 -0
  171. package/dist/component/elixir-DSzpv_bE.js +11 -0
  172. package/dist/component/elixir-t5YY_ese.js +11 -0
  173. package/dist/component/elm-DNaka8RZ.js +11 -0
  174. package/dist/component/elm-JLsvCHy1.js +11 -0
  175. package/dist/component/emacs-lisp-C6XZT609.js +9 -0
  176. package/dist/component/emacs-lisp-DWDtb5kD.js +9 -0
  177. package/dist/component/erDiagram-TEJ5UH35-DEdqrWqp.js +905 -0
  178. package/dist/component/erb-BJ95qgrJ.js +13 -0
  179. package/dist/component/erb-rGIYAeIa.js +13 -0
  180. package/dist/component/erlang-By5grfmz.js +11 -0
  181. package/dist/component/erlang-rAClsghX.js +11 -0
  182. package/dist/component/everforest-dark-DBhTz0Lt.js +7 -0
  183. package/dist/component/everforest-dark-_A43rkLf.js +7 -0
  184. package/dist/component/everforest-light-Bep_XOgu.js +7 -0
  185. package/dist/component/everforest-light-DHbrW2te.js +7 -0
  186. package/dist/component/fennel-CeQPNUU9.js +9 -0
  187. package/dist/component/fennel-QllfYze1.js +9 -0
  188. package/dist/component/fish-BXP1eRyz.js +9 -0
  189. package/dist/component/fish-DkfR0DRL.js +9 -0
  190. package/dist/component/flowDiagram-I6XJVG4X-BWzYDsjP.js +1634 -0
  191. package/dist/component/fluent-Ih0R99Ix.js +9 -0
  192. package/dist/component/fluent-RduSrzCZ.js +9 -0
  193. package/dist/component/fortran-fixed-form-C3I8YlEU.js +11 -0
  194. package/dist/component/fortran-fixed-form-D7OlW0lw.js +11 -0
  195. package/dist/component/fortran-free-form-CXj2ku4f.js +9 -0
  196. package/dist/component/fortran-free-form-DifCDW_P.js +9 -0
  197. package/dist/component/fsharp-65O4P3S5.js +11 -0
  198. package/dist/component/fsharp-CXzwUWsC.js +11 -0
  199. package/dist/component/ganttDiagram-6RSMTGT7-DzfeVIgF.js +2709 -0
  200. package/dist/component/gdresource-Bn5VhPaI.js +13 -0
  201. package/dist/component/gdresource-kUFIn9eK.js +13 -0
  202. package/dist/component/gdscript-BNGA6E65.js +9 -0
  203. package/dist/component/gdscript-LjKsfw3O.js +9 -0
  204. package/dist/component/gdshader-C-Gp5-Ot.js +9 -0
  205. package/dist/component/gdshader-C1lRZRQz.js +9 -0
  206. package/dist/component/genie-B8viIUNC.js +9 -0
  207. package/dist/component/genie-eR37RVXX.js +9 -0
  208. package/dist/component/gherkin-BVA-IOor.js +9 -0
  209. package/dist/component/gherkin-CuORnKvF.js +9 -0
  210. package/dist/component/git-commit-BNPqpLhi.js +11 -0
  211. package/dist/component/git-commit-Dh7BfmB9.js +11 -0
  212. package/dist/component/git-rebase-B5TXZutB.js +11 -0
  213. package/dist/component/git-rebase-DhwWS8MC.js +11 -0
  214. package/dist/component/gitGraphDiagram-PVQCEYII-CKzbGWcQ.js +818 -0
  215. package/dist/component/github-dark-5b4g_bOp.js +7 -0
  216. package/dist/component/github-dark-default-6zDGR7DJ.js +7 -0
  217. package/dist/component/github-dark-default-H56pGX_M.js +7 -0
  218. package/dist/component/github-dark-dimmed-B1iXBBmo.js +7 -0
  219. package/dist/component/github-dark-dimmed-DjYa1rhk.js +7 -0
  220. package/dist/component/github-dark-high-contrast-BuNi_Wj5.js +7 -0
  221. package/dist/component/github-dark-high-contrast-DvpYRI-4.js +7 -0
  222. package/dist/component/github-dark-mxHsWyJ4.js +7 -0
  223. package/dist/component/github-light-CTdjTVPf.js +7 -0
  224. package/dist/component/github-light-KqdY1rAV.js +7 -0
  225. package/dist/component/github-light-default-BlRYTBRQ.js +7 -0
  226. package/dist/component/github-light-default-Drw5Jl_p.js +7 -0
  227. package/dist/component/github-light-high-contrast-9d8ktz0h.js +7 -0
  228. package/dist/component/github-light-high-contrast-ColFVC7A.js +7 -0
  229. package/dist/component/gleam-BXQHq2ZT.js +9 -0
  230. package/dist/component/gleam-RfA2dpfH.js +9 -0
  231. package/dist/component/glimmer-js-BHZ1FuRp.js +17 -0
  232. package/dist/component/glimmer-js-Gdq_UYVf.js +17 -0
  233. package/dist/component/glimmer-ts-D6H7q5ls.js +17 -0
  234. package/dist/component/glimmer-ts-DdmgeZua.js +17 -0
  235. package/dist/component/glsl-D1RRylbk.js +11 -0
  236. package/dist/component/glsl-MDSU_3-y.js +11 -0
  237. package/dist/component/gn-D8VPrt1o.js +9 -0
  238. package/dist/component/gn-DJpTAp5e.js +9 -0
  239. package/dist/component/gnuplot-BNzwvBx5.js +9 -0
  240. package/dist/component/gnuplot-Iqvzplz-.js +9 -0
  241. package/dist/component/go-D-G7cxeA.js +9 -0
  242. package/dist/component/go-TNOI7pQc.js +9 -0
  243. package/dist/component/graph-BZLHvygk.js +1548 -0
  244. package/dist/component/graphql-CW6tYk7X.js +17 -0
  245. package/dist/component/graphql-DGugpl40.js +17 -0
  246. package/dist/component/groovy-5_UI-q3N.js +9 -0
  247. package/dist/component/groovy-D7GH48W8.js +9 -0
  248. package/dist/component/gruvbox-dark-hard-Ch2GYDcJ.js +7 -0
  249. package/dist/component/gruvbox-dark-hard-Dpxv_Il6.js +7 -0
  250. package/dist/component/gruvbox-dark-medium-DqoxKYPx.js +7 -0
  251. package/dist/component/gruvbox-dark-medium-eGVEUM8W.js +7 -0
  252. package/dist/component/gruvbox-dark-soft-BA9DdijB.js +7 -0
  253. package/dist/component/gruvbox-dark-soft-DRaJAZcW.js +7 -0
  254. package/dist/component/gruvbox-light-hard-BJXIrqpz.js +7 -0
  255. package/dist/component/gruvbox-light-hard-_qNpoYJy.js +7 -0
  256. package/dist/component/gruvbox-light-medium-39dkJwxv.js +7 -0
  257. package/dist/component/gruvbox-light-medium-IkDFQhcB.js +7 -0
  258. package/dist/component/gruvbox-light-soft-DWPQo7Dn.js +7 -0
  259. package/dist/component/gruvbox-light-soft-Dpz5D6wP.js +7 -0
  260. package/dist/component/hack-BSrzyV-l.js +13 -0
  261. package/dist/component/hack-CJNnfXZh.js +13 -0
  262. package/dist/component/haml-DL-NAYVg.js +13 -0
  263. package/dist/component/haml-DYkTKupK.js +13 -0
  264. package/dist/component/handlebars-B2Z6CWhc.js +17 -0
  265. package/dist/component/handlebars-Cwj0qzUo.js +17 -0
  266. package/dist/component/haskell-Cj3J4fKD.js +9 -0
  267. package/dist/component/haskell-h36TjJLk.js +9 -0
  268. package/dist/component/haxe-CcifGI6O.js +9 -0
  269. package/dist/component/haxe-Coqw0Tt8.js +9 -0
  270. package/dist/component/hcl-BPVqiZDb.js +9 -0
  271. package/dist/component/hcl-DaPl6lOC.js +9 -0
  272. package/dist/component/highlighted-body-OFNGDK62-BkGwwkHo.js +22 -0
  273. package/dist/component/hjson-CfcQXz3-.js +9 -0
  274. package/dist/component/hjson-DsTgWNxt.js +9 -0
  275. package/dist/component/hlsl-CLzjZIQL.js +9 -0
  276. package/dist/component/hlsl-DVyuzW8h.js +9 -0
  277. package/dist/component/horizon-DaNatiIz.js +7 -0
  278. package/dist/component/horizon-bright-CthJh1Qp.js +7 -0
  279. package/dist/component/horizon-bright-DMKA6ab6.js +7 -0
  280. package/dist/component/horizon-q20CuJTh.js +7 -0
  281. package/dist/component/houston-CjpgGYwZ.js +7 -0
  282. package/dist/component/houston-DnIZxOiF.js +7 -0
  283. package/dist/component/html-DSjghx6n.js +13 -0
  284. package/dist/component/html-derivative-CxizaS1Z.js +11 -0
  285. package/dist/component/html-derivative-DDrVhQXu.js +11 -0
  286. package/dist/component/html-tY6fNMOn.js +13 -0
  287. package/dist/component/http-CLvA54iU.js +17 -0
  288. package/dist/component/http-CPkD6MSf.js +17 -0
  289. package/dist/component/hurl-CuuCK9Id.js +15 -0
  290. package/dist/component/hurl-LcD0R7wh.js +15 -0
  291. package/dist/component/hxml-CJz9SfqN.js +11 -0
  292. package/dist/component/hxml-DLsAgg8X.js +11 -0
  293. package/dist/component/hy-CAEey4h7.js +9 -0
  294. package/dist/component/hy-Dm2IGIb-.js +9 -0
  295. package/dist/component/imba-5G9Fs_nr.js +9 -0
  296. package/dist/component/imba-CH2D1ce9.js +9 -0
  297. package/dist/component/index.d.ts +3 -0
  298. package/dist/component/index.js +8 -0
  299. package/dist/component/infoDiagram-5YYISTIA-D9xN-Pqc.js +27 -0
  300. package/dist/component/ini-Dt2l3RWi.js +9 -0
  301. package/dist/component/ini-kgvXisvj.js +9 -0
  302. package/dist/component/init-BOu0eQYQ.js +19 -0
  303. package/dist/component/ishikawaDiagram-YF4QCWOH--YDYWDwv.js +627 -0
  304. package/dist/component/java-BKLcvtEM.js +9 -0
  305. package/dist/component/java-oSN7P0Od.js +9 -0
  306. package/dist/component/javascript-CyaMmpOO.js +9 -0
  307. package/dist/component/javascript-DFm3DOoX.js +9 -0
  308. package/dist/component/jinja-Ch28RrFG.js +14 -0
  309. package/dist/component/jinja-CsTh8Ahj.js +14 -0
  310. package/dist/component/jison-Bu0o8a1Z.js +11 -0
  311. package/dist/component/jison-DLgrOJpy.js +11 -0
  312. package/dist/component/journeyDiagram-JHISSGLW-B9-CHfSv.js +837 -0
  313. package/dist/component/json-D-WsbO45.js +9 -0
  314. package/dist/component/json-rmrBoeO_.js +9 -0
  315. package/dist/component/json5-B1J6XVPd.js +9 -0
  316. package/dist/component/json5-B3-n7IrD.js +9 -0
  317. package/dist/component/jsonc-BgfI3zjg.js +9 -0
  318. package/dist/component/jsonc-HFvGREK8.js +9 -0
  319. package/dist/component/jsonl-DHttz8sH.js +9 -0
  320. package/dist/component/jsonl-l_eIcPip.js +9 -0
  321. package/dist/component/jsonnet-D6SNIhw0.js +9 -0
  322. package/dist/component/jsonnet-DO8Zfk6p.js +9 -0
  323. package/dist/component/jssm-CKRLojKZ.js +9 -0
  324. package/dist/component/jssm-Dy1zjXNg.js +9 -0
  325. package/dist/component/jsx-CpVvoVGp.js +9 -0
  326. package/dist/component/jsx-si2wS7pt.js +9 -0
  327. package/dist/component/julia-BPzvBJ4R.js +19 -0
  328. package/dist/component/julia-CfyFig21.js +19 -0
  329. package/dist/component/just-D5rIv9U4.js +21 -0
  330. package/dist/component/just-fRm_weEQ.js +21 -0
  331. package/dist/component/kanagawa-dragon-BOBo9JLg.js +7 -0
  332. package/dist/component/kanagawa-dragon-BWPCHB_7.js +7 -0
  333. package/dist/component/kanagawa-lotus-8m_3LhhF.js +7 -0
  334. package/dist/component/kanagawa-lotus-B5o1JCNj.js +7 -0
  335. package/dist/component/kanagawa-wave-BSP7z6KH.js +7 -0
  336. package/dist/component/kanagawa-wave-ClYLx7ql.js +7 -0
  337. package/dist/component/kanban-definition-UN3LZRKU-Cmh8twbq.js +727 -0
  338. package/dist/component/kdl-GafIF83C.js +9 -0
  339. package/dist/component/kdl-_X6wsgV0.js +9 -0
  340. package/dist/component/kotlin-B3jfEOcv.js +9 -0
  341. package/dist/component/kotlin-BWMoZeA3.js +9 -0
  342. package/dist/component/kusto-Bkz9eBch.js +9 -0
  343. package/dist/component/kusto-ohiqZ64l.js +9 -0
  344. package/dist/component/laserwave-BmajecBZ.js +7 -0
  345. package/dist/component/laserwave-Bp21zlIO.js +7 -0
  346. package/dist/component/latex-BYzveWoN.js +11 -0
  347. package/dist/component/latex-Bi4Lg68B.js +11 -0
  348. package/dist/component/layout-Bu6nRdWm.js +1731 -0
  349. package/dist/component/lean-BBkk0btj.js +9 -0
  350. package/dist/component/lean-DFmhzmny.js +9 -0
  351. package/dist/component/less-ChX34X5W.js +9 -0
  352. package/dist/component/less-kqPRXL1K.js +9 -0
  353. package/dist/component/light-plus-DFxAowZg.js +7 -0
  354. package/dist/component/light-plus-_t1yKirF.js +7 -0
  355. package/dist/component/linear-BDyEUcVD.js +262 -0
  356. package/dist/component/liquid-Bri_C9oi.js +17 -0
  357. package/dist/component/liquid-f2WMwCDi.js +17 -0
  358. package/dist/component/llvm-COuD10ql.js +9 -0
  359. package/dist/component/llvm-dub2631B.js +9 -0
  360. package/dist/component/log-A8St-vyh.js +9 -0
  361. package/dist/component/log-g58LFxM8.js +9 -0
  362. package/dist/component/logo-DZmThwvl.js +9 -0
  363. package/dist/component/logo-x6YxnKST.js +9 -0
  364. package/dist/component/lua-Bj2G8q-Z.js +11 -0
  365. package/dist/component/lua-CyXCKT0u.js +11 -0
  366. package/dist/component/luau-B8fyn01D.js +9 -0
  367. package/dist/component/luau-C5q2C4N6.js +9 -0
  368. package/dist/component/make-DOTJ8IeI.js +9 -0
  369. package/dist/component/make-DTiRnfNf.js +9 -0
  370. package/dist/component/markdown-D3u32LKS.js +9 -0
  371. package/dist/component/markdown-DHm1k_6p.js +9 -0
  372. package/dist/component/marko-CUgdvzuR.js +17 -0
  373. package/dist/component/marko-SwZmWzIv.js +17 -0
  374. package/dist/component/material-theme-BIfRQKI0.js +7 -0
  375. package/dist/component/material-theme-CxS7GniW.js +7 -0
  376. package/dist/component/material-theme-darker-DKP5DIOi.js +7 -0
  377. package/dist/component/material-theme-darker-DkNB3xjL.js +7 -0
  378. package/dist/component/material-theme-lighter-3I4JYnlq.js +7 -0
  379. package/dist/component/material-theme-lighter-D5xivCfx.js +7 -0
  380. package/dist/component/material-theme-ocean-B31yuEXO.js +7 -0
  381. package/dist/component/material-theme-ocean-rw0kJPZg.js +7 -0
  382. package/dist/component/material-theme-palenight-BfunK0Uo.js +7 -0
  383. package/dist/component/material-theme-palenight-COTbh91p.js +7 -0
  384. package/dist/component/matlab-CkKSQcnX.js +9 -0
  385. package/dist/component/matlab-DCF6d5YL.js +9 -0
  386. package/dist/component/mdc-D92XwdT9.js +15 -0
  387. package/dist/component/mdc-gb_v49HI.js +15 -0
  388. package/dist/component/mdx-C6kH9TSz.js +9 -0
  389. package/dist/component/mdx-Dqb5H0t-.js +9 -0
  390. package/dist/component/mermaid-0bkYzXfL.js +9 -0
  391. package/dist/component/mermaid-GHXKKRXX-C5Y3BZXR.js +107122 -0
  392. package/dist/component/mermaid-N7-yWHiu.js +9 -0
  393. package/dist/component/min-dark-CqEfelDe.js +7 -0
  394. package/dist/component/min-dark-FAglrjWz.js +7 -0
  395. package/dist/component/min-light-BmdYN58_.js +7 -0
  396. package/dist/component/min-light-CcJCxfWw.js +7 -0
  397. package/dist/component/mindmap-definition-RKZ34NQL-CnFpVFpl.js +833 -0
  398. package/dist/component/mipsasm-BYNReuUT.js +9 -0
  399. package/dist/component/mipsasm-CKzkMNWr.js +9 -0
  400. package/dist/component/mojo-0URGVph7.js +9 -0
  401. package/dist/component/mojo-C563AncR.js +9 -0
  402. package/dist/component/monokai-D3_c3OUm.js +7 -0
  403. package/dist/component/monokai-ugSJFofr.js +7 -0
  404. package/dist/component/moonbit-BkJk2kyS.js +9 -0
  405. package/dist/component/moonbit-DlIX78rk.js +9 -0
  406. package/dist/component/move-BQAHOJb2.js +9 -0
  407. package/dist/component/move-eiW4QYDW.js +9 -0
  408. package/dist/component/narrat-2oVindvn.js +9 -0
  409. package/dist/component/narrat-Dc4cTFeW.js +9 -0
  410. package/dist/component/nextflow-B4caLl5A.js +11 -0
  411. package/dist/component/nextflow-Bk0ryO1R.js +11 -0
  412. package/dist/component/nextflow-groovy-BnXf2WiC.js +9 -0
  413. package/dist/component/nextflow-groovy-DIMIAEOy.js +9 -0
  414. package/dist/component/nginx-BaGEfT9r.js +11 -0
  415. package/dist/component/nginx-Dprlne5J.js +11 -0
  416. package/dist/component/night-owl-B6L5FL5v.js +7 -0
  417. package/dist/component/night-owl-CB_IXuNH.js +7 -0
  418. package/dist/component/night-owl-light-BZxeyl5X.js +7 -0
  419. package/dist/component/night-owl-light-CoPr05P4.js +7 -0
  420. package/dist/component/nim-BKvvFCe_.js +23 -0
  421. package/dist/component/nim-CQZqLxeE.js +23 -0
  422. package/dist/component/nix-Cp8a0vy5.js +12 -0
  423. package/dist/component/nix-DEY1zukk.js +12 -0
  424. package/dist/component/nord-D3PAEvHH.js +7 -0
  425. package/dist/component/nord-DPPgRakM.js +7 -0
  426. package/dist/component/nushell-BdsblUId.js +9 -0
  427. package/dist/component/nushell-DUUbmBaO.js +9 -0
  428. package/dist/component/objective-c-CNN3tl1v.js +9 -0
  429. package/dist/component/objective-c-D_6I2dsG.js +9 -0
  430. package/dist/component/objective-cpp-BjicYcS7.js +9 -0
  431. package/dist/component/objective-cpp-z4LTaUcg.js +9 -0
  432. package/dist/component/ocaml-BnD9haV8.js +9 -0
  433. package/dist/component/ocaml-DZseEUty.js +9 -0
  434. package/dist/component/odin-CnsCKboc.js +9 -0
  435. package/dist/component/odin-P2WSXO4H.js +9 -0
  436. package/dist/component/one-dark-pro-C_eaQ16k.js +7 -0
  437. package/dist/component/one-dark-pro-OimEv0Ou.js +7 -0
  438. package/dist/component/one-light-B0ti6b9S.js +7 -0
  439. package/dist/component/one-light-j3UfPQB3.js +7 -0
  440. package/dist/component/openscad-2vaKslxR.js +9 -0
  441. package/dist/component/openscad-jE6oRbDv.js +9 -0
  442. package/dist/component/ordinal-D0x7izaa.js +64 -0
  443. package/dist/component/pascal-8jl8irAj.js +9 -0
  444. package/dist/component/pascal-d7SASCGO.js +9 -0
  445. package/dist/component/perl-DHC1BZ_5.js +19 -0
  446. package/dist/component/perl-DVm7Pq-D.js +19 -0
  447. package/dist/component/php-BF_l-EgM.js +21 -0
  448. package/dist/component/php-BtpW2-DO.js +21 -0
  449. package/dist/component/pieDiagram-4H26LBE5-u-blLkni.js +166 -0
  450. package/dist/component/pkl-CoBnC_8G.js +9 -0
  451. package/dist/component/pkl-DZdA2Trc.js +9 -0
  452. package/dist/component/plastic-3IjBbwNP.js +7 -0
  453. package/dist/component/plastic-CixB-AlW.js +7 -0
  454. package/dist/component/plsql-Cv-ZxhCL.js +9 -0
  455. package/dist/component/plsql-CzeGyK0m.js +9 -0
  456. package/dist/component/po-eb_Amfj2.js +9 -0
  457. package/dist/component/po-moSB12fi.js +9 -0
  458. package/dist/component/poimandres-C03Jy3KZ.js +7 -0
  459. package/dist/component/poimandres-CKZ3f48N.js +7 -0
  460. package/dist/component/polar-BKFAKBSA.js +9 -0
  461. package/dist/component/polar-CsPCUbKt.js +9 -0
  462. package/dist/component/postcss-CytNqPC0.js +9 -0
  463. package/dist/component/postcss-D3_LY2LH.js +9 -0
  464. package/dist/component/powerquery-CpTndMW_.js +9 -0
  465. package/dist/component/powerquery-f-cemdrG.js +9 -0
  466. package/dist/component/powershell-B-JkstDq.js +9 -0
  467. package/dist/component/powershell-BkDB3ZO9.js +9 -0
  468. package/dist/component/prisma-B4mlcaEB.js +9 -0
  469. package/dist/component/prisma-BX88wNNq.js +9 -0
  470. package/dist/component/prolog-ZYcjPjsY.js +9 -0
  471. package/dist/component/prolog-ftPRGVaT.js +9 -0
  472. package/dist/component/proto-B5SG7zCc.js +9 -0
  473. package/dist/component/proto-DpTcjJFH.js +9 -0
  474. package/dist/component/pug-BziTjzcZ.js +15 -0
  475. package/dist/component/pug-XUdLuJ2s.js +15 -0
  476. package/dist/component/puppet-BeyD5DhV.js +9 -0
  477. package/dist/component/puppet-DjFvC8zy.js +9 -0
  478. package/dist/component/purescript-BBRU0YyZ.js +9 -0
  479. package/dist/component/purescript-Bf3WPYAV.js +9 -0
  480. package/dist/component/python-C7yusFoO.js +9 -0
  481. package/dist/component/python-CuNbg5wx.js +9 -0
  482. package/dist/component/qml-Cu9RjXOs.js +11 -0
  483. package/dist/component/qml-Z-uvElxQ.js +11 -0
  484. package/dist/component/qmldir-BHp2usxt.js +9 -0
  485. package/dist/component/qmldir-C6P--W6X.js +9 -0
  486. package/dist/component/qss-CgcBaeYL.js +9 -0
  487. package/dist/component/qss-iWzt-Nzy.js +9 -0
  488. package/dist/component/quadrantDiagram-W4KKPZXB-Bpq-EoMM.js +1033 -0
  489. package/dist/component/r-8lH98zbN.js +9 -0
  490. package/dist/component/r-CyFkAlMF.js +9 -0
  491. package/dist/component/racket-DaWPCRlQ.js +9 -0
  492. package/dist/component/racket-effgGH8q.js +9 -0
  493. package/dist/component/raku-DXM7wT4g.js +9 -0
  494. package/dist/component/raku-GZVvT-nH.js +9 -0
  495. package/dist/component/razor-CYq4jbLW.js +13 -0
  496. package/dist/component/razor-DQFDiXM1.js +13 -0
  497. package/dist/component/red-B9TgEgRC.js +7 -0
  498. package/dist/component/red-BNC90Lxb.js +7 -0
  499. package/dist/component/reg-C62uOG3A.js +9 -0
  500. package/dist/component/reg-CQgRgzkw.js +9 -0
  501. package/dist/component/regexp-D8jeZrvm.js +9 -0
  502. package/dist/component/regexp-UNvxOND4.js +9 -0
  503. package/dist/component/rel-BRyuNjQD.js +9 -0
  504. package/dist/component/rel-Cyzm_Cno.js +9 -0
  505. package/dist/component/requirementDiagram-4Y6WPE33-B8V7mLRY.js +888 -0
  506. package/dist/component/riscv-BHdC-Wfh.js +9 -0
  507. package/dist/component/riscv-BZ9l50bA.js +9 -0
  508. package/dist/component/ron--0kZyCV0.js +9 -0
  509. package/dist/component/ron-CJx-eqt3.js +9 -0
  510. package/dist/component/rose-pine-XHcBRH-D.js +7 -0
  511. package/dist/component/rose-pine-dawn-Bz77Igqs.js +7 -0
  512. package/dist/component/rose-pine-dawn-RL42yTas.js +7 -0
  513. package/dist/component/rose-pine-ksWn8nuO.js +7 -0
  514. package/dist/component/rose-pine-moon-BtSW__9n.js +7 -0
  515. package/dist/component/rose-pine-moon-QJS0aJgR.js +7 -0
  516. package/dist/component/rosmsg-BPUqDEe2.js +9 -0
  517. package/dist/component/rosmsg-CM65NRE0.js +9 -0
  518. package/dist/component/rst-CqXkCW5F.js +25 -0
  519. package/dist/component/rst-DQATMrFw.js +25 -0
  520. package/dist/component/ruby-B09XKrLg.js +33 -0
  521. package/dist/component/ruby-BJtrPIFQ.js +33 -0
  522. package/dist/component/rust-3aEF0O7t.js +9 -0
  523. package/dist/component/rust-XKBJng8W.js +9 -0
  524. package/dist/component/sankeyDiagram-5OEKKPKP-C-TbMbsr.js +862 -0
  525. package/dist/component/sas-COkwgxe_.js +11 -0
  526. package/dist/component/sas-DDLczODn.js +11 -0
  527. package/dist/component/sass-BIT8Mghp.js +9 -0
  528. package/dist/component/sass-CbXM5obh.js +9 -0
  529. package/dist/component/scala-CWyCExvl.js +9 -0
  530. package/dist/component/scala-DmAjX8OM.js +9 -0
  531. package/dist/component/scheme-BLXiZF3M.js +9 -0
  532. package/dist/component/scheme-ERi8vGmO.js +9 -0
  533. package/dist/component/scss-BX4eQ0c3.js +11 -0
  534. package/dist/component/scss-Biq-xkEY.js +11 -0
  535. package/dist/component/sdbl-B4TEJKGi.js +9 -0
  536. package/dist/component/sdbl-tnLxE-ur.js +9 -0
  537. package/dist/component/sequenceDiagram-3UESZ5HK-UHhixLbD.js +2897 -0
  538. package/dist/component/shaderlab-DMYXUCqo.js +11 -0
  539. package/dist/component/shaderlab-DqcfJRqk.js +11 -0
  540. package/dist/component/shellscript-B533aeAq.js +9 -0
  541. package/dist/component/shellscript-B8M9FK6Q.js +9 -0
  542. package/dist/component/shellsession-CvrLJEnp.js +11 -0
  543. package/dist/component/shellsession-Cy0cdv3D.js +11 -0
  544. package/dist/component/slack-dark-9TBiD8mL.js +7 -0
  545. package/dist/component/slack-dark-DN-r2Kgp.js +7 -0
  546. package/dist/component/slack-ochin-9pgdwMdj.js +7 -0
  547. package/dist/component/slack-ochin-DoqPjNJD.js +7 -0
  548. package/dist/component/smalltalk-Bbm0pJzJ.js +9 -0
  549. package/dist/component/smalltalk-BgwWJ0LQ.js +9 -0
  550. package/dist/component/snazzy-light-CRiZMLw1.js +7 -0
  551. package/dist/component/snazzy-light-D2QxPpzI.js +7 -0
  552. package/dist/component/solarized-dark-CpiZBbF-.js +7 -0
  553. package/dist/component/solarized-dark-DrZ258Kz.js +7 -0
  554. package/dist/component/solarized-light-940Q0ET-.js +7 -0
  555. package/dist/component/solarized-light-CZjXGjG0.js +7 -0
  556. package/dist/component/solidity-BiVIJAyo.js +9 -0
  557. package/dist/component/solidity-DsGO0zKs.js +9 -0
  558. package/dist/component/soy-B8d9iNux.js +11 -0
  559. package/dist/component/soy-CrWxFFIL.js +11 -0
  560. package/dist/component/sparql-C9-sbVPb.js +11 -0
  561. package/dist/component/sparql-D4y9QLpW.js +11 -0
  562. package/dist/component/splunk-8ZGt17T1.js +9 -0
  563. package/dist/component/splunk-CoLR9YoS.js +9 -0
  564. package/dist/component/sql-kcHmCqqm.js +9 -0
  565. package/dist/component/sql-vg8sPfqQ.js +9 -0
  566. package/dist/component/ssh-config-CaXR5cZI.js +9 -0
  567. package/dist/component/ssh-config-DIPB8nWv.js +9 -0
  568. package/dist/component/stata-DTwlvRC-.js +11 -0
  569. package/dist/component/stata-wXDnjjLv.js +11 -0
  570. package/dist/component/stateDiagram-AJRCARHV-DBGVr_mf.js +266 -0
  571. package/dist/component/stateDiagram-v2-BHNVJYJU-BasSd11t.js +19 -0
  572. package/dist/component/stylus-BVi_fesw.js +9 -0
  573. package/dist/component/stylus-WAexVQ6f.js +9 -0
  574. package/dist/component/surrealql-BMPoOZ16.js +11 -0
  575. package/dist/component/surrealql-CoR3cmJl.js +11 -0
  576. package/dist/component/svelte-BXoajfvD.js +17 -0
  577. package/dist/component/svelte-CSNEH6tH.js +17 -0
  578. package/dist/component/swift-C1L5BrdG.js +9 -0
  579. package/dist/component/swift-DvqRLmJa.js +9 -0
  580. package/dist/component/synthwave-84-CjU0tbaA.js +7 -0
  581. package/dist/component/synthwave-84-D0HCetP1.js +7 -0
  582. package/dist/component/system-verilog-BlCQhLvC.js +9 -0
  583. package/dist/component/system-verilog-NfYSOS9X.js +9 -0
  584. package/dist/component/systemd-C-VULMOV.js +9 -0
  585. package/dist/component/systemd-DPQeba_a.js +9 -0
  586. package/dist/component/talonscript-0iKTliWA.js +9 -0
  587. package/dist/component/talonscript-Dcq0YJ69.js +9 -0
  588. package/dist/component/tasl-CBnjmw_u.js +9 -0
  589. package/dist/component/tasl-DPTcRLbU.js +9 -0
  590. package/dist/component/tcl-B8YZq0wg.js +9 -0
  591. package/dist/component/tcl-D3IfUIUn.js +9 -0
  592. package/dist/component/templ-BWrZoBOl.js +15 -0
  593. package/dist/component/templ-CNKcDxHw.js +15 -0
  594. package/dist/component/terraform-BBGJbbOd.js +9 -0
  595. package/dist/component/terraform-CpHfbII0.js +9 -0
  596. package/dist/component/tex-Do7cxq2n.js +11 -0
  597. package/dist/component/tex-DotwMf2L.js +11 -0
  598. package/dist/component/timeline-definition-PNZ67QCA-BTzUH3cf.js +1058 -0
  599. package/dist/component/tokyo-night-50KL4qXP.js +7 -0
  600. package/dist/component/tokyo-night-CFdInRHE.js +7 -0
  601. package/dist/component/toml-BgG8u2uy.js +9 -0
  602. package/dist/component/toml-Cdrl1XDU.js +9 -0
  603. package/dist/component/ts-tags-CZ_-X2Or.js +44 -0
  604. package/dist/component/ts-tags-JQGxDVZd.js +44 -0
  605. package/dist/component/tsv-CH-Gpfzn.js +9 -0
  606. package/dist/component/tsv-DXq61Z_y.js +9 -0
  607. package/dist/component/tsx-B6WYiHjH.js +9 -0
  608. package/dist/component/tsx-BI2vzHzF.js +9 -0
  609. package/dist/component/turtle-BLh3UAZ1.js +9 -0
  610. package/dist/component/turtle-DuS0HQ9p.js +9 -0
  611. package/dist/component/twig-BA9yPOhQ.js +21 -0
  612. package/dist/component/twig-F0j_PXgJ.js +21 -0
  613. package/dist/component/typescript-Bt_Em9TU.js +9 -0
  614. package/dist/component/typescript-BxspRrVw.js +9 -0
  615. package/dist/component/typespec-CBQfkfKg.js +9 -0
  616. package/dist/component/typespec-ChsG4DJP.js +9 -0
  617. package/dist/component/typst-CLNdxZpy.js +9 -0
  618. package/dist/component/typst-rCvFF3Ml.js +9 -0
  619. package/dist/component/v-Bc8b7HcA.js +9 -0
  620. package/dist/component/v-DkBTCxRz.js +9 -0
  621. package/dist/component/vala-Bf6duLsN.js +9 -0
  622. package/dist/component/vala-D3NFAJvZ.js +9 -0
  623. package/dist/component/vb-CbCKaE0V.js +9 -0
  624. package/dist/component/vb-DoG_86dU.js +9 -0
  625. package/dist/component/vennDiagram-CIIHVFJN-CVh3weJ2.js +1560 -0
  626. package/dist/component/verilog-BsnhA3AJ.js +9 -0
  627. package/dist/component/verilog-nZodAh2g.js +9 -0
  628. package/dist/component/vesper-C9xEuBGK.js +7 -0
  629. package/dist/component/vesper-DGjNIaCs.js +7 -0
  630. package/dist/component/vhdl-D19XVLHt.js +9 -0
  631. package/dist/component/vhdl-mXcQB2Fg.js +9 -0
  632. package/dist/component/viml-8k_5DKNK.js +9 -0
  633. package/dist/component/viml-COJbZm0U.js +9 -0
  634. package/dist/component/vitesse-black-Bct4R3m4.js +7 -0
  635. package/dist/component/vitesse-black-heVxAgDf.js +7 -0
  636. package/dist/component/vitesse-dark-DdWh6SFL.js +7 -0
  637. package/dist/component/vitesse-dark-DiXBkaTo.js +7 -0
  638. package/dist/component/vitesse-light-CerMU32A.js +7 -0
  639. package/dist/component/vitesse-light-Eee3KZAP.js +7 -0
  640. package/dist/component/vue-DjB6jmJ7.js +34 -0
  641. package/dist/component/vue-YqIdEku3.js +34 -0
  642. package/dist/component/vue-html-BkvRG1qx.js +11 -0
  643. package/dist/component/vue-html-CXFz0iVx.js +11 -0
  644. package/dist/component/vue-vine-CFD4nsF4.js +21 -0
  645. package/dist/component/vue-vine-lE-jUeB6.js +21 -0
  646. package/dist/component/vyper-DTCkLS2f.js +9 -0
  647. package/dist/component/vyper-_vSvOdCD.js +9 -0
  648. package/dist/component/wardley-L42UT6IY-HA1eSIS_.js +23141 -0
  649. package/dist/component/wardleyDiagram-YWT4CUSO-Uu5KXQum.js +681 -0
  650. package/dist/component/wasm-BEUtLzBq.js +10 -0
  651. package/dist/component/wasm-Bw9k5bmy.js +9 -0
  652. package/dist/component/wasm-NiufRxKC.js +9 -0
  653. package/dist/component/wasm-rA9i46L9.js +10 -0
  654. package/dist/component/wenyan-BAnK6VvJ.js +9 -0
  655. package/dist/component/wenyan-EBJbIPqf.js +9 -0
  656. package/dist/component/wgsl-B9MSpOv3.js +9 -0
  657. package/dist/component/wgsl-Dlg8zdV4.js +9 -0
  658. package/dist/component/wikitext-C8AvgBS7.js +9 -0
  659. package/dist/component/wikitext-sNd9wc1e.js +9 -0
  660. package/dist/component/wit-BM4EHoLb.js +9 -0
  661. package/dist/component/wit-BUXWAgVD.js +9 -0
  662. package/dist/component/wolfram-Ba-Qm5eW.js +9 -0
  663. package/dist/component/wolfram-CKRVXwGa.js +9 -0
  664. package/dist/component/xml-CE4MTCb-.js +11 -0
  665. package/dist/component/xml-DXvCmeFI.js +11 -0
  666. package/dist/component/xsl-BrFD-9o5.js +11 -0
  667. package/dist/component/xsl-CHBQO4kd.js +11 -0
  668. package/dist/component/xychartDiagram-2RQKCTM6-IkxwUbCF.js +1375 -0
  669. package/dist/component/yaml-CF4mYNnF.js +9 -0
  670. package/dist/component/yaml-XzfbPk1C.js +9 -0
  671. package/dist/component/zenscript-C0pvNsdh.js +9 -0
  672. package/dist/component/zenscript-xkkNgCqg.js +9 -0
  673. package/dist/component/zig-Bz6GLPWH.js +9 -0
  674. package/dist/component/zig-oixaTxav.js +9 -0
  675. package/dist/components/ai-elements/attachments.d.ts +54 -0
  676. package/dist/components/ai-elements/code-block.d.ts +46 -0
  677. package/dist/components/ai-elements/conversation.d.ts +23 -0
  678. package/dist/components/ai-elements/copy-button.d.ts +6 -0
  679. package/dist/components/ai-elements/file-tree.d.ts +26 -0
  680. package/dist/components/ai-elements/link-safety-modal.d.ts +8 -0
  681. package/dist/components/ai-elements/message.d.ts +38 -0
  682. package/dist/components/ai-elements/plan.d.ts +25 -0
  683. package/dist/components/ai-elements/prompt-input.d.ts +158 -0
  684. package/dist/components/ai-elements/reasoning.d.ts +26 -0
  685. package/dist/components/ai-elements/shell-highlight.d.ts +3 -0
  686. package/dist/components/ai-elements/shimmer.d.ts +9 -0
  687. package/dist/components/ai-elements/suggestion.d.ts +10 -0
  688. package/dist/components/ai-elements/task.d.ts +14 -0
  689. package/dist/components/ai-elements/terminal-task.d.ts +5 -0
  690. package/dist/components/ai-elements/tool.d.ts +31 -0
  691. package/dist/components/embed/AgentGrantCard.d.ts +25 -0
  692. package/dist/components/embed/AtMentionMenu.d.ts +13 -0
  693. package/dist/components/embed/BelongMark.d.ts +4 -0
  694. package/dist/components/embed/BrandMark.d.ts +11 -0
  695. package/dist/components/embed/CapabilityHints.d.ts +1 -0
  696. package/dist/components/embed/ComposerMenu.d.ts +36 -0
  697. package/dist/components/embed/CsvTable.d.ts +10 -0
  698. package/dist/components/embed/EmbedAvatar.d.ts +35 -0
  699. package/dist/components/embed/EmbedComposer.d.ts +31 -0
  700. package/dist/components/embed/EmbedConversation.d.ts +31 -0
  701. package/dist/components/embed/EmbedFiles.d.ts +28 -0
  702. package/dist/components/embed/EmbedHeader.d.ts +11 -0
  703. package/dist/components/embed/EmbedLogin.d.ts +11 -0
  704. package/dist/components/embed/EmbedRail.d.ts +49 -0
  705. package/dist/components/embed/EmbedSessions.d.ts +23 -0
  706. package/dist/components/embed/FilePreview.d.ts +12 -0
  707. package/dist/components/embed/FilePreviewDialog.d.ts +19 -0
  708. package/dist/components/embed/MentionInput.d.ts +23 -0
  709. package/dist/components/embed/MentionPill.d.ts +25 -0
  710. package/dist/components/embed/OnboardingOverlay.d.ts +21 -0
  711. package/dist/components/embed/OnboardingTour.d.ts +24 -0
  712. package/dist/components/embed/OnboardingWelcome.d.ts +23 -0
  713. package/dist/components/embed/PlanCue.d.ts +9 -0
  714. package/dist/components/embed/PlanPanel.d.ts +13 -0
  715. package/dist/components/embed/PlanView.d.ts +16 -0
  716. package/dist/components/embed/PoweredByBelong.d.ts +7 -0
  717. package/dist/components/embed/PreviewContent.d.ts +26 -0
  718. package/dist/components/embed/PreviewPanel.d.ts +17 -0
  719. package/dist/components/embed/ProgressRing.d.ts +13 -0
  720. package/dist/components/embed/SlashCommandMenu.d.ts +13 -0
  721. package/dist/components/embed/UploadedFiles.d.ts +9 -0
  722. package/dist/components/embed/UsageMeter.d.ts +9 -0
  723. package/dist/components/embed/WelcomeIntro.d.ts +10 -0
  724. package/dist/components/embed/WorkspaceTree.d.ts +22 -0
  725. package/dist/components/embed/__plan-test-utils__.d.ts +13 -0
  726. package/dist/components/embed/dev-runtime-bar.d.ts +21 -0
  727. package/dist/components/embed/embed-composer.fixtures.d.ts +3 -0
  728. package/dist/components/embed/embed-rail.fixtures.d.ts +3 -0
  729. package/dist/components/embed/file-preview-kind.d.ts +7 -0
  730. package/dist/components/embed/onboarding-story-dock.d.ts +20 -0
  731. package/dist/components/embed/onboarding.fixtures.d.ts +9 -0
  732. package/dist/components/embed/parse-csv.d.ts +10 -0
  733. package/dist/components/embed/preview-content-kind.d.ts +15 -0
  734. package/dist/components/embed/use-panel-resize.d.ts +4 -0
  735. package/dist/components/embed/use-preview-bytes.d.ts +39 -0
  736. package/dist/components/feedback/feedback-metadata.d.ts +37 -0
  737. package/dist/components/feedback/message-feedback.d.ts +9 -0
  738. package/dist/components/ui/accordion.d.ts +7 -0
  739. package/dist/components/ui/alert.d.ts +9 -0
  740. package/dist/components/ui/avatar.d.ts +11 -0
  741. package/dist/components/ui/badge.d.ts +9 -0
  742. package/dist/components/ui/button-group.d.ts +11 -0
  743. package/dist/components/ui/button.d.ts +10 -0
  744. package/dist/components/ui/card.d.ts +9 -0
  745. package/dist/components/ui/carousel.d.ts +19 -0
  746. package/dist/components/ui/checkbox.d.ts +4 -0
  747. package/dist/components/ui/collapsible.d.ts +5 -0
  748. package/dist/components/ui/command.d.ts +18 -0
  749. package/dist/components/ui/dialog.d.ts +17 -0
  750. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  751. package/dist/components/ui/hover-card.d.ts +6 -0
  752. package/dist/components/ui/input-group.d.ts +16 -0
  753. package/dist/components/ui/input.d.ts +3 -0
  754. package/dist/components/ui/popover.d.ts +10 -0
  755. package/dist/components/ui/progress.d.ts +4 -0
  756. package/dist/components/ui/radio-group.d.ts +5 -0
  757. package/dist/components/ui/scroll-area.d.ts +5 -0
  758. package/dist/components/ui/select.d.ts +15 -0
  759. package/dist/components/ui/separator.d.ts +4 -0
  760. package/dist/components/ui/spinner.d.ts +2 -0
  761. package/dist/components/ui/switch.d.ts +6 -0
  762. package/dist/components/ui/tabs.d.ts +11 -0
  763. package/dist/components/ui/textarea.d.ts +3 -0
  764. package/dist/components/ui/tooltip.d.ts +7 -0
  765. package/dist/dev-main.d.ts +0 -0
  766. package/dist/embed/agent-grant-refresh.d.ts +37 -0
  767. package/dist/embed/at-mentions.d.ts +80 -0
  768. package/dist/embed/auth0-refresh.d.ts +78 -0
  769. package/dist/embed/auto-embed.d.ts +19 -0
  770. package/dist/embed/bootstrap.d.ts +10 -0
  771. package/dist/embed/brand-marks.d.ts +11 -0
  772. package/dist/embed/build-info.d.ts +30 -0
  773. package/dist/embed/build-version.d.ts +28 -0
  774. package/dist/embed/chat-mode.d.ts +46 -0
  775. package/dist/embed/composer-focus.d.ts +14 -0
  776. package/dist/embed/copy.d.ts +84 -0
  777. package/dist/embed/custom-css.d.ts +2 -0
  778. package/dist/embed/debug-overrides.d.ts +11 -0
  779. package/dist/embed/dev-mode.d.ts +56 -0
  780. package/dist/embed/dock-layout.d.ts +30 -0
  781. package/dist/embed/dock-state.d.ts +32 -0
  782. package/dist/embed/download-url.d.ts +9 -0
  783. package/dist/embed/file-type-icon.d.ts +29 -0
  784. package/dist/embed/format-bytes.d.ts +2 -0
  785. package/dist/embed/global.d.ts +79 -0
  786. package/dist/embed/locale.d.ts +18 -0
  787. package/dist/embed/logo.d.ts +1 -0
  788. package/dist/embed/mic-press.d.ts +27 -0
  789. package/dist/embed/onboarding-prefs.d.ts +52 -0
  790. package/dist/embed/onboarding-steps.d.ts +27 -0
  791. package/dist/embed/onboarding-store.d.ts +39 -0
  792. package/dist/embed/plan-auto-open.d.ts +8 -0
  793. package/dist/embed/plan-decision.d.ts +10 -0
  794. package/dist/embed/plan-intent.d.ts +17 -0
  795. package/dist/embed/portal-container.d.ts +23 -0
  796. package/dist/embed/presets.d.ts +29 -0
  797. package/dist/embed/session-record.d.ts +16 -0
  798. package/dist/embed/shadow-mount.d.ts +37 -0
  799. package/dist/embed/slash-commands.d.ts +49 -0
  800. package/dist/embed/theme.d.ts +40 -0
  801. package/dist/embed/universe-origin.d.ts +24 -0
  802. package/dist/embed/use-workspace-file-download.d.ts +16 -0
  803. package/dist/embed/voice/audio-forwarder.worklet.d.ts +22 -0
  804. package/dist/embed/voice/audio-utils.d.ts +38 -0
  805. package/dist/embed/voice/deepgram-stt.d.ts +69 -0
  806. package/dist/embed/voice/mic-capture.d.ts +34 -0
  807. package/dist/embed/voice/sentence-split.d.ts +11 -0
  808. package/dist/embed/voice/voice-http.d.ts +8 -0
  809. package/dist/embed/voice/voice-token.d.ts +40 -0
  810. package/dist/embed/voice-bus.d.ts +75 -0
  811. package/dist/embed/voice-config.d.ts +52 -0
  812. package/dist/embed/voice-fillers.d.ts +2 -0
  813. package/dist/embed/voice-prefs.d.ts +55 -0
  814. package/dist/embed/voice-tts.d.ts +101 -0
  815. package/dist/embed/workspace-paths.d.ts +9 -0
  816. package/dist/infrastructure/telemetry/session-span-processor.d.ts +11 -0
  817. package/dist/infrastructure/telemetry/web-sdk.d.ts +29 -0
  818. package/dist/lib/belong.d.ts +12 -0
  819. package/dist/lib/tab-leadership.d.ts +46 -0
  820. package/dist/lib/use-tab-leadership.d.ts +8 -0
  821. package/dist/lib/utils.d.ts +9 -0
  822. package/dist/public-api.d.ts +3 -0
  823. package/dist/routes/chat-attachment-chip.d.ts +9 -0
  824. package/dist/routes/chat.d.ts +29 -0
  825. package/dist/routes/documents.d.ts +16 -0
  826. package/dist/routes/files.d.ts +14 -0
  827. package/dist/routes/sample-artifact.d.ts +7 -0
  828. package/dist/routes/sessions.d.ts +4 -0
  829. package/dist/routes/static-chat-fixture.d.ts +26 -0
  830. package/dist/stream/ai-sdk-part-renderers.d.ts +66 -0
  831. package/dist/stream/belong-chat-transport.d.ts +679 -0
  832. package/dist/stream/belong-data-parts.d.ts +207 -0
  833. package/dist/stream/chat-upload.d.ts +35 -0
  834. package/dist/stream/plan-panel-store.d.ts +11 -0
  835. package/dist/stream/plan-progress-store.d.ts +4 -0
  836. package/dist/stream/plan-progress.d.ts +25 -0
  837. package/dist/stream/plan-store.d.ts +16 -0
  838. package/dist/stream/preview-panel-store.d.ts +50 -0
  839. package/dist/stream/sandbox-output.d.ts +32 -0
  840. package/dist/stream/select-latest-plan.d.ts +17 -0
  841. package/dist/stream/select-session-usage.d.ts +23 -0
  842. package/dist/stream/session-title.d.ts +15 -0
  843. package/dist/stream/stream-state-store.d.ts +67 -0
  844. package/dist/stream/tool-io.d.ts +7 -0
  845. package/dist/test/render.d.ts +23 -0
  846. package/dist/test-setup.d.ts +1 -0
  847. package/dist/types/public.d.ts +189 -0
  848. package/package.json +38 -0
@@ -0,0 +1,4697 @@
1
+ import { b7 as $e, _ as dt, N as ke, ai as Ze, l as Re, b as qe, a as Qe, q as Je, t as Ke, g as je, s as _e, B as tr, I as er, G as rr, K as ir, c as ye, aR as Ee, b8 as ve, i as ar, d as nr, y as or, b9 as sr, ba as hr } from "./mermaid-GHXKKRXX-C5Y3BZXR.js";
2
+ import { p as lr } from "./chunk-4BX2VUAB-gRTK7Di9.js";
3
+ import { p as fr } from "./wardley-L42UT6IY-HA1eSIS_.js";
4
+ import { c as Se } from "./cytoscape.esm-C31R6JOv.js";
5
+ globalThis.process = globalThis.process || { env: {} };
6
+ globalThis.global = globalThis.global || globalThis;
7
+ var se = { exports: {} }, he = { exports: {} }, le = { exports: {} }, cr = le.exports, we;
8
+ function gr() {
9
+ return we || (we = 1, (function(C, G) {
10
+ (function(U, L) {
11
+ C.exports = L();
12
+ })(cr, function() {
13
+ return (
14
+ /******/
15
+ (function(w) {
16
+ var U = {};
17
+ function L(u) {
18
+ if (U[u])
19
+ return U[u].exports;
20
+ var h = U[u] = {
21
+ /******/
22
+ i: u,
23
+ /******/
24
+ l: !1,
25
+ /******/
26
+ exports: {}
27
+ /******/
28
+ };
29
+ return w[u].call(h.exports, h, h.exports, L), h.l = !0, h.exports;
30
+ }
31
+ return L.m = w, L.c = U, L.i = function(u) {
32
+ return u;
33
+ }, L.d = function(u, h, a) {
34
+ L.o(u, h) || Object.defineProperty(u, h, {
35
+ /******/
36
+ configurable: !1,
37
+ /******/
38
+ enumerable: !0,
39
+ /******/
40
+ get: a
41
+ /******/
42
+ });
43
+ }, L.n = function(u) {
44
+ var h = u && u.__esModule ? (
45
+ /******/
46
+ function() {
47
+ return u.default;
48
+ }
49
+ ) : (
50
+ /******/
51
+ function() {
52
+ return u;
53
+ }
54
+ );
55
+ return L.d(h, "a", h), h;
56
+ }, L.o = function(u, h) {
57
+ return Object.prototype.hasOwnProperty.call(u, h);
58
+ }, L.p = "", L(L.s = 28);
59
+ })([
60
+ /* 0 */
61
+ /***/
62
+ (function(w, U, L) {
63
+ function u() {
64
+ }
65
+ u.QUALITY = 1, u.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, u.DEFAULT_INCREMENTAL = !1, u.DEFAULT_ANIMATION_ON_LAYOUT = !0, u.DEFAULT_ANIMATION_DURING_LAYOUT = !1, u.DEFAULT_ANIMATION_PERIOD = 50, u.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, u.DEFAULT_GRAPH_MARGIN = 15, u.NODE_DIMENSIONS_INCLUDE_LABELS = !1, u.SIMPLE_NODE_SIZE = 40, u.SIMPLE_NODE_HALF_SIZE = u.SIMPLE_NODE_SIZE / 2, u.EMPTY_COMPOUND_NODE_SIZE = 40, u.MIN_EDGE_LENGTH = 1, u.WORLD_BOUNDARY = 1e6, u.INITIAL_WORLD_BOUNDARY = u.WORLD_BOUNDARY / 1e3, u.WORLD_CENTER_X = 1200, u.WORLD_CENTER_Y = 900, w.exports = u;
66
+ }),
67
+ /* 1 */
68
+ /***/
69
+ (function(w, U, L) {
70
+ var u = L(2), h = L(8), a = L(9);
71
+ function e(f, r, v) {
72
+ u.call(this, v), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = v, this.bendpoints = [], this.source = f, this.target = r;
73
+ }
74
+ e.prototype = Object.create(u.prototype);
75
+ for (var i in u)
76
+ e[i] = u[i];
77
+ e.prototype.getSource = function() {
78
+ return this.source;
79
+ }, e.prototype.getTarget = function() {
80
+ return this.target;
81
+ }, e.prototype.isInterGraph = function() {
82
+ return this.isInterGraph;
83
+ }, e.prototype.getLength = function() {
84
+ return this.length;
85
+ }, e.prototype.isOverlapingSourceAndTarget = function() {
86
+ return this.isOverlapingSourceAndTarget;
87
+ }, e.prototype.getBendpoints = function() {
88
+ return this.bendpoints;
89
+ }, e.prototype.getLca = function() {
90
+ return this.lca;
91
+ }, e.prototype.getSourceInLca = function() {
92
+ return this.sourceInLca;
93
+ }, e.prototype.getTargetInLca = function() {
94
+ return this.targetInLca;
95
+ }, e.prototype.getOtherEnd = function(f) {
96
+ if (this.source === f)
97
+ return this.target;
98
+ if (this.target === f)
99
+ return this.source;
100
+ throw "Node is not incident with this edge";
101
+ }, e.prototype.getOtherEndInGraph = function(f, r) {
102
+ for (var v = this.getOtherEnd(f), t = r.getGraphManager().getRoot(); ; ) {
103
+ if (v.getOwner() == r)
104
+ return v;
105
+ if (v.getOwner() == t)
106
+ break;
107
+ v = v.getOwner().getParent();
108
+ }
109
+ return null;
110
+ }, e.prototype.updateLength = function() {
111
+ var f = new Array(4);
112
+ this.isOverlapingSourceAndTarget = h.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));
113
+ }, e.prototype.updateLengthSimple = function() {
114
+ 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);
115
+ }, w.exports = e;
116
+ }),
117
+ /* 2 */
118
+ /***/
119
+ (function(w, U, L) {
120
+ function u(h) {
121
+ this.vGraphObject = h;
122
+ }
123
+ w.exports = u;
124
+ }),
125
+ /* 3 */
126
+ /***/
127
+ (function(w, U, L) {
128
+ var u = L(2), h = L(10), a = L(13), e = L(0), i = L(16), f = L(5);
129
+ function r(t, s, o, c) {
130
+ o == null && c == null && (c = s), u.call(this, c), t.graphManager != null && (t = t.graphManager), this.estimatedSize = h.MIN_VALUE, this.inclusionTreeDepth = h.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();
131
+ }
132
+ r.prototype = Object.create(u.prototype);
133
+ for (var v in u)
134
+ r[v] = u[v];
135
+ r.prototype.getEdges = function() {
136
+ return this.edges;
137
+ }, r.prototype.getChild = function() {
138
+ return this.child;
139
+ }, r.prototype.getOwner = function() {
140
+ return this.owner;
141
+ }, r.prototype.getWidth = function() {
142
+ return this.rect.width;
143
+ }, r.prototype.setWidth = function(t) {
144
+ this.rect.width = t;
145
+ }, r.prototype.getHeight = function() {
146
+ return this.rect.height;
147
+ }, r.prototype.setHeight = function(t) {
148
+ this.rect.height = t;
149
+ }, r.prototype.getCenterX = function() {
150
+ return this.rect.x + this.rect.width / 2;
151
+ }, r.prototype.getCenterY = function() {
152
+ return this.rect.y + this.rect.height / 2;
153
+ }, r.prototype.getCenter = function() {
154
+ return new f(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
155
+ }, r.prototype.getLocation = function() {
156
+ return new f(this.rect.x, this.rect.y);
157
+ }, r.prototype.getRect = function() {
158
+ return this.rect;
159
+ }, r.prototype.getDiagonal = function() {
160
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
161
+ }, r.prototype.getHalfTheDiagonal = function() {
162
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
163
+ }, r.prototype.setRect = function(t, s) {
164
+ this.rect.x = t.x, this.rect.y = t.y, this.rect.width = s.width, this.rect.height = s.height;
165
+ }, r.prototype.setCenter = function(t, s) {
166
+ this.rect.x = t - this.rect.width / 2, this.rect.y = s - this.rect.height / 2;
167
+ }, r.prototype.setLocation = function(t, s) {
168
+ this.rect.x = t, this.rect.y = s;
169
+ }, r.prototype.moveBy = function(t, s) {
170
+ this.rect.x += t, this.rect.y += s;
171
+ }, r.prototype.getEdgeListToNode = function(t) {
172
+ var s = [], o = this;
173
+ return o.edges.forEach(function(c) {
174
+ if (c.target == t) {
175
+ if (c.source != o) throw "Incorrect edge source!";
176
+ s.push(c);
177
+ }
178
+ }), s;
179
+ }, r.prototype.getEdgesBetween = function(t) {
180
+ var s = [], o = this;
181
+ return o.edges.forEach(function(c) {
182
+ if (!(c.source == o || c.target == o)) throw "Incorrect edge source and/or target";
183
+ (c.target == t || c.source == t) && s.push(c);
184
+ }), s;
185
+ }, r.prototype.getNeighborsList = function() {
186
+ var t = /* @__PURE__ */ new Set(), s = this;
187
+ return s.edges.forEach(function(o) {
188
+ if (o.source == s)
189
+ t.add(o.target);
190
+ else {
191
+ if (o.target != s)
192
+ throw "Incorrect incidency!";
193
+ t.add(o.source);
194
+ }
195
+ }), t;
196
+ }, r.prototype.withChildren = function() {
197
+ var t = /* @__PURE__ */ new Set(), s, o;
198
+ if (t.add(this), this.child != null)
199
+ for (var c = this.child.getNodes(), l = 0; l < c.length; l++)
200
+ s = c[l], o = s.withChildren(), o.forEach(function(T) {
201
+ t.add(T);
202
+ });
203
+ return t;
204
+ }, r.prototype.getNoOfChildren = function() {
205
+ var t = 0, s;
206
+ if (this.child == null)
207
+ t = 1;
208
+ else
209
+ for (var o = this.child.getNodes(), c = 0; c < o.length; c++)
210
+ s = o[c], t += s.getNoOfChildren();
211
+ return t == 0 && (t = 1), t;
212
+ }, r.prototype.getEstimatedSize = function() {
213
+ if (this.estimatedSize == h.MIN_VALUE)
214
+ throw "assert failed";
215
+ return this.estimatedSize;
216
+ }, r.prototype.calcEstimatedSize = function() {
217
+ 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);
218
+ }, r.prototype.scatter = function() {
219
+ var t, s, o = -e.INITIAL_WORLD_BOUNDARY, c = e.INITIAL_WORLD_BOUNDARY;
220
+ t = e.WORLD_CENTER_X + i.nextDouble() * (c - o) + o;
221
+ var l = -e.INITIAL_WORLD_BOUNDARY, T = e.INITIAL_WORLD_BOUNDARY;
222
+ s = e.WORLD_CENTER_Y + i.nextDouble() * (T - l) + l, this.rect.x = t, this.rect.y = s;
223
+ }, r.prototype.updateBounds = function() {
224
+ if (this.getChild() == null)
225
+ throw "assert failed";
226
+ if (this.getChild().getNodes().length != 0) {
227
+ var t = this.getChild();
228
+ 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()), e.NODE_DIMENSIONS_INCLUDE_LABELS) {
229
+ var s = t.getRight() - t.getLeft(), o = t.getBottom() - t.getTop();
230
+ 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));
231
+ }
232
+ }
233
+ }, r.prototype.getInclusionTreeDepth = function() {
234
+ if (this.inclusionTreeDepth == h.MAX_VALUE)
235
+ throw "assert failed";
236
+ return this.inclusionTreeDepth;
237
+ }, r.prototype.transform = function(t) {
238
+ var s = this.rect.x;
239
+ s > e.WORLD_BOUNDARY ? s = e.WORLD_BOUNDARY : s < -e.WORLD_BOUNDARY && (s = -e.WORLD_BOUNDARY);
240
+ var o = this.rect.y;
241
+ o > e.WORLD_BOUNDARY ? o = e.WORLD_BOUNDARY : o < -e.WORLD_BOUNDARY && (o = -e.WORLD_BOUNDARY);
242
+ var c = new f(s, o), l = t.inverseTransformPoint(c);
243
+ this.setLocation(l.x, l.y);
244
+ }, r.prototype.getLeft = function() {
245
+ return this.rect.x;
246
+ }, r.prototype.getRight = function() {
247
+ return this.rect.x + this.rect.width;
248
+ }, r.prototype.getTop = function() {
249
+ return this.rect.y;
250
+ }, r.prototype.getBottom = function() {
251
+ return this.rect.y + this.rect.height;
252
+ }, r.prototype.getParent = function() {
253
+ return this.owner == null ? null : this.owner.getParent();
254
+ }, w.exports = r;
255
+ }),
256
+ /* 4 */
257
+ /***/
258
+ (function(w, U, L) {
259
+ var u = L(0);
260
+ function h() {
261
+ }
262
+ for (var a in u)
263
+ h[a] = u[a];
264
+ h.MAX_ITERATIONS = 2500, h.DEFAULT_EDGE_LENGTH = 50, h.DEFAULT_SPRING_STRENGTH = 0.45, h.DEFAULT_REPULSION_STRENGTH = 4500, h.DEFAULT_GRAVITY_STRENGTH = 0.4, h.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, h.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, h.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, h.COOLING_ADAPTATION_FACTOR = 0.33, h.ADAPTATION_LOWER_NODE_LIMIT = 1e3, h.ADAPTATION_UPPER_NODE_LIMIT = 5e3, h.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, h.MAX_NODE_DISPLACEMENT = h.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, h.MIN_REPULSION_DIST = h.DEFAULT_EDGE_LENGTH / 10, h.CONVERGENCE_CHECK_PERIOD = 100, h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, h.MIN_EDGE_LENGTH = 1, h.GRID_CALCULATION_CHECK_PERIOD = 10, w.exports = h;
265
+ }),
266
+ /* 5 */
267
+ /***/
268
+ (function(w, U, L) {
269
+ function u(h, a) {
270
+ h == null && a == null ? (this.x = 0, this.y = 0) : (this.x = h, this.y = a);
271
+ }
272
+ u.prototype.getX = function() {
273
+ return this.x;
274
+ }, u.prototype.getY = function() {
275
+ return this.y;
276
+ }, u.prototype.setX = function(h) {
277
+ this.x = h;
278
+ }, u.prototype.setY = function(h) {
279
+ this.y = h;
280
+ }, u.prototype.getDifference = function(h) {
281
+ return new DimensionD(this.x - h.x, this.y - h.y);
282
+ }, u.prototype.getCopy = function() {
283
+ return new u(this.x, this.y);
284
+ }, u.prototype.translate = function(h) {
285
+ return this.x += h.width, this.y += h.height, this;
286
+ }, w.exports = u;
287
+ }),
288
+ /* 6 */
289
+ /***/
290
+ (function(w, U, L) {
291
+ var u = L(2), h = L(10), a = L(0), e = L(7), i = L(3), f = L(1), r = L(13), v = L(12), t = L(11);
292
+ function s(c, l, T) {
293
+ u.call(this, T), this.estimatedSize = h.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = c, l != null && l instanceof e ? this.graphManager = l : l != null && l instanceof Layout && (this.graphManager = l.graphManager);
294
+ }
295
+ s.prototype = Object.create(u.prototype);
296
+ for (var o in u)
297
+ s[o] = u[o];
298
+ s.prototype.getNodes = function() {
299
+ return this.nodes;
300
+ }, s.prototype.getEdges = function() {
301
+ return this.edges;
302
+ }, s.prototype.getGraphManager = function() {
303
+ return this.graphManager;
304
+ }, s.prototype.getParent = function() {
305
+ return this.parent;
306
+ }, s.prototype.getLeft = function() {
307
+ return this.left;
308
+ }, s.prototype.getRight = function() {
309
+ return this.right;
310
+ }, s.prototype.getTop = function() {
311
+ return this.top;
312
+ }, s.prototype.getBottom = function() {
313
+ return this.bottom;
314
+ }, s.prototype.isConnected = function() {
315
+ return this.isConnected;
316
+ }, s.prototype.add = function(c, l, T) {
317
+ if (l == null && T == null) {
318
+ var g = c;
319
+ if (this.graphManager == null)
320
+ throw "Graph has no graph mgr!";
321
+ if (this.getNodes().indexOf(g) > -1)
322
+ throw "Node already in graph!";
323
+ return g.owner = this, this.getNodes().push(g), g;
324
+ } else {
325
+ var d = c;
326
+ if (!(this.getNodes().indexOf(l) > -1 && this.getNodes().indexOf(T) > -1))
327
+ throw "Source or target not in graph!";
328
+ if (!(l.owner == T.owner && l.owner == this))
329
+ throw "Both owners must be this graph!";
330
+ return l.owner != T.owner ? null : (d.source = l, d.target = T, d.isInterGraph = !1, this.getEdges().push(d), l.edges.push(d), T != l && T.edges.push(d), d);
331
+ }
332
+ }, s.prototype.remove = function(c) {
333
+ var l = c;
334
+ if (c instanceof i) {
335
+ if (l == null)
336
+ throw "Node is null!";
337
+ if (!(l.owner != null && l.owner == this))
338
+ throw "Owner graph is invalid!";
339
+ if (this.graphManager == null)
340
+ throw "Owner graph manager is invalid!";
341
+ for (var T = l.edges.slice(), g, d = T.length, N = 0; N < d; N++)
342
+ g = T[N], g.isInterGraph ? this.graphManager.remove(g) : g.source.owner.remove(g);
343
+ var b = this.nodes.indexOf(l);
344
+ if (b == -1)
345
+ throw "Node not in owner node list!";
346
+ this.nodes.splice(b, 1);
347
+ } else if (c instanceof f) {
348
+ var g = c;
349
+ if (g == null)
350
+ throw "Edge is null!";
351
+ if (!(g.source != null && g.target != null))
352
+ throw "Source and/or target is null!";
353
+ if (!(g.source.owner != null && g.target.owner != null && g.source.owner == this && g.target.owner == this))
354
+ throw "Source and/or target owner is invalid!";
355
+ var A = g.source.edges.indexOf(g), S = g.target.edges.indexOf(g);
356
+ if (!(A > -1 && S > -1))
357
+ throw "Source and/or target doesn't know this edge!";
358
+ g.source.edges.splice(A, 1), g.target != g.source && g.target.edges.splice(S, 1);
359
+ var b = g.source.owner.getEdges().indexOf(g);
360
+ if (b == -1)
361
+ throw "Not in owner's edge list!";
362
+ g.source.owner.getEdges().splice(b, 1);
363
+ }
364
+ }, s.prototype.updateLeftTop = function() {
365
+ for (var c = h.MAX_VALUE, l = h.MAX_VALUE, T, g, d, N = this.getNodes(), b = N.length, A = 0; A < b; A++) {
366
+ var S = N[A];
367
+ T = S.getTop(), g = S.getLeft(), c > T && (c = T), l > g && (l = g);
368
+ }
369
+ return c == h.MAX_VALUE ? null : (N[0].getParent().paddingLeft != null ? d = N[0].getParent().paddingLeft : d = this.margin, this.left = l - d, this.top = c - d, new v(this.left, this.top));
370
+ }, s.prototype.updateBounds = function(c) {
371
+ for (var l = h.MAX_VALUE, T = -h.MAX_VALUE, g = h.MAX_VALUE, d = -h.MAX_VALUE, N, b, A, S, V, X = this.nodes, Z = X.length, D = 0; D < Z; D++) {
372
+ var _ = X[D];
373
+ c && _.child != null && _.updateBounds(), N = _.getLeft(), b = _.getRight(), A = _.getTop(), S = _.getBottom(), l > N && (l = N), T < b && (T = b), g > A && (g = A), d < S && (d = S);
374
+ }
375
+ var n = new r(l, g, T - l, d - g);
376
+ l == h.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), X[0].getParent().paddingLeft != null ? V = X[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;
377
+ }, s.calculateBounds = function(c) {
378
+ for (var l = h.MAX_VALUE, T = -h.MAX_VALUE, g = h.MAX_VALUE, d = -h.MAX_VALUE, N, b, A, S, V = c.length, X = 0; X < V; X++) {
379
+ var Z = c[X];
380
+ N = Z.getLeft(), b = Z.getRight(), A = Z.getTop(), S = Z.getBottom(), l > N && (l = N), T < b && (T = b), g > A && (g = A), d < S && (d = S);
381
+ }
382
+ var D = new r(l, g, T - l, d - g);
383
+ return D;
384
+ }, s.prototype.getInclusionTreeDepth = function() {
385
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
386
+ }, s.prototype.getEstimatedSize = function() {
387
+ if (this.estimatedSize == h.MIN_VALUE)
388
+ throw "assert failed";
389
+ return this.estimatedSize;
390
+ }, s.prototype.calcEstimatedSize = function() {
391
+ for (var c = 0, l = this.nodes, T = l.length, g = 0; g < T; g++) {
392
+ var d = l[g];
393
+ c += d.calcEstimatedSize();
394
+ }
395
+ return c == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = c / Math.sqrt(this.nodes.length), this.estimatedSize;
396
+ }, s.prototype.updateConnected = function() {
397
+ var c = this;
398
+ if (this.nodes.length == 0) {
399
+ this.isConnected = !0;
400
+ return;
401
+ }
402
+ var l = new t(), T = /* @__PURE__ */ new Set(), g = this.nodes[0], d, N, b = g.withChildren();
403
+ for (b.forEach(function(D) {
404
+ l.push(D), T.add(D);
405
+ }); l.length !== 0; ) {
406
+ g = l.shift(), d = g.getEdges();
407
+ for (var A = d.length, S = 0; S < A; S++) {
408
+ var V = d[S];
409
+ if (N = V.getOtherEndInGraph(g, this), N != null && !T.has(N)) {
410
+ var X = N.withChildren();
411
+ X.forEach(function(D) {
412
+ l.push(D), T.add(D);
413
+ });
414
+ }
415
+ }
416
+ }
417
+ if (this.isConnected = !1, T.size >= this.nodes.length) {
418
+ var Z = 0;
419
+ T.forEach(function(D) {
420
+ D.owner == c && Z++;
421
+ }), Z == this.nodes.length && (this.isConnected = !0);
422
+ }
423
+ }, w.exports = s;
424
+ }),
425
+ /* 7 */
426
+ /***/
427
+ (function(w, U, L) {
428
+ var u, h = L(1);
429
+ function a(e) {
430
+ u = L(6), this.layout = e, this.graphs = [], this.edges = [];
431
+ }
432
+ a.prototype.addRoot = function() {
433
+ var e = this.layout.newGraph(), i = this.layout.newNode(null), f = this.add(e, i);
434
+ return this.setRootGraph(f), this.rootGraph;
435
+ }, a.prototype.add = function(e, i, f, r, v) {
436
+ if (f == null && r == null && v == null) {
437
+ if (e == null)
438
+ throw "Graph is null!";
439
+ if (i == null)
440
+ throw "Parent node is null!";
441
+ if (this.graphs.indexOf(e) > -1)
442
+ throw "Graph already in this graph mgr!";
443
+ if (this.graphs.push(e), e.parent != null)
444
+ throw "Already has a parent!";
445
+ if (i.child != null)
446
+ throw "Already has a child!";
447
+ return e.parent = i, i.child = e, e;
448
+ } else {
449
+ v = f, r = i, f = e;
450
+ var t = r.getOwner(), s = v.getOwner();
451
+ if (!(t != null && t.getGraphManager() == this))
452
+ throw "Source not in this graph mgr!";
453
+ if (!(s != null && s.getGraphManager() == this))
454
+ throw "Target not in this graph mgr!";
455
+ if (t == s)
456
+ return f.isInterGraph = !1, t.add(f, r, v);
457
+ if (f.isInterGraph = !0, f.source = r, f.target = v, this.edges.indexOf(f) > -1)
458
+ throw "Edge already in inter-graph edge list!";
459
+ if (this.edges.push(f), !(f.source != null && f.target != null))
460
+ throw "Edge source and/or target is null!";
461
+ if (!(f.source.edges.indexOf(f) == -1 && f.target.edges.indexOf(f) == -1))
462
+ throw "Edge already in source and/or target incidency list!";
463
+ return f.source.edges.push(f), f.target.edges.push(f), f;
464
+ }
465
+ }, a.prototype.remove = function(e) {
466
+ if (e instanceof u) {
467
+ var i = e;
468
+ if (i.getGraphManager() != this)
469
+ throw "Graph not in this graph mgr";
470
+ if (!(i == this.rootGraph || i.parent != null && i.parent.graphManager == this))
471
+ throw "Invalid parent node!";
472
+ var f = [];
473
+ f = f.concat(i.getEdges());
474
+ for (var r, v = f.length, t = 0; t < v; t++)
475
+ r = f[t], i.remove(r);
476
+ var s = [];
477
+ s = s.concat(i.getNodes());
478
+ var o;
479
+ v = s.length;
480
+ for (var t = 0; t < v; t++)
481
+ o = s[t], i.remove(o);
482
+ i == this.rootGraph && this.setRootGraph(null);
483
+ var c = this.graphs.indexOf(i);
484
+ this.graphs.splice(c, 1), i.parent = null;
485
+ } else if (e instanceof h) {
486
+ if (r = e, r == null)
487
+ throw "Edge is null!";
488
+ if (!r.isInterGraph)
489
+ throw "Not an inter-graph edge!";
490
+ if (!(r.source != null && r.target != null))
491
+ throw "Source and/or target is null!";
492
+ if (!(r.source.edges.indexOf(r) != -1 && r.target.edges.indexOf(r) != -1))
493
+ throw "Source and/or target doesn't know this edge!";
494
+ var c = r.source.edges.indexOf(r);
495
+ if (r.source.edges.splice(c, 1), c = r.target.edges.indexOf(r), r.target.edges.splice(c, 1), !(r.source.owner != null && r.source.owner.getGraphManager() != null))
496
+ throw "Edge owner graph or owner graph manager is null!";
497
+ if (r.source.owner.getGraphManager().edges.indexOf(r) == -1)
498
+ throw "Not in owner graph manager's edge list!";
499
+ var c = r.source.owner.getGraphManager().edges.indexOf(r);
500
+ r.source.owner.getGraphManager().edges.splice(c, 1);
501
+ }
502
+ }, a.prototype.updateBounds = function() {
503
+ this.rootGraph.updateBounds(!0);
504
+ }, a.prototype.getGraphs = function() {
505
+ return this.graphs;
506
+ }, a.prototype.getAllNodes = function() {
507
+ if (this.allNodes == null) {
508
+ for (var e = [], i = this.getGraphs(), f = i.length, r = 0; r < f; r++)
509
+ e = e.concat(i[r].getNodes());
510
+ this.allNodes = e;
511
+ }
512
+ return this.allNodes;
513
+ }, a.prototype.resetAllNodes = function() {
514
+ this.allNodes = null;
515
+ }, a.prototype.resetAllEdges = function() {
516
+ this.allEdges = null;
517
+ }, a.prototype.resetAllNodesToApplyGravitation = function() {
518
+ this.allNodesToApplyGravitation = null;
519
+ }, a.prototype.getAllEdges = function() {
520
+ if (this.allEdges == null) {
521
+ var e = [], i = this.getGraphs();
522
+ i.length;
523
+ for (var f = 0; f < i.length; f++)
524
+ e = e.concat(i[f].getEdges());
525
+ e = e.concat(this.edges), this.allEdges = e;
526
+ }
527
+ return this.allEdges;
528
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
529
+ return this.allNodesToApplyGravitation;
530
+ }, a.prototype.setAllNodesToApplyGravitation = function(e) {
531
+ if (this.allNodesToApplyGravitation != null)
532
+ throw "assert failed";
533
+ this.allNodesToApplyGravitation = e;
534
+ }, a.prototype.getRoot = function() {
535
+ return this.rootGraph;
536
+ }, a.prototype.setRootGraph = function(e) {
537
+ if (e.getGraphManager() != this)
538
+ throw "Root not in this graph mgr!";
539
+ this.rootGraph = e, e.parent == null && (e.parent = this.layout.newNode("Root node"));
540
+ }, a.prototype.getLayout = function() {
541
+ return this.layout;
542
+ }, a.prototype.isOneAncestorOfOther = function(e, i) {
543
+ if (!(e != null && i != null))
544
+ throw "assert failed";
545
+ if (e == i)
546
+ return !0;
547
+ var f = e.getOwner(), r;
548
+ do {
549
+ if (r = f.getParent(), r == null)
550
+ break;
551
+ if (r == i)
552
+ return !0;
553
+ if (f = r.getOwner(), f == null)
554
+ break;
555
+ } while (!0);
556
+ f = i.getOwner();
557
+ do {
558
+ if (r = f.getParent(), r == null)
559
+ break;
560
+ if (r == e)
561
+ return !0;
562
+ if (f = r.getOwner(), f == null)
563
+ break;
564
+ } while (!0);
565
+ return !1;
566
+ }, a.prototype.calcLowestCommonAncestors = function() {
567
+ for (var e, i, f, r, v, t = this.getAllEdges(), s = t.length, o = 0; o < s; o++) {
568
+ if (e = t[o], i = e.source, f = e.target, e.lca = null, e.sourceInLca = i, e.targetInLca = f, i == f) {
569
+ e.lca = i.getOwner();
570
+ continue;
571
+ }
572
+ for (r = i.getOwner(); e.lca == null; ) {
573
+ for (e.targetInLca = f, v = f.getOwner(); e.lca == null; ) {
574
+ if (v == r) {
575
+ e.lca = v;
576
+ break;
577
+ }
578
+ if (v == this.rootGraph)
579
+ break;
580
+ if (e.lca != null)
581
+ throw "assert failed";
582
+ e.targetInLca = v.getParent(), v = e.targetInLca.getOwner();
583
+ }
584
+ if (r == this.rootGraph)
585
+ break;
586
+ e.lca == null && (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
587
+ }
588
+ if (e.lca == null)
589
+ throw "assert failed";
590
+ }
591
+ }, a.prototype.calcLowestCommonAncestor = function(e, i) {
592
+ if (e == i)
593
+ return e.getOwner();
594
+ var f = e.getOwner();
595
+ do {
596
+ if (f == null)
597
+ break;
598
+ var r = i.getOwner();
599
+ do {
600
+ if (r == null)
601
+ break;
602
+ if (r == f)
603
+ return r;
604
+ r = r.getParent().getOwner();
605
+ } while (!0);
606
+ f = f.getParent().getOwner();
607
+ } while (!0);
608
+ return f;
609
+ }, a.prototype.calcInclusionTreeDepths = function(e, i) {
610
+ e == null && i == null && (e = this.rootGraph, i = 1);
611
+ for (var f, r = e.getNodes(), v = r.length, t = 0; t < v; t++)
612
+ f = r[t], f.inclusionTreeDepth = i, f.child != null && this.calcInclusionTreeDepths(f.child, i + 1);
613
+ }, a.prototype.includesInvalidEdge = function() {
614
+ for (var e, i = [], f = this.edges.length, r = 0; r < f; r++)
615
+ e = this.edges[r], this.isOneAncestorOfOther(e.source, e.target) && i.push(e);
616
+ for (var r = 0; r < i.length; r++)
617
+ this.remove(i[r]);
618
+ return !1;
619
+ }, w.exports = a;
620
+ }),
621
+ /* 8 */
622
+ /***/
623
+ (function(w, U, L) {
624
+ var u = L(12);
625
+ function h() {
626
+ }
627
+ h.calcSeparationAmount = function(a, e, i, f) {
628
+ if (!a.intersects(e))
629
+ throw "assert failed";
630
+ var r = new Array(2);
631
+ this.decideDirectionsForOverlappingNodes(a, e, r), i[0] = Math.min(a.getRight(), e.getRight()) - Math.max(a.x, e.x), i[1] = Math.min(a.getBottom(), e.getBottom()) - Math.max(a.y, e.y), a.getX() <= e.getX() && a.getRight() >= e.getRight() ? i[0] += Math.min(e.getX() - a.getX(), a.getRight() - e.getRight()) : e.getX() <= a.getX() && e.getRight() >= a.getRight() && (i[0] += Math.min(a.getX() - e.getX(), e.getRight() - a.getRight())), a.getY() <= e.getY() && a.getBottom() >= e.getBottom() ? i[1] += Math.min(e.getY() - a.getY(), a.getBottom() - e.getBottom()) : e.getY() <= a.getY() && e.getBottom() >= a.getBottom() && (i[1] += Math.min(a.getY() - e.getY(), e.getBottom() - a.getBottom()));
632
+ var v = Math.abs((e.getCenterY() - a.getCenterY()) / (e.getCenterX() - a.getCenterX()));
633
+ e.getCenterY() === a.getCenterY() && e.getCenterX() === a.getCenterX() && (v = 1);
634
+ var t = v * i[0], s = i[1] / v;
635
+ i[0] < s ? s = i[0] : t = i[1], i[0] = -1 * r[0] * (s / 2 + f), i[1] = -1 * r[1] * (t / 2 + f);
636
+ }, h.decideDirectionsForOverlappingNodes = function(a, e, i) {
637
+ a.getCenterX() < e.getCenterX() ? i[0] = -1 : i[0] = 1, a.getCenterY() < e.getCenterY() ? i[1] = -1 : i[1] = 1;
638
+ }, h.getIntersection2 = function(a, e, i) {
639
+ var f = a.getCenterX(), r = a.getCenterY(), v = e.getCenterX(), t = e.getCenterY();
640
+ if (a.intersects(e))
641
+ return i[0] = f, i[1] = r, i[2] = v, i[3] = t, !0;
642
+ var s = a.getX(), o = a.getY(), c = a.getRight(), l = a.getX(), T = a.getBottom(), g = a.getRight(), d = a.getWidthHalf(), N = a.getHeightHalf(), b = e.getX(), A = e.getY(), S = e.getRight(), V = e.getX(), X = e.getBottom(), Z = e.getRight(), D = e.getWidthHalf(), _ = e.getHeightHalf(), n = !1, m = !1;
643
+ if (f === v) {
644
+ if (r > t)
645
+ return i[0] = f, i[1] = o, i[2] = v, i[3] = X, !1;
646
+ if (r < t)
647
+ return i[0] = f, i[1] = T, i[2] = v, i[3] = A, !1;
648
+ } else if (r === t) {
649
+ if (f > v)
650
+ return i[0] = s, i[1] = r, i[2] = S, i[3] = t, !1;
651
+ if (f < v)
652
+ return i[0] = c, i[1] = r, i[2] = b, i[3] = t, !1;
653
+ } else {
654
+ var p = a.height / a.width, E = e.height / e.width, y = (t - r) / (v - f), I = void 0, M = void 0, R = void 0, W = void 0, x = void 0, Q = void 0;
655
+ if (-p === y ? f > v ? (i[0] = l, i[1] = T, n = !0) : (i[0] = c, i[1] = o, n = !0) : p === y && (f > v ? (i[0] = s, i[1] = o, n = !0) : (i[0] = g, i[1] = T, n = !0)), -E === y ? v > f ? (i[2] = V, i[3] = X, m = !0) : (i[2] = S, i[3] = A, m = !0) : E === y && (v > f ? (i[2] = b, i[3] = A, m = !0) : (i[2] = Z, i[3] = X, m = !0)), n && m)
656
+ return !1;
657
+ if (f > v ? r > t ? (I = this.getCardinalDirection(p, y, 4), M = this.getCardinalDirection(E, y, 2)) : (I = this.getCardinalDirection(-p, y, 3), M = this.getCardinalDirection(-E, y, 1)) : r > t ? (I = this.getCardinalDirection(-p, y, 1), M = this.getCardinalDirection(-E, y, 3)) : (I = this.getCardinalDirection(p, y, 2), M = this.getCardinalDirection(E, y, 4)), !n)
658
+ switch (I) {
659
+ case 1:
660
+ W = o, R = f + -N / y, i[0] = R, i[1] = W;
661
+ break;
662
+ case 2:
663
+ R = g, W = r + d * y, i[0] = R, i[1] = W;
664
+ break;
665
+ case 3:
666
+ W = T, R = f + N / y, i[0] = R, i[1] = W;
667
+ break;
668
+ case 4:
669
+ R = l, W = r + -d * y, i[0] = R, i[1] = W;
670
+ break;
671
+ }
672
+ if (!m)
673
+ switch (M) {
674
+ case 1:
675
+ Q = A, x = v + -_ / y, i[2] = x, i[3] = Q;
676
+ break;
677
+ case 2:
678
+ x = Z, Q = t + D * y, i[2] = x, i[3] = Q;
679
+ break;
680
+ case 3:
681
+ Q = X, x = v + _ / y, i[2] = x, i[3] = Q;
682
+ break;
683
+ case 4:
684
+ x = V, Q = t + -D * y, i[2] = x, i[3] = Q;
685
+ break;
686
+ }
687
+ }
688
+ return !1;
689
+ }, h.getCardinalDirection = function(a, e, i) {
690
+ return a > e ? i : 1 + i % 4;
691
+ }, h.getIntersection = function(a, e, i, f) {
692
+ if (f == null)
693
+ return this.getIntersection2(a, e, i);
694
+ var r = a.x, v = a.y, t = e.x, s = e.y, o = i.x, c = i.y, l = f.x, T = f.y, g = void 0, d = void 0, N = void 0, b = void 0, A = void 0, S = void 0, V = void 0, X = void 0, Z = void 0;
695
+ return N = s - v, A = r - t, V = t * v - r * s, b = T - c, S = o - l, X = l * c - o * T, Z = N * S - b * A, Z === 0 ? null : (g = (A * X - S * V) / Z, d = (b * V - N * X) / Z, new u(g, d));
696
+ }, h.angleOfVector = function(a, e, i, f) {
697
+ var r = void 0;
698
+ return a !== i ? (r = Math.atan((f - e) / (i - a)), i < a ? r += Math.PI : f < e && (r += this.TWO_PI)) : f < e ? r = this.ONE_AND_HALF_PI : r = this.HALF_PI, r;
699
+ }, h.doIntersect = function(a, e, i, f) {
700
+ var r = a.x, v = a.y, t = e.x, s = e.y, o = i.x, c = i.y, l = f.x, T = f.y, g = (t - r) * (T - c) - (l - o) * (s - v);
701
+ if (g === 0)
702
+ return !1;
703
+ var d = ((T - c) * (l - r) + (o - l) * (T - v)) / g, N = ((v - s) * (l - r) + (t - r) * (T - v)) / g;
704
+ return 0 < d && d < 1 && 0 < N && N < 1;
705
+ }, h.findCircleLineIntersections = function(a, e, i, f, r, v, t) {
706
+ var s = (i - a) * (i - a) + (f - e) * (f - e), o = 2 * ((a - r) * (i - a) + (e - v) * (f - e)), c = (a - r) * (a - r) + (e - v) * (e - v) - t * t, l = o * o - 4 * s * c;
707
+ if (l >= 0) {
708
+ var T = (-o + Math.sqrt(o * o - 4 * s * c)) / (2 * s), g = (-o - Math.sqrt(o * o - 4 * s * c)) / (2 * s), d = null;
709
+ return T >= 0 && T <= 1 ? [T] : g >= 0 && g <= 1 ? [g] : d;
710
+ } else return null;
711
+ }, h.HALF_PI = 0.5 * Math.PI, h.ONE_AND_HALF_PI = 1.5 * Math.PI, h.TWO_PI = 2 * Math.PI, h.THREE_PI = 3 * Math.PI, w.exports = h;
712
+ }),
713
+ /* 9 */
714
+ /***/
715
+ (function(w, U, L) {
716
+ function u() {
717
+ }
718
+ u.sign = function(h) {
719
+ return h > 0 ? 1 : h < 0 ? -1 : 0;
720
+ }, u.floor = function(h) {
721
+ return h < 0 ? Math.ceil(h) : Math.floor(h);
722
+ }, u.ceil = function(h) {
723
+ return h < 0 ? Math.floor(h) : Math.ceil(h);
724
+ }, w.exports = u;
725
+ }),
726
+ /* 10 */
727
+ /***/
728
+ (function(w, U, L) {
729
+ function u() {
730
+ }
731
+ u.MAX_VALUE = 2147483647, u.MIN_VALUE = -2147483648, w.exports = u;
732
+ }),
733
+ /* 11 */
734
+ /***/
735
+ (function(w, U, L) {
736
+ var u = /* @__PURE__ */ (function() {
737
+ function r(v, t) {
738
+ for (var s = 0; s < t.length; s++) {
739
+ var o = t[s];
740
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(v, o.key, o);
741
+ }
742
+ }
743
+ return function(v, t, s) {
744
+ return t && r(v.prototype, t), s && r(v, s), v;
745
+ };
746
+ })();
747
+ function h(r, v) {
748
+ if (!(r instanceof v))
749
+ throw new TypeError("Cannot call a class as a function");
750
+ }
751
+ var a = function(v) {
752
+ return { value: v, next: null, prev: null };
753
+ }, e = function(v, t, s, o) {
754
+ return v !== null ? v.next = t : o.head = t, s !== null ? s.prev = t : o.tail = t, t.prev = v, t.next = s, o.length++, t;
755
+ }, i = function(v, t) {
756
+ var s = v.prev, o = v.next;
757
+ return s !== null ? s.next = o : t.head = o, o !== null ? o.prev = s : t.tail = s, v.prev = v.next = null, t.length--, v;
758
+ }, f = (function() {
759
+ function r(v) {
760
+ var t = this;
761
+ h(this, r), this.length = 0, this.head = null, this.tail = null, v?.forEach(function(s) {
762
+ return t.push(s);
763
+ });
764
+ }
765
+ return u(r, [{
766
+ key: "size",
767
+ value: function() {
768
+ return this.length;
769
+ }
770
+ }, {
771
+ key: "insertBefore",
772
+ value: function(t, s) {
773
+ return e(s.prev, a(t), s, this);
774
+ }
775
+ }, {
776
+ key: "insertAfter",
777
+ value: function(t, s) {
778
+ return e(s, a(t), s.next, this);
779
+ }
780
+ }, {
781
+ key: "insertNodeBefore",
782
+ value: function(t, s) {
783
+ return e(s.prev, t, s, this);
784
+ }
785
+ }, {
786
+ key: "insertNodeAfter",
787
+ value: function(t, s) {
788
+ return e(s, t, s.next, this);
789
+ }
790
+ }, {
791
+ key: "push",
792
+ value: function(t) {
793
+ return e(this.tail, a(t), null, this);
794
+ }
795
+ }, {
796
+ key: "unshift",
797
+ value: function(t) {
798
+ return e(null, a(t), this.head, this);
799
+ }
800
+ }, {
801
+ key: "remove",
802
+ value: function(t) {
803
+ return i(t, this);
804
+ }
805
+ }, {
806
+ key: "pop",
807
+ value: function() {
808
+ return i(this.tail, this).value;
809
+ }
810
+ }, {
811
+ key: "popNode",
812
+ value: function() {
813
+ return i(this.tail, this);
814
+ }
815
+ }, {
816
+ key: "shift",
817
+ value: function() {
818
+ return i(this.head, this).value;
819
+ }
820
+ }, {
821
+ key: "shiftNode",
822
+ value: function() {
823
+ return i(this.head, this);
824
+ }
825
+ }, {
826
+ key: "get_object_at",
827
+ value: function(t) {
828
+ if (t <= this.length()) {
829
+ for (var s = 1, o = this.head; s < t; )
830
+ o = o.next, s++;
831
+ return o.value;
832
+ }
833
+ }
834
+ }, {
835
+ key: "set_object_at",
836
+ value: function(t, s) {
837
+ if (t <= this.length()) {
838
+ for (var o = 1, c = this.head; o < t; )
839
+ c = c.next, o++;
840
+ c.value = s;
841
+ }
842
+ }
843
+ }]), r;
844
+ })();
845
+ w.exports = f;
846
+ }),
847
+ /* 12 */
848
+ /***/
849
+ (function(w, U, L) {
850
+ function u(h, a, e) {
851
+ this.x = null, this.y = null, h == null && a == null && e == null ? (this.x = 0, this.y = 0) : typeof h == "number" && typeof a == "number" && e == null ? (this.x = h, this.y = a) : h.constructor.name == "Point" && a == null && e == null && (e = h, this.x = e.x, this.y = e.y);
852
+ }
853
+ u.prototype.getX = function() {
854
+ return this.x;
855
+ }, u.prototype.getY = function() {
856
+ return this.y;
857
+ }, u.prototype.getLocation = function() {
858
+ return new u(this.x, this.y);
859
+ }, u.prototype.setLocation = function(h, a, e) {
860
+ h.constructor.name == "Point" && a == null && e == null ? (e = h, this.setLocation(e.x, e.y)) : typeof h == "number" && typeof a == "number" && e == null && (parseInt(h) == h && parseInt(a) == a ? this.move(h, a) : (this.x = Math.floor(h + 0.5), this.y = Math.floor(a + 0.5)));
861
+ }, u.prototype.move = function(h, a) {
862
+ this.x = h, this.y = a;
863
+ }, u.prototype.translate = function(h, a) {
864
+ this.x += h, this.y += a;
865
+ }, u.prototype.equals = function(h) {
866
+ if (h.constructor.name == "Point") {
867
+ var a = h;
868
+ return this.x == a.x && this.y == a.y;
869
+ }
870
+ return this == h;
871
+ }, u.prototype.toString = function() {
872
+ return new u().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
873
+ }, w.exports = u;
874
+ }),
875
+ /* 13 */
876
+ /***/
877
+ (function(w, U, L) {
878
+ function u(h, a, e, i) {
879
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, h != null && a != null && e != null && i != null && (this.x = h, this.y = a, this.width = e, this.height = i);
880
+ }
881
+ u.prototype.getX = function() {
882
+ return this.x;
883
+ }, u.prototype.setX = function(h) {
884
+ this.x = h;
885
+ }, u.prototype.getY = function() {
886
+ return this.y;
887
+ }, u.prototype.setY = function(h) {
888
+ this.y = h;
889
+ }, u.prototype.getWidth = function() {
890
+ return this.width;
891
+ }, u.prototype.setWidth = function(h) {
892
+ this.width = h;
893
+ }, u.prototype.getHeight = function() {
894
+ return this.height;
895
+ }, u.prototype.setHeight = function(h) {
896
+ this.height = h;
897
+ }, u.prototype.getRight = function() {
898
+ return this.x + this.width;
899
+ }, u.prototype.getBottom = function() {
900
+ return this.y + this.height;
901
+ }, u.prototype.intersects = function(h) {
902
+ return !(this.getRight() < h.x || this.getBottom() < h.y || h.getRight() < this.x || h.getBottom() < this.y);
903
+ }, u.prototype.getCenterX = function() {
904
+ return this.x + this.width / 2;
905
+ }, u.prototype.getMinX = function() {
906
+ return this.getX();
907
+ }, u.prototype.getMaxX = function() {
908
+ return this.getX() + this.width;
909
+ }, u.prototype.getCenterY = function() {
910
+ return this.y + this.height / 2;
911
+ }, u.prototype.getMinY = function() {
912
+ return this.getY();
913
+ }, u.prototype.getMaxY = function() {
914
+ return this.getY() + this.height;
915
+ }, u.prototype.getWidthHalf = function() {
916
+ return this.width / 2;
917
+ }, u.prototype.getHeightHalf = function() {
918
+ return this.height / 2;
919
+ }, w.exports = u;
920
+ }),
921
+ /* 14 */
922
+ /***/
923
+ (function(w, U, L) {
924
+ var u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
925
+ return typeof a;
926
+ } : function(a) {
927
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
928
+ };
929
+ function h() {
930
+ }
931
+ h.lastID = 0, h.createID = function(a) {
932
+ return h.isPrimitive(a) ? a : (a.uniqueID != null || (a.uniqueID = h.getString(), h.lastID++), a.uniqueID);
933
+ }, h.getString = function(a) {
934
+ return a == null && (a = h.lastID), "Object#" + a;
935
+ }, h.isPrimitive = function(a) {
936
+ var e = typeof a > "u" ? "undefined" : u(a);
937
+ return a == null || e != "object" && e != "function";
938
+ }, w.exports = h;
939
+ }),
940
+ /* 15 */
941
+ /***/
942
+ (function(w, U, L) {
943
+ function u(o) {
944
+ if (Array.isArray(o)) {
945
+ for (var c = 0, l = Array(o.length); c < o.length; c++)
946
+ l[c] = o[c];
947
+ return l;
948
+ } else
949
+ return Array.from(o);
950
+ }
951
+ var h = L(0), a = L(7), e = L(3), i = L(1), f = L(6), r = L(5), v = L(17), t = L(29);
952
+ function s(o) {
953
+ t.call(this), this.layoutQuality = h.QUALITY, this.createBendsAsNeeded = h.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = h.DEFAULT_INCREMENTAL, this.animationOnLayout = h.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = h.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = h.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = h.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);
954
+ }
955
+ s.RANDOM_SEED = 1, s.prototype = Object.create(t.prototype), s.prototype.getGraphManager = function() {
956
+ return this.graphManager;
957
+ }, s.prototype.getAllNodes = function() {
958
+ return this.graphManager.getAllNodes();
959
+ }, s.prototype.getAllEdges = function() {
960
+ return this.graphManager.getAllEdges();
961
+ }, s.prototype.getAllNodesToApplyGravitation = function() {
962
+ return this.graphManager.getAllNodesToApplyGravitation();
963
+ }, s.prototype.newGraphManager = function() {
964
+ var o = new a(this);
965
+ return this.graphManager = o, o;
966
+ }, s.prototype.newGraph = function(o) {
967
+ return new f(null, this.graphManager, o);
968
+ }, s.prototype.newNode = function(o) {
969
+ return new e(this.graphManager, o);
970
+ }, s.prototype.newEdge = function(o) {
971
+ return new i(null, null, o);
972
+ }, s.prototype.checkLayoutSuccess = function() {
973
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
974
+ }, s.prototype.runLayout = function() {
975
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
976
+ var o;
977
+ return this.checkLayoutSuccess() ? o = !1 : o = this.layout(), h.ANIMATE === "during" ? !1 : (o && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, o);
978
+ }, s.prototype.doPostLayout = function() {
979
+ this.incremental || this.transform(), this.update();
980
+ }, s.prototype.update2 = function() {
981
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
982
+ for (var o = this.graphManager.getAllEdges(), c = 0; c < o.length; c++)
983
+ o[c];
984
+ for (var l = this.graphManager.getRoot().getNodes(), c = 0; c < l.length; c++)
985
+ l[c];
986
+ this.update(this.graphManager.getRoot());
987
+ }
988
+ }, s.prototype.update = function(o) {
989
+ if (o == null)
990
+ this.update2();
991
+ else if (o instanceof e) {
992
+ var c = o;
993
+ if (c.getChild() != null)
994
+ for (var l = c.getChild().getNodes(), T = 0; T < l.length; T++)
995
+ update(l[T]);
996
+ if (c.vGraphObject != null) {
997
+ var g = c.vGraphObject;
998
+ g.update(c);
999
+ }
1000
+ } else if (o instanceof i) {
1001
+ var d = o;
1002
+ if (d.vGraphObject != null) {
1003
+ var N = d.vGraphObject;
1004
+ N.update(d);
1005
+ }
1006
+ } else if (o instanceof f) {
1007
+ var b = o;
1008
+ if (b.vGraphObject != null) {
1009
+ var A = b.vGraphObject;
1010
+ A.update(b);
1011
+ }
1012
+ }
1013
+ }, s.prototype.initParameters = function() {
1014
+ this.isSubLayout || (this.layoutQuality = h.QUALITY, this.animationDuringLayout = h.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = h.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = h.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = h.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = h.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = h.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1015
+ }, s.prototype.transform = function(o) {
1016
+ if (o == null)
1017
+ this.transform(new r(0, 0));
1018
+ else {
1019
+ var c = new v(), l = this.graphManager.getRoot().updateLeftTop();
1020
+ if (l != null) {
1021
+ c.setWorldOrgX(o.x), c.setWorldOrgY(o.y), c.setDeviceOrgX(l.x), c.setDeviceOrgY(l.y);
1022
+ for (var T = this.getAllNodes(), g, d = 0; d < T.length; d++)
1023
+ g = T[d], g.transform(c);
1024
+ }
1025
+ }
1026
+ }, s.prototype.positionNodesRandomly = function(o) {
1027
+ if (o == null)
1028
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1029
+ else
1030
+ for (var c, l, T = o.getNodes(), g = 0; g < T.length; g++)
1031
+ c = T[g], l = c.getChild(), l == null || l.getNodes().length == 0 ? c.scatter() : (this.positionNodesRandomly(l), c.updateBounds());
1032
+ }, s.prototype.getFlatForest = function() {
1033
+ for (var o = [], c = !0, l = this.graphManager.getRoot().getNodes(), T = !0, g = 0; g < l.length; g++)
1034
+ l[g].getChild() != null && (T = !1);
1035
+ if (!T)
1036
+ return o;
1037
+ var d = /* @__PURE__ */ new Set(), N = [], b = /* @__PURE__ */ new Map(), A = [];
1038
+ for (A = A.concat(l); A.length > 0 && c; ) {
1039
+ for (N.push(A[0]); N.length > 0 && c; ) {
1040
+ var S = N[0];
1041
+ N.splice(0, 1), d.add(S);
1042
+ for (var V = S.getEdges(), g = 0; g < V.length; g++) {
1043
+ var X = V[g].getOtherEnd(S);
1044
+ if (b.get(S) != X)
1045
+ if (!d.has(X))
1046
+ N.push(X), b.set(X, S);
1047
+ else {
1048
+ c = !1;
1049
+ break;
1050
+ }
1051
+ }
1052
+ }
1053
+ if (!c)
1054
+ o = [];
1055
+ else {
1056
+ var Z = [].concat(u(d));
1057
+ o.push(Z);
1058
+ for (var g = 0; g < Z.length; g++) {
1059
+ var D = Z[g], _ = A.indexOf(D);
1060
+ _ > -1 && A.splice(_, 1);
1061
+ }
1062
+ d = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Map();
1063
+ }
1064
+ }
1065
+ return o;
1066
+ }, s.prototype.createDummyNodesForBendpoints = function(o) {
1067
+ for (var c = [], l = o.source, T = this.graphManager.calcLowestCommonAncestor(o.source, o.target), g = 0; g < o.bendpoints.length; g++) {
1068
+ var d = this.newNode(null);
1069
+ d.setRect(new Point(0, 0), new Dimension(1, 1)), T.add(d);
1070
+ var N = this.newEdge(null);
1071
+ this.graphManager.add(N, l, d), c.add(d), l = d;
1072
+ }
1073
+ var N = this.newEdge(null);
1074
+ return this.graphManager.add(N, l, o.target), this.edgeToDummyNodes.set(o, c), o.isInterGraph() ? this.graphManager.remove(o) : T.remove(o), c;
1075
+ }, s.prototype.createBendpointsFromDummyNodes = function() {
1076
+ var o = [];
1077
+ o = o.concat(this.graphManager.getAllEdges()), o = [].concat(u(this.edgeToDummyNodes.keys())).concat(o);
1078
+ for (var c = 0; c < o.length; c++) {
1079
+ var l = o[c];
1080
+ if (l.bendpoints.length > 0) {
1081
+ for (var T = this.edgeToDummyNodes.get(l), g = 0; g < T.length; g++) {
1082
+ var d = T[g], N = new r(d.getCenterX(), d.getCenterY()), b = l.bendpoints.get(g);
1083
+ b.x = N.x, b.y = N.y, d.getOwner().remove(d);
1084
+ }
1085
+ this.graphManager.add(l, l.source, l.target);
1086
+ }
1087
+ }
1088
+ }, s.transform = function(o, c, l, T) {
1089
+ if (l != null && T != null) {
1090
+ var g = c;
1091
+ if (o <= 50) {
1092
+ var d = c / l;
1093
+ g -= (c - d) / 50 * (50 - o);
1094
+ } else {
1095
+ var N = c * T;
1096
+ g += (N - c) / 50 * (o - 50);
1097
+ }
1098
+ return g;
1099
+ } else {
1100
+ var b, A;
1101
+ return o <= 50 ? (b = 9 * c / 500, A = c / 10) : (b = 9 * c / 50, A = -8 * c), b * o + A;
1102
+ }
1103
+ }, s.findCenterOfTree = function(o) {
1104
+ var c = [];
1105
+ c = c.concat(o);
1106
+ var l = [], T = /* @__PURE__ */ new Map(), g = !1, d = null;
1107
+ (c.length == 1 || c.length == 2) && (g = !0, d = c[0]);
1108
+ for (var N = 0; N < c.length; N++) {
1109
+ var b = c[N], A = b.getNeighborsList().size;
1110
+ T.set(b, b.getNeighborsList().size), A == 1 && l.push(b);
1111
+ }
1112
+ var S = [];
1113
+ for (S = S.concat(l); !g; ) {
1114
+ var V = [];
1115
+ V = V.concat(S), S = [];
1116
+ for (var N = 0; N < c.length; N++) {
1117
+ var b = c[N], X = c.indexOf(b);
1118
+ X >= 0 && c.splice(X, 1);
1119
+ var Z = b.getNeighborsList();
1120
+ Z.forEach(function(n) {
1121
+ if (l.indexOf(n) < 0) {
1122
+ var m = T.get(n), p = m - 1;
1123
+ p == 1 && S.push(n), T.set(n, p);
1124
+ }
1125
+ });
1126
+ }
1127
+ l = l.concat(S), (c.length == 1 || c.length == 2) && (g = !0, d = c[0]);
1128
+ }
1129
+ return d;
1130
+ }, s.prototype.setGraphManager = function(o) {
1131
+ this.graphManager = o;
1132
+ }, w.exports = s;
1133
+ }),
1134
+ /* 16 */
1135
+ /***/
1136
+ (function(w, U, L) {
1137
+ function u() {
1138
+ }
1139
+ u.seed = 1, u.x = 0, u.nextDouble = function() {
1140
+ return u.x = Math.sin(u.seed++) * 1e4, u.x - Math.floor(u.x);
1141
+ }, w.exports = u;
1142
+ }),
1143
+ /* 17 */
1144
+ /***/
1145
+ (function(w, U, L) {
1146
+ var u = L(5);
1147
+ function h(a, e) {
1148
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1149
+ }
1150
+ h.prototype.getWorldOrgX = function() {
1151
+ return this.lworldOrgX;
1152
+ }, h.prototype.setWorldOrgX = function(a) {
1153
+ this.lworldOrgX = a;
1154
+ }, h.prototype.getWorldOrgY = function() {
1155
+ return this.lworldOrgY;
1156
+ }, h.prototype.setWorldOrgY = function(a) {
1157
+ this.lworldOrgY = a;
1158
+ }, h.prototype.getWorldExtX = function() {
1159
+ return this.lworldExtX;
1160
+ }, h.prototype.setWorldExtX = function(a) {
1161
+ this.lworldExtX = a;
1162
+ }, h.prototype.getWorldExtY = function() {
1163
+ return this.lworldExtY;
1164
+ }, h.prototype.setWorldExtY = function(a) {
1165
+ this.lworldExtY = a;
1166
+ }, h.prototype.getDeviceOrgX = function() {
1167
+ return this.ldeviceOrgX;
1168
+ }, h.prototype.setDeviceOrgX = function(a) {
1169
+ this.ldeviceOrgX = a;
1170
+ }, h.prototype.getDeviceOrgY = function() {
1171
+ return this.ldeviceOrgY;
1172
+ }, h.prototype.setDeviceOrgY = function(a) {
1173
+ this.ldeviceOrgY = a;
1174
+ }, h.prototype.getDeviceExtX = function() {
1175
+ return this.ldeviceExtX;
1176
+ }, h.prototype.setDeviceExtX = function(a) {
1177
+ this.ldeviceExtX = a;
1178
+ }, h.prototype.getDeviceExtY = function() {
1179
+ return this.ldeviceExtY;
1180
+ }, h.prototype.setDeviceExtY = function(a) {
1181
+ this.ldeviceExtY = a;
1182
+ }, h.prototype.transformX = function(a) {
1183
+ var e = 0, i = this.lworldExtX;
1184
+ return i != 0 && (e = this.ldeviceOrgX + (a - this.lworldOrgX) * this.ldeviceExtX / i), e;
1185
+ }, h.prototype.transformY = function(a) {
1186
+ var e = 0, i = this.lworldExtY;
1187
+ return i != 0 && (e = this.ldeviceOrgY + (a - this.lworldOrgY) * this.ldeviceExtY / i), e;
1188
+ }, h.prototype.inverseTransformX = function(a) {
1189
+ var e = 0, i = this.ldeviceExtX;
1190
+ return i != 0 && (e = this.lworldOrgX + (a - this.ldeviceOrgX) * this.lworldExtX / i), e;
1191
+ }, h.prototype.inverseTransformY = function(a) {
1192
+ var e = 0, i = this.ldeviceExtY;
1193
+ return i != 0 && (e = this.lworldOrgY + (a - this.ldeviceOrgY) * this.lworldExtY / i), e;
1194
+ }, h.prototype.inverseTransformPoint = function(a) {
1195
+ var e = new u(this.inverseTransformX(a.x), this.inverseTransformY(a.y));
1196
+ return e;
1197
+ }, w.exports = h;
1198
+ }),
1199
+ /* 18 */
1200
+ /***/
1201
+ (function(w, U, L) {
1202
+ function u(t) {
1203
+ if (Array.isArray(t)) {
1204
+ for (var s = 0, o = Array(t.length); s < t.length; s++)
1205
+ o[s] = t[s];
1206
+ return o;
1207
+ } else
1208
+ return Array.from(t);
1209
+ }
1210
+ var h = L(15), a = L(4), e = L(0), i = L(8), f = L(9);
1211
+ function r() {
1212
+ h.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;
1213
+ }
1214
+ r.prototype = Object.create(h.prototype);
1215
+ for (var v in h)
1216
+ r[v] = h[v];
1217
+ r.prototype.initParameters = function() {
1218
+ h.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1219
+ }, r.prototype.calcIdealEdgeLengths = function() {
1220
+ for (var t, s, o, c, l, T, g, d = this.getGraphManager().getAllEdges(), N = 0; N < d.length; N++)
1221
+ t = d[N], s = t.idealLength, t.isInterGraph && (c = t.getSource(), l = t.getTarget(), T = t.getSourceInLca().getEstimatedSize(), g = t.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (t.idealLength += T + g - 2 * e.SIMPLE_NODE_SIZE), o = t.getLca().getInclusionTreeDepth(), t.idealLength += s * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + l.getInclusionTreeDepth() - 2 * o));
1222
+ }, r.prototype.initSpringEmbedder = function() {
1223
+ var t = this.getAllNodes().length;
1224
+ 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();
1225
+ }, r.prototype.calcSpringForces = function() {
1226
+ for (var t = this.getAllEdges(), s, o = 0; o < t.length; o++)
1227
+ s = t[o], this.calcSpringForce(s, s.idealLength);
1228
+ }, r.prototype.calcRepulsionForces = function() {
1229
+ 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, l, T, g = this.getAllNodes(), d;
1230
+ if (this.useFRGridVariant)
1231
+ for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && t && this.updateGrid(), d = /* @__PURE__ */ new Set(), o = 0; o < g.length; o++)
1232
+ l = g[o], this.calculateRepulsionForceOfANode(l, d, t, s), d.add(l);
1233
+ else
1234
+ for (o = 0; o < g.length; o++)
1235
+ for (l = g[o], c = o + 1; c < g.length; c++)
1236
+ T = g[c], l.getOwner() == T.getOwner() && this.calcRepulsionForce(l, T);
1237
+ }, r.prototype.calcGravitationalForces = function() {
1238
+ for (var t, s = this.getAllNodesToApplyGravitation(), o = 0; o < s.length; o++)
1239
+ t = s[o], this.calcGravitationalForce(t);
1240
+ }, r.prototype.moveNodes = function() {
1241
+ for (var t = this.getAllNodes(), s, o = 0; o < t.length; o++)
1242
+ s = t[o], s.move();
1243
+ }, r.prototype.calcSpringForce = function(t, s) {
1244
+ var o = t.getSource(), c = t.getTarget(), l, T, g, d;
1245
+ if (this.uniformLeafNodeSizes && o.getChild() == null && c.getChild() == null)
1246
+ t.updateLengthSimple();
1247
+ else if (t.updateLength(), t.isOverlapingSourceAndTarget)
1248
+ return;
1249
+ l = t.getLength(), l != 0 && (T = t.edgeElasticity * (l - s), g = T * (t.lengthX / l), d = T * (t.lengthY / l), o.springForceX += g, o.springForceY += d, c.springForceX -= g, c.springForceY -= d);
1250
+ }, r.prototype.calcRepulsionForce = function(t, s) {
1251
+ var o = t.getRect(), c = s.getRect(), l = new Array(2), T = new Array(4), g, d, N, b, A, S, V;
1252
+ if (o.intersects(c)) {
1253
+ i.calcSeparationAmount(o, c, l, a.DEFAULT_EDGE_LENGTH / 2), S = 2 * l[0], V = 2 * l[1];
1254
+ var X = t.noOfChildren * s.noOfChildren / (t.noOfChildren + s.noOfChildren);
1255
+ t.repulsionForceX -= X * S, t.repulsionForceY -= X * V, s.repulsionForceX += X * S, s.repulsionForceY += X * V;
1256
+ } else
1257
+ this.uniformLeafNodeSizes && t.getChild() == null && s.getChild() == null ? (g = c.getCenterX() - o.getCenterX(), d = c.getCenterY() - o.getCenterY()) : (i.getIntersection(o, c, T), g = T[2] - T[0], d = T[3] - T[1]), Math.abs(g) < a.MIN_REPULSION_DIST && (g = f.sign(g) * a.MIN_REPULSION_DIST), Math.abs(d) < a.MIN_REPULSION_DIST && (d = f.sign(d) * a.MIN_REPULSION_DIST), N = g * g + d * d, b = Math.sqrt(N), A = (t.nodeRepulsion / 2 + s.nodeRepulsion / 2) * t.noOfChildren * s.noOfChildren / N, S = A * g / b, V = A * d / b, t.repulsionForceX -= S, t.repulsionForceY -= V, s.repulsionForceX += S, s.repulsionForceY += V;
1258
+ }, r.prototype.calcGravitationalForce = function(t) {
1259
+ var s, o, c, l, T, g, d, N;
1260
+ s = t.getOwner(), o = (s.getRight() + s.getLeft()) / 2, c = (s.getTop() + s.getBottom()) / 2, l = t.getCenterX() - o, T = t.getCenterY() - c, g = Math.abs(l) + t.getWidth() / 2, d = Math.abs(T) + t.getHeight() / 2, t.getOwner() == this.graphManager.getRoot() ? (N = s.getEstimatedSize() * this.gravityRangeFactor, (g > N || d > N) && (t.gravitationForceX = -this.gravityConstant * l, t.gravitationForceY = -this.gravityConstant * T)) : (N = s.getEstimatedSize() * this.compoundGravityRangeFactor, (g > N || d > N) && (t.gravitationForceX = -this.gravityConstant * l * this.compoundGravityConstant, t.gravitationForceY = -this.gravityConstant * T * this.compoundGravityConstant));
1261
+ }, r.prototype.isConverged = function() {
1262
+ var t, s = !1;
1263
+ 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;
1264
+ }, r.prototype.animate = function() {
1265
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1266
+ }, r.prototype.calcNoOfChildrenForAllNodes = function() {
1267
+ for (var t, s = this.graphManager.getAllNodes(), o = 0; o < s.length; o++)
1268
+ t = s[o], t.noOfChildren = t.getNoOfChildren();
1269
+ }, r.prototype.calcGrid = function(t) {
1270
+ var s = 0, o = 0;
1271
+ s = parseInt(Math.ceil((t.getRight() - t.getLeft()) / this.repulsionRange)), o = parseInt(Math.ceil((t.getBottom() - t.getTop()) / this.repulsionRange));
1272
+ for (var c = new Array(s), l = 0; l < s; l++)
1273
+ c[l] = new Array(o);
1274
+ for (var l = 0; l < s; l++)
1275
+ for (var T = 0; T < o; T++)
1276
+ c[l][T] = new Array();
1277
+ return c;
1278
+ }, r.prototype.addNodeToGrid = function(t, s, o) {
1279
+ var c = 0, l = 0, T = 0, g = 0;
1280
+ c = parseInt(Math.floor((t.getRect().x - s) / this.repulsionRange)), l = parseInt(Math.floor((t.getRect().width + t.getRect().x - s) / this.repulsionRange)), T = parseInt(Math.floor((t.getRect().y - o) / this.repulsionRange)), g = parseInt(Math.floor((t.getRect().height + t.getRect().y - o) / this.repulsionRange));
1281
+ for (var d = c; d <= l; d++)
1282
+ for (var N = T; N <= g; N++)
1283
+ this.grid[d][N].push(t), t.setGridCoordinates(c, l, T, g);
1284
+ }, r.prototype.updateGrid = function() {
1285
+ var t, s, o = this.getAllNodes();
1286
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), t = 0; t < o.length; t++)
1287
+ s = o[t], this.addNodeToGrid(s, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1288
+ }, r.prototype.calculateRepulsionForceOfANode = function(t, s, o, c) {
1289
+ if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && o || c) {
1290
+ var l = /* @__PURE__ */ new Set();
1291
+ t.surrounding = new Array();
1292
+ for (var T, g = this.grid, d = t.startX - 1; d < t.finishX + 2; d++)
1293
+ for (var N = t.startY - 1; N < t.finishY + 2; N++)
1294
+ if (!(d < 0 || N < 0 || d >= g.length || N >= g[0].length)) {
1295
+ for (var b = 0; b < g[d][N].length; b++)
1296
+ if (T = g[d][N][b], !(t.getOwner() != T.getOwner() || t == T) && !s.has(T) && !l.has(T)) {
1297
+ var A = Math.abs(t.getCenterX() - T.getCenterX()) - (t.getWidth() / 2 + T.getWidth() / 2), S = Math.abs(t.getCenterY() - T.getCenterY()) - (t.getHeight() / 2 + T.getHeight() / 2);
1298
+ A <= this.repulsionRange && S <= this.repulsionRange && l.add(T);
1299
+ }
1300
+ }
1301
+ t.surrounding = [].concat(u(l));
1302
+ }
1303
+ for (d = 0; d < t.surrounding.length; d++)
1304
+ this.calcRepulsionForce(t, t.surrounding[d]);
1305
+ }, r.prototype.calcRepulsionRange = function() {
1306
+ return 0;
1307
+ }, w.exports = r;
1308
+ }),
1309
+ /* 19 */
1310
+ /***/
1311
+ (function(w, U, L) {
1312
+ var u = L(1), h = L(4);
1313
+ function a(i, f, r) {
1314
+ u.call(this, i, f, r), this.idealLength = h.DEFAULT_EDGE_LENGTH, this.edgeElasticity = h.DEFAULT_SPRING_STRENGTH;
1315
+ }
1316
+ a.prototype = Object.create(u.prototype);
1317
+ for (var e in u)
1318
+ a[e] = u[e];
1319
+ w.exports = a;
1320
+ }),
1321
+ /* 20 */
1322
+ /***/
1323
+ (function(w, U, L) {
1324
+ var u = L(3), h = L(4);
1325
+ function a(i, f, r, v) {
1326
+ u.call(this, i, f, r, v), this.nodeRepulsion = h.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 = [];
1327
+ }
1328
+ a.prototype = Object.create(u.prototype);
1329
+ for (var e in u)
1330
+ a[e] = u[e];
1331
+ a.prototype.setGridCoordinates = function(i, f, r, v) {
1332
+ this.startX = i, this.finishX = f, this.startY = r, this.finishY = v;
1333
+ }, w.exports = a;
1334
+ }),
1335
+ /* 21 */
1336
+ /***/
1337
+ (function(w, U, L) {
1338
+ function u(h, a) {
1339
+ this.width = 0, this.height = 0, h !== null && a !== null && (this.height = a, this.width = h);
1340
+ }
1341
+ u.prototype.getWidth = function() {
1342
+ return this.width;
1343
+ }, u.prototype.setWidth = function(h) {
1344
+ this.width = h;
1345
+ }, u.prototype.getHeight = function() {
1346
+ return this.height;
1347
+ }, u.prototype.setHeight = function(h) {
1348
+ this.height = h;
1349
+ }, w.exports = u;
1350
+ }),
1351
+ /* 22 */
1352
+ /***/
1353
+ (function(w, U, L) {
1354
+ var u = L(14);
1355
+ function h() {
1356
+ this.map = {}, this.keys = [];
1357
+ }
1358
+ h.prototype.put = function(a, e) {
1359
+ var i = u.createID(a);
1360
+ this.contains(i) || (this.map[i] = e, this.keys.push(a));
1361
+ }, h.prototype.contains = function(a) {
1362
+ return u.createID(a), this.map[a] != null;
1363
+ }, h.prototype.get = function(a) {
1364
+ var e = u.createID(a);
1365
+ return this.map[e];
1366
+ }, h.prototype.keySet = function() {
1367
+ return this.keys;
1368
+ }, w.exports = h;
1369
+ }),
1370
+ /* 23 */
1371
+ /***/
1372
+ (function(w, U, L) {
1373
+ var u = L(14);
1374
+ function h() {
1375
+ this.set = {};
1376
+ }
1377
+ h.prototype.add = function(a) {
1378
+ var e = u.createID(a);
1379
+ this.contains(e) || (this.set[e] = a);
1380
+ }, h.prototype.remove = function(a) {
1381
+ delete this.set[u.createID(a)];
1382
+ }, h.prototype.clear = function() {
1383
+ this.set = {};
1384
+ }, h.prototype.contains = function(a) {
1385
+ return this.set[u.createID(a)] == a;
1386
+ }, h.prototype.isEmpty = function() {
1387
+ return this.size() === 0;
1388
+ }, h.prototype.size = function() {
1389
+ return Object.keys(this.set).length;
1390
+ }, h.prototype.addAllTo = function(a) {
1391
+ for (var e = Object.keys(this.set), i = e.length, f = 0; f < i; f++)
1392
+ a.push(this.set[e[f]]);
1393
+ }, h.prototype.size = function() {
1394
+ return Object.keys(this.set).length;
1395
+ }, h.prototype.addAll = function(a) {
1396
+ for (var e = a.length, i = 0; i < e; i++) {
1397
+ var f = a[i];
1398
+ this.add(f);
1399
+ }
1400
+ }, w.exports = h;
1401
+ }),
1402
+ /* 24 */
1403
+ /***/
1404
+ (function(w, U, L) {
1405
+ function u() {
1406
+ }
1407
+ u.multMat = function(h, a) {
1408
+ for (var e = [], i = 0; i < h.length; i++) {
1409
+ e[i] = [];
1410
+ for (var f = 0; f < a[0].length; f++) {
1411
+ e[i][f] = 0;
1412
+ for (var r = 0; r < h[0].length; r++)
1413
+ e[i][f] += h[i][r] * a[r][f];
1414
+ }
1415
+ }
1416
+ return e;
1417
+ }, u.transpose = function(h) {
1418
+ for (var a = [], e = 0; e < h[0].length; e++) {
1419
+ a[e] = [];
1420
+ for (var i = 0; i < h.length; i++)
1421
+ a[e][i] = h[i][e];
1422
+ }
1423
+ return a;
1424
+ }, u.multCons = function(h, a) {
1425
+ for (var e = [], i = 0; i < h.length; i++)
1426
+ e[i] = h[i] * a;
1427
+ return e;
1428
+ }, u.minusOp = function(h, a) {
1429
+ for (var e = [], i = 0; i < h.length; i++)
1430
+ e[i] = h[i] - a[i];
1431
+ return e;
1432
+ }, u.dotProduct = function(h, a) {
1433
+ for (var e = 0, i = 0; i < h.length; i++)
1434
+ e += h[i] * a[i];
1435
+ return e;
1436
+ }, u.mag = function(h) {
1437
+ return Math.sqrt(this.dotProduct(h, h));
1438
+ }, u.normalize = function(h) {
1439
+ for (var a = [], e = this.mag(h), i = 0; i < h.length; i++)
1440
+ a[i] = h[i] / e;
1441
+ return a;
1442
+ }, u.multGamma = function(h) {
1443
+ for (var a = [], e = 0, i = 0; i < h.length; i++)
1444
+ e += h[i];
1445
+ e *= -1 / h.length;
1446
+ for (var f = 0; f < h.length; f++)
1447
+ a[f] = e + h[f];
1448
+ return a;
1449
+ }, u.multL = function(h, a, e) {
1450
+ for (var i = [], f = [], r = [], v = 0; v < a[0].length; v++) {
1451
+ for (var t = 0, s = 0; s < a.length; s++)
1452
+ t += -0.5 * a[s][v] * h[s];
1453
+ f[v] = t;
1454
+ }
1455
+ for (var o = 0; o < e.length; o++) {
1456
+ for (var c = 0, l = 0; l < e.length; l++)
1457
+ c += e[o][l] * f[l];
1458
+ r[o] = c;
1459
+ }
1460
+ for (var T = 0; T < a.length; T++) {
1461
+ for (var g = 0, d = 0; d < a[0].length; d++)
1462
+ g += a[T][d] * r[d];
1463
+ i[T] = g;
1464
+ }
1465
+ return i;
1466
+ }, w.exports = u;
1467
+ }),
1468
+ /* 25 */
1469
+ /***/
1470
+ (function(w, U, L) {
1471
+ var u = /* @__PURE__ */ (function() {
1472
+ function i(f, r) {
1473
+ for (var v = 0; v < r.length; v++) {
1474
+ var t = r[v];
1475
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(f, t.key, t);
1476
+ }
1477
+ }
1478
+ return function(f, r, v) {
1479
+ return r && i(f.prototype, r), v && i(f, v), f;
1480
+ };
1481
+ })();
1482
+ function h(i, f) {
1483
+ if (!(i instanceof f))
1484
+ throw new TypeError("Cannot call a class as a function");
1485
+ }
1486
+ var a = L(11), e = (function() {
1487
+ function i(f, r) {
1488
+ h(this, i), (r !== null || r !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1489
+ var v = void 0;
1490
+ f instanceof a ? v = f.size() : v = f.length, this._quicksort(f, 0, v - 1);
1491
+ }
1492
+ return u(i, [{
1493
+ key: "_quicksort",
1494
+ value: function(r, v, t) {
1495
+ if (v < t) {
1496
+ var s = this._partition(r, v, t);
1497
+ this._quicksort(r, v, s), this._quicksort(r, s + 1, t);
1498
+ }
1499
+ }
1500
+ }, {
1501
+ key: "_partition",
1502
+ value: function(r, v, t) {
1503
+ for (var s = this._get(r, v), o = v, c = t; ; ) {
1504
+ for (; this.compareFunction(s, this._get(r, c)); )
1505
+ c--;
1506
+ for (; this.compareFunction(this._get(r, o), s); )
1507
+ o++;
1508
+ if (o < c)
1509
+ this._swap(r, o, c), o++, c--;
1510
+ else return c;
1511
+ }
1512
+ }
1513
+ }, {
1514
+ key: "_get",
1515
+ value: function(r, v) {
1516
+ return r instanceof a ? r.get_object_at(v) : r[v];
1517
+ }
1518
+ }, {
1519
+ key: "_set",
1520
+ value: function(r, v, t) {
1521
+ r instanceof a ? r.set_object_at(v, t) : r[v] = t;
1522
+ }
1523
+ }, {
1524
+ key: "_swap",
1525
+ value: function(r, v, t) {
1526
+ var s = this._get(r, v);
1527
+ this._set(r, v, this._get(r, t)), this._set(r, t, s);
1528
+ }
1529
+ }, {
1530
+ key: "_defaultCompareFunction",
1531
+ value: function(r, v) {
1532
+ return v > r;
1533
+ }
1534
+ }]), i;
1535
+ })();
1536
+ w.exports = e;
1537
+ }),
1538
+ /* 26 */
1539
+ /***/
1540
+ (function(w, U, L) {
1541
+ function u() {
1542
+ }
1543
+ u.svd = function(h) {
1544
+ this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = h.length, this.n = h[0].length;
1545
+ var a = Math.min(this.m, this.n);
1546
+ this.s = (function(Tt) {
1547
+ for (var Ct = []; Tt-- > 0; )
1548
+ Ct.push(0);
1549
+ return Ct;
1550
+ })(Math.min(this.m + 1, this.n)), this.U = (function(Tt) {
1551
+ var Ct = function Bt(bt) {
1552
+ if (bt.length == 0)
1553
+ return 0;
1554
+ for (var zt = [], St = 0; St < bt[0]; St++)
1555
+ zt.push(Bt(bt.slice(1)));
1556
+ return zt;
1557
+ };
1558
+ return Ct(Tt);
1559
+ })([this.m, a]), this.V = (function(Tt) {
1560
+ var Ct = function Bt(bt) {
1561
+ if (bt.length == 0)
1562
+ return 0;
1563
+ for (var zt = [], St = 0; St < bt[0]; St++)
1564
+ zt.push(Bt(bt.slice(1)));
1565
+ return zt;
1566
+ };
1567
+ return Ct(Tt);
1568
+ })([this.n, this.n]);
1569
+ for (var e = (function(Tt) {
1570
+ for (var Ct = []; Tt-- > 0; )
1571
+ Ct.push(0);
1572
+ return Ct;
1573
+ })(this.n), i = (function(Tt) {
1574
+ for (var Ct = []; Tt-- > 0; )
1575
+ Ct.push(0);
1576
+ return Ct;
1577
+ })(this.m), f = !0, r = Math.min(this.m - 1, this.n), v = Math.max(0, Math.min(this.n - 2, this.m)), t = 0; t < Math.max(r, v); t++) {
1578
+ if (t < r) {
1579
+ this.s[t] = 0;
1580
+ for (var s = t; s < this.m; s++)
1581
+ this.s[t] = u.hypot(this.s[t], h[s][t]);
1582
+ if (this.s[t] !== 0) {
1583
+ h[t][t] < 0 && (this.s[t] = -this.s[t]);
1584
+ for (var o = t; o < this.m; o++)
1585
+ h[o][t] /= this.s[t];
1586
+ h[t][t] += 1;
1587
+ }
1588
+ this.s[t] = -this.s[t];
1589
+ }
1590
+ for (var c = t + 1; c < this.n; c++) {
1591
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1592
+ return Tt && Ct;
1593
+ })(t < r, this.s[t] !== 0)) {
1594
+ for (var l = 0, T = t; T < this.m; T++)
1595
+ l += h[T][t] * h[T][c];
1596
+ l = -l / h[t][t];
1597
+ for (var g = t; g < this.m; g++)
1598
+ h[g][c] += l * h[g][t];
1599
+ }
1600
+ e[c] = h[t][c];
1601
+ }
1602
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1603
+ return Ct;
1604
+ })(f, t < r))
1605
+ for (var d = t; d < this.m; d++)
1606
+ this.U[d][t] = h[d][t];
1607
+ if (t < v) {
1608
+ e[t] = 0;
1609
+ for (var N = t + 1; N < this.n; N++)
1610
+ e[t] = u.hypot(e[t], e[N]);
1611
+ if (e[t] !== 0) {
1612
+ e[t + 1] < 0 && (e[t] = -e[t]);
1613
+ for (var b = t + 1; b < this.n; b++)
1614
+ e[b] /= e[t];
1615
+ e[t + 1] += 1;
1616
+ }
1617
+ if (e[t] = -e[t], /* @__PURE__ */ (function(Tt, Ct) {
1618
+ return Tt && Ct;
1619
+ })(t + 1 < this.m, e[t] !== 0)) {
1620
+ for (var A = t + 1; A < this.m; A++)
1621
+ i[A] = 0;
1622
+ for (var S = t + 1; S < this.n; S++)
1623
+ for (var V = t + 1; V < this.m; V++)
1624
+ i[V] += e[S] * h[V][S];
1625
+ for (var X = t + 1; X < this.n; X++)
1626
+ for (var Z = -e[X] / e[t + 1], D = t + 1; D < this.m; D++)
1627
+ h[D][X] += Z * i[D];
1628
+ }
1629
+ for (var _ = t + 1; _ < this.n; _++)
1630
+ this.V[_][t] = e[_];
1631
+ }
1632
+ }
1633
+ var n = Math.min(this.n, this.m + 1);
1634
+ r < this.n && (this.s[r] = h[r][r]), this.m < n && (this.s[n - 1] = 0), v + 1 < n && (e[v] = h[v][n - 1]), e[n - 1] = 0;
1635
+ {
1636
+ for (var m = r; m < a; m++) {
1637
+ for (var p = 0; p < this.m; p++)
1638
+ this.U[p][m] = 0;
1639
+ this.U[m][m] = 1;
1640
+ }
1641
+ for (var E = r - 1; E >= 0; E--)
1642
+ if (this.s[E] !== 0) {
1643
+ for (var y = E + 1; y < a; y++) {
1644
+ for (var I = 0, M = E; M < this.m; M++)
1645
+ I += this.U[M][E] * this.U[M][y];
1646
+ I = -I / this.U[E][E];
1647
+ for (var R = E; R < this.m; R++)
1648
+ this.U[R][y] += I * this.U[R][E];
1649
+ }
1650
+ for (var W = E; W < this.m; W++)
1651
+ this.U[W][E] = -this.U[W][E];
1652
+ this.U[E][E] = 1 + this.U[E][E];
1653
+ for (var x = 0; x < E - 1; x++)
1654
+ this.U[x][E] = 0;
1655
+ } else {
1656
+ for (var Q = 0; Q < this.m; Q++)
1657
+ this.U[Q][E] = 0;
1658
+ this.U[E][E] = 1;
1659
+ }
1660
+ }
1661
+ for (var z = this.n - 1; z >= 0; z--) {
1662
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1663
+ return Tt && Ct;
1664
+ })(z < v, e[z] !== 0))
1665
+ for (var Y = z + 1; Y < a; Y++) {
1666
+ for (var rt = 0, B = z + 1; B < this.n; B++)
1667
+ rt += this.V[B][z] * this.V[B][Y];
1668
+ rt = -rt / this.V[z + 1][z];
1669
+ for (var O = z + 1; O < this.n; O++)
1670
+ this.V[O][Y] += rt * this.V[O][z];
1671
+ }
1672
+ for (var H = 0; H < this.n; H++)
1673
+ this.V[H][z] = 0;
1674
+ this.V[z][z] = 1;
1675
+ }
1676
+ for (var $ = n - 1, tt = Math.pow(2, -52), ht = Math.pow(2, -966); n > 0; ) {
1677
+ var J = void 0, It = void 0;
1678
+ for (J = n - 2; J >= -1 && J !== -1; J--)
1679
+ if (Math.abs(e[J]) <= ht + tt * (Math.abs(this.s[J]) + Math.abs(this.s[J + 1]))) {
1680
+ e[J] = 0;
1681
+ break;
1682
+ }
1683
+ if (J === n - 2)
1684
+ It = 4;
1685
+ else {
1686
+ var Nt = void 0;
1687
+ for (Nt = n - 1; Nt >= J && Nt !== J; Nt--) {
1688
+ var vt = (Nt !== n ? Math.abs(e[Nt]) : 0) + (Nt !== J + 1 ? Math.abs(e[Nt - 1]) : 0);
1689
+ if (Math.abs(this.s[Nt]) <= ht + tt * vt) {
1690
+ this.s[Nt] = 0;
1691
+ break;
1692
+ }
1693
+ }
1694
+ Nt === J ? It = 3 : Nt === n - 1 ? It = 1 : (It = 2, J = Nt);
1695
+ }
1696
+ switch (J++, It) {
1697
+ case 1:
1698
+ {
1699
+ var it = e[n - 2];
1700
+ e[n - 2] = 0;
1701
+ for (var gt = n - 2; gt >= J; gt--) {
1702
+ var mt = u.hypot(this.s[gt], it), At = this.s[gt] / mt, Ot = it / mt;
1703
+ this.s[gt] = mt, gt !== J && (it = -Ot * e[gt - 1], e[gt - 1] = At * e[gt - 1]);
1704
+ for (var Et = 0; Et < this.n; Et++)
1705
+ mt = At * this.V[Et][gt] + Ot * this.V[Et][n - 1], this.V[Et][n - 1] = -Ot * this.V[Et][gt] + At * this.V[Et][n - 1], this.V[Et][gt] = mt;
1706
+ }
1707
+ }
1708
+ break;
1709
+ case 2:
1710
+ {
1711
+ var Dt = e[J - 1];
1712
+ e[J - 1] = 0;
1713
+ for (var Rt = J; Rt < n; Rt++) {
1714
+ var Ht = u.hypot(this.s[Rt], Dt), Ut = this.s[Rt] / Ht, Pt = Dt / Ht;
1715
+ this.s[Rt] = Ht, Dt = -Pt * e[Rt], e[Rt] = Ut * e[Rt];
1716
+ for (var Ft = 0; Ft < this.m; Ft++)
1717
+ 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;
1718
+ }
1719
+ }
1720
+ break;
1721
+ case 3:
1722
+ {
1723
+ var Yt = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n - 1]), Math.abs(this.s[n - 2])), Math.abs(e[n - 2])), Math.abs(this.s[J])), Math.abs(e[J])), Vt = this.s[n - 1] / Yt, F = this.s[n - 2] / Yt, P = e[n - 2] / Yt, k = this.s[J] / Yt, K = e[J] / Yt, q = ((F + Vt) * (F - Vt) + P * P) / 2, at = Vt * P * (Vt * P), ct = 0;
1724
+ /* @__PURE__ */ (function(Tt, Ct) {
1725
+ return Tt || Ct;
1726
+ })(q !== 0, at !== 0) && (ct = Math.sqrt(q * q + at), q < 0 && (ct = -ct), ct = at / (q + ct));
1727
+ for (var nt = (k + Vt) * (k - Vt) + ct, et = k * K, j = J; j < n - 1; j++) {
1728
+ var ut = u.hypot(nt, et), wt = nt / ut, pt = et / ut;
1729
+ j !== J && (e[j - 1] = ut), nt = wt * this.s[j] + pt * e[j], e[j] = wt * e[j] - pt * this.s[j], et = pt * this.s[j + 1], this.s[j + 1] = wt * this.s[j + 1];
1730
+ for (var xt = 0; xt < this.n; xt++)
1731
+ ut = wt * this.V[xt][j] + pt * this.V[xt][j + 1], this.V[xt][j + 1] = -pt * this.V[xt][j] + wt * this.V[xt][j + 1], this.V[xt][j] = ut;
1732
+ if (ut = u.hypot(nt, et), wt = nt / ut, pt = et / ut, this.s[j] = ut, nt = wt * e[j] + pt * this.s[j + 1], this.s[j + 1] = -pt * e[j] + wt * this.s[j + 1], et = pt * e[j + 1], e[j + 1] = wt * e[j + 1], j < this.m - 1)
1733
+ for (var lt = 0; lt < this.m; lt++)
1734
+ ut = wt * this.U[lt][j] + pt * this.U[lt][j + 1], this.U[lt][j + 1] = -pt * this.U[lt][j] + wt * this.U[lt][j + 1], this.U[lt][j] = ut;
1735
+ }
1736
+ e[n - 2] = nt;
1737
+ }
1738
+ break;
1739
+ case 4:
1740
+ {
1741
+ if (this.s[J] <= 0) {
1742
+ this.s[J] = this.s[J] < 0 ? -this.s[J] : 0;
1743
+ for (var ot = 0; ot <= $; ot++)
1744
+ this.V[ot][J] = -this.V[ot][J];
1745
+ }
1746
+ for (; J < $ && !(this.s[J] >= this.s[J + 1]); ) {
1747
+ var Lt = this.s[J];
1748
+ if (this.s[J] = this.s[J + 1], this.s[J + 1] = Lt, J < this.n - 1)
1749
+ for (var ft = 0; ft < this.n; ft++)
1750
+ Lt = this.V[ft][J + 1], this.V[ft][J + 1] = this.V[ft][J], this.V[ft][J] = Lt;
1751
+ if (J < this.m - 1)
1752
+ for (var st = 0; st < this.m; st++)
1753
+ Lt = this.U[st][J + 1], this.U[st][J + 1] = this.U[st][J], this.U[st][J] = Lt;
1754
+ J++;
1755
+ }
1756
+ n--;
1757
+ }
1758
+ break;
1759
+ }
1760
+ }
1761
+ var Xt = { U: this.U, V: this.V, S: this.s };
1762
+ return Xt;
1763
+ }, u.hypot = function(h, a) {
1764
+ var e = void 0;
1765
+ return Math.abs(h) > Math.abs(a) ? (e = a / h, e = Math.abs(h) * Math.sqrt(1 + e * e)) : a != 0 ? (e = h / a, e = Math.abs(a) * Math.sqrt(1 + e * e)) : e = 0, e;
1766
+ }, w.exports = u;
1767
+ }),
1768
+ /* 27 */
1769
+ /***/
1770
+ (function(w, U, L) {
1771
+ var u = /* @__PURE__ */ (function() {
1772
+ function e(i, f) {
1773
+ for (var r = 0; r < f.length; r++) {
1774
+ var v = f[r];
1775
+ v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(i, v.key, v);
1776
+ }
1777
+ }
1778
+ return function(i, f, r) {
1779
+ return f && e(i.prototype, f), r && e(i, r), i;
1780
+ };
1781
+ })();
1782
+ function h(e, i) {
1783
+ if (!(e instanceof i))
1784
+ throw new TypeError("Cannot call a class as a function");
1785
+ }
1786
+ var a = (function() {
1787
+ function e(i, f) {
1788
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1789
+ h(this, e), this.sequence1 = i, this.sequence2 = f, this.match_score = r, this.mismatch_penalty = v, this.gap_penalty = t, this.iMax = i.length + 1, this.jMax = f.length + 1, this.grid = new Array(this.iMax);
1790
+ for (var s = 0; s < this.iMax; s++) {
1791
+ this.grid[s] = new Array(this.jMax);
1792
+ for (var o = 0; o < this.jMax; o++)
1793
+ this.grid[s][o] = 0;
1794
+ }
1795
+ this.tracebackGrid = new Array(this.iMax);
1796
+ for (var c = 0; c < this.iMax; c++) {
1797
+ this.tracebackGrid[c] = new Array(this.jMax);
1798
+ for (var l = 0; l < this.jMax; l++)
1799
+ this.tracebackGrid[c][l] = [null, null, null];
1800
+ }
1801
+ this.alignments = [], this.score = -1, this.computeGrids();
1802
+ }
1803
+ return u(e, [{
1804
+ key: "getScore",
1805
+ value: function() {
1806
+ return this.score;
1807
+ }
1808
+ }, {
1809
+ key: "getAlignments",
1810
+ value: function() {
1811
+ return this.alignments;
1812
+ }
1813
+ // Main dynamic programming procedure
1814
+ }, {
1815
+ key: "computeGrids",
1816
+ value: function() {
1817
+ for (var f = 1; f < this.jMax; f++)
1818
+ this.grid[0][f] = this.grid[0][f - 1] + this.gap_penalty, this.tracebackGrid[0][f] = [!1, !1, !0];
1819
+ for (var r = 1; r < this.iMax; r++)
1820
+ this.grid[r][0] = this.grid[r - 1][0] + this.gap_penalty, this.tracebackGrid[r][0] = [!1, !0, !1];
1821
+ for (var v = 1; v < this.iMax; v++)
1822
+ for (var t = 1; t < this.jMax; t++) {
1823
+ var s = void 0;
1824
+ this.sequence1[v - 1] === this.sequence2[t - 1] ? s = this.grid[v - 1][t - 1] + this.match_score : s = this.grid[v - 1][t - 1] + this.mismatch_penalty;
1825
+ var o = this.grid[v - 1][t] + this.gap_penalty, c = this.grid[v][t - 1] + this.gap_penalty, l = [s, o, c], T = this.arrayAllMaxIndexes(l);
1826
+ this.grid[v][t] = l[T[0]], this.tracebackGrid[v][t] = [T.includes(0), T.includes(1), T.includes(2)];
1827
+ }
1828
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1829
+ }
1830
+ // Gets all possible valid sequence combinations
1831
+ }, {
1832
+ key: "alignmentTraceback",
1833
+ value: function() {
1834
+ var f = [];
1835
+ for (f.push({
1836
+ pos: [this.sequence1.length, this.sequence2.length],
1837
+ seq1: "",
1838
+ seq2: ""
1839
+ }); f[0]; ) {
1840
+ var r = f[0], v = this.tracebackGrid[r.pos[0]][r.pos[1]];
1841
+ v[0] && f.push({
1842
+ pos: [r.pos[0] - 1, r.pos[1] - 1],
1843
+ seq1: this.sequence1[r.pos[0] - 1] + r.seq1,
1844
+ seq2: this.sequence2[r.pos[1] - 1] + r.seq2
1845
+ }), v[1] && f.push({
1846
+ pos: [r.pos[0] - 1, r.pos[1]],
1847
+ seq1: this.sequence1[r.pos[0] - 1] + r.seq1,
1848
+ seq2: "-" + r.seq2
1849
+ }), v[2] && f.push({
1850
+ pos: [r.pos[0], r.pos[1] - 1],
1851
+ seq1: "-" + r.seq1,
1852
+ seq2: this.sequence2[r.pos[1] - 1] + r.seq2
1853
+ }), r.pos[0] === 0 && r.pos[1] === 0 && this.alignments.push({
1854
+ sequence1: r.seq1,
1855
+ sequence2: r.seq2
1856
+ }), f.shift();
1857
+ }
1858
+ return this.alignments;
1859
+ }
1860
+ // Helper Functions
1861
+ }, {
1862
+ key: "getAllIndexes",
1863
+ value: function(f, r) {
1864
+ for (var v = [], t = -1; (t = f.indexOf(r, t + 1)) !== -1; )
1865
+ v.push(t);
1866
+ return v;
1867
+ }
1868
+ }, {
1869
+ key: "arrayAllMaxIndexes",
1870
+ value: function(f) {
1871
+ return this.getAllIndexes(f, Math.max.apply(null, f));
1872
+ }
1873
+ }]), e;
1874
+ })();
1875
+ w.exports = a;
1876
+ }),
1877
+ /* 28 */
1878
+ /***/
1879
+ (function(w, U, L) {
1880
+ var u = function() {
1881
+ };
1882
+ u.FDLayout = L(18), u.FDLayoutConstants = L(4), u.FDLayoutEdge = L(19), u.FDLayoutNode = L(20), u.DimensionD = L(21), u.HashMap = L(22), u.HashSet = L(23), u.IGeometry = L(8), u.IMath = L(9), u.Integer = L(10), u.Point = L(12), u.PointD = L(5), u.RandomSeed = L(16), u.RectangleD = L(13), u.Transform = L(17), u.UniqueIDGeneretor = L(14), u.Quicksort = L(25), u.LinkedList = L(11), u.LGraphObject = L(2), u.LGraph = L(6), u.LEdge = L(1), u.LGraphManager = L(7), u.LNode = L(3), u.Layout = L(15), u.LayoutConstants = L(0), u.NeedlemanWunsch = L(27), u.Matrix = L(24), u.SVD = L(26), w.exports = u;
1883
+ }),
1884
+ /* 29 */
1885
+ /***/
1886
+ (function(w, U, L) {
1887
+ function u() {
1888
+ this.listeners = [];
1889
+ }
1890
+ var h = u.prototype;
1891
+ h.addListener = function(a, e) {
1892
+ this.listeners.push({
1893
+ event: a,
1894
+ callback: e
1895
+ });
1896
+ }, h.removeListener = function(a, e) {
1897
+ for (var i = this.listeners.length; i >= 0; i--) {
1898
+ var f = this.listeners[i];
1899
+ f.event === a && f.callback === e && this.listeners.splice(i, 1);
1900
+ }
1901
+ }, h.emit = function(a, e) {
1902
+ for (var i = 0; i < this.listeners.length; i++) {
1903
+ var f = this.listeners[i];
1904
+ a === f.event && f.callback(e);
1905
+ }
1906
+ }, w.exports = u;
1907
+ })
1908
+ /******/
1909
+ ])
1910
+ );
1911
+ });
1912
+ })(le)), le.exports;
1913
+ }
1914
+ var ur = he.exports, Me;
1915
+ function dr() {
1916
+ return Me || (Me = 1, (function(C, G) {
1917
+ (function(U, L) {
1918
+ C.exports = L(gr());
1919
+ })(ur, function(w) {
1920
+ return (
1921
+ /******/
1922
+ (() => {
1923
+ var U = {
1924
+ /***/
1925
+ 45: (
1926
+ /***/
1927
+ ((a, e, i) => {
1928
+ var f = {};
1929
+ 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;
1930
+ })
1931
+ ),
1932
+ /***/
1933
+ 806: (
1934
+ /***/
1935
+ ((a, e, i) => {
1936
+ var f = i(551).FDLayoutConstants;
1937
+ function r() {
1938
+ }
1939
+ for (var v in f)
1940
+ r[v] = f[v];
1941
+ r.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, r.DEFAULT_RADIAL_SEPARATION = f.DEFAULT_EDGE_LENGTH, r.DEFAULT_COMPONENT_SEPERATION = 60, r.TILE = !0, r.TILING_PADDING_VERTICAL = 10, r.TILING_PADDING_HORIZONTAL = 10, r.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, r.ENFORCE_CONSTRAINTS = !0, r.APPLY_LAYOUT = !0, r.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, r.TREE_REDUCTION_ON_INCREMENTAL = !0, r.PURE_INCREMENTAL = r.DEFAULT_INCREMENTAL, a.exports = r;
1942
+ })
1943
+ ),
1944
+ /***/
1945
+ 767: (
1946
+ /***/
1947
+ ((a, e, i) => {
1948
+ var f = i(551).FDLayoutEdge;
1949
+ function r(t, s, o) {
1950
+ f.call(this, t, s, o);
1951
+ }
1952
+ r.prototype = Object.create(f.prototype);
1953
+ for (var v in f)
1954
+ r[v] = f[v];
1955
+ a.exports = r;
1956
+ })
1957
+ ),
1958
+ /***/
1959
+ 880: (
1960
+ /***/
1961
+ ((a, e, i) => {
1962
+ var f = i(551).LGraph;
1963
+ function r(t, s, o) {
1964
+ f.call(this, t, s, o);
1965
+ }
1966
+ r.prototype = Object.create(f.prototype);
1967
+ for (var v in f)
1968
+ r[v] = f[v];
1969
+ a.exports = r;
1970
+ })
1971
+ ),
1972
+ /***/
1973
+ 578: (
1974
+ /***/
1975
+ ((a, e, i) => {
1976
+ var f = i(551).LGraphManager;
1977
+ function r(t) {
1978
+ f.call(this, t);
1979
+ }
1980
+ r.prototype = Object.create(f.prototype);
1981
+ for (var v in f)
1982
+ r[v] = f[v];
1983
+ a.exports = r;
1984
+ })
1985
+ ),
1986
+ /***/
1987
+ 765: (
1988
+ /***/
1989
+ ((a, e, i) => {
1990
+ var f = i(551).FDLayout, r = i(578), v = i(880), t = i(991), s = i(767), o = i(806), c = i(902), l = i(551).FDLayoutConstants, T = i(551).LayoutConstants, g = i(551).Point, d = i(551).PointD, N = i(551).DimensionD, b = i(551).Layout, A = i(551).Integer, S = i(551).IGeometry, V = i(551).LGraph, X = i(551).Transform, Z = i(551).LinkedList;
1991
+ function D() {
1992
+ f.call(this), this.toBeTiled = {}, this.constraints = {};
1993
+ }
1994
+ D.prototype = Object.create(f.prototype);
1995
+ for (var _ in f)
1996
+ D[_] = f[_];
1997
+ D.prototype.newGraphManager = function() {
1998
+ var n = new r(this);
1999
+ return this.graphManager = n, n;
2000
+ }, D.prototype.newGraph = function(n) {
2001
+ return new v(null, this.graphManager, n);
2002
+ }, D.prototype.newNode = function(n) {
2003
+ return new t(this.graphManager, n);
2004
+ }, D.prototype.newEdge = function(n) {
2005
+ return new s(null, null, n);
2006
+ }, D.prototype.initParameters = function() {
2007
+ 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 = l.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = l.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
2008
+ }, D.prototype.initSpringEmbedder = function() {
2009
+ f.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / l.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = 0.04, this.coolingAdjuster = 1;
2010
+ }, D.prototype.layout = function() {
2011
+ var n = T.DEFAULT_CREATE_BENDS_AS_NEEDED;
2012
+ return n && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
2013
+ }, D.prototype.classicLayout = function() {
2014
+ 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) {
2015
+ if (o.TREE_REDUCTION_ON_INCREMENTAL) {
2016
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2017
+ var m = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(I) {
2018
+ return m.has(I);
2019
+ });
2020
+ this.graphManager.setAllNodesToApplyGravitation(p);
2021
+ }
2022
+ } else {
2023
+ var n = this.getFlatForest();
2024
+ if (n.length > 0)
2025
+ this.positionNodesRadially(n);
2026
+ else {
2027
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2028
+ var m = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(E) {
2029
+ return m.has(E);
2030
+ });
2031
+ this.graphManager.setAllNodesToApplyGravitation(p), this.positionNodesRandomly();
2032
+ }
2033
+ }
2034
+ return Object.keys(this.constraints).length > 0 && (c.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), o.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
2035
+ }, D.prototype.tick = function() {
2036
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
2037
+ if (this.prunedNodesAll.length > 0)
2038
+ this.isTreeGrowing = !0;
2039
+ else
2040
+ return !0;
2041
+ if (this.totalIterations % l.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
2042
+ if (this.isConverged())
2043
+ if (this.prunedNodesAll.length > 0)
2044
+ this.isTreeGrowing = !0;
2045
+ else
2046
+ return !0;
2047
+ 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));
2048
+ }
2049
+ if (this.isTreeGrowing) {
2050
+ if (this.growTreeIterations % 10 == 0)
2051
+ if (this.prunedNodesAll.length > 0) {
2052
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
2053
+ var n = new Set(this.getAllNodes()), m = this.nodesWithGravity.filter(function(y) {
2054
+ return n.has(y);
2055
+ });
2056
+ this.graphManager.setAllNodesToApplyGravitation(m), this.graphManager.updateBounds(), this.updateGrid(), o.PURE_INCREMENTAL ? this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2057
+ } else
2058
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
2059
+ this.growTreeIterations++;
2060
+ }
2061
+ if (this.isGrowthFinished) {
2062
+ if (this.isConverged())
2063
+ return !0;
2064
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), o.PURE_INCREMENTAL ? this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
2065
+ }
2066
+ var p = !this.isTreeGrowing && !this.isGrowthFinished, E = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
2067
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(p, E), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
2068
+ }, D.prototype.getPositionsData = function() {
2069
+ for (var n = this.graphManager.getAllNodes(), m = {}, p = 0; p < n.length; p++) {
2070
+ var E = n[p].rect, y = n[p].id;
2071
+ m[y] = {
2072
+ id: y,
2073
+ x: E.getCenterX(),
2074
+ y: E.getCenterY(),
2075
+ w: E.width,
2076
+ h: E.height
2077
+ };
2078
+ }
2079
+ return m;
2080
+ }, D.prototype.runSpringEmbedder = function() {
2081
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
2082
+ var n = !1;
2083
+ if (l.ANIMATE === "during")
2084
+ this.emit("layoutstarted");
2085
+ else {
2086
+ for (; !n; )
2087
+ n = this.tick();
2088
+ this.graphManager.updateBounds();
2089
+ }
2090
+ }, D.prototype.moveNodes = function() {
2091
+ for (var n = this.getAllNodes(), m, p = 0; p < n.length; p++)
2092
+ m = n[p], m.calculateDisplacement();
2093
+ Object.keys(this.constraints).length > 0 && this.updateDisplacements();
2094
+ for (var p = 0; p < n.length; p++)
2095
+ m = n[p], m.move();
2096
+ }, D.prototype.initConstraintVariables = function() {
2097
+ var n = this;
2098
+ this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
2099
+ for (var m = this.graphManager.getAllNodes(), p = 0; p < m.length; p++) {
2100
+ var E = m[p];
2101
+ this.idToNodeMap.set(E.id, E);
2102
+ }
2103
+ var y = function O(H) {
2104
+ for (var $ = H.getChild().getNodes(), tt, ht = 0, J = 0; J < $.length; J++)
2105
+ tt = $[J], tt.getChild() == null ? n.fixedNodeSet.has(tt.id) && (ht += 100) : ht += O(tt);
2106
+ return ht;
2107
+ };
2108
+ if (this.constraints.fixedNodeConstraint) {
2109
+ this.constraints.fixedNodeConstraint.forEach(function($) {
2110
+ n.fixedNodeSet.add($.nodeId);
2111
+ });
2112
+ for (var m = this.graphManager.getAllNodes(), E, p = 0; p < m.length; p++)
2113
+ if (E = m[p], E.getChild() != null) {
2114
+ var I = y(E);
2115
+ I > 0 && (E.fixedNodeWeight = I);
2116
+ }
2117
+ }
2118
+ if (this.constraints.relativePlacementConstraint) {
2119
+ var M = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
2120
+ 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(O) {
2121
+ n.fixedNodesOnHorizontal.add(O), n.fixedNodesOnVertical.add(O);
2122
+ }), this.constraints.alignmentConstraint) {
2123
+ if (this.constraints.alignmentConstraint.vertical)
2124
+ for (var W = this.constraints.alignmentConstraint.vertical, p = 0; p < W.length; p++)
2125
+ this.dummyToNodeForVerticalAlignment.set("dummy" + p, []), W[p].forEach(function(H) {
2126
+ M.set(H, "dummy" + p), n.dummyToNodeForVerticalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnHorizontal.add("dummy" + p);
2127
+ });
2128
+ if (this.constraints.alignmentConstraint.horizontal)
2129
+ for (var x = this.constraints.alignmentConstraint.horizontal, p = 0; p < x.length; p++)
2130
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + p, []), x[p].forEach(function(H) {
2131
+ R.set(H, "dummy" + p), n.dummyToNodeForHorizontalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnVertical.add("dummy" + p);
2132
+ });
2133
+ }
2134
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2135
+ this.shuffle = function(O) {
2136
+ var H, $, tt;
2137
+ for (tt = O.length - 1; tt >= 2 * O.length / 3; tt--)
2138
+ H = Math.floor(Math.random() * (tt + 1)), $ = O[tt], O[tt] = O[H], O[H] = $;
2139
+ return O;
2140
+ }, 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(O) {
2141
+ if (O.left) {
2142
+ var H = M.has(O.left) ? M.get(O.left) : O.left, $ = M.has(O.right) ? M.get(O.right) : O.right;
2143
+ 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($) || (n.nodesInRelativeHorizontal.push($), n.nodeToRelativeConstraintMapHorizontal.set($, []), n.dummyToNodeForVerticalAlignment.has($) ? n.nodeToTempPositionMapHorizontal.set($, n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()) : n.nodeToTempPositionMapHorizontal.set($, n.idToNodeMap.get($).getCenterX())), n.nodeToRelativeConstraintMapHorizontal.get(H).push({ right: $, gap: O.gap }), n.nodeToRelativeConstraintMapHorizontal.get($).push({ left: H, gap: O.gap });
2144
+ } else {
2145
+ var tt = R.has(O.top) ? R.get(O.top) : O.top, ht = R.has(O.bottom) ? R.get(O.bottom) : O.bottom;
2146
+ 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: O.gap }), n.nodeToRelativeConstraintMapVertical.get(ht).push({ top: tt, gap: O.gap });
2147
+ }
2148
+ });
2149
+ else {
2150
+ var Q = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
2151
+ this.constraints.relativePlacementConstraint.forEach(function(O) {
2152
+ if (O.left) {
2153
+ var H = M.has(O.left) ? M.get(O.left) : O.left, $ = M.has(O.right) ? M.get(O.right) : O.right;
2154
+ Q.has(H) ? Q.get(H).push($) : Q.set(H, [$]), Q.has($) ? Q.get($).push(H) : Q.set($, [H]);
2155
+ } else {
2156
+ var tt = R.has(O.top) ? R.get(O.top) : O.top, ht = R.has(O.bottom) ? R.get(O.bottom) : O.bottom;
2157
+ z.has(tt) ? z.get(tt).push(ht) : z.set(tt, [ht]), z.has(ht) ? z.get(ht).push(tt) : z.set(ht, [tt]);
2158
+ }
2159
+ });
2160
+ var Y = function(H, $) {
2161
+ var tt = [], ht = [], J = new Z(), It = /* @__PURE__ */ new Set(), Nt = 0;
2162
+ return H.forEach(function(vt, it) {
2163
+ if (!It.has(it)) {
2164
+ tt[Nt] = [], ht[Nt] = !1;
2165
+ var gt = it;
2166
+ for (J.push(gt), It.add(gt), tt[Nt].push(gt); J.length != 0; ) {
2167
+ gt = J.shift(), $.has(gt) && (ht[Nt] = !0);
2168
+ var mt = H.get(gt);
2169
+ mt.forEach(function(At) {
2170
+ It.has(At) || (J.push(At), It.add(At), tt[Nt].push(At));
2171
+ });
2172
+ }
2173
+ Nt++;
2174
+ }
2175
+ }), { components: tt, isFixed: ht };
2176
+ }, rt = Y(Q, n.fixedNodesOnHorizontal);
2177
+ this.componentsOnHorizontal = rt.components, this.fixedComponentsOnHorizontal = rt.isFixed;
2178
+ var B = Y(z, n.fixedNodesOnVertical);
2179
+ this.componentsOnVertical = B.components, this.fixedComponentsOnVertical = B.isFixed;
2180
+ }
2181
+ }
2182
+ }, D.prototype.updateDisplacements = function() {
2183
+ var n = this;
2184
+ if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(B) {
2185
+ var O = n.idToNodeMap.get(B.nodeId);
2186
+ O.displacementX = 0, O.displacementY = 0;
2187
+ }), this.constraints.alignmentConstraint) {
2188
+ if (this.constraints.alignmentConstraint.vertical)
2189
+ for (var m = this.constraints.alignmentConstraint.vertical, p = 0; p < m.length; p++) {
2190
+ for (var E = 0, y = 0; y < m[p].length; y++) {
2191
+ if (this.fixedNodeSet.has(m[p][y])) {
2192
+ E = 0;
2193
+ break;
2194
+ }
2195
+ E += this.idToNodeMap.get(m[p][y]).displacementX;
2196
+ }
2197
+ for (var I = E / m[p].length, y = 0; y < m[p].length; y++)
2198
+ this.idToNodeMap.get(m[p][y]).displacementX = I;
2199
+ }
2200
+ if (this.constraints.alignmentConstraint.horizontal)
2201
+ for (var M = this.constraints.alignmentConstraint.horizontal, p = 0; p < M.length; p++) {
2202
+ for (var R = 0, y = 0; y < M[p].length; y++) {
2203
+ if (this.fixedNodeSet.has(M[p][y])) {
2204
+ R = 0;
2205
+ break;
2206
+ }
2207
+ R += this.idToNodeMap.get(M[p][y]).displacementY;
2208
+ }
2209
+ for (var W = R / M[p].length, y = 0; y < M[p].length; y++)
2210
+ this.idToNodeMap.get(M[p][y]).displacementY = W;
2211
+ }
2212
+ }
2213
+ if (this.constraints.relativePlacementConstraint)
2214
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2215
+ this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(B) {
2216
+ if (!n.fixedNodesOnHorizontal.has(B)) {
2217
+ var O = 0;
2218
+ n.dummyToNodeForVerticalAlignment.has(B) ? O = n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX : O = n.idToNodeMap.get(B).displacementX, n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(H) {
2219
+ if (H.right) {
2220
+ var $ = n.nodeToTempPositionMapHorizontal.get(H.right) - n.nodeToTempPositionMapHorizontal.get(B) - O;
2221
+ $ < H.gap && (O -= H.gap - $);
2222
+ } else {
2223
+ var $ = n.nodeToTempPositionMapHorizontal.get(B) - n.nodeToTempPositionMapHorizontal.get(H.left) + O;
2224
+ $ < H.gap && (O += H.gap - $);
2225
+ }
2226
+ }), n.nodeToTempPositionMapHorizontal.set(B, n.nodeToTempPositionMapHorizontal.get(B) + O), n.dummyToNodeForVerticalAlignment.has(B) ? n.dummyToNodeForVerticalAlignment.get(B).forEach(function(H) {
2227
+ n.idToNodeMap.get(H).displacementX = O;
2228
+ }) : n.idToNodeMap.get(B).displacementX = O;
2229
+ }
2230
+ }), this.nodesInRelativeVertical.forEach(function(B) {
2231
+ if (!n.fixedNodesOnHorizontal.has(B)) {
2232
+ var O = 0;
2233
+ n.dummyToNodeForHorizontalAlignment.has(B) ? O = n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY : O = n.idToNodeMap.get(B).displacementY, n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(H) {
2234
+ if (H.bottom) {
2235
+ var $ = n.nodeToTempPositionMapVertical.get(H.bottom) - n.nodeToTempPositionMapVertical.get(B) - O;
2236
+ $ < H.gap && (O -= H.gap - $);
2237
+ } else {
2238
+ var $ = n.nodeToTempPositionMapVertical.get(B) - n.nodeToTempPositionMapVertical.get(H.top) + O;
2239
+ $ < H.gap && (O += H.gap - $);
2240
+ }
2241
+ }), n.nodeToTempPositionMapVertical.set(B, n.nodeToTempPositionMapVertical.get(B) + O), n.dummyToNodeForHorizontalAlignment.has(B) ? n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(H) {
2242
+ n.idToNodeMap.get(H).displacementY = O;
2243
+ }) : n.idToNodeMap.get(B).displacementY = O;
2244
+ }
2245
+ });
2246
+ else {
2247
+ for (var p = 0; p < this.componentsOnHorizontal.length; p++) {
2248
+ var x = this.componentsOnHorizontal[p];
2249
+ if (this.fixedComponentsOnHorizontal[p])
2250
+ for (var y = 0; y < x.length; y++)
2251
+ this.dummyToNodeForVerticalAlignment.has(x[y]) ? this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H) {
2252
+ n.idToNodeMap.get(H).displacementX = 0;
2253
+ }) : this.idToNodeMap.get(x[y]).displacementX = 0;
2254
+ else {
2255
+ for (var Q = 0, z = 0, y = 0; y < x.length; y++)
2256
+ if (this.dummyToNodeForVerticalAlignment.has(x[y])) {
2257
+ var Y = this.dummyToNodeForVerticalAlignment.get(x[y]);
2258
+ Q += Y.length * this.idToNodeMap.get(Y[0]).displacementX, z += Y.length;
2259
+ } else
2260
+ Q += this.idToNodeMap.get(x[y]).displacementX, z++;
2261
+ for (var rt = Q / z, y = 0; y < x.length; y++)
2262
+ this.dummyToNodeForVerticalAlignment.has(x[y]) ? this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H) {
2263
+ n.idToNodeMap.get(H).displacementX = rt;
2264
+ }) : this.idToNodeMap.get(x[y]).displacementX = rt;
2265
+ }
2266
+ }
2267
+ for (var p = 0; p < this.componentsOnVertical.length; p++) {
2268
+ var x = this.componentsOnVertical[p];
2269
+ if (this.fixedComponentsOnVertical[p])
2270
+ for (var y = 0; y < x.length; y++)
2271
+ this.dummyToNodeForHorizontalAlignment.has(x[y]) ? this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($) {
2272
+ n.idToNodeMap.get($).displacementY = 0;
2273
+ }) : this.idToNodeMap.get(x[y]).displacementY = 0;
2274
+ else {
2275
+ for (var Q = 0, z = 0, y = 0; y < x.length; y++)
2276
+ if (this.dummyToNodeForHorizontalAlignment.has(x[y])) {
2277
+ var Y = this.dummyToNodeForHorizontalAlignment.get(x[y]);
2278
+ Q += Y.length * this.idToNodeMap.get(Y[0]).displacementY, z += Y.length;
2279
+ } else
2280
+ Q += this.idToNodeMap.get(x[y]).displacementY, z++;
2281
+ for (var rt = Q / z, y = 0; y < x.length; y++)
2282
+ this.dummyToNodeForHorizontalAlignment.has(x[y]) ? this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J) {
2283
+ n.idToNodeMap.get(J).displacementY = rt;
2284
+ }) : this.idToNodeMap.get(x[y]).displacementY = rt;
2285
+ }
2286
+ }
2287
+ }
2288
+ }, D.prototype.calculateNodesToApplyGravitationTo = function() {
2289
+ var n = [], m, p = this.graphManager.getGraphs(), E = p.length, y;
2290
+ for (y = 0; y < E; y++)
2291
+ m = p[y], m.updateConnected(), m.isConnected || (n = n.concat(m.getNodes()));
2292
+ return n;
2293
+ }, D.prototype.createBendpoints = function() {
2294
+ var n = [];
2295
+ n = n.concat(this.graphManager.getAllEdges());
2296
+ var m = /* @__PURE__ */ new Set(), p;
2297
+ for (p = 0; p < n.length; p++) {
2298
+ var E = n[p];
2299
+ if (!m.has(E)) {
2300
+ var y = E.getSource(), I = E.getTarget();
2301
+ if (y == I)
2302
+ E.getBendpoints().push(new d()), E.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(E), m.add(E);
2303
+ else {
2304
+ var M = [];
2305
+ if (M = M.concat(y.getEdgeListToNode(I)), M = M.concat(I.getEdgeListToNode(y)), !m.has(M[0])) {
2306
+ if (M.length > 1) {
2307
+ var R;
2308
+ for (R = 0; R < M.length; R++) {
2309
+ var W = M[R];
2310
+ W.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(W);
2311
+ }
2312
+ }
2313
+ M.forEach(function(x) {
2314
+ m.add(x);
2315
+ });
2316
+ }
2317
+ }
2318
+ }
2319
+ if (m.size == n.length)
2320
+ break;
2321
+ }
2322
+ }, D.prototype.positionNodesRadially = function(n) {
2323
+ for (var m = new g(0, 0), p = Math.ceil(Math.sqrt(n.length)), E = 0, y = 0, I = 0, M = new d(0, 0), R = 0; R < n.length; R++) {
2324
+ R % p == 0 && (I = 0, y = E, R != 0 && (y += o.DEFAULT_COMPONENT_SEPERATION), E = 0);
2325
+ var W = n[R], x = b.findCenterOfTree(W);
2326
+ m.x = I, m.y = y, M = D.radialLayout(W, x, m), M.y > E && (E = Math.floor(M.y)), I = Math.floor(M.x + o.DEFAULT_COMPONENT_SEPERATION);
2327
+ }
2328
+ this.transform(new d(T.WORLD_CENTER_X - M.x / 2, T.WORLD_CENTER_Y - M.y / 2));
2329
+ }, D.radialLayout = function(n, m, p) {
2330
+ var E = Math.max(this.maxDiagonalInTree(n), o.DEFAULT_RADIAL_SEPARATION);
2331
+ D.branchRadialLayout(m, null, 0, 359, 0, E);
2332
+ var y = V.calculateBounds(n), I = new X();
2333
+ I.setDeviceOrgX(y.getMinX()), I.setDeviceOrgY(y.getMinY()), I.setWorldOrgX(p.x), I.setWorldOrgY(p.y);
2334
+ for (var M = 0; M < n.length; M++) {
2335
+ var R = n[M];
2336
+ R.transform(I);
2337
+ }
2338
+ var W = new d(y.getMaxX(), y.getMaxY());
2339
+ return I.inverseTransformPoint(W);
2340
+ }, D.branchRadialLayout = function(n, m, p, E, y, I) {
2341
+ var M = (E - p + 1) / 2;
2342
+ M < 0 && (M += 180);
2343
+ var R = (M + p) % 360, W = R * S.TWO_PI / 360, x = y * Math.cos(W), Q = y * Math.sin(W);
2344
+ n.setCenter(x, Q);
2345
+ var z = [];
2346
+ z = z.concat(n.getEdges());
2347
+ var Y = z.length;
2348
+ m != null && Y--;
2349
+ for (var rt = 0, B = z.length, O, H = n.getEdgesBetween(m); H.length > 1; ) {
2350
+ var $ = H[0];
2351
+ H.splice(0, 1);
2352
+ var tt = z.indexOf($);
2353
+ tt >= 0 && z.splice(tt, 1), B--, Y--;
2354
+ }
2355
+ m != null ? O = (z.indexOf(H[0]) + 1) % B : O = 0;
2356
+ for (var ht = Math.abs(E - p) / Y, J = O; rt != Y; J = ++J % B) {
2357
+ var It = z[J].getOtherEnd(n);
2358
+ if (It != m) {
2359
+ var Nt = (p + rt * ht) % 360, vt = (Nt + ht) % 360;
2360
+ D.branchRadialLayout(It, n, Nt, vt, y + I, I), rt++;
2361
+ }
2362
+ }
2363
+ }, D.maxDiagonalInTree = function(n) {
2364
+ for (var m = A.MIN_VALUE, p = 0; p < n.length; p++) {
2365
+ var E = n[p], y = E.getDiagonal();
2366
+ y > m && (m = y);
2367
+ }
2368
+ return m;
2369
+ }, D.prototype.calcRepulsionRange = function() {
2370
+ return 2 * (this.level + 1) * this.idealEdgeLength;
2371
+ }, D.prototype.groupZeroDegreeMembers = function() {
2372
+ var n = this, m = {};
2373
+ this.memberGroups = {}, this.idToDummyNode = {};
2374
+ for (var p = [], E = this.graphManager.getAllNodes(), y = 0; y < E.length; y++) {
2375
+ var I = E[y], M = I.getParent();
2376
+ this.getNodeDegreeWithChildren(I) === 0 && (M.id == null || !this.getToBeTiled(M)) && p.push(I);
2377
+ }
2378
+ for (var y = 0; y < p.length; y++) {
2379
+ var I = p[y], R = I.getParent().id;
2380
+ typeof m[R] > "u" && (m[R] = []), m[R] = m[R].concat(I);
2381
+ }
2382
+ Object.keys(m).forEach(function(W) {
2383
+ if (m[W].length > 1) {
2384
+ var x = "DummyCompound_" + W;
2385
+ n.memberGroups[x] = m[W];
2386
+ var Q = m[W][0].getParent(), z = new t(n.graphManager);
2387
+ z.id = x, z.paddingLeft = Q.paddingLeft || 0, z.paddingRight = Q.paddingRight || 0, z.paddingBottom = Q.paddingBottom || 0, z.paddingTop = Q.paddingTop || 0, n.idToDummyNode[x] = z;
2388
+ var Y = n.getGraphManager().add(n.newGraph(), z), rt = Q.getChild();
2389
+ rt.add(z);
2390
+ for (var B = 0; B < m[W].length; B++) {
2391
+ var O = m[W][B];
2392
+ rt.remove(O), Y.add(O);
2393
+ }
2394
+ }
2395
+ });
2396
+ }, D.prototype.clearCompounds = function() {
2397
+ var n = {}, m = {};
2398
+ this.performDFSOnCompounds();
2399
+ for (var p = 0; p < this.compoundOrder.length; p++)
2400
+ m[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;
2401
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(n, m);
2402
+ }, D.prototype.clearZeroDegreeMembers = function() {
2403
+ var n = this, m = this.tiledZeroDegreePack = [];
2404
+ Object.keys(this.memberGroups).forEach(function(p) {
2405
+ var E = n.idToDummyNode[p];
2406
+ if (m[p] = n.tileNodes(n.memberGroups[p], E.paddingLeft + E.paddingRight), E.rect.width = m[p].width, E.rect.height = m[p].height, E.setCenter(m[p].centerX, m[p].centerY), E.labelMarginLeft = 0, E.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2407
+ var y = E.rect.width, I = E.rect.height;
2408
+ E.labelWidth && (E.labelPosHorizontal == "left" ? (E.rect.x -= E.labelWidth, E.setWidth(y + E.labelWidth), E.labelMarginLeft = E.labelWidth) : E.labelPosHorizontal == "center" && E.labelWidth > y ? (E.rect.x -= (E.labelWidth - y) / 2, E.setWidth(E.labelWidth), E.labelMarginLeft = (E.labelWidth - y) / 2) : E.labelPosHorizontal == "right" && E.setWidth(y + E.labelWidth)), E.labelHeight && (E.labelPosVertical == "top" ? (E.rect.y -= E.labelHeight, E.setHeight(I + E.labelHeight), E.labelMarginTop = E.labelHeight) : E.labelPosVertical == "center" && E.labelHeight > I ? (E.rect.y -= (E.labelHeight - I) / 2, E.setHeight(E.labelHeight), E.labelMarginTop = (E.labelHeight - I) / 2) : E.labelPosVertical == "bottom" && E.setHeight(I + E.labelHeight));
2409
+ }
2410
+ });
2411
+ }, D.prototype.repopulateCompounds = function() {
2412
+ for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
2413
+ var m = this.compoundOrder[n], p = m.id, E = m.paddingLeft, y = m.paddingTop, I = m.labelMarginLeft, M = m.labelMarginTop;
2414
+ this.adjustLocations(this.tiledMemberPack[p], m.rect.x, m.rect.y, E, y, I, M);
2415
+ }
2416
+ }, D.prototype.repopulateZeroDegreeMembers = function() {
2417
+ var n = this, m = this.tiledZeroDegreePack;
2418
+ Object.keys(m).forEach(function(p) {
2419
+ var E = n.idToDummyNode[p], y = E.paddingLeft, I = E.paddingTop, M = E.labelMarginLeft, R = E.labelMarginTop;
2420
+ n.adjustLocations(m[p], E.rect.x, E.rect.y, y, I, M, R);
2421
+ });
2422
+ }, D.prototype.getToBeTiled = function(n) {
2423
+ var m = n.id;
2424
+ if (this.toBeTiled[m] != null)
2425
+ return this.toBeTiled[m];
2426
+ var p = n.getChild();
2427
+ if (p == null)
2428
+ return this.toBeTiled[m] = !1, !1;
2429
+ for (var E = p.getNodes(), y = 0; y < E.length; y++) {
2430
+ var I = E[y];
2431
+ if (this.getNodeDegree(I) > 0)
2432
+ return this.toBeTiled[m] = !1, !1;
2433
+ if (I.getChild() == null) {
2434
+ this.toBeTiled[I.id] = !1;
2435
+ continue;
2436
+ }
2437
+ if (!this.getToBeTiled(I))
2438
+ return this.toBeTiled[m] = !1, !1;
2439
+ }
2440
+ return this.toBeTiled[m] = !0, !0;
2441
+ }, D.prototype.getNodeDegree = function(n) {
2442
+ n.id;
2443
+ for (var m = n.getEdges(), p = 0, E = 0; E < m.length; E++) {
2444
+ var y = m[E];
2445
+ y.getSource().id !== y.getTarget().id && (p = p + 1);
2446
+ }
2447
+ return p;
2448
+ }, D.prototype.getNodeDegreeWithChildren = function(n) {
2449
+ var m = this.getNodeDegree(n);
2450
+ if (n.getChild() == null)
2451
+ return m;
2452
+ for (var p = n.getChild().getNodes(), E = 0; E < p.length; E++) {
2453
+ var y = p[E];
2454
+ m += this.getNodeDegreeWithChildren(y);
2455
+ }
2456
+ return m;
2457
+ }, D.prototype.performDFSOnCompounds = function() {
2458
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2459
+ }, D.prototype.fillCompexOrderByDFS = function(n) {
2460
+ for (var m = 0; m < n.length; m++) {
2461
+ var p = n[m];
2462
+ p.getChild() != null && this.fillCompexOrderByDFS(p.getChild().getNodes()), this.getToBeTiled(p) && this.compoundOrder.push(p);
2463
+ }
2464
+ }, D.prototype.adjustLocations = function(n, m, p, E, y, I, M) {
2465
+ m += E + I, p += y + M;
2466
+ for (var R = m, W = 0; W < n.rows.length; W++) {
2467
+ var x = n.rows[W];
2468
+ m = R;
2469
+ for (var Q = 0, z = 0; z < x.length; z++) {
2470
+ var Y = x[z];
2471
+ Y.rect.x = m, Y.rect.y = p, m += Y.rect.width + n.horizontalPadding, Y.rect.height > Q && (Q = Y.rect.height);
2472
+ }
2473
+ p += Q + n.verticalPadding;
2474
+ }
2475
+ }, D.prototype.tileCompoundMembers = function(n, m) {
2476
+ var p = this;
2477
+ this.tiledMemberPack = [], Object.keys(n).forEach(function(E) {
2478
+ var y = m[E];
2479
+ if (p.tiledMemberPack[E] = p.tileNodes(n[E], y.paddingLeft + y.paddingRight), y.rect.width = p.tiledMemberPack[E].width, y.rect.height = p.tiledMemberPack[E].height, y.setCenter(p.tiledMemberPack[E].centerX, p.tiledMemberPack[E].centerY), y.labelMarginLeft = 0, y.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2480
+ var I = y.rect.width, M = y.rect.height;
2481
+ y.labelWidth && (y.labelPosHorizontal == "left" ? (y.rect.x -= y.labelWidth, y.setWidth(I + y.labelWidth), y.labelMarginLeft = y.labelWidth) : y.labelPosHorizontal == "center" && y.labelWidth > I ? (y.rect.x -= (y.labelWidth - I) / 2, y.setWidth(y.labelWidth), y.labelMarginLeft = (y.labelWidth - I) / 2) : y.labelPosHorizontal == "right" && y.setWidth(I + y.labelWidth)), y.labelHeight && (y.labelPosVertical == "top" ? (y.rect.y -= y.labelHeight, y.setHeight(M + y.labelHeight), y.labelMarginTop = y.labelHeight) : y.labelPosVertical == "center" && y.labelHeight > M ? (y.rect.y -= (y.labelHeight - M) / 2, y.setHeight(y.labelHeight), y.labelMarginTop = (y.labelHeight - M) / 2) : y.labelPosVertical == "bottom" && y.setHeight(M + y.labelHeight));
2482
+ }
2483
+ });
2484
+ }, D.prototype.tileNodes = function(n, m) {
2485
+ var p = this.tileNodesByFavoringDim(n, m, !0), E = this.tileNodesByFavoringDim(n, m, !1), y = this.getOrgRatio(p), I = this.getOrgRatio(E), M;
2486
+ return I < y ? M = E : M = p, M;
2487
+ }, D.prototype.getOrgRatio = function(n) {
2488
+ var m = n.width, p = n.height, E = m / p;
2489
+ return E < 1 && (E = 1 / E), E;
2490
+ }, D.prototype.calcIdealRowWidth = function(n, m) {
2491
+ var p = o.TILING_PADDING_VERTICAL, E = o.TILING_PADDING_HORIZONTAL, y = n.length, I = 0, M = 0, R = 0;
2492
+ n.forEach(function(B) {
2493
+ I += B.getWidth(), M += B.getHeight(), B.getWidth() > R && (R = B.getWidth());
2494
+ });
2495
+ var W = I / y, x = M / y, Q = Math.pow(p - E, 2) + 4 * (W + E) * (x + p) * y, z = (E - p + Math.sqrt(Q)) / (2 * (W + E)), Y;
2496
+ m ? (Y = Math.ceil(z), Y == z && Y++) : Y = Math.floor(z);
2497
+ var rt = Y * (W + E) - E;
2498
+ return R > rt && (rt = R), rt += E * 2, rt;
2499
+ }, D.prototype.tileNodesByFavoringDim = function(n, m, p) {
2500
+ var E = o.TILING_PADDING_VERTICAL, y = o.TILING_PADDING_HORIZONTAL, I = o.TILING_COMPARE_BY, M = {
2501
+ rows: [],
2502
+ rowWidth: [],
2503
+ rowHeight: [],
2504
+ width: 0,
2505
+ height: m,
2506
+ // assume minHeight equals to minWidth
2507
+ verticalPadding: E,
2508
+ horizontalPadding: y,
2509
+ centerX: 0,
2510
+ centerY: 0
2511
+ };
2512
+ I && (M.idealRowWidth = this.calcIdealRowWidth(n, p));
2513
+ var R = function(O) {
2514
+ return O.rect.width * O.rect.height;
2515
+ }, W = function(O, H) {
2516
+ return R(H) - R(O);
2517
+ };
2518
+ n.sort(function(B, O) {
2519
+ var H = W;
2520
+ return M.idealRowWidth ? (H = I, H(B.id, O.id)) : H(B, O);
2521
+ });
2522
+ for (var x = 0, Q = 0, z = 0; z < n.length; z++) {
2523
+ var Y = n[z];
2524
+ x += Y.getCenterX(), Q += Y.getCenterY();
2525
+ }
2526
+ M.centerX = x / n.length, M.centerY = Q / n.length;
2527
+ for (var z = 0; z < n.length; z++) {
2528
+ var Y = n[z];
2529
+ if (M.rows.length == 0)
2530
+ this.insertNodeToRow(M, Y, 0, m);
2531
+ else if (this.canAddHorizontal(M, Y.rect.width, Y.rect.height)) {
2532
+ var rt = M.rows.length - 1;
2533
+ M.idealRowWidth || (rt = this.getShortestRowIndex(M)), this.insertNodeToRow(M, Y, rt, m);
2534
+ } else
2535
+ this.insertNodeToRow(M, Y, M.rows.length, m);
2536
+ this.shiftToLastRow(M);
2537
+ }
2538
+ return M;
2539
+ }, D.prototype.insertNodeToRow = function(n, m, p, E) {
2540
+ var y = E;
2541
+ if (p == n.rows.length) {
2542
+ var I = [];
2543
+ n.rows.push(I), n.rowWidth.push(y), n.rowHeight.push(0);
2544
+ }
2545
+ var M = n.rowWidth[p] + m.rect.width;
2546
+ n.rows[p].length > 0 && (M += n.horizontalPadding), n.rowWidth[p] = M, n.width < M && (n.width = M);
2547
+ var R = m.rect.height;
2548
+ p > 0 && (R += n.verticalPadding);
2549
+ var W = 0;
2550
+ R > n.rowHeight[p] && (W = n.rowHeight[p], n.rowHeight[p] = R, W = n.rowHeight[p] - W), n.height += W, n.rows[p].push(m);
2551
+ }, D.prototype.getShortestRowIndex = function(n) {
2552
+ for (var m = -1, p = Number.MAX_VALUE, E = 0; E < n.rows.length; E++)
2553
+ n.rowWidth[E] < p && (m = E, p = n.rowWidth[E]);
2554
+ return m;
2555
+ }, D.prototype.getLongestRowIndex = function(n) {
2556
+ for (var m = -1, p = Number.MIN_VALUE, E = 0; E < n.rows.length; E++)
2557
+ n.rowWidth[E] > p && (m = E, p = n.rowWidth[E]);
2558
+ return m;
2559
+ }, D.prototype.canAddHorizontal = function(n, m, p) {
2560
+ if (n.idealRowWidth) {
2561
+ var E = n.rows.length - 1, y = n.rowWidth[E];
2562
+ return y + m + n.horizontalPadding <= n.idealRowWidth;
2563
+ }
2564
+ var I = this.getShortestRowIndex(n);
2565
+ if (I < 0)
2566
+ return !0;
2567
+ var M = n.rowWidth[I];
2568
+ if (M + n.horizontalPadding + m <= n.width) return !0;
2569
+ var R = 0;
2570
+ n.rowHeight[I] < p && I > 0 && (R = p + n.verticalPadding - n.rowHeight[I]);
2571
+ var W;
2572
+ n.width - M >= m + n.horizontalPadding ? W = (n.height + R) / (M + m + n.horizontalPadding) : W = (n.height + R) / n.width, R = p + n.verticalPadding;
2573
+ var x;
2574
+ return n.width < m ? x = (n.height + R) / m : x = (n.height + R) / n.width, x < 1 && (x = 1 / x), W < 1 && (W = 1 / W), W < x;
2575
+ }, D.prototype.shiftToLastRow = function(n) {
2576
+ var m = this.getLongestRowIndex(n), p = n.rowWidth.length - 1, E = n.rows[m], y = E[E.length - 1], I = y.width + n.horizontalPadding;
2577
+ if (n.width - n.rowWidth[p] > I && m != p) {
2578
+ E.splice(-1, 1), n.rows[p].push(y), n.rowWidth[m] = n.rowWidth[m] - I, n.rowWidth[p] = n.rowWidth[p] + I, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
2579
+ for (var M = Number.MIN_VALUE, R = 0; R < E.length; R++)
2580
+ E[R].height > M && (M = E[R].height);
2581
+ m > 0 && (M += n.verticalPadding);
2582
+ var W = n.rowHeight[m] + n.rowHeight[p];
2583
+ n.rowHeight[m] = M, n.rowHeight[p] < y.height + n.verticalPadding && (n.rowHeight[p] = y.height + n.verticalPadding);
2584
+ var x = n.rowHeight[m] + n.rowHeight[p];
2585
+ n.height += x - W, this.shiftToLastRow(n);
2586
+ }
2587
+ }, D.prototype.tilingPreLayout = function() {
2588
+ o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2589
+ }, D.prototype.tilingPostLayout = function() {
2590
+ o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2591
+ }, D.prototype.reduceTrees = function() {
2592
+ for (var n = [], m = !0, p; m; ) {
2593
+ var E = this.graphManager.getAllNodes(), y = [];
2594
+ m = !1;
2595
+ for (var I = 0; I < E.length; I++)
2596
+ if (p = E[I], p.getEdges().length == 1 && !p.getEdges()[0].isInterGraph && p.getChild() == null) {
2597
+ if (o.PURE_INCREMENTAL) {
2598
+ var M = p.getEdges()[0].getOtherEnd(p), R = new N(p.getCenterX() - M.getCenterX(), p.getCenterY() - M.getCenterY());
2599
+ y.push([p, p.getEdges()[0], p.getOwner(), R]);
2600
+ } else
2601
+ y.push([p, p.getEdges()[0], p.getOwner()]);
2602
+ m = !0;
2603
+ }
2604
+ if (m == !0) {
2605
+ for (var W = [], x = 0; x < y.length; x++)
2606
+ y[x][0].getEdges().length == 1 && (W.push(y[x]), y[x][0].getOwner().remove(y[x][0]));
2607
+ n.push(W), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2608
+ }
2609
+ }
2610
+ this.prunedNodesAll = n;
2611
+ }, D.prototype.growTree = function(n) {
2612
+ for (var m = n.length, p = n[m - 1], E, y = 0; y < p.length; y++)
2613
+ E = p[y], this.findPlaceforPrunedNode(E), E[2].add(E[0]), E[2].add(E[1], E[1].source, E[1].target);
2614
+ n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2615
+ }, D.prototype.findPlaceforPrunedNode = function(n) {
2616
+ var m, p, E = n[0];
2617
+ if (E == n[1].source ? p = n[1].target : p = n[1].source, o.PURE_INCREMENTAL)
2618
+ E.setCenter(p.getCenterX() + n[3].getWidth(), p.getCenterY() + n[3].getHeight());
2619
+ else {
2620
+ var y = p.startX, I = p.finishX, M = p.startY, R = p.finishY, W = 0, x = 0, Q = 0, z = 0, Y = [W, Q, x, z];
2621
+ if (M > 0)
2622
+ for (var rt = y; rt <= I; rt++)
2623
+ Y[0] += this.grid[rt][M - 1].length + this.grid[rt][M].length - 1;
2624
+ if (I < this.grid.length - 1)
2625
+ for (var rt = M; rt <= R; rt++)
2626
+ Y[1] += this.grid[I + 1][rt].length + this.grid[I][rt].length - 1;
2627
+ if (R < this.grid[0].length - 1)
2628
+ for (var rt = y; rt <= I; rt++)
2629
+ Y[2] += this.grid[rt][R + 1].length + this.grid[rt][R].length - 1;
2630
+ if (y > 0)
2631
+ for (var rt = M; rt <= R; rt++)
2632
+ Y[3] += this.grid[y - 1][rt].length + this.grid[y][rt].length - 1;
2633
+ for (var B = A.MAX_VALUE, O, H, $ = 0; $ < Y.length; $++)
2634
+ Y[$] < B ? (B = Y[$], O = 1, H = $) : Y[$] == B && O++;
2635
+ if (O == 3 && B == 0)
2636
+ Y[0] == 0 && Y[1] == 0 && Y[2] == 0 ? m = 1 : Y[0] == 0 && Y[1] == 0 && Y[3] == 0 ? m = 0 : Y[0] == 0 && Y[2] == 0 && Y[3] == 0 ? m = 3 : Y[1] == 0 && Y[2] == 0 && Y[3] == 0 && (m = 2);
2637
+ else if (O == 2 && B == 0) {
2638
+ var tt = Math.floor(Math.random() * 2);
2639
+ Y[0] == 0 && Y[1] == 0 ? tt == 0 ? m = 0 : m = 1 : Y[0] == 0 && Y[2] == 0 ? tt == 0 ? m = 0 : m = 2 : Y[0] == 0 && Y[3] == 0 ? tt == 0 ? m = 0 : m = 3 : Y[1] == 0 && Y[2] == 0 ? tt == 0 ? m = 1 : m = 2 : Y[1] == 0 && Y[3] == 0 ? tt == 0 ? m = 1 : m = 3 : tt == 0 ? m = 2 : m = 3;
2640
+ } else if (O == 4 && B == 0) {
2641
+ var tt = Math.floor(Math.random() * 4);
2642
+ m = tt;
2643
+ } else
2644
+ m = H;
2645
+ m == 0 ? E.setCenter(p.getCenterX(), p.getCenterY() - p.getHeight() / 2 - l.DEFAULT_EDGE_LENGTH - E.getHeight() / 2) : m == 1 ? E.setCenter(p.getCenterX() + p.getWidth() / 2 + l.DEFAULT_EDGE_LENGTH + E.getWidth() / 2, p.getCenterY()) : m == 2 ? E.setCenter(p.getCenterX(), p.getCenterY() + p.getHeight() / 2 + l.DEFAULT_EDGE_LENGTH + E.getHeight() / 2) : E.setCenter(p.getCenterX() - p.getWidth() / 2 - l.DEFAULT_EDGE_LENGTH - E.getWidth() / 2, p.getCenterY());
2646
+ }
2647
+ }, a.exports = D;
2648
+ })
2649
+ ),
2650
+ /***/
2651
+ 991: (
2652
+ /***/
2653
+ ((a, e, i) => {
2654
+ var f = i(551).FDLayoutNode, r = i(551).IMath;
2655
+ function v(s, o, c, l) {
2656
+ f.call(this, s, o, c, l);
2657
+ }
2658
+ v.prototype = Object.create(f.prototype);
2659
+ for (var t in f)
2660
+ v[t] = f[t];
2661
+ v.prototype.calculateDisplacement = function() {
2662
+ var s = this.graphManager.getLayout();
2663
+ 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 * r.sign(this.displacementX)), Math.abs(this.displacementY) > s.coolingFactor * s.maxNodeDisplacement && (this.displacementY = s.coolingFactor * s.maxNodeDisplacement * r.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2664
+ }, v.prototype.propogateDisplacementToChildren = function(s, o) {
2665
+ for (var c = this.getChild().getNodes(), l, T = 0; T < c.length; T++)
2666
+ l = c[T], l.getChild() == null ? (l.displacementX += s, l.displacementY += o) : l.propogateDisplacementToChildren(s, o);
2667
+ }, v.prototype.move = function() {
2668
+ var s = this.graphManager.getLayout();
2669
+ (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;
2670
+ }, v.prototype.setPred1 = function(s) {
2671
+ this.pred1 = s;
2672
+ }, v.prototype.getPred1 = function() {
2673
+ return pred1;
2674
+ }, v.prototype.getPred2 = function() {
2675
+ return pred2;
2676
+ }, v.prototype.setNext = function(s) {
2677
+ this.next = s;
2678
+ }, v.prototype.getNext = function() {
2679
+ return next;
2680
+ }, v.prototype.setProcessed = function(s) {
2681
+ this.processed = s;
2682
+ }, v.prototype.isProcessed = function() {
2683
+ return processed;
2684
+ }, a.exports = v;
2685
+ })
2686
+ ),
2687
+ /***/
2688
+ 902: (
2689
+ /***/
2690
+ ((a, e, i) => {
2691
+ function f(c) {
2692
+ if (Array.isArray(c)) {
2693
+ for (var l = 0, T = Array(c.length); l < c.length; l++)
2694
+ T[l] = c[l];
2695
+ return T;
2696
+ } else
2697
+ return Array.from(c);
2698
+ }
2699
+ var r = i(806), v = i(551).LinkedList, t = i(551).Matrix, s = i(551).SVD;
2700
+ function o() {
2701
+ }
2702
+ o.handleConstraints = function(c) {
2703
+ var l = {};
2704
+ l.fixedNodeConstraint = c.constraints.fixedNodeConstraint, l.alignmentConstraint = c.constraints.alignmentConstraint, l.relativePlacementConstraint = c.constraints.relativePlacementConstraint;
2705
+ for (var T = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), d = [], N = [], b = c.getAllNodes(), A = 0, S = 0; S < b.length; S++) {
2706
+ var V = b[S];
2707
+ V.getChild() == null && (g.set(V.id, A++), d.push(V.getCenterX()), N.push(V.getCenterY()), T.set(V.id, V));
2708
+ }
2709
+ l.relativePlacementConstraint && l.relativePlacementConstraint.forEach(function(F) {
2710
+ !F.gap && F.gap != 0 && (F.left ? F.gap = r.DEFAULT_EDGE_LENGTH + T.get(F.left).getWidth() / 2 + T.get(F.right).getWidth() / 2 : F.gap = r.DEFAULT_EDGE_LENGTH + T.get(F.top).getHeight() / 2 + T.get(F.bottom).getHeight() / 2);
2711
+ });
2712
+ var X = function(P, k) {
2713
+ return { x: P.x - k.x, y: P.y - k.y };
2714
+ }, Z = function(P) {
2715
+ var k = 0, K = 0;
2716
+ return P.forEach(function(q) {
2717
+ k += d[g.get(q)], K += N[g.get(q)];
2718
+ }), { x: k / P.size, y: K / P.size };
2719
+ }, D = function(P, k, K, q, at) {
2720
+ function ct(lt, ot) {
2721
+ var Lt = new Set(lt), ft = !0, st = !1, Xt = void 0;
2722
+ try {
2723
+ for (var Tt = ot[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2724
+ var Bt = Ct.value;
2725
+ Lt.add(Bt);
2726
+ }
2727
+ } catch (bt) {
2728
+ st = !0, Xt = bt;
2729
+ } finally {
2730
+ try {
2731
+ !ft && Tt.return && Tt.return();
2732
+ } finally {
2733
+ if (st)
2734
+ throw Xt;
2735
+ }
2736
+ }
2737
+ return Lt;
2738
+ }
2739
+ var nt = /* @__PURE__ */ new Map();
2740
+ P.forEach(function(lt, ot) {
2741
+ nt.set(ot, 0);
2742
+ }), P.forEach(function(lt, ot) {
2743
+ lt.forEach(function(Lt) {
2744
+ nt.set(Lt.id, nt.get(Lt.id) + 1);
2745
+ });
2746
+ });
2747
+ var et = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), ut = new v();
2748
+ nt.forEach(function(lt, ot) {
2749
+ lt == 0 ? (ut.push(ot), K || (k == "horizontal" ? et.set(ot, g.has(ot) ? d[g.get(ot)] : q.get(ot)) : et.set(ot, g.has(ot) ? N[g.get(ot)] : q.get(ot)))) : et.set(ot, Number.NEGATIVE_INFINITY), K && j.set(ot, /* @__PURE__ */ new Set([ot]));
2750
+ }), K && at.forEach(function(lt) {
2751
+ var ot = [];
2752
+ if (lt.forEach(function(st) {
2753
+ K.has(st) && ot.push(st);
2754
+ }), ot.length > 0) {
2755
+ var Lt = 0;
2756
+ ot.forEach(function(st) {
2757
+ k == "horizontal" ? (et.set(st, g.has(st) ? d[g.get(st)] : q.get(st)), Lt += et.get(st)) : (et.set(st, g.has(st) ? N[g.get(st)] : q.get(st)), Lt += et.get(st));
2758
+ }), Lt = Lt / ot.length, lt.forEach(function(st) {
2759
+ K.has(st) || et.set(st, Lt);
2760
+ });
2761
+ } else {
2762
+ var ft = 0;
2763
+ lt.forEach(function(st) {
2764
+ k == "horizontal" ? ft += g.has(st) ? d[g.get(st)] : q.get(st) : ft += g.has(st) ? N[g.get(st)] : q.get(st);
2765
+ }), ft = ft / lt.length, lt.forEach(function(st) {
2766
+ et.set(st, ft);
2767
+ });
2768
+ }
2769
+ });
2770
+ for (var wt = function() {
2771
+ var ot = ut.shift(), Lt = P.get(ot);
2772
+ Lt.forEach(function(ft) {
2773
+ if (et.get(ft.id) < et.get(ot) + ft.gap)
2774
+ if (K && K.has(ft.id)) {
2775
+ var st = void 0;
2776
+ if (k == "horizontal" ? st = g.has(ft.id) ? d[g.get(ft.id)] : q.get(ft.id) : st = g.has(ft.id) ? N[g.get(ft.id)] : q.get(ft.id), et.set(ft.id, st), st < et.get(ot) + ft.gap) {
2777
+ var Xt = et.get(ot) + ft.gap - st;
2778
+ j.get(ot).forEach(function(Tt) {
2779
+ et.set(Tt, et.get(Tt) - Xt);
2780
+ });
2781
+ }
2782
+ } else
2783
+ et.set(ft.id, et.get(ot) + ft.gap);
2784
+ nt.set(ft.id, nt.get(ft.id) - 1), nt.get(ft.id) == 0 && ut.push(ft.id), K && j.set(ft.id, ct(j.get(ot), j.get(ft.id)));
2785
+ });
2786
+ }; ut.length != 0; )
2787
+ wt();
2788
+ if (K) {
2789
+ var pt = /* @__PURE__ */ new Set();
2790
+ P.forEach(function(lt, ot) {
2791
+ lt.length == 0 && pt.add(ot);
2792
+ });
2793
+ var xt = [];
2794
+ j.forEach(function(lt, ot) {
2795
+ if (pt.has(ot)) {
2796
+ var Lt = !1, ft = !0, st = !1, Xt = void 0;
2797
+ try {
2798
+ for (var Tt = lt[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2799
+ var Bt = Ct.value;
2800
+ K.has(Bt) && (Lt = !0);
2801
+ }
2802
+ } catch (St) {
2803
+ st = !0, Xt = St;
2804
+ } finally {
2805
+ try {
2806
+ !ft && Tt.return && Tt.return();
2807
+ } finally {
2808
+ if (st)
2809
+ throw Xt;
2810
+ }
2811
+ }
2812
+ if (!Lt) {
2813
+ var bt = !1, zt = void 0;
2814
+ xt.forEach(function(St, kt) {
2815
+ St.has([].concat(f(lt))[0]) && (bt = !0, zt = kt);
2816
+ }), bt ? lt.forEach(function(St) {
2817
+ xt[zt].add(St);
2818
+ }) : xt.push(new Set(lt));
2819
+ }
2820
+ }
2821
+ }), xt.forEach(function(lt, ot) {
2822
+ var Lt = Number.POSITIVE_INFINITY, ft = Number.POSITIVE_INFINITY, st = Number.NEGATIVE_INFINITY, Xt = Number.NEGATIVE_INFINITY, Tt = !0, Ct = !1, Bt = void 0;
2823
+ try {
2824
+ for (var bt = lt[Symbol.iterator](), zt; !(Tt = (zt = bt.next()).done); Tt = !0) {
2825
+ var St = zt.value, kt = void 0;
2826
+ k == "horizontal" ? kt = g.has(St) ? d[g.get(St)] : q.get(St) : kt = g.has(St) ? N[g.get(St)] : q.get(St);
2827
+ var Kt = et.get(St);
2828
+ kt < Lt && (Lt = kt), kt > st && (st = kt), Kt < ft && (ft = Kt), Kt > Xt && (Xt = Kt);
2829
+ }
2830
+ } catch (ee) {
2831
+ Ct = !0, Bt = ee;
2832
+ } finally {
2833
+ try {
2834
+ !Tt && bt.return && bt.return();
2835
+ } finally {
2836
+ if (Ct)
2837
+ throw Bt;
2838
+ }
2839
+ }
2840
+ var fe = (Lt + st) / 2 - (ft + Xt) / 2, Qt = !0, jt = !1, _t = void 0;
2841
+ try {
2842
+ for (var Jt = lt[Symbol.iterator](), ne; !(Qt = (ne = Jt.next()).done); Qt = !0) {
2843
+ var te = ne.value;
2844
+ et.set(te, et.get(te) + fe);
2845
+ }
2846
+ } catch (ee) {
2847
+ jt = !0, _t = ee;
2848
+ } finally {
2849
+ try {
2850
+ !Qt && Jt.return && Jt.return();
2851
+ } finally {
2852
+ if (jt)
2853
+ throw _t;
2854
+ }
2855
+ }
2856
+ });
2857
+ }
2858
+ return et;
2859
+ }, _ = function(P) {
2860
+ var k = 0, K = 0, q = 0, at = 0;
2861
+ if (P.forEach(function(j) {
2862
+ j.left ? d[g.get(j.left)] - d[g.get(j.right)] >= 0 ? k++ : K++ : N[g.get(j.top)] - N[g.get(j.bottom)] >= 0 ? q++ : at++;
2863
+ }), k > K && q > at)
2864
+ for (var ct = 0; ct < g.size; ct++)
2865
+ d[ct] = -1 * d[ct], N[ct] = -1 * N[ct];
2866
+ else if (k > K)
2867
+ for (var nt = 0; nt < g.size; nt++)
2868
+ d[nt] = -1 * d[nt];
2869
+ else if (q > at)
2870
+ for (var et = 0; et < g.size; et++)
2871
+ N[et] = -1 * N[et];
2872
+ }, n = function(P) {
2873
+ var k = [], K = new v(), q = /* @__PURE__ */ new Set(), at = 0;
2874
+ return P.forEach(function(ct, nt) {
2875
+ if (!q.has(nt)) {
2876
+ k[at] = [];
2877
+ var et = nt;
2878
+ for (K.push(et), q.add(et), k[at].push(et); K.length != 0; ) {
2879
+ et = K.shift();
2880
+ var j = P.get(et);
2881
+ j.forEach(function(ut) {
2882
+ q.has(ut.id) || (K.push(ut.id), q.add(ut.id), k[at].push(ut.id));
2883
+ });
2884
+ }
2885
+ at++;
2886
+ }
2887
+ }), k;
2888
+ }, m = function(P) {
2889
+ var k = /* @__PURE__ */ new Map();
2890
+ return P.forEach(function(K, q) {
2891
+ k.set(q, []);
2892
+ }), P.forEach(function(K, q) {
2893
+ K.forEach(function(at) {
2894
+ k.get(q).push(at), k.get(at.id).push({ id: q, gap: at.gap, direction: at.direction });
2895
+ });
2896
+ }), k;
2897
+ }, p = function(P) {
2898
+ var k = /* @__PURE__ */ new Map();
2899
+ return P.forEach(function(K, q) {
2900
+ k.set(q, []);
2901
+ }), P.forEach(function(K, q) {
2902
+ K.forEach(function(at) {
2903
+ k.get(at.id).push({ id: q, gap: at.gap, direction: at.direction });
2904
+ });
2905
+ }), k;
2906
+ }, E = [], y = [], I = !1, M = !1, R = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), Q = [];
2907
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.forEach(function(F) {
2908
+ R.add(F.nodeId);
2909
+ }), l.relativePlacementConstraint && (l.relativePlacementConstraint.forEach(function(F) {
2910
+ F.left ? (W.has(F.left) ? W.get(F.left).push({ id: F.right, gap: F.gap, direction: "horizontal" }) : W.set(F.left, [{ id: F.right, gap: F.gap, direction: "horizontal" }]), W.has(F.right) || W.set(F.right, [])) : (W.has(F.top) ? W.get(F.top).push({ id: F.bottom, gap: F.gap, direction: "vertical" }) : W.set(F.top, [{ id: F.bottom, gap: F.gap, direction: "vertical" }]), W.has(F.bottom) || W.set(F.bottom, []));
2911
+ }), x = m(W), Q = n(x)), r.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2912
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.length > 1)
2913
+ l.fixedNodeConstraint.forEach(function(F, P) {
2914
+ E[P] = [F.position.x, F.position.y], y[P] = [d[g.get(F.nodeId)], N[g.get(F.nodeId)]];
2915
+ }), I = !0;
2916
+ else if (l.alignmentConstraint)
2917
+ (function() {
2918
+ var F = 0;
2919
+ if (l.alignmentConstraint.vertical) {
2920
+ for (var P = l.alignmentConstraint.vertical, k = function(et) {
2921
+ var j = /* @__PURE__ */ new Set();
2922
+ P[et].forEach(function(pt) {
2923
+ j.add(pt);
2924
+ });
2925
+ var ut = new Set([].concat(f(j)).filter(function(pt) {
2926
+ return R.has(pt);
2927
+ })), wt = void 0;
2928
+ ut.size > 0 ? wt = d[g.get(ut.values().next().value)] : wt = Z(j).x, P[et].forEach(function(pt) {
2929
+ E[F] = [wt, N[g.get(pt)]], y[F] = [d[g.get(pt)], N[g.get(pt)]], F++;
2930
+ });
2931
+ }, K = 0; K < P.length; K++)
2932
+ k(K);
2933
+ I = !0;
2934
+ }
2935
+ if (l.alignmentConstraint.horizontal) {
2936
+ for (var q = l.alignmentConstraint.horizontal, at = function(et) {
2937
+ var j = /* @__PURE__ */ new Set();
2938
+ q[et].forEach(function(pt) {
2939
+ j.add(pt);
2940
+ });
2941
+ var ut = new Set([].concat(f(j)).filter(function(pt) {
2942
+ return R.has(pt);
2943
+ })), wt = void 0;
2944
+ ut.size > 0 ? wt = d[g.get(ut.values().next().value)] : wt = Z(j).y, q[et].forEach(function(pt) {
2945
+ E[F] = [d[g.get(pt)], wt], y[F] = [d[g.get(pt)], N[g.get(pt)]], F++;
2946
+ });
2947
+ }, ct = 0; ct < q.length; ct++)
2948
+ at(ct);
2949
+ I = !0;
2950
+ }
2951
+ l.relativePlacementConstraint && (M = !0);
2952
+ })();
2953
+ else if (l.relativePlacementConstraint) {
2954
+ for (var z = 0, Y = 0, rt = 0; rt < Q.length; rt++)
2955
+ Q[rt].length > z && (z = Q[rt].length, Y = rt);
2956
+ if (z < x.size / 2)
2957
+ _(l.relativePlacementConstraint), I = !1, M = !1;
2958
+ else {
2959
+ var B = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), H = [];
2960
+ Q[Y].forEach(function(F) {
2961
+ W.get(F).forEach(function(P) {
2962
+ P.direction == "horizontal" ? (B.has(F) ? B.get(F).push(P) : B.set(F, [P]), B.has(P.id) || B.set(P.id, []), H.push({ left: F, right: P.id })) : (O.has(F) ? O.get(F).push(P) : O.set(F, [P]), O.has(P.id) || O.set(P.id, []), H.push({ top: F, bottom: P.id }));
2963
+ });
2964
+ }), _(H), M = !1;
2965
+ var $ = D(B, "horizontal"), tt = D(O, "vertical");
2966
+ Q[Y].forEach(function(F, P) {
2967
+ y[P] = [d[g.get(F)], N[g.get(F)]], E[P] = [], $.has(F) ? E[P][0] = $.get(F) : E[P][0] = d[g.get(F)], tt.has(F) ? E[P][1] = tt.get(F) : E[P][1] = N[g.get(F)];
2968
+ }), I = !0;
2969
+ }
2970
+ }
2971
+ if (I) {
2972
+ for (var ht = void 0, J = t.transpose(E), It = t.transpose(y), Nt = 0; Nt < J.length; Nt++)
2973
+ J[Nt] = t.multGamma(J[Nt]), It[Nt] = t.multGamma(It[Nt]);
2974
+ var vt = t.multMat(J, t.transpose(It)), it = s.svd(vt);
2975
+ ht = t.multMat(it.V, t.transpose(it.U));
2976
+ for (var gt = 0; gt < g.size; gt++) {
2977
+ var mt = [d[gt], N[gt]], At = [ht[0][0], ht[1][0]], Ot = [ht[0][1], ht[1][1]];
2978
+ d[gt] = t.dotProduct(mt, At), N[gt] = t.dotProduct(mt, Ot);
2979
+ }
2980
+ M && _(l.relativePlacementConstraint);
2981
+ }
2982
+ }
2983
+ if (r.ENFORCE_CONSTRAINTS) {
2984
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.length > 0) {
2985
+ var Et = { x: 0, y: 0 };
2986
+ l.fixedNodeConstraint.forEach(function(F, P) {
2987
+ var k = { x: d[g.get(F.nodeId)], y: N[g.get(F.nodeId)] }, K = F.position, q = X(K, k);
2988
+ Et.x += q.x, Et.y += q.y;
2989
+ }), Et.x /= l.fixedNodeConstraint.length, Et.y /= l.fixedNodeConstraint.length, d.forEach(function(F, P) {
2990
+ d[P] += Et.x;
2991
+ }), N.forEach(function(F, P) {
2992
+ N[P] += Et.y;
2993
+ }), l.fixedNodeConstraint.forEach(function(F) {
2994
+ d[g.get(F.nodeId)] = F.position.x, N[g.get(F.nodeId)] = F.position.y;
2995
+ });
2996
+ }
2997
+ if (l.alignmentConstraint) {
2998
+ if (l.alignmentConstraint.vertical)
2999
+ for (var Dt = l.alignmentConstraint.vertical, Rt = function(P) {
3000
+ var k = /* @__PURE__ */ new Set();
3001
+ Dt[P].forEach(function(at) {
3002
+ k.add(at);
3003
+ });
3004
+ var K = new Set([].concat(f(k)).filter(function(at) {
3005
+ return R.has(at);
3006
+ })), q = void 0;
3007
+ K.size > 0 ? q = d[g.get(K.values().next().value)] : q = Z(k).x, k.forEach(function(at) {
3008
+ R.has(at) || (d[g.get(at)] = q);
3009
+ });
3010
+ }, Ht = 0; Ht < Dt.length; Ht++)
3011
+ Rt(Ht);
3012
+ if (l.alignmentConstraint.horizontal)
3013
+ for (var Ut = l.alignmentConstraint.horizontal, Pt = function(P) {
3014
+ var k = /* @__PURE__ */ new Set();
3015
+ Ut[P].forEach(function(at) {
3016
+ k.add(at);
3017
+ });
3018
+ var K = new Set([].concat(f(k)).filter(function(at) {
3019
+ return R.has(at);
3020
+ })), q = void 0;
3021
+ K.size > 0 ? q = N[g.get(K.values().next().value)] : q = Z(k).y, k.forEach(function(at) {
3022
+ R.has(at) || (N[g.get(at)] = q);
3023
+ });
3024
+ }, Ft = 0; Ft < Ut.length; Ft++)
3025
+ Pt(Ft);
3026
+ }
3027
+ l.relativePlacementConstraint && (function() {
3028
+ var F = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), at = /* @__PURE__ */ new Map(), ct = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Set();
3029
+ if (R.forEach(function(Gt) {
3030
+ ct.add(Gt), nt.add(Gt);
3031
+ }), l.alignmentConstraint) {
3032
+ if (l.alignmentConstraint.vertical)
3033
+ for (var et = l.alignmentConstraint.vertical, j = function(yt) {
3034
+ k.set("dummy" + yt, []), et[yt].forEach(function(Mt) {
3035
+ F.set(Mt, "dummy" + yt), k.get("dummy" + yt).push(Mt), R.has(Mt) && ct.add("dummy" + yt);
3036
+ }), q.set("dummy" + yt, d[g.get(et[yt][0])]);
3037
+ }, ut = 0; ut < et.length; ut++)
3038
+ j(ut);
3039
+ if (l.alignmentConstraint.horizontal)
3040
+ for (var wt = l.alignmentConstraint.horizontal, pt = function(yt) {
3041
+ K.set("dummy" + yt, []), wt[yt].forEach(function(Mt) {
3042
+ P.set(Mt, "dummy" + yt), K.get("dummy" + yt).push(Mt), R.has(Mt) && nt.add("dummy" + yt);
3043
+ }), at.set("dummy" + yt, N[g.get(wt[yt][0])]);
3044
+ }, xt = 0; xt < wt.length; xt++)
3045
+ pt(xt);
3046
+ }
3047
+ var lt = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map(), Lt = function(yt) {
3048
+ W.get(yt).forEach(function(Mt) {
3049
+ var Zt = void 0, $t = void 0;
3050
+ Mt.direction == "horizontal" ? (Zt = F.get(yt) ? F.get(yt) : yt, F.get(Mt.id) ? $t = { id: F.get(Mt.id), gap: Mt.gap, direction: Mt.direction } : $t = Mt, lt.has(Zt) ? lt.get(Zt).push($t) : lt.set(Zt, [$t]), lt.has($t.id) || lt.set($t.id, [])) : (Zt = P.get(yt) ? P.get(yt) : yt, P.get(Mt.id) ? $t = { id: P.get(Mt.id), gap: Mt.gap, direction: Mt.direction } : $t = Mt, ot.has(Zt) ? ot.get(Zt).push($t) : ot.set(Zt, [$t]), ot.has($t.id) || ot.set($t.id, []));
3051
+ });
3052
+ }, ft = !0, st = !1, Xt = void 0;
3053
+ try {
3054
+ for (var Tt = W.keys()[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
3055
+ var Bt = Ct.value;
3056
+ Lt(Bt);
3057
+ }
3058
+ } catch (Gt) {
3059
+ st = !0, Xt = Gt;
3060
+ } finally {
3061
+ try {
3062
+ !ft && Tt.return && Tt.return();
3063
+ } finally {
3064
+ if (st)
3065
+ throw Xt;
3066
+ }
3067
+ }
3068
+ var bt = m(lt), zt = m(ot), St = n(bt), kt = n(zt), Kt = p(lt), fe = p(ot), Qt = [], jt = [];
3069
+ St.forEach(function(Gt, yt) {
3070
+ Qt[yt] = [], Gt.forEach(function(Mt) {
3071
+ Kt.get(Mt).length == 0 && Qt[yt].push(Mt);
3072
+ });
3073
+ }), kt.forEach(function(Gt, yt) {
3074
+ jt[yt] = [], Gt.forEach(function(Mt) {
3075
+ fe.get(Mt).length == 0 && jt[yt].push(Mt);
3076
+ });
3077
+ });
3078
+ var _t = D(lt, "horizontal", ct, q, Qt), Jt = D(ot, "vertical", nt, at, jt), ne = function(yt) {
3079
+ k.get(yt) ? k.get(yt).forEach(function(Mt) {
3080
+ d[g.get(Mt)] = _t.get(yt);
3081
+ }) : d[g.get(yt)] = _t.get(yt);
3082
+ }, te = !0, ee = !1, Te = void 0;
3083
+ try {
3084
+ for (var ce = _t.keys()[Symbol.iterator](), Ne; !(te = (Ne = ce.next()).done); te = !0) {
3085
+ var ge = Ne.value;
3086
+ ne(ge);
3087
+ }
3088
+ } catch (Gt) {
3089
+ ee = !0, Te = Gt;
3090
+ } finally {
3091
+ try {
3092
+ !te && ce.return && ce.return();
3093
+ } finally {
3094
+ if (ee)
3095
+ throw Te;
3096
+ }
3097
+ }
3098
+ var Be = function(yt) {
3099
+ K.get(yt) ? K.get(yt).forEach(function(Mt) {
3100
+ N[g.get(Mt)] = Jt.get(yt);
3101
+ }) : N[g.get(yt)] = Jt.get(yt);
3102
+ }, ue = !0, Le = !1, Ce = void 0;
3103
+ try {
3104
+ for (var de = Jt.keys()[Symbol.iterator](), Ae; !(ue = (Ae = de.next()).done); ue = !0) {
3105
+ var ge = Ae.value;
3106
+ Be(ge);
3107
+ }
3108
+ } catch (Gt) {
3109
+ Le = !0, Ce = Gt;
3110
+ } finally {
3111
+ try {
3112
+ !ue && de.return && de.return();
3113
+ } finally {
3114
+ if (Le)
3115
+ throw Ce;
3116
+ }
3117
+ }
3118
+ })();
3119
+ }
3120
+ for (var Yt = 0; Yt < b.length; Yt++) {
3121
+ var Vt = b[Yt];
3122
+ Vt.getChild() == null && Vt.setCenter(d[g.get(Vt.id)], N[g.get(Vt.id)]);
3123
+ }
3124
+ }, a.exports = o;
3125
+ })
3126
+ ),
3127
+ /***/
3128
+ 551: (
3129
+ /***/
3130
+ ((a) => {
3131
+ a.exports = w;
3132
+ })
3133
+ )
3134
+ /******/
3135
+ }, L = {};
3136
+ function u(a) {
3137
+ var e = L[a];
3138
+ if (e !== void 0)
3139
+ return e.exports;
3140
+ var i = L[a] = {
3141
+ /******/
3142
+ // no module.id needed
3143
+ /******/
3144
+ // no module.loaded needed
3145
+ /******/
3146
+ exports: {}
3147
+ /******/
3148
+ };
3149
+ return U[a](i, i.exports, u), i.exports;
3150
+ }
3151
+ var h = u(45);
3152
+ return h;
3153
+ })()
3154
+ );
3155
+ });
3156
+ })(he)), he.exports;
3157
+ }
3158
+ var vr = se.exports, Oe;
3159
+ function pr() {
3160
+ return Oe || (Oe = 1, (function(C, G) {
3161
+ (function(U, L) {
3162
+ C.exports = L(dr());
3163
+ })(vr, function(w) {
3164
+ return (
3165
+ /******/
3166
+ (() => {
3167
+ var U = {
3168
+ /***/
3169
+ 658: (
3170
+ /***/
3171
+ ((a) => {
3172
+ a.exports = Object.assign != null ? Object.assign.bind(Object) : function(e) {
3173
+ for (var i = arguments.length, f = Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++)
3174
+ f[r - 1] = arguments[r];
3175
+ return f.forEach(function(v) {
3176
+ Object.keys(v).forEach(function(t) {
3177
+ return e[t] = v[t];
3178
+ });
3179
+ }), e;
3180
+ };
3181
+ })
3182
+ ),
3183
+ /***/
3184
+ 548: (
3185
+ /***/
3186
+ ((a, e, i) => {
3187
+ var f = /* @__PURE__ */ (function() {
3188
+ function t(s, o) {
3189
+ var c = [], l = !0, T = !1, g = void 0;
3190
+ try {
3191
+ for (var d = s[Symbol.iterator](), N; !(l = (N = d.next()).done) && (c.push(N.value), !(o && c.length === o)); l = !0)
3192
+ ;
3193
+ } catch (b) {
3194
+ T = !0, g = b;
3195
+ } finally {
3196
+ try {
3197
+ !l && d.return && d.return();
3198
+ } finally {
3199
+ if (T) throw g;
3200
+ }
3201
+ }
3202
+ return c;
3203
+ }
3204
+ return function(s, o) {
3205
+ if (Array.isArray(s))
3206
+ return s;
3207
+ if (Symbol.iterator in Object(s))
3208
+ return t(s, o);
3209
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
3210
+ };
3211
+ })(), r = i(140).layoutBase.LinkedList, v = {};
3212
+ v.getTopMostNodes = function(t) {
3213
+ for (var s = {}, o = 0; o < t.length; o++)
3214
+ s[t[o].id()] = !0;
3215
+ var c = t.filter(function(l, T) {
3216
+ typeof l == "number" && (l = T);
3217
+ for (var g = l.parent()[0]; g != null; ) {
3218
+ if (s[g.id()])
3219
+ return !1;
3220
+ g = g.parent()[0];
3221
+ }
3222
+ return !0;
3223
+ });
3224
+ return c;
3225
+ }, v.connectComponents = function(t, s, o, c) {
3226
+ var l = new r(), T = /* @__PURE__ */ new Set(), g = [], d = void 0, N = void 0, b = void 0, A = !1, S = 1, V = [], X = [], Z = function() {
3227
+ var _ = t.collection();
3228
+ X.push(_);
3229
+ var n = o[0], m = t.collection();
3230
+ m.merge(n).merge(n.descendants().intersection(s)), g.push(n), m.forEach(function(y) {
3231
+ l.push(y), T.add(y), _.merge(y);
3232
+ });
3233
+ for (var p = function() {
3234
+ n = l.shift();
3235
+ var I = t.collection();
3236
+ n.neighborhood().nodes().forEach(function(x) {
3237
+ s.intersection(n.edgesWith(x)).length > 0 && I.merge(x);
3238
+ });
3239
+ for (var M = 0; M < I.length; M++) {
3240
+ var R = I[M];
3241
+ if (d = o.intersection(R.union(R.ancestors())), d != null && !T.has(d[0])) {
3242
+ var W = d.union(d.descendants());
3243
+ W.forEach(function(x) {
3244
+ l.push(x), T.add(x), _.merge(x), o.has(x) && g.push(x);
3245
+ });
3246
+ }
3247
+ }
3248
+ }; l.length != 0; )
3249
+ p();
3250
+ if (_.forEach(function(y) {
3251
+ s.intersection(y.connectedEdges()).forEach(function(I) {
3252
+ _.has(I.source()) && _.has(I.target()) && _.merge(I);
3253
+ });
3254
+ }), g.length == o.length && (A = !0), !A || A && S > 1) {
3255
+ N = g[0], b = N.connectedEdges().length, g.forEach(function(y) {
3256
+ y.connectedEdges().length < b && (b = y.connectedEdges().length, N = y);
3257
+ }), V.push(N.id());
3258
+ var E = t.collection();
3259
+ E.merge(g[0]), g.forEach(function(y) {
3260
+ E.merge(y);
3261
+ }), g = [], o = o.difference(E), S++;
3262
+ }
3263
+ };
3264
+ do
3265
+ Z();
3266
+ while (!A);
3267
+ return c && V.length > 0 && c.set("dummy" + (c.size + 1), V), X;
3268
+ }, v.relocateComponent = function(t, s, o) {
3269
+ if (!o.fixedNodeConstraint) {
3270
+ var c = Number.POSITIVE_INFINITY, l = Number.NEGATIVE_INFINITY, T = Number.POSITIVE_INFINITY, g = Number.NEGATIVE_INFINITY;
3271
+ if (o.quality == "draft") {
3272
+ var d = !0, N = !1, b = void 0;
3273
+ try {
3274
+ for (var A = s.nodeIndexes[Symbol.iterator](), S; !(d = (S = A.next()).done); d = !0) {
3275
+ var V = S.value, X = f(V, 2), Z = X[0], D = X[1], _ = o.cy.getElementById(Z);
3276
+ if (_) {
3277
+ var n = _.boundingBox(), m = s.xCoords[D] - n.w / 2, p = s.xCoords[D] + n.w / 2, E = s.yCoords[D] - n.h / 2, y = s.yCoords[D] + n.h / 2;
3278
+ m < c && (c = m), p > l && (l = p), E < T && (T = E), y > g && (g = y);
3279
+ }
3280
+ }
3281
+ } catch (x) {
3282
+ N = !0, b = x;
3283
+ } finally {
3284
+ try {
3285
+ !d && A.return && A.return();
3286
+ } finally {
3287
+ if (N)
3288
+ throw b;
3289
+ }
3290
+ }
3291
+ var I = t.x - (l + c) / 2, M = t.y - (g + T) / 2;
3292
+ s.xCoords = s.xCoords.map(function(x) {
3293
+ return x + I;
3294
+ }), s.yCoords = s.yCoords.map(function(x) {
3295
+ return x + M;
3296
+ });
3297
+ } else {
3298
+ Object.keys(s).forEach(function(x) {
3299
+ var Q = s[x], z = Q.getRect().x, Y = Q.getRect().x + Q.getRect().width, rt = Q.getRect().y, B = Q.getRect().y + Q.getRect().height;
3300
+ z < c && (c = z), Y > l && (l = Y), rt < T && (T = rt), B > g && (g = B);
3301
+ });
3302
+ var R = t.x - (l + c) / 2, W = t.y - (g + T) / 2;
3303
+ Object.keys(s).forEach(function(x) {
3304
+ var Q = s[x];
3305
+ Q.setCenter(Q.getCenterX() + R, Q.getCenterY() + W);
3306
+ });
3307
+ }
3308
+ }
3309
+ }, v.calcBoundingBox = function(t, s, o, c) {
3310
+ for (var l = Number.MAX_SAFE_INTEGER, T = Number.MIN_SAFE_INTEGER, g = Number.MAX_SAFE_INTEGER, d = Number.MIN_SAFE_INTEGER, N = void 0, b = void 0, A = void 0, S = void 0, V = t.descendants().not(":parent"), X = V.length, Z = 0; Z < X; Z++) {
3311
+ var D = V[Z];
3312
+ N = s[c.get(D.id())] - D.width() / 2, b = s[c.get(D.id())] + D.width() / 2, A = o[c.get(D.id())] - D.height() / 2, S = o[c.get(D.id())] + D.height() / 2, l > N && (l = N), T < b && (T = b), g > A && (g = A), d < S && (d = S);
3313
+ }
3314
+ var _ = {};
3315
+ return _.topLeftX = l, _.topLeftY = g, _.width = T - l, _.height = d - g, _;
3316
+ }, v.calcParentsWithoutChildren = function(t, s) {
3317
+ var o = t.collection();
3318
+ return s.nodes(":parent").forEach(function(c) {
3319
+ var l = !1;
3320
+ c.children().forEach(function(T) {
3321
+ T.css("display") != "none" && (l = !0);
3322
+ }), l || o.merge(c);
3323
+ }), o;
3324
+ }, a.exports = v;
3325
+ })
3326
+ ),
3327
+ /***/
3328
+ 816: (
3329
+ /***/
3330
+ ((a, e, i) => {
3331
+ var f = i(548), r = i(140).CoSELayout, v = i(140).CoSENode, t = i(140).layoutBase.PointD, s = i(140).layoutBase.DimensionD, o = i(140).layoutBase.LayoutConstants, c = i(140).layoutBase.FDLayoutConstants, l = i(140).CoSEConstants, T = function(d, N) {
3332
+ var b = d.cy, A = d.eles, S = A.nodes(), V = A.edges(), X = void 0, Z = void 0, D = void 0, _ = {};
3333
+ d.randomize && (X = N.nodeIndexes, Z = N.xCoords, D = N.yCoords);
3334
+ var n = function(x) {
3335
+ return typeof x == "function";
3336
+ }, m = function(x, Q) {
3337
+ return n(x) ? x(Q) : x;
3338
+ }, p = f.calcParentsWithoutChildren(b, A), E = function W(x, Q, z, Y) {
3339
+ for (var rt = Q.length, B = 0; B < rt; B++) {
3340
+ var O = Q[B], H = null;
3341
+ O.intersection(p).length == 0 && (H = O.children());
3342
+ var $ = void 0, tt = O.layoutDimensions({
3343
+ nodeDimensionsIncludeLabels: Y.nodeDimensionsIncludeLabels
3344
+ });
3345
+ if (O.outerWidth() != null && O.outerHeight() != null)
3346
+ if (Y.randomize)
3347
+ if (!O.isParent())
3348
+ $ = x.add(new v(z.graphManager, new t(Z[X.get(O.id())] - tt.w / 2, D[X.get(O.id())] - tt.h / 2), new s(parseFloat(tt.w), parseFloat(tt.h))));
3349
+ else {
3350
+ var ht = f.calcBoundingBox(O, Z, D, X);
3351
+ O.intersection(p).length == 0 ? $ = x.add(new v(z.graphManager, new t(ht.topLeftX, ht.topLeftY), new s(ht.width, ht.height))) : $ = x.add(new v(z.graphManager, new t(ht.topLeftX, ht.topLeftY), new s(parseFloat(tt.w), parseFloat(tt.h))));
3352
+ }
3353
+ else
3354
+ $ = x.add(new v(z.graphManager, new t(O.position("x") - tt.w / 2, O.position("y") - tt.h / 2), new s(parseFloat(tt.w), parseFloat(tt.h))));
3355
+ else
3356
+ $ = x.add(new v(this.graphManager));
3357
+ if ($.id = O.data("id"), $.nodeRepulsion = m(Y.nodeRepulsion, O), $.paddingLeft = parseInt(O.css("padding")), $.paddingTop = parseInt(O.css("padding")), $.paddingRight = parseInt(O.css("padding")), $.paddingBottom = parseInt(O.css("padding")), Y.nodeDimensionsIncludeLabels && ($.labelWidth = O.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).w, $.labelHeight = O.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).h, $.labelPosVertical = O.css("text-valign"), $.labelPosHorizontal = O.css("text-halign")), _[O.data("id")] = $, isNaN($.rect.x) && ($.rect.x = 0), isNaN($.rect.y) && ($.rect.y = 0), H != null && H.length > 0) {
3358
+ var J = void 0;
3359
+ J = z.getGraphManager().add(z.newGraph(), $), W(J, H, z, Y);
3360
+ }
3361
+ }
3362
+ }, y = function(x, Q, z) {
3363
+ for (var Y = 0, rt = 0, B = 0; B < z.length; B++) {
3364
+ var O = z[B], H = _[O.data("source")], $ = _[O.data("target")];
3365
+ if (H && $ && H !== $ && H.getEdgesBetween($).length == 0) {
3366
+ var tt = Q.add(x.newEdge(), H, $);
3367
+ tt.id = O.id(), tt.idealLength = m(d.idealEdgeLength, O), tt.edgeElasticity = m(d.edgeElasticity, O), Y += tt.idealLength, rt++;
3368
+ }
3369
+ }
3370
+ d.idealEdgeLength != null && (rt > 0 ? l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = Y / rt : n(d.idealEdgeLength) ? l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = 50 : l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = d.idealEdgeLength, l.MIN_REPULSION_DIST = c.MIN_REPULSION_DIST = c.DEFAULT_EDGE_LENGTH / 10, l.DEFAULT_RADIAL_SEPARATION = c.DEFAULT_EDGE_LENGTH);
3371
+ }, I = function(x, Q) {
3372
+ Q.fixedNodeConstraint && (x.constraints.fixedNodeConstraint = Q.fixedNodeConstraint), Q.alignmentConstraint && (x.constraints.alignmentConstraint = Q.alignmentConstraint), Q.relativePlacementConstraint && (x.constraints.relativePlacementConstraint = Q.relativePlacementConstraint);
3373
+ };
3374
+ d.nestingFactor != null && (l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = d.nestingFactor), d.gravity != null && (l.DEFAULT_GRAVITY_STRENGTH = c.DEFAULT_GRAVITY_STRENGTH = d.gravity), d.numIter != null && (l.MAX_ITERATIONS = c.MAX_ITERATIONS = d.numIter), d.gravityRange != null && (l.DEFAULT_GRAVITY_RANGE_FACTOR = c.DEFAULT_GRAVITY_RANGE_FACTOR = d.gravityRange), d.gravityCompound != null && (l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = c.DEFAULT_COMPOUND_GRAVITY_STRENGTH = d.gravityCompound), d.gravityRangeCompound != null && (l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = d.gravityRangeCompound), d.initialEnergyOnIncremental != null && (l.DEFAULT_COOLING_FACTOR_INCREMENTAL = c.DEFAULT_COOLING_FACTOR_INCREMENTAL = d.initialEnergyOnIncremental), d.tilingCompareBy != null && (l.TILING_COMPARE_BY = d.tilingCompareBy), d.quality == "proof" ? o.QUALITY = 2 : o.QUALITY = 0, l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = o.NODE_DIMENSIONS_INCLUDE_LABELS = d.nodeDimensionsIncludeLabels, l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !d.randomize, l.ANIMATE = c.ANIMATE = o.ANIMATE = d.animate, l.TILE = d.tile, l.TILING_PADDING_VERTICAL = typeof d.tilingPaddingVertical == "function" ? d.tilingPaddingVertical.call() : d.tilingPaddingVertical, l.TILING_PADDING_HORIZONTAL = typeof d.tilingPaddingHorizontal == "function" ? d.tilingPaddingHorizontal.call() : d.tilingPaddingHorizontal, l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !0, l.PURE_INCREMENTAL = !d.randomize, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = d.uniformNodeDimensions, d.step == "transformed" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, l.ENFORCE_CONSTRAINTS = !1, l.APPLY_LAYOUT = !1), d.step == "enforced" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !0, l.APPLY_LAYOUT = !1), d.step == "cose" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !1, l.APPLY_LAYOUT = !0), d.step == "all" && (d.randomize ? l.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !0, l.APPLY_LAYOUT = !0), d.fixedNodeConstraint || d.alignmentConstraint || d.relativePlacementConstraint ? l.TREE_REDUCTION_ON_INCREMENTAL = !1 : l.TREE_REDUCTION_ON_INCREMENTAL = !0;
3375
+ var M = new r(), R = M.newGraphManager();
3376
+ return E(R.addRoot(), f.getTopMostNodes(S), M, d), y(M, R, V), I(M, d), M.runLayout(), _;
3377
+ };
3378
+ a.exports = { coseLayout: T };
3379
+ })
3380
+ ),
3381
+ /***/
3382
+ 212: (
3383
+ /***/
3384
+ ((a, e, i) => {
3385
+ var f = /* @__PURE__ */ (function() {
3386
+ function d(N, b) {
3387
+ for (var A = 0; A < b.length; A++) {
3388
+ var S = b[A];
3389
+ S.enumerable = S.enumerable || !1, S.configurable = !0, "value" in S && (S.writable = !0), Object.defineProperty(N, S.key, S);
3390
+ }
3391
+ }
3392
+ return function(N, b, A) {
3393
+ return b && d(N.prototype, b), A && d(N, A), N;
3394
+ };
3395
+ })();
3396
+ function r(d, N) {
3397
+ if (!(d instanceof N))
3398
+ throw new TypeError("Cannot call a class as a function");
3399
+ }
3400
+ var v = i(658), t = i(548), s = i(657), o = s.spectralLayout, c = i(816), l = c.coseLayout, T = Object.freeze({
3401
+ // 'draft', 'default' or 'proof'
3402
+ // - 'draft' only applies spectral layout
3403
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
3404
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
3405
+ quality: "default",
3406
+ // Use random node positions at beginning of layout
3407
+ // if this is set to false, then quality option must be "proof"
3408
+ randomize: !0,
3409
+ // Whether or not to animate the layout
3410
+ animate: !0,
3411
+ // Duration of animation in ms, if enabled
3412
+ animationDuration: 1e3,
3413
+ // Easing of animation, if enabled
3414
+ animationEasing: void 0,
3415
+ // Fit the viewport to the repositioned nodes
3416
+ fit: !0,
3417
+ // Padding around layout
3418
+ padding: 30,
3419
+ // Whether to include labels in node dimensions. Valid in "proof" quality
3420
+ nodeDimensionsIncludeLabels: !1,
3421
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
3422
+ uniformNodeDimensions: !1,
3423
+ // Whether to pack disconnected components - valid only if randomize: true
3424
+ packComponents: !0,
3425
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
3426
+ step: "all",
3427
+ /* spectral layout options */
3428
+ // False for random, true for greedy
3429
+ samplingType: !0,
3430
+ // Sample size to construct distance matrix
3431
+ sampleSize: 25,
3432
+ // Separation amount between nodes
3433
+ nodeSeparation: 75,
3434
+ // Power iteration tolerance
3435
+ piTol: 1e-7,
3436
+ /* CoSE layout options */
3437
+ // Node repulsion (non overlapping) multiplier
3438
+ nodeRepulsion: function(N) {
3439
+ return 4500;
3440
+ },
3441
+ // Ideal edge (non nested) length
3442
+ idealEdgeLength: function(N) {
3443
+ return 50;
3444
+ },
3445
+ // Divisor to compute edge forces
3446
+ edgeElasticity: function(N) {
3447
+ return 0.45;
3448
+ },
3449
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
3450
+ nestingFactor: 0.1,
3451
+ // Gravity force (constant)
3452
+ gravity: 0.25,
3453
+ // Maximum number of iterations to perform
3454
+ numIter: 2500,
3455
+ // For enabling tiling
3456
+ tile: !0,
3457
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
3458
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
3459
+ tilingCompareBy: void 0,
3460
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
3461
+ tilingPaddingVertical: 10,
3462
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
3463
+ tilingPaddingHorizontal: 10,
3464
+ // Gravity range (constant) for compounds
3465
+ gravityRangeCompound: 1.5,
3466
+ // Gravity force (constant) for compounds
3467
+ gravityCompound: 1,
3468
+ // Gravity range (constant)
3469
+ gravityRange: 3.8,
3470
+ // Initial cooling factor for incremental layout
3471
+ initialEnergyOnIncremental: 0.3,
3472
+ /* constraint options */
3473
+ // Fix required nodes to predefined positions
3474
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
3475
+ fixedNodeConstraint: void 0,
3476
+ // Align required nodes in vertical/horizontal direction
3477
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
3478
+ alignmentConstraint: void 0,
3479
+ // Place two nodes relatively in vertical/horizontal direction
3480
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
3481
+ relativePlacementConstraint: void 0,
3482
+ /* layout event callbacks */
3483
+ ready: function() {
3484
+ },
3485
+ // on layoutready
3486
+ stop: function() {
3487
+ }
3488
+ // on layoutstop
3489
+ }), g = (function() {
3490
+ function d(N) {
3491
+ r(this, d), this.options = v({}, T, N);
3492
+ }
3493
+ return f(d, [{
3494
+ key: "run",
3495
+ value: function() {
3496
+ var b = this, A = this.options, S = A.cy, V = A.eles, X = [], Z = [], D = void 0, _ = [];
3497
+ A.fixedNodeConstraint && (!Array.isArray(A.fixedNodeConstraint) || A.fixedNodeConstraint.length == 0) && (A.fixedNodeConstraint = void 0), A.alignmentConstraint && (A.alignmentConstraint.vertical && (!Array.isArray(A.alignmentConstraint.vertical) || A.alignmentConstraint.vertical.length == 0) && (A.alignmentConstraint.vertical = void 0), A.alignmentConstraint.horizontal && (!Array.isArray(A.alignmentConstraint.horizontal) || A.alignmentConstraint.horizontal.length == 0) && (A.alignmentConstraint.horizontal = void 0)), A.relativePlacementConstraint && (!Array.isArray(A.relativePlacementConstraint) || A.relativePlacementConstraint.length == 0) && (A.relativePlacementConstraint = void 0);
3498
+ var n = A.fixedNodeConstraint || A.alignmentConstraint || A.relativePlacementConstraint;
3499
+ n && (A.tile = !1, A.packComponents = !1);
3500
+ var m = void 0, p = !1;
3501
+ if (S.layoutUtilities && A.packComponents && (m = S.layoutUtilities("get"), m || (m = S.layoutUtilities()), p = !0), V.nodes().length > 0)
3502
+ if (p) {
3503
+ var I = t.getTopMostNodes(A.eles.nodes());
3504
+ if (D = t.connectComponents(S, A.eles, I), D.forEach(function(vt) {
3505
+ var it = vt.boundingBox();
3506
+ _.push({ x: it.x1 + it.w / 2, y: it.y1 + it.h / 2 });
3507
+ }), A.randomize && D.forEach(function(vt) {
3508
+ A.eles = vt, X.push(o(A));
3509
+ }), A.quality == "default" || A.quality == "proof") {
3510
+ var M = S.collection();
3511
+ if (A.tile) {
3512
+ var R = /* @__PURE__ */ new Map(), W = [], x = [], Q = 0, z = { nodeIndexes: R, xCoords: W, yCoords: x }, Y = [];
3513
+ if (D.forEach(function(vt, it) {
3514
+ vt.edges().length == 0 && (vt.nodes().forEach(function(gt, mt) {
3515
+ M.merge(vt.nodes()[mt]), gt.isParent() || (z.nodeIndexes.set(vt.nodes()[mt].id(), Q++), z.xCoords.push(vt.nodes()[0].position().x), z.yCoords.push(vt.nodes()[0].position().y));
3516
+ }), Y.push(it));
3517
+ }), M.length > 1) {
3518
+ var rt = M.boundingBox();
3519
+ _.push({ x: rt.x1 + rt.w / 2, y: rt.y1 + rt.h / 2 }), D.push(M), X.push(z);
3520
+ for (var B = Y.length - 1; B >= 0; B--)
3521
+ D.splice(Y[B], 1), X.splice(Y[B], 1), _.splice(Y[B], 1);
3522
+ }
3523
+ }
3524
+ D.forEach(function(vt, it) {
3525
+ A.eles = vt, Z.push(l(A, X[it])), t.relocateComponent(_[it], Z[it], A);
3526
+ });
3527
+ } else
3528
+ D.forEach(function(vt, it) {
3529
+ t.relocateComponent(_[it], X[it], A);
3530
+ });
3531
+ var O = /* @__PURE__ */ new Set();
3532
+ if (D.length > 1) {
3533
+ var H = [], $ = V.filter(function(vt) {
3534
+ return vt.css("display") == "none";
3535
+ });
3536
+ D.forEach(function(vt, it) {
3537
+ var gt = void 0;
3538
+ if (A.quality == "draft" && (gt = X[it].nodeIndexes), vt.nodes().not($).length > 0) {
3539
+ var mt = {};
3540
+ mt.edges = [], mt.nodes = [];
3541
+ var At = void 0;
3542
+ vt.nodes().not($).forEach(function(Ot) {
3543
+ if (A.quality == "draft")
3544
+ if (!Ot.isParent())
3545
+ At = gt.get(Ot.id()), mt.nodes.push({ x: X[it].xCoords[At] - Ot.boundingbox().w / 2, y: X[it].yCoords[At] - Ot.boundingbox().h / 2, width: Ot.boundingbox().w, height: Ot.boundingbox().h });
3546
+ else {
3547
+ var Et = t.calcBoundingBox(Ot, X[it].xCoords, X[it].yCoords, gt);
3548
+ mt.nodes.push({ x: Et.topLeftX, y: Et.topLeftY, width: Et.width, height: Et.height });
3549
+ }
3550
+ else
3551
+ Z[it][Ot.id()] && mt.nodes.push({ x: Z[it][Ot.id()].getLeft(), y: Z[it][Ot.id()].getTop(), width: Z[it][Ot.id()].getWidth(), height: Z[it][Ot.id()].getHeight() });
3552
+ }), vt.edges().forEach(function(Ot) {
3553
+ var Et = Ot.source(), Dt = Ot.target();
3554
+ if (Et.css("display") != "none" && Dt.css("display") != "none")
3555
+ if (A.quality == "draft") {
3556
+ var Rt = gt.get(Et.id()), Ht = gt.get(Dt.id()), Ut = [], Pt = [];
3557
+ if (Et.isParent()) {
3558
+ var Ft = t.calcBoundingBox(Et, X[it].xCoords, X[it].yCoords, gt);
3559
+ Ut.push(Ft.topLeftX + Ft.width / 2), Ut.push(Ft.topLeftY + Ft.height / 2);
3560
+ } else
3561
+ Ut.push(X[it].xCoords[Rt]), Ut.push(X[it].yCoords[Rt]);
3562
+ if (Dt.isParent()) {
3563
+ var Yt = t.calcBoundingBox(Dt, X[it].xCoords, X[it].yCoords, gt);
3564
+ Pt.push(Yt.topLeftX + Yt.width / 2), Pt.push(Yt.topLeftY + Yt.height / 2);
3565
+ } else
3566
+ Pt.push(X[it].xCoords[Ht]), Pt.push(X[it].yCoords[Ht]);
3567
+ mt.edges.push({ startX: Ut[0], startY: Ut[1], endX: Pt[0], endY: Pt[1] });
3568
+ } else
3569
+ Z[it][Et.id()] && Z[it][Dt.id()] && mt.edges.push({ startX: Z[it][Et.id()].getCenterX(), startY: Z[it][Et.id()].getCenterY(), endX: Z[it][Dt.id()].getCenterX(), endY: Z[it][Dt.id()].getCenterY() });
3570
+ }), mt.nodes.length > 0 && (H.push(mt), O.add(it));
3571
+ }
3572
+ });
3573
+ var tt = m.packComponents(H, A.randomize).shifts;
3574
+ if (A.quality == "draft")
3575
+ X.forEach(function(vt, it) {
3576
+ var gt = vt.xCoords.map(function(At) {
3577
+ return At + tt[it].dx;
3578
+ }), mt = vt.yCoords.map(function(At) {
3579
+ return At + tt[it].dy;
3580
+ });
3581
+ vt.xCoords = gt, vt.yCoords = mt;
3582
+ });
3583
+ else {
3584
+ var ht = 0;
3585
+ O.forEach(function(vt) {
3586
+ Object.keys(Z[vt]).forEach(function(it) {
3587
+ var gt = Z[vt][it];
3588
+ gt.setCenter(gt.getCenterX() + tt[ht].dx, gt.getCenterY() + tt[ht].dy);
3589
+ }), ht++;
3590
+ });
3591
+ }
3592
+ }
3593
+ } else {
3594
+ var E = A.eles.boundingBox();
3595
+ if (_.push({ x: E.x1 + E.w / 2, y: E.y1 + E.h / 2 }), A.randomize) {
3596
+ var y = o(A);
3597
+ X.push(y);
3598
+ }
3599
+ A.quality == "default" || A.quality == "proof" ? (Z.push(l(A, X[0])), t.relocateComponent(_[0], Z[0], A)) : t.relocateComponent(_[0], X[0], A);
3600
+ }
3601
+ var J = function(it, gt) {
3602
+ if (A.quality == "default" || A.quality == "proof") {
3603
+ typeof it == "number" && (it = gt);
3604
+ var mt = void 0, At = void 0, Ot = it.data("id");
3605
+ return Z.forEach(function(Dt) {
3606
+ Ot in Dt && (mt = { x: Dt[Ot].getRect().getCenterX(), y: Dt[Ot].getRect().getCenterY() }, At = Dt[Ot]);
3607
+ }), A.nodeDimensionsIncludeLabels && (At.labelWidth && (At.labelPosHorizontal == "left" ? mt.x += At.labelWidth / 2 : At.labelPosHorizontal == "right" && (mt.x -= At.labelWidth / 2)), At.labelHeight && (At.labelPosVertical == "top" ? mt.y += At.labelHeight / 2 : At.labelPosVertical == "bottom" && (mt.y -= At.labelHeight / 2))), mt == null && (mt = { x: it.position("x"), y: it.position("y") }), {
3608
+ x: mt.x,
3609
+ y: mt.y
3610
+ };
3611
+ } else {
3612
+ var Et = void 0;
3613
+ return X.forEach(function(Dt) {
3614
+ var Rt = Dt.nodeIndexes.get(it.id());
3615
+ Rt != null && (Et = { x: Dt.xCoords[Rt], y: Dt.yCoords[Rt] });
3616
+ }), Et == null && (Et = { x: it.position("x"), y: it.position("y") }), {
3617
+ x: Et.x,
3618
+ y: Et.y
3619
+ };
3620
+ }
3621
+ };
3622
+ if (A.quality == "default" || A.quality == "proof" || A.randomize) {
3623
+ var It = t.calcParentsWithoutChildren(S, V), Nt = V.filter(function(vt) {
3624
+ return vt.css("display") == "none";
3625
+ });
3626
+ A.eles = V.not(Nt), V.nodes().not(":parent").not(Nt).layoutPositions(b, A, J), It.length > 0 && It.forEach(function(vt) {
3627
+ vt.position(J(vt));
3628
+ });
3629
+ } else
3630
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3631
+ }
3632
+ }]), d;
3633
+ })();
3634
+ a.exports = g;
3635
+ })
3636
+ ),
3637
+ /***/
3638
+ 657: (
3639
+ /***/
3640
+ ((a, e, i) => {
3641
+ var f = i(548), r = i(140).layoutBase.Matrix, v = i(140).layoutBase.SVD, t = function(o) {
3642
+ var c = o.cy, l = o.eles, T = l.nodes(), g = l.nodes(":parent"), d = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), A = [], S = [], V = [], X = [], Z = [], D = [], _ = [], n = [], m = void 0, p = 1e8, E = 1e-9, y = o.piTol, I = o.samplingType, M = o.nodeSeparation, R = void 0, W = function() {
3643
+ for (var P = 0, k = 0, K = !1; k < R; ) {
3644
+ P = Math.floor(Math.random() * m), K = !1;
3645
+ for (var q = 0; q < k; q++)
3646
+ if (X[q] == P) {
3647
+ K = !0;
3648
+ break;
3649
+ }
3650
+ if (!K)
3651
+ X[k] = P, k++;
3652
+ else
3653
+ continue;
3654
+ }
3655
+ }, x = function(P, k, K) {
3656
+ for (var q = [], at = 0, ct = 0, nt = 0, et = void 0, j = [], ut = 0, wt = 1, pt = 0; pt < m; pt++)
3657
+ j[pt] = p;
3658
+ for (q[ct] = P, j[P] = 0; ct >= at; ) {
3659
+ nt = q[at++];
3660
+ for (var xt = A[nt], lt = 0; lt < xt.length; lt++)
3661
+ et = N.get(xt[lt]), j[et] == p && (j[et] = j[nt] + 1, q[++ct] = et);
3662
+ D[nt][k] = j[nt] * M;
3663
+ }
3664
+ if (K) {
3665
+ for (var ot = 0; ot < m; ot++)
3666
+ D[ot][k] < Z[ot] && (Z[ot] = D[ot][k]);
3667
+ for (var Lt = 0; Lt < m; Lt++)
3668
+ Z[Lt] > ut && (ut = Z[Lt], wt = Lt);
3669
+ }
3670
+ return wt;
3671
+ }, Q = function(P) {
3672
+ var k = void 0;
3673
+ if (P) {
3674
+ k = Math.floor(Math.random() * m);
3675
+ for (var q = 0; q < m; q++)
3676
+ Z[q] = p;
3677
+ for (var at = 0; at < R; at++)
3678
+ X[at] = k, k = x(k, at, P);
3679
+ } else {
3680
+ W();
3681
+ for (var K = 0; K < R; K++)
3682
+ x(X[K], K, P);
3683
+ }
3684
+ for (var ct = 0; ct < m; ct++)
3685
+ for (var nt = 0; nt < R; nt++)
3686
+ D[ct][nt] *= D[ct][nt];
3687
+ for (var et = 0; et < R; et++)
3688
+ _[et] = [];
3689
+ for (var j = 0; j < R; j++)
3690
+ for (var ut = 0; ut < R; ut++)
3691
+ _[j][ut] = D[X[ut]][j];
3692
+ }, z = function() {
3693
+ for (var P = v.svd(_), k = P.S, K = P.U, q = P.V, at = k[0] * k[0] * k[0], ct = [], nt = 0; nt < R; nt++) {
3694
+ ct[nt] = [];
3695
+ for (var et = 0; et < R; et++)
3696
+ ct[nt][et] = 0, nt == et && (ct[nt][et] = k[nt] / (k[nt] * k[nt] + at / (k[nt] * k[nt])));
3697
+ }
3698
+ n = r.multMat(r.multMat(q, ct), r.transpose(K));
3699
+ }, Y = function() {
3700
+ for (var P = void 0, k = void 0, K = [], q = [], at = [], ct = [], nt = 0; nt < m; nt++)
3701
+ K[nt] = Math.random(), q[nt] = Math.random();
3702
+ K = r.normalize(K), q = r.normalize(q);
3703
+ for (var et = E, j = E, ut = void 0; ; ) {
3704
+ for (var wt = 0; wt < m; wt++)
3705
+ at[wt] = K[wt];
3706
+ if (K = r.multGamma(r.multL(r.multGamma(at), D, n)), P = r.dotProduct(at, K), K = r.normalize(K), et = r.dotProduct(at, K), ut = Math.abs(et / j), ut <= 1 + y && ut >= 1)
3707
+ break;
3708
+ j = et;
3709
+ }
3710
+ for (var pt = 0; pt < m; pt++)
3711
+ at[pt] = K[pt];
3712
+ for (j = E; ; ) {
3713
+ for (var xt = 0; xt < m; xt++)
3714
+ ct[xt] = q[xt];
3715
+ if (ct = r.minusOp(ct, r.multCons(at, r.dotProduct(at, ct))), q = r.multGamma(r.multL(r.multGamma(ct), D, n)), k = r.dotProduct(ct, q), q = r.normalize(q), et = r.dotProduct(ct, q), ut = Math.abs(et / j), ut <= 1 + y && ut >= 1)
3716
+ break;
3717
+ j = et;
3718
+ }
3719
+ for (var lt = 0; lt < m; lt++)
3720
+ ct[lt] = q[lt];
3721
+ S = r.multCons(at, Math.sqrt(Math.abs(P))), V = r.multCons(ct, Math.sqrt(Math.abs(k)));
3722
+ };
3723
+ f.connectComponents(c, l, f.getTopMostNodes(T), d), g.forEach(function(F) {
3724
+ f.connectComponents(c, l, f.getTopMostNodes(F.descendants().intersection(l)), d);
3725
+ });
3726
+ for (var rt = 0, B = 0; B < T.length; B++)
3727
+ T[B].isParent() || N.set(T[B].id(), rt++);
3728
+ var O = !0, H = !1, $ = void 0;
3729
+ try {
3730
+ for (var tt = d.keys()[Symbol.iterator](), ht; !(O = (ht = tt.next()).done); O = !0) {
3731
+ var J = ht.value;
3732
+ N.set(J, rt++);
3733
+ }
3734
+ } catch (F) {
3735
+ H = !0, $ = F;
3736
+ } finally {
3737
+ try {
3738
+ !O && tt.return && tt.return();
3739
+ } finally {
3740
+ if (H)
3741
+ throw $;
3742
+ }
3743
+ }
3744
+ for (var It = 0; It < N.size; It++)
3745
+ A[It] = [];
3746
+ g.forEach(function(F) {
3747
+ for (var P = F.children().intersection(l); P.nodes(":childless").length == 0; )
3748
+ P = P.nodes()[0].children().intersection(l);
3749
+ var k = 0, K = P.nodes(":childless")[0].connectedEdges().length;
3750
+ P.nodes(":childless").forEach(function(q, at) {
3751
+ q.connectedEdges().length < K && (K = q.connectedEdges().length, k = at);
3752
+ }), b.set(F.id(), P.nodes(":childless")[k].id());
3753
+ }), T.forEach(function(F) {
3754
+ var P = void 0;
3755
+ F.isParent() ? P = N.get(b.get(F.id())) : P = N.get(F.id()), F.neighborhood().nodes().forEach(function(k) {
3756
+ l.intersection(F.edgesWith(k)).length > 0 && (k.isParent() ? A[P].push(b.get(k.id())) : A[P].push(k.id()));
3757
+ });
3758
+ });
3759
+ var Nt = function(P) {
3760
+ var k = N.get(P), K = void 0;
3761
+ d.get(P).forEach(function(q) {
3762
+ c.getElementById(q).isParent() ? K = b.get(q) : K = q, A[k].push(K), A[N.get(K)].push(P);
3763
+ });
3764
+ }, vt = !0, it = !1, gt = void 0;
3765
+ try {
3766
+ for (var mt = d.keys()[Symbol.iterator](), At; !(vt = (At = mt.next()).done); vt = !0) {
3767
+ var Ot = At.value;
3768
+ Nt(Ot);
3769
+ }
3770
+ } catch (F) {
3771
+ it = !0, gt = F;
3772
+ } finally {
3773
+ try {
3774
+ !vt && mt.return && mt.return();
3775
+ } finally {
3776
+ if (it)
3777
+ throw gt;
3778
+ }
3779
+ }
3780
+ m = N.size;
3781
+ var Et = void 0;
3782
+ if (m > 2) {
3783
+ R = m < o.sampleSize ? m : o.sampleSize;
3784
+ for (var Dt = 0; Dt < m; Dt++)
3785
+ D[Dt] = [];
3786
+ for (var Rt = 0; Rt < R; Rt++)
3787
+ n[Rt] = [];
3788
+ return o.quality == "draft" || o.step == "all" ? (Q(I), z(), Y(), Et = { nodeIndexes: N, xCoords: S, yCoords: V }) : (N.forEach(function(F, P) {
3789
+ S.push(c.getElementById(P).position("x")), V.push(c.getElementById(P).position("y"));
3790
+ }), Et = { nodeIndexes: N, xCoords: S, yCoords: V }), Et;
3791
+ } else {
3792
+ var Ht = N.keys(), Ut = c.getElementById(Ht.next().value), Pt = Ut.position(), Ft = Ut.outerWidth();
3793
+ if (S.push(Pt.x), V.push(Pt.y), m == 2) {
3794
+ var Yt = c.getElementById(Ht.next().value), Vt = Yt.outerWidth();
3795
+ S.push(Pt.x + Ft / 2 + Vt / 2 + o.idealEdgeLength), V.push(Pt.y);
3796
+ }
3797
+ return Et = { nodeIndexes: N, xCoords: S, yCoords: V }, Et;
3798
+ }
3799
+ };
3800
+ a.exports = { spectralLayout: t };
3801
+ })
3802
+ ),
3803
+ /***/
3804
+ 579: (
3805
+ /***/
3806
+ ((a, e, i) => {
3807
+ var f = i(212), r = function(t) {
3808
+ t && t("layout", "fcose", f);
3809
+ };
3810
+ typeof cytoscape < "u" && r(cytoscape), a.exports = r;
3811
+ })
3812
+ ),
3813
+ /***/
3814
+ 140: (
3815
+ /***/
3816
+ ((a) => {
3817
+ a.exports = w;
3818
+ })
3819
+ )
3820
+ /******/
3821
+ }, L = {};
3822
+ function u(a) {
3823
+ var e = L[a];
3824
+ if (e !== void 0)
3825
+ return e.exports;
3826
+ var i = L[a] = {
3827
+ /******/
3828
+ // no module.id needed
3829
+ /******/
3830
+ // no module.loaded needed
3831
+ /******/
3832
+ exports: {}
3833
+ /******/
3834
+ };
3835
+ return U[a](i, i.exports, u), i.exports;
3836
+ }
3837
+ var h = u(579);
3838
+ return h;
3839
+ })()
3840
+ );
3841
+ });
3842
+ })(se)), se.exports;
3843
+ }
3844
+ var yr = pr();
3845
+ const Er = /* @__PURE__ */ $e(yr);
3846
+ var De = {
3847
+ L: "left",
3848
+ R: "right",
3849
+ T: "top",
3850
+ B: "bottom"
3851
+ }, xe = {
3852
+ L: /* @__PURE__ */ dt((C) => `${C},${C / 2} 0,${C} 0,0`, "L"),
3853
+ R: /* @__PURE__ */ dt((C) => `0,${C / 2} ${C},0 ${C},${C}`, "R"),
3854
+ T: /* @__PURE__ */ dt((C) => `0,0 ${C},0 ${C / 2},${C}`, "T"),
3855
+ B: /* @__PURE__ */ dt((C) => `${C / 2},0 ${C},${C} 0,${C}`, "B")
3856
+ }, oe = {
3857
+ L: /* @__PURE__ */ dt((C, G) => C - G + 2, "L"),
3858
+ R: /* @__PURE__ */ dt((C, G) => C - 2, "R"),
3859
+ T: /* @__PURE__ */ dt((C, G) => C - G + 2, "T"),
3860
+ B: /* @__PURE__ */ dt((C, G) => C - 2, "B")
3861
+ }, mr = /* @__PURE__ */ dt(function(C) {
3862
+ return Wt(C) ? C === "L" ? "R" : "L" : C === "T" ? "B" : "T";
3863
+ }, "getOppositeArchitectureDirection"), Ie = /* @__PURE__ */ dt(function(C) {
3864
+ const G = C;
3865
+ return G === "L" || G === "R" || G === "T" || G === "B";
3866
+ }, "isArchitectureDirection"), Wt = /* @__PURE__ */ dt(function(C) {
3867
+ const G = C;
3868
+ return G === "L" || G === "R";
3869
+ }, "isArchitectureDirectionX"), qt = /* @__PURE__ */ dt(function(C) {
3870
+ const G = C;
3871
+ return G === "T" || G === "B";
3872
+ }, "isArchitectureDirectionY"), me = /* @__PURE__ */ dt(function(C, G) {
3873
+ const w = Wt(C) && qt(G), U = qt(C) && Wt(G);
3874
+ return w || U;
3875
+ }, "isArchitectureDirectionXY"), Tr = /* @__PURE__ */ dt(function(C) {
3876
+ const G = C[0], w = C[1], U = Wt(G) && qt(w), L = qt(G) && Wt(w);
3877
+ return U || L;
3878
+ }, "isArchitecturePairXY"), Nr = /* @__PURE__ */ dt(function(C) {
3879
+ return C !== "LL" && C !== "RR" && C !== "TT" && C !== "BB";
3880
+ }, "isValidArchitectureDirectionPair"), pe = /* @__PURE__ */ dt(function(C, G) {
3881
+ const w = `${C}${G}`;
3882
+ return Nr(w) ? w : void 0;
3883
+ }, "getArchitectureDirectionPair"), Lr = /* @__PURE__ */ dt(function([C, G], w) {
3884
+ const U = w[0], L = w[1];
3885
+ return Wt(U) ? qt(L) ? [C + (U === "L" ? -1 : 1), G + (L === "T" ? 1 : -1)] : [C + (U === "L" ? -1 : 1), G] : Wt(L) ? [C + (L === "L" ? 1 : -1), G + (U === "T" ? 1 : -1)] : [C, G + (U === "T" ? 1 : -1)];
3886
+ }, "shiftPositionByArchitectureDirectionPair"), Cr = /* @__PURE__ */ dt(function(C) {
3887
+ return C === "LT" || C === "TL" ? [1, 1] : C === "BL" || C === "LB" ? [1, -1] : C === "BR" || C === "RB" ? [-1, -1] : [-1, 1];
3888
+ }, "getArchitectureDirectionXYFactors"), Ar = /* @__PURE__ */ dt(function(C, G) {
3889
+ return me(C, G) ? "bend" : Wt(C) ? "horizontal" : "vertical";
3890
+ }, "getArchitectureDirectionAlignment"), wr = /* @__PURE__ */ dt(function(C) {
3891
+ return C.type === "service";
3892
+ }, "isArchitectureService"), Mr = /* @__PURE__ */ dt(function(C) {
3893
+ return C.type === "junction";
3894
+ }, "isArchitectureJunction"), Fe = /* @__PURE__ */ dt((C) => C.data(), "edgeData"), ie = /* @__PURE__ */ dt((C) => C.data(), "nodeData"), Or = ir.architecture, be = class {
3895
+ constructor() {
3896
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.diagramId = "", this.setAccTitle = qe, this.getAccTitle = Qe, this.setDiagramTitle = Je, this.getDiagramTitle = Ke, this.getAccDescription = je, this.setAccDescription = _e, this.clear();
3897
+ }
3898
+ static {
3899
+ dt(this, "ArchitectureDB");
3900
+ }
3901
+ setDiagramId(C) {
3902
+ this.diagramId = C;
3903
+ }
3904
+ getDiagramId() {
3905
+ return this.diagramId;
3906
+ }
3907
+ clear() {
3908
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", tr();
3909
+ }
3910
+ addService({
3911
+ id: C,
3912
+ icon: G,
3913
+ in: w,
3914
+ title: U,
3915
+ iconText: L
3916
+ }) {
3917
+ if (this.registeredIds[C] !== void 0)
3918
+ throw new Error(
3919
+ `The service id [${C}] is already in use by another ${this.registeredIds[C]}`
3920
+ );
3921
+ if (w !== void 0) {
3922
+ if (C === w)
3923
+ throw new Error(`The service [${C}] cannot be placed within itself`);
3924
+ if (this.registeredIds[w] === void 0)
3925
+ throw new Error(
3926
+ `The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`
3927
+ );
3928
+ if (this.registeredIds[w] === "node")
3929
+ throw new Error(`The service [${C}]'s parent is not a group`);
3930
+ }
3931
+ this.registeredIds[C] = "node", this.nodes[C] = {
3932
+ id: C,
3933
+ type: "service",
3934
+ icon: G,
3935
+ iconText: L,
3936
+ title: U,
3937
+ edges: [],
3938
+ in: w
3939
+ };
3940
+ }
3941
+ getServices() {
3942
+ return Object.values(this.nodes).filter(wr);
3943
+ }
3944
+ addJunction({ id: C, in: G }) {
3945
+ if (this.registeredIds[C] !== void 0)
3946
+ throw new Error(
3947
+ `The junction id [${C}] is already in use by another ${this.registeredIds[C]}`
3948
+ );
3949
+ if (G !== void 0) {
3950
+ if (C === G)
3951
+ throw new Error(`The junction [${C}] cannot be placed within itself`);
3952
+ if (this.registeredIds[G] === void 0)
3953
+ throw new Error(
3954
+ `The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`
3955
+ );
3956
+ if (this.registeredIds[G] === "node")
3957
+ throw new Error(`The junction [${C}]'s parent is not a group`);
3958
+ }
3959
+ this.registeredIds[C] = "node", this.nodes[C] = {
3960
+ id: C,
3961
+ type: "junction",
3962
+ edges: [],
3963
+ in: G
3964
+ };
3965
+ }
3966
+ getJunctions() {
3967
+ return Object.values(this.nodes).filter(Mr);
3968
+ }
3969
+ getNodes() {
3970
+ return Object.values(this.nodes);
3971
+ }
3972
+ getNode(C) {
3973
+ return this.nodes[C] ?? null;
3974
+ }
3975
+ addGroup({ id: C, icon: G, in: w, title: U }) {
3976
+ if (this.registeredIds?.[C] !== void 0)
3977
+ throw new Error(
3978
+ `The group id [${C}] is already in use by another ${this.registeredIds[C]}`
3979
+ );
3980
+ if (w !== void 0) {
3981
+ if (C === w)
3982
+ throw new Error(`The group [${C}] cannot be placed within itself`);
3983
+ if (this.registeredIds?.[w] === void 0)
3984
+ throw new Error(
3985
+ `The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`
3986
+ );
3987
+ if (this.registeredIds?.[w] === "node")
3988
+ throw new Error(`The group [${C}]'s parent is not a group`);
3989
+ }
3990
+ this.registeredIds[C] = "group", this.groups[C] = {
3991
+ id: C,
3992
+ icon: G,
3993
+ title: U,
3994
+ in: w
3995
+ };
3996
+ }
3997
+ getGroups() {
3998
+ return Object.values(this.groups);
3999
+ }
4000
+ addEdge({
4001
+ lhsId: C,
4002
+ rhsId: G,
4003
+ lhsDir: w,
4004
+ rhsDir: U,
4005
+ lhsInto: L,
4006
+ rhsInto: u,
4007
+ lhsGroup: h,
4008
+ rhsGroup: a,
4009
+ title: e
4010
+ }) {
4011
+ if (!Ie(w))
4012
+ throw new Error(
4013
+ `Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`
4014
+ );
4015
+ if (!Ie(U))
4016
+ throw new Error(
4017
+ `Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`
4018
+ );
4019
+ if (this.nodes[C] === void 0 && this.groups[C] === void 0)
4020
+ throw new Error(
4021
+ `The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`
4022
+ );
4023
+ if (this.nodes[G] === void 0 && this.groups[G] === void 0)
4024
+ throw new Error(
4025
+ `The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`
4026
+ );
4027
+ const i = this.nodes[C].in, f = this.nodes[G].in;
4028
+ if (h && i && f && i == f)
4029
+ throw new Error(
4030
+ `The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
4031
+ );
4032
+ if (a && i && f && i == f)
4033
+ throw new Error(
4034
+ `The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
4035
+ );
4036
+ const r = {
4037
+ lhsId: C,
4038
+ lhsDir: w,
4039
+ lhsInto: L,
4040
+ lhsGroup: h,
4041
+ rhsId: G,
4042
+ rhsDir: U,
4043
+ rhsInto: u,
4044
+ rhsGroup: a,
4045
+ title: e
4046
+ };
4047
+ this.edges.push(r), this.nodes[C] && this.nodes[G] && (this.nodes[C].edges.push(this.edges[this.edges.length - 1]), this.nodes[G].edges.push(this.edges[this.edges.length - 1]));
4048
+ }
4049
+ getEdges() {
4050
+ return this.edges;
4051
+ }
4052
+ /**
4053
+ * Returns the current diagram's adjacency list, spatial map, & group alignments.
4054
+ * If they have not been created, run the algorithms to generate them.
4055
+ * @returns
4056
+ */
4057
+ getDataStructures() {
4058
+ if (this.dataStructures === void 0) {
4059
+ const C = {}, G = Object.entries(this.nodes).reduce((a, [e, i]) => (a[e] = i.edges.reduce((f, r) => {
4060
+ const v = this.getNode(r.lhsId)?.in, t = this.getNode(r.rhsId)?.in;
4061
+ if (v && t && v !== t) {
4062
+ const s = Ar(r.lhsDir, r.rhsDir);
4063
+ s !== "bend" && (C[v] ??= {}, C[v][t] = s, C[t] ??= {}, C[t][v] = s);
4064
+ }
4065
+ if (r.lhsId === e) {
4066
+ const s = pe(r.lhsDir, r.rhsDir);
4067
+ s && (f[s] = r.rhsId);
4068
+ } else {
4069
+ const s = pe(r.rhsDir, r.lhsDir);
4070
+ s && (f[s] = r.lhsId);
4071
+ }
4072
+ return f;
4073
+ }, {}), a), {}), w = Object.keys(G)[0], U = { [w]: 1 }, L = Object.keys(G).reduce(
4074
+ (a, e) => e === w ? a : { ...a, [e]: 1 },
4075
+ {}
4076
+ ), u = /* @__PURE__ */ dt((a) => {
4077
+ const e = { [a]: [0, 0] }, i = [a];
4078
+ for (; i.length > 0; ) {
4079
+ const f = i.shift();
4080
+ if (f) {
4081
+ U[f] = 1, delete L[f];
4082
+ const r = G[f], [v, t] = e[f];
4083
+ Object.entries(r).forEach(([s, o]) => {
4084
+ U[o] || (e[o] = Lr(
4085
+ [v, t],
4086
+ s
4087
+ ), i.push(o));
4088
+ });
4089
+ }
4090
+ }
4091
+ return e;
4092
+ }, "BFS"), h = [u(w)];
4093
+ for (; Object.keys(L).length > 0; )
4094
+ h.push(u(Object.keys(L)[0]));
4095
+ this.dataStructures = {
4096
+ adjList: G,
4097
+ spatialMaps: h,
4098
+ groupAlignments: C
4099
+ };
4100
+ }
4101
+ return this.dataStructures;
4102
+ }
4103
+ setElementForId(C, G) {
4104
+ this.elements[C] = G;
4105
+ }
4106
+ getElementById(C) {
4107
+ return this.elements[C];
4108
+ }
4109
+ getConfig() {
4110
+ return er({
4111
+ ...Or,
4112
+ ...rr().architecture
4113
+ });
4114
+ }
4115
+ getConfigField(C) {
4116
+ return this.getConfig()[C];
4117
+ }
4118
+ }, Dr = /* @__PURE__ */ dt((C, G) => {
4119
+ lr(C, G), C.groups.map((w) => G.addGroup(w)), C.services.map((w) => G.addService({ ...w, type: "service" })), C.junctions.map((w) => G.addJunction({ ...w, type: "junction" })), C.edges.map((w) => G.addEdge(w));
4120
+ }, "populateDb"), Pe = {
4121
+ parser: {
4122
+ // @ts-expect-error - ArchitectureDB is not assignable to DiagramDB
4123
+ yy: void 0
4124
+ },
4125
+ parse: /* @__PURE__ */ dt(async (C) => {
4126
+ const G = await fr("architecture", C);
4127
+ Re.debug(G);
4128
+ const w = Pe.parser?.yy;
4129
+ if (!(w instanceof be))
4130
+ throw new Error(
4131
+ "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."
4132
+ );
4133
+ Dr(G, w);
4134
+ }, "parse")
4135
+ }, xr = /* @__PURE__ */ dt((C) => `
4136
+ .edge {
4137
+ stroke-width: ${C.archEdgeWidth};
4138
+ stroke: ${C.archEdgeColor};
4139
+ fill: none;
4140
+ }
4141
+
4142
+ .arrow {
4143
+ fill: ${C.archEdgeArrowColor};
4144
+ }
4145
+
4146
+ .node-bkg {
4147
+ fill: none;
4148
+ stroke: ${C.archGroupBorderColor};
4149
+ stroke-width: ${C.archGroupBorderWidth};
4150
+ stroke-dasharray: 8;
4151
+ }
4152
+ .node-icon-text {
4153
+ display: flex;
4154
+ align-items: center;
4155
+ }
4156
+
4157
+ .node-icon-text > div {
4158
+ color: #fff;
4159
+ margin: 1px;
4160
+ height: fit-content;
4161
+ text-align: center;
4162
+ overflow: hidden;
4163
+ display: -webkit-box;
4164
+ -webkit-box-orient: vertical;
4165
+ }
4166
+ `, "getStyles"), Ir = xr, re = /* @__PURE__ */ dt((C) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${C}</g>`, "wrapIcon"), ae = {
4167
+ prefix: "mermaid-architecture",
4168
+ height: 80,
4169
+ width: 80,
4170
+ icons: {
4171
+ database: {
4172
+ body: re(
4173
+ '<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;"/>'
4174
+ )
4175
+ },
4176
+ server: {
4177
+ body: re(
4178
+ '<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>'
4179
+ )
4180
+ },
4181
+ disk: {
4182
+ body: re(
4183
+ '<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;"/>'
4184
+ )
4185
+ },
4186
+ internet: {
4187
+ body: re(
4188
+ '<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;"/>'
4189
+ )
4190
+ },
4191
+ cloud: {
4192
+ body: re(
4193
+ '<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;"/>'
4194
+ )
4195
+ },
4196
+ unknown: hr,
4197
+ blank: {
4198
+ body: re("")
4199
+ }
4200
+ }
4201
+ }, Rr = /* @__PURE__ */ dt(async function(C, G, w, U) {
4202
+ const L = w.getConfigField("padding"), u = w.getConfigField("iconSize"), h = u / 2, a = u / 6, e = a / 2;
4203
+ await Promise.all(
4204
+ G.edges().map(async (i) => {
4205
+ const {
4206
+ source: f,
4207
+ sourceDir: r,
4208
+ sourceArrow: v,
4209
+ sourceGroup: t,
4210
+ target: s,
4211
+ targetDir: o,
4212
+ targetArrow: c,
4213
+ targetGroup: l,
4214
+ label: T
4215
+ } = Fe(i);
4216
+ let { x: g, y: d } = i[0].sourceEndpoint();
4217
+ const { x: N, y: b } = i[0].midpoint();
4218
+ let { x: A, y: S } = i[0].targetEndpoint();
4219
+ const V = L + 4;
4220
+ if (t && (Wt(r) ? g += r === "L" ? -V : V : d += r === "T" ? -V : V + 18), l && (Wt(o) ? A += o === "L" ? -V : V : S += o === "T" ? -V : V + 18), !t && w.getNode(f)?.type === "junction" && (Wt(r) ? g += r === "L" ? h : -h : d += r === "T" ? h : -h), !l && w.getNode(s)?.type === "junction" && (Wt(o) ? A += o === "L" ? h : -h : S += o === "T" ? h : -h), i[0]._private.rscratch) {
4221
+ const X = C.insert("g");
4222
+ if (X.insert("path").attr("d", `M ${g},${d} L ${N},${b} L${A},${S} `).attr("class", "edge").attr("id", `${U}-${or(f, s, { prefix: "L" })}`), v) {
4223
+ const Z = Wt(r) ? oe[r](g, a) : g - e, D = qt(r) ? oe[r](d, a) : d - e;
4224
+ X.insert("polygon").attr("points", xe[r](a)).attr("transform", `translate(${Z},${D})`).attr("class", "arrow");
4225
+ }
4226
+ if (c) {
4227
+ const Z = Wt(o) ? oe[o](A, a) : A - e, D = qt(o) ? oe[o](S, a) : S - e;
4228
+ X.insert("polygon").attr("points", xe[o](a)).attr("transform", `translate(${Z},${D})`).attr("class", "arrow");
4229
+ }
4230
+ if (T) {
4231
+ const Z = me(r, o) ? "XY" : Wt(r) ? "X" : "Y";
4232
+ let D = 0;
4233
+ Z === "X" ? D = Math.abs(g - A) : Z === "Y" ? D = Math.abs(d - S) / 1.5 : D = Math.abs(g - A) / 2;
4234
+ const _ = X.append("g");
4235
+ if (await Ee(
4236
+ _,
4237
+ T,
4238
+ {
4239
+ useHtmlLabels: !1,
4240
+ width: D,
4241
+ classes: "architecture-service-label"
4242
+ },
4243
+ ye()
4244
+ ), _.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), Z === "X")
4245
+ _.attr("transform", "translate(" + N + ", " + b + ")");
4246
+ else if (Z === "Y")
4247
+ _.attr("transform", "translate(" + N + ", " + b + ") rotate(-90)");
4248
+ else if (Z === "XY") {
4249
+ const n = pe(r, o);
4250
+ if (n && Tr(n)) {
4251
+ const m = _.node().getBoundingClientRect(), [p, E] = Cr(n);
4252
+ _.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * p * E * 45})`);
4253
+ const y = _.node().getBoundingClientRect();
4254
+ _.attr(
4255
+ "transform",
4256
+ `
4257
+ translate(${N}, ${b - m.height / 2})
4258
+ translate(${p * y.width / 2}, ${E * y.height / 2})
4259
+ rotate(${-1 * p * E * 45}, 0, ${m.height / 2})
4260
+ `
4261
+ );
4262
+ }
4263
+ }
4264
+ }
4265
+ }
4266
+ })
4267
+ );
4268
+ }, "drawEdges"), Sr = /* @__PURE__ */ dt(async function(C, G, w, U) {
4269
+ const u = w.getConfigField("padding") * 0.75, h = w.getConfigField("fontSize"), e = w.getConfigField("iconSize") / 2;
4270
+ await Promise.all(
4271
+ G.nodes().map(async (i) => {
4272
+ const f = ie(i);
4273
+ if (f.type === "group") {
4274
+ const { h: r, w: v, x1: t, y1: s } = i.boundingBox(), o = C.append("rect");
4275
+ o.attr("id", `${U}-group-${f.id}`).attr("x", t + e).attr("y", s + e).attr("width", v).attr("height", r).attr("class", "node-bkg");
4276
+ const c = C.append("g");
4277
+ let l = t, T = s;
4278
+ if (f.icon) {
4279
+ const g = c.append("g");
4280
+ g.html(
4281
+ `<g>${await ve(f.icon, { height: u, width: u, fallbackPrefix: ae.prefix })}</g>`
4282
+ ), g.attr(
4283
+ "transform",
4284
+ "translate(" + (l + e + 1) + ", " + (T + e + 1) + ")"
4285
+ ), l += u, T += h / 2 - 1 - 2;
4286
+ }
4287
+ if (f.label) {
4288
+ const g = c.append("g");
4289
+ await Ee(
4290
+ g,
4291
+ f.label,
4292
+ {
4293
+ useHtmlLabels: !1,
4294
+ width: v,
4295
+ classes: "architecture-service-label"
4296
+ },
4297
+ ye()
4298
+ ), g.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), g.attr(
4299
+ "transform",
4300
+ "translate(" + (l + e + 4) + ", " + (T + e + 2) + ")"
4301
+ );
4302
+ }
4303
+ w.setElementForId(f.id, o);
4304
+ }
4305
+ })
4306
+ );
4307
+ }, "drawGroups"), Fr = /* @__PURE__ */ dt(async function(C, G, w, U) {
4308
+ const L = ye();
4309
+ for (const u of w) {
4310
+ const h = G.append("g"), a = C.getConfigField("iconSize");
4311
+ if (u.title) {
4312
+ const r = h.append("g");
4313
+ await Ee(
4314
+ r,
4315
+ u.title,
4316
+ {
4317
+ useHtmlLabels: !1,
4318
+ width: a * 1.5,
4319
+ classes: "architecture-service-label"
4320
+ },
4321
+ L
4322
+ ), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), r.attr("transform", "translate(" + a / 2 + ", " + a + ")");
4323
+ }
4324
+ const e = h.append("g");
4325
+ if (u.icon)
4326
+ e.html(
4327
+ `<g>${await ve(u.icon, { height: a, width: a, fallbackPrefix: ae.prefix })}</g>`
4328
+ );
4329
+ else if (u.iconText) {
4330
+ e.html(
4331
+ `<g>${await ve("blank", { height: a, width: a, fallbackPrefix: ae.prefix })}</g>`
4332
+ );
4333
+ const t = e.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(ar(u.iconText, L)), s = parseInt(
4334
+ window.getComputedStyle(t.node(), null).getPropertyValue("font-size").replace(/\D/g, "")
4335
+ ) ?? 16;
4336
+ t.attr("style", `-webkit-line-clamp: ${Math.floor((a - 2) / s)};`);
4337
+ } else
4338
+ e.append("path").attr("class", "node-bkg").attr("id", `${U}-node-${u.id}`).attr(
4339
+ "d",
4340
+ `M0,${a} V5 Q0,0 5,0 H${a - 5} Q${a},0 ${a},5 V${a} Z`
4341
+ );
4342
+ h.attr("id", `${U}-service-${u.id}`).attr("class", "architecture-service");
4343
+ const { width: i, height: f } = h.node().getBBox();
4344
+ u.width = i, u.height = f, C.setElementForId(u.id, h);
4345
+ }
4346
+ return 0;
4347
+ }, "drawServices"), br = /* @__PURE__ */ dt(function(C, G, w, U) {
4348
+ w.forEach((L) => {
4349
+ const u = G.append("g"), h = C.getConfigField("iconSize");
4350
+ u.append("g").append("rect").attr("id", `${U}-node-${L.id}`).attr("fill-opacity", "0").attr("width", h).attr("height", h), u.attr("class", "architecture-junction");
4351
+ const { width: e, height: i } = u._groups[0][0].getBBox();
4352
+ u.width = e, u.height = i, C.setElementForId(L.id, u);
4353
+ });
4354
+ }, "drawJunctions");
4355
+ sr([
4356
+ {
4357
+ name: ae.prefix,
4358
+ icons: ae
4359
+ }
4360
+ ]);
4361
+ Se.use(Er);
4362
+ function Ge(C, G, w) {
4363
+ C.forEach((U) => {
4364
+ G.add({
4365
+ group: "nodes",
4366
+ data: {
4367
+ type: "service",
4368
+ id: U.id,
4369
+ icon: U.icon,
4370
+ label: U.title,
4371
+ parent: U.in,
4372
+ width: w.getConfigField("iconSize"),
4373
+ height: w.getConfigField("iconSize")
4374
+ },
4375
+ classes: "node-service"
4376
+ });
4377
+ });
4378
+ }
4379
+ dt(Ge, "addServices");
4380
+ function Ue(C, G, w) {
4381
+ C.forEach((U) => {
4382
+ G.add({
4383
+ group: "nodes",
4384
+ data: {
4385
+ type: "junction",
4386
+ id: U.id,
4387
+ parent: U.in,
4388
+ width: w.getConfigField("iconSize"),
4389
+ height: w.getConfigField("iconSize")
4390
+ },
4391
+ classes: "node-junction"
4392
+ });
4393
+ });
4394
+ }
4395
+ dt(Ue, "addJunctions");
4396
+ function Ye(C, G) {
4397
+ G.nodes().map((w) => {
4398
+ const U = ie(w);
4399
+ if (U.type === "group")
4400
+ return;
4401
+ U.x = w.position().x, U.y = w.position().y, C.getElementById(U.id).attr("transform", "translate(" + (U.x || 0) + "," + (U.y || 0) + ")");
4402
+ });
4403
+ }
4404
+ dt(Ye, "positionNodes");
4405
+ function Xe(C, G) {
4406
+ C.forEach((w) => {
4407
+ G.add({
4408
+ group: "nodes",
4409
+ data: {
4410
+ type: "group",
4411
+ id: w.id,
4412
+ icon: w.icon,
4413
+ label: w.title,
4414
+ parent: w.in
4415
+ },
4416
+ classes: "node-group"
4417
+ });
4418
+ });
4419
+ }
4420
+ dt(Xe, "addGroups");
4421
+ function He(C, G) {
4422
+ C.forEach((w) => {
4423
+ const { lhsId: U, rhsId: L, lhsInto: u, lhsGroup: h, rhsInto: a, lhsDir: e, rhsDir: i, rhsGroup: f, title: r } = w, v = me(w.lhsDir, w.rhsDir) ? "segments" : "straight", t = {
4424
+ id: `${U}-${L}`,
4425
+ label: r,
4426
+ source: U,
4427
+ sourceDir: e,
4428
+ sourceArrow: u,
4429
+ sourceGroup: h,
4430
+ sourceEndpoint: e === "L" ? "0 50%" : e === "R" ? "100% 50%" : e === "T" ? "50% 0" : "50% 100%",
4431
+ target: L,
4432
+ targetDir: i,
4433
+ targetArrow: a,
4434
+ targetGroup: f,
4435
+ targetEndpoint: i === "L" ? "0 50%" : i === "R" ? "100% 50%" : i === "T" ? "50% 0" : "50% 100%"
4436
+ };
4437
+ G.add({
4438
+ group: "edges",
4439
+ data: t,
4440
+ classes: v
4441
+ });
4442
+ });
4443
+ }
4444
+ dt(He, "addEdges");
4445
+ function We(C, G, w) {
4446
+ const U = /* @__PURE__ */ dt((a, e) => Object.entries(a).reduce(
4447
+ (i, [f, r]) => {
4448
+ let v = 0;
4449
+ const t = Object.entries(r);
4450
+ if (t.length === 1)
4451
+ return i[f] = t[0][1], i;
4452
+ for (let s = 0; s < t.length - 1; s++)
4453
+ for (let o = s + 1; o < t.length; o++) {
4454
+ const [c, l] = t[s], [T, g] = t[o];
4455
+ if (w[c]?.[T] === e)
4456
+ i[f] ??= [], i[f] = [...i[f], ...l, ...g];
4457
+ else if (c === "default" || T === "default")
4458
+ i[f] ??= [], i[f] = [...i[f], ...l, ...g];
4459
+ else {
4460
+ const N = `${f}-${v++}`;
4461
+ i[N] = l;
4462
+ const b = `${f}-${v++}`;
4463
+ i[b] = g;
4464
+ }
4465
+ }
4466
+ return i;
4467
+ },
4468
+ {}
4469
+ ), "flattenAlignments"), L = G.map((a) => {
4470
+ const e = {}, i = {};
4471
+ return Object.entries(a).forEach(([f, [r, v]]) => {
4472
+ const t = C.getNode(f)?.in ?? "default";
4473
+ e[v] ??= {}, e[v][t] ??= [], e[v][t].push(f), i[r] ??= {}, i[r][t] ??= [], i[r][t].push(f);
4474
+ }), {
4475
+ horiz: Object.values(U(e, "horizontal")).filter(
4476
+ (f) => f.length > 1
4477
+ ),
4478
+ vert: Object.values(U(i, "vertical")).filter(
4479
+ (f) => f.length > 1
4480
+ )
4481
+ };
4482
+ }), [u, h] = L.reduce(
4483
+ ([a, e], { horiz: i, vert: f }) => [
4484
+ [...a, ...i],
4485
+ [...e, ...f]
4486
+ ],
4487
+ [[], []]
4488
+ );
4489
+ return {
4490
+ horizontal: u,
4491
+ vertical: h
4492
+ };
4493
+ }
4494
+ dt(We, "getAlignments");
4495
+ function Ve(C, G) {
4496
+ const w = [], U = /* @__PURE__ */ dt((u) => `${u[0]},${u[1]}`, "posToStr"), L = /* @__PURE__ */ dt((u) => u.split(",").map((h) => parseInt(h)), "strToPos");
4497
+ return C.forEach((u) => {
4498
+ const h = Object.fromEntries(
4499
+ Object.entries(u).map(([f, r]) => [U(r), f])
4500
+ ), a = [U([0, 0])], e = {}, i = {
4501
+ L: [-1, 0],
4502
+ R: [1, 0],
4503
+ T: [0, 1],
4504
+ B: [0, -1]
4505
+ };
4506
+ for (; a.length > 0; ) {
4507
+ const f = a.shift();
4508
+ if (f) {
4509
+ e[f] = 1;
4510
+ const r = h[f];
4511
+ if (r) {
4512
+ const v = L(f);
4513
+ Object.entries(i).forEach(([t, s]) => {
4514
+ const o = U([v[0] + s[0], v[1] + s[1]]), c = h[o];
4515
+ c && !e[o] && (a.push(o), w.push({
4516
+ [De[t]]: c,
4517
+ [De[mr(t)]]: r,
4518
+ gap: 1.5 * G.getConfigField("iconSize")
4519
+ }));
4520
+ });
4521
+ }
4522
+ }
4523
+ }
4524
+ }), w;
4525
+ }
4526
+ dt(Ve, "getRelativeConstraints");
4527
+ function ze(C, G, w, U, L, { spatialMaps: u, groupAlignments: h }) {
4528
+ return new Promise((a) => {
4529
+ const e = nr("body").append("div").attr("id", "cy").attr("style", "display:none"), i = Se({
4530
+ container: document.getElementById("cy"),
4531
+ style: [
4532
+ {
4533
+ selector: "edge",
4534
+ style: {
4535
+ "curve-style": "straight",
4536
+ "source-endpoint": "data(sourceEndpoint)",
4537
+ "target-endpoint": "data(targetEndpoint)"
4538
+ }
4539
+ },
4540
+ {
4541
+ selector: "edge[label]",
4542
+ style: {
4543
+ label: "data(label)"
4544
+ }
4545
+ },
4546
+ {
4547
+ selector: "edge.segments",
4548
+ style: {
4549
+ "curve-style": "segments",
4550
+ "segment-weights": "0",
4551
+ "segment-distances": [0.5],
4552
+ // @ts-ignore Incorrect library types
4553
+ "edge-distances": "endpoints",
4554
+ "source-endpoint": "data(sourceEndpoint)",
4555
+ "target-endpoint": "data(targetEndpoint)"
4556
+ }
4557
+ },
4558
+ {
4559
+ selector: "node",
4560
+ style: {
4561
+ // @ts-ignore Incorrect library types
4562
+ "compound-sizing-wrt-labels": "include"
4563
+ }
4564
+ },
4565
+ {
4566
+ selector: "node[label]",
4567
+ style: {
4568
+ "text-valign": "bottom",
4569
+ "text-halign": "center",
4570
+ "font-size": `${L.getConfigField("fontSize")}px`
4571
+ }
4572
+ },
4573
+ {
4574
+ selector: ".node-service",
4575
+ style: {
4576
+ label: "data(label)",
4577
+ width: "data(width)",
4578
+ height: "data(height)"
4579
+ }
4580
+ },
4581
+ {
4582
+ selector: ".node-junction",
4583
+ style: {
4584
+ width: "data(width)",
4585
+ height: "data(height)"
4586
+ }
4587
+ },
4588
+ {
4589
+ selector: ".node-group",
4590
+ style: {
4591
+ // @ts-ignore Incorrect library types
4592
+ padding: `${L.getConfigField("padding")}px`
4593
+ }
4594
+ }
4595
+ ],
4596
+ layout: {
4597
+ name: "grid",
4598
+ boundingBox: {
4599
+ x1: 0,
4600
+ x2: 100,
4601
+ y1: 0,
4602
+ y2: 100
4603
+ }
4604
+ }
4605
+ });
4606
+ e.remove(), Xe(w, i), Ge(C, i, L), Ue(G, i, L), He(U, i);
4607
+ const f = We(L, u, h), r = Ve(u, L), v = L.getConfigField("iconSize"), t = L.getConfigField("idealEdgeLengthMultiplier") * v, s = 0.5 * v, o = L.getConfigField("edgeElasticity"), c = i.layout({
4608
+ name: "fcose",
4609
+ quality: "proof",
4610
+ randomize: L.getConfigField("randomize"),
4611
+ nodeSeparation: L.getConfigField("nodeSeparation"),
4612
+ numIter: L.getConfigField("numIter"),
4613
+ styleEnabled: !1,
4614
+ animate: !1,
4615
+ nodeDimensionsIncludeLabels: !1,
4616
+ // Adjust the edge parameters if it passes through the border of a group
4617
+ // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67
4618
+ idealEdgeLength(l) {
4619
+ const [T, g] = l.connectedNodes(), { parent: d } = ie(T), { parent: N } = ie(g);
4620
+ return d === N ? t : s;
4621
+ },
4622
+ edgeElasticity(l) {
4623
+ const [T, g] = l.connectedNodes(), { parent: d } = ie(T), { parent: N } = ie(g);
4624
+ return d === N ? o : 1e-3;
4625
+ },
4626
+ alignmentConstraint: f,
4627
+ relativePlacementConstraint: r
4628
+ });
4629
+ c.one("layoutstop", () => {
4630
+ function l(T, g, d, N) {
4631
+ let b, A;
4632
+ const { x: S, y: V } = T, { x: X, y: Z } = g;
4633
+ A = (N - V + (S - d) * (V - Z) / (S - X)) / Math.sqrt(1 + Math.pow((V - Z) / (S - X), 2)), b = Math.sqrt(Math.pow(N - V, 2) + Math.pow(d - S, 2) - Math.pow(A, 2));
4634
+ const D = Math.sqrt(Math.pow(X - S, 2) + Math.pow(Z - V, 2));
4635
+ b = b / D;
4636
+ let _ = (X - S) * (N - V) - (Z - V) * (d - S);
4637
+ switch (!0) {
4638
+ case _ >= 0:
4639
+ _ = 1;
4640
+ break;
4641
+ case _ < 0:
4642
+ _ = -1;
4643
+ break;
4644
+ }
4645
+ let n = (X - S) * (d - S) + (Z - V) * (N - V);
4646
+ switch (!0) {
4647
+ case n >= 0:
4648
+ n = 1;
4649
+ break;
4650
+ case n < 0:
4651
+ n = -1;
4652
+ break;
4653
+ }
4654
+ return A = Math.abs(A) * _, b = b * n, {
4655
+ distances: A,
4656
+ weights: b
4657
+ };
4658
+ }
4659
+ dt(l, "getSegmentWeights"), i.startBatch();
4660
+ for (const T of Object.values(i.edges()))
4661
+ if (T.data?.()) {
4662
+ const { x: g, y: d } = T.source().position(), { x: N, y: b } = T.target().position();
4663
+ if (g !== N && d !== b) {
4664
+ const A = T.sourceEndpoint(), S = T.targetEndpoint(), { sourceDir: V } = Fe(T), [X, Z] = qt(V) ? [A.x, S.y] : [S.x, A.y], { weights: D, distances: _ } = l(A, S, X, Z);
4665
+ T.style("segment-distances", _), T.style("segment-weights", D);
4666
+ }
4667
+ }
4668
+ i.endBatch(), c.run();
4669
+ }), c.run(), i.ready((l) => {
4670
+ Re.info("Ready", l), a(i);
4671
+ });
4672
+ });
4673
+ }
4674
+ dt(ze, "layoutArchitecture");
4675
+ var Pr = /* @__PURE__ */ dt(async (C, G, w, U) => {
4676
+ const L = U.db;
4677
+ L.setDiagramId(G);
4678
+ const u = L.getServices(), h = L.getJunctions(), a = L.getGroups(), e = L.getEdges(), i = L.getDataStructures(), f = ke(G), r = f.append("g");
4679
+ r.attr("class", "architecture-edges");
4680
+ const v = f.append("g");
4681
+ v.attr("class", "architecture-services");
4682
+ const t = f.append("g");
4683
+ t.attr("class", "architecture-groups"), await Fr(L, v, u, G), br(L, v, h, G);
4684
+ const s = await ze(u, h, a, e, L, i);
4685
+ await Rr(r, s, L, G), await Sr(t, s, L, G), Ye(L, s), Ze(void 0, f, L.getConfigField("padding"), L.getConfigField("useMaxWidth"));
4686
+ }, "draw"), Gr = { draw: Pr }, Wr = {
4687
+ parser: Pe,
4688
+ get db() {
4689
+ return new be();
4690
+ },
4691
+ renderer: Gr,
4692
+ styles: Ir
4693
+ };
4694
+ export {
4695
+ Wr as diagram
4696
+ };
4697
+ //# sourceMappingURL=architectureDiagram-3BPJPVTR-C3uLEfb1.js.map