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