@marimo-team/frontend 0.24.1-dev3 → 0.24.1-dev30

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 (588) hide show
  1. package/dist/assets/{CellStatus-B_dBNTJO.js → CellStatus-DdKYN88d.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-DLvmqIcV.js → ConnectedDataExplorerComponent-CbTaTBJ8.js} +1 -1
  3. package/dist/assets/{JsonOutput-C5g_bqiZ.js → JsonOutput-htT793Wj.js} +7 -7
  4. package/dist/assets/LazyAnyLanguageCodeMirror-Bx0i_n8B.js +2 -0
  5. package/dist/assets/{MarimoErrorOutput-Cb0evuEp.js → MarimoErrorOutput-Db7coyFA.js} +7 -7
  6. package/dist/assets/{RenderHTML-BoN8Qu7U.js → RenderHTML-Cu5JtYZJ.js} +1 -1
  7. package/dist/assets/{RunButton-C3V3v58F.js → RunButton-BOnl_Dk8.js} +1 -1
  8. package/dist/assets/{abnfDiagram-N423BO3Z-BBbWbiyb.js → abnfDiagram-N423BO3Z-BhqlQxDe.js} +1 -1
  9. package/dist/assets/{add-cell-with-ai--yrESuLb.js → add-cell-with-ai-Chy4ITIT.js} +12 -12
  10. package/dist/assets/add-connection-dialog-DGYhyXo6.js +181 -0
  11. package/dist/assets/{agent-panel-i9R2vDC5.js → agent-panel--Nt4UmNj.js} +6 -6
  12. package/dist/assets/{ai-model-dropdown-Wvw4ot3v.js → ai-model-dropdown-BUCPZ0ND.js} +4 -4
  13. package/dist/assets/{any-language-editor-B92E_2Sy.js → any-language-editor-CV_jRt2A.js} +1 -1
  14. package/dist/assets/apl-sEsRK68R.js +1 -0
  15. package/dist/assets/app-config-button-BOxbrv3L.js +1 -0
  16. package/dist/assets/architecture-TIHT7OUA-CkB6_TwN.js +1 -0
  17. package/dist/assets/{architectureDiagram-T3A2C74G-DoGbg0qs.js → architectureDiagram-T3A2C74G-D_0znduP.js} +1 -1
  18. package/dist/assets/asciiarmor-CwCv7Lne.js +1 -0
  19. package/dist/assets/asn1-CuzWg-fh.js +1 -0
  20. package/dist/assets/{blob-XD7AvCQ1.js → blob-BVQSODqn.js} +1 -1
  21. package/dist/assets/{blockDiagram-VBNYF7ZC-Fapk5G8q.js → blockDiagram-VBNYF7ZC-DhnQkFJt.js} +1 -1
  22. package/dist/assets/brainfuck-CnnfS_cI.js +1 -0
  23. package/dist/assets/{c4Diagram-5PPSVZJV-DHpoGw8m.js → c4Diagram-5PPSVZJV-DAZWLixJ.js} +1 -1
  24. package/dist/assets/{cell-editor-CrWparei.js → cell-editor-DgOfL9Xv.js} +15 -15
  25. package/dist/assets/cell-link-Bx8FWjns.js +1 -0
  26. package/dist/assets/{cells-BvgwUKB9.js → cells-Biwqg0z6.js} +80 -80
  27. package/dist/assets/channel-97-i68Z5.js +1 -0
  28. package/dist/assets/{chat-display-CvI32cPI.js → chat-display-B2qUbgnh.js} +1 -1
  29. package/dist/assets/{chat-panel-nbCWEZX-.js → chat-panel-gxL2S-HQ.js} +2 -2
  30. package/dist/assets/{chat-ui-BmrjRgsi.js → chat-ui-BhnwgDpa.js} +1 -1
  31. package/dist/assets/{chunk-2GRJ4B5K-B92Uwj7z.js → chunk-2GRJ4B5K-BJlW2T7a.js} +1 -1
  32. package/dist/assets/{chunk-2Q5K7J3B-CjxRf8HM.js → chunk-2Q5K7J3B-BKHkc-hn.js} +1 -1
  33. package/dist/assets/{chunk-3NCLNEKW-D7adDEkj.js → chunk-3NCLNEKW-DYppyU2y.js} +1 -1
  34. package/dist/assets/{chunk-4I5QYGJK-Cce-HuZg.js → chunk-4I5QYGJK-o2gGFKEO.js} +1 -1
  35. package/dist/assets/{chunk-5FCAYU7R-BJ04i5uO.js → chunk-5FCAYU7R-B4Jz9Jv5.js} +1 -1
  36. package/dist/assets/{chunk-5FQGJX7Z-B4N_BMo6.js → chunk-5FQGJX7Z-BIDn9QG0.js} +2 -2
  37. package/dist/assets/{chunk-5HE753X5-DRFzJ7WN.js → chunk-5HE753X5-DySWu3WO.js} +1 -1
  38. package/dist/assets/{chunk-5JV3BV7I-BEi9dboc.js → chunk-5JV3BV7I-EFAb-cXP.js} +1 -1
  39. package/dist/assets/{chunk-5RXB4S5H-B63Jmiyu.js → chunk-5RXB4S5H-Bsyeqyau.js} +1 -1
  40. package/dist/assets/{chunk-5TONJI2A-C5JJwzzL.js → chunk-5TONJI2A-BtGpymP5.js} +1 -1
  41. package/dist/assets/{chunk-5VM5RSS4-CQG8Gkf2.js → chunk-5VM5RSS4-De48wE7I.js} +1 -1
  42. package/dist/assets/{chunk-6Q2QTUOP-CjNw1snm.js → chunk-6Q2QTUOP-UhOQcBq_.js} +1 -1
  43. package/dist/assets/{chunk-7BUUIJ7U-DFO0zbY5.js → chunk-7BUUIJ7U-VPkRElaC.js} +1 -1
  44. package/dist/assets/{chunk-7Z6QIM7H-BahVaiTb.js → chunk-7Z6QIM7H-CSiw9nlS.js} +1 -1
  45. package/dist/assets/{chunk-BIQX33UG-B1y9dy0P.js → chunk-BIQX33UG-Clm0kIyq.js} +1 -1
  46. package/dist/assets/{chunk-CQNSW5MT-BOOyLCfW.js → chunk-CQNSW5MT-CxPDGEiS.js} +1 -1
  47. package/dist/assets/{chunk-CYSBUYHQ-DAWZpY6r.js → chunk-CYSBUYHQ-Cx6JgR38.js} +1 -1
  48. package/dist/assets/{chunk-EMLP6XTP-Bj2I2iEi.js → chunk-EMLP6XTP-DrNgCa2u.js} +1 -1
  49. package/dist/assets/{chunk-GF5L2VYU-BA39vN3k.js → chunk-GF5L2VYU-B88HnHN4.js} +1 -1
  50. package/dist/assets/{chunk-I66GZJ75-CgJN5WrL.js → chunk-I66GZJ75-BWcitPjS.js} +3 -3
  51. package/dist/assets/{chunk-J7OUQ5F2-DK5phbYO.js → chunk-J7OUQ5F2-DuBXnQXx.js} +2 -2
  52. package/dist/assets/{chunk-JG7HCLWE-BEfUAeKb.js → chunk-JG7HCLWE-D4-rg2bS.js} +1 -1
  53. package/dist/assets/{chunk-JQJVKLGR-vTeSeIY7.js → chunk-JQJVKLGR-L5fl0mYk.js} +1 -1
  54. package/dist/assets/{chunk-JWPE2WC7-C-mBVSJi.js → chunk-JWPE2WC7-CIIO5B1k.js} +1 -1
  55. package/dist/assets/{chunk-KBJHAD2P-BKxl1MSu.js → chunk-KBJHAD2P-MvrqGNli.js} +1 -1
  56. package/dist/assets/{chunk-MOZMSUNE-C-RMDvp_.js → chunk-MOZMSUNE-t37mHxNa.js} +1 -1
  57. package/dist/assets/{chunk-NSK5VX7P-bxC5WUDr.js → chunk-NSK5VX7P-B_lLBcNS.js} +1 -1
  58. package/dist/assets/{chunk-OSBZ3O6U-DEYDoDYT.js → chunk-OSBZ3O6U-3f38erx3.js} +1 -1
  59. package/dist/assets/{chunk-QBLGF6JB-CBncH5PS.js → chunk-QBLGF6JB-CHob4JDY.js} +1 -1
  60. package/dist/assets/{chunk-QR6OTTB3-gGVLoYpg.js → chunk-QR6OTTB3-Xk5It1Th.js} +1 -1
  61. package/dist/assets/{chunk-R7FJI6CG-DWxNgy5y.js → chunk-R7FJI6CG-ClJ6eR5G.js} +1 -1
  62. package/dist/assets/{chunk-RYQCIY6F-DkXJx61e.js → chunk-RYQCIY6F-CZjjwaqg.js} +1 -1
  63. package/dist/assets/{chunk-U6XO7XAA-DWWxQ-OA.js → chunk-U6XO7XAA-Ct1fe-tp.js} +1 -1
  64. package/dist/assets/{chunk-UBXNYLIW-elhI8GOz.js → chunk-UBXNYLIW-XbwBj9py.js} +1 -1
  65. package/dist/assets/{chunk-W5SLKNZC-D_QNHYYQ.js → chunk-W5SLKNZC-DBMPI1Hf.js} +1 -1
  66. package/dist/assets/{chunk-WRU74C26-BU1GwH6E.js → chunk-WRU74C26-HbDQnuwB.js} +1 -1
  67. package/dist/assets/{chunk-XXDRQBXY-D_KNH1wc.js → chunk-XXDRQBXY-DyGGngH3.js} +1 -1
  68. package/dist/assets/{chunk-YOTPTUD7-Nm5N45o4.js → chunk-YOTPTUD7-CC6lxUuz.js} +1 -1
  69. package/dist/assets/{chunk-ZIRB5QZD-DKs4kfC7.js → chunk-ZIRB5QZD-Giz-iAOC.js} +1 -1
  70. package/dist/assets/classDiagram-JCYQIIEL-Bi4N77rq.js +1 -0
  71. package/dist/assets/classDiagram-v2-OCEON4UE-DDmVp-9r.js +1 -0
  72. package/dist/assets/{clike-BAN6KopO.js → clike-tfWZyYoN.js} +1 -1
  73. package/dist/assets/clojure-Bninbb7T.js +1 -0
  74. package/dist/assets/cmake-BpuaQxBS.js +1 -0
  75. package/dist/assets/cobol-GPJ0dHQG.js +1 -0
  76. package/dist/assets/{code-block-37QAKDTI-DYj4t0uu.js → code-block-37QAKDTI-CxkZZ2yu.js} +1 -1
  77. package/dist/assets/coffeescript-D7gQHdB-.js +1 -0
  78. package/dist/assets/{column-preview-DMqGohE5.js → column-preview-BaRqZ9P8.js} +1 -1
  79. package/dist/assets/{command-palette-DCAiZSda.js → command-palette-Cbie8JV9.js} +1 -1
  80. package/dist/assets/{common-Dx_4ekWj.js → common-sBRwGAKy.js} +1 -1
  81. package/dist/assets/commonlisp-Cr4KGe18.js +1 -0
  82. package/dist/assets/{components-CozWCL5N.js → components-CGGSwziZ.js} +1 -1
  83. package/dist/assets/components-DsJAWbBR.js +1 -0
  84. package/dist/assets/{cose-bilkent-JH36ORCC-BItWxPmu.js → cose-bilkent-JH36ORCC-Bgowgmmd.js} +1 -1
  85. package/dist/assets/crystal-CsTMAwME.js +1 -0
  86. package/dist/assets/{css-DWLxGm3Z.js → css-COZ77Eal.js} +1 -1
  87. package/dist/assets/cynefin-VYW2F7L2-mNpr4SbP.js +1 -0
  88. package/dist/assets/{cynefinDiagram-MW4NZA55-xRolnN9H.js → cynefinDiagram-MW4NZA55-BjhYqu92.js} +1 -1
  89. package/dist/assets/cypher-CY21sZiF.js +1 -0
  90. package/dist/assets/d-CURHSrpr.js +1 -0
  91. package/dist/assets/{dagre-VZM6K2ZE--7CAsOPi.js → dagre-VZM6K2ZE-BEuyIkT6.js} +1 -1
  92. package/dist/assets/{data-grid-overlay-editor-CP2bSduR.js → data-grid-overlay-editor-BQUij2ly.js} +1 -1
  93. package/dist/assets/data-source-discovery-DCNYJylO.js +1 -0
  94. package/dist/assets/{datasource-Le540Ng6.js → datasource-DxCwZdAq.js} +2 -2
  95. package/dist/assets/dependency-graph-panel-CLOQ_RvL.js +5 -0
  96. package/dist/assets/{diagram-7IWD3JNH-B55VSdpL.js → diagram-7IWD3JNH-Bs3lgu-c.js} +1 -1
  97. package/dist/assets/{diagram-B4RE2ZJO-BDn7ASqI.js → diagram-B4RE2ZJO-Dth7brNz.js} +1 -1
  98. package/dist/assets/{diagram-LBJQPF4R-B51MZG2V.js → diagram-LBJQPF4R-BTVLtL0d.js} +1 -1
  99. package/dist/assets/{diagram-Q27KOJAE-Cwk0Mlin.js → diagram-Q27KOJAE-CP204u9a.js} +1 -1
  100. package/dist/assets/{diagram-UB23O5K3-BdYFaMnx.js → diagram-UB23O5K3-ClHQzHar.js} +1 -1
  101. package/dist/assets/diff-oDNdZgsT.js +1 -0
  102. package/dist/assets/dist-2VJQDijP.js +1 -0
  103. package/dist/assets/{dist-etjVl5BO.js → dist-BB2m_pT9.js} +1 -1
  104. package/dist/assets/{dist-CAHB5I2V.js → dist-BIoV7ItK.js} +1 -1
  105. package/dist/assets/{dist-D5yi7Y8o.js → dist-BKZjRJh7.js} +1 -1
  106. package/dist/assets/dist-BSndAsl2.js +1 -0
  107. package/dist/assets/{dist-CF4ci481.js → dist-BrBdlR-1.js} +1 -1
  108. package/dist/assets/dist-CULUasdr.js +1 -0
  109. package/dist/assets/{dist-CG7o1Txo.js → dist-CgdeWOxv.js} +1 -1
  110. package/dist/assets/{dist-x-uwJAB2.js → dist-D7Pn6TvC.js} +1 -1
  111. package/dist/assets/{dist-Ci0ANOWc.js → dist-DoCsyl8V.js} +1 -1
  112. package/dist/assets/{dist-BhAom09b.js → dist-Q_HuxBl8.js} +1 -1
  113. package/dist/assets/{dist-UMYZc9Uw.js → dist-URSEPeIQ.js} +1 -1
  114. package/dist/assets/dist-e3TiiDdA.js +1 -0
  115. package/dist/assets/{dist-0tTkix79.js → dist-gKSpDGw2.js} +1 -1
  116. package/dist/assets/{dist-5AUFDACg.js → dist-ziD6OB9m.js} +1 -1
  117. package/dist/assets/{dockerfile-vQlfzaHL.js → dockerfile-L84t-MVG.js} +1 -1
  118. package/dist/assets/{documentation-panel-RJNMjUK6.js → documentation-panel-D9w8PAT9.js} +1 -1
  119. package/dist/assets/{download-B8NwKEtr.js → download-CfUkZlw7.js} +1 -1
  120. package/dist/assets/dtd-Cy2_BeYL.js +1 -0
  121. package/dist/assets/dylan-Crd9Fb_0.js +1 -0
  122. package/dist/assets/{ebnfDiagram-BXEA7PRR-BeNZBLGl.js → ebnfDiagram-BXEA7PRR-D5itfLTD.js} +1 -1
  123. package/dist/assets/ecl-CfCmFoo0.js +1 -0
  124. package/dist/assets/{edit-page-CvL5WAqs.js → edit-page-DKAg2YW9.js} +6 -6
  125. package/dist/assets/eiffel-gIaoJqnl.js +1 -0
  126. package/dist/assets/elm-BFWuf0zw.js +1 -0
  127. package/dist/assets/{erDiagram-JOGREHBK-Md316MnW.js → erDiagram-JOGREHBK-8nttFkHX.js} +1 -1
  128. package/dist/assets/erlang-o_h5GHv6.js +1 -0
  129. package/dist/assets/{error-entries-yYB8PZoo.js → error-entries-DpvSrZSw.js} +3 -3
  130. package/dist/assets/{error-panel-Dr928gBs.js → error-panel-uRl1_l47.js} +1 -1
  131. package/dist/assets/{esm-CpCa6w8Q.js → esm-B7G79VOo.js} +1 -1
  132. package/dist/assets/eventmodeling-45OFAUF4-CmCnqr0B.js +1 -0
  133. package/dist/assets/factor-DhP48x0i.js +1 -0
  134. package/dist/assets/{factor-D96xahcJ.js → factor-aNENtHLj.js} +1 -1
  135. package/dist/assets/file-explorer-panel-DwA9Lprz.js +37 -0
  136. package/dist/assets/{file-icons-D39zbjsS.js → file-icons-DpREEjwW.js} +1 -1
  137. package/dist/assets/{file-name-input-BLH5fTEA.js → file-name-input-C7AQKuoU.js} +1 -1
  138. package/dist/assets/{floating-outline-UPrDtFZF.js → floating-outline-4I6DvqaR.js} +1 -1
  139. package/dist/assets/flowDiagram-UKHOOZJN-BBKoHcjJ.js +1 -0
  140. package/dist/assets/{focus-BArgHYf8.js → focus-CeTtpVjV.js} +1 -1
  141. package/dist/assets/{form-BvzcNsxB.js → form-B10bgcbQ.js} +1 -1
  142. package/dist/assets/{form-BN1AKD58.js → form-Cj9BLARR.js} +1 -1
  143. package/dist/assets/forth-B9culvwH.js +1 -0
  144. package/dist/assets/fortran-P9CMHntW.js +1 -0
  145. package/dist/assets/{ganttDiagram-PKOTCBZU-ZWAQtEyO.js → ganttDiagram-PKOTCBZU-lYZ3LZM4.js} +1 -1
  146. package/dist/assets/gas-aBeBIUA2.js +1 -0
  147. package/dist/assets/gherkin-BKojMN6Q.js +1 -0
  148. package/dist/assets/gitGraph-TEB2WS4Q-lhsXnAif.js +1 -0
  149. package/dist/assets/{gitGraphDiagram-DS77QQ5N-BLejYVyQ.js → gitGraphDiagram-DS77QQ5N-BMWEqU01.js} +1 -1
  150. package/dist/assets/{glide-data-editor-BNZxtmKn.js → glide-data-editor-Bo6hLXbn.js} +6 -6
  151. package/dist/assets/groovy-CePAd7wh.js +1 -0
  152. package/dist/assets/haskell-QHmsrbZx.js +1 -0
  153. package/dist/assets/haxe-CQV_8vKL.js +1 -0
  154. package/dist/assets/{home-page-DcO0NzuV.js → home-page-BNJihtii.js} +2 -2
  155. package/dist/assets/{html-to-image-DKEUbBwc.js → html-to-image-ChfBVn8-.js} +1 -1
  156. package/dist/assets/idl-Dd8N44Cm.js +1 -0
  157. package/dist/assets/index-CxZ6uZaz.css +2 -0
  158. package/dist/assets/index-T5Rre8Dj.js +38 -0
  159. package/dist/assets/info-DKCQHKI2-C7T8UDyU.js +1 -0
  160. package/dist/assets/infoDiagram-6WML65LV-DF1s-6Vl.js +2 -0
  161. package/dist/assets/{ishikawaDiagram-WSZJBQD7-DsUyhPdP.js → ishikawaDiagram-WSZJBQD7-DaG24pVU.js} +1 -1
  162. package/dist/assets/javascript-DSNeo7JU.js +1 -0
  163. package/dist/assets/{journeyDiagram-NVQOT4AX-Dtytysty.js → journeyDiagram-NVQOT4AX-Bjv5KPQN.js} +1 -1
  164. package/dist/assets/julia-noK_uk9P.js +1 -0
  165. package/dist/assets/{kanban-definition-27J2QSJJ-CtSUWi1q.js → kanban-definition-27J2QSJJ-3QfkEp5c.js} +1 -1
  166. package/dist/assets/katex-D7rQd2tt.js +1 -0
  167. package/dist/assets/{layout-C5In1pVG.js → layout-YPBtS2D6.js} +5 -5
  168. package/dist/assets/livescript-YKkeujLh.js +1 -0
  169. package/dist/assets/{logs-panel-DItocggZ.js → logs-panel-ClE58_4G.js} +1 -1
  170. package/dist/assets/{loro_wasm_bg-Cei5H7n0.js → loro_wasm_bg-Bhj1szFH.js} +1 -1
  171. package/dist/assets/lua-fLqC1mOj.js +1 -0
  172. package/dist/assets/{markdown-renderer-D7RLn6TA.js → markdown-renderer-BOS4jZLt.js} +3 -3
  173. package/dist/assets/mathematica-BEqGrvB0.js +1 -0
  174. package/dist/assets/mbox-9uehSvC8.js +1 -0
  175. package/dist/assets/{mermaid-4DMBBIKO-oaGD2RAq.js → mermaid-4DMBBIKO-VnWrwEGQ.js} +1 -1
  176. package/dist/assets/{mermaid-D7qPJTl5.js → mermaid-DrH-G40O.js} +3 -3
  177. package/dist/assets/{mermaid-parser.core-C1pvq6V4.js → mermaid-parser.core-7L0n-40M.js} +2 -2
  178. package/dist/assets/{mhchem-ByBXJmVs.js → mhchem-jUQ3W9QS.js} +1 -1
  179. package/dist/assets/{mindmap-definition-FAOFIHXS-BdiofJNg.js → mindmap-definition-FAOFIHXS-BI-5PR09.js} +1 -1
  180. package/dist/assets/mirc-BTX_WxCv.js +1 -0
  181. package/dist/assets/mllike-LThTvO6F.js +1 -0
  182. package/dist/assets/modelica-ClexNQK-.js +1 -0
  183. package/dist/assets/mscgen-Cr-Z_Sdd.js +1 -0
  184. package/dist/assets/mumps-G_BfPdvs.js +1 -0
  185. package/dist/assets/{name-cell-input-jausH-CL.js → name-cell-input-UMsLssMV.js} +1 -1
  186. package/dist/assets/nsis-CBRC0JIr.js +1 -0
  187. package/dist/assets/{nsis-gzbsJ5t0.js → nsis-CNBWu0HQ.js} +1 -1
  188. package/dist/assets/ntriples-DrvRq09t.js +1 -0
  189. package/dist/assets/{number-overlay-editor-CrwfeUrx.js → number-overlay-editor-C-zZ00cy.js} +1 -1
  190. package/dist/assets/octave-BiPC57kS.js +1 -0
  191. package/dist/assets/{outline-panel-C_pASL6b.js → outline-panel-DweKocZK.js} +1 -1
  192. package/dist/assets/oz-DacpSh-q.js +1 -0
  193. package/dist/assets/{packages-panel-DTqur75g.js → packages-panel-Cbw5J5QD.js} +1 -1
  194. package/dist/assets/packet-7NZHBO7P-CJZ85ye7.js +1 -0
  195. package/dist/assets/panel-accordion-state-CgvX-ElJ.js +1 -0
  196. package/dist/assets/panels-DRv39UwA.js +4 -0
  197. package/dist/assets/pascal-BQpBPSms.js +1 -0
  198. package/dist/assets/{pegDiagram-VL7TDLO6-CUhl_uoo.js → pegDiagram-VL7TDLO6-Dr2AgOs7.js} +1 -1
  199. package/dist/assets/perl-BhMGfluR.js +1 -0
  200. package/dist/assets/pie-RZYD4A2V-DowYgF53.js +1 -0
  201. package/dist/assets/{pieDiagram-7S7Q4E2Y-BUJuppkz.js → pieDiagram-7S7Q4E2Y-CrBge38F.js} +1 -1
  202. package/dist/assets/pig-lTm9qLoi.js +1 -0
  203. package/dist/assets/powershell-3wPcC3I5.js +1 -0
  204. package/dist/assets/{process-output-ClE9lj2U.js → process-output-BMxr8Z3g.js} +1 -1
  205. package/dist/assets/properties-CfDlOPua.js +1 -0
  206. package/dist/assets/protobuf-DqtB_3Ds.js +1 -0
  207. package/dist/assets/pug-BendPilS.js +1 -0
  208. package/dist/assets/{pug-CfBtO6QD.js → pug-IDpseMj2.js} +1 -1
  209. package/dist/assets/puppet-CS4oS8k4.js +1 -0
  210. package/dist/assets/python-DwXz2aVG.js +1 -0
  211. package/dist/assets/q-CAmiN8ZZ.js +1 -0
  212. package/dist/assets/{quadrantDiagram-CIZ2JOQS-D1kqQfB1.js → quadrantDiagram-CIZ2JOQS-BE2ggXL5.js} +1 -1
  213. package/dist/assets/r-BVrS7OVn.js +1 -0
  214. package/dist/assets/radar-I7S5WNFK-CTSSWmoj.js +1 -0
  215. package/dist/assets/{radio-group-CSwRGU0A.js → radio-group-YNmbPL7y.js} +1 -1
  216. package/dist/assets/railroad-3IZDKUUU-B7NYUsSF.js +1 -0
  217. package/dist/assets/railroad-abnf-AHOZXSZD-YHDI2QY9.js +1 -0
  218. package/dist/assets/railroad-ebnf-EBAXGLYW-C63c8OB7.js +1 -0
  219. package/dist/assets/railroad-peg-LSFZ7HO6-Cjglh51C.js +1 -0
  220. package/dist/assets/{railroadDiagram-AXF67PYL-A0Qm-6po.js → railroadDiagram-AXF67PYL-DCQRdlxt.js} +1 -1
  221. package/dist/assets/{readonly-code-display-kRUXu5aJ.js → readonly-code-display-N9tCXdCz.js} +1 -1
  222. package/dist/assets/{readonly-python-code-BCOkadQf.js → readonly-python-code-BHrAhtGV.js} +1 -1
  223. package/dist/assets/{requirementDiagram-LRYGKXZP-Cq2ghiHc.js → requirementDiagram-LRYGKXZP-DwT1P9SV.js} +1 -1
  224. package/dist/assets/{reveal-component-DpjFw5UY.js → reveal-component-Cl6cd65E.js} +2 -2
  225. package/dist/assets/rpm-CdnUar42.js +1 -0
  226. package/dist/assets/ruby-BCel59B2.js +1 -0
  227. package/dist/assets/{run-page-BXPaOWqZ.js → run-page-Phwq7OJt.js} +1 -1
  228. package/dist/assets/{sankeyDiagram-W5VNT64P-RT9P6FJq.js → sankeyDiagram-W5VNT64P-DI3BRqfo.js} +1 -1
  229. package/dist/assets/sas-BmzKenFt.js +1 -0
  230. package/dist/assets/scheme-DkHD_m5P.js +1 -0
  231. package/dist/assets/{scratchpad-panel-GyB5PjiV.js → scratchpad-panel-CvihhlAP.js} +1 -1
  232. package/dist/assets/{sequenceDiagram-SI44F4Z6-Dk9UNsG3.js → sequenceDiagram-SI44F4Z6-BBkZRxiN.js} +1 -1
  233. package/dist/assets/session-panel-BmQ0PDHO.js +1 -0
  234. package/dist/assets/shell-BoNNN3zm.js +1 -0
  235. package/dist/assets/sieve-BXXK8f92.js +1 -0
  236. package/dist/assets/{sizeCapture-X5ZJPWSS-ce6Hf1Mn.js → sizeCapture-X5ZJPWSS-BwnqWK01.js} +1 -1
  237. package/dist/assets/{skeleton-CHVfqr51.js → skeleton-BsZq3Vmq.js} +1 -1
  238. package/dist/assets/smalltalk-BOqQhpHI.js +1 -0
  239. package/dist/assets/{snippets-panel-V4x4wLMQ.js → snippets-panel-cYP0GMUf.js} +1 -1
  240. package/dist/assets/sparql-edyZVkfL.js +1 -0
  241. package/dist/assets/spec-C_psFYbu.js +1 -0
  242. package/dist/assets/{src-Be2gSjc_.js → src-BydIU0H9.js} +1 -1
  243. package/dist/assets/{state-m2zUPztG.js → state-DJon00Ew.js} +1 -1
  244. package/dist/assets/{state-C7arWhwL.js → state-Dc5AjWPq.js} +2 -2
  245. package/dist/assets/{stateDiagram-OKZ733FA-b4p2-xPQ.js → stateDiagram-OKZ733FA-CKgejYo0.js} +1 -1
  246. package/dist/assets/stateDiagram-v2-UEYNNEHI-DGOHmIHi.js +1 -0
  247. package/dist/assets/stylus-D7JxHbZj.js +1 -0
  248. package/dist/assets/swift-BVf4glc7.js +1 -0
  249. package/dist/assets/{swimlanes-SLNWSIFB-BU8BFEOR.js → swimlanes-SLNWSIFB-CaRk1UjW.js} +2 -2
  250. package/dist/assets/swimlanesDiagram-ULZ7WXOC-B3waQOQb.js +8 -0
  251. package/dist/assets/tcl-Dj0fCfAi.js +1 -0
  252. package/dist/assets/textile-C2t_E40o.js +1 -0
  253. package/dist/assets/{timeline-definition-Z64GVDOM-D1kTYo17.js → timeline-definition-Z64GVDOM-eczfm7Uw.js} +1 -1
  254. package/dist/assets/toml-DaFUQW6l.js +1 -0
  255. package/dist/assets/{tracing-Cmwuiwj9.js → tracing-dGSNt8Nm.js} +1 -1
  256. package/dist/assets/{tracing-panel-CCXeYfOu.js → tracing-panel-CQCgx3e4.js} +2 -2
  257. package/dist/assets/{tree-actions-QMLf8Qhz.js → tree-actions-pW_UgP3m.js} +1 -1
  258. package/dist/assets/treeView-QDETBFTQ-CSvxEE7M.js +1 -0
  259. package/dist/assets/treemap-6X3UGDF4-CmweKwGi.js +1 -0
  260. package/dist/assets/troff-CYzkeKir.js +1 -0
  261. package/dist/assets/ttcn-CXYORWfg.js +1 -0
  262. package/dist/assets/ttcn-cfg-CaYX34bx.js +1 -0
  263. package/dist/assets/turtle-5bfs3D9s.js +1 -0
  264. package/dist/assets/{useCellActionButton-D8qyXNKv.js → useCellActionButton-De17Z9R3.js} +1 -1
  265. package/dist/assets/{useDeleteCell-Ctnxl8AT.js → useDeleteCell-BgFMPTmg.js} +1 -1
  266. package/dist/assets/{useDependencyPanelTab-CYSEZi6j.js → useDependencyPanelTab-w8VLtsK3.js} +1 -1
  267. package/dist/assets/{useNotebookActions-CxMrxNFT.js → useNotebookActions-BI53NQV3.js} +4 -4
  268. package/dist/assets/{useRunCells-DjQN3XYP.js → useRunCells-CAfRBo7h.js} +1 -1
  269. package/dist/assets/{useSplitCell-BG8Zd4lw.js → useSplitCell-N8Ohs-Pp.js} +1 -1
  270. package/dist/assets/{utils-Y4n-X10o.js → utils-Bp3MLwWq.js} +1 -1
  271. package/dist/assets/vb-CXQ5pSkV.js +1 -0
  272. package/dist/assets/vbscript-BZP_4BaN.js +1 -0
  273. package/dist/assets/{vega-component-1VoQOWvU.js → vega-component-DpKA6PEU.js} +1 -1
  274. package/dist/assets/{vega-embed-container-CH1lX0V6.js → vega-embed-container-D0V0wn9T.js} +1 -1
  275. package/dist/assets/velocity-BbHSi60j.js +1 -0
  276. package/dist/assets/{vennDiagram-T6HMQDX7-BhQR7L7x.js → vennDiagram-T6HMQDX7-BKrC4vk_.js} +1 -1
  277. package/dist/assets/verilog-Bw8NaRo-.js +1 -0
  278. package/dist/assets/vhdl-CkM1aKBX.js +1 -0
  279. package/dist/assets/wardley-OPB4EBWU-DKu5fTFq.js +1 -0
  280. package/dist/assets/{wardleyDiagram-T6FBY63Y-C6iZTOEK.js → wardleyDiagram-T6FBY63Y-BsBjXAQS.js} +1 -1
  281. package/dist/assets/webidl-C8MAcuKq.js +1 -0
  282. package/dist/assets/xquery-a81J2h4S.js +1 -0
  283. package/dist/assets/{xychartDiagram-ELKLHX3M-Hl9zZZJW.js → xychartDiagram-ELKLHX3M-i4ykddaR.js} +1 -1
  284. package/dist/assets/yacas-CjV2u_g7.js +1 -0
  285. package/dist/assets/z80-C0uVpBhe.js +1 -0
  286. package/dist/index.html +28 -28
  287. package/package.json +1 -1
  288. package/src/components/app-config/optional-features.test.ts +78 -0
  289. package/src/components/app-config/optional-features.tsx +33 -6
  290. package/src/components/data-table/__tests__/column_formatting.test.ts +7 -0
  291. package/src/components/data-table/charts/__tests__/schemas.test.ts +17 -2
  292. package/src/components/data-table/charts/chart-spec/types.ts +2 -0
  293. package/src/components/data-table/column-formatting/feature.ts +1 -0
  294. package/src/components/data-table/column-formatting/types.ts +1 -0
  295. package/src/components/data-table/column-summary/chart-spec-model.tsx +1 -0
  296. package/src/components/data-table/column-summary/column-summary.tsx +1 -0
  297. package/src/components/data-table/columns.tsx +4 -3
  298. package/src/components/datasets/__tests__/icons.test.ts +10 -2
  299. package/src/components/datasets/icons.tsx +4 -0
  300. package/src/components/datasources/__tests__/components.test.tsx +14 -1
  301. package/src/components/datasources/datasources.tsx +2 -40
  302. package/src/components/editor/chrome/panels/components.tsx +35 -0
  303. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +10 -0
  304. package/src/components/editor/chrome/panels/session-panel.tsx +12 -4
  305. package/src/components/editor/connections/__tests__/quick-add-data-sources.test.tsx +2 -0
  306. package/src/components/editor/connections/add-connection-dialog.tsx +5 -1
  307. package/src/components/editor/connections/quick-add-data-sources.tsx +11 -7
  308. package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +43 -0
  309. package/src/components/editor/connections/storage/__tests__/as-code.test.ts +127 -0
  310. package/src/components/editor/connections/storage/add-storage-form.tsx +11 -1
  311. package/src/components/editor/connections/storage/as-code.ts +30 -1
  312. package/src/components/editor/connections/storage/schemas.ts +63 -0
  313. package/src/core/codemirror/code-lens/__tests__/popover.test.ts +13 -0
  314. package/src/core/codemirror/code-lens/popover.tsx +11 -5
  315. package/src/core/codemirror/language/languages/sql/__tests__/renderers.test.tsx +15 -4
  316. package/src/core/codemirror/language/languages/sql/renderers.tsx +1 -0
  317. package/src/core/datasets/__tests__/data-source-discovery.test.ts +277 -0
  318. package/src/core/datasets/data-source-connections.ts +36 -0
  319. package/src/core/datasets/data-source-discovery.ts +92 -0
  320. package/src/core/kernel/messages.ts +1 -0
  321. package/src/core/websocket/useMarimoKernelConnection.tsx +11 -3
  322. package/src/hooks/useDataSourceDiscovery.ts +50 -9
  323. package/src/plugins/impl/MatrixPlugin.tsx +256 -35
  324. package/src/plugins/impl/__tests__/DataEditorPlugin.test.ts +13 -1
  325. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +540 -3
  326. package/src/plugins/impl/data-editor/glide-data-editor.tsx +1 -0
  327. package/src/plugins/impl/data-editor/glide-utils.ts +1 -0
  328. package/src/plugins/impl/data-frames/__tests__/schema.test.ts +9 -1
  329. package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +8 -0
  330. package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
  331. package/src/plugins/impl/vega/__tests__/vega.test.ts +22 -4
  332. package/src/plugins/impl/vega/utils.ts +3 -0
  333. package/dist/assets/LazyAnyLanguageCodeMirror-DUvRReKp.js +0 -2
  334. package/dist/assets/add-connection-dialog-DHyonb9T.js +0 -178
  335. package/dist/assets/apl-B-7blH-b.js +0 -1
  336. package/dist/assets/app-config-button-DnmQED8O.js +0 -1
  337. package/dist/assets/architecture-TIHT7OUA-YhortkiJ.js +0 -1
  338. package/dist/assets/asciiarmor-D3K8amZ9.js +0 -1
  339. package/dist/assets/asn1-UGGn98tp.js +0 -1
  340. package/dist/assets/brainfuck-B4y4U3tg.js +0 -1
  341. package/dist/assets/cell-link-WDIIwzUn.js +0 -1
  342. package/dist/assets/channel-B8YARzTa.js +0 -1
  343. package/dist/assets/classDiagram-JCYQIIEL-CjNLIEON.js +0 -1
  344. package/dist/assets/classDiagram-v2-OCEON4UE-DB1cPPS3.js +0 -1
  345. package/dist/assets/clojure-BAZ-ejkG.js +0 -1
  346. package/dist/assets/cmake-jWn0xN9y.js +0 -1
  347. package/dist/assets/cobol-XqY9jaWP.js +0 -1
  348. package/dist/assets/coffeescript-DI1jfZHX.js +0 -1
  349. package/dist/assets/commonlisp-UKb01OlU.js +0 -1
  350. package/dist/assets/components-DVs9Yu7X.js +0 -1
  351. package/dist/assets/crystal-DOvjTBWA.js +0 -1
  352. package/dist/assets/cynefin-VYW2F7L2-Dob7zmDv.js +0 -1
  353. package/dist/assets/cypher-CLDhu2ae.js +0 -1
  354. package/dist/assets/d-C0ecUZk9.js +0 -1
  355. package/dist/assets/dependency-graph-panel-BsdBM_AS.js +0 -5
  356. package/dist/assets/diff-657cCCVc.js +0 -1
  357. package/dist/assets/dist-BbNJKBqf.js +0 -1
  358. package/dist/assets/dist-CJU3fYUR.js +0 -1
  359. package/dist/assets/dist-ClAayqDs.js +0 -1
  360. package/dist/assets/dist-Dk7PW1P8.js +0 -1
  361. package/dist/assets/dtd-DSiK7Qgi.js +0 -1
  362. package/dist/assets/dylan-07d5-7Q9.js +0 -1
  363. package/dist/assets/ecl-CSTUHiwq.js +0 -1
  364. package/dist/assets/eiffel-DR99GcsM.js +0 -1
  365. package/dist/assets/elm-Cmh0iW6J.js +0 -1
  366. package/dist/assets/erlang-CS9Yc6UC.js +0 -1
  367. package/dist/assets/eventmodeling-45OFAUF4-Dfz56MmV.js +0 -1
  368. package/dist/assets/factor-DjB27Lcf.js +0 -1
  369. package/dist/assets/file-explorer-panel-Brf39GIG.js +0 -37
  370. package/dist/assets/flowDiagram-UKHOOZJN-DuIOw7R3.js +0 -1
  371. package/dist/assets/forth-UwTUu7NY.js +0 -1
  372. package/dist/assets/fortran-cptiB4gJ.js +0 -1
  373. package/dist/assets/gas-ajMbd9Us.js +0 -1
  374. package/dist/assets/gherkin-ClYkalzE.js +0 -1
  375. package/dist/assets/gitGraph-TEB2WS4Q-DHatMnz3.js +0 -1
  376. package/dist/assets/groovy-BY-gt7AW.js +0 -1
  377. package/dist/assets/haskell-D1BeJ7SR.js +0 -1
  378. package/dist/assets/haxe-QOq5WFXx.js +0 -1
  379. package/dist/assets/idl-3-UcEGx7.js +0 -1
  380. package/dist/assets/index-CXJA6BU5.js +0 -38
  381. package/dist/assets/index-WoaGtlKd.css +0 -2
  382. package/dist/assets/info-DKCQHKI2-DL5sXjlh.js +0 -1
  383. package/dist/assets/infoDiagram-6WML65LV-w0LSkwW5.js +0 -2
  384. package/dist/assets/javascript-CorD44JN.js +0 -1
  385. package/dist/assets/julia-BYqTtTAl.js +0 -1
  386. package/dist/assets/katex-DWt0esek.js +0 -1
  387. package/dist/assets/livescript-qYgfNnNE.js +0 -1
  388. package/dist/assets/lua-BCqCjdfz.js +0 -1
  389. package/dist/assets/mathematica-XKwMfn0d.js +0 -1
  390. package/dist/assets/mbox-BnkeOnif.js +0 -1
  391. package/dist/assets/mirc-ipoElhai.js +0 -1
  392. package/dist/assets/mllike-DmouQ5Dp.js +0 -1
  393. package/dist/assets/modelica-BtmmVsUf.js +0 -1
  394. package/dist/assets/mscgen-BHZmHZgz.js +0 -1
  395. package/dist/assets/mumps-oKfoFTl_.js +0 -1
  396. package/dist/assets/nsis-DDOPnuAW.js +0 -1
  397. package/dist/assets/ntriples-Dsyl_sOF.js +0 -1
  398. package/dist/assets/octave-CI5RGMPa.js +0 -1
  399. package/dist/assets/oz-D01pKAWx.js +0 -1
  400. package/dist/assets/packet-7NZHBO7P-Btbo_lPa.js +0 -1
  401. package/dist/assets/panel-accordion-state-DaMmC7UV.js +0 -1
  402. package/dist/assets/panels-B2LHXcJf.js +0 -4
  403. package/dist/assets/pascal-DGXfnIFD.js +0 -1
  404. package/dist/assets/perl-gZ7qIkF-.js +0 -1
  405. package/dist/assets/pie-RZYD4A2V-DHlhKt-c.js +0 -1
  406. package/dist/assets/pig-Cb90ayl-.js +0 -1
  407. package/dist/assets/powershell-_YxddSL3.js +0 -1
  408. package/dist/assets/properties-sU50dmvt.js +0 -1
  409. package/dist/assets/protobuf-DFdF-yfo.js +0 -1
  410. package/dist/assets/pug-DwUB-C24.js +0 -1
  411. package/dist/assets/puppet-DtKzwiZ6.js +0 -1
  412. package/dist/assets/python-BMLOKYmk.js +0 -1
  413. package/dist/assets/q-BF1zXMdP.js +0 -1
  414. package/dist/assets/r-BQiKhVSI.js +0 -1
  415. package/dist/assets/radar-I7S5WNFK-DZTiwd45.js +0 -1
  416. package/dist/assets/railroad-3IZDKUUU-DxAKHi3X.js +0 -1
  417. package/dist/assets/railroad-abnf-AHOZXSZD-DgPW-bTs.js +0 -1
  418. package/dist/assets/railroad-ebnf-EBAXGLYW-6hsaKhfa.js +0 -1
  419. package/dist/assets/railroad-peg-LSFZ7HO6-Sj3gnwID.js +0 -1
  420. package/dist/assets/rpm-v7UTuaHo.js +0 -1
  421. package/dist/assets/ruby-Cw43FpG3.js +0 -1
  422. package/dist/assets/sas-BIKscqlp.js +0 -1
  423. package/dist/assets/scheme-CGic3hSV.js +0 -1
  424. package/dist/assets/session-panel-CidCOM4_.js +0 -1
  425. package/dist/assets/shell-DAh545tm.js +0 -1
  426. package/dist/assets/sieve-bGkng63-.js +0 -1
  427. package/dist/assets/smalltalk-fIw53lm8.js +0 -1
  428. package/dist/assets/sparql-CHbJrAY_.js +0 -1
  429. package/dist/assets/spec-NeCHOv2Z.js +0 -1
  430. package/dist/assets/stateDiagram-v2-UEYNNEHI-DVggkZEP.js +0 -1
  431. package/dist/assets/stylus-3Q5WfXqT.js +0 -1
  432. package/dist/assets/swift-MKxc2knl.js +0 -1
  433. package/dist/assets/swimlanesDiagram-ULZ7WXOC-Dl8Izbnv.js +0 -8
  434. package/dist/assets/tcl-D3fKhQc_.js +0 -1
  435. package/dist/assets/textile-Bi_LEJQ3.js +0 -1
  436. package/dist/assets/toml-Dt-PBqwt.js +0 -1
  437. package/dist/assets/treeView-QDETBFTQ-DI-AuAry.js +0 -1
  438. package/dist/assets/treemap-6X3UGDF4-BikstUU5.js +0 -1
  439. package/dist/assets/troff-BSU-rxoD.js +0 -1
  440. package/dist/assets/ttcn-BmLjonVM.js +0 -1
  441. package/dist/assets/ttcn-cfg-TPTcP0Eh.js +0 -1
  442. package/dist/assets/turtle-HafmShQq.js +0 -1
  443. package/dist/assets/vb-CUif5uGR.js +0 -1
  444. package/dist/assets/vbscript-DWVPFl59.js +0 -1
  445. package/dist/assets/velocity-BJl8UzB4.js +0 -1
  446. package/dist/assets/verilog-B4LUPYXy.js +0 -1
  447. package/dist/assets/vhdl-C91h3ipk.js +0 -1
  448. package/dist/assets/wardley-OPB4EBWU-CeBjkYYY.js +0 -1
  449. package/dist/assets/webidl-DOay1zbU.js +0 -1
  450. package/dist/assets/xquery-Cez7jD_4.js +0 -1
  451. package/dist/assets/yacas-CSQEXB_S.js +0 -1
  452. package/dist/assets/z80-CJbYj7Wr.js +0 -1
  453. package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +0 -80
  454. /package/dist/assets/{ImageComparisonComponent-BcnwhFjf.js → ImageComparisonComponent-f3_KuPvA.js} +0 -0
  455. /package/dist/assets/{Inputs-DrAa-p6i.js → Inputs-S6F4fq1S.js} +0 -0
  456. /package/dist/assets/{Plot-93LEWfvh.js → Plot-BKmsCw4V.js} +0 -0
  457. /package/dist/assets/{apl-CPlG1HX3.js → apl-HjCOpvY9.js} +0 -0
  458. /package/dist/assets/{asciiarmor-DV_pcocJ.js → asciiarmor-CZUdQ8YG.js} +0 -0
  459. /package/dist/assets/{asn1-DPxWcGvG.js → asn1-D9fbSxQp.js} +0 -0
  460. /package/dist/assets/{asterisk-1BK_fEUT.js → asterisk-GbGHf9GU.js} +0 -0
  461. /package/dist/assets/{brainfuck-CGDdBVNO.js → brainfuck-DoACnXtY.js} +0 -0
  462. /package/dist/assets/{chunk-KEIR6QF5-Dy1GNnFZ.js → chunk-KEIR6QF5-DALP8ow3.js} +0 -0
  463. /package/dist/assets/{chunk-Y2CYZVJY-Ci6ix4_L.js → chunk-Y2CYZVJY-BLNiTciS.js} +0 -0
  464. /package/dist/assets/{clear-button-D_bGby_-.js → clear-button-ChZ5WLVn.js} +0 -0
  465. /package/dist/assets/{click-outside-container-Ble4snjv.js → click-outside-container-B_JD95Fi.js} +0 -0
  466. /package/dist/assets/{clike-D91DrsBh.js → clike-BvT_OTqG.js} +0 -0
  467. /package/dist/assets/{clojure-B0eb_-2q.js → clojure-DObunWgq.js} +0 -0
  468. /package/dist/assets/{cmake-COzUvjiS.js → cmake-Bn1dmbG8.js} +0 -0
  469. /package/dist/assets/{cobol-DW4FSnmb.js → cobol-CJ0xj-s7.js} +0 -0
  470. /package/dist/assets/{coffeescript-CommR2mv.js → coffeescript-DSHpWjh8.js} +0 -0
  471. /package/dist/assets/{common-keywords-CL5lDC0w.js → common-keywords-DpBQRN1C.js} +0 -0
  472. /package/dist/assets/{commonlisp-FR_N9RJL.js → commonlisp-C8BmLRoV.js} +0 -0
  473. /package/dist/assets/{crystal-CAN7bz25.js → crystal-Ca8nJT--.js} +0 -0
  474. /package/dist/assets/{css-DmLg8a0m.js → css-CY56PGqI.js} +0 -0
  475. /package/dist/assets/{cypher-BzSJn05x.js → cypher-DkMgpwTD.js} +0 -0
  476. /package/dist/assets/{cytoscape.esm-DMX0DoYf.js → cytoscape.esm-ohuTJsWI.js} +0 -0
  477. /package/dist/assets/{d-UpmnByGo.js → d-De6gURe0.js} +0 -0
  478. /package/dist/assets/{diff-DRpitNo9.js → diff-D9jknSNL.js} +0 -0
  479. /package/dist/assets/{dist-CjgCY_Ws.js → dist-B8OryoSI.js} +0 -0
  480. /package/dist/assets/{dist-DcguuZEe.js → dist-B_Q1ayL4.js} +0 -0
  481. /package/dist/assets/{dist-BY5C0xw-.js → dist-BdgY02GB.js} +0 -0
  482. /package/dist/assets/{dist-5zzK1Bpl.js → dist-BpyRMlx3.js} +0 -0
  483. /package/dist/assets/{dist-Bp45OWJJ.js → dist-BvDn6jZn.js} +0 -0
  484. /package/dist/assets/{dist-CSEj3YUH.js → dist-C1_zNuc7.js} +0 -0
  485. /package/dist/assets/{dist-CYcHr3tv.js → dist-C3M1h1bY.js} +0 -0
  486. /package/dist/assets/{dist-iZqQ8eEZ.js → dist-CiELQ2ik.js} +0 -0
  487. /package/dist/assets/{dist-Op2xySIC.js → dist-CnESRnx2.js} +0 -0
  488. /package/dist/assets/{dist-SgSQKL07.js → dist-Cnb7x5X_.js} +0 -0
  489. /package/dist/assets/{dist-CqO2FBHV.js → dist-CtsSPT78.js} +0 -0
  490. /package/dist/assets/{dist-BQMAD-re.js → dist-DDuxOj5E.js} +0 -0
  491. /package/dist/assets/{dist-C3YC038-.js → dist-DXl-iyI_.js} +0 -0
  492. /package/dist/assets/{dist-VHnyClcl.js → dist-DcwGajoh.js} +0 -0
  493. /package/dist/assets/{dist-ChJa98Av.js → dist-M9OI1ywz.js} +0 -0
  494. /package/dist/assets/{dist-BTX2QySO.js → dist-oc6kOhWh.js} +0 -0
  495. /package/dist/assets/{dist-AhQW5KN1.js → dist-rcsCwDst.js} +0 -0
  496. /package/dist/assets/{dtd-CQV9N2ok.js → dtd-B5FJ4BXV.js} +0 -0
  497. /package/dist/assets/{duckdb-keywords-CKBoTxEb.js → duckdb-keywords-DrrKcwLz.js} +0 -0
  498. /package/dist/assets/{dylan-Bp98yT5y.js → dylan-zZheNs86.js} +0 -0
  499. /package/dist/assets/{ebnf-CviyCkP7.js → ebnf-DuKzoTsP.js} +0 -0
  500. /package/dist/assets/{ecl-BgtQ3zu5.js → ecl-BcK76Ow3.js} +0 -0
  501. /package/dist/assets/{eiffel-Cu14O7Gi.js → eiffel-KaaY88la.js} +0 -0
  502. /package/dist/assets/{elm-Dp1dn40k.js → elm-B7-LHWcm.js} +0 -0
  503. /package/dist/assets/{erlang-DdogJjdp.js → erlang-DaphDTvj.js} +0 -0
  504. /package/dist/assets/{esm-DbAcs2Px.js → esm-BKF5e2-i.js} +0 -0
  505. /package/dist/assets/{fcl-DjfeL5F6.js → fcl-DopXl_Cb.js} +0 -0
  506. /package/dist/assets/{forth-Dd0r86IP.js → forth-BKlt87ew.js} +0 -0
  507. /package/dist/assets/{fortran-4qvtlW4z.js → fortran-DDZOpuZf.js} +0 -0
  508. /package/dist/assets/{gallery-page-CtBVFIhS.js → gallery-page-4_c4sSjL.js} +0 -0
  509. /package/dist/assets/{gas-DqwqZHXy.js → gas-CDn7Y-Gk.js} +0 -0
  510. /package/dist/assets/{gherkin-DMxJEDh5.js → gherkin-eZ5FXLoA.js} +0 -0
  511. /package/dist/assets/{github-6F3RzPv3.js → github-CE-ZvKrv.js} +0 -0
  512. /package/dist/assets/{groovy-DA_MxBua.js → groovy-BwhPb7Fz.js} +0 -0
  513. /package/dist/assets/{haskell-B_hi8VEK.js → haskell-Dnk7SiND.js} +0 -0
  514. /package/dist/assets/{haxe-D-I6YeRN.js → haxe-lllox-eQ.js} +0 -0
  515. /package/dist/assets/{http-VleqgIZJ.js → http-BxcKXOao.js} +0 -0
  516. /package/dist/assets/{idl-CteRrHSs.js → idl-DgcPYEkx.js} +0 -0
  517. /package/dist/assets/{javascript-Cq9DsvSW.js → javascript-COkX3Xca.js} +0 -0
  518. /package/dist/assets/{julia-bHGj6eLp.js → julia-D-oyKrif.js} +0 -0
  519. /package/dist/assets/{katex-B9FkzyvX.js → katex-DX0AbnS9.js} +0 -0
  520. /package/dist/assets/{kiosk-mode-B8UhlOLw.js → kiosk-mode-CNguD0K4.js} +0 -0
  521. /package/dist/assets/{links-STGde2qx.js → links-CWv16njv.js} +0 -0
  522. /package/dist/assets/{livescript-C72YlTeO.js → livescript-D_iKnN6P.js} +0 -0
  523. /package/dist/assets/{loro_wasm_bg-DIEeF9jI.js → loro_wasm_bg-wiZiHqmd.js} +0 -0
  524. /package/dist/assets/{lua-DAtJrHXr.js → lua-DvA1dcWk.js} +0 -0
  525. /package/dist/assets/{marimo-icons-CW8-Txe-.js → marimo-icons-BT3Q9hP-.js} +0 -0
  526. /package/dist/assets/{mathematica-DGp7b8Lx.js → mathematica-BsU_wLgp.js} +0 -0
  527. /package/dist/assets/{mbox-C35KjfEV.js → mbox-C0XhbFpn.js} +0 -0
  528. /package/dist/assets/{mirc-BRCHEPv1.js → mirc-CHTyPhxQ.js} +0 -0
  529. /package/dist/assets/{mllike-D7ajla-U.js → mllike-CUPiTPoj.js} +0 -0
  530. /package/dist/assets/{modelica-0RGVL4ie.js → modelica-CY01YUSk.js} +0 -0
  531. /package/dist/assets/{mscgen-C7Ohs4Tl.js → mscgen-DrdJ4BfA.js} +0 -0
  532. /package/dist/assets/{mumps-Cgag5Xef.js → mumps-oDd7O1nq.js} +0 -0
  533. /package/dist/assets/{nginx-D7OKXoUe.js → nginx-BFZZWp0k.js} +0 -0
  534. /package/dist/assets/{node-sql-parser-DE2GpgS7.js → node-sql-parser-BAQ3SN57.js} +0 -0
  535. /package/dist/assets/{ntriples-oQv5c69K.js → ntriples-Kz6Omt8T.js} +0 -0
  536. /package/dist/assets/{octave-BMTXs4lo.js → octave-D4G4nAd-.js} +0 -0
  537. /package/dist/assets/{oz-CuHYwo8r.js → oz-BMPClN8a.js} +0 -0
  538. /package/dist/assets/{pascal-eFKoVV2p.js → pascal-PjzHq8gx.js} +0 -0
  539. /package/dist/assets/{perl-B1OqOW8w.js → perl-BJehkHc4.js} +0 -0
  540. /package/dist/assets/{pig-gIrBDx27.js → pig-BErUKXIE.js} +0 -0
  541. /package/dist/assets/{powershell-3fQF2XND.js → powershell-C9VPAjfT.js} +0 -0
  542. /package/dist/assets/{properties-D4HHpZmU.js → properties-C9_sS9KX.js} +0 -0
  543. /package/dist/assets/{protobuf-DFSTKR0L.js → protobuf-CTL_9hGv.js} +0 -0
  544. /package/dist/assets/{puppet-BAISgXk9.js → puppet-DiwkFvYr.js} +0 -0
  545. /package/dist/assets/{python-mPctBCbA.js → python-B6qWXHOF.js} +0 -0
  546. /package/dist/assets/{q-CYeV5Dbb.js → q-DK2HS4ce.js} +0 -0
  547. /package/dist/assets/{r-Ds4UrjIV.js → r-DaU8ID7q.js} +0 -0
  548. /package/dist/assets/{rough.esm-CR3HSVpq.js → rough.esm-DsKVbNkz.js} +0 -0
  549. /package/dist/assets/{rpm-DV5-r6dM.js → rpm-B1zWd_-L.js} +0 -0
  550. /package/dist/assets/{ruby-B9qrycrI.js → ruby-e8Zeo08a.js} +0 -0
  551. /package/dist/assets/{runs-B8nVipXz.js → runs-0Fl_whti.js} +0 -0
  552. /package/dist/assets/{sas-Cd7L1ZOe.js → sas-CtNe7N_s.js} +0 -0
  553. /package/dist/assets/{scheme-L6Kva-Kc.js → scheme-D7VUNgy0.js} +0 -0
  554. /package/dist/assets/{secrets-panel-CVQIJOsr.js → secrets-panel-C51QhQhQ.js} +0 -0
  555. /package/dist/assets/{shell-Ck42V1Kn.js → shell-95QiTNIY.js} +0 -0
  556. /package/dist/assets/{sieve-DfSJcUfS.js → sieve-4wk3Woa7.js} +0 -0
  557. /package/dist/assets/{simple-mode-CfoR0Lvg.js → simple-mode-C1B3ue4E.js} +0 -0
  558. /package/dist/assets/{smalltalk-CT418Iph.js → smalltalk-BFPyGpl7.js} +0 -0
  559. /package/dist/assets/{solr-CDPrSrj5.js → solr-BCnpA4mK.js} +0 -0
  560. /package/dist/assets/{sparql-BlJ_cLEt.js → sparql-BMyoR-t0.js} +0 -0
  561. /package/dist/assets/{spreadsheet-BsJYzkOI.js → spreadsheet-C39QEIvH.js} +0 -0
  562. /package/dist/assets/{sql-F2Gt8FSJ.js → sql-CE9Btgz4.js} +0 -0
  563. /package/dist/assets/{stylus-92qIiGm1.js → stylus-BbMWgEUg.js} +0 -0
  564. /package/dist/assets/{swift-gZzicbJu.js → swift-BCakwsWN.js} +0 -0
  565. /package/dist/assets/{swiper-component-LOm8fzBm.js → swiper-component-DpFUDvyR.js} +0 -0
  566. /package/dist/assets/{tcl-CtgoBYkk.js → tcl-Dupz7YXC.js} +0 -0
  567. /package/dist/assets/{terminal-Bo6pnmSU.js → terminal-RAduwztq.js} +0 -0
  568. /package/dist/assets/{textile-Du3RzJ2D.js → textile-CMQNVB0J.js} +0 -0
  569. /package/dist/assets/{tiddlywiki-BiVbsin5.js → tiddlywiki-CIp8hgce.js} +0 -0
  570. /package/dist/assets/{tiki-BjQr6gnj.js → tiki-C22wqq7_.js} +0 -0
  571. /package/dist/assets/{toml-HcF44TVB.js → toml-CDlujHqn.js} +0 -0
  572. /package/dist/assets/{troff-xbwT4huN.js → troff-Dxr_rPl0.js} +0 -0
  573. /package/dist/assets/{ttcn-cfg-jWDg1i50.js → ttcn-cfg-_MoagO29.js} +0 -0
  574. /package/dist/assets/{ttcn-phKysj_0.js → ttcn-iRE0hZ1i.js} +0 -0
  575. /package/dist/assets/{turtle-CPC48wcy.js → turtle-C00vzWJK.js} +0 -0
  576. /package/dist/assets/{types-C7hjolXC.js → types-l38AsXoI.js} +0 -0
  577. /package/dist/assets/{useInterval-CTStcSBb.js → useInterval-WeprorQN.js} +0 -0
  578. /package/dist/assets/{vb-BTubZ2rB.js → vb-CkVClY4-.js} +0 -0
  579. /package/dist/assets/{vbscript-B52mDFWM.js → vbscript-BAyqwxih.js} +0 -0
  580. /package/dist/assets/{velocity-BO3M1iFD.js → velocity-DizPkX9R.js} +0 -0
  581. /package/dist/assets/{verilog-CBz90JJu.js → verilog-BHLL_Z-1.js} +0 -0
  582. /package/dist/assets/{vhdl-CeQ1lGlV.js → vhdl-kw8S8KSM.js} +0 -0
  583. /package/dist/assets/{web-vitals-BaWpTOd5.js → web-vitals-DEQqQ7mh.js} +0 -0
  584. /package/dist/assets/{webidl-CRtF5pmu.js → webidl-BArrMnhe.js} +0 -0
  585. /package/dist/assets/{ws-CNqquaud.js → ws-B3l5rS71.js} +0 -0
  586. /package/dist/assets/{xquery-CFnbrHav.js → xquery-BVt_izxN.js} +0 -0
  587. /package/dist/assets/{yacas-KIC_JO6M.js → yacas-BFgb66eo.js} +0 -0
  588. /package/dist/assets/{z80-kGpw5_me.js → z80-CLywz-dK.js} +0 -0
@@ -1,4 +1,4 @@
1
- var te;import{o as ze,t as de}from"./chunk-C4rtOYze.js";import"./purify.es-Bwm8T4QC.js";import{a as Be,l as Ve}from"./chunk-NSK5VX7P-bxC5WUDr.js";import{u as We}from"./src-DRYM6eUR.js";import{n as nt}from"./chunk-Y2CYZVJY-Ci6ix4_L.js";import{t as we}from"./src-Be2gSjc_.js";import{H as $e,J as je,K as qe,U as Ze,a as Je,b as Ke,f as Qe,v as ti,w as ei,x as ge,y as ii,z as ri}from"./chunk-I66GZJ75-CgJN5WrL.js";import{t as oi}from"./chunk-3NCLNEKW-D7adDEkj.js";import"./dist-BY5C0xw-.js";import{i as ni,r as ai,t as ce}from"./chunk-4I5QYGJK-Cce-HuZg.js";import{n as ue}from"./chunk-WRU74C26-BU1GwH6E.js";import"./chunk-KEIR6QF5-Dy1GNnFZ.js";import"./chunk-MOZMSUNE-C-RMDvp_.js";import"./chunk-OSBZ3O6U-DEYDoDYT.js";import"./chunk-5JV3BV7I-BEi9dboc.js";import"./chunk-CYSBUYHQ-DAWZpY6r.js";import"./chunk-BIQX33UG-B1y9dy0P.js";import"./chunk-EMLP6XTP-Bj2I2iEi.js";import"./chunk-YOTPTUD7-Nm5N45o4.js";import"./chunk-QBLGF6JB-CBncH5PS.js";import"./chunk-5TONJI2A-C5JJwzzL.js";import"./chunk-5HE753X5-DRFzJ7WN.js";import"./chunk-U6XO7XAA-DWWxQ-OA.js";import"./chunk-JG7HCLWE-BEfUAeKb.js";import"./chunk-CQNSW5MT-BOOyLCfW.js";import"./chunk-R7FJI6CG-DWxNgy5y.js";import"./chunk-5FCAYU7R-BJ04i5uO.js";import{t as si}from"./chunk-JWPE2WC7-C-mBVSJi.js";import{n as hi}from"./mermaid-parser.core-C1pvq6V4.js";import{t as Ce}from"./cytoscape.esm-DMX0DoYf.js";var Le=de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_():typeof define=="function"&&define.amd?define([],_):typeof x=="object"?x.layoutBase=_():C.layoutBase=_()})(x,function(){return(function(C){var _={};function N(p){if(_[p])return _[p].exports;var a=_[p]={i:p,l:!1,exports:{}};return C[p].call(a.exports,a,a.exports,N),a.l=!0,a.exports}return N.m=C,N.c=_,N.i=function(p){return p},N.d=function(p,a,n){N.o(p,a)||Object.defineProperty(p,a,{configurable:!1,enumerable:!0,get:n})},N.n=function(p){var a=p&&p.__esModule?function(){return p.default}:function(){return p};return N.d(a,"a",a),a},N.o=function(p,a){return Object.prototype.hasOwnProperty.call(p,a)},N.p="",N(N.s=28)})([(function(C,_,N){function p(){}p.QUALITY=1,p.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,p.DEFAULT_INCREMENTAL=!1,p.DEFAULT_ANIMATION_ON_LAYOUT=!0,p.DEFAULT_ANIMATION_DURING_LAYOUT=!1,p.DEFAULT_ANIMATION_PERIOD=50,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,p.DEFAULT_GRAPH_MARGIN=15,p.NODE_DIMENSIONS_INCLUDE_LABELS=!1,p.SIMPLE_NODE_SIZE=40,p.SIMPLE_NODE_HALF_SIZE=p.SIMPLE_NODE_SIZE/2,p.EMPTY_COMPOUND_NODE_SIZE=40,p.MIN_EDGE_LENGTH=1,p.WORLD_BOUNDARY=1e6,p.INITIAL_WORLD_BOUNDARY=p.WORLD_BOUNDARY/1e3,p.WORLD_CENTER_X=1200,p.WORLD_CENTER_Y=900,C.exports=p}),(function(C,_,N){var p=N(2),a=N(8),n=N(9);function t(l,i,f){p.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=l,this.target=i}for(var e in t.prototype=Object.create(p.prototype),p)t[e]=p[e];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},t.prototype.getOtherEndInGraph=function(l,i){for(var f=this.getOtherEnd(l),r=i.getGraphManager().getRoot();;){if(f.getOwner()==i)return f;if(f.getOwner()==r)break;f=f.getOwner().getParent()}return null},t.prototype.updateLength=function(){var l=[,,,,];this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=t}),(function(C,_,N){function p(a){this.vGraphObject=a}C.exports=p}),(function(C,_,N){var p=N(2),a=N(10),n=N(13),t=N(0),e=N(16),l=N(5);function i(r,o,d,s){d==null&&s==null&&(s=o),p.call(this,s),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=r,d!=null&&o!=null?this.rect=new n(o.x,o.y,d.width,d.height):this.rect=new n}for(var f in i.prototype=Object.create(p.prototype),p)i[f]=p[f];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(r){this.rect.width=r},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(r){this.rect.height=r},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(r,o){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=o.width,this.rect.height=o.height},i.prototype.setCenter=function(r,o){this.rect.x=r-this.rect.width/2,this.rect.y=o-this.rect.height/2},i.prototype.setLocation=function(r,o){this.rect.x=r,this.rect.y=o},i.prototype.moveBy=function(r,o){this.rect.x+=r,this.rect.y+=o},i.prototype.getEdgeListToNode=function(r){var o=[],d=this;return d.edges.forEach(function(s){if(s.target==r){if(s.source!=d)throw"Incorrect edge source!";o.push(s)}}),o},i.prototype.getEdgesBetween=function(r){var o=[],d=this;return d.edges.forEach(function(s){if(!(s.source==d||s.target==d))throw"Incorrect edge source and/or target";(s.target==r||s.source==r)&&o.push(s)}),o},i.prototype.getNeighborsList=function(){var r=new Set,o=this;return o.edges.forEach(function(d){if(d.source==o)r.add(d.target);else{if(d.target!=o)throw"Incorrect incidency!";r.add(d.source)}}),r},i.prototype.withChildren=function(){var r=new Set,o,d;if(r.add(this),this.child!=null)for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],d=o.withChildren(),d.forEach(function(g){r.add(g)});return r},i.prototype.getNoOfChildren=function(){var r=0,o;if(this.child==null)r=1;else for(var d=this.child.getNodes(),s=0;s<d.length;s++)o=d[s],r+=o.getNoOfChildren();return r==0&&(r=1),r},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){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)},i.prototype.scatter=function(){var r,o,d=-t.INITIAL_WORLD_BOUNDARY,s=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_X+e.nextDouble()*(s-d)+d;var c=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;o=t.WORLD_CENTER_Y+e.nextDouble()*(g-c)+c,this.rect.x=r,this.rect.y=o},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.getRight()-r.getLeft(),d=r.getBottom()-r.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(d+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>d?(this.rect.y-=(this.labelHeight-d)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(d+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(r){var o=this.rect.x;o>t.WORLD_BOUNDARY?o=t.WORLD_BOUNDARY:o<-t.WORLD_BOUNDARY&&(o=-t.WORLD_BOUNDARY);var d=this.rect.y;d>t.WORLD_BOUNDARY?d=t.WORLD_BOUNDARY:d<-t.WORLD_BOUNDARY&&(d=-t.WORLD_BOUNDARY);var s=new l(o,d),c=r.inverseTransformPoint(s);this.setLocation(c.x,c.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=i}),(function(C,_,N){var p=N(0);function a(){}for(var n in p)a[n]=p[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,a.MAX_NODE_DISPLACEMENT=a.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=a}),(function(C,_,N){function p(a,n){a==null&&n==null?(this.x=0,this.y=0):(this.x=a,this.y=n)}p.prototype.getX=function(){return this.x},p.prototype.getY=function(){return this.y},p.prototype.setX=function(a){this.x=a},p.prototype.setY=function(a){this.y=a},p.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},p.prototype.getCopy=function(){return new p(this.x,this.y)},p.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},C.exports=p}),(function(C,_,N){var p=N(2),a=N(10),n=N(0),t=N(7),e=N(3),l=N(1),i=N(13),f=N(12),r=N(11);function o(s,c,g){p.call(this,g),this.estimatedSize=a.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=s,c!=null&&c instanceof t?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}for(var d in o.prototype=Object.create(p.prototype),p)o[d]=p[d];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(s,c,g){if(c==null&&g==null){var m=s;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var T=s;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(c.owner==g.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner==g.owner?(T.source=c,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),c.edges.push(T),g!=c&&g.edges.push(T),T):null}},o.prototype.remove=function(s){var c=s;if(s instanceof e){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=c.edges.slice(),m,T=g.length,A=0;A<T;A++)m=g[A],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var R=this.nodes.indexOf(c);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(s instanceof l){var m=s;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var P=m.source.edges.indexOf(m),S=m.target.edges.indexOf(m);if(!(P>-1&&S>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(P,1),m.target!=m.source&&m.target.edges.splice(S,1);var R=m.source.owner.getEdges().indexOf(m);if(R==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(R,1)}},o.prototype.updateLeftTop=function(){for(var s=a.MAX_VALUE,c=a.MAX_VALUE,g,m,T,A=this.getNodes(),R=A.length,P=0;P<R;P++){var S=A[P];g=S.getTop(),m=S.getLeft(),s>g&&(s=g),c>m&&(c=m)}return s==a.MAX_VALUE?null:(T=A[0].getParent().paddingLeft==null?this.margin:A[0].getParent().paddingLeft,this.left=c-T,this.top=s-T,new f(this.left,this.top))},o.prototype.updateBounds=function(s){for(var c=a.MAX_VALUE,g=-a.MAX_VALUE,m=a.MAX_VALUE,T=-a.MAX_VALUE,A,R,P,S,V,Z=this.nodes,O=Z.length,q=0;q<O;q++){var h=Z[q];s&&h.child!=null&&h.updateBounds(),A=h.getLeft(),R=h.getRight(),P=h.getTop(),S=h.getBottom(),c>A&&(c=A),g<R&&(g=R),m>P&&(m=P),T<S&&(T=S)}var E=new i(c,m,g-c,T-m);c==a.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),V=Z[0].getParent().paddingLeft==null?this.margin:Z[0].getParent().paddingLeft,this.left=E.x-V,this.right=E.x+E.width+V,this.top=E.y-V,this.bottom=E.y+E.height+V},o.calculateBounds=function(s){for(var c=a.MAX_VALUE,g=-a.MAX_VALUE,m=a.MAX_VALUE,T=-a.MAX_VALUE,A,R,P,S,V=s.length,Z=0;Z<V;Z++){var O=s[Z];A=O.getLeft(),R=O.getRight(),P=O.getTop(),S=O.getBottom(),c>A&&(c=A),g<R&&(g=R),m>P&&(m=P),T<S&&(T=S)}return new i(c,m,g-c,T-m)},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var s=0,c=this.nodes,g=c.length,m=0;m<g;m++){var T=c[m];s+=T.calcEstimatedSize()}return s==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=s/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var s=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new r,g=new Set,m=this.nodes[0],T,A;for(m.withChildren().forEach(function(V){c.push(V),g.add(V)});c.length!==0;){m=c.shift(),T=m.getEdges();for(var R=T.length,P=0;P<R;P++)A=T[P].getOtherEndInGraph(m,this),A!=null&&!g.has(A)&&A.withChildren().forEach(function(V){c.push(V),g.add(V)})}if(this.isConnected=!1,g.size>=this.nodes.length){var S=0;g.forEach(function(V){V.owner==s&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},C.exports=o}),(function(C,_,N){var p,a=N(1);function n(t){p=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),l=this.add(t,e);return this.setRootGraph(l),this.rootGraph},n.prototype.add=function(t,e,l,i,f){if(l==null&&i==null&&f==null){if(t==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{f=l,i=e,l=t;var r=i.getOwner(),o=f.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==o)return l.isInterGraph=!1,r.add(l,i,f);if(l.isInterGraph=!0,l.source=i,l.target=f,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},n.prototype.remove=function(t){if(t instanceof p){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(e.getEdges());for(var i,f=l.length,r=0;r<f;r++)i=l[r],e.remove(i);var o=[];o=o.concat(e.getNodes());var d;f=o.length;for(var r=0;r<f;r++)d=o[r],e.remove(d);e==this.rootGraph&&this.setRootGraph(null);var s=this.graphs.indexOf(e);this.graphs.splice(s,1),e.parent=null}else if(t instanceof a){if(i=t,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var s=i.source.edges.indexOf(i);if(i.source.edges.splice(s,1),s=i.target.edges.indexOf(i),i.target.edges.splice(s,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var s=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(s,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),l=e.length,i=0;i<l;i++)t=t.concat(e[i].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var l=0;l<e.length;l++)t=t.concat(e[l].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent??(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var l=t.getOwner(),i;do{if(i=l.getParent(),i==null)break;if(i==e)return!0;if(l=i.getOwner(),l==null)break}while(!0);l=e.getOwner();do{if(i=l.getParent(),i==null)break;if(i==t)return!0;if(l=i.getOwner(),l==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,l,i,f,r=this.getAllEdges(),o=r.length,d=0;d<o;d++){if(t=r[d],e=t.source,l=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=l,e==l){t.lca=e.getOwner();continue}for(i=e.getOwner();t.lca==null;){for(t.targetInLca=l,f=l.getOwner();t.lca==null;){if(f==i){t.lca=f;break}if(f==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=f.getParent(),f=t.targetInLca.getOwner()}if(i==this.rootGraph)break;t.lca??(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var l=t.getOwner();do{if(l==null)break;var i=e.getOwner();do{if(i==null)break;if(i==l)return i;i=i.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},n.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var l,i=t.getNodes(),f=i.length,r=0;r<f;r++)l=i[r],l.inclusionTreeDepth=e,l.child!=null&&this.calcInclusionTreeDepths(l.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],l=this.edges.length,i=0;i<l;i++)t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var i=0;i<e.length;i++)this.remove(e[i]);return!1},C.exports=n}),(function(C,_,N){var p=N(12);function a(){}a.calcSeparationAmount=function(n,t,e,l){if(!n.intersects(t))throw"assert failed";var i=[,,];this.decideDirectionsForOverlappingNodes(n,t,i),e[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),e[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var f=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(f=1);var r=f*e[0],o=e[1]/f;e[0]<o?o=e[0]:r=e[1],e[0]=-1*i[0]*(o/2+l),e[1]=-1*i[1]*(r/2+l)},a.decideDirectionsForOverlappingNodes=function(n,t,e){n.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,n.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},a.getIntersection2=function(n,t,e){var l=n.getCenterX(),i=n.getCenterY(),f=t.getCenterX(),r=t.getCenterY();if(n.intersects(t))return e[0]=l,e[1]=i,e[2]=f,e[3]=r,!0;var o=n.getX(),d=n.getY(),s=n.getRight(),c=n.getX(),g=n.getBottom(),m=n.getRight(),T=n.getWidthHalf(),A=n.getHeightHalf(),R=t.getX(),P=t.getY(),S=t.getRight(),V=t.getX(),Z=t.getBottom(),O=t.getRight(),q=t.getWidthHalf(),h=t.getHeightHalf(),E=!1,u=!1;if(l===f){if(i>r)return e[0]=l,e[1]=d,e[2]=f,e[3]=Z,!1;if(i<r)return e[0]=l,e[1]=g,e[2]=f,e[3]=P,!1}else if(i===r){if(l>f)return e[0]=o,e[1]=i,e[2]=S,e[3]=r,!1;if(l<f)return e[0]=s,e[1]=i,e[2]=R,e[3]=r,!1}else{var y=n.height/n.width,v=t.height/t.width,w=(r-i)/(f-l),L=void 0,b=void 0,G=void 0,F=void 0,H=void 0,W=void 0;if(-y===w?l>f?(e[0]=c,e[1]=g,E=!0):(e[0]=s,e[1]=d,E=!0):y===w&&(l>f?(e[0]=o,e[1]=d,E=!0):(e[0]=m,e[1]=g,E=!0)),-v===w?f>l?(e[2]=V,e[3]=Z,u=!0):(e[2]=S,e[3]=P,u=!0):v===w&&(f>l?(e[2]=R,e[3]=P,u=!0):(e[2]=O,e[3]=Z,u=!0)),E&&u)return!1;if(l>f?i>r?(L=this.getCardinalDirection(y,w,4),b=this.getCardinalDirection(v,w,2)):(L=this.getCardinalDirection(-y,w,3),b=this.getCardinalDirection(-v,w,1)):i>r?(L=this.getCardinalDirection(-y,w,1),b=this.getCardinalDirection(-v,w,3)):(L=this.getCardinalDirection(y,w,2),b=this.getCardinalDirection(v,w,4)),!E)switch(L){case 1:F=d,G=l+-A/w,e[0]=G,e[1]=F;break;case 2:G=m,F=i+T*w,e[0]=G,e[1]=F;break;case 3:F=g,G=l+A/w,e[0]=G,e[1]=F;break;case 4:G=c,F=i+-T*w,e[0]=G,e[1]=F;break}if(!u)switch(b){case 1:W=P,H=f+-h/w,e[2]=H,e[3]=W;break;case 2:H=O,W=r+q*w,e[2]=H,e[3]=W;break;case 3:W=Z,H=f+h/w,e[2]=H,e[3]=W;break;case 4:H=V,W=r+-q*w,e[2]=H,e[3]=W;break}}return!1},a.getCardinalDirection=function(n,t,e){return n>t?e:1+e%4},a.getIntersection=function(n,t,e,l){if(l==null)return this.getIntersection2(n,t,e);var i=n.x,f=n.y,r=t.x,o=t.y,d=e.x,s=e.y,c=l.x,g=l.y,m=void 0,T=void 0,A=void 0,R=void 0,P=void 0,S=void 0,V=void 0,Z=void 0,O=void 0;return A=o-f,P=i-r,V=r*f-i*o,R=g-s,S=d-c,Z=c*s-d*g,O=A*S-R*P,O===0?null:(m=(P*Z-S*V)/O,T=(R*V-A*Z)/O,new p(m,T))},a.angleOfVector=function(n,t,e,l){var i=void 0;return n===e?i=l<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((l-t)/(e-n)),e<n?i+=Math.PI:l<t&&(i+=this.TWO_PI)),i},a.doIntersect=function(n,t,e,l){var i=n.x,f=n.y,r=t.x,o=t.y,d=e.x,s=e.y,c=l.x,g=l.y,m=(r-i)*(g-s)-(c-d)*(o-f);if(m===0)return!1;var T=((g-s)*(c-i)+(d-c)*(g-f))/m,A=((f-o)*(c-i)+(r-i)*(g-f))/m;return 0<T&&T<1&&0<A&&A<1},a.findCircleLineIntersections=function(n,t,e,l,i,f,r){var o=(e-n)*(e-n)+(l-t)*(l-t),d=2*((n-i)*(e-n)+(t-f)*(l-t)),s=(n-i)*(n-i)+(t-f)*(t-f)-r*r;if(d*d-4*o*s>=0){var c=(-d+Math.sqrt(d*d-4*o*s))/(2*o),g=(-d-Math.sqrt(d*d-4*o*s))/(2*o);return c>=0&&c<=1?[c]:g>=0&&g<=1?[g]:null}else return null},a.HALF_PI=.5*Math.PI,a.ONE_AND_HALF_PI=1.5*Math.PI,a.TWO_PI=2*Math.PI,a.THREE_PI=3*Math.PI,C.exports=a}),(function(C,_,N){function p(){}p.sign=function(a){return a>0?1:a<0?-1:0},p.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},p.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},C.exports=p}),(function(C,_,N){function p(){}p.MAX_VALUE=2147483647,p.MIN_VALUE=-2147483648,C.exports=p}),(function(C,_,N){var p=(function(){function l(i,f){for(var r=0;r<f.length;r++){var o=f[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}return function(i,f,r){return f&&l(i.prototype,f),r&&l(i,r),i}})();function a(l,i){if(!(l instanceof i))throw TypeError("Cannot call a class as a function")}var n=function(l){return{value:l,next:null,prev:null}},t=function(l,i,f,r){return l===null?r.head=i:l.next=i,f===null?r.tail=i:f.prev=i,i.prev=l,i.next=f,r.length++,i},e=function(l,i){var f=l.prev,r=l.next;return f===null?i.head=r:f.next=r,r===null?i.tail=f:r.prev=f,l.prev=l.next=null,i.length--,l};C.exports=(function(){function l(i){var f=this;a(this,l),this.length=0,this.head=null,this.tail=null,i==null||i.forEach(function(r){return f.push(r)})}return p(l,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,f){return t(f.prev,n(i),f,this)}},{key:"insertAfter",value:function(i,f){return t(f,n(i),f.next,this)}},{key:"insertNodeBefore",value:function(i,f){return t(f.prev,i,f,this)}},{key:"insertNodeAfter",value:function(i,f){return t(f,i,f.next,this)}},{key:"push",value:function(i){return t(this.tail,n(i),null,this)}},{key:"unshift",value:function(i){return t(null,n(i),this.head,this)}},{key:"remove",value:function(i){return e(i,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var f=1,r=this.head;f<i;)r=r.next,f++;return r.value}}},{key:"set_object_at",value:function(i,f){if(i<=this.length()){for(var r=1,o=this.head;r<i;)o=o.next,r++;o.value=f}}}]),l})()}),(function(C,_,N){function p(a,n,t){this.x=null,this.y=null,a==null&&n==null&&t==null?(this.x=0,this.y=0):typeof a=="number"&&typeof n=="number"&&t==null?(this.x=a,this.y=n):a.constructor.name=="Point"&&n==null&&t==null&&(t=a,this.x=t.x,this.y=t.y)}p.prototype.getX=function(){return this.x},p.prototype.getY=function(){return this.y},p.prototype.getLocation=function(){return new p(this.x,this.y)},p.prototype.setLocation=function(a,n,t){a.constructor.name=="Point"&&n==null&&t==null?(t=a,this.setLocation(t.x,t.y)):typeof a=="number"&&typeof n=="number"&&t==null&&(parseInt(a)==a&&parseInt(n)==n?this.move(a,n):(this.x=Math.floor(a+.5),this.y=Math.floor(n+.5)))},p.prototype.move=function(a,n){this.x=a,this.y=n},p.prototype.translate=function(a,n){this.x+=a,this.y+=n},p.prototype.equals=function(a){if(a.constructor.name=="Point"){var n=a;return this.x==n.x&&this.y==n.y}return this==a},p.prototype.toString=function(){return new p().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=p}),(function(C,_,N){function p(a,n,t,e){this.x=0,this.y=0,this.width=0,this.height=0,a!=null&&n!=null&&t!=null&&e!=null&&(this.x=a,this.y=n,this.width=t,this.height=e)}p.prototype.getX=function(){return this.x},p.prototype.setX=function(a){this.x=a},p.prototype.getY=function(){return this.y},p.prototype.setY=function(a){this.y=a},p.prototype.getWidth=function(){return this.width},p.prototype.setWidth=function(a){this.width=a},p.prototype.getHeight=function(){return this.height},p.prototype.setHeight=function(a){this.height=a},p.prototype.getRight=function(){return this.x+this.width},p.prototype.getBottom=function(){return this.y+this.height},p.prototype.intersects=function(a){return!(this.getRight()<a.x||this.getBottom()<a.y||a.getRight()<this.x||a.getBottom()<this.y)},p.prototype.getCenterX=function(){return this.x+this.width/2},p.prototype.getMinX=function(){return this.getX()},p.prototype.getMaxX=function(){return this.getX()+this.width},p.prototype.getCenterY=function(){return this.y+this.height/2},p.prototype.getMinY=function(){return this.getY()},p.prototype.getMaxY=function(){return this.getY()+this.height},p.prototype.getWidthHalf=function(){return this.width/2},p.prototype.getHeightHalf=function(){return this.height/2},C.exports=p}),(function(C,_,N){var p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function a(){}a.lastID=0,a.createID=function(n){return a.isPrimitive(n)?n:(n.uniqueID==null&&(n.uniqueID=a.getString(),a.lastID++),n.uniqueID)},a.getString=function(n){return n??(n=a.lastID),"Object#"+n},a.isPrimitive=function(n){var t=n===void 0?"undefined":p(n);return n==null||t!="object"&&t!="function"},C.exports=a}),(function(C,_,N){function p(d){if(Array.isArray(d)){for(var s=0,c=Array(d.length);s<d.length;s++)c[s]=d[s];return c}else return Array.from(d)}var a=N(0),n=N(7),t=N(3),e=N(1),l=N(6),i=N(5),f=N(17),r=N(29);function o(d){r.call(this),this.layoutQuality=a.QUALITY,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=a.DEFAULT_INCREMENTAL,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}o.RANDOM_SEED=1,o.prototype=Object.create(r.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var d=new n(this);return this.graphManager=d,d},o.prototype.newGraph=function(d){return new l(null,this.graphManager,d)},o.prototype.newNode=function(d){return new t(this.graphManager,d)},o.prototype.newEdge=function(d){return new e(null,null,d)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d=this.checkLayoutSuccess()?!1:this.layout();return a.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d=this.graphManager.getAllEdges(),s=0;s<d.length;s++)d[s];for(var c=this.graphManager.getRoot().getNodes(),s=0;s<c.length;s++)c[s];this.update(this.graphManager.getRoot())}},o.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof t){var s=d;if(s.getChild()!=null)for(var c=s.getChild().getNodes(),g=0;g<c.length;g++)update(c[g]);s.vGraphObject!=null&&s.vGraphObject.update(s)}else if(d instanceof e){var m=d;m.vGraphObject!=null&&m.vGraphObject.update(m)}else if(d instanceof l){var T=d;T.vGraphObject!=null&&T.vGraphObject.update(T)}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=a.QUALITY,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=a.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(d){if(d==null)this.transform(new i(0,0));else{var s=new f,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){s.setWorldOrgX(d.x),s.setWorldOrgY(d.y),s.setDeviceOrgX(c.x),s.setDeviceOrgY(c.y);for(var g=this.getAllNodes(),m,T=0;T<g.length;T++)m=g[T],m.transform(s)}}},o.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var s,c,g=d.getNodes(),m=0;m<g.length;m++)s=g[m],c=s.getChild(),c==null||c.getNodes().length==0?s.scatter():(this.positionNodesRandomly(c),s.updateBounds())},o.prototype.getFlatForest=function(){for(var d=[],s=!0,c=this.graphManager.getRoot().getNodes(),g=!0,m=0;m<c.length;m++)c[m].getChild()!=null&&(g=!1);if(!g)return d;var T=new Set,A=[],R=new Map,P=[];for(P=P.concat(c);P.length>0&&s;){for(A.push(P[0]);A.length>0&&s;){var S=A[0];A.splice(0,1),T.add(S);for(var V=S.getEdges(),m=0;m<V.length;m++){var Z=V[m].getOtherEnd(S);if(R.get(S)!=Z)if(!T.has(Z))A.push(Z),R.set(Z,S);else{s=!1;break}}}if(!s)d=[];else{var O=[].concat(p(T));d.push(O);for(var m=0;m<O.length;m++){var q=O[m],h=P.indexOf(q);h>-1&&P.splice(h,1)}T=new Set,R=new Map}}return d},o.prototype.createDummyNodesForBendpoints=function(d){for(var s=[],c=d.source,g=this.graphManager.calcLowestCommonAncestor(d.source,d.target),m=0;m<d.bendpoints.length;m++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var A=this.newEdge(null);this.graphManager.add(A,c,T),s.add(T),c=T}var A=this.newEdge(null);return this.graphManager.add(A,c,d.target),this.edgeToDummyNodes.set(d,s),d.isInterGraph()?this.graphManager.remove(d):g.remove(d),s},o.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(p(this.edgeToDummyNodes.keys()),d);for(var s=0;s<d.length;s++){var c=d[s];if(c.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(c),m=0;m<g.length;m++){var T=g[m],A=new i(T.getCenterX(),T.getCenterY()),R=c.bendpoints.get(m);R.x=A.x,R.y=A.y,T.getOwner().remove(T)}this.graphManager.add(c,c.source,c.target)}}},o.transform=function(d,s,c,g){if(c!=null&&g!=null){var m=s;if(d<=50){var T=s/c;m-=(s-T)/50*(50-d)}else{var A=s*g;m+=(A-s)/50*(d-50)}return m}else{var R,P;return d<=50?(R=9*s/500,P=s/10):(R=9*s/50,P=-8*s),R*d+P}},o.findCenterOfTree=function(d){var s=[];s=s.concat(d);var c=[],g=new Map,m=!1,T=null;(s.length==1||s.length==2)&&(m=!0,T=s[0]);for(var A=0;A<s.length;A++){var R=s[A],P=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),P==1&&c.push(R)}var S=[];for(S=S.concat(c);!m;){var V=[];V=V.concat(S),S=[];for(var A=0;A<s.length;A++){var R=s[A],Z=s.indexOf(R);Z>=0&&s.splice(Z,1),R.getNeighborsList().forEach(function(h){if(c.indexOf(h)<0){var E=g.get(h)-1;E==1&&S.push(h),g.set(h,E)}})}c=c.concat(S),(s.length==1||s.length==2)&&(m=!0,T=s[0])}return T},o.prototype.setGraphManager=function(d){this.graphManager=d},C.exports=o}),(function(C,_,N){function p(){}p.seed=1,p.x=0,p.nextDouble=function(){return p.x=Math.sin(p.seed++)*1e4,p.x-Math.floor(p.x)},C.exports=p}),(function(C,_,N){var p=N(5);function a(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(n){this.lworldExtX=n},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(n){this.lworldExtY=n},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},a.prototype.transformX=function(n){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),t},a.prototype.transformY=function(n){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),t},a.prototype.inverseTransformX=function(n){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),t},a.prototype.inverseTransformY=function(n){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),t},a.prototype.inverseTransformPoint=function(n){return new p(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},C.exports=a}),(function(C,_,N){function p(r){if(Array.isArray(r)){for(var o=0,d=Array(r.length);o<r.length;o++)d[o]=r[o];return d}else return Array.from(r)}var a=N(15),n=N(4),t=N(0),e=N(8),l=N(9);function i(){a.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var f in i.prototype=Object.create(a.prototype),a)i[f]=a[f];i.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var r,o,d,s,c,g,m,T=this.getGraphManager().getAllEdges(),A=0;A<T.length;A++)r=T[A],o=r.idealLength,r.isInterGraph&&(s=r.getSource(),c=r.getTarget(),g=r.getSourceInLca().getEstimatedSize(),m=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=g+m-2*t.SIMPLE_NODE_SIZE),d=r.getLca().getInclusionTreeDepth(),r.idealLength+=o*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(s.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*d))},i.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),o,d=0;d<r.length;d++)o=r[d],this.calcSpringForce(o,o.idealLength)},i.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,s,c,g,m=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,d=0;d<m.length;d++)c=m[d],this.calculateRepulsionForceOfANode(c,T,r,o),T.add(c);else for(d=0;d<m.length;d++)for(c=m[d],s=d+1;s<m.length;s++)g=m[s],c.getOwner()==g.getOwner()&&this.calcRepulsionForce(c,g)},i.prototype.calcGravitationalForces=function(){for(var r,o=this.getAllNodesToApplyGravitation(),d=0;d<o.length;d++)r=o[d],this.calcGravitationalForce(r)},i.prototype.moveNodes=function(){for(var r=this.getAllNodes(),o,d=0;d<r.length;d++)o=r[d],o.move()},i.prototype.calcSpringForce=function(r,o){var d=r.getSource(),s=r.getTarget(),c,g,m,T;if(this.uniformLeafNodeSizes&&d.getChild()==null&&s.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;c=r.getLength(),c!=0&&(g=r.edgeElasticity*(c-o),m=g*(r.lengthX/c),T=g*(r.lengthY/c),d.springForceX+=m,d.springForceY+=T,s.springForceX-=m,s.springForceY-=T)},i.prototype.calcRepulsionForce=function(r,o){var d=r.getRect(),s=o.getRect(),c=[,,],g=[,,,,],m,T,A,R,P,S,V;if(d.intersects(s)){e.calcSeparationAmount(d,s,c,n.DEFAULT_EDGE_LENGTH/2),S=2*c[0],V=2*c[1];var Z=r.noOfChildren*o.noOfChildren/(r.noOfChildren+o.noOfChildren);r.repulsionForceX-=Z*S,r.repulsionForceY-=Z*V,o.repulsionForceX+=Z*S,o.repulsionForceY+=Z*V}else this.uniformLeafNodeSizes&&r.getChild()==null&&o.getChild()==null?(m=s.getCenterX()-d.getCenterX(),T=s.getCenterY()-d.getCenterY()):(e.getIntersection(d,s,g),m=g[2]-g[0],T=g[3]-g[1]),Math.abs(m)<n.MIN_REPULSION_DIST&&(m=l.sign(m)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=l.sign(T)*n.MIN_REPULSION_DIST),A=m*m+T*T,R=Math.sqrt(A),P=(r.nodeRepulsion/2+o.nodeRepulsion/2)*r.noOfChildren*o.noOfChildren/A,S=P*m/R,V=P*T/R,r.repulsionForceX-=S,r.repulsionForceY-=V,o.repulsionForceX+=S,o.repulsionForceY+=V},i.prototype.calcGravitationalForce=function(r){var o=r.getOwner(),d=(o.getRight()+o.getLeft())/2,s=(o.getTop()+o.getBottom())/2,c=r.getCenterX()-d,g=r.getCenterY()-s,m=Math.abs(c)+r.getWidth()/2,T=Math.abs(g)+r.getHeight()/2,A;r.getOwner()==this.graphManager.getRoot()?(A=o.getEstimatedSize()*this.gravityRangeFactor,(m>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*c,r.gravitationForceY=-this.gravityConstant*g)):(A=o.getEstimatedSize()*this.compoundGravityRangeFactor,(m>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},i.prototype.isConverged=function(){var r,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||o},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,o=this.graphManager.getAllNodes(),d=0;d<o.length;d++)r=o[d],r.noOfChildren=r.getNoOfChildren()},i.prototype.calcGrid=function(r){var o=0,d=0;o=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var s=Array(o),c=0;c<o;c++)s[c]=Array(d);for(var c=0;c<o;c++)for(var g=0;g<d;g++)s[c][g]=[];return s},i.prototype.addNodeToGrid=function(r,o,d){var s=0,c=0,g=0,m=0;s=parseInt(Math.floor((r.getRect().x-o)/this.repulsionRange)),c=parseInt(Math.floor((r.getRect().width+r.getRect().x-o)/this.repulsionRange)),g=parseInt(Math.floor((r.getRect().y-d)/this.repulsionRange)),m=parseInt(Math.floor((r.getRect().height+r.getRect().y-d)/this.repulsionRange));for(var T=s;T<=c;T++)for(var A=g;A<=m;A++)this.grid[T][A].push(r),r.setGridCoordinates(s,c,g,m)},i.prototype.updateGrid=function(){var r,o,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<d.length;r++)o=d[r],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(r,o,d,s){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&d||s){var c=new Set;r.surrounding=[];for(var g,m=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var A=r.startY-1;A<r.finishY+2;A++)if(!(T<0||A<0||T>=m.length||A>=m[0].length)){for(var R=0;R<m[T][A].length;R++)if(g=m[T][A][R],!(r.getOwner()!=g.getOwner()||r==g)&&!o.has(g)&&!c.has(g)){var P=Math.abs(r.getCenterX()-g.getCenterX())-(r.getWidth()/2+g.getWidth()/2),S=Math.abs(r.getCenterY()-g.getCenterY())-(r.getHeight()/2+g.getHeight()/2);P<=this.repulsionRange&&S<=this.repulsionRange&&c.add(g)}}r.surrounding=[].concat(p(c))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},i.prototype.calcRepulsionRange=function(){return 0},C.exports=i}),(function(C,_,N){var p=N(1),a=N(4);function n(e,l,i){p.call(this,e,l,i),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(var t in n.prototype=Object.create(p.prototype),p)n[t]=p[t];C.exports=n}),(function(C,_,N){var p=N(3),a=N(4);function n(e,l,i,f){p.call(this,e,l,i,f),this.nodeRepulsion=a.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=[]}for(var t in n.prototype=Object.create(p.prototype),p)n[t]=p[t];n.prototype.setGridCoordinates=function(e,l,i,f){this.startX=e,this.finishX=l,this.startY=i,this.finishY=f},C.exports=n}),(function(C,_,N){function p(a,n){this.width=0,this.height=0,a!==null&&n!==null&&(this.height=n,this.width=a)}p.prototype.getWidth=function(){return this.width},p.prototype.setWidth=function(a){this.width=a},p.prototype.getHeight=function(){return this.height},p.prototype.setHeight=function(a){this.height=a},C.exports=p}),(function(C,_,N){var p=N(14);function a(){this.map={},this.keys=[]}a.prototype.put=function(n,t){var e=p.createID(n);this.contains(e)||(this.map[e]=t,this.keys.push(n))},a.prototype.contains=function(n){return p.createID(n),this.map[n]!=null},a.prototype.get=function(n){var t=p.createID(n);return this.map[t]},a.prototype.keySet=function(){return this.keys},C.exports=a}),(function(C,_,N){var p=N(14);function a(){this.set={}}a.prototype.add=function(n){var t=p.createID(n);this.contains(t)||(this.set[t]=n)},a.prototype.remove=function(n){delete this.set[p.createID(n)]},a.prototype.clear=function(){this.set={}},a.prototype.contains=function(n){return this.set[p.createID(n)]==n},a.prototype.isEmpty=function(){return this.size()===0},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),e=t.length,l=0;l<e;l++)n.push(this.set[t[l]])},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAll=function(n){for(var t=n.length,e=0;e<t;e++){var l=n[e];this.add(l)}},C.exports=a}),(function(C,_,N){function p(){}p.multMat=function(a,n){for(var t=[],e=0;e<a.length;e++){t[e]=[];for(var l=0;l<n[0].length;l++){t[e][l]=0;for(var i=0;i<a[0].length;i++)t[e][l]+=a[e][i]*n[i][l]}}return t},p.transpose=function(a){for(var n=[],t=0;t<a[0].length;t++){n[t]=[];for(var e=0;e<a.length;e++)n[t][e]=a[e][t]}return n},p.multCons=function(a,n){for(var t=[],e=0;e<a.length;e++)t[e]=a[e]*n;return t},p.minusOp=function(a,n){for(var t=[],e=0;e<a.length;e++)t[e]=a[e]-n[e];return t},p.dotProduct=function(a,n){for(var t=0,e=0;e<a.length;e++)t+=a[e]*n[e];return t},p.mag=function(a){return Math.sqrt(this.dotProduct(a,a))},p.normalize=function(a){for(var n=[],t=this.mag(a),e=0;e<a.length;e++)n[e]=a[e]/t;return n},p.multGamma=function(a){for(var n=[],t=0,e=0;e<a.length;e++)t+=a[e];t*=-1/a.length;for(var l=0;l<a.length;l++)n[l]=t+a[l];return n},p.multL=function(a,n,t){for(var e=[],l=[],i=[],f=0;f<n[0].length;f++){for(var r=0,o=0;o<n.length;o++)r+=-.5*n[o][f]*a[o];l[f]=r}for(var d=0;d<t.length;d++){for(var s=0,c=0;c<t.length;c++)s+=t[d][c]*l[c];i[d]=s}for(var g=0;g<n.length;g++){for(var m=0,T=0;T<n[0].length;T++)m+=n[g][T]*i[T];e[g]=m}return e},C.exports=p}),(function(C,_,N){var p=(function(){function t(e,l){for(var i=0;i<l.length;i++){var f=l[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}return function(e,l,i){return l&&t(e.prototype,l),i&&t(e,i),e}})();function a(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}var n=N(11);C.exports=(function(){function t(e,l){a(this,t),(l!==null||l!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=e instanceof n?e.size():e.length,this._quicksort(e,0,i-1)}return p(t,[{key:"_quicksort",value:function(e,l,i){if(l<i){var f=this._partition(e,l,i);this._quicksort(e,l,f),this._quicksort(e,f+1,i)}}},{key:"_partition",value:function(e,l,i){for(var f=this._get(e,l),r=l,o=i;;){for(;this.compareFunction(f,this._get(e,o));)o--;for(;this.compareFunction(this._get(e,r),f);)r++;if(r<o)this._swap(e,r,o),r++,o--;else return o}}},{key:"_get",value:function(e,l){return e instanceof n?e.get_object_at(l):e[l]}},{key:"_set",value:function(e,l,i){e instanceof n?e.set_object_at(l,i):e[l]=i}},{key:"_swap",value:function(e,l,i){var f=this._get(e,l);this._set(e,l,this._get(e,i)),this._set(e,i,f)}},{key:"_defaultCompareFunction",value:function(e,l){return l>e}}]),t})()}),(function(C,_,N){function p(){}p.svd=function(a){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=a.length,this.n=a[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.m,n]),this.V=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.n,this.n]);for(var t=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.n),e=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.m),l=!0,i=!0,f=Math.min(this.m-1,this.n),r=Math.max(0,Math.min(this.n-2,this.m)),o=0;o<Math.max(f,r);o++){if(o<f){this.s[o]=0;for(var d=o;d<this.m;d++)this.s[o]=p.hypot(this.s[o],a[d][o]);if(this.s[o]!==0){a[o][o]<0&&(this.s[o]=-this.s[o]);for(var s=o;s<this.m;s++)a[s][o]/=this.s[o];a[o][o]+=1}this.s[o]=-this.s[o]}for(var c=o+1;c<this.n;c++){if((function(Tt,Nt){return Tt&&Nt})(o<f,this.s[o]!==0)){for(var g=0,m=o;m<this.m;m++)g+=a[m][o]*a[m][c];g=-g/a[o][o];for(var T=o;T<this.m;T++)a[T][c]+=g*a[T][o]}t[c]=a[o][c]}if((function(Tt,Nt){return Tt&&Nt})(l,o<f))for(var A=o;A<this.m;A++)this.U[A][o]=a[A][o];if(o<r){t[o]=0;for(var R=o+1;R<this.n;R++)t[o]=p.hypot(t[o],t[R]);if(t[o]!==0){t[o+1]<0&&(t[o]=-t[o]);for(var P=o+1;P<this.n;P++)t[P]/=t[o];t[o+1]+=1}if(t[o]=-t[o],(function(Tt,Nt){return Tt&&Nt})(o+1<this.m,t[o]!==0)){for(var S=o+1;S<this.m;S++)e[S]=0;for(var V=o+1;V<this.n;V++)for(var Z=o+1;Z<this.m;Z++)e[Z]+=t[V]*a[Z][V];for(var O=o+1;O<this.n;O++)for(var q=-t[O]/t[o+1],h=o+1;h<this.m;h++)a[h][O]+=q*e[h]}if(i)for(var E=o+1;E<this.n;E++)this.V[E][o]=t[E]}}var u=Math.min(this.n,this.m+1);if(f<this.n&&(this.s[f]=a[f][f]),this.m<u&&(this.s[u-1]=0),r+1<u&&(t[r]=a[r][u-1]),t[u-1]=0,l){for(var y=f;y<n;y++){for(var v=0;v<this.m;v++)this.U[v][y]=0;this.U[y][y]=1}for(var w=f-1;w>=0;w--)if(this.s[w]!==0){for(var L=w+1;L<n;L++){for(var b=0,G=w;G<this.m;G++)b+=this.U[G][w]*this.U[G][L];b=-b/this.U[w][w];for(var F=w;F<this.m;F++)this.U[F][L]+=b*this.U[F][w]}for(var H=w;H<this.m;H++)this.U[H][w]=-this.U[H][w];this.U[w][w]=1+this.U[w][w];for(var W=0;W<w-1;W++)this.U[W][w]=0}else{for(var K=0;K<this.m;K++)this.U[K][w]=0;this.U[w][w]=1}}if(i)for(var k=this.n-1;k>=0;k--){if((function(Tt,Nt){return Tt&&Nt})(k<r,t[k]!==0))for(var X=k+1;X<n;X++){for(var D=0,z=k+1;z<this.n;z++)D+=this.V[z][k]*this.V[z][X];D=-D/this.V[k+1][k];for(var et=k+1;et<this.n;et++)this.V[et][X]+=D*this.V[et][k]}for(var U=0;U<this.n;U++)this.V[U][k]=0;this.V[k][k]=1}for(var B=u-1,dt=0,st=2**-52,Ct=2**-966;u>0;){var $=void 0,pt=void 0;for($=u-2;$>=-1&&$!==-1;$--)if(Math.abs(t[$])<=Ct+st*(Math.abs(this.s[$])+Math.abs(this.s[$+1]))){t[$]=0;break}if($===u-2)pt=4;else{var vt=void 0;for(vt=u-1;vt>=$&&vt!==$;vt--){var Bt=(vt===u?0:Math.abs(t[vt]))+(vt===$+1?0:Math.abs(t[vt-1]));if(Math.abs(this.s[vt])<=Ct+st*Bt){this.s[vt]=0;break}}vt===$?pt=3:vt===u-1?pt=1:(pt=2,$=vt)}switch($++,pt){case 1:var Yt=t[u-2];t[u-2]=0;for(var Mt=u-2;Mt>=$;Mt--){var _t=p.hypot(this.s[Mt],Yt),Ht=this.s[Mt]/_t,Ut=Yt/_t;if(this.s[Mt]=_t,Mt!==$&&(Yt=-Ut*t[Mt-1],t[Mt-1]=Ht*t[Mt-1]),i)for(var Rt=0;Rt<this.n;Rt++)_t=Ht*this.V[Rt][Mt]+Ut*this.V[Rt][u-1],this.V[Rt][u-1]=-Ut*this.V[Rt][Mt]+Ht*this.V[Rt][u-1],this.V[Rt][Mt]=_t}break;case 2:var Vt=t[$-1];t[$-1]=0;for(var Gt=$;Gt<u;Gt++){var ht=p.hypot(this.s[Gt],Vt),ot=this.s[Gt]/ht,ct=Vt/ht;if(this.s[Gt]=ht,Vt=-ct*t[Gt],t[Gt]=ot*t[Gt],l)for(var M=0;M<this.m;M++)ht=ot*this.U[M][Gt]+ct*this.U[M][$-1],this.U[M][$-1]=-ct*this.U[M][Gt]+ot*this.U[M][$-1],this.U[M][Gt]=ht}break;case 3:var Y=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[$])),Math.abs(t[$])),J=this.s[u-1]/Y,j=this.s[u-2]/Y,tt=t[u-2]/Y,Et=this.s[$]/Y,yt=t[$]/Y,it=((j+J)*(j-J)+tt*tt)/2,ft=J*tt*(J*tt),It=0;(function(Tt,Nt){return Tt||Nt})(it!==0,ft!==0)&&(It=Math.sqrt(it*it+ft),it<0&&(It=-It),It=ft/(it+It));for(var Lt=(Et+J)*(Et-J)+It,mt=Et*yt,lt=$;lt<u-1;lt++){var gt=p.hypot(Lt,mt),Q=Lt/gt,ut=mt/gt;if(lt!==$&&(t[lt-1]=gt),Lt=Q*this.s[lt]+ut*t[lt],t[lt]=Q*t[lt]-ut*this.s[lt],mt=ut*this.s[lt+1],this.s[lt+1]=Q*this.s[lt+1],i)for(var At=0;At<this.n;At++)gt=Q*this.V[At][lt]+ut*this.V[At][lt+1],this.V[At][lt+1]=-ut*this.V[At][lt]+Q*this.V[At][lt+1],this.V[At][lt]=gt;if(gt=p.hypot(Lt,mt),Q=Lt/gt,ut=mt/gt,this.s[lt]=gt,Lt=Q*t[lt]+ut*this.s[lt+1],this.s[lt+1]=-ut*t[lt]+Q*this.s[lt+1],mt=ut*t[lt+1],t[lt+1]=Q*t[lt+1],l&&lt<this.m-1)for(var rt=0;rt<this.m;rt++)gt=Q*this.U[rt][lt]+ut*this.U[rt][lt+1],this.U[rt][lt+1]=-ut*this.U[rt][lt]+Q*this.U[rt][lt+1],this.U[rt][lt]=gt}t[u-2]=Lt,dt+=1;break;case 4:if(this.s[$]<=0&&(this.s[$]=this.s[$]<0?-this.s[$]:0,i))for(var bt=0;bt<=B;bt++)this.V[bt][$]=-this.V[bt][$];for(;$<B&&!(this.s[$]>=this.s[$+1]);){var Ot=this.s[$];if(this.s[$]=this.s[$+1],this.s[$+1]=Ot,i&&$<this.n-1)for(var Dt=0;Dt<this.n;Dt++)Ot=this.V[Dt][$+1],this.V[Dt][$+1]=this.V[Dt][$],this.V[Dt][$]=Ot;if(l&&$<this.m-1)for(var Ft=0;Ft<this.m;Ft++)Ot=this.U[Ft][$+1],this.U[Ft][$+1]=this.U[Ft][$],this.U[Ft][$]=Ot;$++}dt=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},p.hypot=function(a,n){var t=void 0;return Math.abs(a)>Math.abs(n)?(t=n/a,t=Math.abs(a)*Math.sqrt(1+t*t)):n==0?t=0:(t=a/n,t=Math.abs(n)*Math.sqrt(1+t*t)),t},C.exports=p}),(function(C,_,N){var p=(function(){function n(t,e){for(var l=0;l<e.length;l++){var i=e[l];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,l){return e&&n(t.prototype,e),l&&n(t,l),t}})();function a(n,t){if(!(n instanceof t))throw TypeError("Cannot call a class as a function")}C.exports=(function(){function n(t,e){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,n),this.sequence1=t,this.sequence2=e,this.match_score=l,this.mismatch_penalty=i,this.gap_penalty=f,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=Array(this.iMax);for(var r=0;r<this.iMax;r++){this.grid[r]=Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[r][o]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var s=0;s<this.jMax;s++)this.tracebackGrid[d][s]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return p(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var l=1;l<this.iMax;l++)for(var i=1;i<this.jMax;i++){var f=void 0;f=this.sequence1[l-1]===this.sequence2[i-1]?this.grid[l-1][i-1]+this.match_score:this.grid[l-1][i-1]+this.mismatch_penalty;var r=this.grid[l-1][i]+this.gap_penalty,o=this.grid[l][i-1]+this.gap_penalty,d=[f,r,o],s=this.arrayAllMaxIndexes(d);this.grid[l][i]=d[s[0]],this.tracebackGrid[l][i]=[s.includes(0),s.includes(1),s.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],l=this.tracebackGrid[e.pos[0]][e.pos[1]];l[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),l[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),l[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var l=[],i=-1;(i=t.indexOf(e,i+1))!==-1;)l.push(i);return l}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),n})()}),(function(C,_,N){var p=function(){};p.FDLayout=N(18),p.FDLayoutConstants=N(4),p.FDLayoutEdge=N(19),p.FDLayoutNode=N(20),p.DimensionD=N(21),p.HashMap=N(22),p.HashSet=N(23),p.IGeometry=N(8),p.IMath=N(9),p.Integer=N(10),p.Point=N(12),p.PointD=N(5),p.RandomSeed=N(16),p.RectangleD=N(13),p.Transform=N(17),p.UniqueIDGeneretor=N(14),p.Quicksort=N(25),p.LinkedList=N(11),p.LGraphObject=N(2),p.LGraph=N(6),p.LEdge=N(1),p.LGraphManager=N(7),p.LNode=N(3),p.Layout=N(15),p.LayoutConstants=N(0),p.NeedlemanWunsch=N(27),p.Matrix=N(24),p.SVD=N(26),C.exports=p}),(function(C,_,N){function p(){this.listeners=[]}var a=p.prototype;a.addListener=function(n,t){this.listeners.push({event:n,callback:t})},a.removeListener=function(n,t){for(var e=this.listeners.length;e>=0;e--){var l=this.listeners[e];l.event===n&&l.callback===t&&this.listeners.splice(e,1)}},a.emit=function(n,t){for(var e=0;e<this.listeners.length;e++){var l=this.listeners[e];n===l.event&&l.callback(t)}},C.exports=p})])})})),Ie=de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_(Le()):typeof define=="function"&&define.amd?define(["layout-base"],_):typeof x=="object"?x.coseBase=_(Le()):C.coseBase=_(C.layoutBase)})(x,function(C){return(()=>{var _={45:((a,n,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),a.exports=e}),806:((a,n,t)=>{var e=t(551).FDLayoutConstants;function l(){}for(var i in e)l[i]=e[i];l.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,l.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,l.DEFAULT_COMPONENT_SEPERATION=60,l.TILE=!0,l.TILING_PADDING_VERTICAL=10,l.TILING_PADDING_HORIZONTAL=10,l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0,l.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,l.TREE_REDUCTION_ON_INCREMENTAL=!0,l.PURE_INCREMENTAL=l.DEFAULT_INCREMENTAL,a.exports=l}),767:((a,n,t)=>{var e=t(551).FDLayoutEdge;function l(f,r,o){e.call(this,f,r,o)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),880:((a,n,t)=>{var e=t(551).LGraph;function l(f,r,o){e.call(this,f,r,o)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),578:((a,n,t)=>{var e=t(551).LGraphManager;function l(f){e.call(this,f)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),765:((a,n,t)=>{var e=t(551).FDLayout,l=t(578),i=t(880),f=t(991),r=t(767),o=t(806),d=t(902),s=t(551).FDLayoutConstants,c=t(551).LayoutConstants,g=t(551).Point,m=t(551).PointD,T=t(551).DimensionD,A=t(551).Layout,R=t(551).Integer,P=t(551).IGeometry,S=t(551).LGraph,V=t(551).Transform,Z=t(551).LinkedList;function O(){e.call(this),this.toBeTiled={},this.constraints={}}for(var q in O.prototype=Object.create(e.prototype),e)O[q]=e[q];O.prototype.newGraphManager=function(){var h=new l(this);return this.graphManager=h,h},O.prototype.newGraph=function(h){return new i(null,this.graphManager,h)},O.prototype.newNode=function(h){return new f(this.graphManager,h)},O.prototype.newEdge=function(h){return new r(null,null,h)},O.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},O.prototype.initSpringEmbedder=function(){e.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},O.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},O.prototype.classicLayout=function(){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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return h.has(y)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var u=this.getFlatForest();if(u.length>0)this.positionNodesRadially(u);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(w){return h.has(w)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(d.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},O.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return h.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},O.prototype.getPositionsData=function(){for(var h=this.graphManager.getAllNodes(),E={},u=0;u<h.length;u++){var y=h[u].rect,v=h[u].id;E[v]={id:v,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},O.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(s.ANIMATE==="during")this.emit("layoutstarted");else{for(;!h;)h=this.tick();this.graphManager.updateBounds()}},O.prototype.moveNodes=function(){for(var h=this.getAllNodes(),E,u=0;u<h.length;u++)E=h[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<h.length;u++)E=h[u],E.move()},O.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var y=E[u];this.idToNodeMap.set(y.id,y)}var v=function D(z){for(var et=z.getChild().getNodes(),U,B=0,dt=0;dt<et.length;dt++)U=et[dt],U.getChild()==null?h.fixedNodeSet.has(U.id)&&(B+=100):B+=D(U);return B};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(D){h.fixedNodeSet.add(D.nodeId)});for(var E=this.graphManager.getAllNodes(),y,u=0;u<E.length;u++)if(y=E[u],y.getChild()!=null){var w=v(y);w>0&&(y.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var L=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){h.fixedNodesOnHorizontal.add(D),h.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(z){L.set(z,"dummy"+u),h.dummyToNodeForVerticalAlignment.get("dummy"+u).push(z),h.fixedNodeSet.has(z)&&h.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,u=0;u<F.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),F[u].forEach(function(z){b.set(z,"dummy"+u),h.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(z),h.fixedNodeSet.has(z)&&h.fixedNodesOnVertical.add("dummy"+u)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var z,et,U;for(U=D.length-1;U>=2*D.length/3;U--)z=Math.floor(Math.random()*(U+1)),et=D[U],D[U]=D[z],D[z]=et;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var z=L.has(D.left)?L.get(D.left):D.left,et=L.has(D.right)?L.get(D.right):D.right;h.nodesInRelativeHorizontal.includes(z)||(h.nodesInRelativeHorizontal.push(z),h.nodeToRelativeConstraintMapHorizontal.set(z,[]),h.dummyToNodeForVerticalAlignment.has(z)?h.nodeToTempPositionMapHorizontal.set(z,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(z)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(z,h.idToNodeMap.get(z).getCenterX())),h.nodesInRelativeHorizontal.includes(et)||(h.nodesInRelativeHorizontal.push(et),h.nodeToRelativeConstraintMapHorizontal.set(et,[]),h.dummyToNodeForVerticalAlignment.has(et)?h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(et).getCenterX())),h.nodeToRelativeConstraintMapHorizontal.get(z).push({right:et,gap:D.gap}),h.nodeToRelativeConstraintMapHorizontal.get(et).push({left:z,gap:D.gap})}else{var U=b.has(D.top)?b.get(D.top):D.top,B=b.has(D.bottom)?b.get(D.bottom):D.bottom;h.nodesInRelativeVertical.includes(U)||(h.nodesInRelativeVertical.push(U),h.nodeToRelativeConstraintMapVertical.set(U,[]),h.dummyToNodeForHorizontalAlignment.has(U)?h.nodeToTempPositionMapVertical.set(U,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(U)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(U,h.idToNodeMap.get(U).getCenterY())),h.nodesInRelativeVertical.includes(B)||(h.nodesInRelativeVertical.push(B),h.nodeToRelativeConstraintMapVertical.set(B,[]),h.dummyToNodeForHorizontalAlignment.has(B)?h.nodeToTempPositionMapVertical.set(B,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(B)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(B,h.idToNodeMap.get(B).getCenterY())),h.nodeToRelativeConstraintMapVertical.get(U).push({bottom:B,gap:D.gap}),h.nodeToRelativeConstraintMapVertical.get(B).push({top:U,gap:D.gap})}});else{var H=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var z=L.has(D.left)?L.get(D.left):D.left,et=L.has(D.right)?L.get(D.right):D.right;H.has(z)?H.get(z).push(et):H.set(z,[et]),H.has(et)?H.get(et).push(z):H.set(et,[z])}else{var U=b.has(D.top)?b.get(D.top):D.top,B=b.has(D.bottom)?b.get(D.bottom):D.bottom;W.has(U)?W.get(U).push(B):W.set(U,[B]),W.has(B)?W.get(B).push(U):W.set(B,[U])}});var K=function(D,z){var et=[],U=[],B=new Z,dt=new Set,st=0;return D.forEach(function(Ct,$){if(!dt.has($)){et[st]=[],U[st]=!1;var pt=$;for(B.push(pt),dt.add(pt),et[st].push(pt);B.length!=0;)pt=B.shift(),z.has(pt)&&(U[st]=!0),D.get(pt).forEach(function(vt){dt.has(vt)||(B.push(vt),dt.add(vt),et[st].push(vt))});st++}}),{components:et,isFixed:U}},k=K(H,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=k.components,this.fixedComponentsOnHorizontal=k.isFixed;var X=K(W,h.fixedNodesOnVertical);this.componentsOnVertical=X.components,this.fixedComponentsOnVertical=X.isFixed}}},O.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(X){var D=h.idToNodeMap.get(X.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var y=0,v=0;v<E[u].length;v++){if(this.fixedNodeSet.has(E[u][v])){y=0;break}y+=this.idToNodeMap.get(E[u][v]).displacementX}for(var w=y/E[u].length,v=0;v<E[u].length;v++)this.idToNodeMap.get(E[u][v]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal)for(var L=this.constraints.alignmentConstraint.horizontal,u=0;u<L.length;u++){for(var b=0,v=0;v<L[u].length;v++){if(this.fixedNodeSet.has(L[u][v])){b=0;break}b+=this.idToNodeMap.get(L[u][v]).displacementY}for(var G=b/L[u].length,v=0;v<L[u].length;v++)this.idToNodeMap.get(L[u][v]).displacementY=G}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(X){if(!h.fixedNodesOnHorizontal.has(X)){var D=0;D=h.dummyToNodeForVerticalAlignment.has(X)?h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(X)[0]).displacementX:h.idToNodeMap.get(X).displacementX,h.nodeToRelativeConstraintMapHorizontal.get(X).forEach(function(z){if(z.right){var et=h.nodeToTempPositionMapHorizontal.get(z.right)-h.nodeToTempPositionMapHorizontal.get(X)-D;et<z.gap&&(D-=z.gap-et)}else{var et=h.nodeToTempPositionMapHorizontal.get(X)-h.nodeToTempPositionMapHorizontal.get(z.left)+D;et<z.gap&&(D+=z.gap-et)}}),h.nodeToTempPositionMapHorizontal.set(X,h.nodeToTempPositionMapHorizontal.get(X)+D),h.dummyToNodeForVerticalAlignment.has(X)?h.dummyToNodeForVerticalAlignment.get(X).forEach(function(z){h.idToNodeMap.get(z).displacementX=D}):h.idToNodeMap.get(X).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(X){if(!h.fixedNodesOnHorizontal.has(X)){var D=0;D=h.dummyToNodeForHorizontalAlignment.has(X)?h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(X)[0]).displacementY:h.idToNodeMap.get(X).displacementY,h.nodeToRelativeConstraintMapVertical.get(X).forEach(function(z){if(z.bottom){var et=h.nodeToTempPositionMapVertical.get(z.bottom)-h.nodeToTempPositionMapVertical.get(X)-D;et<z.gap&&(D-=z.gap-et)}else{var et=h.nodeToTempPositionMapVertical.get(X)-h.nodeToTempPositionMapVertical.get(z.top)+D;et<z.gap&&(D+=z.gap-et)}}),h.nodeToTempPositionMapVertical.set(X,h.nodeToTempPositionMapVertical.get(X)+D),h.dummyToNodeForHorizontalAlignment.has(X)?h.dummyToNodeForHorizontalAlignment.get(X).forEach(function(z){h.idToNodeMap.get(z).displacementY=D}):h.idToNodeMap.get(X).displacementY=D}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var F=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.has(F[v])?this.dummyToNodeForVerticalAlignment.get(F[v]).forEach(function(z){h.idToNodeMap.get(z).displacementX=0}):this.idToNodeMap.get(F[v]).displacementX=0;else{for(var H=0,W=0,v=0;v<F.length;v++)if(this.dummyToNodeForVerticalAlignment.has(F[v])){var K=this.dummyToNodeForVerticalAlignment.get(F[v]);H+=K.length*this.idToNodeMap.get(K[0]).displacementX,W+=K.length}else H+=this.idToNodeMap.get(F[v]).displacementX,W++;for(var k=H/W,v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.has(F[v])?this.dummyToNodeForVerticalAlignment.get(F[v]).forEach(function(z){h.idToNodeMap.get(z).displacementX=k}):this.idToNodeMap.get(F[v]).displacementX=k}}for(var u=0;u<this.componentsOnVertical.length;u++){var F=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var v=0;v<F.length;v++)this.dummyToNodeForHorizontalAlignment.has(F[v])?this.dummyToNodeForHorizontalAlignment.get(F[v]).forEach(function(et){h.idToNodeMap.get(et).displacementY=0}):this.idToNodeMap.get(F[v]).displacementY=0;else{for(var H=0,W=0,v=0;v<F.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(F[v])){var K=this.dummyToNodeForHorizontalAlignment.get(F[v]);H+=K.length*this.idToNodeMap.get(K[0]).displacementY,W+=K.length}else H+=this.idToNodeMap.get(F[v]).displacementY,W++;for(var k=H/W,v=0;v<F.length;v++)this.dummyToNodeForHorizontalAlignment.has(F[v])?this.dummyToNodeForHorizontalAlignment.get(F[v]).forEach(function(U){h.idToNodeMap.get(U).displacementY=k}):this.idToNodeMap.get(F[v]).displacementY=k}}}},O.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],E,u=this.graphManager.getGraphs(),y=u.length,v;for(v=0;v<y;v++)E=u[v],E.updateConnected(),E.isConnected||(h=h.concat(E.getNodes()));return h},O.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<h.length;u++){var y=h[u];if(!E.has(y)){var v=y.getSource(),w=y.getTarget();if(v==w)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),E.add(y);else{var L=[];if(L=L.concat(v.getEdgeListToNode(w)),L=L.concat(w.getEdgeListToNode(v)),!E.has(L[0])){if(L.length>1){var b;for(b=0;b<L.length;b++){var G=L[b];G.getBendpoints().push(new m),this.createDummyNodesForBendpoints(G)}}L.forEach(function(F){E.add(F)})}}}if(E.size==h.length)break}},O.prototype.positionNodesRadially=function(h){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(h.length)),y=0,v=0,w=0,L=new m(0,0),b=0;b<h.length;b++){b%u==0&&(w=0,v=y,b!=0&&(v+=o.DEFAULT_COMPONENT_SEPERATION),y=0);var G=h[b],F=A.findCenterOfTree(G);E.x=w,E.y=v,L=O.radialLayout(G,F,E),L.y>y&&(y=Math.floor(L.y)),w=Math.floor(L.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(c.WORLD_CENTER_X-L.x/2,c.WORLD_CENTER_Y-L.y/2))},O.radialLayout=function(h,E,u){var y=Math.max(this.maxDiagonalInTree(h),o.DEFAULT_RADIAL_SEPARATION);O.branchRadialLayout(E,null,0,359,0,y);var v=S.calculateBounds(h),w=new V;w.setDeviceOrgX(v.getMinX()),w.setDeviceOrgY(v.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var L=0;L<h.length;L++)h[L].transform(w);var b=new m(v.getMaxX(),v.getMaxY());return w.inverseTransformPoint(b)},O.branchRadialLayout=function(h,E,u,y,v,w){var L=(y-u+1)/2;L<0&&(L+=180);var b=(L+u)%360*P.TWO_PI/360,G=v*Math.cos(b),F=v*Math.sin(b);h.setCenter(G,F);var H=[];H=H.concat(h.getEdges());var W=H.length;E!=null&&W--;for(var K=0,k=H.length,X,D=h.getEdgesBetween(E);D.length>1;){var z=D[0];D.splice(0,1);var et=H.indexOf(z);et>=0&&H.splice(et,1),k--,W--}X=E==null?0:(H.indexOf(D[0])+1)%k;for(var U=Math.abs(y-u)/W,B=X;K!=W;B=++B%k){var dt=H[B].getOtherEnd(h);if(dt!=E){var st=(u+K*U)%360,Ct=(st+U)%360;O.branchRadialLayout(dt,h,st,Ct,v+w,w),K++}}},O.maxDiagonalInTree=function(h){for(var E=R.MIN_VALUE,u=0;u<h.length;u++){var y=h[u].getDiagonal();y>E&&(E=y)}return E},O.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},O.prototype.groupZeroDegreeMembers=function(){var h=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),v=0;v<y.length;v++){var w=y[v],L=w.getParent();this.getNodeDegreeWithChildren(w)===0&&(L.id==null||!this.getToBeTiled(L))&&u.push(w)}for(var v=0;v<u.length;v++){var w=u[v],b=w.getParent().id;E[b]===void 0&&(E[b]=[]),E[b]=E[b].concat(w)}Object.keys(E).forEach(function(G){if(E[G].length>1){var F="DummyCompound_"+G;h.memberGroups[F]=E[G];var H=E[G][0].getParent(),W=new f(h.graphManager);W.id=F,W.paddingLeft=H.paddingLeft||0,W.paddingRight=H.paddingRight||0,W.paddingBottom=H.paddingBottom||0,W.paddingTop=H.paddingTop||0,h.idToDummyNode[F]=W;var K=h.getGraphManager().add(h.newGraph(),W),k=H.getChild();k.add(W);for(var X=0;X<E[G].length;X++){var D=E[G][X];k.remove(D),K.add(D)}}})},O.prototype.clearCompounds=function(){var h={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],h[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,E)},O.prototype.clearZeroDegreeMembers=function(){var h=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=h.idToDummyNode[u];if(E[u]=h.tileNodes(h.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=E[u].width,y.rect.height=E[u].height,y.setCenter(E[u].centerX,E[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var v=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(v+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>v?(y.rect.x-=(y.labelWidth-v)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-v)/2):y.labelPosHorizontal=="right"&&y.setWidth(v+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},O.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var E=this.compoundOrder[h],u=E.id,y=E.paddingLeft,v=E.paddingTop,w=E.labelMarginLeft,L=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,y,v,w,L)}},O.prototype.repopulateZeroDegreeMembers=function(){var h=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var y=h.idToDummyNode[u],v=y.paddingLeft,w=y.paddingTop,L=y.labelMarginLeft,b=y.labelMarginTop;h.adjustLocations(E[u],y.rect.x,y.rect.y,v,w,L,b)})},O.prototype.getToBeTiled=function(h){var E=h.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=h.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var y=u.getNodes(),v=0;v<y.length;v++){var w=y[v];if(this.getNodeDegree(w)>0)return this.toBeTiled[E]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},O.prototype.getNodeDegree=function(h){h.id;for(var E=h.getEdges(),u=0,y=0;y<E.length;y++){var v=E[y];v.getSource().id!==v.getTarget().id&&(u+=1)}return u},O.prototype.getNodeDegreeWithChildren=function(h){var E=this.getNodeDegree(h);if(h.getChild()==null)return E;for(var u=h.getChild().getNodes(),y=0;y<u.length;y++){var v=u[y];E+=this.getNodeDegreeWithChildren(v)}return E},O.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},O.prototype.fillCompexOrderByDFS=function(h){for(var E=0;E<h.length;E++){var u=h[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},O.prototype.adjustLocations=function(h,E,u,y,v,w,L){E+=y+w,u+=v+L;for(var b=E,G=0;G<h.rows.length;G++){var F=h.rows[G];E=b;for(var H=0,W=0;W<F.length;W++){var K=F[W];K.rect.x=E,K.rect.y=u,E+=K.rect.width+h.horizontalPadding,K.rect.height>H&&(H=K.rect.height)}u+=H+h.verticalPadding}},O.prototype.tileCompoundMembers=function(h,E){var u=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(y){var v=E[y];if(u.tiledMemberPack[y]=u.tileNodes(h[y],v.paddingLeft+v.paddingRight),v.rect.width=u.tiledMemberPack[y].width,v.rect.height=u.tiledMemberPack[y].height,v.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var w=v.rect.width,L=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(w+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>w?(v.rect.x-=(v.labelWidth-w)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-w)/2):v.labelPosHorizontal=="right"&&v.setWidth(w+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(L+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>L?(v.rect.y-=(v.labelHeight-L)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-L)/2):v.labelPosVertical=="bottom"&&v.setHeight(L+v.labelHeight))}})},O.prototype.tileNodes=function(h,E){var u=this.tileNodesByFavoringDim(h,E,!0),y=this.tileNodesByFavoringDim(h,E,!1),v=this.getOrgRatio(u);return this.getOrgRatio(y)<v?y:u},O.prototype.getOrgRatio=function(h){var E=h.width/h.height;return E<1&&(E=1/E),E},O.prototype.calcIdealRowWidth=function(h,E){var u=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,v=h.length,w=0,L=0,b=0;h.forEach(function(X){w+=X.getWidth(),L+=X.getHeight(),X.getWidth()>b&&(b=X.getWidth())});var G=w/v,F=L/v,H=(u-y)**2+4*(G+y)*(F+u)*v,W=(y-u+Math.sqrt(H))/(2*(G+y)),K;E?(K=Math.ceil(W),K==W&&K++):K=Math.floor(W);var k=K*(G+y)-y;return b>k&&(k=b),k+=y*2,k},O.prototype.tileNodesByFavoringDim=function(h,E,u){var y=o.TILING_PADDING_VERTICAL,v=o.TILING_PADDING_HORIZONTAL,w=o.TILING_COMPARE_BY,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:v,centerX:0,centerY:0};w&&(L.idealRowWidth=this.calcIdealRowWidth(h,u));var b=function(X){return X.rect.width*X.rect.height},G=function(X,D){return b(D)-b(X)};h.sort(function(X,D){var z=G;return L.idealRowWidth?(z=w,z(X.id,D.id)):z(X,D)});for(var F=0,H=0,W=0;W<h.length;W++){var K=h[W];F+=K.getCenterX(),H+=K.getCenterY()}L.centerX=F/h.length,L.centerY=H/h.length;for(var W=0;W<h.length;W++){var K=h[W];if(L.rows.length==0)this.insertNodeToRow(L,K,0,E);else if(this.canAddHorizontal(L,K.rect.width,K.rect.height)){var k=L.rows.length-1;L.idealRowWidth||(k=this.getShortestRowIndex(L)),this.insertNodeToRow(L,K,k,E)}else this.insertNodeToRow(L,K,L.rows.length,E);this.shiftToLastRow(L)}return L},O.prototype.insertNodeToRow=function(h,E,u,y){var v=y;u==h.rows.length&&(h.rows.push([]),h.rowWidth.push(v),h.rowHeight.push(0));var w=h.rowWidth[u]+E.rect.width;h.rows[u].length>0&&(w+=h.horizontalPadding),h.rowWidth[u]=w,h.width<w&&(h.width=w);var L=E.rect.height;u>0&&(L+=h.verticalPadding);var b=0;L>h.rowHeight[u]&&(b=h.rowHeight[u],h.rowHeight[u]=L,b=h.rowHeight[u]-b),h.height+=b,h.rows[u].push(E)},O.prototype.getShortestRowIndex=function(h){for(var E=-1,u=Number.MAX_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]<u&&(E=y,u=h.rowWidth[y]);return E},O.prototype.getLongestRowIndex=function(h){for(var E=-1,u=Number.MIN_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]>u&&(E=y,u=h.rowWidth[y]);return E},O.prototype.canAddHorizontal=function(h,E,u){if(h.idealRowWidth){var y=h.rows.length-1;return h.rowWidth[y]+E+h.horizontalPadding<=h.idealRowWidth}var v=this.getShortestRowIndex(h);if(v<0)return!0;var w=h.rowWidth[v];if(w+h.horizontalPadding+E<=h.width)return!0;var L=0;h.rowHeight[v]<u&&v>0&&(L=u+h.verticalPadding-h.rowHeight[v]);var b=h.width-w>=E+h.horizontalPadding?(h.height+L)/(w+E+h.horizontalPadding):(h.height+L)/h.width;L=u+h.verticalPadding;var G=h.width<E?(h.height+L)/E:(h.height+L)/h.width;return G<1&&(G=1/G),b<1&&(b=1/b),b<G},O.prototype.shiftToLastRow=function(h){var E=this.getLongestRowIndex(h),u=h.rowWidth.length-1,y=h.rows[E],v=y[y.length-1],w=v.width+h.horizontalPadding;if(h.width-h.rowWidth[u]>w&&E!=u){y.splice(-1,1),h.rows[u].push(v),h.rowWidth[E]=h.rowWidth[E]-w,h.rowWidth[u]=h.rowWidth[u]+w,h.width=h.rowWidth[instance.getLongestRowIndex(h)];for(var L=Number.MIN_VALUE,b=0;b<y.length;b++)y[b].height>L&&(L=y[b].height);E>0&&(L+=h.verticalPadding);var G=h.rowHeight[E]+h.rowHeight[u];h.rowHeight[E]=L,h.rowHeight[u]<v.height+h.verticalPadding&&(h.rowHeight[u]=v.height+h.verticalPadding);var F=h.rowHeight[E]+h.rowHeight[u];h.height+=F-G,this.shiftToLastRow(h)}},O.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},O.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},O.prototype.reduceTrees=function(){for(var h=[],E=!0,u;E;){var y=this.graphManager.getAllNodes(),v=[];E=!1;for(var w=0;w<y.length;w++)if(u=y[w],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(o.PURE_INCREMENTAL){var L=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-L.getCenterX(),u.getCenterY()-L.getCenterY());v.push([u,u.getEdges()[0],u.getOwner(),b])}else v.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==1){for(var G=[],F=0;F<v.length;F++)v[F][0].getEdges().length==1&&(G.push(v[F]),v[F][0].getOwner().remove(v[F][0]));h.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},O.prototype.growTree=function(h){for(var E=h[h.length-1],u,y=0;y<E.length;y++)u=E[y],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},O.prototype.findPlaceforPrunedNode=function(h){var E,u,y=h[0];if(u=y==h[1].source?h[1].target:h[1].source,o.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+h[3].getWidth(),u.getCenterY()+h[3].getHeight());else{var v=u.startX,w=u.finishX,L=u.startY,b=u.finishY,G=[0,0,0,0];if(L>0)for(var F=v;F<=w;F++)G[0]+=this.grid[F][L-1].length+this.grid[F][L].length-1;if(w<this.grid.length-1)for(var F=L;F<=b;F++)G[1]+=this.grid[w+1][F].length+this.grid[w][F].length-1;if(b<this.grid[0].length-1)for(var F=v;F<=w;F++)G[2]+=this.grid[F][b+1].length+this.grid[F][b].length-1;if(v>0)for(var F=L;F<=b;F++)G[3]+=this.grid[v-1][F].length+this.grid[v][F].length-1;for(var H=R.MAX_VALUE,W,K,k=0;k<G.length;k++)G[k]<H?(H=G[k],W=1,K=k):G[k]==H&&W++;if(W==3&&H==0)G[0]==0&&G[1]==0&&G[2]==0?E=1:G[0]==0&&G[1]==0&&G[3]==0?E=0:G[0]==0&&G[2]==0&&G[3]==0?E=3:G[1]==0&&G[2]==0&&G[3]==0&&(E=2);else if(W==2&&H==0){var X=Math.floor(Math.random()*2);E=G[0]==0&&G[1]==0?X==0?0:1:G[0]==0&&G[2]==0?X==0?0:2:G[0]==0&&G[3]==0?X==0?0:3:G[1]==0&&G[2]==0?X==0?1:2:G[1]==0&&G[3]==0?X==0?1:3:X==0?2:3}else if(W==4&&H==0){var X=Math.floor(Math.random()*4);E=X}else E=K;E==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-s.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(u.getCenterX()+u.getWidth()/2+s.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):E==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+s.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-s.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},a.exports=O}),991:((a,n,t)=>{var e=t(551).FDLayoutNode,l=t(551).IMath;function i(r,o,d,s){e.call(this,r,o,d,s)}for(var f in i.prototype=Object.create(e.prototype),e)i[f]=e[f];i.prototype.calculateDisplacement=function(){var r=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementX=r.coolingFactor*r.maxNodeDisplacement*l.sign(this.displacementX)),Math.abs(this.displacementY)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementY=r.coolingFactor*r.maxNodeDisplacement*l.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(r,o){for(var d=this.getChild().getNodes(),s,c=0;c<d.length;c++)s=d[c],s.getChild()==null?(s.displacementX+=r,s.displacementY+=o):s.propogateDisplacementToChildren(r,o)},i.prototype.move=function(){var r=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),r.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},i.prototype.setPred1=function(r){this.pred1=r},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(r){this.next=r},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(r){this.processed=r},i.prototype.isProcessed=function(){return processed},a.exports=i}),902:((a,n,t)=>{function e(d){if(Array.isArray(d)){for(var s=0,c=Array(d.length);s<d.length;s++)c[s]=d[s];return c}else return Array.from(d)}var l=t(806),i=t(551).LinkedList,f=t(551).Matrix,r=t(551).SVD;function o(){}o.handleConstraints=function(d){var s={};s.fixedNodeConstraint=d.constraints.fixedNodeConstraint,s.alignmentConstraint=d.constraints.alignmentConstraint,s.relativePlacementConstraint=d.constraints.relativePlacementConstraint;for(var c=new Map,g=new Map,m=[],T=[],A=d.getAllNodes(),R=0,P=0;P<A.length;P++){var S=A[P];S.getChild()??(g.set(S.id,R++),m.push(S.getCenterX()),T.push(S.getCenterY()),c.set(S.id,S))}s.relativePlacementConstraint&&s.relativePlacementConstraint.forEach(function(M){!M.gap&&M.gap!=0&&(M.left?M.gap=l.DEFAULT_EDGE_LENGTH+c.get(M.left).getWidth()/2+c.get(M.right).getWidth()/2:M.gap=l.DEFAULT_EDGE_LENGTH+c.get(M.top).getHeight()/2+c.get(M.bottom).getHeight()/2)});var V=function(M,Y){return{x:M.x-Y.x,y:M.y-Y.y}},Z=function(M){var Y=0,J=0;return M.forEach(function(j){Y+=m[g.get(j)],J+=T[g.get(j)]}),{x:Y/M.size,y:J/M.size}},O=function(M,Y,J,j,tt){function Et(gt,Q){var ut=new Set(gt),At=!0,rt=!1,bt=void 0;try{for(var Ot=Q[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;ut.add(Ft)}}catch(Tt){rt=!0,bt=Tt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}return ut}var yt=new Map;M.forEach(function(gt,Q){yt.set(Q,0)}),M.forEach(function(gt,Q){gt.forEach(function(ut){yt.set(ut.id,yt.get(ut.id)+1)})});var it=new Map,ft=new Map,It=new i;yt.forEach(function(gt,Q){gt==0?(It.push(Q),J||(Y=="horizontal"?it.set(Q,g.has(Q)?m[g.get(Q)]:j.get(Q)):it.set(Q,g.has(Q)?T[g.get(Q)]:j.get(Q)))):it.set(Q,-1/0),J&&ft.set(Q,new Set([Q]))}),J&&tt.forEach(function(gt){var Q=[];if(gt.forEach(function(rt){J.has(rt)&&Q.push(rt)}),Q.length>0){var ut=0;Q.forEach(function(rt){Y=="horizontal"?(it.set(rt,g.has(rt)?m[g.get(rt)]:j.get(rt)),ut+=it.get(rt)):(it.set(rt,g.has(rt)?T[g.get(rt)]:j.get(rt)),ut+=it.get(rt))}),ut/=Q.length,gt.forEach(function(rt){J.has(rt)||it.set(rt,ut)})}else{var At=0;gt.forEach(function(rt){Y=="horizontal"?At+=g.has(rt)?m[g.get(rt)]:j.get(rt):At+=g.has(rt)?T[g.get(rt)]:j.get(rt)}),At/=gt.length,gt.forEach(function(rt){it.set(rt,At)})}});for(var Lt=function(){var gt=It.shift();M.get(gt).forEach(function(Q){if(it.get(Q.id)<it.get(gt)+Q.gap)if(J&&J.has(Q.id)){var ut=void 0;if(ut=Y=="horizontal"?g.has(Q.id)?m[g.get(Q.id)]:j.get(Q.id):g.has(Q.id)?T[g.get(Q.id)]:j.get(Q.id),it.set(Q.id,ut),ut<it.get(gt)+Q.gap){var At=it.get(gt)+Q.gap-ut;ft.get(gt).forEach(function(rt){it.set(rt,it.get(rt)-At)})}}else it.set(Q.id,it.get(gt)+Q.gap);yt.set(Q.id,yt.get(Q.id)-1),yt.get(Q.id)==0&&It.push(Q.id),J&&ft.set(Q.id,Et(ft.get(gt),ft.get(Q.id)))})};It.length!=0;)Lt();if(J){var mt=new Set;M.forEach(function(gt,Q){gt.length==0&&mt.add(Q)});var lt=[];ft.forEach(function(gt,Q){if(mt.has(Q)){var ut=!1,At=!0,rt=!1,bt=void 0;try{for(var Ot=gt[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;J.has(Ft)&&(ut=!0)}}catch(xt){rt=!0,bt=xt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}if(!ut){var Tt=!1,Nt=void 0;lt.forEach(function(xt,Pt){xt.has([].concat(e(gt))[0])&&(Tt=!0,Nt=Pt)}),Tt?gt.forEach(function(xt){lt[Nt].add(xt)}):lt.push(new Set(gt))}}}),lt.forEach(function(gt,Q){var ut=1/0,At=1/0,rt=-1/0,bt=-1/0,Ot=!0,Dt=!1,Ft=void 0;try{for(var Tt=gt[Symbol.iterator](),Nt;!(Ot=(Nt=Tt.next()).done);Ot=!0){var xt=Nt.value,Pt=void 0;Pt=Y=="horizontal"?g.has(xt)?m[g.get(xt)]:j.get(xt):g.has(xt)?T[g.get(xt)]:j.get(xt);var Xt=it.get(xt);Pt<ut&&(ut=Pt),Pt>rt&&(rt=Pt),Xt<At&&(At=Xt),Xt>bt&&(bt=Xt)}}catch(jt){Dt=!0,Ft=jt}finally{try{!Ot&&Tt.return&&Tt.return()}finally{if(Dt)throw Ft}}var ne=(ut+rt)/2-(At+bt)/2,ee=!0,qt=!1,Zt=void 0;try{for(var $t=gt[Symbol.iterator](),Jt;!(ee=(Jt=$t.next()).done);ee=!0){var re=Jt.value;it.set(re,it.get(re)+ne)}}catch(jt){qt=!0,Zt=jt}finally{try{!ee&&$t.return&&$t.return()}finally{if(qt)throw Zt}}})}return it},q=function(M){var Y=0,J=0,j=0,tt=0;if(M.forEach(function(ft){ft.left?m[g.get(ft.left)]-m[g.get(ft.right)]>=0?Y++:J++:T[g.get(ft.top)]-T[g.get(ft.bottom)]>=0?j++:tt++}),Y>J&&j>tt)for(var Et=0;Et<g.size;Et++)m[Et]=-1*m[Et],T[Et]=-1*T[Et];else if(Y>J)for(var yt=0;yt<g.size;yt++)m[yt]=-1*m[yt];else if(j>tt)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},h=function(M){var Y=[],J=new i,j=new Set,tt=0;return M.forEach(function(Et,yt){if(!j.has(yt)){Y[tt]=[];var it=yt;for(J.push(it),j.add(it),Y[tt].push(it);J.length!=0;)it=J.shift(),M.get(it).forEach(function(ft){j.has(ft.id)||(J.push(ft.id),j.add(ft.id),Y[tt].push(ft.id))});tt++}}),Y},E=function(M){var Y=new Map;return M.forEach(function(J,j){Y.set(j,[])}),M.forEach(function(J,j){J.forEach(function(tt){Y.get(j).push(tt),Y.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),Y},u=function(M){var Y=new Map;return M.forEach(function(J,j){Y.set(j,[])}),M.forEach(function(J,j){J.forEach(function(tt){Y.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),Y},y=[],v=[],w=!1,L=!1,b=new Set,G=new Map,F=new Map,H=[];if(s.fixedNodeConstraint&&s.fixedNodeConstraint.forEach(function(M){b.add(M.nodeId)}),s.relativePlacementConstraint&&(s.relativePlacementConstraint.forEach(function(M){M.left?(G.has(M.left)?G.get(M.left).push({id:M.right,gap:M.gap,direction:"horizontal"}):G.set(M.left,[{id:M.right,gap:M.gap,direction:"horizontal"}]),G.has(M.right)||G.set(M.right,[])):(G.has(M.top)?G.get(M.top).push({id:M.bottom,gap:M.gap,direction:"vertical"}):G.set(M.top,[{id:M.bottom,gap:M.gap,direction:"vertical"}]),G.has(M.bottom)||G.set(M.bottom,[]))}),F=E(G),H=h(F)),l.TRANSFORM_ON_CONSTRAINT_HANDLING){if(s.fixedNodeConstraint&&s.fixedNodeConstraint.length>1)s.fixedNodeConstraint.forEach(function(M,Y){y[Y]=[M.position.x,M.position.y],v[Y]=[m[g.get(M.nodeId)],T[g.get(M.nodeId)]]}),w=!0;else if(s.alignmentConstraint)(function(){var M=0;if(s.alignmentConstraint.vertical){for(var Y=s.alignmentConstraint.vertical,J=function(it){var ft=new Set;Y[it].forEach(function(mt){ft.add(mt)});var It=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),Lt=void 0;Lt=It.size>0?m[g.get(It.values().next().value)]:Z(ft).x,Y[it].forEach(function(mt){y[M]=[Lt,T[g.get(mt)]],v[M]=[m[g.get(mt)],T[g.get(mt)]],M++})},j=0;j<Y.length;j++)J(j);w=!0}if(s.alignmentConstraint.horizontal){for(var tt=s.alignmentConstraint.horizontal,Et=function(it){var ft=new Set;tt[it].forEach(function(mt){ft.add(mt)});var It=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),Lt=void 0;Lt=It.size>0?m[g.get(It.values().next().value)]:Z(ft).y,tt[it].forEach(function(mt){y[M]=[m[g.get(mt)],Lt],v[M]=[m[g.get(mt)],T[g.get(mt)]],M++})},yt=0;yt<tt.length;yt++)Et(yt);w=!0}s.relativePlacementConstraint&&(L=!0)})();else if(s.relativePlacementConstraint){for(var W=0,K=0,k=0;k<H.length;k++)H[k].length>W&&(W=H[k].length,K=k);if(W<F.size/2)q(s.relativePlacementConstraint),w=!1,L=!1;else{var X=new Map,D=new Map,z=[];H[K].forEach(function(M){G.get(M).forEach(function(Y){Y.direction=="horizontal"?(X.has(M)?X.get(M).push(Y):X.set(M,[Y]),X.has(Y.id)||X.set(Y.id,[]),z.push({left:M,right:Y.id})):(D.has(M)?D.get(M).push(Y):D.set(M,[Y]),D.has(Y.id)||D.set(Y.id,[]),z.push({top:M,bottom:Y.id}))})}),q(z),L=!1;var et=O(X,"horizontal"),U=O(D,"vertical");H[K].forEach(function(M,Y){v[Y]=[m[g.get(M)],T[g.get(M)]],y[Y]=[],et.has(M)?y[Y][0]=et.get(M):y[Y][0]=m[g.get(M)],U.has(M)?y[Y][1]=U.get(M):y[Y][1]=T[g.get(M)]}),w=!0}}if(w){for(var B=void 0,dt=f.transpose(y),st=f.transpose(v),Ct=0;Ct<dt.length;Ct++)dt[Ct]=f.multGamma(dt[Ct]),st[Ct]=f.multGamma(st[Ct]);var $=f.multMat(dt,f.transpose(st)),pt=r.svd($);B=f.multMat(pt.V,f.transpose(pt.U));for(var vt=0;vt<g.size;vt++){var Bt=[m[vt],T[vt]],Yt=[B[0][0],B[1][0]],Mt=[B[0][1],B[1][1]];m[vt]=f.dotProduct(Bt,Yt),T[vt]=f.dotProduct(Bt,Mt)}L&&q(s.relativePlacementConstraint)}}if(l.ENFORCE_CONSTRAINTS){if(s.fixedNodeConstraint&&s.fixedNodeConstraint.length>0){var _t={x:0,y:0};s.fixedNodeConstraint.forEach(function(M,Y){var J={x:m[g.get(M.nodeId)],y:T[g.get(M.nodeId)]},j=M.position,tt=V(j,J);_t.x+=tt.x,_t.y+=tt.y}),_t.x/=s.fixedNodeConstraint.length,_t.y/=s.fixedNodeConstraint.length,m.forEach(function(M,Y){m[Y]+=_t.x}),T.forEach(function(M,Y){T[Y]+=_t.y}),s.fixedNodeConstraint.forEach(function(M){m[g.get(M.nodeId)]=M.position.x,T[g.get(M.nodeId)]=M.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Ht=s.alignmentConstraint.vertical,Ut=function(M){var Y=new Set;Ht[M].forEach(function(tt){Y.add(tt)});var J=new Set([].concat(e(Y)).filter(function(tt){return b.has(tt)})),j=void 0;j=J.size>0?m[g.get(J.values().next().value)]:Z(Y).x,Y.forEach(function(tt){b.has(tt)||(m[g.get(tt)]=j)})},Rt=0;Rt<Ht.length;Rt++)Ut(Rt);if(s.alignmentConstraint.horizontal)for(var Vt=s.alignmentConstraint.horizontal,Gt=function(M){var Y=new Set;Vt[M].forEach(function(tt){Y.add(tt)});var J=new Set([].concat(e(Y)).filter(function(tt){return b.has(tt)})),j=void 0;j=J.size>0?T[g.get(J.values().next().value)]:Z(Y).y,Y.forEach(function(tt){b.has(tt)||(T[g.get(tt)]=j)})},ht=0;ht<Vt.length;ht++)Gt(ht)}s.relativePlacementConstraint&&(function(){var M=new Map,Y=new Map,J=new Map,j=new Map,tt=new Map,Et=new Map,yt=new Set,it=new Set;if(b.forEach(function(at){yt.add(at),it.add(at)}),s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var ft=s.alignmentConstraint.vertical,It=function(at){J.set("dummy"+at,[]),ft[at].forEach(function(wt){M.set(wt,"dummy"+at),J.get("dummy"+at).push(wt),b.has(wt)&&yt.add("dummy"+at)}),tt.set("dummy"+at,m[g.get(ft[at][0])])},Lt=0;Lt<ft.length;Lt++)It(Lt);if(s.alignmentConstraint.horizontal)for(var mt=s.alignmentConstraint.horizontal,lt=function(at){j.set("dummy"+at,[]),mt[at].forEach(function(wt){Y.set(wt,"dummy"+at),j.get("dummy"+at).push(wt),b.has(wt)&&it.add("dummy"+at)}),Et.set("dummy"+at,T[g.get(mt[at][0])])},gt=0;gt<mt.length;gt++)lt(gt)}var Q=new Map,ut=new Map,At=function(at){G.get(at).forEach(function(wt){var kt=void 0,zt=void 0;wt.direction=="horizontal"?(kt=M.get(at)?M.get(at):at,zt=M.get(wt.id)?{id:M.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,Q.has(kt)?Q.get(kt).push(zt):Q.set(kt,[zt]),Q.has(zt.id)||Q.set(zt.id,[])):(kt=Y.get(at)?Y.get(at):at,zt=Y.get(wt.id)?{id:Y.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,ut.has(kt)?ut.get(kt).push(zt):ut.set(kt,[zt]),ut.has(zt.id)||ut.set(zt.id,[]))})},rt=!0,bt=!1,Ot=void 0;try{for(var Dt=G.keys()[Symbol.iterator](),Ft;!(rt=(Ft=Dt.next()).done);rt=!0){var Tt=Ft.value;At(Tt)}}catch(at){bt=!0,Ot=at}finally{try{!rt&&Dt.return&&Dt.return()}finally{if(bt)throw Ot}}var Nt=E(Q),xt=E(ut),Pt=h(Nt),Xt=h(xt),ne=u(Q),ee=u(ut),qt=[],Zt=[];Pt.forEach(function(at,wt){qt[wt]=[],at.forEach(function(kt){ne.get(kt).length==0&&qt[wt].push(kt)})}),Xt.forEach(function(at,wt){Zt[wt]=[],at.forEach(function(kt){ee.get(kt).length==0&&Zt[wt].push(kt)})});var $t=O(Q,"horizontal",yt,tt,qt),Jt=O(ut,"vertical",it,Et,Zt),re=function(at){J.get(at)?J.get(at).forEach(function(wt){m[g.get(wt)]=$t.get(at)}):m[g.get(at)]=$t.get(at)},jt=!0,ve=!1,ye=void 0;try{for(var ae=$t.keys()[Symbol.iterator](),Ee;!(jt=(Ee=ae.next()).done);jt=!0){var se=Ee.value;re(se)}}catch(at){ve=!0,ye=at}finally{try{!jt&&ae.return&&ae.return()}finally{if(ve)throw ye}}var Xe=function(at){j.get(at)?j.get(at).forEach(function(wt){T[g.get(wt)]=Jt.get(at)}):T[g.get(at)]=Jt.get(at)},he=!0,Te=!1,Ne=void 0;try{for(var le=Jt.keys()[Symbol.iterator](),Ae;!(he=(Ae=le.next()).done);he=!0){var se=Ae.value;Xe(se)}}catch(at){Te=!0,Ne=at}finally{try{!he&&le.return&&le.return()}finally{if(Te)throw Ne}}})()}for(var ot=0;ot<A.length;ot++){var ct=A[ot];ct.getChild()??ct.setCenter(m[g.get(ct.id)],T[g.get(ct.id)])}},a.exports=o}),551:(a=>{a.exports=C})},N={};function p(a){var n=N[a];if(n!==void 0)return n.exports;var t=N[a]={exports:{}};return _[a](t,t.exports,p),t.exports}return p(45)})()})})),li=ze(de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_(Ie()):typeof define=="function"&&define.amd?define(["cose-base"],_):typeof x=="object"?x.cytoscapeFcose=_(Ie()):C.cytoscapeFcose=_(C.coseBase)})(x,function(C){return(()=>{var _={658:(a=>{a.exports=Object.assign==null?function(n){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(e){return n[e]=t[e]})}),n}:Object.assign.bind(Object)}),548:((a,n,t)=>{var e=(function(){function f(r,o){var d=[],s=!0,c=!1,g=void 0;try{for(var m=r[Symbol.iterator](),T;!(s=(T=m.next()).done)&&(d.push(T.value),!(o&&d.length===o));s=!0);}catch(A){c=!0,g=A}finally{try{!s&&m.return&&m.return()}finally{if(c)throw g}}return d}return function(r,o){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return f(r,o);throw TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=t(140).layoutBase.LinkedList,i={};i.getTopMostNodes=function(f){for(var r={},o=0;o<f.length;o++)r[f[o].id()]=!0;return f.filter(function(d,s){typeof d=="number"&&(d=s);for(var c=d.parent()[0];c!=null;){if(r[c.id()])return!1;c=c.parent()[0]}return!0})},i.connectComponents=function(f,r,o,d){var s=new l,c=new Set,g=[],m=void 0,T=void 0,A=void 0,R=!1,P=1,S=[],V=[],Z=function(){var O=f.collection();V.push(O);var q=o[0],h=f.collection();h.merge(q).merge(q.descendants().intersection(r)),g.push(q),h.forEach(function(y){s.push(y),c.add(y),O.merge(y)});for(var E=function(){q=s.shift();var y=f.collection();q.neighborhood().nodes().forEach(function(L){r.intersection(q.edgesWith(L)).length>0&&y.merge(L)});for(var v=0;v<y.length;v++){var w=y[v];m=o.intersection(w.union(w.ancestors())),m!=null&&!c.has(m[0])&&m.union(m.descendants()).forEach(function(L){s.push(L),c.add(L),O.merge(L),o.has(L)&&g.push(L)})}};s.length!=0;)E();if(O.forEach(function(y){r.intersection(y.connectedEdges()).forEach(function(v){O.has(v.source())&&O.has(v.target())&&O.merge(v)})}),g.length==o.length&&(R=!0),!R||R&&P>1){T=g[0],A=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<A&&(A=y.connectedEdges().length,T=y)}),S.push(T.id());var u=f.collection();u.merge(g[0]),g.forEach(function(y){u.merge(y)}),g=[],o=o.difference(u),P++}};do Z();while(!R);return d&&S.length>0&&d.set("dummy"+(d.size+1),S),V},i.relocateComponent=function(f,r,o){if(!o.fixedNodeConstraint){var d=1/0,s=-1/0,c=1/0,g=-1/0;if(o.quality=="draft"){var m=!0,T=!1,A=void 0;try{for(var R=r.nodeIndexes[Symbol.iterator](),P;!(m=(P=R.next()).done);m=!0){var S=P.value,V=e(S,2),Z=V[0],O=V[1],q=o.cy.getElementById(Z);if(q){var h=q.boundingBox(),E=r.xCoords[O]-h.w/2,u=r.xCoords[O]+h.w/2,y=r.yCoords[O]-h.h/2,v=r.yCoords[O]+h.h/2;E<d&&(d=E),u>s&&(s=u),y<c&&(c=y),v>g&&(g=v)}}}catch(F){T=!0,A=F}finally{try{!m&&R.return&&R.return()}finally{if(T)throw A}}var w=f.x-(s+d)/2,L=f.y-(g+c)/2;r.xCoords=r.xCoords.map(function(F){return F+w}),r.yCoords=r.yCoords.map(function(F){return F+L})}else{Object.keys(r).forEach(function(F){var H=r[F],W=H.getRect().x,K=H.getRect().x+H.getRect().width,k=H.getRect().y,X=H.getRect().y+H.getRect().height;W<d&&(d=W),K>s&&(s=K),k<c&&(c=k),X>g&&(g=X)});var b=f.x-(s+d)/2,G=f.y-(g+c)/2;Object.keys(r).forEach(function(F){var H=r[F];H.setCenter(H.getCenterX()+b,H.getCenterY()+G)})}}},i.calcBoundingBox=function(f,r,o,d){for(var s=9007199254740991,c=-9007199254740991,g=9007199254740991,m=-9007199254740991,T=void 0,A=void 0,R=void 0,P=void 0,S=f.descendants().not(":parent"),V=S.length,Z=0;Z<V;Z++){var O=S[Z];T=r[d.get(O.id())]-O.width()/2,A=r[d.get(O.id())]+O.width()/2,R=o[d.get(O.id())]-O.height()/2,P=o[d.get(O.id())]+O.height()/2,s>T&&(s=T),c<A&&(c=A),g>R&&(g=R),m<P&&(m=P)}var q={};return q.topLeftX=s,q.topLeftY=g,q.width=c-s,q.height=m-g,q},i.calcParentsWithoutChildren=function(f,r){var o=f.collection();return r.nodes(":parent").forEach(function(d){var s=!1;d.children().forEach(function(c){c.css("display")!="none"&&(s=!0)}),s||o.merge(d)}),o},a.exports=i}),816:((a,n,t)=>{var e=t(548),l=t(140).CoSELayout,i=t(140).CoSENode,f=t(140).layoutBase.PointD,r=t(140).layoutBase.DimensionD,o=t(140).layoutBase.LayoutConstants,d=t(140).layoutBase.FDLayoutConstants,s=t(140).CoSEConstants;a.exports={coseLayout:function(c,g){var m=c.cy,T=c.eles,A=T.nodes(),R=T.edges(),P=void 0,S=void 0,V=void 0,Z={};c.randomize&&(P=g.nodeIndexes,S=g.xCoords,V=g.yCoords);var O=function(L){return typeof L=="function"},q=function(L,b){return O(L)?L(b):L},h=e.calcParentsWithoutChildren(m,T),E=function L(b,G,F,H){for(var W=G.length,K=0;K<W;K++){var k=G[K],X=null;k.intersection(h).length==0&&(X=k.children());var D=void 0,z=k.layoutDimensions({nodeDimensionsIncludeLabels:H.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null)if(H.randomize)if(!k.isParent())D=b.add(new i(F.graphManager,new f(S[P.get(k.id())]-z.w/2,V[P.get(k.id())]-z.h/2),new r(parseFloat(z.w),parseFloat(z.h))));else{var et=e.calcBoundingBox(k,S,V,P);D=k.intersection(h).length==0?b.add(new i(F.graphManager,new f(et.topLeftX,et.topLeftY),new r(et.width,et.height))):b.add(new i(F.graphManager,new f(et.topLeftX,et.topLeftY),new r(parseFloat(z.w),parseFloat(z.h))))}else D=b.add(new i(F.graphManager,new f(k.position("x")-z.w/2,k.position("y")-z.h/2),new r(parseFloat(z.w),parseFloat(z.h))));else D=b.add(new i(this.graphManager));if(D.id=k.data("id"),D.nodeRepulsion=q(H.nodeRepulsion,k),D.paddingLeft=parseInt(k.css("padding")),D.paddingTop=parseInt(k.css("padding")),D.paddingRight=parseInt(k.css("padding")),D.paddingBottom=parseInt(k.css("padding")),H.nodeDimensionsIncludeLabels&&(D.labelWidth=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,D.labelHeight=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,D.labelPosVertical=k.css("text-valign"),D.labelPosHorizontal=k.css("text-halign")),Z[k.data("id")]=D,isNaN(D.rect.x)&&(D.rect.x=0),isNaN(D.rect.y)&&(D.rect.y=0),X!=null&&X.length>0){var U=void 0;U=F.getGraphManager().add(F.newGraph(),D),L(U,X,F,H)}}},u=function(L,b,G){for(var F=0,H=0,W=0;W<G.length;W++){var K=G[W],k=Z[K.data("source")],X=Z[K.data("target")];if(k&&X&&k!==X&&k.getEdgesBetween(X).length==0){var D=b.add(L.newEdge(),k,X);D.id=K.id(),D.idealLength=q(c.idealEdgeLength,K),D.edgeElasticity=q(c.edgeElasticity,K),F+=D.idealLength,H++}}c.idealEdgeLength!=null&&(H>0?s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=F/H:O(c.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,s.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH)},y=function(L,b){b.fixedNodeConstraint&&(L.constraints.fixedNodeConstraint=b.fixedNodeConstraint),b.alignmentConstraint&&(L.constraints.alignmentConstraint=b.alignmentConstraint),b.relativePlacementConstraint&&(L.constraints.relativePlacementConstraint=b.relativePlacementConstraint)};c.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(s.MAX_ITERATIONS=d.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=c.tilingCompareBy),c.quality=="proof"?o.QUALITY=2:o.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!c.randomize,s.ANIMATE=d.ANIMATE=o.ANIMATE=c.animate,s.TILE=c.tile,s.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!c.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,c.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),c.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),c.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),c.step=="all"&&(c.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var v=new l,w=v.newGraphManager();return E(w.addRoot(),e.getTopMostNodes(A),v,c),u(v,w,R),y(v,c),v.runLayout(),Z}}}),212:((a,n,t)=>{var e=(function(){function s(c,g){for(var m=0;m<g.length;m++){var T=g[m];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(c,T.key,T)}}return function(c,g,m){return g&&s(c.prototype,g),m&&s(c,m),c}})();function l(s,c){if(!(s instanceof c))throw TypeError("Cannot call a class as a function")}var i=t(658),f=t(548),r=t(657).spectralLayout,o=t(816).coseLayout,d=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(s){return 4500},idealEdgeLength:function(s){return 50},edgeElasticity:function(s){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});a.exports=(function(){function s(c){l(this,s),this.options=i({},d,c)}return e(s,[{key:"run",value:function(){var c=this,g=this.options,m=g.cy,T=g.eles,A=[],R=[],P=void 0,S=[];g.fixedNodeConstraint&&(!Array.isArray(g.fixedNodeConstraint)||g.fixedNodeConstraint.length==0)&&(g.fixedNodeConstraint=void 0),g.alignmentConstraint&&(g.alignmentConstraint.vertical&&(!Array.isArray(g.alignmentConstraint.vertical)||g.alignmentConstraint.vertical.length==0)&&(g.alignmentConstraint.vertical=void 0),g.alignmentConstraint.horizontal&&(!Array.isArray(g.alignmentConstraint.horizontal)||g.alignmentConstraint.horizontal.length==0)&&(g.alignmentConstraint.horizontal=void 0)),g.relativePlacementConstraint&&(!Array.isArray(g.relativePlacementConstraint)||g.relativePlacementConstraint.length==0)&&(g.relativePlacementConstraint=void 0),(g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint)&&(g.tile=!1,g.packComponents=!1);var V=void 0,Z=!1;if(m.layoutUtilities&&g.packComponents&&(V=m.layoutUtilities("get"),V||(V=m.layoutUtilities()),Z=!0),T.nodes().length>0)if(Z){var O=f.getTopMostNodes(g.eles.nodes());if(P=f.connectComponents(m,g.eles,O),P.forEach(function(U){var B=U.boundingBox();S.push({x:B.x1+B.w/2,y:B.y1+B.h/2})}),g.randomize&&P.forEach(function(U){g.eles=U,A.push(r(g))}),g.quality=="default"||g.quality=="proof"){var q=m.collection();if(g.tile){var h=new Map,E=[],u=[],y=0,v={nodeIndexes:h,xCoords:E,yCoords:u},w=[];if(P.forEach(function(U,B){U.edges().length==0&&(U.nodes().forEach(function(dt,st){q.merge(U.nodes()[st]),dt.isParent()||(v.nodeIndexes.set(U.nodes()[st].id(),y++),v.xCoords.push(U.nodes()[0].position().x),v.yCoords.push(U.nodes()[0].position().y))}),w.push(B))}),q.length>1){var L=q.boundingBox();S.push({x:L.x1+L.w/2,y:L.y1+L.h/2}),P.push(q),A.push(v);for(var b=w.length-1;b>=0;b--)P.splice(w[b],1),A.splice(w[b],1),S.splice(w[b],1)}}P.forEach(function(U,B){g.eles=U,R.push(o(g,A[B])),f.relocateComponent(S[B],R[B],g)})}else P.forEach(function(U,B){f.relocateComponent(S[B],A[B],g)});var G=new Set;if(P.length>1){var F=[],H=T.filter(function(U){return U.css("display")=="none"});P.forEach(function(U,B){var dt=void 0;if(g.quality=="draft"&&(dt=A[B].nodeIndexes),U.nodes().not(H).length>0){var st={};st.edges=[],st.nodes=[];var Ct=void 0;U.nodes().not(H).forEach(function($){if(g.quality=="draft")if(!$.isParent())Ct=dt.get($.id()),st.nodes.push({x:A[B].xCoords[Ct]-$.boundingbox().w/2,y:A[B].yCoords[Ct]-$.boundingbox().h/2,width:$.boundingbox().w,height:$.boundingbox().h});else{var pt=f.calcBoundingBox($,A[B].xCoords,A[B].yCoords,dt);st.nodes.push({x:pt.topLeftX,y:pt.topLeftY,width:pt.width,height:pt.height})}else R[B][$.id()]&&st.nodes.push({x:R[B][$.id()].getLeft(),y:R[B][$.id()].getTop(),width:R[B][$.id()].getWidth(),height:R[B][$.id()].getHeight()})}),U.edges().forEach(function($){var pt=$.source(),vt=$.target();if(pt.css("display")!="none"&&vt.css("display")!="none")if(g.quality=="draft"){var Bt=dt.get(pt.id()),Yt=dt.get(vt.id()),Mt=[],_t=[];if(pt.isParent()){var Ht=f.calcBoundingBox(pt,A[B].xCoords,A[B].yCoords,dt);Mt.push(Ht.topLeftX+Ht.width/2),Mt.push(Ht.topLeftY+Ht.height/2)}else Mt.push(A[B].xCoords[Bt]),Mt.push(A[B].yCoords[Bt]);if(vt.isParent()){var Ut=f.calcBoundingBox(vt,A[B].xCoords,A[B].yCoords,dt);_t.push(Ut.topLeftX+Ut.width/2),_t.push(Ut.topLeftY+Ut.height/2)}else _t.push(A[B].xCoords[Yt]),_t.push(A[B].yCoords[Yt]);st.edges.push({startX:Mt[0],startY:Mt[1],endX:_t[0],endY:_t[1]})}else R[B][pt.id()]&&R[B][vt.id()]&&st.edges.push({startX:R[B][pt.id()].getCenterX(),startY:R[B][pt.id()].getCenterY(),endX:R[B][vt.id()].getCenterX(),endY:R[B][vt.id()].getCenterY()})}),st.nodes.length>0&&(F.push(st),G.add(B))}});var W=V.packComponents(F,g.randomize).shifts;if(g.quality=="draft")A.forEach(function(U,B){var dt=U.xCoords.map(function(Ct){return Ct+W[B].dx}),st=U.yCoords.map(function(Ct){return Ct+W[B].dy});U.xCoords=dt,U.yCoords=st});else{var K=0;G.forEach(function(U){Object.keys(R[U]).forEach(function(B){var dt=R[U][B];dt.setCenter(dt.getCenterX()+W[K].dx,dt.getCenterY()+W[K].dy)}),K++})}}}else{var k=g.eles.boundingBox();if(S.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),g.randomize){var X=r(g);A.push(X)}g.quality=="default"||g.quality=="proof"?(R.push(o(g,A[0])),f.relocateComponent(S[0],R[0],g)):f.relocateComponent(S[0],A[0],g)}var D=function(U,B){if(g.quality=="default"||g.quality=="proof"){typeof U=="number"&&(U=B);var dt=void 0,st=void 0,Ct=U.data("id");return R.forEach(function(pt){Ct in pt&&(dt={x:pt[Ct].getRect().getCenterX(),y:pt[Ct].getRect().getCenterY()},st=pt[Ct])}),g.nodeDimensionsIncludeLabels&&(st.labelWidth&&(st.labelPosHorizontal=="left"?dt.x+=st.labelWidth/2:st.labelPosHorizontal=="right"&&(dt.x-=st.labelWidth/2)),st.labelHeight&&(st.labelPosVertical=="top"?dt.y+=st.labelHeight/2:st.labelPosVertical=="bottom"&&(dt.y-=st.labelHeight/2))),dt??(dt={x:U.position("x"),y:U.position("y")}),{x:dt.x,y:dt.y}}else{var $=void 0;return A.forEach(function(pt){var vt=pt.nodeIndexes.get(U.id());vt!=null&&($={x:pt.xCoords[vt],y:pt.yCoords[vt]})}),$??($={x:U.position("x"),y:U.position("y")}),{x:$.x,y:$.y}}};if(g.quality=="default"||g.quality=="proof"||g.randomize){var z=f.calcParentsWithoutChildren(m,T),et=T.filter(function(U){return U.css("display")=="none"});g.eles=T.not(et),T.nodes().not(":parent").not(et).layoutPositions(c,g,D),z.length>0&&z.forEach(function(U){U.position(D(U))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),s})()}),657:((a,n,t)=>{var e=t(548),l=t(140).layoutBase.Matrix,i=t(140).layoutBase.SVD;a.exports={spectralLayout:function(f){var r=f.cy,o=f.eles,d=o.nodes(),s=o.nodes(":parent"),c=new Map,g=new Map,m=new Map,T=[],A=[],R=[],P=[],S=[],V=[],Z=[],O=[],q=void 0,h=1e8,E=1e-9,u=f.piTol,y=f.samplingType,v=f.nodeSeparation,w=void 0,L=function(){for(var ht=0,ot=0,ct=!1;ot<w;){ht=Math.floor(Math.random()*q),ct=!1;for(var M=0;M<ot;M++)if(P[M]==ht){ct=!0;break}if(!ct)P[ot]=ht,ot++;else continue}},b=function(ht,ot,ct){for(var M=[],Y=0,J=0,j=0,tt=void 0,Et=[],yt=0,it=1,ft=0;ft<q;ft++)Et[ft]=h;for(M[J]=ht,Et[ht]=0;J>=Y;){j=M[Y++];for(var It=T[j],Lt=0;Lt<It.length;Lt++)tt=g.get(It[Lt]),Et[tt]==h&&(Et[tt]=Et[j]+1,M[++J]=tt);V[j][ot]=Et[j]*v}if(ct){for(var mt=0;mt<q;mt++)V[mt][ot]<S[mt]&&(S[mt]=V[mt][ot]);for(var lt=0;lt<q;lt++)S[lt]>yt&&(yt=S[lt],it=lt)}return it},G=function(ht){var ot=void 0;if(ht){ot=Math.floor(Math.random()*q);for(var ct=0;ct<q;ct++)S[ct]=h;for(var M=0;M<w;M++)P[M]=ot,ot=b(ot,M,ht)}else{L();for(var Y=0;Y<w;Y++)b(P[Y],Y,ht,!1)}for(var J=0;J<q;J++)for(var j=0;j<w;j++)V[J][j]*=V[J][j];for(var tt=0;tt<w;tt++)Z[tt]=[];for(var Et=0;Et<w;Et++)for(var yt=0;yt<w;yt++)Z[Et][yt]=V[P[yt]][Et]},F=function(){for(var ht=i.svd(Z),ot=ht.S,ct=ht.U,M=ht.V,Y=ot[0]*ot[0]*ot[0],J=[],j=0;j<w;j++){J[j]=[];for(var tt=0;tt<w;tt++)J[j][tt]=0,j==tt&&(J[j][tt]=ot[j]/(ot[j]*ot[j]+Y/(ot[j]*ot[j])))}O=l.multMat(l.multMat(M,J),l.transpose(ct))},H=function(){for(var ht=void 0,ot=void 0,ct=[],M=[],Y=[],J=[],j=0;j<q;j++)ct[j]=Math.random(),M[j]=Math.random();ct=l.normalize(ct),M=l.normalize(M);for(var tt=0,Et=E,yt=E,it=void 0;;){tt++;for(var ft=0;ft<q;ft++)Y[ft]=ct[ft];if(ct=l.multGamma(l.multL(l.multGamma(Y),V,O)),ht=l.dotProduct(Y,ct),ct=l.normalize(ct),Et=l.dotProduct(Y,ct),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var It=0;It<q;It++)Y[It]=ct[It];for(tt=0,yt=E;;){tt++;for(var Lt=0;Lt<q;Lt++)J[Lt]=M[Lt];if(J=l.minusOp(J,l.multCons(Y,l.dotProduct(Y,J))),M=l.multGamma(l.multL(l.multGamma(J),V,O)),ot=l.dotProduct(J,M),M=l.normalize(M),Et=l.dotProduct(J,M),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var mt=0;mt<q;mt++)J[mt]=M[mt];A=l.multCons(Y,Math.sqrt(Math.abs(ht))),R=l.multCons(J,Math.sqrt(Math.abs(ot)))};e.connectComponents(r,o,e.getTopMostNodes(d),c),s.forEach(function(ht){e.connectComponents(r,o,e.getTopMostNodes(ht.descendants().intersection(o)),c)});for(var W=0,K=0;K<d.length;K++)d[K].isParent()||g.set(d[K].id(),W++);var k=!0,X=!1,D=void 0;try{for(var z=c.keys()[Symbol.iterator](),et;!(k=(et=z.next()).done);k=!0){var U=et.value;g.set(U,W++)}}catch(ht){X=!0,D=ht}finally{try{!k&&z.return&&z.return()}finally{if(X)throw D}}for(var B=0;B<g.size;B++)T[B]=[];s.forEach(function(ht){for(var ot=ht.children().intersection(o);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(o);var ct=0,M=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(Y,J){Y.connectedEdges().length<M&&(M=Y.connectedEdges().length,ct=J)}),m.set(ht.id(),ot.nodes(":childless")[ct].id())}),d.forEach(function(ht){var ot=void 0;ot=ht.isParent()?g.get(m.get(ht.id())):g.get(ht.id()),ht.neighborhood().nodes().forEach(function(ct){o.intersection(ht.edgesWith(ct)).length>0&&(ct.isParent()?T[ot].push(m.get(ct.id())):T[ot].push(ct.id()))})});var dt=function(ht){var ot=g.get(ht),ct=void 0;c.get(ht).forEach(function(M){ct=r.getElementById(M).isParent()?m.get(M):M,T[ot].push(ct),T[g.get(ct)].push(ht)})},st=!0,Ct=!1,$=void 0;try{for(var pt=c.keys()[Symbol.iterator](),vt;!(st=(vt=pt.next()).done);st=!0){var Bt=vt.value;dt(Bt)}}catch(ht){Ct=!0,$=ht}finally{try{!st&&pt.return&&pt.return()}finally{if(Ct)throw $}}q=g.size;var Yt=void 0;if(q>2){w=q<f.sampleSize?q:f.sampleSize;for(var Mt=0;Mt<q;Mt++)V[Mt]=[];for(var _t=0;_t<w;_t++)O[_t]=[];return f.quality=="draft"||f.step=="all"?(G(y),F(),H(),Yt={nodeIndexes:g,xCoords:A,yCoords:R}):(g.forEach(function(ht,ot){A.push(r.getElementById(ot).position("x")),R.push(r.getElementById(ot).position("y"))}),Yt={nodeIndexes:g,xCoords:A,yCoords:R}),Yt}else{var Ht=g.keys(),Ut=r.getElementById(Ht.next().value),Rt=Ut.position(),Vt=Ut.outerWidth();if(A.push(Rt.x),R.push(Rt.y),q==2){var Gt=r.getElementById(Ht.next().value).outerWidth();A.push(Rt.x+Vt/2+Gt/2+f.idealEdgeLength),R.push(Rt.y)}return Yt={nodeIndexes:g,xCoords:A,yCoords:R},Yt}}}}),579:((a,n,t)=>{var e=t(212),l=function(i){i&&i("layout","fcose",e)};typeof cytoscape<"u"&&l(cytoscape),a.exports=l}),140:(a=>{a.exports=C})},N={};function p(a){var n=N[a];if(n!==void 0)return n.exports;var t=N[a]={exports:{}};return _[a](t,t.exports,p),t.exports}return p(579)})()})}))(),1),Me={L:"left",R:"right",T:"top",B:"bottom"},_e={L:nt(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:nt(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:nt(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:nt(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},oe={L:nt((x,I)=>x-I+2,"L"),R:nt((x,I)=>x-2,"R"),T:nt((x,I)=>x-I+2,"T"),B:nt((x,I)=>x-2,"B")},di=nt(function(x){return St(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),xe=nt(function(x){let I=x;return I==="L"||I==="R"||I==="T"||I==="B"},"isArchitectureDirection"),St=nt(function(x){let I=x;return I==="L"||I==="R"},"isArchitectureDirectionX"),Wt=nt(function(x){let I=x;return I==="T"||I==="B"},"isArchitectureDirectionY"),fe=nt(function(x,I){let C=St(x)&&Wt(I),_=Wt(x)&&St(I);return C||_},"isArchitectureDirectionXY"),gi=nt(function(x){let I=x[0],C=x[1],_=St(I)&&Wt(C),N=Wt(I)&&St(C);return _||N},"isArchitecturePairXY"),ci=nt(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),pe=nt(function(x,I){let C=`${x}${I}`;return ci(C)?C:void 0},"getArchitectureDirectionPair"),ui=nt(function([x,I],C){let _=C[0],N=C[1];return St(_)?Wt(N)?[x+(_==="L"?-1:1),I+(N==="T"?1:-1)]:[x+(_==="L"?-1:1),I]:St(N)?[x+(N==="L"?1:-1),I+(_==="T"?1:-1)]:[x,I+(_==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fi=nt(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),pi=nt(function(x,I){return fe(x,I)?"bend":St(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),mi=nt(function(x){return x.type==="service"},"isArchitectureService"),vi=nt(function(x){return x.type==="junction"},"isArchitectureJunction"),Oe=nt((x,I)=>{let[C,_]=[x,I].sort();return`${JSON.stringify(C)}-${JSON.stringify(_)}`},"architectureGroupAlignmentKey"),De=nt(x=>x.data(),"edgeData"),Kt=nt(x=>x.data(),"nodeData"),yi=Qe.architecture,Re=(te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ze,this.getAccTitle=ii,this.setDiagramTitle=qe,this.getDiagramTitle=ei,this.getAccDescription=ti,this.setAccDescription=$e,this.clear()}setDiagramId(I){this.diagramId=I}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",Je()}addService({id:I,icon:C,in:_,title:N,iconText:p}){if(this.registeredIds.has(I))throw Error(`The service id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(_!==void 0){if(I===_)throw Error(`The service [${I}] cannot be placed within itself`);if(!this.registeredIds.has(_))throw Error(`The service [${I}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(_)==="node")throw Error(`The service [${I}]'s parent is not a group`)}this.registeredIds.set(I,"node"),this.nodes.set(I,{id:I,type:"service",icon:C,iconText:p,title:N,edges:[],in:_})}getServices(){return[...this.nodes.values()].filter(mi)}addJunction({id:I,in:C}){if(this.registeredIds.has(I))throw Error(`The junction id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(C!==void 0){if(I===C)throw Error(`The junction [${I}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw Error(`The junction [${I}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw Error(`The junction [${I}]'s parent is not a group`)}this.registeredIds.set(I,"node"),this.nodes.set(I,{id:I,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(vi)}getNodes(){return[...this.nodes.values()]}getNode(I){return this.nodes.get(I)??null}addGroup({id:I,icon:C,in:_,title:N}){if(this.registeredIds.has(I))throw Error(`The group id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(_!==void 0){if(I===_)throw Error(`The group [${I}] cannot be placed within itself`);if(!this.registeredIds.has(_))throw Error(`The group [${I}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(_)==="node")throw Error(`The group [${I}]'s parent is not a group`)}this.registeredIds.set(I,"group"),this.groups.set(I,{id:I,icon:C,title:N,in:_})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:I,rhsId:C,lhsDir:_,rhsDir:N,lhsInto:p,rhsInto:a,lhsGroup:n,rhsGroup:t,title:e}){if(!xe(_))throw Error(`Invalid direction given for left hand side of edge ${I}--${C}. Expected (L,R,T,B) got ${String(_)}`);if(!xe(N))throw Error(`Invalid direction given for right hand side of edge ${I}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(I)&&!this.groups.has(I))throw Error(`The left-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(I).in,i=this.nodes.get(C).in;if(n&&l&&i&&l==i)throw Error(`The left-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(t&&l&&i&&l==i)throw Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:I,lhsDir:_,lhsInto:p,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:a,rhsGroup:t,title:e};this.edges.push(f);let r=this.nodes.get(I),o=this.nodes.get(C);r&&o&&(r.edges.push(this.edges[this.edges.length-1]),o.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(I){if(I.members.length<2)throw Error(`An align directive requires at least two members; got ${I.members.length}`);let C=new Set;I.members.forEach(_=>{if(this.registeredIds.get(_)!=="node")throw Error(`align ${I.direction} references [${_}], which is not a service or junction`);if(C.has(_))throw Error(`align ${I.direction} lists [${_}] more than once`);C.add(_)}),this.layoutHints.push(I)}getLayoutHints(){return this.layoutHints}getDataStructures(){var I,C;if(this.dataStructures===void 0){let _=new Map,N=new Map;for(let[e,l]of this.nodes.entries()){let i=new Map;for(let f of l.edges){let r=(I=this.getNode(f.lhsId))==null?void 0:I.in,o=(C=this.getNode(f.rhsId))==null?void 0:C.in;if(r&&o&&r!==o){let d=pi(f.lhsDir,f.rhsDir);d!=="bend"&&_.set(Oe(r,o),d)}if(f.lhsId===e){let d=pe(f.lhsDir,f.rhsDir);d&&i.set(d,f.rhsId)}else{let d=pe(f.rhsDir,f.lhsDir);d&&i.set(d,f.lhsId)}}N.set(e,i)}let p=new Set,a=new Set(N.keys()),n=nt(e=>{let l=new Map([[e,[0,0]]]),i=[e];for(;i.length>0;){let f=i.shift();if(f){p.add(f),a.delete(f);let r=N.get(f);if(!r)throw Error(`BFS error: adjacency list for id ${f} not found. Please report this as a bug.`);let o=l.get(f);if(!o)throw Error(`BFS error: position for id ${f} not found in spatial map. Please report this as a bug.`);let[d,s]=o;r.forEach((c,g)=>{p.has(c)||(l.set(c,ui([d,s],g)),i.push(c))})}}return l},"BFS"),t=[];for(;a.size>0;){let e=a.values().next().value;t.push(n(e))}this.dataStructures={adjList:N,spatialMaps:t,groupAlignments:_}}return this.dataStructures}setElementForId(I,C){this.elements.set(I,C)}getElementById(I){return this.elements.get(I)}getConfig(){return Be({...yi,...Ke().architecture})}getConfigField(I){return this.getConfig()[I]}},nt(te,"ArchitectureDB"),te),Ei=nt((x,I)=>{var C;si(x,I),x.groups.map(_=>I.addGroup(_)),x.services.map(_=>I.addService({..._,type:"service"})),x.junctions.map(_=>I.addJunction({..._,type:"junction"})),x.edges.map(_=>I.addEdge(_)),(C=x.alignments)==null||C.map(_=>I.addLayoutHint({direction:_.direction,members:[..._.members]}))},"populateDb"),be={parser:{yy:void 0},parse:nt(async x=>{var _;let I=await hi("architecture",x);we.debug(I);let C=(_=be.parser)==null?void 0:_.yy;if(!(C instanceof Re))throw Error("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.");Ei(I,C)},"parse")},Ti=nt(x=>`
1
+ var te;import{o as ze,t as de}from"./chunk-C4rtOYze.js";import"./purify.es-Bwm8T4QC.js";import{a as Be,l as Ve}from"./chunk-NSK5VX7P-B_lLBcNS.js";import{u as We}from"./src-DRYM6eUR.js";import{n as nt}from"./chunk-Y2CYZVJY-BLNiTciS.js";import{t as we}from"./src-BydIU0H9.js";import{H as $e,J as je,K as qe,U as Ze,a as Je,b as Ke,f as Qe,v as ti,w as ei,x as ge,y as ii,z as ri}from"./chunk-I66GZJ75-BWcitPjS.js";import{t as oi}from"./chunk-3NCLNEKW-DYppyU2y.js";import"./dist-BdgY02GB.js";import{i as ni,r as ai,t as ce}from"./chunk-4I5QYGJK-o2gGFKEO.js";import{n as ue}from"./chunk-WRU74C26-HbDQnuwB.js";import"./chunk-KEIR6QF5-DALP8ow3.js";import"./chunk-MOZMSUNE-t37mHxNa.js";import"./chunk-OSBZ3O6U-3f38erx3.js";import"./chunk-5JV3BV7I-EFAb-cXP.js";import"./chunk-CYSBUYHQ-Cx6JgR38.js";import"./chunk-BIQX33UG-Clm0kIyq.js";import"./chunk-EMLP6XTP-DrNgCa2u.js";import"./chunk-YOTPTUD7-CC6lxUuz.js";import"./chunk-QBLGF6JB-CHob4JDY.js";import"./chunk-5TONJI2A-BtGpymP5.js";import"./chunk-5HE753X5-DySWu3WO.js";import"./chunk-U6XO7XAA-Ct1fe-tp.js";import"./chunk-JG7HCLWE-D4-rg2bS.js";import"./chunk-CQNSW5MT-CxPDGEiS.js";import"./chunk-R7FJI6CG-ClJ6eR5G.js";import"./chunk-5FCAYU7R-B4Jz9Jv5.js";import{t as si}from"./chunk-JWPE2WC7-CIIO5B1k.js";import{n as hi}from"./mermaid-parser.core-7L0n-40M.js";import{t as Ce}from"./cytoscape.esm-ohuTJsWI.js";var Le=de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_():typeof define=="function"&&define.amd?define([],_):typeof x=="object"?x.layoutBase=_():C.layoutBase=_()})(x,function(){return(function(C){var _={};function N(p){if(_[p])return _[p].exports;var a=_[p]={i:p,l:!1,exports:{}};return C[p].call(a.exports,a,a.exports,N),a.l=!0,a.exports}return N.m=C,N.c=_,N.i=function(p){return p},N.d=function(p,a,n){N.o(p,a)||Object.defineProperty(p,a,{configurable:!1,enumerable:!0,get:n})},N.n=function(p){var a=p&&p.__esModule?function(){return p.default}:function(){return p};return N.d(a,"a",a),a},N.o=function(p,a){return Object.prototype.hasOwnProperty.call(p,a)},N.p="",N(N.s=28)})([(function(C,_,N){function p(){}p.QUALITY=1,p.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,p.DEFAULT_INCREMENTAL=!1,p.DEFAULT_ANIMATION_ON_LAYOUT=!0,p.DEFAULT_ANIMATION_DURING_LAYOUT=!1,p.DEFAULT_ANIMATION_PERIOD=50,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,p.DEFAULT_GRAPH_MARGIN=15,p.NODE_DIMENSIONS_INCLUDE_LABELS=!1,p.SIMPLE_NODE_SIZE=40,p.SIMPLE_NODE_HALF_SIZE=p.SIMPLE_NODE_SIZE/2,p.EMPTY_COMPOUND_NODE_SIZE=40,p.MIN_EDGE_LENGTH=1,p.WORLD_BOUNDARY=1e6,p.INITIAL_WORLD_BOUNDARY=p.WORLD_BOUNDARY/1e3,p.WORLD_CENTER_X=1200,p.WORLD_CENTER_Y=900,C.exports=p}),(function(C,_,N){var p=N(2),a=N(8),n=N(9);function t(l,i,f){p.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=l,this.target=i}for(var e in t.prototype=Object.create(p.prototype),p)t[e]=p[e];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},t.prototype.getOtherEndInGraph=function(l,i){for(var f=this.getOtherEnd(l),r=i.getGraphManager().getRoot();;){if(f.getOwner()==i)return f;if(f.getOwner()==r)break;f=f.getOwner().getParent()}return null},t.prototype.updateLength=function(){var l=[,,,,];this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=t}),(function(C,_,N){function p(a){this.vGraphObject=a}C.exports=p}),(function(C,_,N){var p=N(2),a=N(10),n=N(13),t=N(0),e=N(16),l=N(5);function i(r,o,d,s){d==null&&s==null&&(s=o),p.call(this,s),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=r,d!=null&&o!=null?this.rect=new n(o.x,o.y,d.width,d.height):this.rect=new n}for(var f in i.prototype=Object.create(p.prototype),p)i[f]=p[f];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(r){this.rect.width=r},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(r){this.rect.height=r},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(r,o){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=o.width,this.rect.height=o.height},i.prototype.setCenter=function(r,o){this.rect.x=r-this.rect.width/2,this.rect.y=o-this.rect.height/2},i.prototype.setLocation=function(r,o){this.rect.x=r,this.rect.y=o},i.prototype.moveBy=function(r,o){this.rect.x+=r,this.rect.y+=o},i.prototype.getEdgeListToNode=function(r){var o=[],d=this;return d.edges.forEach(function(s){if(s.target==r){if(s.source!=d)throw"Incorrect edge source!";o.push(s)}}),o},i.prototype.getEdgesBetween=function(r){var o=[],d=this;return d.edges.forEach(function(s){if(!(s.source==d||s.target==d))throw"Incorrect edge source and/or target";(s.target==r||s.source==r)&&o.push(s)}),o},i.prototype.getNeighborsList=function(){var r=new Set,o=this;return o.edges.forEach(function(d){if(d.source==o)r.add(d.target);else{if(d.target!=o)throw"Incorrect incidency!";r.add(d.source)}}),r},i.prototype.withChildren=function(){var r=new Set,o,d;if(r.add(this),this.child!=null)for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],d=o.withChildren(),d.forEach(function(g){r.add(g)});return r},i.prototype.getNoOfChildren=function(){var r=0,o;if(this.child==null)r=1;else for(var d=this.child.getNodes(),s=0;s<d.length;s++)o=d[s],r+=o.getNoOfChildren();return r==0&&(r=1),r},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){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)},i.prototype.scatter=function(){var r,o,d=-t.INITIAL_WORLD_BOUNDARY,s=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_X+e.nextDouble()*(s-d)+d;var c=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;o=t.WORLD_CENTER_Y+e.nextDouble()*(g-c)+c,this.rect.x=r,this.rect.y=o},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.getRight()-r.getLeft(),d=r.getBottom()-r.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(d+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>d?(this.rect.y-=(this.labelHeight-d)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(d+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(r){var o=this.rect.x;o>t.WORLD_BOUNDARY?o=t.WORLD_BOUNDARY:o<-t.WORLD_BOUNDARY&&(o=-t.WORLD_BOUNDARY);var d=this.rect.y;d>t.WORLD_BOUNDARY?d=t.WORLD_BOUNDARY:d<-t.WORLD_BOUNDARY&&(d=-t.WORLD_BOUNDARY);var s=new l(o,d),c=r.inverseTransformPoint(s);this.setLocation(c.x,c.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=i}),(function(C,_,N){var p=N(0);function a(){}for(var n in p)a[n]=p[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,a.MAX_NODE_DISPLACEMENT=a.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=a}),(function(C,_,N){function p(a,n){a==null&&n==null?(this.x=0,this.y=0):(this.x=a,this.y=n)}p.prototype.getX=function(){return this.x},p.prototype.getY=function(){return this.y},p.prototype.setX=function(a){this.x=a},p.prototype.setY=function(a){this.y=a},p.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},p.prototype.getCopy=function(){return new p(this.x,this.y)},p.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},C.exports=p}),(function(C,_,N){var p=N(2),a=N(10),n=N(0),t=N(7),e=N(3),l=N(1),i=N(13),f=N(12),r=N(11);function o(s,c,g){p.call(this,g),this.estimatedSize=a.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=s,c!=null&&c instanceof t?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}for(var d in o.prototype=Object.create(p.prototype),p)o[d]=p[d];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(s,c,g){if(c==null&&g==null){var m=s;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var T=s;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(c.owner==g.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner==g.owner?(T.source=c,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),c.edges.push(T),g!=c&&g.edges.push(T),T):null}},o.prototype.remove=function(s){var c=s;if(s instanceof e){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=c.edges.slice(),m,T=g.length,A=0;A<T;A++)m=g[A],m.isInterGraph?this.graphManager.remove(m):m.source.owner.remove(m);var R=this.nodes.indexOf(c);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(s instanceof l){var m=s;if(m==null)throw"Edge is null!";if(!(m.source!=null&&m.target!=null))throw"Source and/or target is null!";if(!(m.source.owner!=null&&m.target.owner!=null&&m.source.owner==this&&m.target.owner==this))throw"Source and/or target owner is invalid!";var P=m.source.edges.indexOf(m),S=m.target.edges.indexOf(m);if(!(P>-1&&S>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(P,1),m.target!=m.source&&m.target.edges.splice(S,1);var R=m.source.owner.getEdges().indexOf(m);if(R==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(R,1)}},o.prototype.updateLeftTop=function(){for(var s=a.MAX_VALUE,c=a.MAX_VALUE,g,m,T,A=this.getNodes(),R=A.length,P=0;P<R;P++){var S=A[P];g=S.getTop(),m=S.getLeft(),s>g&&(s=g),c>m&&(c=m)}return s==a.MAX_VALUE?null:(T=A[0].getParent().paddingLeft==null?this.margin:A[0].getParent().paddingLeft,this.left=c-T,this.top=s-T,new f(this.left,this.top))},o.prototype.updateBounds=function(s){for(var c=a.MAX_VALUE,g=-a.MAX_VALUE,m=a.MAX_VALUE,T=-a.MAX_VALUE,A,R,P,S,V,Z=this.nodes,O=Z.length,q=0;q<O;q++){var h=Z[q];s&&h.child!=null&&h.updateBounds(),A=h.getLeft(),R=h.getRight(),P=h.getTop(),S=h.getBottom(),c>A&&(c=A),g<R&&(g=R),m>P&&(m=P),T<S&&(T=S)}var E=new i(c,m,g-c,T-m);c==a.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),V=Z[0].getParent().paddingLeft==null?this.margin:Z[0].getParent().paddingLeft,this.left=E.x-V,this.right=E.x+E.width+V,this.top=E.y-V,this.bottom=E.y+E.height+V},o.calculateBounds=function(s){for(var c=a.MAX_VALUE,g=-a.MAX_VALUE,m=a.MAX_VALUE,T=-a.MAX_VALUE,A,R,P,S,V=s.length,Z=0;Z<V;Z++){var O=s[Z];A=O.getLeft(),R=O.getRight(),P=O.getTop(),S=O.getBottom(),c>A&&(c=A),g<R&&(g=R),m>P&&(m=P),T<S&&(T=S)}return new i(c,m,g-c,T-m)},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var s=0,c=this.nodes,g=c.length,m=0;m<g;m++){var T=c[m];s+=T.calcEstimatedSize()}return s==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=s/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var s=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new r,g=new Set,m=this.nodes[0],T,A;for(m.withChildren().forEach(function(V){c.push(V),g.add(V)});c.length!==0;){m=c.shift(),T=m.getEdges();for(var R=T.length,P=0;P<R;P++)A=T[P].getOtherEndInGraph(m,this),A!=null&&!g.has(A)&&A.withChildren().forEach(function(V){c.push(V),g.add(V)})}if(this.isConnected=!1,g.size>=this.nodes.length){var S=0;g.forEach(function(V){V.owner==s&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},C.exports=o}),(function(C,_,N){var p,a=N(1);function n(t){p=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),l=this.add(t,e);return this.setRootGraph(l),this.rootGraph},n.prototype.add=function(t,e,l,i,f){if(l==null&&i==null&&f==null){if(t==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{f=l,i=e,l=t;var r=i.getOwner(),o=f.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==o)return l.isInterGraph=!1,r.add(l,i,f);if(l.isInterGraph=!0,l.source=i,l.target=f,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},n.prototype.remove=function(t){if(t instanceof p){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(e.getEdges());for(var i,f=l.length,r=0;r<f;r++)i=l[r],e.remove(i);var o=[];o=o.concat(e.getNodes());var d;f=o.length;for(var r=0;r<f;r++)d=o[r],e.remove(d);e==this.rootGraph&&this.setRootGraph(null);var s=this.graphs.indexOf(e);this.graphs.splice(s,1),e.parent=null}else if(t instanceof a){if(i=t,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var s=i.source.edges.indexOf(i);if(i.source.edges.splice(s,1),s=i.target.edges.indexOf(i),i.target.edges.splice(s,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var s=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(s,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),l=e.length,i=0;i<l;i++)t=t.concat(e[i].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var l=0;l<e.length;l++)t=t.concat(e[l].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent??(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var l=t.getOwner(),i;do{if(i=l.getParent(),i==null)break;if(i==e)return!0;if(l=i.getOwner(),l==null)break}while(!0);l=e.getOwner();do{if(i=l.getParent(),i==null)break;if(i==t)return!0;if(l=i.getOwner(),l==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,l,i,f,r=this.getAllEdges(),o=r.length,d=0;d<o;d++){if(t=r[d],e=t.source,l=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=l,e==l){t.lca=e.getOwner();continue}for(i=e.getOwner();t.lca==null;){for(t.targetInLca=l,f=l.getOwner();t.lca==null;){if(f==i){t.lca=f;break}if(f==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=f.getParent(),f=t.targetInLca.getOwner()}if(i==this.rootGraph)break;t.lca??(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var l=t.getOwner();do{if(l==null)break;var i=e.getOwner();do{if(i==null)break;if(i==l)return i;i=i.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},n.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var l,i=t.getNodes(),f=i.length,r=0;r<f;r++)l=i[r],l.inclusionTreeDepth=e,l.child!=null&&this.calcInclusionTreeDepths(l.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],l=this.edges.length,i=0;i<l;i++)t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var i=0;i<e.length;i++)this.remove(e[i]);return!1},C.exports=n}),(function(C,_,N){var p=N(12);function a(){}a.calcSeparationAmount=function(n,t,e,l){if(!n.intersects(t))throw"assert failed";var i=[,,];this.decideDirectionsForOverlappingNodes(n,t,i),e[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),e[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var f=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(f=1);var r=f*e[0],o=e[1]/f;e[0]<o?o=e[0]:r=e[1],e[0]=-1*i[0]*(o/2+l),e[1]=-1*i[1]*(r/2+l)},a.decideDirectionsForOverlappingNodes=function(n,t,e){n.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,n.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},a.getIntersection2=function(n,t,e){var l=n.getCenterX(),i=n.getCenterY(),f=t.getCenterX(),r=t.getCenterY();if(n.intersects(t))return e[0]=l,e[1]=i,e[2]=f,e[3]=r,!0;var o=n.getX(),d=n.getY(),s=n.getRight(),c=n.getX(),g=n.getBottom(),m=n.getRight(),T=n.getWidthHalf(),A=n.getHeightHalf(),R=t.getX(),P=t.getY(),S=t.getRight(),V=t.getX(),Z=t.getBottom(),O=t.getRight(),q=t.getWidthHalf(),h=t.getHeightHalf(),E=!1,u=!1;if(l===f){if(i>r)return e[0]=l,e[1]=d,e[2]=f,e[3]=Z,!1;if(i<r)return e[0]=l,e[1]=g,e[2]=f,e[3]=P,!1}else if(i===r){if(l>f)return e[0]=o,e[1]=i,e[2]=S,e[3]=r,!1;if(l<f)return e[0]=s,e[1]=i,e[2]=R,e[3]=r,!1}else{var y=n.height/n.width,v=t.height/t.width,w=(r-i)/(f-l),L=void 0,b=void 0,G=void 0,F=void 0,H=void 0,W=void 0;if(-y===w?l>f?(e[0]=c,e[1]=g,E=!0):(e[0]=s,e[1]=d,E=!0):y===w&&(l>f?(e[0]=o,e[1]=d,E=!0):(e[0]=m,e[1]=g,E=!0)),-v===w?f>l?(e[2]=V,e[3]=Z,u=!0):(e[2]=S,e[3]=P,u=!0):v===w&&(f>l?(e[2]=R,e[3]=P,u=!0):(e[2]=O,e[3]=Z,u=!0)),E&&u)return!1;if(l>f?i>r?(L=this.getCardinalDirection(y,w,4),b=this.getCardinalDirection(v,w,2)):(L=this.getCardinalDirection(-y,w,3),b=this.getCardinalDirection(-v,w,1)):i>r?(L=this.getCardinalDirection(-y,w,1),b=this.getCardinalDirection(-v,w,3)):(L=this.getCardinalDirection(y,w,2),b=this.getCardinalDirection(v,w,4)),!E)switch(L){case 1:F=d,G=l+-A/w,e[0]=G,e[1]=F;break;case 2:G=m,F=i+T*w,e[0]=G,e[1]=F;break;case 3:F=g,G=l+A/w,e[0]=G,e[1]=F;break;case 4:G=c,F=i+-T*w,e[0]=G,e[1]=F;break}if(!u)switch(b){case 1:W=P,H=f+-h/w,e[2]=H,e[3]=W;break;case 2:H=O,W=r+q*w,e[2]=H,e[3]=W;break;case 3:W=Z,H=f+h/w,e[2]=H,e[3]=W;break;case 4:H=V,W=r+-q*w,e[2]=H,e[3]=W;break}}return!1},a.getCardinalDirection=function(n,t,e){return n>t?e:1+e%4},a.getIntersection=function(n,t,e,l){if(l==null)return this.getIntersection2(n,t,e);var i=n.x,f=n.y,r=t.x,o=t.y,d=e.x,s=e.y,c=l.x,g=l.y,m=void 0,T=void 0,A=void 0,R=void 0,P=void 0,S=void 0,V=void 0,Z=void 0,O=void 0;return A=o-f,P=i-r,V=r*f-i*o,R=g-s,S=d-c,Z=c*s-d*g,O=A*S-R*P,O===0?null:(m=(P*Z-S*V)/O,T=(R*V-A*Z)/O,new p(m,T))},a.angleOfVector=function(n,t,e,l){var i=void 0;return n===e?i=l<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((l-t)/(e-n)),e<n?i+=Math.PI:l<t&&(i+=this.TWO_PI)),i},a.doIntersect=function(n,t,e,l){var i=n.x,f=n.y,r=t.x,o=t.y,d=e.x,s=e.y,c=l.x,g=l.y,m=(r-i)*(g-s)-(c-d)*(o-f);if(m===0)return!1;var T=((g-s)*(c-i)+(d-c)*(g-f))/m,A=((f-o)*(c-i)+(r-i)*(g-f))/m;return 0<T&&T<1&&0<A&&A<1},a.findCircleLineIntersections=function(n,t,e,l,i,f,r){var o=(e-n)*(e-n)+(l-t)*(l-t),d=2*((n-i)*(e-n)+(t-f)*(l-t)),s=(n-i)*(n-i)+(t-f)*(t-f)-r*r;if(d*d-4*o*s>=0){var c=(-d+Math.sqrt(d*d-4*o*s))/(2*o),g=(-d-Math.sqrt(d*d-4*o*s))/(2*o);return c>=0&&c<=1?[c]:g>=0&&g<=1?[g]:null}else return null},a.HALF_PI=.5*Math.PI,a.ONE_AND_HALF_PI=1.5*Math.PI,a.TWO_PI=2*Math.PI,a.THREE_PI=3*Math.PI,C.exports=a}),(function(C,_,N){function p(){}p.sign=function(a){return a>0?1:a<0?-1:0},p.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},p.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},C.exports=p}),(function(C,_,N){function p(){}p.MAX_VALUE=2147483647,p.MIN_VALUE=-2147483648,C.exports=p}),(function(C,_,N){var p=(function(){function l(i,f){for(var r=0;r<f.length;r++){var o=f[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}return function(i,f,r){return f&&l(i.prototype,f),r&&l(i,r),i}})();function a(l,i){if(!(l instanceof i))throw TypeError("Cannot call a class as a function")}var n=function(l){return{value:l,next:null,prev:null}},t=function(l,i,f,r){return l===null?r.head=i:l.next=i,f===null?r.tail=i:f.prev=i,i.prev=l,i.next=f,r.length++,i},e=function(l,i){var f=l.prev,r=l.next;return f===null?i.head=r:f.next=r,r===null?i.tail=f:r.prev=f,l.prev=l.next=null,i.length--,l};C.exports=(function(){function l(i){var f=this;a(this,l),this.length=0,this.head=null,this.tail=null,i==null||i.forEach(function(r){return f.push(r)})}return p(l,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,f){return t(f.prev,n(i),f,this)}},{key:"insertAfter",value:function(i,f){return t(f,n(i),f.next,this)}},{key:"insertNodeBefore",value:function(i,f){return t(f.prev,i,f,this)}},{key:"insertNodeAfter",value:function(i,f){return t(f,i,f.next,this)}},{key:"push",value:function(i){return t(this.tail,n(i),null,this)}},{key:"unshift",value:function(i){return t(null,n(i),this.head,this)}},{key:"remove",value:function(i){return e(i,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var f=1,r=this.head;f<i;)r=r.next,f++;return r.value}}},{key:"set_object_at",value:function(i,f){if(i<=this.length()){for(var r=1,o=this.head;r<i;)o=o.next,r++;o.value=f}}}]),l})()}),(function(C,_,N){function p(a,n,t){this.x=null,this.y=null,a==null&&n==null&&t==null?(this.x=0,this.y=0):typeof a=="number"&&typeof n=="number"&&t==null?(this.x=a,this.y=n):a.constructor.name=="Point"&&n==null&&t==null&&(t=a,this.x=t.x,this.y=t.y)}p.prototype.getX=function(){return this.x},p.prototype.getY=function(){return this.y},p.prototype.getLocation=function(){return new p(this.x,this.y)},p.prototype.setLocation=function(a,n,t){a.constructor.name=="Point"&&n==null&&t==null?(t=a,this.setLocation(t.x,t.y)):typeof a=="number"&&typeof n=="number"&&t==null&&(parseInt(a)==a&&parseInt(n)==n?this.move(a,n):(this.x=Math.floor(a+.5),this.y=Math.floor(n+.5)))},p.prototype.move=function(a,n){this.x=a,this.y=n},p.prototype.translate=function(a,n){this.x+=a,this.y+=n},p.prototype.equals=function(a){if(a.constructor.name=="Point"){var n=a;return this.x==n.x&&this.y==n.y}return this==a},p.prototype.toString=function(){return new p().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=p}),(function(C,_,N){function p(a,n,t,e){this.x=0,this.y=0,this.width=0,this.height=0,a!=null&&n!=null&&t!=null&&e!=null&&(this.x=a,this.y=n,this.width=t,this.height=e)}p.prototype.getX=function(){return this.x},p.prototype.setX=function(a){this.x=a},p.prototype.getY=function(){return this.y},p.prototype.setY=function(a){this.y=a},p.prototype.getWidth=function(){return this.width},p.prototype.setWidth=function(a){this.width=a},p.prototype.getHeight=function(){return this.height},p.prototype.setHeight=function(a){this.height=a},p.prototype.getRight=function(){return this.x+this.width},p.prototype.getBottom=function(){return this.y+this.height},p.prototype.intersects=function(a){return!(this.getRight()<a.x||this.getBottom()<a.y||a.getRight()<this.x||a.getBottom()<this.y)},p.prototype.getCenterX=function(){return this.x+this.width/2},p.prototype.getMinX=function(){return this.getX()},p.prototype.getMaxX=function(){return this.getX()+this.width},p.prototype.getCenterY=function(){return this.y+this.height/2},p.prototype.getMinY=function(){return this.getY()},p.prototype.getMaxY=function(){return this.getY()+this.height},p.prototype.getWidthHalf=function(){return this.width/2},p.prototype.getHeightHalf=function(){return this.height/2},C.exports=p}),(function(C,_,N){var p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function a(){}a.lastID=0,a.createID=function(n){return a.isPrimitive(n)?n:(n.uniqueID==null&&(n.uniqueID=a.getString(),a.lastID++),n.uniqueID)},a.getString=function(n){return n??(n=a.lastID),"Object#"+n},a.isPrimitive=function(n){var t=n===void 0?"undefined":p(n);return n==null||t!="object"&&t!="function"},C.exports=a}),(function(C,_,N){function p(d){if(Array.isArray(d)){for(var s=0,c=Array(d.length);s<d.length;s++)c[s]=d[s];return c}else return Array.from(d)}var a=N(0),n=N(7),t=N(3),e=N(1),l=N(6),i=N(5),f=N(17),r=N(29);function o(d){r.call(this),this.layoutQuality=a.QUALITY,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=a.DEFAULT_INCREMENTAL,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}o.RANDOM_SEED=1,o.prototype=Object.create(r.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var d=new n(this);return this.graphManager=d,d},o.prototype.newGraph=function(d){return new l(null,this.graphManager,d)},o.prototype.newNode=function(d){return new t(this.graphManager,d)},o.prototype.newEdge=function(d){return new e(null,null,d)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d=this.checkLayoutSuccess()?!1:this.layout();return a.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d=this.graphManager.getAllEdges(),s=0;s<d.length;s++)d[s];for(var c=this.graphManager.getRoot().getNodes(),s=0;s<c.length;s++)c[s];this.update(this.graphManager.getRoot())}},o.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof t){var s=d;if(s.getChild()!=null)for(var c=s.getChild().getNodes(),g=0;g<c.length;g++)update(c[g]);s.vGraphObject!=null&&s.vGraphObject.update(s)}else if(d instanceof e){var m=d;m.vGraphObject!=null&&m.vGraphObject.update(m)}else if(d instanceof l){var T=d;T.vGraphObject!=null&&T.vGraphObject.update(T)}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=a.QUALITY,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=a.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(d){if(d==null)this.transform(new i(0,0));else{var s=new f,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){s.setWorldOrgX(d.x),s.setWorldOrgY(d.y),s.setDeviceOrgX(c.x),s.setDeviceOrgY(c.y);for(var g=this.getAllNodes(),m,T=0;T<g.length;T++)m=g[T],m.transform(s)}}},o.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var s,c,g=d.getNodes(),m=0;m<g.length;m++)s=g[m],c=s.getChild(),c==null||c.getNodes().length==0?s.scatter():(this.positionNodesRandomly(c),s.updateBounds())},o.prototype.getFlatForest=function(){for(var d=[],s=!0,c=this.graphManager.getRoot().getNodes(),g=!0,m=0;m<c.length;m++)c[m].getChild()!=null&&(g=!1);if(!g)return d;var T=new Set,A=[],R=new Map,P=[];for(P=P.concat(c);P.length>0&&s;){for(A.push(P[0]);A.length>0&&s;){var S=A[0];A.splice(0,1),T.add(S);for(var V=S.getEdges(),m=0;m<V.length;m++){var Z=V[m].getOtherEnd(S);if(R.get(S)!=Z)if(!T.has(Z))A.push(Z),R.set(Z,S);else{s=!1;break}}}if(!s)d=[];else{var O=[].concat(p(T));d.push(O);for(var m=0;m<O.length;m++){var q=O[m],h=P.indexOf(q);h>-1&&P.splice(h,1)}T=new Set,R=new Map}}return d},o.prototype.createDummyNodesForBendpoints=function(d){for(var s=[],c=d.source,g=this.graphManager.calcLowestCommonAncestor(d.source,d.target),m=0;m<d.bendpoints.length;m++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var A=this.newEdge(null);this.graphManager.add(A,c,T),s.add(T),c=T}var A=this.newEdge(null);return this.graphManager.add(A,c,d.target),this.edgeToDummyNodes.set(d,s),d.isInterGraph()?this.graphManager.remove(d):g.remove(d),s},o.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(p(this.edgeToDummyNodes.keys()),d);for(var s=0;s<d.length;s++){var c=d[s];if(c.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(c),m=0;m<g.length;m++){var T=g[m],A=new i(T.getCenterX(),T.getCenterY()),R=c.bendpoints.get(m);R.x=A.x,R.y=A.y,T.getOwner().remove(T)}this.graphManager.add(c,c.source,c.target)}}},o.transform=function(d,s,c,g){if(c!=null&&g!=null){var m=s;if(d<=50){var T=s/c;m-=(s-T)/50*(50-d)}else{var A=s*g;m+=(A-s)/50*(d-50)}return m}else{var R,P;return d<=50?(R=9*s/500,P=s/10):(R=9*s/50,P=-8*s),R*d+P}},o.findCenterOfTree=function(d){var s=[];s=s.concat(d);var c=[],g=new Map,m=!1,T=null;(s.length==1||s.length==2)&&(m=!0,T=s[0]);for(var A=0;A<s.length;A++){var R=s[A],P=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),P==1&&c.push(R)}var S=[];for(S=S.concat(c);!m;){var V=[];V=V.concat(S),S=[];for(var A=0;A<s.length;A++){var R=s[A],Z=s.indexOf(R);Z>=0&&s.splice(Z,1),R.getNeighborsList().forEach(function(h){if(c.indexOf(h)<0){var E=g.get(h)-1;E==1&&S.push(h),g.set(h,E)}})}c=c.concat(S),(s.length==1||s.length==2)&&(m=!0,T=s[0])}return T},o.prototype.setGraphManager=function(d){this.graphManager=d},C.exports=o}),(function(C,_,N){function p(){}p.seed=1,p.x=0,p.nextDouble=function(){return p.x=Math.sin(p.seed++)*1e4,p.x-Math.floor(p.x)},C.exports=p}),(function(C,_,N){var p=N(5);function a(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(n){this.lworldExtX=n},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(n){this.lworldExtY=n},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},a.prototype.transformX=function(n){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),t},a.prototype.transformY=function(n){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),t},a.prototype.inverseTransformX=function(n){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),t},a.prototype.inverseTransformY=function(n){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),t},a.prototype.inverseTransformPoint=function(n){return new p(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},C.exports=a}),(function(C,_,N){function p(r){if(Array.isArray(r)){for(var o=0,d=Array(r.length);o<r.length;o++)d[o]=r[o];return d}else return Array.from(r)}var a=N(15),n=N(4),t=N(0),e=N(8),l=N(9);function i(){a.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var f in i.prototype=Object.create(a.prototype),a)i[f]=a[f];i.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var r,o,d,s,c,g,m,T=this.getGraphManager().getAllEdges(),A=0;A<T.length;A++)r=T[A],o=r.idealLength,r.isInterGraph&&(s=r.getSource(),c=r.getTarget(),g=r.getSourceInLca().getEstimatedSize(),m=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=g+m-2*t.SIMPLE_NODE_SIZE),d=r.getLca().getInclusionTreeDepth(),r.idealLength+=o*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(s.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*d))},i.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),o,d=0;d<r.length;d++)o=r[d],this.calcSpringForce(o,o.idealLength)},i.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,s,c,g,m=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,d=0;d<m.length;d++)c=m[d],this.calculateRepulsionForceOfANode(c,T,r,o),T.add(c);else for(d=0;d<m.length;d++)for(c=m[d],s=d+1;s<m.length;s++)g=m[s],c.getOwner()==g.getOwner()&&this.calcRepulsionForce(c,g)},i.prototype.calcGravitationalForces=function(){for(var r,o=this.getAllNodesToApplyGravitation(),d=0;d<o.length;d++)r=o[d],this.calcGravitationalForce(r)},i.prototype.moveNodes=function(){for(var r=this.getAllNodes(),o,d=0;d<r.length;d++)o=r[d],o.move()},i.prototype.calcSpringForce=function(r,o){var d=r.getSource(),s=r.getTarget(),c,g,m,T;if(this.uniformLeafNodeSizes&&d.getChild()==null&&s.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;c=r.getLength(),c!=0&&(g=r.edgeElasticity*(c-o),m=g*(r.lengthX/c),T=g*(r.lengthY/c),d.springForceX+=m,d.springForceY+=T,s.springForceX-=m,s.springForceY-=T)},i.prototype.calcRepulsionForce=function(r,o){var d=r.getRect(),s=o.getRect(),c=[,,],g=[,,,,],m,T,A,R,P,S,V;if(d.intersects(s)){e.calcSeparationAmount(d,s,c,n.DEFAULT_EDGE_LENGTH/2),S=2*c[0],V=2*c[1];var Z=r.noOfChildren*o.noOfChildren/(r.noOfChildren+o.noOfChildren);r.repulsionForceX-=Z*S,r.repulsionForceY-=Z*V,o.repulsionForceX+=Z*S,o.repulsionForceY+=Z*V}else this.uniformLeafNodeSizes&&r.getChild()==null&&o.getChild()==null?(m=s.getCenterX()-d.getCenterX(),T=s.getCenterY()-d.getCenterY()):(e.getIntersection(d,s,g),m=g[2]-g[0],T=g[3]-g[1]),Math.abs(m)<n.MIN_REPULSION_DIST&&(m=l.sign(m)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=l.sign(T)*n.MIN_REPULSION_DIST),A=m*m+T*T,R=Math.sqrt(A),P=(r.nodeRepulsion/2+o.nodeRepulsion/2)*r.noOfChildren*o.noOfChildren/A,S=P*m/R,V=P*T/R,r.repulsionForceX-=S,r.repulsionForceY-=V,o.repulsionForceX+=S,o.repulsionForceY+=V},i.prototype.calcGravitationalForce=function(r){var o=r.getOwner(),d=(o.getRight()+o.getLeft())/2,s=(o.getTop()+o.getBottom())/2,c=r.getCenterX()-d,g=r.getCenterY()-s,m=Math.abs(c)+r.getWidth()/2,T=Math.abs(g)+r.getHeight()/2,A;r.getOwner()==this.graphManager.getRoot()?(A=o.getEstimatedSize()*this.gravityRangeFactor,(m>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*c,r.gravitationForceY=-this.gravityConstant*g)):(A=o.getEstimatedSize()*this.compoundGravityRangeFactor,(m>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},i.prototype.isConverged=function(){var r,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||o},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,o=this.graphManager.getAllNodes(),d=0;d<o.length;d++)r=o[d],r.noOfChildren=r.getNoOfChildren()},i.prototype.calcGrid=function(r){var o=0,d=0;o=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var s=Array(o),c=0;c<o;c++)s[c]=Array(d);for(var c=0;c<o;c++)for(var g=0;g<d;g++)s[c][g]=[];return s},i.prototype.addNodeToGrid=function(r,o,d){var s=0,c=0,g=0,m=0;s=parseInt(Math.floor((r.getRect().x-o)/this.repulsionRange)),c=parseInt(Math.floor((r.getRect().width+r.getRect().x-o)/this.repulsionRange)),g=parseInt(Math.floor((r.getRect().y-d)/this.repulsionRange)),m=parseInt(Math.floor((r.getRect().height+r.getRect().y-d)/this.repulsionRange));for(var T=s;T<=c;T++)for(var A=g;A<=m;A++)this.grid[T][A].push(r),r.setGridCoordinates(s,c,g,m)},i.prototype.updateGrid=function(){var r,o,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<d.length;r++)o=d[r],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(r,o,d,s){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&d||s){var c=new Set;r.surrounding=[];for(var g,m=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var A=r.startY-1;A<r.finishY+2;A++)if(!(T<0||A<0||T>=m.length||A>=m[0].length)){for(var R=0;R<m[T][A].length;R++)if(g=m[T][A][R],!(r.getOwner()!=g.getOwner()||r==g)&&!o.has(g)&&!c.has(g)){var P=Math.abs(r.getCenterX()-g.getCenterX())-(r.getWidth()/2+g.getWidth()/2),S=Math.abs(r.getCenterY()-g.getCenterY())-(r.getHeight()/2+g.getHeight()/2);P<=this.repulsionRange&&S<=this.repulsionRange&&c.add(g)}}r.surrounding=[].concat(p(c))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},i.prototype.calcRepulsionRange=function(){return 0},C.exports=i}),(function(C,_,N){var p=N(1),a=N(4);function n(e,l,i){p.call(this,e,l,i),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(var t in n.prototype=Object.create(p.prototype),p)n[t]=p[t];C.exports=n}),(function(C,_,N){var p=N(3),a=N(4);function n(e,l,i,f){p.call(this,e,l,i,f),this.nodeRepulsion=a.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=[]}for(var t in n.prototype=Object.create(p.prototype),p)n[t]=p[t];n.prototype.setGridCoordinates=function(e,l,i,f){this.startX=e,this.finishX=l,this.startY=i,this.finishY=f},C.exports=n}),(function(C,_,N){function p(a,n){this.width=0,this.height=0,a!==null&&n!==null&&(this.height=n,this.width=a)}p.prototype.getWidth=function(){return this.width},p.prototype.setWidth=function(a){this.width=a},p.prototype.getHeight=function(){return this.height},p.prototype.setHeight=function(a){this.height=a},C.exports=p}),(function(C,_,N){var p=N(14);function a(){this.map={},this.keys=[]}a.prototype.put=function(n,t){var e=p.createID(n);this.contains(e)||(this.map[e]=t,this.keys.push(n))},a.prototype.contains=function(n){return p.createID(n),this.map[n]!=null},a.prototype.get=function(n){var t=p.createID(n);return this.map[t]},a.prototype.keySet=function(){return this.keys},C.exports=a}),(function(C,_,N){var p=N(14);function a(){this.set={}}a.prototype.add=function(n){var t=p.createID(n);this.contains(t)||(this.set[t]=n)},a.prototype.remove=function(n){delete this.set[p.createID(n)]},a.prototype.clear=function(){this.set={}},a.prototype.contains=function(n){return this.set[p.createID(n)]==n},a.prototype.isEmpty=function(){return this.size()===0},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),e=t.length,l=0;l<e;l++)n.push(this.set[t[l]])},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAll=function(n){for(var t=n.length,e=0;e<t;e++){var l=n[e];this.add(l)}},C.exports=a}),(function(C,_,N){function p(){}p.multMat=function(a,n){for(var t=[],e=0;e<a.length;e++){t[e]=[];for(var l=0;l<n[0].length;l++){t[e][l]=0;for(var i=0;i<a[0].length;i++)t[e][l]+=a[e][i]*n[i][l]}}return t},p.transpose=function(a){for(var n=[],t=0;t<a[0].length;t++){n[t]=[];for(var e=0;e<a.length;e++)n[t][e]=a[e][t]}return n},p.multCons=function(a,n){for(var t=[],e=0;e<a.length;e++)t[e]=a[e]*n;return t},p.minusOp=function(a,n){for(var t=[],e=0;e<a.length;e++)t[e]=a[e]-n[e];return t},p.dotProduct=function(a,n){for(var t=0,e=0;e<a.length;e++)t+=a[e]*n[e];return t},p.mag=function(a){return Math.sqrt(this.dotProduct(a,a))},p.normalize=function(a){for(var n=[],t=this.mag(a),e=0;e<a.length;e++)n[e]=a[e]/t;return n},p.multGamma=function(a){for(var n=[],t=0,e=0;e<a.length;e++)t+=a[e];t*=-1/a.length;for(var l=0;l<a.length;l++)n[l]=t+a[l];return n},p.multL=function(a,n,t){for(var e=[],l=[],i=[],f=0;f<n[0].length;f++){for(var r=0,o=0;o<n.length;o++)r+=-.5*n[o][f]*a[o];l[f]=r}for(var d=0;d<t.length;d++){for(var s=0,c=0;c<t.length;c++)s+=t[d][c]*l[c];i[d]=s}for(var g=0;g<n.length;g++){for(var m=0,T=0;T<n[0].length;T++)m+=n[g][T]*i[T];e[g]=m}return e},C.exports=p}),(function(C,_,N){var p=(function(){function t(e,l){for(var i=0;i<l.length;i++){var f=l[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}return function(e,l,i){return l&&t(e.prototype,l),i&&t(e,i),e}})();function a(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}var n=N(11);C.exports=(function(){function t(e,l){a(this,t),(l!==null||l!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=e instanceof n?e.size():e.length,this._quicksort(e,0,i-1)}return p(t,[{key:"_quicksort",value:function(e,l,i){if(l<i){var f=this._partition(e,l,i);this._quicksort(e,l,f),this._quicksort(e,f+1,i)}}},{key:"_partition",value:function(e,l,i){for(var f=this._get(e,l),r=l,o=i;;){for(;this.compareFunction(f,this._get(e,o));)o--;for(;this.compareFunction(this._get(e,r),f);)r++;if(r<o)this._swap(e,r,o),r++,o--;else return o}}},{key:"_get",value:function(e,l){return e instanceof n?e.get_object_at(l):e[l]}},{key:"_set",value:function(e,l,i){e instanceof n?e.set_object_at(l,i):e[l]=i}},{key:"_swap",value:function(e,l,i){var f=this._get(e,l);this._set(e,l,this._get(e,i)),this._set(e,i,f)}},{key:"_defaultCompareFunction",value:function(e,l){return l>e}}]),t})()}),(function(C,_,N){function p(){}p.svd=function(a){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=a.length,this.n=a[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.m,n]),this.V=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.n,this.n]);for(var t=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.n),e=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.m),l=!0,i=!0,f=Math.min(this.m-1,this.n),r=Math.max(0,Math.min(this.n-2,this.m)),o=0;o<Math.max(f,r);o++){if(o<f){this.s[o]=0;for(var d=o;d<this.m;d++)this.s[o]=p.hypot(this.s[o],a[d][o]);if(this.s[o]!==0){a[o][o]<0&&(this.s[o]=-this.s[o]);for(var s=o;s<this.m;s++)a[s][o]/=this.s[o];a[o][o]+=1}this.s[o]=-this.s[o]}for(var c=o+1;c<this.n;c++){if((function(Tt,Nt){return Tt&&Nt})(o<f,this.s[o]!==0)){for(var g=0,m=o;m<this.m;m++)g+=a[m][o]*a[m][c];g=-g/a[o][o];for(var T=o;T<this.m;T++)a[T][c]+=g*a[T][o]}t[c]=a[o][c]}if((function(Tt,Nt){return Tt&&Nt})(l,o<f))for(var A=o;A<this.m;A++)this.U[A][o]=a[A][o];if(o<r){t[o]=0;for(var R=o+1;R<this.n;R++)t[o]=p.hypot(t[o],t[R]);if(t[o]!==0){t[o+1]<0&&(t[o]=-t[o]);for(var P=o+1;P<this.n;P++)t[P]/=t[o];t[o+1]+=1}if(t[o]=-t[o],(function(Tt,Nt){return Tt&&Nt})(o+1<this.m,t[o]!==0)){for(var S=o+1;S<this.m;S++)e[S]=0;for(var V=o+1;V<this.n;V++)for(var Z=o+1;Z<this.m;Z++)e[Z]+=t[V]*a[Z][V];for(var O=o+1;O<this.n;O++)for(var q=-t[O]/t[o+1],h=o+1;h<this.m;h++)a[h][O]+=q*e[h]}if(i)for(var E=o+1;E<this.n;E++)this.V[E][o]=t[E]}}var u=Math.min(this.n,this.m+1);if(f<this.n&&(this.s[f]=a[f][f]),this.m<u&&(this.s[u-1]=0),r+1<u&&(t[r]=a[r][u-1]),t[u-1]=0,l){for(var y=f;y<n;y++){for(var v=0;v<this.m;v++)this.U[v][y]=0;this.U[y][y]=1}for(var w=f-1;w>=0;w--)if(this.s[w]!==0){for(var L=w+1;L<n;L++){for(var b=0,G=w;G<this.m;G++)b+=this.U[G][w]*this.U[G][L];b=-b/this.U[w][w];for(var F=w;F<this.m;F++)this.U[F][L]+=b*this.U[F][w]}for(var H=w;H<this.m;H++)this.U[H][w]=-this.U[H][w];this.U[w][w]=1+this.U[w][w];for(var W=0;W<w-1;W++)this.U[W][w]=0}else{for(var K=0;K<this.m;K++)this.U[K][w]=0;this.U[w][w]=1}}if(i)for(var k=this.n-1;k>=0;k--){if((function(Tt,Nt){return Tt&&Nt})(k<r,t[k]!==0))for(var X=k+1;X<n;X++){for(var D=0,z=k+1;z<this.n;z++)D+=this.V[z][k]*this.V[z][X];D=-D/this.V[k+1][k];for(var et=k+1;et<this.n;et++)this.V[et][X]+=D*this.V[et][k]}for(var U=0;U<this.n;U++)this.V[U][k]=0;this.V[k][k]=1}for(var B=u-1,dt=0,st=2**-52,Ct=2**-966;u>0;){var $=void 0,pt=void 0;for($=u-2;$>=-1&&$!==-1;$--)if(Math.abs(t[$])<=Ct+st*(Math.abs(this.s[$])+Math.abs(this.s[$+1]))){t[$]=0;break}if($===u-2)pt=4;else{var vt=void 0;for(vt=u-1;vt>=$&&vt!==$;vt--){var Bt=(vt===u?0:Math.abs(t[vt]))+(vt===$+1?0:Math.abs(t[vt-1]));if(Math.abs(this.s[vt])<=Ct+st*Bt){this.s[vt]=0;break}}vt===$?pt=3:vt===u-1?pt=1:(pt=2,$=vt)}switch($++,pt){case 1:var Yt=t[u-2];t[u-2]=0;for(var Mt=u-2;Mt>=$;Mt--){var _t=p.hypot(this.s[Mt],Yt),Ht=this.s[Mt]/_t,Ut=Yt/_t;if(this.s[Mt]=_t,Mt!==$&&(Yt=-Ut*t[Mt-1],t[Mt-1]=Ht*t[Mt-1]),i)for(var Rt=0;Rt<this.n;Rt++)_t=Ht*this.V[Rt][Mt]+Ut*this.V[Rt][u-1],this.V[Rt][u-1]=-Ut*this.V[Rt][Mt]+Ht*this.V[Rt][u-1],this.V[Rt][Mt]=_t}break;case 2:var Vt=t[$-1];t[$-1]=0;for(var Gt=$;Gt<u;Gt++){var ht=p.hypot(this.s[Gt],Vt),ot=this.s[Gt]/ht,ct=Vt/ht;if(this.s[Gt]=ht,Vt=-ct*t[Gt],t[Gt]=ot*t[Gt],l)for(var M=0;M<this.m;M++)ht=ot*this.U[M][Gt]+ct*this.U[M][$-1],this.U[M][$-1]=-ct*this.U[M][Gt]+ot*this.U[M][$-1],this.U[M][Gt]=ht}break;case 3:var Y=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[$])),Math.abs(t[$])),J=this.s[u-1]/Y,j=this.s[u-2]/Y,tt=t[u-2]/Y,Et=this.s[$]/Y,yt=t[$]/Y,it=((j+J)*(j-J)+tt*tt)/2,ft=J*tt*(J*tt),It=0;(function(Tt,Nt){return Tt||Nt})(it!==0,ft!==0)&&(It=Math.sqrt(it*it+ft),it<0&&(It=-It),It=ft/(it+It));for(var Lt=(Et+J)*(Et-J)+It,mt=Et*yt,lt=$;lt<u-1;lt++){var gt=p.hypot(Lt,mt),Q=Lt/gt,ut=mt/gt;if(lt!==$&&(t[lt-1]=gt),Lt=Q*this.s[lt]+ut*t[lt],t[lt]=Q*t[lt]-ut*this.s[lt],mt=ut*this.s[lt+1],this.s[lt+1]=Q*this.s[lt+1],i)for(var At=0;At<this.n;At++)gt=Q*this.V[At][lt]+ut*this.V[At][lt+1],this.V[At][lt+1]=-ut*this.V[At][lt]+Q*this.V[At][lt+1],this.V[At][lt]=gt;if(gt=p.hypot(Lt,mt),Q=Lt/gt,ut=mt/gt,this.s[lt]=gt,Lt=Q*t[lt]+ut*this.s[lt+1],this.s[lt+1]=-ut*t[lt]+Q*this.s[lt+1],mt=ut*t[lt+1],t[lt+1]=Q*t[lt+1],l&&lt<this.m-1)for(var rt=0;rt<this.m;rt++)gt=Q*this.U[rt][lt]+ut*this.U[rt][lt+1],this.U[rt][lt+1]=-ut*this.U[rt][lt]+Q*this.U[rt][lt+1],this.U[rt][lt]=gt}t[u-2]=Lt,dt+=1;break;case 4:if(this.s[$]<=0&&(this.s[$]=this.s[$]<0?-this.s[$]:0,i))for(var bt=0;bt<=B;bt++)this.V[bt][$]=-this.V[bt][$];for(;$<B&&!(this.s[$]>=this.s[$+1]);){var Ot=this.s[$];if(this.s[$]=this.s[$+1],this.s[$+1]=Ot,i&&$<this.n-1)for(var Dt=0;Dt<this.n;Dt++)Ot=this.V[Dt][$+1],this.V[Dt][$+1]=this.V[Dt][$],this.V[Dt][$]=Ot;if(l&&$<this.m-1)for(var Ft=0;Ft<this.m;Ft++)Ot=this.U[Ft][$+1],this.U[Ft][$+1]=this.U[Ft][$],this.U[Ft][$]=Ot;$++}dt=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},p.hypot=function(a,n){var t=void 0;return Math.abs(a)>Math.abs(n)?(t=n/a,t=Math.abs(a)*Math.sqrt(1+t*t)):n==0?t=0:(t=a/n,t=Math.abs(n)*Math.sqrt(1+t*t)),t},C.exports=p}),(function(C,_,N){var p=(function(){function n(t,e){for(var l=0;l<e.length;l++){var i=e[l];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,l){return e&&n(t.prototype,e),l&&n(t,l),t}})();function a(n,t){if(!(n instanceof t))throw TypeError("Cannot call a class as a function")}C.exports=(function(){function n(t,e){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,n),this.sequence1=t,this.sequence2=e,this.match_score=l,this.mismatch_penalty=i,this.gap_penalty=f,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=Array(this.iMax);for(var r=0;r<this.iMax;r++){this.grid[r]=Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[r][o]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var s=0;s<this.jMax;s++)this.tracebackGrid[d][s]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return p(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var l=1;l<this.iMax;l++)for(var i=1;i<this.jMax;i++){var f=void 0;f=this.sequence1[l-1]===this.sequence2[i-1]?this.grid[l-1][i-1]+this.match_score:this.grid[l-1][i-1]+this.mismatch_penalty;var r=this.grid[l-1][i]+this.gap_penalty,o=this.grid[l][i-1]+this.gap_penalty,d=[f,r,o],s=this.arrayAllMaxIndexes(d);this.grid[l][i]=d[s[0]],this.tracebackGrid[l][i]=[s.includes(0),s.includes(1),s.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],l=this.tracebackGrid[e.pos[0]][e.pos[1]];l[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),l[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),l[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var l=[],i=-1;(i=t.indexOf(e,i+1))!==-1;)l.push(i);return l}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),n})()}),(function(C,_,N){var p=function(){};p.FDLayout=N(18),p.FDLayoutConstants=N(4),p.FDLayoutEdge=N(19),p.FDLayoutNode=N(20),p.DimensionD=N(21),p.HashMap=N(22),p.HashSet=N(23),p.IGeometry=N(8),p.IMath=N(9),p.Integer=N(10),p.Point=N(12),p.PointD=N(5),p.RandomSeed=N(16),p.RectangleD=N(13),p.Transform=N(17),p.UniqueIDGeneretor=N(14),p.Quicksort=N(25),p.LinkedList=N(11),p.LGraphObject=N(2),p.LGraph=N(6),p.LEdge=N(1),p.LGraphManager=N(7),p.LNode=N(3),p.Layout=N(15),p.LayoutConstants=N(0),p.NeedlemanWunsch=N(27),p.Matrix=N(24),p.SVD=N(26),C.exports=p}),(function(C,_,N){function p(){this.listeners=[]}var a=p.prototype;a.addListener=function(n,t){this.listeners.push({event:n,callback:t})},a.removeListener=function(n,t){for(var e=this.listeners.length;e>=0;e--){var l=this.listeners[e];l.event===n&&l.callback===t&&this.listeners.splice(e,1)}},a.emit=function(n,t){for(var e=0;e<this.listeners.length;e++){var l=this.listeners[e];n===l.event&&l.callback(t)}},C.exports=p})])})})),Ie=de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_(Le()):typeof define=="function"&&define.amd?define(["layout-base"],_):typeof x=="object"?x.coseBase=_(Le()):C.coseBase=_(C.layoutBase)})(x,function(C){return(()=>{var _={45:((a,n,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),a.exports=e}),806:((a,n,t)=>{var e=t(551).FDLayoutConstants;function l(){}for(var i in e)l[i]=e[i];l.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,l.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,l.DEFAULT_COMPONENT_SEPERATION=60,l.TILE=!0,l.TILING_PADDING_VERTICAL=10,l.TILING_PADDING_HORIZONTAL=10,l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0,l.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,l.TREE_REDUCTION_ON_INCREMENTAL=!0,l.PURE_INCREMENTAL=l.DEFAULT_INCREMENTAL,a.exports=l}),767:((a,n,t)=>{var e=t(551).FDLayoutEdge;function l(f,r,o){e.call(this,f,r,o)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),880:((a,n,t)=>{var e=t(551).LGraph;function l(f,r,o){e.call(this,f,r,o)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),578:((a,n,t)=>{var e=t(551).LGraphManager;function l(f){e.call(this,f)}for(var i in l.prototype=Object.create(e.prototype),e)l[i]=e[i];a.exports=l}),765:((a,n,t)=>{var e=t(551).FDLayout,l=t(578),i=t(880),f=t(991),r=t(767),o=t(806),d=t(902),s=t(551).FDLayoutConstants,c=t(551).LayoutConstants,g=t(551).Point,m=t(551).PointD,T=t(551).DimensionD,A=t(551).Layout,R=t(551).Integer,P=t(551).IGeometry,S=t(551).LGraph,V=t(551).Transform,Z=t(551).LinkedList;function O(){e.call(this),this.toBeTiled={},this.constraints={}}for(var q in O.prototype=Object.create(e.prototype),e)O[q]=e[q];O.prototype.newGraphManager=function(){var h=new l(this);return this.graphManager=h,h},O.prototype.newGraph=function(h){return new i(null,this.graphManager,h)},O.prototype.newNode=function(h){return new f(this.graphManager,h)},O.prototype.newEdge=function(h){return new r(null,null,h)},O.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},O.prototype.initSpringEmbedder=function(){e.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},O.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},O.prototype.classicLayout=function(){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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return h.has(y)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var u=this.getFlatForest();if(u.length>0)this.positionNodesRadially(u);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(w){return h.has(w)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(d.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},O.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return h.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},O.prototype.getPositionsData=function(){for(var h=this.graphManager.getAllNodes(),E={},u=0;u<h.length;u++){var y=h[u].rect,v=h[u].id;E[v]={id:v,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},O.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(s.ANIMATE==="during")this.emit("layoutstarted");else{for(;!h;)h=this.tick();this.graphManager.updateBounds()}},O.prototype.moveNodes=function(){for(var h=this.getAllNodes(),E,u=0;u<h.length;u++)E=h[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<h.length;u++)E=h[u],E.move()},O.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var y=E[u];this.idToNodeMap.set(y.id,y)}var v=function D(z){for(var et=z.getChild().getNodes(),U,B=0,dt=0;dt<et.length;dt++)U=et[dt],U.getChild()==null?h.fixedNodeSet.has(U.id)&&(B+=100):B+=D(U);return B};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(D){h.fixedNodeSet.add(D.nodeId)});for(var E=this.graphManager.getAllNodes(),y,u=0;u<E.length;u++)if(y=E[u],y.getChild()!=null){var w=v(y);w>0&&(y.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var L=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){h.fixedNodesOnHorizontal.add(D),h.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(z){L.set(z,"dummy"+u),h.dummyToNodeForVerticalAlignment.get("dummy"+u).push(z),h.fixedNodeSet.has(z)&&h.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,u=0;u<F.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),F[u].forEach(function(z){b.set(z,"dummy"+u),h.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(z),h.fixedNodeSet.has(z)&&h.fixedNodesOnVertical.add("dummy"+u)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var z,et,U;for(U=D.length-1;U>=2*D.length/3;U--)z=Math.floor(Math.random()*(U+1)),et=D[U],D[U]=D[z],D[z]=et;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var z=L.has(D.left)?L.get(D.left):D.left,et=L.has(D.right)?L.get(D.right):D.right;h.nodesInRelativeHorizontal.includes(z)||(h.nodesInRelativeHorizontal.push(z),h.nodeToRelativeConstraintMapHorizontal.set(z,[]),h.dummyToNodeForVerticalAlignment.has(z)?h.nodeToTempPositionMapHorizontal.set(z,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(z)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(z,h.idToNodeMap.get(z).getCenterX())),h.nodesInRelativeHorizontal.includes(et)||(h.nodesInRelativeHorizontal.push(et),h.nodeToRelativeConstraintMapHorizontal.set(et,[]),h.dummyToNodeForVerticalAlignment.has(et)?h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(et).getCenterX())),h.nodeToRelativeConstraintMapHorizontal.get(z).push({right:et,gap:D.gap}),h.nodeToRelativeConstraintMapHorizontal.get(et).push({left:z,gap:D.gap})}else{var U=b.has(D.top)?b.get(D.top):D.top,B=b.has(D.bottom)?b.get(D.bottom):D.bottom;h.nodesInRelativeVertical.includes(U)||(h.nodesInRelativeVertical.push(U),h.nodeToRelativeConstraintMapVertical.set(U,[]),h.dummyToNodeForHorizontalAlignment.has(U)?h.nodeToTempPositionMapVertical.set(U,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(U)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(U,h.idToNodeMap.get(U).getCenterY())),h.nodesInRelativeVertical.includes(B)||(h.nodesInRelativeVertical.push(B),h.nodeToRelativeConstraintMapVertical.set(B,[]),h.dummyToNodeForHorizontalAlignment.has(B)?h.nodeToTempPositionMapVertical.set(B,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(B)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(B,h.idToNodeMap.get(B).getCenterY())),h.nodeToRelativeConstraintMapVertical.get(U).push({bottom:B,gap:D.gap}),h.nodeToRelativeConstraintMapVertical.get(B).push({top:U,gap:D.gap})}});else{var H=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var z=L.has(D.left)?L.get(D.left):D.left,et=L.has(D.right)?L.get(D.right):D.right;H.has(z)?H.get(z).push(et):H.set(z,[et]),H.has(et)?H.get(et).push(z):H.set(et,[z])}else{var U=b.has(D.top)?b.get(D.top):D.top,B=b.has(D.bottom)?b.get(D.bottom):D.bottom;W.has(U)?W.get(U).push(B):W.set(U,[B]),W.has(B)?W.get(B).push(U):W.set(B,[U])}});var K=function(D,z){var et=[],U=[],B=new Z,dt=new Set,st=0;return D.forEach(function(Ct,$){if(!dt.has($)){et[st]=[],U[st]=!1;var pt=$;for(B.push(pt),dt.add(pt),et[st].push(pt);B.length!=0;)pt=B.shift(),z.has(pt)&&(U[st]=!0),D.get(pt).forEach(function(vt){dt.has(vt)||(B.push(vt),dt.add(vt),et[st].push(vt))});st++}}),{components:et,isFixed:U}},k=K(H,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=k.components,this.fixedComponentsOnHorizontal=k.isFixed;var X=K(W,h.fixedNodesOnVertical);this.componentsOnVertical=X.components,this.fixedComponentsOnVertical=X.isFixed}}},O.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(X){var D=h.idToNodeMap.get(X.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var y=0,v=0;v<E[u].length;v++){if(this.fixedNodeSet.has(E[u][v])){y=0;break}y+=this.idToNodeMap.get(E[u][v]).displacementX}for(var w=y/E[u].length,v=0;v<E[u].length;v++)this.idToNodeMap.get(E[u][v]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal)for(var L=this.constraints.alignmentConstraint.horizontal,u=0;u<L.length;u++){for(var b=0,v=0;v<L[u].length;v++){if(this.fixedNodeSet.has(L[u][v])){b=0;break}b+=this.idToNodeMap.get(L[u][v]).displacementY}for(var G=b/L[u].length,v=0;v<L[u].length;v++)this.idToNodeMap.get(L[u][v]).displacementY=G}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(X){if(!h.fixedNodesOnHorizontal.has(X)){var D=0;D=h.dummyToNodeForVerticalAlignment.has(X)?h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(X)[0]).displacementX:h.idToNodeMap.get(X).displacementX,h.nodeToRelativeConstraintMapHorizontal.get(X).forEach(function(z){if(z.right){var et=h.nodeToTempPositionMapHorizontal.get(z.right)-h.nodeToTempPositionMapHorizontal.get(X)-D;et<z.gap&&(D-=z.gap-et)}else{var et=h.nodeToTempPositionMapHorizontal.get(X)-h.nodeToTempPositionMapHorizontal.get(z.left)+D;et<z.gap&&(D+=z.gap-et)}}),h.nodeToTempPositionMapHorizontal.set(X,h.nodeToTempPositionMapHorizontal.get(X)+D),h.dummyToNodeForVerticalAlignment.has(X)?h.dummyToNodeForVerticalAlignment.get(X).forEach(function(z){h.idToNodeMap.get(z).displacementX=D}):h.idToNodeMap.get(X).displacementX=D}}),this.nodesInRelativeVertical.forEach(function(X){if(!h.fixedNodesOnHorizontal.has(X)){var D=0;D=h.dummyToNodeForHorizontalAlignment.has(X)?h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(X)[0]).displacementY:h.idToNodeMap.get(X).displacementY,h.nodeToRelativeConstraintMapVertical.get(X).forEach(function(z){if(z.bottom){var et=h.nodeToTempPositionMapVertical.get(z.bottom)-h.nodeToTempPositionMapVertical.get(X)-D;et<z.gap&&(D-=z.gap-et)}else{var et=h.nodeToTempPositionMapVertical.get(X)-h.nodeToTempPositionMapVertical.get(z.top)+D;et<z.gap&&(D+=z.gap-et)}}),h.nodeToTempPositionMapVertical.set(X,h.nodeToTempPositionMapVertical.get(X)+D),h.dummyToNodeForHorizontalAlignment.has(X)?h.dummyToNodeForHorizontalAlignment.get(X).forEach(function(z){h.idToNodeMap.get(z).displacementY=D}):h.idToNodeMap.get(X).displacementY=D}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var F=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.has(F[v])?this.dummyToNodeForVerticalAlignment.get(F[v]).forEach(function(z){h.idToNodeMap.get(z).displacementX=0}):this.idToNodeMap.get(F[v]).displacementX=0;else{for(var H=0,W=0,v=0;v<F.length;v++)if(this.dummyToNodeForVerticalAlignment.has(F[v])){var K=this.dummyToNodeForVerticalAlignment.get(F[v]);H+=K.length*this.idToNodeMap.get(K[0]).displacementX,W+=K.length}else H+=this.idToNodeMap.get(F[v]).displacementX,W++;for(var k=H/W,v=0;v<F.length;v++)this.dummyToNodeForVerticalAlignment.has(F[v])?this.dummyToNodeForVerticalAlignment.get(F[v]).forEach(function(z){h.idToNodeMap.get(z).displacementX=k}):this.idToNodeMap.get(F[v]).displacementX=k}}for(var u=0;u<this.componentsOnVertical.length;u++){var F=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var v=0;v<F.length;v++)this.dummyToNodeForHorizontalAlignment.has(F[v])?this.dummyToNodeForHorizontalAlignment.get(F[v]).forEach(function(et){h.idToNodeMap.get(et).displacementY=0}):this.idToNodeMap.get(F[v]).displacementY=0;else{for(var H=0,W=0,v=0;v<F.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(F[v])){var K=this.dummyToNodeForHorizontalAlignment.get(F[v]);H+=K.length*this.idToNodeMap.get(K[0]).displacementY,W+=K.length}else H+=this.idToNodeMap.get(F[v]).displacementY,W++;for(var k=H/W,v=0;v<F.length;v++)this.dummyToNodeForHorizontalAlignment.has(F[v])?this.dummyToNodeForHorizontalAlignment.get(F[v]).forEach(function(U){h.idToNodeMap.get(U).displacementY=k}):this.idToNodeMap.get(F[v]).displacementY=k}}}},O.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],E,u=this.graphManager.getGraphs(),y=u.length,v;for(v=0;v<y;v++)E=u[v],E.updateConnected(),E.isConnected||(h=h.concat(E.getNodes()));return h},O.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<h.length;u++){var y=h[u];if(!E.has(y)){var v=y.getSource(),w=y.getTarget();if(v==w)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),E.add(y);else{var L=[];if(L=L.concat(v.getEdgeListToNode(w)),L=L.concat(w.getEdgeListToNode(v)),!E.has(L[0])){if(L.length>1){var b;for(b=0;b<L.length;b++){var G=L[b];G.getBendpoints().push(new m),this.createDummyNodesForBendpoints(G)}}L.forEach(function(F){E.add(F)})}}}if(E.size==h.length)break}},O.prototype.positionNodesRadially=function(h){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(h.length)),y=0,v=0,w=0,L=new m(0,0),b=0;b<h.length;b++){b%u==0&&(w=0,v=y,b!=0&&(v+=o.DEFAULT_COMPONENT_SEPERATION),y=0);var G=h[b],F=A.findCenterOfTree(G);E.x=w,E.y=v,L=O.radialLayout(G,F,E),L.y>y&&(y=Math.floor(L.y)),w=Math.floor(L.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(c.WORLD_CENTER_X-L.x/2,c.WORLD_CENTER_Y-L.y/2))},O.radialLayout=function(h,E,u){var y=Math.max(this.maxDiagonalInTree(h),o.DEFAULT_RADIAL_SEPARATION);O.branchRadialLayout(E,null,0,359,0,y);var v=S.calculateBounds(h),w=new V;w.setDeviceOrgX(v.getMinX()),w.setDeviceOrgY(v.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var L=0;L<h.length;L++)h[L].transform(w);var b=new m(v.getMaxX(),v.getMaxY());return w.inverseTransformPoint(b)},O.branchRadialLayout=function(h,E,u,y,v,w){var L=(y-u+1)/2;L<0&&(L+=180);var b=(L+u)%360*P.TWO_PI/360,G=v*Math.cos(b),F=v*Math.sin(b);h.setCenter(G,F);var H=[];H=H.concat(h.getEdges());var W=H.length;E!=null&&W--;for(var K=0,k=H.length,X,D=h.getEdgesBetween(E);D.length>1;){var z=D[0];D.splice(0,1);var et=H.indexOf(z);et>=0&&H.splice(et,1),k--,W--}X=E==null?0:(H.indexOf(D[0])+1)%k;for(var U=Math.abs(y-u)/W,B=X;K!=W;B=++B%k){var dt=H[B].getOtherEnd(h);if(dt!=E){var st=(u+K*U)%360,Ct=(st+U)%360;O.branchRadialLayout(dt,h,st,Ct,v+w,w),K++}}},O.maxDiagonalInTree=function(h){for(var E=R.MIN_VALUE,u=0;u<h.length;u++){var y=h[u].getDiagonal();y>E&&(E=y)}return E},O.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},O.prototype.groupZeroDegreeMembers=function(){var h=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),v=0;v<y.length;v++){var w=y[v],L=w.getParent();this.getNodeDegreeWithChildren(w)===0&&(L.id==null||!this.getToBeTiled(L))&&u.push(w)}for(var v=0;v<u.length;v++){var w=u[v],b=w.getParent().id;E[b]===void 0&&(E[b]=[]),E[b]=E[b].concat(w)}Object.keys(E).forEach(function(G){if(E[G].length>1){var F="DummyCompound_"+G;h.memberGroups[F]=E[G];var H=E[G][0].getParent(),W=new f(h.graphManager);W.id=F,W.paddingLeft=H.paddingLeft||0,W.paddingRight=H.paddingRight||0,W.paddingBottom=H.paddingBottom||0,W.paddingTop=H.paddingTop||0,h.idToDummyNode[F]=W;var K=h.getGraphManager().add(h.newGraph(),W),k=H.getChild();k.add(W);for(var X=0;X<E[G].length;X++){var D=E[G][X];k.remove(D),K.add(D)}}})},O.prototype.clearCompounds=function(){var h={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],h[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,E)},O.prototype.clearZeroDegreeMembers=function(){var h=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=h.idToDummyNode[u];if(E[u]=h.tileNodes(h.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=E[u].width,y.rect.height=E[u].height,y.setCenter(E[u].centerX,E[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var v=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(v+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>v?(y.rect.x-=(y.labelWidth-v)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-v)/2):y.labelPosHorizontal=="right"&&y.setWidth(v+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},O.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var E=this.compoundOrder[h],u=E.id,y=E.paddingLeft,v=E.paddingTop,w=E.labelMarginLeft,L=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,y,v,w,L)}},O.prototype.repopulateZeroDegreeMembers=function(){var h=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var y=h.idToDummyNode[u],v=y.paddingLeft,w=y.paddingTop,L=y.labelMarginLeft,b=y.labelMarginTop;h.adjustLocations(E[u],y.rect.x,y.rect.y,v,w,L,b)})},O.prototype.getToBeTiled=function(h){var E=h.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=h.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var y=u.getNodes(),v=0;v<y.length;v++){var w=y[v];if(this.getNodeDegree(w)>0)return this.toBeTiled[E]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},O.prototype.getNodeDegree=function(h){h.id;for(var E=h.getEdges(),u=0,y=0;y<E.length;y++){var v=E[y];v.getSource().id!==v.getTarget().id&&(u+=1)}return u},O.prototype.getNodeDegreeWithChildren=function(h){var E=this.getNodeDegree(h);if(h.getChild()==null)return E;for(var u=h.getChild().getNodes(),y=0;y<u.length;y++){var v=u[y];E+=this.getNodeDegreeWithChildren(v)}return E},O.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},O.prototype.fillCompexOrderByDFS=function(h){for(var E=0;E<h.length;E++){var u=h[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},O.prototype.adjustLocations=function(h,E,u,y,v,w,L){E+=y+w,u+=v+L;for(var b=E,G=0;G<h.rows.length;G++){var F=h.rows[G];E=b;for(var H=0,W=0;W<F.length;W++){var K=F[W];K.rect.x=E,K.rect.y=u,E+=K.rect.width+h.horizontalPadding,K.rect.height>H&&(H=K.rect.height)}u+=H+h.verticalPadding}},O.prototype.tileCompoundMembers=function(h,E){var u=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(y){var v=E[y];if(u.tiledMemberPack[y]=u.tileNodes(h[y],v.paddingLeft+v.paddingRight),v.rect.width=u.tiledMemberPack[y].width,v.rect.height=u.tiledMemberPack[y].height,v.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var w=v.rect.width,L=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(w+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>w?(v.rect.x-=(v.labelWidth-w)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-w)/2):v.labelPosHorizontal=="right"&&v.setWidth(w+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(L+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>L?(v.rect.y-=(v.labelHeight-L)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-L)/2):v.labelPosVertical=="bottom"&&v.setHeight(L+v.labelHeight))}})},O.prototype.tileNodes=function(h,E){var u=this.tileNodesByFavoringDim(h,E,!0),y=this.tileNodesByFavoringDim(h,E,!1),v=this.getOrgRatio(u);return this.getOrgRatio(y)<v?y:u},O.prototype.getOrgRatio=function(h){var E=h.width/h.height;return E<1&&(E=1/E),E},O.prototype.calcIdealRowWidth=function(h,E){var u=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,v=h.length,w=0,L=0,b=0;h.forEach(function(X){w+=X.getWidth(),L+=X.getHeight(),X.getWidth()>b&&(b=X.getWidth())});var G=w/v,F=L/v,H=(u-y)**2+4*(G+y)*(F+u)*v,W=(y-u+Math.sqrt(H))/(2*(G+y)),K;E?(K=Math.ceil(W),K==W&&K++):K=Math.floor(W);var k=K*(G+y)-y;return b>k&&(k=b),k+=y*2,k},O.prototype.tileNodesByFavoringDim=function(h,E,u){var y=o.TILING_PADDING_VERTICAL,v=o.TILING_PADDING_HORIZONTAL,w=o.TILING_COMPARE_BY,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:v,centerX:0,centerY:0};w&&(L.idealRowWidth=this.calcIdealRowWidth(h,u));var b=function(X){return X.rect.width*X.rect.height},G=function(X,D){return b(D)-b(X)};h.sort(function(X,D){var z=G;return L.idealRowWidth?(z=w,z(X.id,D.id)):z(X,D)});for(var F=0,H=0,W=0;W<h.length;W++){var K=h[W];F+=K.getCenterX(),H+=K.getCenterY()}L.centerX=F/h.length,L.centerY=H/h.length;for(var W=0;W<h.length;W++){var K=h[W];if(L.rows.length==0)this.insertNodeToRow(L,K,0,E);else if(this.canAddHorizontal(L,K.rect.width,K.rect.height)){var k=L.rows.length-1;L.idealRowWidth||(k=this.getShortestRowIndex(L)),this.insertNodeToRow(L,K,k,E)}else this.insertNodeToRow(L,K,L.rows.length,E);this.shiftToLastRow(L)}return L},O.prototype.insertNodeToRow=function(h,E,u,y){var v=y;u==h.rows.length&&(h.rows.push([]),h.rowWidth.push(v),h.rowHeight.push(0));var w=h.rowWidth[u]+E.rect.width;h.rows[u].length>0&&(w+=h.horizontalPadding),h.rowWidth[u]=w,h.width<w&&(h.width=w);var L=E.rect.height;u>0&&(L+=h.verticalPadding);var b=0;L>h.rowHeight[u]&&(b=h.rowHeight[u],h.rowHeight[u]=L,b=h.rowHeight[u]-b),h.height+=b,h.rows[u].push(E)},O.prototype.getShortestRowIndex=function(h){for(var E=-1,u=Number.MAX_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]<u&&(E=y,u=h.rowWidth[y]);return E},O.prototype.getLongestRowIndex=function(h){for(var E=-1,u=Number.MIN_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]>u&&(E=y,u=h.rowWidth[y]);return E},O.prototype.canAddHorizontal=function(h,E,u){if(h.idealRowWidth){var y=h.rows.length-1;return h.rowWidth[y]+E+h.horizontalPadding<=h.idealRowWidth}var v=this.getShortestRowIndex(h);if(v<0)return!0;var w=h.rowWidth[v];if(w+h.horizontalPadding+E<=h.width)return!0;var L=0;h.rowHeight[v]<u&&v>0&&(L=u+h.verticalPadding-h.rowHeight[v]);var b=h.width-w>=E+h.horizontalPadding?(h.height+L)/(w+E+h.horizontalPadding):(h.height+L)/h.width;L=u+h.verticalPadding;var G=h.width<E?(h.height+L)/E:(h.height+L)/h.width;return G<1&&(G=1/G),b<1&&(b=1/b),b<G},O.prototype.shiftToLastRow=function(h){var E=this.getLongestRowIndex(h),u=h.rowWidth.length-1,y=h.rows[E],v=y[y.length-1],w=v.width+h.horizontalPadding;if(h.width-h.rowWidth[u]>w&&E!=u){y.splice(-1,1),h.rows[u].push(v),h.rowWidth[E]=h.rowWidth[E]-w,h.rowWidth[u]=h.rowWidth[u]+w,h.width=h.rowWidth[instance.getLongestRowIndex(h)];for(var L=Number.MIN_VALUE,b=0;b<y.length;b++)y[b].height>L&&(L=y[b].height);E>0&&(L+=h.verticalPadding);var G=h.rowHeight[E]+h.rowHeight[u];h.rowHeight[E]=L,h.rowHeight[u]<v.height+h.verticalPadding&&(h.rowHeight[u]=v.height+h.verticalPadding);var F=h.rowHeight[E]+h.rowHeight[u];h.height+=F-G,this.shiftToLastRow(h)}},O.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},O.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},O.prototype.reduceTrees=function(){for(var h=[],E=!0,u;E;){var y=this.graphManager.getAllNodes(),v=[];E=!1;for(var w=0;w<y.length;w++)if(u=y[w],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(o.PURE_INCREMENTAL){var L=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-L.getCenterX(),u.getCenterY()-L.getCenterY());v.push([u,u.getEdges()[0],u.getOwner(),b])}else v.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==1){for(var G=[],F=0;F<v.length;F++)v[F][0].getEdges().length==1&&(G.push(v[F]),v[F][0].getOwner().remove(v[F][0]));h.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},O.prototype.growTree=function(h){for(var E=h[h.length-1],u,y=0;y<E.length;y++)u=E[y],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},O.prototype.findPlaceforPrunedNode=function(h){var E,u,y=h[0];if(u=y==h[1].source?h[1].target:h[1].source,o.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+h[3].getWidth(),u.getCenterY()+h[3].getHeight());else{var v=u.startX,w=u.finishX,L=u.startY,b=u.finishY,G=[0,0,0,0];if(L>0)for(var F=v;F<=w;F++)G[0]+=this.grid[F][L-1].length+this.grid[F][L].length-1;if(w<this.grid.length-1)for(var F=L;F<=b;F++)G[1]+=this.grid[w+1][F].length+this.grid[w][F].length-1;if(b<this.grid[0].length-1)for(var F=v;F<=w;F++)G[2]+=this.grid[F][b+1].length+this.grid[F][b].length-1;if(v>0)for(var F=L;F<=b;F++)G[3]+=this.grid[v-1][F].length+this.grid[v][F].length-1;for(var H=R.MAX_VALUE,W,K,k=0;k<G.length;k++)G[k]<H?(H=G[k],W=1,K=k):G[k]==H&&W++;if(W==3&&H==0)G[0]==0&&G[1]==0&&G[2]==0?E=1:G[0]==0&&G[1]==0&&G[3]==0?E=0:G[0]==0&&G[2]==0&&G[3]==0?E=3:G[1]==0&&G[2]==0&&G[3]==0&&(E=2);else if(W==2&&H==0){var X=Math.floor(Math.random()*2);E=G[0]==0&&G[1]==0?X==0?0:1:G[0]==0&&G[2]==0?X==0?0:2:G[0]==0&&G[3]==0?X==0?0:3:G[1]==0&&G[2]==0?X==0?1:2:G[1]==0&&G[3]==0?X==0?1:3:X==0?2:3}else if(W==4&&H==0){var X=Math.floor(Math.random()*4);E=X}else E=K;E==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-s.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(u.getCenterX()+u.getWidth()/2+s.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):E==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+s.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-s.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},a.exports=O}),991:((a,n,t)=>{var e=t(551).FDLayoutNode,l=t(551).IMath;function i(r,o,d,s){e.call(this,r,o,d,s)}for(var f in i.prototype=Object.create(e.prototype),e)i[f]=e[f];i.prototype.calculateDisplacement=function(){var r=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementX=r.coolingFactor*r.maxNodeDisplacement*l.sign(this.displacementX)),Math.abs(this.displacementY)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementY=r.coolingFactor*r.maxNodeDisplacement*l.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(r,o){for(var d=this.getChild().getNodes(),s,c=0;c<d.length;c++)s=d[c],s.getChild()==null?(s.displacementX+=r,s.displacementY+=o):s.propogateDisplacementToChildren(r,o)},i.prototype.move=function(){var r=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),r.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},i.prototype.setPred1=function(r){this.pred1=r},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(r){this.next=r},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(r){this.processed=r},i.prototype.isProcessed=function(){return processed},a.exports=i}),902:((a,n,t)=>{function e(d){if(Array.isArray(d)){for(var s=0,c=Array(d.length);s<d.length;s++)c[s]=d[s];return c}else return Array.from(d)}var l=t(806),i=t(551).LinkedList,f=t(551).Matrix,r=t(551).SVD;function o(){}o.handleConstraints=function(d){var s={};s.fixedNodeConstraint=d.constraints.fixedNodeConstraint,s.alignmentConstraint=d.constraints.alignmentConstraint,s.relativePlacementConstraint=d.constraints.relativePlacementConstraint;for(var c=new Map,g=new Map,m=[],T=[],A=d.getAllNodes(),R=0,P=0;P<A.length;P++){var S=A[P];S.getChild()??(g.set(S.id,R++),m.push(S.getCenterX()),T.push(S.getCenterY()),c.set(S.id,S))}s.relativePlacementConstraint&&s.relativePlacementConstraint.forEach(function(M){!M.gap&&M.gap!=0&&(M.left?M.gap=l.DEFAULT_EDGE_LENGTH+c.get(M.left).getWidth()/2+c.get(M.right).getWidth()/2:M.gap=l.DEFAULT_EDGE_LENGTH+c.get(M.top).getHeight()/2+c.get(M.bottom).getHeight()/2)});var V=function(M,Y){return{x:M.x-Y.x,y:M.y-Y.y}},Z=function(M){var Y=0,J=0;return M.forEach(function(j){Y+=m[g.get(j)],J+=T[g.get(j)]}),{x:Y/M.size,y:J/M.size}},O=function(M,Y,J,j,tt){function Et(gt,Q){var ut=new Set(gt),At=!0,rt=!1,bt=void 0;try{for(var Ot=Q[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;ut.add(Ft)}}catch(Tt){rt=!0,bt=Tt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}return ut}var yt=new Map;M.forEach(function(gt,Q){yt.set(Q,0)}),M.forEach(function(gt,Q){gt.forEach(function(ut){yt.set(ut.id,yt.get(ut.id)+1)})});var it=new Map,ft=new Map,It=new i;yt.forEach(function(gt,Q){gt==0?(It.push(Q),J||(Y=="horizontal"?it.set(Q,g.has(Q)?m[g.get(Q)]:j.get(Q)):it.set(Q,g.has(Q)?T[g.get(Q)]:j.get(Q)))):it.set(Q,-1/0),J&&ft.set(Q,new Set([Q]))}),J&&tt.forEach(function(gt){var Q=[];if(gt.forEach(function(rt){J.has(rt)&&Q.push(rt)}),Q.length>0){var ut=0;Q.forEach(function(rt){Y=="horizontal"?(it.set(rt,g.has(rt)?m[g.get(rt)]:j.get(rt)),ut+=it.get(rt)):(it.set(rt,g.has(rt)?T[g.get(rt)]:j.get(rt)),ut+=it.get(rt))}),ut/=Q.length,gt.forEach(function(rt){J.has(rt)||it.set(rt,ut)})}else{var At=0;gt.forEach(function(rt){Y=="horizontal"?At+=g.has(rt)?m[g.get(rt)]:j.get(rt):At+=g.has(rt)?T[g.get(rt)]:j.get(rt)}),At/=gt.length,gt.forEach(function(rt){it.set(rt,At)})}});for(var Lt=function(){var gt=It.shift();M.get(gt).forEach(function(Q){if(it.get(Q.id)<it.get(gt)+Q.gap)if(J&&J.has(Q.id)){var ut=void 0;if(ut=Y=="horizontal"?g.has(Q.id)?m[g.get(Q.id)]:j.get(Q.id):g.has(Q.id)?T[g.get(Q.id)]:j.get(Q.id),it.set(Q.id,ut),ut<it.get(gt)+Q.gap){var At=it.get(gt)+Q.gap-ut;ft.get(gt).forEach(function(rt){it.set(rt,it.get(rt)-At)})}}else it.set(Q.id,it.get(gt)+Q.gap);yt.set(Q.id,yt.get(Q.id)-1),yt.get(Q.id)==0&&It.push(Q.id),J&&ft.set(Q.id,Et(ft.get(gt),ft.get(Q.id)))})};It.length!=0;)Lt();if(J){var mt=new Set;M.forEach(function(gt,Q){gt.length==0&&mt.add(Q)});var lt=[];ft.forEach(function(gt,Q){if(mt.has(Q)){var ut=!1,At=!0,rt=!1,bt=void 0;try{for(var Ot=gt[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;J.has(Ft)&&(ut=!0)}}catch(xt){rt=!0,bt=xt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}if(!ut){var Tt=!1,Nt=void 0;lt.forEach(function(xt,Pt){xt.has([].concat(e(gt))[0])&&(Tt=!0,Nt=Pt)}),Tt?gt.forEach(function(xt){lt[Nt].add(xt)}):lt.push(new Set(gt))}}}),lt.forEach(function(gt,Q){var ut=1/0,At=1/0,rt=-1/0,bt=-1/0,Ot=!0,Dt=!1,Ft=void 0;try{for(var Tt=gt[Symbol.iterator](),Nt;!(Ot=(Nt=Tt.next()).done);Ot=!0){var xt=Nt.value,Pt=void 0;Pt=Y=="horizontal"?g.has(xt)?m[g.get(xt)]:j.get(xt):g.has(xt)?T[g.get(xt)]:j.get(xt);var Xt=it.get(xt);Pt<ut&&(ut=Pt),Pt>rt&&(rt=Pt),Xt<At&&(At=Xt),Xt>bt&&(bt=Xt)}}catch(jt){Dt=!0,Ft=jt}finally{try{!Ot&&Tt.return&&Tt.return()}finally{if(Dt)throw Ft}}var ne=(ut+rt)/2-(At+bt)/2,ee=!0,qt=!1,Zt=void 0;try{for(var $t=gt[Symbol.iterator](),Jt;!(ee=(Jt=$t.next()).done);ee=!0){var re=Jt.value;it.set(re,it.get(re)+ne)}}catch(jt){qt=!0,Zt=jt}finally{try{!ee&&$t.return&&$t.return()}finally{if(qt)throw Zt}}})}return it},q=function(M){var Y=0,J=0,j=0,tt=0;if(M.forEach(function(ft){ft.left?m[g.get(ft.left)]-m[g.get(ft.right)]>=0?Y++:J++:T[g.get(ft.top)]-T[g.get(ft.bottom)]>=0?j++:tt++}),Y>J&&j>tt)for(var Et=0;Et<g.size;Et++)m[Et]=-1*m[Et],T[Et]=-1*T[Et];else if(Y>J)for(var yt=0;yt<g.size;yt++)m[yt]=-1*m[yt];else if(j>tt)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},h=function(M){var Y=[],J=new i,j=new Set,tt=0;return M.forEach(function(Et,yt){if(!j.has(yt)){Y[tt]=[];var it=yt;for(J.push(it),j.add(it),Y[tt].push(it);J.length!=0;)it=J.shift(),M.get(it).forEach(function(ft){j.has(ft.id)||(J.push(ft.id),j.add(ft.id),Y[tt].push(ft.id))});tt++}}),Y},E=function(M){var Y=new Map;return M.forEach(function(J,j){Y.set(j,[])}),M.forEach(function(J,j){J.forEach(function(tt){Y.get(j).push(tt),Y.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),Y},u=function(M){var Y=new Map;return M.forEach(function(J,j){Y.set(j,[])}),M.forEach(function(J,j){J.forEach(function(tt){Y.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),Y},y=[],v=[],w=!1,L=!1,b=new Set,G=new Map,F=new Map,H=[];if(s.fixedNodeConstraint&&s.fixedNodeConstraint.forEach(function(M){b.add(M.nodeId)}),s.relativePlacementConstraint&&(s.relativePlacementConstraint.forEach(function(M){M.left?(G.has(M.left)?G.get(M.left).push({id:M.right,gap:M.gap,direction:"horizontal"}):G.set(M.left,[{id:M.right,gap:M.gap,direction:"horizontal"}]),G.has(M.right)||G.set(M.right,[])):(G.has(M.top)?G.get(M.top).push({id:M.bottom,gap:M.gap,direction:"vertical"}):G.set(M.top,[{id:M.bottom,gap:M.gap,direction:"vertical"}]),G.has(M.bottom)||G.set(M.bottom,[]))}),F=E(G),H=h(F)),l.TRANSFORM_ON_CONSTRAINT_HANDLING){if(s.fixedNodeConstraint&&s.fixedNodeConstraint.length>1)s.fixedNodeConstraint.forEach(function(M,Y){y[Y]=[M.position.x,M.position.y],v[Y]=[m[g.get(M.nodeId)],T[g.get(M.nodeId)]]}),w=!0;else if(s.alignmentConstraint)(function(){var M=0;if(s.alignmentConstraint.vertical){for(var Y=s.alignmentConstraint.vertical,J=function(it){var ft=new Set;Y[it].forEach(function(mt){ft.add(mt)});var It=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),Lt=void 0;Lt=It.size>0?m[g.get(It.values().next().value)]:Z(ft).x,Y[it].forEach(function(mt){y[M]=[Lt,T[g.get(mt)]],v[M]=[m[g.get(mt)],T[g.get(mt)]],M++})},j=0;j<Y.length;j++)J(j);w=!0}if(s.alignmentConstraint.horizontal){for(var tt=s.alignmentConstraint.horizontal,Et=function(it){var ft=new Set;tt[it].forEach(function(mt){ft.add(mt)});var It=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),Lt=void 0;Lt=It.size>0?m[g.get(It.values().next().value)]:Z(ft).y,tt[it].forEach(function(mt){y[M]=[m[g.get(mt)],Lt],v[M]=[m[g.get(mt)],T[g.get(mt)]],M++})},yt=0;yt<tt.length;yt++)Et(yt);w=!0}s.relativePlacementConstraint&&(L=!0)})();else if(s.relativePlacementConstraint){for(var W=0,K=0,k=0;k<H.length;k++)H[k].length>W&&(W=H[k].length,K=k);if(W<F.size/2)q(s.relativePlacementConstraint),w=!1,L=!1;else{var X=new Map,D=new Map,z=[];H[K].forEach(function(M){G.get(M).forEach(function(Y){Y.direction=="horizontal"?(X.has(M)?X.get(M).push(Y):X.set(M,[Y]),X.has(Y.id)||X.set(Y.id,[]),z.push({left:M,right:Y.id})):(D.has(M)?D.get(M).push(Y):D.set(M,[Y]),D.has(Y.id)||D.set(Y.id,[]),z.push({top:M,bottom:Y.id}))})}),q(z),L=!1;var et=O(X,"horizontal"),U=O(D,"vertical");H[K].forEach(function(M,Y){v[Y]=[m[g.get(M)],T[g.get(M)]],y[Y]=[],et.has(M)?y[Y][0]=et.get(M):y[Y][0]=m[g.get(M)],U.has(M)?y[Y][1]=U.get(M):y[Y][1]=T[g.get(M)]}),w=!0}}if(w){for(var B=void 0,dt=f.transpose(y),st=f.transpose(v),Ct=0;Ct<dt.length;Ct++)dt[Ct]=f.multGamma(dt[Ct]),st[Ct]=f.multGamma(st[Ct]);var $=f.multMat(dt,f.transpose(st)),pt=r.svd($);B=f.multMat(pt.V,f.transpose(pt.U));for(var vt=0;vt<g.size;vt++){var Bt=[m[vt],T[vt]],Yt=[B[0][0],B[1][0]],Mt=[B[0][1],B[1][1]];m[vt]=f.dotProduct(Bt,Yt),T[vt]=f.dotProduct(Bt,Mt)}L&&q(s.relativePlacementConstraint)}}if(l.ENFORCE_CONSTRAINTS){if(s.fixedNodeConstraint&&s.fixedNodeConstraint.length>0){var _t={x:0,y:0};s.fixedNodeConstraint.forEach(function(M,Y){var J={x:m[g.get(M.nodeId)],y:T[g.get(M.nodeId)]},j=M.position,tt=V(j,J);_t.x+=tt.x,_t.y+=tt.y}),_t.x/=s.fixedNodeConstraint.length,_t.y/=s.fixedNodeConstraint.length,m.forEach(function(M,Y){m[Y]+=_t.x}),T.forEach(function(M,Y){T[Y]+=_t.y}),s.fixedNodeConstraint.forEach(function(M){m[g.get(M.nodeId)]=M.position.x,T[g.get(M.nodeId)]=M.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Ht=s.alignmentConstraint.vertical,Ut=function(M){var Y=new Set;Ht[M].forEach(function(tt){Y.add(tt)});var J=new Set([].concat(e(Y)).filter(function(tt){return b.has(tt)})),j=void 0;j=J.size>0?m[g.get(J.values().next().value)]:Z(Y).x,Y.forEach(function(tt){b.has(tt)||(m[g.get(tt)]=j)})},Rt=0;Rt<Ht.length;Rt++)Ut(Rt);if(s.alignmentConstraint.horizontal)for(var Vt=s.alignmentConstraint.horizontal,Gt=function(M){var Y=new Set;Vt[M].forEach(function(tt){Y.add(tt)});var J=new Set([].concat(e(Y)).filter(function(tt){return b.has(tt)})),j=void 0;j=J.size>0?T[g.get(J.values().next().value)]:Z(Y).y,Y.forEach(function(tt){b.has(tt)||(T[g.get(tt)]=j)})},ht=0;ht<Vt.length;ht++)Gt(ht)}s.relativePlacementConstraint&&(function(){var M=new Map,Y=new Map,J=new Map,j=new Map,tt=new Map,Et=new Map,yt=new Set,it=new Set;if(b.forEach(function(at){yt.add(at),it.add(at)}),s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var ft=s.alignmentConstraint.vertical,It=function(at){J.set("dummy"+at,[]),ft[at].forEach(function(wt){M.set(wt,"dummy"+at),J.get("dummy"+at).push(wt),b.has(wt)&&yt.add("dummy"+at)}),tt.set("dummy"+at,m[g.get(ft[at][0])])},Lt=0;Lt<ft.length;Lt++)It(Lt);if(s.alignmentConstraint.horizontal)for(var mt=s.alignmentConstraint.horizontal,lt=function(at){j.set("dummy"+at,[]),mt[at].forEach(function(wt){Y.set(wt,"dummy"+at),j.get("dummy"+at).push(wt),b.has(wt)&&it.add("dummy"+at)}),Et.set("dummy"+at,T[g.get(mt[at][0])])},gt=0;gt<mt.length;gt++)lt(gt)}var Q=new Map,ut=new Map,At=function(at){G.get(at).forEach(function(wt){var kt=void 0,zt=void 0;wt.direction=="horizontal"?(kt=M.get(at)?M.get(at):at,zt=M.get(wt.id)?{id:M.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,Q.has(kt)?Q.get(kt).push(zt):Q.set(kt,[zt]),Q.has(zt.id)||Q.set(zt.id,[])):(kt=Y.get(at)?Y.get(at):at,zt=Y.get(wt.id)?{id:Y.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,ut.has(kt)?ut.get(kt).push(zt):ut.set(kt,[zt]),ut.has(zt.id)||ut.set(zt.id,[]))})},rt=!0,bt=!1,Ot=void 0;try{for(var Dt=G.keys()[Symbol.iterator](),Ft;!(rt=(Ft=Dt.next()).done);rt=!0){var Tt=Ft.value;At(Tt)}}catch(at){bt=!0,Ot=at}finally{try{!rt&&Dt.return&&Dt.return()}finally{if(bt)throw Ot}}var Nt=E(Q),xt=E(ut),Pt=h(Nt),Xt=h(xt),ne=u(Q),ee=u(ut),qt=[],Zt=[];Pt.forEach(function(at,wt){qt[wt]=[],at.forEach(function(kt){ne.get(kt).length==0&&qt[wt].push(kt)})}),Xt.forEach(function(at,wt){Zt[wt]=[],at.forEach(function(kt){ee.get(kt).length==0&&Zt[wt].push(kt)})});var $t=O(Q,"horizontal",yt,tt,qt),Jt=O(ut,"vertical",it,Et,Zt),re=function(at){J.get(at)?J.get(at).forEach(function(wt){m[g.get(wt)]=$t.get(at)}):m[g.get(at)]=$t.get(at)},jt=!0,ve=!1,ye=void 0;try{for(var ae=$t.keys()[Symbol.iterator](),Ee;!(jt=(Ee=ae.next()).done);jt=!0){var se=Ee.value;re(se)}}catch(at){ve=!0,ye=at}finally{try{!jt&&ae.return&&ae.return()}finally{if(ve)throw ye}}var Xe=function(at){j.get(at)?j.get(at).forEach(function(wt){T[g.get(wt)]=Jt.get(at)}):T[g.get(at)]=Jt.get(at)},he=!0,Te=!1,Ne=void 0;try{for(var le=Jt.keys()[Symbol.iterator](),Ae;!(he=(Ae=le.next()).done);he=!0){var se=Ae.value;Xe(se)}}catch(at){Te=!0,Ne=at}finally{try{!he&&le.return&&le.return()}finally{if(Te)throw Ne}}})()}for(var ot=0;ot<A.length;ot++){var ct=A[ot];ct.getChild()??ct.setCenter(m[g.get(ct.id)],T[g.get(ct.id)])}},a.exports=o}),551:(a=>{a.exports=C})},N={};function p(a){var n=N[a];if(n!==void 0)return n.exports;var t=N[a]={exports:{}};return _[a](t,t.exports,p),t.exports}return p(45)})()})})),li=ze(de(((x,I)=>{(function(C,_){typeof x=="object"&&typeof I=="object"?I.exports=_(Ie()):typeof define=="function"&&define.amd?define(["cose-base"],_):typeof x=="object"?x.cytoscapeFcose=_(Ie()):C.cytoscapeFcose=_(C.coseBase)})(x,function(C){return(()=>{var _={658:(a=>{a.exports=Object.assign==null?function(n){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(e){return n[e]=t[e]})}),n}:Object.assign.bind(Object)}),548:((a,n,t)=>{var e=(function(){function f(r,o){var d=[],s=!0,c=!1,g=void 0;try{for(var m=r[Symbol.iterator](),T;!(s=(T=m.next()).done)&&(d.push(T.value),!(o&&d.length===o));s=!0);}catch(A){c=!0,g=A}finally{try{!s&&m.return&&m.return()}finally{if(c)throw g}}return d}return function(r,o){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return f(r,o);throw TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=t(140).layoutBase.LinkedList,i={};i.getTopMostNodes=function(f){for(var r={},o=0;o<f.length;o++)r[f[o].id()]=!0;return f.filter(function(d,s){typeof d=="number"&&(d=s);for(var c=d.parent()[0];c!=null;){if(r[c.id()])return!1;c=c.parent()[0]}return!0})},i.connectComponents=function(f,r,o,d){var s=new l,c=new Set,g=[],m=void 0,T=void 0,A=void 0,R=!1,P=1,S=[],V=[],Z=function(){var O=f.collection();V.push(O);var q=o[0],h=f.collection();h.merge(q).merge(q.descendants().intersection(r)),g.push(q),h.forEach(function(y){s.push(y),c.add(y),O.merge(y)});for(var E=function(){q=s.shift();var y=f.collection();q.neighborhood().nodes().forEach(function(L){r.intersection(q.edgesWith(L)).length>0&&y.merge(L)});for(var v=0;v<y.length;v++){var w=y[v];m=o.intersection(w.union(w.ancestors())),m!=null&&!c.has(m[0])&&m.union(m.descendants()).forEach(function(L){s.push(L),c.add(L),O.merge(L),o.has(L)&&g.push(L)})}};s.length!=0;)E();if(O.forEach(function(y){r.intersection(y.connectedEdges()).forEach(function(v){O.has(v.source())&&O.has(v.target())&&O.merge(v)})}),g.length==o.length&&(R=!0),!R||R&&P>1){T=g[0],A=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<A&&(A=y.connectedEdges().length,T=y)}),S.push(T.id());var u=f.collection();u.merge(g[0]),g.forEach(function(y){u.merge(y)}),g=[],o=o.difference(u),P++}};do Z();while(!R);return d&&S.length>0&&d.set("dummy"+(d.size+1),S),V},i.relocateComponent=function(f,r,o){if(!o.fixedNodeConstraint){var d=1/0,s=-1/0,c=1/0,g=-1/0;if(o.quality=="draft"){var m=!0,T=!1,A=void 0;try{for(var R=r.nodeIndexes[Symbol.iterator](),P;!(m=(P=R.next()).done);m=!0){var S=P.value,V=e(S,2),Z=V[0],O=V[1],q=o.cy.getElementById(Z);if(q){var h=q.boundingBox(),E=r.xCoords[O]-h.w/2,u=r.xCoords[O]+h.w/2,y=r.yCoords[O]-h.h/2,v=r.yCoords[O]+h.h/2;E<d&&(d=E),u>s&&(s=u),y<c&&(c=y),v>g&&(g=v)}}}catch(F){T=!0,A=F}finally{try{!m&&R.return&&R.return()}finally{if(T)throw A}}var w=f.x-(s+d)/2,L=f.y-(g+c)/2;r.xCoords=r.xCoords.map(function(F){return F+w}),r.yCoords=r.yCoords.map(function(F){return F+L})}else{Object.keys(r).forEach(function(F){var H=r[F],W=H.getRect().x,K=H.getRect().x+H.getRect().width,k=H.getRect().y,X=H.getRect().y+H.getRect().height;W<d&&(d=W),K>s&&(s=K),k<c&&(c=k),X>g&&(g=X)});var b=f.x-(s+d)/2,G=f.y-(g+c)/2;Object.keys(r).forEach(function(F){var H=r[F];H.setCenter(H.getCenterX()+b,H.getCenterY()+G)})}}},i.calcBoundingBox=function(f,r,o,d){for(var s=9007199254740991,c=-9007199254740991,g=9007199254740991,m=-9007199254740991,T=void 0,A=void 0,R=void 0,P=void 0,S=f.descendants().not(":parent"),V=S.length,Z=0;Z<V;Z++){var O=S[Z];T=r[d.get(O.id())]-O.width()/2,A=r[d.get(O.id())]+O.width()/2,R=o[d.get(O.id())]-O.height()/2,P=o[d.get(O.id())]+O.height()/2,s>T&&(s=T),c<A&&(c=A),g>R&&(g=R),m<P&&(m=P)}var q={};return q.topLeftX=s,q.topLeftY=g,q.width=c-s,q.height=m-g,q},i.calcParentsWithoutChildren=function(f,r){var o=f.collection();return r.nodes(":parent").forEach(function(d){var s=!1;d.children().forEach(function(c){c.css("display")!="none"&&(s=!0)}),s||o.merge(d)}),o},a.exports=i}),816:((a,n,t)=>{var e=t(548),l=t(140).CoSELayout,i=t(140).CoSENode,f=t(140).layoutBase.PointD,r=t(140).layoutBase.DimensionD,o=t(140).layoutBase.LayoutConstants,d=t(140).layoutBase.FDLayoutConstants,s=t(140).CoSEConstants;a.exports={coseLayout:function(c,g){var m=c.cy,T=c.eles,A=T.nodes(),R=T.edges(),P=void 0,S=void 0,V=void 0,Z={};c.randomize&&(P=g.nodeIndexes,S=g.xCoords,V=g.yCoords);var O=function(L){return typeof L=="function"},q=function(L,b){return O(L)?L(b):L},h=e.calcParentsWithoutChildren(m,T),E=function L(b,G,F,H){for(var W=G.length,K=0;K<W;K++){var k=G[K],X=null;k.intersection(h).length==0&&(X=k.children());var D=void 0,z=k.layoutDimensions({nodeDimensionsIncludeLabels:H.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null)if(H.randomize)if(!k.isParent())D=b.add(new i(F.graphManager,new f(S[P.get(k.id())]-z.w/2,V[P.get(k.id())]-z.h/2),new r(parseFloat(z.w),parseFloat(z.h))));else{var et=e.calcBoundingBox(k,S,V,P);D=k.intersection(h).length==0?b.add(new i(F.graphManager,new f(et.topLeftX,et.topLeftY),new r(et.width,et.height))):b.add(new i(F.graphManager,new f(et.topLeftX,et.topLeftY),new r(parseFloat(z.w),parseFloat(z.h))))}else D=b.add(new i(F.graphManager,new f(k.position("x")-z.w/2,k.position("y")-z.h/2),new r(parseFloat(z.w),parseFloat(z.h))));else D=b.add(new i(this.graphManager));if(D.id=k.data("id"),D.nodeRepulsion=q(H.nodeRepulsion,k),D.paddingLeft=parseInt(k.css("padding")),D.paddingTop=parseInt(k.css("padding")),D.paddingRight=parseInt(k.css("padding")),D.paddingBottom=parseInt(k.css("padding")),H.nodeDimensionsIncludeLabels&&(D.labelWidth=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,D.labelHeight=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,D.labelPosVertical=k.css("text-valign"),D.labelPosHorizontal=k.css("text-halign")),Z[k.data("id")]=D,isNaN(D.rect.x)&&(D.rect.x=0),isNaN(D.rect.y)&&(D.rect.y=0),X!=null&&X.length>0){var U=void 0;U=F.getGraphManager().add(F.newGraph(),D),L(U,X,F,H)}}},u=function(L,b,G){for(var F=0,H=0,W=0;W<G.length;W++){var K=G[W],k=Z[K.data("source")],X=Z[K.data("target")];if(k&&X&&k!==X&&k.getEdgesBetween(X).length==0){var D=b.add(L.newEdge(),k,X);D.id=K.id(),D.idealLength=q(c.idealEdgeLength,K),D.edgeElasticity=q(c.edgeElasticity,K),F+=D.idealLength,H++}}c.idealEdgeLength!=null&&(H>0?s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=F/H:O(c.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,s.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH)},y=function(L,b){b.fixedNodeConstraint&&(L.constraints.fixedNodeConstraint=b.fixedNodeConstraint),b.alignmentConstraint&&(L.constraints.alignmentConstraint=b.alignmentConstraint),b.relativePlacementConstraint&&(L.constraints.relativePlacementConstraint=b.relativePlacementConstraint)};c.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(s.MAX_ITERATIONS=d.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=c.tilingCompareBy),c.quality=="proof"?o.QUALITY=2:o.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!c.randomize,s.ANIMATE=d.ANIMATE=o.ANIMATE=c.animate,s.TILE=c.tile,s.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!c.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,c.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),c.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),c.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),c.step=="all"&&(c.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var v=new l,w=v.newGraphManager();return E(w.addRoot(),e.getTopMostNodes(A),v,c),u(v,w,R),y(v,c),v.runLayout(),Z}}}),212:((a,n,t)=>{var e=(function(){function s(c,g){for(var m=0;m<g.length;m++){var T=g[m];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(c,T.key,T)}}return function(c,g,m){return g&&s(c.prototype,g),m&&s(c,m),c}})();function l(s,c){if(!(s instanceof c))throw TypeError("Cannot call a class as a function")}var i=t(658),f=t(548),r=t(657).spectralLayout,o=t(816).coseLayout,d=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(s){return 4500},idealEdgeLength:function(s){return 50},edgeElasticity:function(s){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});a.exports=(function(){function s(c){l(this,s),this.options=i({},d,c)}return e(s,[{key:"run",value:function(){var c=this,g=this.options,m=g.cy,T=g.eles,A=[],R=[],P=void 0,S=[];g.fixedNodeConstraint&&(!Array.isArray(g.fixedNodeConstraint)||g.fixedNodeConstraint.length==0)&&(g.fixedNodeConstraint=void 0),g.alignmentConstraint&&(g.alignmentConstraint.vertical&&(!Array.isArray(g.alignmentConstraint.vertical)||g.alignmentConstraint.vertical.length==0)&&(g.alignmentConstraint.vertical=void 0),g.alignmentConstraint.horizontal&&(!Array.isArray(g.alignmentConstraint.horizontal)||g.alignmentConstraint.horizontal.length==0)&&(g.alignmentConstraint.horizontal=void 0)),g.relativePlacementConstraint&&(!Array.isArray(g.relativePlacementConstraint)||g.relativePlacementConstraint.length==0)&&(g.relativePlacementConstraint=void 0),(g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint)&&(g.tile=!1,g.packComponents=!1);var V=void 0,Z=!1;if(m.layoutUtilities&&g.packComponents&&(V=m.layoutUtilities("get"),V||(V=m.layoutUtilities()),Z=!0),T.nodes().length>0)if(Z){var O=f.getTopMostNodes(g.eles.nodes());if(P=f.connectComponents(m,g.eles,O),P.forEach(function(U){var B=U.boundingBox();S.push({x:B.x1+B.w/2,y:B.y1+B.h/2})}),g.randomize&&P.forEach(function(U){g.eles=U,A.push(r(g))}),g.quality=="default"||g.quality=="proof"){var q=m.collection();if(g.tile){var h=new Map,E=[],u=[],y=0,v={nodeIndexes:h,xCoords:E,yCoords:u},w=[];if(P.forEach(function(U,B){U.edges().length==0&&(U.nodes().forEach(function(dt,st){q.merge(U.nodes()[st]),dt.isParent()||(v.nodeIndexes.set(U.nodes()[st].id(),y++),v.xCoords.push(U.nodes()[0].position().x),v.yCoords.push(U.nodes()[0].position().y))}),w.push(B))}),q.length>1){var L=q.boundingBox();S.push({x:L.x1+L.w/2,y:L.y1+L.h/2}),P.push(q),A.push(v);for(var b=w.length-1;b>=0;b--)P.splice(w[b],1),A.splice(w[b],1),S.splice(w[b],1)}}P.forEach(function(U,B){g.eles=U,R.push(o(g,A[B])),f.relocateComponent(S[B],R[B],g)})}else P.forEach(function(U,B){f.relocateComponent(S[B],A[B],g)});var G=new Set;if(P.length>1){var F=[],H=T.filter(function(U){return U.css("display")=="none"});P.forEach(function(U,B){var dt=void 0;if(g.quality=="draft"&&(dt=A[B].nodeIndexes),U.nodes().not(H).length>0){var st={};st.edges=[],st.nodes=[];var Ct=void 0;U.nodes().not(H).forEach(function($){if(g.quality=="draft")if(!$.isParent())Ct=dt.get($.id()),st.nodes.push({x:A[B].xCoords[Ct]-$.boundingbox().w/2,y:A[B].yCoords[Ct]-$.boundingbox().h/2,width:$.boundingbox().w,height:$.boundingbox().h});else{var pt=f.calcBoundingBox($,A[B].xCoords,A[B].yCoords,dt);st.nodes.push({x:pt.topLeftX,y:pt.topLeftY,width:pt.width,height:pt.height})}else R[B][$.id()]&&st.nodes.push({x:R[B][$.id()].getLeft(),y:R[B][$.id()].getTop(),width:R[B][$.id()].getWidth(),height:R[B][$.id()].getHeight()})}),U.edges().forEach(function($){var pt=$.source(),vt=$.target();if(pt.css("display")!="none"&&vt.css("display")!="none")if(g.quality=="draft"){var Bt=dt.get(pt.id()),Yt=dt.get(vt.id()),Mt=[],_t=[];if(pt.isParent()){var Ht=f.calcBoundingBox(pt,A[B].xCoords,A[B].yCoords,dt);Mt.push(Ht.topLeftX+Ht.width/2),Mt.push(Ht.topLeftY+Ht.height/2)}else Mt.push(A[B].xCoords[Bt]),Mt.push(A[B].yCoords[Bt]);if(vt.isParent()){var Ut=f.calcBoundingBox(vt,A[B].xCoords,A[B].yCoords,dt);_t.push(Ut.topLeftX+Ut.width/2),_t.push(Ut.topLeftY+Ut.height/2)}else _t.push(A[B].xCoords[Yt]),_t.push(A[B].yCoords[Yt]);st.edges.push({startX:Mt[0],startY:Mt[1],endX:_t[0],endY:_t[1]})}else R[B][pt.id()]&&R[B][vt.id()]&&st.edges.push({startX:R[B][pt.id()].getCenterX(),startY:R[B][pt.id()].getCenterY(),endX:R[B][vt.id()].getCenterX(),endY:R[B][vt.id()].getCenterY()})}),st.nodes.length>0&&(F.push(st),G.add(B))}});var W=V.packComponents(F,g.randomize).shifts;if(g.quality=="draft")A.forEach(function(U,B){var dt=U.xCoords.map(function(Ct){return Ct+W[B].dx}),st=U.yCoords.map(function(Ct){return Ct+W[B].dy});U.xCoords=dt,U.yCoords=st});else{var K=0;G.forEach(function(U){Object.keys(R[U]).forEach(function(B){var dt=R[U][B];dt.setCenter(dt.getCenterX()+W[K].dx,dt.getCenterY()+W[K].dy)}),K++})}}}else{var k=g.eles.boundingBox();if(S.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),g.randomize){var X=r(g);A.push(X)}g.quality=="default"||g.quality=="proof"?(R.push(o(g,A[0])),f.relocateComponent(S[0],R[0],g)):f.relocateComponent(S[0],A[0],g)}var D=function(U,B){if(g.quality=="default"||g.quality=="proof"){typeof U=="number"&&(U=B);var dt=void 0,st=void 0,Ct=U.data("id");return R.forEach(function(pt){Ct in pt&&(dt={x:pt[Ct].getRect().getCenterX(),y:pt[Ct].getRect().getCenterY()},st=pt[Ct])}),g.nodeDimensionsIncludeLabels&&(st.labelWidth&&(st.labelPosHorizontal=="left"?dt.x+=st.labelWidth/2:st.labelPosHorizontal=="right"&&(dt.x-=st.labelWidth/2)),st.labelHeight&&(st.labelPosVertical=="top"?dt.y+=st.labelHeight/2:st.labelPosVertical=="bottom"&&(dt.y-=st.labelHeight/2))),dt??(dt={x:U.position("x"),y:U.position("y")}),{x:dt.x,y:dt.y}}else{var $=void 0;return A.forEach(function(pt){var vt=pt.nodeIndexes.get(U.id());vt!=null&&($={x:pt.xCoords[vt],y:pt.yCoords[vt]})}),$??($={x:U.position("x"),y:U.position("y")}),{x:$.x,y:$.y}}};if(g.quality=="default"||g.quality=="proof"||g.randomize){var z=f.calcParentsWithoutChildren(m,T),et=T.filter(function(U){return U.css("display")=="none"});g.eles=T.not(et),T.nodes().not(":parent").not(et).layoutPositions(c,g,D),z.length>0&&z.forEach(function(U){U.position(D(U))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),s})()}),657:((a,n,t)=>{var e=t(548),l=t(140).layoutBase.Matrix,i=t(140).layoutBase.SVD;a.exports={spectralLayout:function(f){var r=f.cy,o=f.eles,d=o.nodes(),s=o.nodes(":parent"),c=new Map,g=new Map,m=new Map,T=[],A=[],R=[],P=[],S=[],V=[],Z=[],O=[],q=void 0,h=1e8,E=1e-9,u=f.piTol,y=f.samplingType,v=f.nodeSeparation,w=void 0,L=function(){for(var ht=0,ot=0,ct=!1;ot<w;){ht=Math.floor(Math.random()*q),ct=!1;for(var M=0;M<ot;M++)if(P[M]==ht){ct=!0;break}if(!ct)P[ot]=ht,ot++;else continue}},b=function(ht,ot,ct){for(var M=[],Y=0,J=0,j=0,tt=void 0,Et=[],yt=0,it=1,ft=0;ft<q;ft++)Et[ft]=h;for(M[J]=ht,Et[ht]=0;J>=Y;){j=M[Y++];for(var It=T[j],Lt=0;Lt<It.length;Lt++)tt=g.get(It[Lt]),Et[tt]==h&&(Et[tt]=Et[j]+1,M[++J]=tt);V[j][ot]=Et[j]*v}if(ct){for(var mt=0;mt<q;mt++)V[mt][ot]<S[mt]&&(S[mt]=V[mt][ot]);for(var lt=0;lt<q;lt++)S[lt]>yt&&(yt=S[lt],it=lt)}return it},G=function(ht){var ot=void 0;if(ht){ot=Math.floor(Math.random()*q);for(var ct=0;ct<q;ct++)S[ct]=h;for(var M=0;M<w;M++)P[M]=ot,ot=b(ot,M,ht)}else{L();for(var Y=0;Y<w;Y++)b(P[Y],Y,ht,!1)}for(var J=0;J<q;J++)for(var j=0;j<w;j++)V[J][j]*=V[J][j];for(var tt=0;tt<w;tt++)Z[tt]=[];for(var Et=0;Et<w;Et++)for(var yt=0;yt<w;yt++)Z[Et][yt]=V[P[yt]][Et]},F=function(){for(var ht=i.svd(Z),ot=ht.S,ct=ht.U,M=ht.V,Y=ot[0]*ot[0]*ot[0],J=[],j=0;j<w;j++){J[j]=[];for(var tt=0;tt<w;tt++)J[j][tt]=0,j==tt&&(J[j][tt]=ot[j]/(ot[j]*ot[j]+Y/(ot[j]*ot[j])))}O=l.multMat(l.multMat(M,J),l.transpose(ct))},H=function(){for(var ht=void 0,ot=void 0,ct=[],M=[],Y=[],J=[],j=0;j<q;j++)ct[j]=Math.random(),M[j]=Math.random();ct=l.normalize(ct),M=l.normalize(M);for(var tt=0,Et=E,yt=E,it=void 0;;){tt++;for(var ft=0;ft<q;ft++)Y[ft]=ct[ft];if(ct=l.multGamma(l.multL(l.multGamma(Y),V,O)),ht=l.dotProduct(Y,ct),ct=l.normalize(ct),Et=l.dotProduct(Y,ct),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var It=0;It<q;It++)Y[It]=ct[It];for(tt=0,yt=E;;){tt++;for(var Lt=0;Lt<q;Lt++)J[Lt]=M[Lt];if(J=l.minusOp(J,l.multCons(Y,l.dotProduct(Y,J))),M=l.multGamma(l.multL(l.multGamma(J),V,O)),ot=l.dotProduct(J,M),M=l.normalize(M),Et=l.dotProduct(J,M),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var mt=0;mt<q;mt++)J[mt]=M[mt];A=l.multCons(Y,Math.sqrt(Math.abs(ht))),R=l.multCons(J,Math.sqrt(Math.abs(ot)))};e.connectComponents(r,o,e.getTopMostNodes(d),c),s.forEach(function(ht){e.connectComponents(r,o,e.getTopMostNodes(ht.descendants().intersection(o)),c)});for(var W=0,K=0;K<d.length;K++)d[K].isParent()||g.set(d[K].id(),W++);var k=!0,X=!1,D=void 0;try{for(var z=c.keys()[Symbol.iterator](),et;!(k=(et=z.next()).done);k=!0){var U=et.value;g.set(U,W++)}}catch(ht){X=!0,D=ht}finally{try{!k&&z.return&&z.return()}finally{if(X)throw D}}for(var B=0;B<g.size;B++)T[B]=[];s.forEach(function(ht){for(var ot=ht.children().intersection(o);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(o);var ct=0,M=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(Y,J){Y.connectedEdges().length<M&&(M=Y.connectedEdges().length,ct=J)}),m.set(ht.id(),ot.nodes(":childless")[ct].id())}),d.forEach(function(ht){var ot=void 0;ot=ht.isParent()?g.get(m.get(ht.id())):g.get(ht.id()),ht.neighborhood().nodes().forEach(function(ct){o.intersection(ht.edgesWith(ct)).length>0&&(ct.isParent()?T[ot].push(m.get(ct.id())):T[ot].push(ct.id()))})});var dt=function(ht){var ot=g.get(ht),ct=void 0;c.get(ht).forEach(function(M){ct=r.getElementById(M).isParent()?m.get(M):M,T[ot].push(ct),T[g.get(ct)].push(ht)})},st=!0,Ct=!1,$=void 0;try{for(var pt=c.keys()[Symbol.iterator](),vt;!(st=(vt=pt.next()).done);st=!0){var Bt=vt.value;dt(Bt)}}catch(ht){Ct=!0,$=ht}finally{try{!st&&pt.return&&pt.return()}finally{if(Ct)throw $}}q=g.size;var Yt=void 0;if(q>2){w=q<f.sampleSize?q:f.sampleSize;for(var Mt=0;Mt<q;Mt++)V[Mt]=[];for(var _t=0;_t<w;_t++)O[_t]=[];return f.quality=="draft"||f.step=="all"?(G(y),F(),H(),Yt={nodeIndexes:g,xCoords:A,yCoords:R}):(g.forEach(function(ht,ot){A.push(r.getElementById(ot).position("x")),R.push(r.getElementById(ot).position("y"))}),Yt={nodeIndexes:g,xCoords:A,yCoords:R}),Yt}else{var Ht=g.keys(),Ut=r.getElementById(Ht.next().value),Rt=Ut.position(),Vt=Ut.outerWidth();if(A.push(Rt.x),R.push(Rt.y),q==2){var Gt=r.getElementById(Ht.next().value).outerWidth();A.push(Rt.x+Vt/2+Gt/2+f.idealEdgeLength),R.push(Rt.y)}return Yt={nodeIndexes:g,xCoords:A,yCoords:R},Yt}}}}),579:((a,n,t)=>{var e=t(212),l=function(i){i&&i("layout","fcose",e)};typeof cytoscape<"u"&&l(cytoscape),a.exports=l}),140:(a=>{a.exports=C})},N={};function p(a){var n=N[a];if(n!==void 0)return n.exports;var t=N[a]={exports:{}};return _[a](t,t.exports,p),t.exports}return p(579)})()})}))(),1),Me={L:"left",R:"right",T:"top",B:"bottom"},_e={L:nt(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:nt(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:nt(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:nt(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},oe={L:nt((x,I)=>x-I+2,"L"),R:nt((x,I)=>x-2,"R"),T:nt((x,I)=>x-I+2,"T"),B:nt((x,I)=>x-2,"B")},di=nt(function(x){return St(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),xe=nt(function(x){let I=x;return I==="L"||I==="R"||I==="T"||I==="B"},"isArchitectureDirection"),St=nt(function(x){let I=x;return I==="L"||I==="R"},"isArchitectureDirectionX"),Wt=nt(function(x){let I=x;return I==="T"||I==="B"},"isArchitectureDirectionY"),fe=nt(function(x,I){let C=St(x)&&Wt(I),_=Wt(x)&&St(I);return C||_},"isArchitectureDirectionXY"),gi=nt(function(x){let I=x[0],C=x[1],_=St(I)&&Wt(C),N=Wt(I)&&St(C);return _||N},"isArchitecturePairXY"),ci=nt(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),pe=nt(function(x,I){let C=`${x}${I}`;return ci(C)?C:void 0},"getArchitectureDirectionPair"),ui=nt(function([x,I],C){let _=C[0],N=C[1];return St(_)?Wt(N)?[x+(_==="L"?-1:1),I+(N==="T"?1:-1)]:[x+(_==="L"?-1:1),I]:St(N)?[x+(N==="L"?1:-1),I+(_==="T"?1:-1)]:[x,I+(_==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fi=nt(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),pi=nt(function(x,I){return fe(x,I)?"bend":St(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),mi=nt(function(x){return x.type==="service"},"isArchitectureService"),vi=nt(function(x){return x.type==="junction"},"isArchitectureJunction"),Oe=nt((x,I)=>{let[C,_]=[x,I].sort();return`${JSON.stringify(C)}-${JSON.stringify(_)}`},"architectureGroupAlignmentKey"),De=nt(x=>x.data(),"edgeData"),Kt=nt(x=>x.data(),"nodeData"),yi=Qe.architecture,Re=(te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ze,this.getAccTitle=ii,this.setDiagramTitle=qe,this.getDiagramTitle=ei,this.getAccDescription=ti,this.setAccDescription=$e,this.clear()}setDiagramId(I){this.diagramId=I}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",Je()}addService({id:I,icon:C,in:_,title:N,iconText:p}){if(this.registeredIds.has(I))throw Error(`The service id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(_!==void 0){if(I===_)throw Error(`The service [${I}] cannot be placed within itself`);if(!this.registeredIds.has(_))throw Error(`The service [${I}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(_)==="node")throw Error(`The service [${I}]'s parent is not a group`)}this.registeredIds.set(I,"node"),this.nodes.set(I,{id:I,type:"service",icon:C,iconText:p,title:N,edges:[],in:_})}getServices(){return[...this.nodes.values()].filter(mi)}addJunction({id:I,in:C}){if(this.registeredIds.has(I))throw Error(`The junction id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(C!==void 0){if(I===C)throw Error(`The junction [${I}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw Error(`The junction [${I}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw Error(`The junction [${I}]'s parent is not a group`)}this.registeredIds.set(I,"node"),this.nodes.set(I,{id:I,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(vi)}getNodes(){return[...this.nodes.values()]}getNode(I){return this.nodes.get(I)??null}addGroup({id:I,icon:C,in:_,title:N}){if(this.registeredIds.has(I))throw Error(`The group id [${I}] is already in use by another ${this.registeredIds.get(I)}`);if(_!==void 0){if(I===_)throw Error(`The group [${I}] cannot be placed within itself`);if(!this.registeredIds.has(_))throw Error(`The group [${I}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(_)==="node")throw Error(`The group [${I}]'s parent is not a group`)}this.registeredIds.set(I,"group"),this.groups.set(I,{id:I,icon:C,title:N,in:_})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:I,rhsId:C,lhsDir:_,rhsDir:N,lhsInto:p,rhsInto:a,lhsGroup:n,rhsGroup:t,title:e}){if(!xe(_))throw Error(`Invalid direction given for left hand side of edge ${I}--${C}. Expected (L,R,T,B) got ${String(_)}`);if(!xe(N))throw Error(`Invalid direction given for right hand side of edge ${I}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(I)&&!this.groups.has(I))throw Error(`The left-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(I).in,i=this.nodes.get(C).in;if(n&&l&&i&&l==i)throw Error(`The left-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(t&&l&&i&&l==i)throw Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:I,lhsDir:_,lhsInto:p,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:a,rhsGroup:t,title:e};this.edges.push(f);let r=this.nodes.get(I),o=this.nodes.get(C);r&&o&&(r.edges.push(this.edges[this.edges.length-1]),o.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(I){if(I.members.length<2)throw Error(`An align directive requires at least two members; got ${I.members.length}`);let C=new Set;I.members.forEach(_=>{if(this.registeredIds.get(_)!=="node")throw Error(`align ${I.direction} references [${_}], which is not a service or junction`);if(C.has(_))throw Error(`align ${I.direction} lists [${_}] more than once`);C.add(_)}),this.layoutHints.push(I)}getLayoutHints(){return this.layoutHints}getDataStructures(){var I,C;if(this.dataStructures===void 0){let _=new Map,N=new Map;for(let[e,l]of this.nodes.entries()){let i=new Map;for(let f of l.edges){let r=(I=this.getNode(f.lhsId))==null?void 0:I.in,o=(C=this.getNode(f.rhsId))==null?void 0:C.in;if(r&&o&&r!==o){let d=pi(f.lhsDir,f.rhsDir);d!=="bend"&&_.set(Oe(r,o),d)}if(f.lhsId===e){let d=pe(f.lhsDir,f.rhsDir);d&&i.set(d,f.rhsId)}else{let d=pe(f.rhsDir,f.lhsDir);d&&i.set(d,f.lhsId)}}N.set(e,i)}let p=new Set,a=new Set(N.keys()),n=nt(e=>{let l=new Map([[e,[0,0]]]),i=[e];for(;i.length>0;){let f=i.shift();if(f){p.add(f),a.delete(f);let r=N.get(f);if(!r)throw Error(`BFS error: adjacency list for id ${f} not found. Please report this as a bug.`);let o=l.get(f);if(!o)throw Error(`BFS error: position for id ${f} not found in spatial map. Please report this as a bug.`);let[d,s]=o;r.forEach((c,g)=>{p.has(c)||(l.set(c,ui([d,s],g)),i.push(c))})}}return l},"BFS"),t=[];for(;a.size>0;){let e=a.values().next().value;t.push(n(e))}this.dataStructures={adjList:N,spatialMaps:t,groupAlignments:_}}return this.dataStructures}setElementForId(I,C){this.elements.set(I,C)}getElementById(I){return this.elements.get(I)}getConfig(){return Be({...yi,...Ke().architecture})}getConfigField(I){return this.getConfig()[I]}},nt(te,"ArchitectureDB"),te),Ei=nt((x,I)=>{var C;si(x,I),x.groups.map(_=>I.addGroup(_)),x.services.map(_=>I.addService({..._,type:"service"})),x.junctions.map(_=>I.addJunction({..._,type:"junction"})),x.edges.map(_=>I.addEdge(_)),(C=x.alignments)==null||C.map(_=>I.addLayoutHint({direction:_.direction,members:[..._.members]}))},"populateDb"),be={parser:{yy:void 0},parse:nt(async x=>{var _;let I=await hi("architecture",x);we.debug(I);let C=(_=be.parser)==null?void 0:_.yy;if(!(C instanceof Re))throw Error("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.");Ei(I,C)},"parse")},Ti=nt(x=>`
2
2
  .edge {
3
3
  stroke-width: ${x.archEdgeWidth};
4
4
  stroke: ${x.archEdgeColor};