@aiquants/markdown 1.6.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/{abnfDiagram-VRR7QNED-DVICL1SS.cjs → abnfDiagram-VRR7QNED-BKvRUGcR.cjs} +2 -2
  2. package/dist/{abnfDiagram-VRR7QNED-DVICL1SS.cjs.map → abnfDiagram-VRR7QNED-BKvRUGcR.cjs.map} +1 -1
  3. package/dist/{abnfDiagram-VRR7QNED-RZnm_ZZC.js → abnfDiagram-VRR7QNED-C-27Yna6.js} +4 -4
  4. package/dist/{abnfDiagram-VRR7QNED-RZnm_ZZC.js.map → abnfDiagram-VRR7QNED-C-27Yna6.js.map} +1 -1
  5. package/dist/{arc-BmnitkkN.cjs → arc-CUOoCqkh.cjs} +2 -2
  6. package/dist/{arc-BmnitkkN.cjs.map → arc-CUOoCqkh.cjs.map} +1 -1
  7. package/dist/{arc-C-DBDbuo.js → arc-UxDDNW0x.js} +2 -2
  8. package/dist/{arc-C-DBDbuo.js.map → arc-UxDDNW0x.js.map} +1 -1
  9. package/dist/{architectureDiagram-ZJ3FMSHR-_FBgGrSC.js → architectureDiagram-ZJ3FMSHR-Ch5Nf0Ae.js} +3 -3
  10. package/dist/{architectureDiagram-ZJ3FMSHR-_FBgGrSC.js.map → architectureDiagram-ZJ3FMSHR-Ch5Nf0Ae.js.map} +1 -1
  11. package/dist/{architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs → architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs} +2 -2
  12. package/dist/{architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs.map → architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs.map} +1 -1
  13. package/dist/{blockDiagram-677ZJIJ3-W3Ryiu2c.cjs → blockDiagram-677ZJIJ3-BbjxBeAD.cjs} +2 -2
  14. package/dist/{blockDiagram-677ZJIJ3-W3Ryiu2c.cjs.map → blockDiagram-677ZJIJ3-BbjxBeAD.cjs.map} +1 -1
  15. package/dist/{blockDiagram-677ZJIJ3-CLkOcrVQ.js → blockDiagram-677ZJIJ3-CuCBVVNa.js} +4 -4
  16. package/dist/{blockDiagram-677ZJIJ3-CLkOcrVQ.js.map → blockDiagram-677ZJIJ3-CuCBVVNa.js.map} +1 -1
  17. package/dist/{c4Diagram-LMCZKHZV-FhSkJ7-q.js → c4Diagram-LMCZKHZV-BdJV5ivG.js} +3 -3
  18. package/dist/{c4Diagram-LMCZKHZV-FhSkJ7-q.js.map → c4Diagram-LMCZKHZV-BdJV5ivG.js.map} +1 -1
  19. package/dist/{c4Diagram-LMCZKHZV-B--cDHXw.cjs → c4Diagram-LMCZKHZV-BgTfc_W8.cjs} +2 -2
  20. package/dist/{c4Diagram-LMCZKHZV-B--cDHXw.cjs.map → c4Diagram-LMCZKHZV-BgTfc_W8.cjs.map} +1 -1
  21. package/dist/channel-BaZK7NhX.js +6 -0
  22. package/dist/{channel-B6gYWXtQ.js.map → channel-BaZK7NhX.js.map} +1 -1
  23. package/dist/channel-DcZBUEY6.cjs +2 -0
  24. package/dist/{channel-CZceKK2b.cjs.map → channel-DcZBUEY6.cjs.map} +1 -1
  25. package/dist/{chunk-2Q5K7J3B-CLA9LZQs.js → chunk-2Q5K7J3B-CSlHTmMh.js} +2 -2
  26. package/dist/{chunk-2Q5K7J3B-CLA9LZQs.js.map → chunk-2Q5K7J3B-CSlHTmMh.js.map} +1 -1
  27. package/dist/{chunk-2Q5K7J3B-UoZ4tiIj.cjs → chunk-2Q5K7J3B-D9s6eCoM.cjs} +2 -2
  28. package/dist/{chunk-2Q5K7J3B-UoZ4tiIj.cjs.map → chunk-2Q5K7J3B-D9s6eCoM.cjs.map} +1 -1
  29. package/dist/{chunk-32BRIVSS-CrDpazxa.js → chunk-32BRIVSS-CXH5EQUk.js} +2 -2
  30. package/dist/{chunk-32BRIVSS-CrDpazxa.js.map → chunk-32BRIVSS-CXH5EQUk.js.map} +1 -1
  31. package/dist/{chunk-32BRIVSS-CyUS1-2x.cjs → chunk-32BRIVSS-D2F2B9TZ.cjs} +2 -2
  32. package/dist/{chunk-32BRIVSS-CyUS1-2x.cjs.map → chunk-32BRIVSS-D2F2B9TZ.cjs.map} +1 -1
  33. package/dist/{chunk-5VM5RSS4-DnTlok-Z.js → chunk-5VM5RSS4-BhTMtA9l.js} +2 -2
  34. package/dist/{chunk-5VM5RSS4-DnTlok-Z.js.map → chunk-5VM5RSS4-BhTMtA9l.js.map} +1 -1
  35. package/dist/{chunk-5VM5RSS4-DCM2evxn.cjs → chunk-5VM5RSS4-CxjaLXsB.cjs} +2 -2
  36. package/dist/{chunk-5VM5RSS4-DCM2evxn.cjs.map → chunk-5VM5RSS4-CxjaLXsB.cjs.map} +1 -1
  37. package/dist/{chunk-EX3LRPZG-CDcYLfTb.cjs → chunk-EX3LRPZG-BCQ_eMbL.cjs} +2 -2
  38. package/dist/{chunk-EX3LRPZG-CDcYLfTb.cjs.map → chunk-EX3LRPZG-BCQ_eMbL.cjs.map} +1 -1
  39. package/dist/{chunk-EX3LRPZG-BXZN3BP6.js → chunk-EX3LRPZG-BOcBE4jP.js} +5 -5
  40. package/dist/{chunk-EX3LRPZG-BXZN3BP6.js.map → chunk-EX3LRPZG-BOcBE4jP.js.map} +1 -1
  41. package/dist/{chunk-JWPE2WC7-BOZsBb5v.js → chunk-JWPE2WC7-C20BXRVN.js} +2 -2
  42. package/dist/{chunk-JWPE2WC7-BOZsBb5v.js.map → chunk-JWPE2WC7-C20BXRVN.js.map} +1 -1
  43. package/dist/{chunk-JWPE2WC7-u2Y2E01t.cjs → chunk-JWPE2WC7-CLCAyxUO.cjs} +2 -2
  44. package/dist/{chunk-JWPE2WC7-u2Y2E01t.cjs.map → chunk-JWPE2WC7-CLCAyxUO.cjs.map} +1 -1
  45. package/dist/{chunk-MOJQB5TN-CODLoYka.js → chunk-MOJQB5TN-B_C5dwTy.js} +2 -2
  46. package/dist/{chunk-MOJQB5TN-CODLoYka.js.map → chunk-MOJQB5TN-B_C5dwTy.js.map} +1 -1
  47. package/dist/{chunk-MOJQB5TN-D9XmnzfN.cjs → chunk-MOJQB5TN-Bbpbi357.cjs} +2 -2
  48. package/dist/{chunk-MOJQB5TN-D9XmnzfN.cjs.map → chunk-MOJQB5TN-Bbpbi357.cjs.map} +1 -1
  49. package/dist/{chunk-PUDLZKDR-Vzafz0p_.js → chunk-PUDLZKDR-C0EKSRvH.js} +7 -7
  50. package/dist/{chunk-PUDLZKDR-Vzafz0p_.js.map → chunk-PUDLZKDR-C0EKSRvH.js.map} +1 -1
  51. package/dist/{chunk-PUDLZKDR-DIlJh7gW.cjs → chunk-PUDLZKDR-Cpp-nasK.cjs} +2 -2
  52. package/dist/{chunk-PUDLZKDR-DIlJh7gW.cjs.map → chunk-PUDLZKDR-Cpp-nasK.cjs.map} +1 -1
  53. package/dist/{chunk-RYQCIY6F-D7RgZ_ri.js → chunk-RYQCIY6F-BuIkG6A2.js} +2 -2
  54. package/dist/{chunk-RYQCIY6F-D7RgZ_ri.js.map → chunk-RYQCIY6F-BuIkG6A2.js.map} +1 -1
  55. package/dist/{chunk-RYQCIY6F-BgbNR_-2.cjs → chunk-RYQCIY6F-he5fUSYo.cjs} +2 -2
  56. package/dist/{chunk-RYQCIY6F-BgbNR_-2.cjs.map → chunk-RYQCIY6F-he5fUSYo.cjs.map} +1 -1
  57. package/dist/{chunk-V7JOEXUC-BtRbpCVo.cjs → chunk-V7JOEXUC-BcBXzffo.cjs} +2 -2
  58. package/dist/{chunk-V7JOEXUC-BtRbpCVo.cjs.map → chunk-V7JOEXUC-BcBXzffo.cjs.map} +1 -1
  59. package/dist/{chunk-V7JOEXUC-Csiot9oO.js → chunk-V7JOEXUC-DWnZRQBl.js} +6 -6
  60. package/dist/{chunk-V7JOEXUC-Csiot9oO.js.map → chunk-V7JOEXUC-DWnZRQBl.js.map} +1 -1
  61. package/dist/{chunk-VR4S4FIN-DH6f42Mu.js → chunk-VR4S4FIN-BWCLM0a0.js} +2 -2
  62. package/dist/{chunk-VR4S4FIN-DH6f42Mu.js.map → chunk-VR4S4FIN-BWCLM0a0.js.map} +1 -1
  63. package/dist/{chunk-VR4S4FIN-y0SDmoh2.cjs → chunk-VR4S4FIN-Bd3wwAe8.cjs} +2 -2
  64. package/dist/{chunk-VR4S4FIN-y0SDmoh2.cjs.map → chunk-VR4S4FIN-Bd3wwAe8.cjs.map} +1 -1
  65. package/dist/{chunk-XXDRQBXY-rC42S5QT.cjs → chunk-XXDRQBXY-C2UaLfce.cjs} +2 -2
  66. package/dist/{chunk-XXDRQBXY-rC42S5QT.cjs.map → chunk-XXDRQBXY-C2UaLfce.cjs.map} +1 -1
  67. package/dist/{chunk-XXDRQBXY-Csac6tCf.js → chunk-XXDRQBXY-qt9x9red.js} +2 -2
  68. package/dist/{chunk-XXDRQBXY-Csac6tCf.js.map → chunk-XXDRQBXY-qt9x9red.js.map} +1 -1
  69. package/dist/{classDiagram-OUVF2IWQ-Dd9EcDqY.js → classDiagram-OUVF2IWQ-B0lJPbAq.js} +3 -3
  70. package/dist/{classDiagram-OUVF2IWQ-Dd9EcDqY.js.map → classDiagram-OUVF2IWQ-B0lJPbAq.js.map} +1 -1
  71. package/dist/{classDiagram-OUVF2IWQ-Vq3KKBUy.cjs → classDiagram-OUVF2IWQ-BoGCNSIO.cjs} +2 -2
  72. package/dist/{classDiagram-OUVF2IWQ-Vq3KKBUy.cjs.map → classDiagram-OUVF2IWQ-BoGCNSIO.cjs.map} +1 -1
  73. package/dist/{classDiagram-v2-EOCWNBFH-Dd9EcDqY.js → classDiagram-v2-EOCWNBFH-B0lJPbAq.js} +3 -3
  74. package/dist/{classDiagram-v2-EOCWNBFH-Dd9EcDqY.js.map → classDiagram-v2-EOCWNBFH-B0lJPbAq.js.map} +1 -1
  75. package/dist/{classDiagram-v2-EOCWNBFH-Vq3KKBUy.cjs → classDiagram-v2-EOCWNBFH-BoGCNSIO.cjs} +2 -2
  76. package/dist/{classDiagram-v2-EOCWNBFH-Vq3KKBUy.cjs.map → classDiagram-v2-EOCWNBFH-BoGCNSIO.cjs.map} +1 -1
  77. package/dist/{cose-bilkent-JH36ORCC-BAYFBSur.js → cose-bilkent-JH36ORCC-BXH9dl_0.js} +2 -2
  78. package/dist/{cose-bilkent-JH36ORCC-BAYFBSur.js.map → cose-bilkent-JH36ORCC-BXH9dl_0.js.map} +1 -1
  79. package/dist/{cose-bilkent-JH36ORCC-CsHaaKi1.cjs → cose-bilkent-JH36ORCC-DRBzHIcA.cjs} +2 -2
  80. package/dist/{cose-bilkent-JH36ORCC-CsHaaKi1.cjs.map → cose-bilkent-JH36ORCC-DRBzHIcA.cjs.map} +1 -1
  81. package/dist/{cynefinDiagram-TSTJHNR4-CSZqIj_l.js → cynefinDiagram-TSTJHNR4-2jnqksgG.js} +3 -3
  82. package/dist/{cynefinDiagram-TSTJHNR4-CSZqIj_l.js.map → cynefinDiagram-TSTJHNR4-2jnqksgG.js.map} +1 -1
  83. package/dist/{cynefinDiagram-TSTJHNR4-BEPBV57_.cjs → cynefinDiagram-TSTJHNR4-Ge9B88rS.cjs} +2 -2
  84. package/dist/{cynefinDiagram-TSTJHNR4-BEPBV57_.cjs.map → cynefinDiagram-TSTJHNR4-Ge9B88rS.cjs.map} +1 -1
  85. package/dist/{dagre-VKFMJZFB-D9fBL_yM.js → dagre-VKFMJZFB-BqLynzOx.js} +3 -3
  86. package/dist/{dagre-VKFMJZFB-D9fBL_yM.js.map → dagre-VKFMJZFB-BqLynzOx.js.map} +1 -1
  87. package/dist/{dagre-VKFMJZFB-BlRE-U3S.cjs → dagre-VKFMJZFB-C7QheUvc.cjs} +2 -2
  88. package/dist/{dagre-VKFMJZFB-BlRE-U3S.cjs.map → dagre-VKFMJZFB-C7QheUvc.cjs.map} +1 -1
  89. package/dist/{diagram-FQU43EPY-Di26xB9f.cjs → diagram-FQU43EPY-CSPyECaU.cjs} +2 -2
  90. package/dist/{diagram-FQU43EPY-Di26xB9f.cjs.map → diagram-FQU43EPY-CSPyECaU.cjs.map} +1 -1
  91. package/dist/{diagram-FQU43EPY-DPR8KMs9.js → diagram-FQU43EPY-DUwsAw4u.js} +3 -3
  92. package/dist/{diagram-FQU43EPY-DPR8KMs9.js.map → diagram-FQU43EPY-DUwsAw4u.js.map} +1 -1
  93. package/dist/{diagram-G47NLZAW-71hjWkYs.cjs → diagram-G47NLZAW-BaP0Lyg0.cjs} +2 -2
  94. package/dist/{diagram-G47NLZAW-71hjWkYs.cjs.map → diagram-G47NLZAW-BaP0Lyg0.cjs.map} +1 -1
  95. package/dist/{diagram-G47NLZAW-BfL1Ut0H.js → diagram-G47NLZAW-h09HILJg.js} +4 -4
  96. package/dist/{diagram-G47NLZAW-BfL1Ut0H.js.map → diagram-G47NLZAW-h09HILJg.js.map} +1 -1
  97. package/dist/{diagram-NH7WQ7WH-BjJctDxT.js → diagram-NH7WQ7WH-BE3XRcGY.js} +3 -3
  98. package/dist/{diagram-NH7WQ7WH-BjJctDxT.js.map → diagram-NH7WQ7WH-BE3XRcGY.js.map} +1 -1
  99. package/dist/{diagram-NH7WQ7WH-B4uTamuE.cjs → diagram-NH7WQ7WH-DyJw7-Gl.cjs} +2 -2
  100. package/dist/{diagram-NH7WQ7WH-B4uTamuE.cjs.map → diagram-NH7WQ7WH-DyJw7-Gl.cjs.map} +1 -1
  101. package/dist/{diagram-OA4YK3LP-BoFOwiXF.js → diagram-OA4YK3LP-BfAM9MZv.js} +4 -4
  102. package/dist/{diagram-OA4YK3LP-BoFOwiXF.js.map → diagram-OA4YK3LP-BfAM9MZv.js.map} +1 -1
  103. package/dist/{diagram-OA4YK3LP-C1ORbLEL.cjs → diagram-OA4YK3LP-DqYpt5F6.cjs} +2 -2
  104. package/dist/{diagram-OA4YK3LP-C1ORbLEL.cjs.map → diagram-OA4YK3LP-DqYpt5F6.cjs.map} +1 -1
  105. package/dist/{diagram-WEI45ONY-COXEDGCZ.js → diagram-WEI45ONY-DtFOpBM4.js} +3 -3
  106. package/dist/{diagram-WEI45ONY-COXEDGCZ.js.map → diagram-WEI45ONY-DtFOpBM4.js.map} +1 -1
  107. package/dist/{diagram-WEI45ONY-BzuHWp9D.cjs → diagram-WEI45ONY-fz5dqgqy.cjs} +2 -2
  108. package/dist/{diagram-WEI45ONY-BzuHWp9D.cjs.map → diagram-WEI45ONY-fz5dqgqy.cjs.map} +1 -1
  109. package/dist/{ebnfDiagram-CCIWWBDH-N0w7QwtK.js → ebnfDiagram-CCIWWBDH-CyKVhKIb.js} +4 -4
  110. package/dist/{ebnfDiagram-CCIWWBDH-N0w7QwtK.js.map → ebnfDiagram-CCIWWBDH-CyKVhKIb.js.map} +1 -1
  111. package/dist/{ebnfDiagram-CCIWWBDH-DE7OPvSn.cjs → ebnfDiagram-CCIWWBDH-Haez4su4.cjs} +2 -2
  112. package/dist/{ebnfDiagram-CCIWWBDH-DE7OPvSn.cjs.map → ebnfDiagram-CCIWWBDH-Haez4su4.cjs.map} +1 -1
  113. package/dist/{erDiagram-Q63AITRT-CqsM_S0E.js → erDiagram-Q63AITRT-9hM3kPUW.js} +5 -5
  114. package/dist/{erDiagram-Q63AITRT-CqsM_S0E.js.map → erDiagram-Q63AITRT-9hM3kPUW.js.map} +1 -1
  115. package/dist/{erDiagram-Q63AITRT-KvBvwG4T.cjs → erDiagram-Q63AITRT-BGEWGa_b.cjs} +2 -2
  116. package/dist/{erDiagram-Q63AITRT-KvBvwG4T.cjs.map → erDiagram-Q63AITRT-BGEWGa_b.cjs.map} +1 -1
  117. package/dist/{extractHeadings-BiNpEj-K.js → extractHeadings-BH0T7P4n.js} +3834 -3824
  118. package/dist/{extractHeadings-BiNpEj-K.js.map → extractHeadings-BH0T7P4n.js.map} +1 -1
  119. package/dist/{extractHeadings-vnYM8Eet.cjs → extractHeadings-BsiIYa_e.cjs} +62 -62
  120. package/dist/{extractHeadings-vnYM8Eet.cjs.map → extractHeadings-BsiIYa_e.cjs.map} +1 -1
  121. package/dist/flowDiagram-23GEKE2U-B9LX4RXy.cjs +2 -0
  122. package/dist/flowDiagram-23GEKE2U-B9LX4RXy.cjs.map +1 -0
  123. package/dist/flowDiagram-23GEKE2U-Dk7STu-u.js +8 -0
  124. package/dist/flowDiagram-23GEKE2U-Dk7STu-u.js.map +1 -0
  125. package/dist/{ganttDiagram-NO4QXBWP-DvdToLYa.cjs → ganttDiagram-NO4QXBWP-4BbeHi64.cjs} +2 -2
  126. package/dist/{ganttDiagram-NO4QXBWP-DvdToLYa.cjs.map → ganttDiagram-NO4QXBWP-4BbeHi64.cjs.map} +1 -1
  127. package/dist/{ganttDiagram-NO4QXBWP-C2P9ON6O.js → ganttDiagram-NO4QXBWP-DtM5HL0C.js} +3 -3
  128. package/dist/{ganttDiagram-NO4QXBWP-C2P9ON6O.js.map → ganttDiagram-NO4QXBWP-DtM5HL0C.js.map} +1 -1
  129. package/dist/{gitGraphDiagram-IHSO6WYX-BkZsK9Hm.cjs → gitGraphDiagram-IHSO6WYX-D1NSh545.cjs} +2 -2
  130. package/dist/{gitGraphDiagram-IHSO6WYX-BkZsK9Hm.cjs.map → gitGraphDiagram-IHSO6WYX-D1NSh545.cjs.map} +1 -1
  131. package/dist/{gitGraphDiagram-IHSO6WYX-DVSslxqP.js → gitGraphDiagram-IHSO6WYX-DFSd1OPO.js} +4 -4
  132. package/dist/{gitGraphDiagram-IHSO6WYX-DVSslxqP.js.map → gitGraphDiagram-IHSO6WYX-DFSd1OPO.js.map} +1 -1
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.client.cjs +1 -1
  135. package/dist/index.client.js +1 -1
  136. package/dist/index.js +1 -1
  137. package/dist/{infoDiagram-FWYZ7A6U-Cd3TPtAG.cjs → infoDiagram-FWYZ7A6U-4wrBBE6X.cjs} +2 -2
  138. package/dist/{infoDiagram-FWYZ7A6U-Cd3TPtAG.cjs.map → infoDiagram-FWYZ7A6U-4wrBBE6X.cjs.map} +1 -1
  139. package/dist/{infoDiagram-FWYZ7A6U-vPnKgn2w.js → infoDiagram-FWYZ7A6U-ZRUjO8nW.js} +2 -2
  140. package/dist/{infoDiagram-FWYZ7A6U-vPnKgn2w.js.map → infoDiagram-FWYZ7A6U-ZRUjO8nW.js.map} +1 -1
  141. package/dist/{ishikawaDiagram-FXEZZL3T-CR9ySQXh.cjs → ishikawaDiagram-FXEZZL3T-DE9GPbED.cjs} +2 -2
  142. package/dist/{ishikawaDiagram-FXEZZL3T-CR9ySQXh.cjs.map → ishikawaDiagram-FXEZZL3T-DE9GPbED.cjs.map} +1 -1
  143. package/dist/{ishikawaDiagram-FXEZZL3T-BkgUhFd7.js → ishikawaDiagram-FXEZZL3T-DNgqlFhZ.js} +2 -2
  144. package/dist/{ishikawaDiagram-FXEZZL3T-BkgUhFd7.js.map → ishikawaDiagram-FXEZZL3T-DNgqlFhZ.js.map} +1 -1
  145. package/dist/{journeyDiagram-5HDEW3XC-CeLukjGs.js → journeyDiagram-5HDEW3XC-BXlXmDhR.js} +5 -5
  146. package/dist/{journeyDiagram-5HDEW3XC-CeLukjGs.js.map → journeyDiagram-5HDEW3XC-BXlXmDhR.js.map} +1 -1
  147. package/dist/{journeyDiagram-5HDEW3XC-C_kouMqJ.cjs → journeyDiagram-5HDEW3XC-jcXDYbA9.cjs} +2 -2
  148. package/dist/{journeyDiagram-5HDEW3XC-C_kouMqJ.cjs.map → journeyDiagram-5HDEW3XC-jcXDYbA9.cjs.map} +1 -1
  149. package/dist/{kanban-definition-HUTT4EX6-B7sK7KKo.js → kanban-definition-HUTT4EX6-C9IdgWIg.js} +3 -3
  150. package/dist/{kanban-definition-HUTT4EX6-B7sK7KKo.js.map → kanban-definition-HUTT4EX6-C9IdgWIg.js.map} +1 -1
  151. package/dist/{kanban-definition-HUTT4EX6-C72m9SkW.cjs → kanban-definition-HUTT4EX6-D5_pDh9h.cjs} +2 -2
  152. package/dist/{kanban-definition-HUTT4EX6-C72m9SkW.cjs.map → kanban-definition-HUTT4EX6-D5_pDh9h.cjs.map} +1 -1
  153. package/dist/{linear-DA8CNisd.js → linear-CTibpBci.js} +2 -2
  154. package/dist/{linear-DA8CNisd.js.map → linear-CTibpBci.js.map} +1 -1
  155. package/dist/{linear-BgdXLHZt.cjs → linear-DDWdtbxq.cjs} +2 -2
  156. package/dist/{linear-BgdXLHZt.cjs.map → linear-DDWdtbxq.cjs.map} +1 -1
  157. package/dist/{mindmap-definition-LN4V7U3C-C7YrqUCf.js → mindmap-definition-LN4V7U3C-CXaKAu6n.js} +4 -4
  158. package/dist/{mindmap-definition-LN4V7U3C-C7YrqUCf.js.map → mindmap-definition-LN4V7U3C-CXaKAu6n.js.map} +1 -1
  159. package/dist/{mindmap-definition-LN4V7U3C-CirMzlY5.cjs → mindmap-definition-LN4V7U3C-gBn938NF.cjs} +2 -2
  160. package/dist/{mindmap-definition-LN4V7U3C-CirMzlY5.cjs.map → mindmap-definition-LN4V7U3C-gBn938NF.cjs.map} +1 -1
  161. package/dist/{pegDiagram-2B236MQR-DpzcFesN.js → pegDiagram-2B236MQR-BiQyejnD.js} +4 -4
  162. package/dist/{pegDiagram-2B236MQR-DpzcFesN.js.map → pegDiagram-2B236MQR-BiQyejnD.js.map} +1 -1
  163. package/dist/{pegDiagram-2B236MQR-BWo1kluM.cjs → pegDiagram-2B236MQR-fR_9AvHk.cjs} +2 -2
  164. package/dist/{pegDiagram-2B236MQR-BWo1kluM.cjs.map → pegDiagram-2B236MQR-fR_9AvHk.cjs.map} +1 -1
  165. package/dist/{pieDiagram-ENE6RG2P-iRoOiNc4.cjs → pieDiagram-ENE6RG2P-BZtqlfyU.cjs} +2 -2
  166. package/dist/{pieDiagram-ENE6RG2P-iRoOiNc4.cjs.map → pieDiagram-ENE6RG2P-BZtqlfyU.cjs.map} +1 -1
  167. package/dist/{pieDiagram-ENE6RG2P-B6RHvEHE.js → pieDiagram-ENE6RG2P-CZTZpVqy.js} +4 -4
  168. package/dist/{pieDiagram-ENE6RG2P-B6RHvEHE.js.map → pieDiagram-ENE6RG2P-CZTZpVqy.js.map} +1 -1
  169. package/dist/{quadrantDiagram-ABIIQ3AL-9Gb8LEQi.js → quadrantDiagram-ABIIQ3AL-ByHTxHrm.js} +3 -3
  170. package/dist/{quadrantDiagram-ABIIQ3AL-9Gb8LEQi.js.map → quadrantDiagram-ABIIQ3AL-ByHTxHrm.js.map} +1 -1
  171. package/dist/{quadrantDiagram-ABIIQ3AL-DKbTOjNz.cjs → quadrantDiagram-ABIIQ3AL-CC5w4CkE.cjs} +2 -2
  172. package/dist/{quadrantDiagram-ABIIQ3AL-DKbTOjNz.cjs.map → quadrantDiagram-ABIIQ3AL-CC5w4CkE.cjs.map} +1 -1
  173. package/dist/{railroadDiagram-RFXS5EU6-CXgCaCb_.js → railroadDiagram-RFXS5EU6-C99zfAzl.js} +4 -4
  174. package/dist/{railroadDiagram-RFXS5EU6-CXgCaCb_.js.map → railroadDiagram-RFXS5EU6-C99zfAzl.js.map} +1 -1
  175. package/dist/{railroadDiagram-RFXS5EU6-SOxzO7C3.cjs → railroadDiagram-RFXS5EU6-_YckPr2T.cjs} +2 -2
  176. package/dist/{railroadDiagram-RFXS5EU6-SOxzO7C3.cjs.map → railroadDiagram-RFXS5EU6-_YckPr2T.cjs.map} +1 -1
  177. package/dist/{requirementDiagram-TGXJPOKE-B6RQ9Kpp.cjs → requirementDiagram-TGXJPOKE-BCeWSLF4.cjs} +2 -2
  178. package/dist/{requirementDiagram-TGXJPOKE-B6RQ9Kpp.cjs.map → requirementDiagram-TGXJPOKE-BCeWSLF4.cjs.map} +1 -1
  179. package/dist/{requirementDiagram-TGXJPOKE-DbSm2ehr.js → requirementDiagram-TGXJPOKE-DBzuXzE9.js} +4 -4
  180. package/dist/{requirementDiagram-TGXJPOKE-DbSm2ehr.js.map → requirementDiagram-TGXJPOKE-DBzuXzE9.js.map} +1 -1
  181. package/dist/{sankeyDiagram-HTMAVEWB-BNqZ6R3H.js → sankeyDiagram-HTMAVEWB-ChQ2ozXn.js} +2 -2
  182. package/dist/{sankeyDiagram-HTMAVEWB-BNqZ6R3H.js.map → sankeyDiagram-HTMAVEWB-ChQ2ozXn.js.map} +1 -1
  183. package/dist/{sankeyDiagram-HTMAVEWB-DgGDy2eG.cjs → sankeyDiagram-HTMAVEWB-DQOfpr04.cjs} +2 -2
  184. package/dist/{sankeyDiagram-HTMAVEWB-DgGDy2eG.cjs.map → sankeyDiagram-HTMAVEWB-DQOfpr04.cjs.map} +1 -1
  185. package/dist/{sequenceDiagram-DBY2YBRQ-Bf3EtJcL.js → sequenceDiagram-DBY2YBRQ-CCzsdQ__.js} +4 -4
  186. package/dist/{sequenceDiagram-DBY2YBRQ-Bf3EtJcL.js.map → sequenceDiagram-DBY2YBRQ-CCzsdQ__.js.map} +1 -1
  187. package/dist/{sequenceDiagram-DBY2YBRQ-BuKDthxK.cjs → sequenceDiagram-DBY2YBRQ-D2R8WWiq.cjs} +2 -2
  188. package/dist/{sequenceDiagram-DBY2YBRQ-BuKDthxK.cjs.map → sequenceDiagram-DBY2YBRQ-D2R8WWiq.cjs.map} +1 -1
  189. package/dist/{sizeCapture-X5ZJPWSS-CNWx6elV.js → sizeCapture-X5ZJPWSS-9Q2RBacx.js} +2 -2
  190. package/dist/{sizeCapture-X5ZJPWSS-CNWx6elV.js.map → sizeCapture-X5ZJPWSS-9Q2RBacx.js.map} +1 -1
  191. package/dist/{sizeCapture-X5ZJPWSS-NRqA0pmT.cjs → sizeCapture-X5ZJPWSS-CedNWC9b.cjs} +2 -2
  192. package/dist/{sizeCapture-X5ZJPWSS-NRqA0pmT.cjs.map → sizeCapture-X5ZJPWSS-CedNWC9b.cjs.map} +1 -1
  193. package/dist/src/components/MarkdownRenderer.d.ts +31 -1
  194. package/dist/src/components/MarkdownRenderer.d.ts.map +1 -1
  195. package/dist/src/components/MarkdownViewer.d.ts +9 -1
  196. package/dist/src/components/MarkdownViewer.d.ts.map +1 -1
  197. package/dist/src/index.client.d.ts +1 -1
  198. package/dist/src/index.client.d.ts.map +1 -1
  199. package/dist/{stateDiagram-2N3HPSRC-DqhvonPY.cjs → stateDiagram-2N3HPSRC-BFjEDzN5.cjs} +2 -2
  200. package/dist/{stateDiagram-2N3HPSRC-DqhvonPY.cjs.map → stateDiagram-2N3HPSRC-BFjEDzN5.cjs.map} +1 -1
  201. package/dist/{stateDiagram-2N3HPSRC-Bdphi4r-.js → stateDiagram-2N3HPSRC-DVXBUdgS.js} +3 -3
  202. package/dist/{stateDiagram-2N3HPSRC-Bdphi4r-.js.map → stateDiagram-2N3HPSRC-DVXBUdgS.js.map} +1 -1
  203. package/dist/{stateDiagram-v2-6OUMAXLB-p9rvsC9-.cjs → stateDiagram-v2-6OUMAXLB-BpxIqbgw.cjs} +2 -2
  204. package/dist/{stateDiagram-v2-6OUMAXLB-p9rvsC9-.cjs.map → stateDiagram-v2-6OUMAXLB-BpxIqbgw.cjs.map} +1 -1
  205. package/dist/{stateDiagram-v2-6OUMAXLB-DdB47j1a.js → stateDiagram-v2-6OUMAXLB-etkgI8XE.js} +3 -3
  206. package/dist/{stateDiagram-v2-6OUMAXLB-DdB47j1a.js.map → stateDiagram-v2-6OUMAXLB-etkgI8XE.js.map} +1 -1
  207. package/dist/{swimlanes-5IMT3BWC-JZVn9oCR.cjs → swimlanes-5IMT3BWC-ByyaHYdJ.cjs} +2 -2
  208. package/dist/{swimlanes-5IMT3BWC-JZVn9oCR.cjs.map → swimlanes-5IMT3BWC-ByyaHYdJ.cjs.map} +1 -1
  209. package/dist/{swimlanes-5IMT3BWC-BMZk0Lp2.js → swimlanes-5IMT3BWC-CRF_hU5-.js} +4 -4
  210. package/dist/{swimlanes-5IMT3BWC-BMZk0Lp2.js.map → swimlanes-5IMT3BWC-CRF_hU5-.js.map} +1 -1
  211. package/dist/{swimlanesDiagram-G3AALYLV-DxEegQkl.cjs → swimlanesDiagram-G3AALYLV-DmAVTn1y.cjs} +2 -2
  212. package/dist/{swimlanesDiagram-G3AALYLV-DxEegQkl.cjs.map → swimlanesDiagram-G3AALYLV-DmAVTn1y.cjs.map} +1 -1
  213. package/dist/{swimlanesDiagram-G3AALYLV-DNhrqmqB.js → swimlanesDiagram-G3AALYLV-qE56wCfv.js} +3 -3
  214. package/dist/{swimlanesDiagram-G3AALYLV-DNhrqmqB.js.map → swimlanesDiagram-G3AALYLV-qE56wCfv.js.map} +1 -1
  215. package/dist/{timeline-definition-FHXFAJF6-BjxOaDZF.cjs → timeline-definition-FHXFAJF6-CYpydtqC.cjs} +2 -2
  216. package/dist/{timeline-definition-FHXFAJF6-BjxOaDZF.cjs.map → timeline-definition-FHXFAJF6-CYpydtqC.cjs.map} +1 -1
  217. package/dist/{timeline-definition-FHXFAJF6-C4kHuqGr.js → timeline-definition-FHXFAJF6-U6tU13YO.js} +3 -3
  218. package/dist/{timeline-definition-FHXFAJF6-C4kHuqGr.js.map → timeline-definition-FHXFAJF6-U6tU13YO.js.map} +1 -1
  219. package/dist/{vennDiagram-L72KCM5P-nQ40EeIj.cjs → vennDiagram-L72KCM5P-CfbVR5CF.cjs} +2 -2
  220. package/dist/{vennDiagram-L72KCM5P-nQ40EeIj.cjs.map → vennDiagram-L72KCM5P-CfbVR5CF.cjs.map} +1 -1
  221. package/dist/{vennDiagram-L72KCM5P-faE6oCYZ.js → vennDiagram-L72KCM5P-q79Xn7UV.js} +2 -2
  222. package/dist/{vennDiagram-L72KCM5P-faE6oCYZ.js.map → vennDiagram-L72KCM5P-q79Xn7UV.js.map} +1 -1
  223. package/dist/{wardleyDiagram-EHGQE667-COQa-JdJ.js → wardleyDiagram-EHGQE667-BG3W74MX.js} +3 -3
  224. package/dist/{wardleyDiagram-EHGQE667-COQa-JdJ.js.map → wardleyDiagram-EHGQE667-BG3W74MX.js.map} +1 -1
  225. package/dist/{wardleyDiagram-EHGQE667-ByYfznTT.cjs → wardleyDiagram-EHGQE667-CSJ22zfj.cjs} +2 -2
  226. package/dist/{wardleyDiagram-EHGQE667-ByYfznTT.cjs.map → wardleyDiagram-EHGQE667-CSJ22zfj.cjs.map} +1 -1
  227. package/dist/{xychartDiagram-FW5EYKEG-D7FhqNeM.js → xychartDiagram-FW5EYKEG-BISI4a7c.js} +3 -3
  228. package/dist/{xychartDiagram-FW5EYKEG-D7FhqNeM.js.map → xychartDiagram-FW5EYKEG-BISI4a7c.js.map} +1 -1
  229. package/dist/{xychartDiagram-FW5EYKEG-BHBIM0-w.cjs → xychartDiagram-FW5EYKEG-Df8hBgvh.cjs} +2 -2
  230. package/dist/{xychartDiagram-FW5EYKEG-BHBIM0-w.cjs.map → xychartDiagram-FW5EYKEG-Df8hBgvh.cjs.map} +1 -1
  231. package/package.json +1 -1
  232. package/dist/channel-B6gYWXtQ.js +0 -6
  233. package/dist/channel-CZceKK2b.cjs +0 -2
  234. package/dist/flowDiagram-23GEKE2U-BNIQEPQk.cjs +0 -2
  235. package/dist/flowDiagram-23GEKE2U-BNIQEPQk.cjs.map +0 -1
  236. package/dist/flowDiagram-23GEKE2U-Cu3z7Hd2.js +0 -8
  237. package/dist/flowDiagram-23GEKE2U-Cu3z7Hd2.js.map +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("./chunk-JWPE2WC7-u2Y2E01t.cjs"),j=require("./extractHeadings-vnYM8Eet.cjs"),Be=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),Ie=require("./cytoscape.esm-D8x1ApSO.cjs");var he={exports:{}},le={exports:{}},fe={exports:{}},$e=fe.exports,we;function ke(){return we||(we=1,(function(x,A){(function(R,N){x.exports=N()})($e,function(){return(function(C){var R={};function N(v){if(R[v])return R[v].exports;var h=R[v]={i:v,l:!1,exports:{}};return C[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=C,N.c=R,N.i=function(v){return v},N.d=function(v,h,n){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(C,R,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v}),(function(C,R,N){var v=N(2),h=N(8),n=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=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))},r.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=r}),(function(C,R,N){function v(h){this.vGraphObject=h}C.exports=v}),(function(C,R,N){var v=N(2),h=N(10),n=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,a,c){a==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,a!=null&&s!=null?this.rect=new n(s.x,s.y,a.width,a.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],a=this;return a.edges.forEach(function(c){if(c.target==t){if(c.source!=a)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],a=this;return a.edges.forEach(function(c){if(!(c.source==a||c.target==a))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(a){if(a.source==s)t.add(a.target);else{if(a.target!=s)throw"Incorrect incidency!";t.add(a.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,a;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],a=s.withChildren(),a.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var a=this.child.getNodes(),c=0;c<a.length;c++)s=a[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var t,s,a=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+i.nextDouble()*(c-a)+a;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),a=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(a+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>a?(this.rect.y-=(this.labelHeight-a)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(a+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var a=this.rect.y;a>r.WORLD_BOUNDARY?a=r.WORLD_BOUNDARY:a<-r.WORLD_BOUNDARY&&(a=-r.WORLD_BOUNDARY);var c=new f(s,a),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e}),(function(C,R,N){var v=N(0);function h(){}for(var n in v)h[n]=v[n];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=h}),(function(C,R,N){function v(h,n){h==null&&n==null?(this.x=0,this.y=0):(this.x=h,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},C.exports=v}),(function(C,R,N){var v=N(2),h=N(10),n=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L<d;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var b=this.nodes.indexOf(l);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof f){var u=c;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var w=u.source.edges.indexOf(u),G=u.target.edges.indexOf(u);if(!(w>-1&&G>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(G,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;w<b;w++){var G=L[w];T=G.getTop(),u=G.getLeft(),c>T&&(c=T),l>u&&(l=u)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,w,G,B,U=this.nodes,V=U.length,M=0;M<V;M++){var tt=U[M];c&&tt.child!=null&&tt.updateBounds(),L=tt.getLeft(),b=tt.getRight(),w=tt.getTop(),G=tt.getBottom(),l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var o=new e(l,u,T-l,d-u);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=o.x-B,this.right=o.x+o.width+B,this.top=o.y-B,this.bottom=o.y+o.height+B},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,w,G,B=c.length,U=0;U<B;U++){var V=c[U];L=V.getLeft(),b=V.getRight(),w=V.getTop(),G=V.getBottom(),l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var M=new e(l,u,T-l,d-u);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,u=0;u<T;u++){var d=l[u];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,u=this.nodes[0],d,L,b=u.withChildren();for(b.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){u=l.shift(),d=u.getEdges();for(var w=d.length,G=0;G<w;G++){var B=d[G];if(L=B.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var U=L.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},C.exports=s}),(function(C,R,N){var v,h=N(1);function n(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof v){var i=r;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var e,g=f.length,t=0;t<g;t++)e=f[t],i.remove(e);var s=[];s=s.concat(i.getNodes());var a;g=s.length;for(var t=0;t<g;t++)a=s[t],i.remove(a);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,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 r=[],i=this.getGraphs(),f=i.length,e=0;e<f;e++)r=r.concat(i[e].getNodes());this.allNodes=r}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 r=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)r=r.concat(i[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,i){if(!(r!=null&&i!=null))throw"assert failed";if(r==i)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==i)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,i,f,e,g,t=this.getAllEdges(),s=t.length,a=0;a<s;a++){if(r=t[a],i=r.source,f=r.target,r.lca=null,r.sourceInLca=i,r.targetInLca=f,i==f){r.lca=i.getOwner();continue}for(e=i.getOwner();r.lca==null;){for(r.targetInLca=f,g=f.getOwner();r.lca==null;){if(g==e){r.lca=g;break}if(g==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=g.getParent(),g=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,i){if(r==i)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=i.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(r,i){r==null&&i==null&&(r=this.rootGraph,i=1);for(var f,e=r.getNodes(),g=e.length,t=0;t<g;t++)f=e[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},n.prototype.includesInvalidEdge=function(){for(var r,i=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&i.push(r);for(var e=0;e<i.length;e++)this.remove(i[e]);return!1},C.exports=n}),(function(C,R,N){var v=N(12);function h(){}h.calcSeparationAmount=function(n,r,i,f){if(!n.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,e),i[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),i[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?i[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]<s?s=i[0]:t=i[1],i[0]=-1*e[0]*(s/2+f),i[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(n,r,i){n.getCenterX()<r.getCenterX()?i[0]=-1:i[0]=1,n.getCenterY()<r.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(n,r,i){var f=n.getCenterX(),e=n.getCenterY(),g=r.getCenterX(),t=r.getCenterY();if(n.intersects(r))return i[0]=f,i[1]=e,i[2]=g,i[3]=t,!0;var s=n.getX(),a=n.getY(),c=n.getRight(),l=n.getX(),T=n.getBottom(),u=n.getRight(),d=n.getWidthHalf(),L=n.getHeightHalf(),b=r.getX(),w=r.getY(),G=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),tt=r.getHeightHalf(),o=!1,E=!1;if(f===g){if(e>t)return i[0]=f,i[1]=a,i[2]=g,i[3]=U,!1;if(e<t)return i[0]=f,i[1]=T,i[2]=g,i[3]=w,!1}else if(e===t){if(f>g)return i[0]=s,i[1]=e,i[2]=G,i[3]=t,!1;if(f<g)return i[0]=c,i[1]=e,i[2]=b,i[3]=t,!1}else{var p=n.height/n.width,m=r.height/r.width,y=(t-e)/(g-f),S=void 0,O=void 0,F=void 0,W=void 0,I=void 0,Q=void 0;if(-p===y?f>g?(i[0]=l,i[1]=T,o=!0):(i[0]=c,i[1]=a,o=!0):p===y&&(f>g?(i[0]=s,i[1]=a,o=!0):(i[0]=u,i[1]=T,o=!0)),-m===y?g>f?(i[2]=B,i[3]=U,E=!0):(i[2]=G,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=V,i[3]=U,E=!0)),o&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!o)switch(S){case 1:W=a,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=l,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(O){case 1:Q=w,I=g+-tt/y,i[2]=I,i[3]=Q;break;case 2:I=V,Q=t+M*y,i[2]=I,i[3]=Q;break;case 3:Q=U,I=g+tt/y,i[2]=I,i[3]=Q;break;case 4:I=B,Q=t+-M*y,i[2]=I,i[3]=Q;break}}return!1},h.getCardinalDirection=function(n,r,i){return n>r?i:1+i%4},h.getIntersection=function(n,r,i,f){if(f==null)return this.getIntersection2(n,r,i);var e=n.x,g=n.y,t=r.x,s=r.y,a=i.x,c=i.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,G=void 0,B=void 0,U=void 0,V=void 0;return L=s-g,w=e-t,B=t*g-e*s,b=T-c,G=a-l,U=l*c-a*T,V=L*G-b*w,V===0?null:(u=(w*U-G*B)/V,d=(b*B-L*U)/V,new v(u,d))},h.angleOfVector=function(n,r,i,f){var e=void 0;return n!==i?(e=Math.atan((f-r)/(i-n)),i<n?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(n,r,i,f){var e=n.x,g=n.y,t=r.x,s=r.y,a=i.x,c=i.y,l=f.x,T=f.y,u=(t-e)*(T-c)-(l-a)*(s-g);if(u===0)return!1;var d=((T-c)*(l-e)+(a-l)*(T-g))/u,L=((g-s)*(l-e)+(t-e)*(T-g))/u;return 0<d&&d<1&&0<L&&L<1},h.findCircleLineIntersections=function(n,r,i,f,e,g,t){var s=(i-n)*(i-n)+(f-r)*(f-r),a=2*((n-e)*(i-n)+(r-g)*(f-r)),c=(n-e)*(n-e)+(r-g)*(r-g)-t*t,l=a*a-4*s*c;if(l>=0){var T=(-a+Math.sqrt(a*a-4*s*c))/(2*s),u=(-a-Math.sqrt(a*a-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,C.exports=h}),(function(C,R,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},C.exports=v}),(function(C,R,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v}),(function(C,R,N){var v=(function(){function e(g,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(g,a.key,a)}}return function(g,t,s){return t&&e(g.prototype,t),s&&e(g,s),g}})();function h(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var n=function(g){return{value:g,next:null,prev:null}},r=function(g,t,s,a){return g!==null?g.next=t:a.head=t,s!==null?s.prev=t:a.tail=t,t.prev=g,t.next=s,a.length++,t},i=function(g,t){var s=g.prev,a=g.next;return s!==null?s.next=a:t.head=a,a!==null?a.prev=s:t.tail=s,g.prev=g.next=null,t.length--,g},f=(function(){function e(g){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,g?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return r(null,n(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,a=this.head;s<t;)a=a.next,s++;return a.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var a=1,c=this.head;a<t;)c=c.next,a++;c.value=s}}}]),e})();C.exports=f}),(function(C,R,N){function v(h,n,r){this.x=null,this.y=null,h==null&&n==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof n=="number"&&r==null?(this.x=h,this.y=n):h.constructor.name=="Point"&&n==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,n,r){h.constructor.name=="Point"&&n==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof n=="number"&&r==null&&(parseInt(h)==h&&parseInt(n)==n?this.move(h,n):(this.x=Math.floor(h+.5),this.y=Math.floor(n+.5)))},v.prototype.move=function(h,n){this.x=h,this.y=n},v.prototype.translate=function(h,n){this.x+=h,this.y+=n},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var n=h;return this.x==n.x&&this.y==n.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v}),(function(C,R,N){function v(h,n,r,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&n!=null&&r!=null&&i!=null&&(this.x=h,this.y=n,this.width=r,this.height=i)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v}),(function(C,R,N){var v=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 h(){}h.lastID=0,h.createID=function(n){return h.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=h.getString(),h.lastID++),n.uniqueID)},h.getString=function(n){return n==null&&(n=h.lastID),"Object#"+n},h.isPrimitive=function(n){var r=typeof n>"u"?"undefined":v(n);return n==null||r!="object"&&r!="function"},C.exports=h}),(function(C,R,N){function v(a){if(Array.isArray(a)){for(var c=0,l=Array(a.length);c<a.length;c++)l[c]=a[c];return l}else return Array.from(a)}var h=N(0),n=N(7),r=N(3),i=N(1),f=N(6),e=N(5),g=N(17),t=N(29);function s(a){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},s.prototype.newGraph=function(a){return new f(null,this.graphManager,a)},s.prototype.newNode=function(a){return new r(this.graphManager,a)},s.prototype.newEdge=function(a){return new i(null,null,a)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),h.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),c=0;c<a.length;c++)a[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof r){var c=a;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(a instanceof i){var d=a;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(a instanceof f){var b=a;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(a){if(a==null)this.transform(new e(0,0));else{var c=new g,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(a.x),c.setWorldOrgY(a.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),u,d=0;d<T.length;d++)u=T[d],u.transform(c)}}},s.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=a.getNodes(),u=0;u<T.length;u++)c=T[u],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var a=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<l.length;u++)l[u].getChild()!=null&&(T=!1);if(!T)return a;var d=new Set,L=[],b=new Map,w=[];for(w=w.concat(l);w.length>0&&c;){for(L.push(w[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var B=G.getEdges(),u=0;u<B.length;u++){var U=B[u].getOtherEnd(G);if(b.get(G)!=U)if(!d.has(U))L.push(U),b.set(U,G);else{c=!1;break}}}if(!c)a=[];else{var V=[].concat(v(d));a.push(V);for(var u=0;u<V.length;u++){var M=V[u],tt=w.indexOf(M);tt>-1&&w.splice(tt,1)}d=new Set,b=new Map}}return a},s.prototype.createDummyNodesForBendpoints=function(a){for(var c=[],l=a.source,T=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,l,d),c.add(d),l=d}var L=this.newEdge(null);return this.graphManager.add(L,l,a.target),this.edgeToDummyNodes.set(a,c),a.isInterGraph()?this.graphManager.remove(a):T.remove(a),c},s.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(v(this.edgeToDummyNodes.keys())).concat(a);for(var c=0;c<a.length;c++){var l=a[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),u=0;u<T.length;u++){var d=T[u],L=new e(d.getCenterX(),d.getCenterY()),b=l.bendpoints.get(u);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(a,c,l,T){if(l!=null&&T!=null){var u=c;if(a<=50){var d=c/l;u-=(c-d)/50*(50-a)}else{var L=c*T;u+=(L-c)/50*(a-50)}return u}else{var b,w;return a<=50?(b=9*c/500,w=c/10):(b=9*c/50,w=-8*c),b*a+w}},s.findCenterOfTree=function(a){var c=[];c=c.concat(a);var l=[],T=new Map,u=!1,d=null;(c.length==1||c.length==2)&&(u=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],w=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),w==1&&l.push(b)}var G=[];for(G=G.concat(l);!u;){var B=[];B=B.concat(G),G=[];for(var L=0;L<c.length;L++){var b=c[L],U=c.indexOf(b);U>=0&&c.splice(U,1);var V=b.getNeighborsList();V.forEach(function(o){if(l.indexOf(o)<0){var E=T.get(o),p=E-1;p==1&&G.push(o),T.set(o,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(a){this.graphManager=a},C.exports=s}),(function(C,R,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v}),(function(C,R,N){var v=N(5);function h(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(n){this.lworldExtX=n},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(n){this.lworldExtY=n},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},h.prototype.transformX=function(n){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),r},h.prototype.transformY=function(n){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),r},h.prototype.inverseTransformX=function(n){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),r},h.prototype.inverseTransformY=function(n){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),r},h.prototype.inverseTransformPoint=function(n){var r=new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},C.exports=h}),(function(C,R,N){function v(t){if(Array.isArray(t)){for(var s=0,a=Array(t.length);s<t.length;s++)a[s]=t[s];return a}else return Array.from(t)}var h=N(15),n=N(4),r=N(0),i=N(8),f=N(9);function e(){h.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}e.prototype=Object.create(h.prototype);for(var g in h)e[g]=h[g];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,a,c,l,T,u,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),a=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*a))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-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()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,a=0;a<t.length;a++)s=t[a],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,a=0;a<u.length;a++)l=u[a],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(a=0;a<u.length;a++)for(l=u[a],c=a+1;c<u.length;c++)T=u[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),a=0;a<s.length;a++)t=s[a],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,a=0;a<t.length;a++)s=t[a],s.move()},e.prototype.calcSpringForce=function(t,s){var a=t.getSource(),c=t.getTarget(),l,T,u,d;if(this.uniformLeafNodeSizes&&a.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),u=T*(t.lengthX/l),d=T*(t.lengthY/l),a.springForceX+=u,a.springForceY+=d,c.springForceX-=u,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var a=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),u,d,L,b,w,G,B;if(a.intersects(c)){i.calcSeparationAmount(a,c,l,n.DEFAULT_EDGE_LENGTH/2),G=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*G,t.repulsionForceY-=U*B,s.repulsionForceX+=U*G,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-a.getCenterX(),d=c.getCenterY()-a.getCenterY()):(i.getIntersection(a,c,T),u=T[2]-T[0],d=T[3]-T[1]),Math.abs(u)<n.MIN_REPULSION_DIST&&(u=f.sign(u)*n.MIN_REPULSION_DIST),Math.abs(d)<n.MIN_REPULSION_DIST&&(d=f.sign(d)*n.MIN_REPULSION_DIST),L=u*u+d*d,b=Math.sqrt(L),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,G=w*u/b,B=w*d/b,t.repulsionForceX-=G,t.repulsionForceY-=B,s.repulsionForceX+=G,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,a,c,l,T,u,d,L;s=t.getOwner(),a=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-a,T=t.getCenterY()-c,u=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),a=0;a<s.length;a++)t=s[a],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,a=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(a);for(var l=0;l<s;l++)for(var T=0;T<a;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,a){var c=0,l=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-a)/this.repulsionRange));for(var d=c;d<=l;d++)for(var L=T;L<=u;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,l,T,u)},e.prototype.updateGrid=function(){var t,s,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<a.length;t++)s=a[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,a,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&a||c){var l=new Set;t.surrounding=new Array;for(var T,u=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=u.length||L>=u[0].length)){for(var b=0;b<u[d][L].length;b++)if(T=u[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),G=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&G<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},C.exports=e}),(function(C,R,N){var v=N(1),h=N(4);function n(i,f,e){v.call(this,i,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];C.exports=n}),(function(C,R,N){var v=N(3),h=N(4);function n(i,f,e,g){v.call(this,i,f,e,g),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];n.prototype.setGridCoordinates=function(i,f,e,g){this.startX=i,this.finishX=f,this.startY=e,this.finishY=g},C.exports=n}),(function(C,R,N){function v(h,n){this.width=0,this.height=0,h!==null&&n!==null&&(this.height=n,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},C.exports=v}),(function(C,R,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(n,r){var i=v.createID(n);this.contains(i)||(this.map[i]=r,this.keys.push(n))},h.prototype.contains=function(n){return v.createID(n),this.map[n]!=null},h.prototype.get=function(n){var r=v.createID(n);return this.map[r]},h.prototype.keySet=function(){return this.keys},C.exports=h}),(function(C,R,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(n){var r=v.createID(n);this.contains(r)||(this.set[r]=n)},h.prototype.remove=function(n){delete this.set[v.createID(n)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(n){return this.set[v.createID(n)]==n},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),i=r.length,f=0;f<i;f++)n.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(n){for(var r=n.length,i=0;i<r;i++){var f=n[i];this.add(f)}},C.exports=h}),(function(C,R,N){function v(){}v.multMat=function(h,n){for(var r=[],i=0;i<h.length;i++){r[i]=[];for(var f=0;f<n[0].length;f++){r[i][f]=0;for(var e=0;e<h[0].length;e++)r[i][f]+=h[i][e]*n[e][f]}}return r},v.transpose=function(h){for(var n=[],r=0;r<h[0].length;r++){n[r]=[];for(var i=0;i<h.length;i++)n[r][i]=h[i][r]}return n},v.multCons=function(h,n){for(var r=[],i=0;i<h.length;i++)r[i]=h[i]*n;return r},v.minusOp=function(h,n){for(var r=[],i=0;i<h.length;i++)r[i]=h[i]-n[i];return r},v.dotProduct=function(h,n){for(var r=0,i=0;i<h.length;i++)r+=h[i]*n[i];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var n=[],r=this.mag(h),i=0;i<h.length;i++)n[i]=h[i]/r;return n},v.multGamma=function(h){for(var n=[],r=0,i=0;i<h.length;i++)r+=h[i];r*=-1/h.length;for(var f=0;f<h.length;f++)n[f]=r+h[f];return n},v.multL=function(h,n,r){for(var i=[],f=[],e=[],g=0;g<n[0].length;g++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][g]*h[s];f[g]=t}for(var a=0;a<r.length;a++){for(var c=0,l=0;l<r.length;l++)c+=r[a][l]*f[l];e[a]=c}for(var T=0;T<n.length;T++){for(var u=0,d=0;d<n[0].length;d++)u+=n[T][d]*e[d];i[T]=u}return i},C.exports=v}),(function(C,R,N){var v=(function(){function i(f,e){for(var g=0;g<e.length;g++){var t=e[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,g){return e&&i(f.prototype,e),g&&i(f,g),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var n=N(11),r=(function(){function i(f,e){h(this,i),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;f instanceof n?g=f.size():g=f.length,this._quicksort(f,0,g-1)}return v(i,[{key:"_quicksort",value:function(e,g,t){if(g<t){var s=this._partition(e,g,t);this._quicksort(e,g,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,g,t){for(var s=this._get(e,g),a=g,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,a),s);)a++;if(a<c)this._swap(e,a,c),a++,c--;else return c}}},{key:"_get",value:function(e,g){return e instanceof n?e.get_object_at(g):e[g]}},{key:"_set",value:function(e,g,t){e instanceof n?e.set_object_at(g,t):e[g]=t}},{key:"_swap",value:function(e,g,t){var s=this._get(e,g);this._set(e,g,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,g){return g>e}}]),i})();C.exports=r}),(function(C,R,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,n]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,g);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var a=t;a<this.m;a++)h[a][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var u=t;u<this.m;u++)h[u][c]+=l*h[u][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<g){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=v.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var b=t+1;b<this.n;b++)r[b]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)i[w]=0;for(var G=t+1;G<this.n;G++)for(var B=t+1;B<this.m;B++)i[B]+=r[G]*h[B][G];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*i[M]}for(var tt=t+1;tt<this.n;tt++)this.V[tt][t]=r[tt]}}var o=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<o&&(this.s[o-1]=0),g+1<o&&(r[g]=h[g][o-1]),r[o-1]=0;{for(var E=e;E<n;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<n;y++){for(var S=0,O=m;O<this.m;O++)S+=this.U[O][m]*this.U[O][y];S=-S/this.U[m][m];for(var F=m;F<this.m;F++)this.U[F][y]+=S*this.U[F][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var I=0;I<m-1;I++)this.U[I][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<g,r[z]!==0))for(var X=z+1;X<n;X++){for(var it=0,$=z+1;$<this.n;$++)it+=this.V[$][z]*this.V[$][X];it=-it/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=it*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=o-1,et=Math.pow(2,-52),lt=Math.pow(2,-966);o>0;){var J=void 0,It=void 0;for(J=o-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+et*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===o-2)It=4;else{var Nt=void 0;for(Nt=o-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==o?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+et*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===o-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var nt=r[o-2];r[o-2]=0;for(var ut=o-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],nt),wt=this.s[ut]/Et,Ot=nt/Et;this.s[ut]=Et,ut!==J&&(nt=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][o-1],this.V[mt][o-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][o-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<o;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[o-1]/Yt,P=this.s[o-2]/Yt,Y=r[o-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((P+Vt)*(P-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),gt=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(gt=Math.sqrt(q*q+at),q<0&&(gt=-gt),gt=at/(q+gt));for(var ot=(Z+Vt)*(Z-Vt)+gt,rt=Z*K,_=J;_<o-1;_++){var dt=v.hypot(ot,rt),At=ot/dt,pt=rt/dt;_!==J&&(r[_-1]=dt),ot=At*this.s[_]+pt*r[_],r[_]=At*r[_]-pt*this.s[_],rt=pt*this.s[_+1],this.s[_+1]=At*this.s[_+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][_]+pt*this.V[xt][_+1],this.V[xt][_+1]=-pt*this.V[xt][_]+At*this.V[xt][_+1],this.V[xt][_]=dt;if(dt=v.hypot(ot,rt),At=ot/dt,pt=rt/dt,this.s[_]=dt,ot=At*r[_]+pt*this.s[_+1],this.s[_+1]=-pt*r[_]+At*this.s[_+1],rt=pt*r[_+1],r[_+1]=At*r[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)dt=At*this.U[ft][_]+pt*this.U[ft][_+1],this.U[ft][_+1]=-pt*this.U[ft][_]+At*this.U[ft][_+1],this.U[ft][_]=dt}r[o-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=k;st++)this.V[st][J]=-this.V[st][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Lt;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Lt;J++}o--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,n){var r=void 0;return Math.abs(h)>Math.abs(n)?(r=n/h,r=Math.abs(h)*Math.sqrt(1+r*r)):n!=0?(r=h/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},C.exports=v}),(function(C,R,N){var v=(function(){function r(i,f){for(var e=0;e<f.length;e++){var g=f[e];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(i,g.key,g)}}return function(i,f,e){return f&&r(i.prototype,f),e&&r(i,e),i}})();function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(i,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[s][a]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!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 g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[g-1]===this.sequence2[t-1]?s=this.grid[g-1][t-1]+this.match_score:s=this.grid[g-1][t-1]+this.mismatch_penalty;var a=this.grid[g-1][t]+this.gap_penalty,c=this.grid[g][t-1]+this.gap_penalty,l=[s,a,c],T=this.arrayAllMaxIndexes(l);this.grid[g][t]=l[T[0]],this.tracebackGrid[g][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],g=this.tracebackGrid[e.pos[0]][e.pos[1]];g[0]&&f.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}),g[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),g[2]&&f.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}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var g=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();C.exports=n}),(function(C,R,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),C.exports=v}),(function(C,R,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(n,r){this.listeners.push({event:n,callback:r})},h.removeListener=function(n,r){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===n&&f.callback===r&&this.listeners.splice(i,1)}},h.emit=function(n,r){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];n===f.event&&f.callback(r)}},C.exports=v})])})})(fe)),fe.exports}var Ze=le.exports,Ae;function qe(){return Ae||(Ae=1,(function(x,A){(function(R,N){x.exports=N(ke())})(Ze,function(C){return(()=>{var R={45:((n,r,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f}),806:((n,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,n.exports=e}),767:((n,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,a){f.call(this,t,s,a)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),880:((n,r,i)=>{var f=i(551).LGraph;function e(t,s,a){f.call(this,t,s,a)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),578:((n,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),765:((n,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),a=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,G=i(551).IGeometry,B=i(551).LGraph,U=i(551).Transform,V=i(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var tt in f)M[tt]=f[tt];M.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},M.prototype.newGraph=function(o){return new g(null,this.graphManager,o)},M.prototype.newNode=function(o){return new t(this.graphManager,o)},M.prototype.newEdge=function(o){return new s(null,null,o)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(a.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var o=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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(a.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),a.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.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%l.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-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}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 o=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return o.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),a.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),a.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),E={},p=0;p<o.length;p++){var m=o[p].rect,y=o[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var o=this.getAllNodes(),E,p=0;p<o.length;p++)E=o[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<o.length;p++)E=o[p],E.move()},M.prototype.initConstraintVariables=function(){var o=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),et,lt=0,J=0;J<k.length;J++)et=k[J],et.getChild()==null?o.fixedNodeSet.has(et.id)&&(lt+=100):lt+=D(et);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){o.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var S=y(m);S>0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var O=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){o.fixedNodesOnHorizontal.add(D),o.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),o.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),o.fixedNodeSet.has(H)&&o.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,p=0;p<I.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),I[p].forEach(function(H){F.set(H,"dummy"+p),o.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),o.fixedNodeSet.has(H)&&o.fixedNodesOnVertical.add("dummy"+p)})}if(a.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,et;for(et=D.length-1;et>=2*D.length/3;et--)H=Math.floor(Math.random()*(et+1)),k=D[et],D[et]=D[H],D[H]=k;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 H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;o.nodesInRelativeHorizontal.includes(H)||(o.nodesInRelativeHorizontal.push(H),o.nodeToRelativeConstraintMapHorizontal.set(H,[]),o.dummyToNodeForVerticalAlignment.has(H)?o.nodeToTempPositionMapHorizontal.set(H,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(H,o.idToNodeMap.get(H).getCenterX())),o.nodesInRelativeHorizontal.includes(k)||(o.nodesInRelativeHorizontal.push(k),o.nodeToRelativeConstraintMapHorizontal.set(k,[]),o.dummyToNodeForVerticalAlignment.has(k)?o.nodeToTempPositionMapHorizontal.set(k,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(k,o.idToNodeMap.get(k).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),o.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var et=F.has(D.top)?F.get(D.top):D.top,lt=F.has(D.bottom)?F.get(D.bottom):D.bottom;o.nodesInRelativeVertical.includes(et)||(o.nodesInRelativeVertical.push(et),o.nodeToRelativeConstraintMapVertical.set(et,[]),o.dummyToNodeForHorizontalAlignment.has(et)?o.nodeToTempPositionMapVertical.set(et,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(et)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(et,o.idToNodeMap.get(et).getCenterY())),o.nodesInRelativeVertical.includes(lt)||(o.nodesInRelativeVertical.push(lt),o.nodeToRelativeConstraintMapVertical.set(lt,[]),o.dummyToNodeForHorizontalAlignment.has(lt)?o.nodeToTempPositionMapVertical.set(lt,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(lt,o.idToNodeMap.get(lt).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(et).push({bottom:lt,gap:D.gap}),o.nodeToRelativeConstraintMapVertical.get(lt).push({top:et,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var et=F.has(D.top)?F.get(D.top):D.top,lt=F.has(D.bottom)?F.get(D.bottom):D.bottom;z.has(et)?z.get(et).push(lt):z.set(et,[lt]),z.has(lt)?z.get(lt).push(et):z.set(lt,[et])}});var X=function(H,k){var et=[],lt=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){et[Nt]=[],lt[Nt]=!1;var ut=nt;for(J.push(ut),It.add(ut),et[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),et[Nt].push(wt))})}Nt++}}),{components:et,isFixed:lt}},it=X(Q,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=it.components,this.fixedComponentsOnHorizontal=it.isFixed;var $=X(z,o.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=o.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var S=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=S}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var F=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){F=0;break}F+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=F/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(a.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!o.fixedNodesOnHorizontal.has($)){var D=0;o.dummyToNodeForVerticalAlignment.has($)?D=o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=o.idToNodeMap.get($).displacementX,o.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=o.nodeToTempPositionMapHorizontal.get(H.right)-o.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=o.nodeToTempPositionMapHorizontal.get($)-o.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),o.nodeToTempPositionMapHorizontal.set($,o.nodeToTempPositionMapHorizontal.get($)+D),o.dummyToNodeForVerticalAlignment.has($)?o.dummyToNodeForVerticalAlignment.get($).forEach(function(H){o.idToNodeMap.get(H).displacementX=D}):o.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!o.fixedNodesOnHorizontal.has($)){var D=0;o.dummyToNodeForHorizontalAlignment.has($)?D=o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=o.idToNodeMap.get($).displacementY,o.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=o.nodeToTempPositionMapVertical.get(H.bottom)-o.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=o.nodeToTempPositionMapVertical.get($)-o.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),o.nodeToTempPositionMapVertical.set($,o.nodeToTempPositionMapVertical.get($)+D),o.dummyToNodeForHorizontalAlignment.has($)?o.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){o.idToNodeMap.get(H).displacementY=D}):o.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var I=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(H){o.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var X=this.dummyToNodeForVerticalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementX,z++;for(var it=Q/z,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(H){o.idToNodeMap.get(H).displacementX=it}):this.idToNodeMap.get(I[y]).displacementX=it}}for(var p=0;p<this.componentsOnVertical.length;p++){var I=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(k){o.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var X=this.dummyToNodeForHorizontalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementY,z++;for(var it=Q/z,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){o.idToNodeMap.get(J).displacementY=it}):this.idToNodeMap.get(I[y]).displacementY=it}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(o=o.concat(E.getNodes()));return o},M.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<o.length;p++){var m=o[p];if(!E.has(m)){var y=m.getSource(),S=m.getTarget();if(y==S)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(S)),O=O.concat(S.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var F;for(F=0;F<O.length;F++){var W=O[F];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(I){E.add(I)})}}}if(E.size==o.length)break}},M.prototype.positionNodesRadially=function(o){for(var E=new u(0,0),p=Math.ceil(Math.sqrt(o.length)),m=0,y=0,S=0,O=new d(0,0),F=0;F<o.length;F++){F%p==0&&(S=0,y=m,F!=0&&(y+=a.DEFAULT_COMPONENT_SEPERATION),m=0);var W=o[F],I=b.findCenterOfTree(W);E.x=S,E.y=y,O=M.radialLayout(W,I,E),O.y>m&&(m=Math.floor(O.y)),S=Math.floor(O.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(o,E,p){var m=Math.max(this.maxDiagonalInTree(o),a.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(o),S=new U;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var O=0;O<o.length;O++){var F=o[O];F.transform(S)}var W=new d(y.getMaxX(),y.getMaxY());return S.inverseTransformPoint(W)},M.branchRadialLayout=function(o,E,p,m,y,S){var O=(m-p+1)/2;O<0&&(O+=180);var F=(O+p)%360,W=F*G.TWO_PI/360,I=y*Math.cos(W),Q=y*Math.sin(W);o.setCenter(I,Q);var z=[];z=z.concat(o.getEdges());var X=z.length;E!=null&&X--;for(var it=0,$=z.length,D,H=o.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var et=z.indexOf(k);et>=0&&z.splice(et,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var lt=Math.abs(m-p)/X,J=D;it!=X;J=++J%$){var It=z[J].getOtherEnd(o);if(It!=E){var Nt=(p+it*lt)%360,vt=(Nt+lt)%360;M.branchRadialLayout(It,o,Nt,vt,y+S,S),it++}}},M.maxDiagonalInTree=function(o){for(var E=w.MIN_VALUE,p=0;p<o.length;p++){var m=o[p],y=m.getDiagonal();y>E&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var o=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var S=m[y],O=S.getParent();this.getNodeDegreeWithChildren(S)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(S)}for(var y=0;y<p.length;y++){var S=p[y],F=S.getParent().id;typeof E[F]>"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var I="DummyCompound_"+W;o.memberGroups[I]=E[W];var Q=E[W][0].getParent(),z=new t(o.graphManager);z.id=I,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,o.idToDummyNode[I]=z;var X=o.getGraphManager().add(o.newGraph(),z),it=Q.getChild();it.add(z);for(var $=0;$<E[W].length;$++){var D=E[W][$];it.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var o={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],o[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,E)},M.prototype.clearZeroDegreeMembers=function(){var o=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=o.idToDummyNode[p];if(E[p]=o.tileNodes(o.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,a.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,S=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var E=this.compoundOrder[o],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var o=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=o.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,O=m.labelMarginLeft,F=m.labelMarginTop;o.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,O,F)})},M.prototype.getToBeTiled=function(o){var E=o.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=o.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var S=m[y];if(this.getNodeDegree(S)>0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(o){o.id;for(var E=o.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(o){var E=this.getNodeDegree(o);if(o.getChild()==null)return E;for(var p=o.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(o){for(var E=0;E<o.length;E++){var p=o[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(o,E,p,m,y,S,O){E+=m+S,p+=y+O;for(var F=E,W=0;W<o.rows.length;W++){var I=o.rows[W];E=F;for(var Q=0,z=0;z<I.length;z++){var X=I[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+o.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+o.verticalPadding}},M.prototype.tileCompoundMembers=function(o,E){var p=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(o[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,a.NODE_DIMENSIONS_INCLUDE_LABELS){var S=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(o,E){var p=this.tileNodesByFavoringDim(o,E,!0),m=this.tileNodesByFavoringDim(o,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),O;return S<y?O=m:O=p,O},M.prototype.getOrgRatio=function(o){var E=o.width,p=o.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(o,E){var p=a.TILING_PADDING_VERTICAL,m=a.TILING_PADDING_HORIZONTAL,y=o.length,S=0,O=0,F=0;o.forEach(function($){S+=$.getWidth(),O+=$.getHeight(),$.getWidth()>F&&(F=$.getWidth())});var W=S/y,I=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(I+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var it=X*(W+m)-m;return F>it&&(it=F),it+=m*2,it},M.prototype.tileNodesByFavoringDim=function(o,E,p){var m=a.TILING_PADDING_VERTICAL,y=a.TILING_PADDING_HORIZONTAL,S=a.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(O.idealRowWidth=this.calcIdealRowWidth(o,p));var F=function(D){return D.rect.width*D.rect.height},W=function(D,H){return F(H)-F(D)};o.sort(function($,D){var H=W;return O.idealRowWidth?(H=S,H($.id,D.id)):H($,D)});for(var I=0,Q=0,z=0;z<o.length;z++){var X=o[z];I+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=I/o.length,O.centerY=Q/o.length;for(var z=0;z<o.length;z++){var X=o[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var it=O.rows.length-1;O.idealRowWidth||(it=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,it,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(o,E,p,m){var y=m;if(p==o.rows.length){var S=[];o.rows.push(S),o.rowWidth.push(y),o.rowHeight.push(0)}var O=o.rowWidth[p]+E.rect.width;o.rows[p].length>0&&(O+=o.horizontalPadding),o.rowWidth[p]=O,o.width<O&&(o.width=O);var F=E.rect.height;p>0&&(F+=o.verticalPadding);var W=0;F>o.rowHeight[p]&&(W=o.rowHeight[p],o.rowHeight[p]=F,W=o.rowHeight[p]-W),o.height+=W,o.rows[p].push(E)},M.prototype.getShortestRowIndex=function(o){for(var E=-1,p=Number.MAX_VALUE,m=0;m<o.rows.length;m++)o.rowWidth[m]<p&&(E=m,p=o.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(o){for(var E=-1,p=Number.MIN_VALUE,m=0;m<o.rows.length;m++)o.rowWidth[m]>p&&(E=m,p=o.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(o,E,p){if(o.idealRowWidth){var m=o.rows.length-1,y=o.rowWidth[m];return y+E+o.horizontalPadding<=o.idealRowWidth}var S=this.getShortestRowIndex(o);if(S<0)return!0;var O=o.rowWidth[S];if(O+o.horizontalPadding+E<=o.width)return!0;var F=0;o.rowHeight[S]<p&&S>0&&(F=p+o.verticalPadding-o.rowHeight[S]);var W;o.width-O>=E+o.horizontalPadding?W=(o.height+F)/(O+E+o.horizontalPadding):W=(o.height+F)/o.width,F=p+o.verticalPadding;var I;return o.width<E?I=(o.height+F)/E:I=(o.height+F)/o.width,I<1&&(I=1/I),W<1&&(W=1/W),W<I},M.prototype.shiftToLastRow=function(o){var E=this.getLongestRowIndex(o),p=o.rowWidth.length-1,m=o.rows[E],y=m[m.length-1],S=y.width+o.horizontalPadding;if(o.width-o.rowWidth[p]>S&&E!=p){m.splice(-1,1),o.rows[p].push(y),o.rowWidth[E]=o.rowWidth[E]-S,o.rowWidth[p]=o.rowWidth[p]+S,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,F=0;F<m.length;F++)m[F].height>O&&(O=m[F].height);E>0&&(O+=o.verticalPadding);var W=o.rowHeight[E]+o.rowHeight[p];o.rowHeight[E]=O,o.rowHeight[p]<y.height+o.verticalPadding&&(o.rowHeight[p]=y.height+o.verticalPadding);var I=o.rowHeight[E]+o.rowHeight[p];o.height+=I-W,this.shiftToLastRow(o)}},M.prototype.tilingPreLayout=function(){a.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){a.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var o=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var S=0;S<m.length;S++)if(p=m[S],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(a.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),F=new L(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),F])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(W.push(y[I]),y[I][0].getOwner().remove(y[I][0]));o.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},M.prototype.growTree=function(o){for(var E=o.length,p=o[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(o){var E,p,m=o[0];if(m==o[1].source?p=o[1].target:p=o[1].source,a.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+o[3].getWidth(),p.getCenterY()+o[3].getHeight());else{var y=p.startX,S=p.finishX,O=p.startY,F=p.finishY,W=0,I=0,Q=0,z=0,X=[W,Q,I,z];if(O>0)for(var it=y;it<=S;it++)X[0]+=this.grid[it][O-1].length+this.grid[it][O].length-1;if(S<this.grid.length-1)for(var it=O;it<=F;it++)X[1]+=this.grid[S+1][it].length+this.grid[S][it].length-1;if(F<this.grid[0].length-1)for(var it=y;it<=S;it++)X[2]+=this.grid[it][F+1].length+this.grid[it][F].length-1;if(y>0)for(var it=O;it<=F;it++)X[3]+=this.grid[y-1][it].length+this.grid[y][it].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var et=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?et==0?E=0:E=1:X[0]==0&&X[2]==0?et==0?E=0:E=2:X[0]==0&&X[3]==0?et==0?E=0:E=3:X[1]==0&&X[2]==0?et==0?E=1:E=2:X[1]==0&&X[3]==0?et==0?E=1:E=3:et==0?E=2:E=3}else if(D==4&&$==0){var et=Math.floor(Math.random()*4);E=et}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},n.exports=M}),991:((n,r,i)=>{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,a,c,l){f.call(this,s,a,c,l)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,a){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=a):l.propogateDisplacementToChildren(s,a)},g.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},g.prototype.setPred1=function(s){this.pred1=s},g.prototype.getPred1=function(){return pred1},g.prototype.getPred2=function(){return pred2},g.prototype.setNext=function(s){this.next=s},g.prototype.getNext=function(){return next},g.prototype.setProcessed=function(s){this.processed=s},g.prototype.isProcessed=function(){return processed},n.exports=g}),902:((n,r,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=i(806),g=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function a(){}a.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,d=[],L=[],b=c.getAllNodes(),w=0,G=0;G<b.length;G++){var B=b[G];B.getChild()==null&&(u.set(B.id,w++),d.push(B.getCenterX()),L.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(P){!P.gap&&P.gap!=0&&(P.left?P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.left).getWidth()/2+T.get(P.right).getWidth()/2:P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.top).getHeight()/2+T.get(P.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[u.get(q)],K+=L[u.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;Y.forEach(function(ft,st){ot.set(st,0)}),Y.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var rt=new Map,_=new Map,dt=new g;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||(Z=="horizontal"?rt.set(st,u.has(st)?d[u.get(st)]:q.get(st)):rt.set(st,u.has(st)?L[u.get(st)]:q.get(st)))):rt.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&at.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Lt=0;st.forEach(function(ht){Z=="horizontal"?(rt.set(ht,u.has(ht)?d[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht)):(rt.set(ht,u.has(ht)?L[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||rt.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:q.get(ht):ct+=u.has(ht)?L[u.get(ht)]:q.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){rt.set(ht,ct)})}});for(var At=function(){var st=dt.shift(),Lt=Y.get(st);Lt.forEach(function(ct){if(rt.get(ct.id)<rt.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=u.has(ct.id)?d[u.get(ct.id)]:q.get(ct.id):ht=u.has(ct.id)?L[u.get(ct.id)]:q.get(ct.id),rt.set(ct.id,ht),ht<rt.get(st)+ct.gap){var Xt=rt.get(st)+ct.gap-ht;_.get(st).forEach(function(Tt){rt.set(Tt,rt.get(Tt)-Xt)})}}else rt.set(ct.id,rt.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];_.forEach(function(ft,st){if(pt.has(st)){var Lt=!1,ct=!0,ht=!1,Xt=void 0;try{for(var Tt=ft[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){ht=!0,Xt=St}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(ft))[0])&&(bt=!0,zt=kt)}),bt?ft.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(ft))}}}),xt.forEach(function(ft,st){var Lt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=u.has(St)?d[u.get(St)]:q.get(St):kt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=rt.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+ht)/2-(ct+Xt)/2,Qt=!0,_t=!1,jt=void 0;try{for(var Jt=ft[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;rt.set(te,rt.get(te)+ce)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return rt},tt=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(_){_.left?d[u.get(_.left)]-d[u.get(_.right)]>=0?Z++:K++:L[u.get(_.top)]-L[u.get(_.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gt<u.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<u.size;ot++)d[ot]=-1*d[ot];else if(q>at)for(var rt=0;rt<u.size;rt++)L[rt]=-1*L[rt]},o=function(Y){var Z=[],K=new g,q=new Set,at=0;return Y.forEach(function(gt,ot){if(!q.has(ot)){Z[at]=[];var rt=ot;for(K.push(rt),q.add(rt),Z[at].push(rt);K.length!=0;){rt=K.shift();var _=Y.get(rt);_.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],S=!1,O=!1,F=new Set,W=new Map,I=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(P){F.add(P.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(P){P.left?(W.has(P.left)?W.get(P.left).push({id:P.right,gap:P.gap,direction:"horizontal"}):W.set(P.left,[{id:P.right,gap:P.gap,direction:"horizontal"}]),W.has(P.right)||W.set(P.right,[])):(W.has(P.top)?W.get(P.top).push({id:P.bottom,gap:P.gap,direction:"vertical"}):W.set(P.top,[{id:P.bottom,gap:P.gap,direction:"vertical"}]),W.has(P.bottom)||W.set(P.bottom,[]))}),I=E(W),Q=o(I)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(P,Y){m[Y]=[P.position.x,P.position.y],y[Y]=[d[u.get(P.nodeId)],L[u.get(P.nodeId)]]}),S=!0;else if(l.alignmentConstraint)(function(){var P=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(rt){var _=new Set;Y[rt].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),At=void 0;dt.size>0?At=d[u.get(dt.values().next().value)]:At=V(_).x,Y[rt].forEach(function(pt){m[P]=[At,L[u.get(pt)]],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},K=0;K<Y.length;K++)Z(K);S=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(rt){var _=new Set;q[rt].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),At=void 0;dt.size>0?At=d[u.get(dt.values().next().value)]:At=V(_).y,q[rt].forEach(function(pt){m[P]=[d[u.get(pt)],At],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},gt=0;gt<q.length;gt++)at(gt);S=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,it=0;it<Q.length;it++)Q[it].length>z&&(z=Q[it].length,X=it);if(z<I.size/2)tt(l.relativePlacementConstraint),S=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(P){W.get(P).forEach(function(Y){Y.direction=="horizontal"?($.has(P)?$.get(P).push(Y):$.set(P,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:P,right:Y.id})):(D.has(P)?D.get(P).push(Y):D.set(P,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:P,bottom:Y.id}))})}),tt(H),O=!1;var k=M($,"horizontal"),et=M(D,"vertical");Q[X].forEach(function(P,Y){y[Y]=[d[u.get(P)],L[u.get(P)]],m[Y]=[],k.has(P)?m[Y][0]=k.get(P):m[Y][0]=d[u.get(P)],et.has(P)?m[Y][1]=et.get(P):m[Y][1]=L[u.get(P)]}),S=!0}}if(S){for(var lt=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<u.size;ut++){var Et=[d[ut],L[ut]],wt=[lt[0][0],lt[1][0]],Ot=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Et,wt),L[ut]=t.dotProduct(Et,Ot)}O&&tt(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(P,Y){var Z={x:d[u.get(P.nodeId)],y:L[u.get(P.nodeId)]},K=P.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(P,Y){d[Y]+=mt.x}),L.forEach(function(P,Y){L[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(P){d[u.get(P.nodeId)]=P.position.x,L[u.get(P.nodeId)]=P.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var P=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,gt=new Set,ot=new Set;if(F.forEach(function(Gt){gt.add(Gt),ot.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var rt=l.alignmentConstraint.vertical,_=function(yt){Z.set("dummy"+yt,[]),rt[yt].forEach(function(Mt){P.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),F.has(Mt)&&gt.add("dummy"+yt)}),q.set("dummy"+yt,d[u.get(rt[yt][0])])},dt=0;dt<rt.length;dt++)_(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),F.has(Mt)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=P.get(yt)?P.get(yt):yt,P.get(Mt.id)?$t={id:P.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ft.has(Zt)?ft.get(Zt).push($t):ft.set(Zt,[$t]),ft.has($t.id)||ft.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,st.has(Zt)?st.get(Zt).push($t):st.set(Zt,[$t]),st.has($t.id)||st.set($t.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){ht=!0,Xt=Gt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=o(bt),kt=o(zt),Kt=p(ft),ce=p(st),Qt=[],_t=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){_t[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&_t[yt].push(Mt)})});var jt=M(ft,"horizontal",gt,q,Qt),Jt=M(st,"vertical",ot,at,_t),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[u.get(Mt)]=jt.get(yt)}):d[u.get(yt)]=jt.get(yt)},te=!0,ee=!1,Ee=void 0;try{for(var ge=jt.keys()[Symbol.iterator](),Te;!(te=(Te=ge.next()).done);te=!0){var ue=Te.value;oe(ue)}}catch(Gt){ee=!0,Ee=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ee}}var Ve=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[u.get(Mt)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},de=!0,Ne=!1,Le=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),Ce;!(de=(Ce=ve.next()).done);de=!0){var ue=Ce.value;Ve(ue)}}catch(Gt){Ne=!0,Le=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ne)throw Le}}})()}for(var Yt=0;Yt<b.length;Yt++){var Vt=b[Yt];Vt.getChild()==null&&Vt.setCenter(d[u.get(Vt.id)],L[u.get(Vt.id)])}},n.exports=a}),551:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return R[n](i,i.exports,v),i.exports}var h=v(45);return h})()})})(le)),le.exports}var Qe=he.exports,Me;function Je(){return Me||(Me=1,(function(x,A){(function(R,N){x.exports=N(qe())})(Qe,function(C){return(()=>{var R={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e<i;e++)f[e-1]=arguments[e];return f.forEach(function(g){Object.keys(g).forEach(function(t){return r[t]=g[t]})}),r}}),548:((n,r,i)=>{var f=(function(){function t(s,a){var c=[],l=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(a&&c.length===a));l=!0);}catch(b){T=!0,u=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(s,a){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,a);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},a=0;a<t.length;a++)s[t[a].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var u=l.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},g.connectComponents=function(t,s,a,c){var l=new e,T=new Set,u=[],d=void 0,L=void 0,b=void 0,w=!1,G=1,B=[],U=[],V=function(){var tt=t.collection();U.push(tt);var o=a[0],E=t.collection();E.merge(o).merge(o.descendants().intersection(s)),u.push(o),E.forEach(function(y){l.push(y),T.add(y),tt.merge(y)});for(var p=function(){o=l.shift();var S=t.collection();o.neighborhood().nodes().forEach(function(I){s.intersection(o.edgesWith(I)).length>0&&S.merge(I)});for(var O=0;O<S.length;O++){var F=S[O];if(d=a.intersection(F.union(F.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(I){l.push(I),T.add(I),tt.merge(I),a.has(I)&&u.push(I)})}}};l.length!=0;)p();if(tt.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(S){tt.has(S.source())&&tt.has(S.target())&&tt.merge(S)})}),u.length==a.length&&(w=!0),!w||w&&G>1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),B.push(L.id());var m=t.collection();m.merge(u[0]),u.forEach(function(y){m.merge(y)}),u=[],a=a.difference(m),G++}};do V();while(!w);return c&&B.length>0&&c.set("dummy"+(c.size+1),B),U},g.relocateComponent=function(t,s,a){if(!a.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(a.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=w.next()).done);d=!0){var B=G.value,U=f(B,2),V=U[0],M=U[1],tt=a.cy.getElementById(V);if(tt){var o=tt.boundingBox(),E=s.xCoords[M]-o.w/2,p=s.xCoords[M]+o.w/2,m=s.yCoords[M]-o.h/2,y=s.yCoords[M]+o.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>u&&(u=y)}}}catch(I){L=!0,b=I}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(l+c)/2,O=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(I){return I+S}),s.yCoords=s.yCoords.map(function(I){return I+O})}else{Object.keys(s).forEach(function(I){var Q=s[I],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,it=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>l&&(l=X),it<T&&(T=it),$>u&&(u=$)});var F=t.x-(l+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(I){var Q=s[I];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,a,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,G=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;V<U;V++){var M=B[V];L=s[c.get(M.id())]-M.width()/2,b=s[c.get(M.id())]+M.width()/2,w=a[c.get(M.id())]-M.height()/2,G=a[c.get(M.id())]+M.height()/2,l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var tt={};return tt.topLeftX=l,tt.topLeftY=u,tt.width=T-l,tt.height=d-u,tt},g.calcParentsWithoutChildren=function(t,s){var a=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||a.merge(c)}),a},n.exports=g}),816:((n,r,i)=>{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,a=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,G=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,tt={};d.randomize&&(U=L.nodeIndexes,V=L.xCoords,M=L.yCoords);var o=function(I){return typeof I=="function"},E=function(I,Q){return o(I)?I(Q):I},p=f.calcParentsWithoutChildren(b,w),m=function W(I,Q,z,X){for(var it=Q.length,$=0;$<it;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,et=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=I.add(new g(z.graphManager,new t(V[U.get(D.id())]-et.w/2,M[U.get(D.id())]-et.h/2),new s(parseFloat(et.w),parseFloat(et.h))));else{var lt=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=I.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):k=I.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(et.w),parseFloat(et.h))))}else k=I.add(new g(z.graphManager,new t(D.position("x")-et.w/2,D.position("y")-et.h/2),new s(parseFloat(et.w),parseFloat(et.h))));else k=I.add(new g(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),tt[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(I,Q,z){for(var X=0,it=0,$=0;$<z.length;$++){var D=z[$],H=tt[D.data("source")],k=tt[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var et=Q.add(I.newEdge(),H,k);et.id=D.id(),et.idealLength=E(d.idealEdgeLength,D),et.edgeElasticity=E(d.edgeElasticity,D),X+=et.idealLength,it++}}d.idealEdgeLength!=null&&(it>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/it:o(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(I,Q){Q.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(I.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?a.QUALITY=2:a.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=a.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,F=O.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(G),O,d),y(O,F,B),S(O,d),O.runLayout(),tt};n.exports={coseLayout:T}}),212:((n,r,i)=>{var f=(function(){function d(L,b){for(var w=0;w<b.length;w++){var G=b[w];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(L,G.key,G)}}return function(L,b,w){return b&&d(L.prototype,b),w&&d(L,w),L}})();function e(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}var g=i(658),t=i(548),s=i(657),a=s.spectralLayout,c=i(816),l=c.coseLayout,T=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(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){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(){}}),u=(function(){function d(L){e(this,d),this.options=g({},T,L)}return f(d,[{key:"run",value:function(){var b=this,w=this.options,G=w.cy,B=w.eles,U=[],V=[],M=void 0,tt=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var o=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;o&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(G.layoutUtilities&&w.packComponents&&(E=G.layoutUtilities("get"),E||(E=G.layoutUtilities()),p=!0),B.nodes().length>0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(G,w.eles,S),M.forEach(function(vt){var nt=vt.boundingBox();tt.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(a(w))}),w.quality=="default"||w.quality=="proof"){var O=G.collection();if(w.tile){var F=new Map,W=[],I=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:I},X=[];if(M.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(nt))}),O.length>1){var it=O.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),tt.splice(X[$],1)}}M.forEach(function(vt,nt){w.eles=vt,V.push(l(w,U[nt])),t.relocateComponent(tt[nt],V[nt],w)})}else M.forEach(function(vt,nt){t.relocateComponent(tt[nt],U[nt],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,nt){var ut=void 0;if(w.quality=="draft"&&(ut=U[nt].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[nt].xCoords[wt]-Ot.boundingbox().w/2,y:U[nt].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[nt].xCoords,U[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[nt][Ot.id()]&&Et.nodes.push({x:V[nt][Ot.id()].getLeft(),y:V[nt][Ot.id()].getTop(),width:V[nt][Ot.id()].getWidth(),height:V[nt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[nt].xCoords,U[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[nt].xCoords[Rt]),Ut.push(U[nt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[nt].xCoords,U[nt].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[nt].xCoords[Ht]),Pt.push(U[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[nt][mt.id()]&&V[nt][Dt.id()]&&Et.edges.push({startX:V[nt][mt.id()].getCenterX(),startY:V[nt][mt.id()].getCenterY(),endX:V[nt][Dt.id()].getCenterX(),endY:V[nt][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(nt))}});var et=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,nt){var ut=vt.xCoords.map(function(wt){return wt+et[nt].dx}),Et=vt.yCoords.map(function(wt){return wt+et[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(nt){var ut=V[vt][nt];ut.setCenter(ut.getCenterX()+et[lt].dx,ut.getCenterY()+et[lt].dy)}),lt++})}}}else{var m=w.eles.boundingBox();if(tt.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=a(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(tt[0],V[0],w)):t.relocateComponent(tt[0],U[0],w)}var J=function(nt,ut){if(w.quality=="default"||w.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,wt=void 0,Ot=nt.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:nt.position("x"),y:nt.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(G,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();n.exports=u}),657:((n,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(a){var c=a.cy,l=a.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],G=[],B=[],U=[],V=[],M=[],tt=[],o=[],E=void 0,p=1e8,m=1e-9,y=a.piTol,S=a.samplingType,O=a.nodeSeparation,F=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z<F;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},I=function(Y,Z,K){for(var q=[],at=0,gt=0,ot=0,rt=void 0,_=[],dt=0,At=1,pt=0;pt<E;pt++)_[pt]=p;for(q[gt]=Y,_[Y]=0;gt>=at;){ot=q[at++];for(var xt=w[ot],ft=0;ft<xt.length;ft++)rt=L.get(xt[ft]),_[rt]==p&&(_[rt]=_[ot]+1,q[++gt]=rt);M[ot][Z]=_[ot]*O}if(K){for(var st=0;st<E;st++)M[st][Z]<V[st]&&(V[st]=M[st][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)V[q]=p;for(var at=0;at<F;at++)U[at]=Z,Z=I(Z,at,Y)}else{W();for(var K=0;K<F;K++)I(U[K],K,Y)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<F;ot++)M[gt][ot]*=M[gt][ot];for(var rt=0;rt<F;rt++)tt[rt]=[];for(var _=0;_<F;_++)for(var dt=0;dt<F;dt++)tt[_][dt]=M[U[dt]][_]},z=function(){for(var Y=g.svd(tt),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<F;ot++){gt[ot]=[];for(var rt=0;rt<F;rt++)gt[ot][rt]=0,ot==rt&&(gt[ot][rt]=Z[ot]/(Z[ot]*Z[ot]+at/(Z[ot]*Z[ot])))}o=e.multMat(e.multMat(q,gt),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),q[ot]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var rt=m,_=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,o)),Y=e.dotProduct(at,K),K=e.normalize(K),rt=e.dotProduct(at,K),dt=Math.abs(rt/_),dt<=1+y&&dt>=1)break;_=rt}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(_=m;;){for(var xt=0;xt<E;xt++)gt[xt]=q[xt];if(gt=e.minusOp(gt,e.multCons(at,e.dotProduct(at,gt))),q=e.multGamma(e.multL(e.multGamma(gt),M,o)),Z=e.dotProduct(gt,q),q=e.normalize(q),rt=e.dotProduct(gt,q),dt=Math.abs(rt/_),dt<=1+y&&dt>=1)break;_=rt}for(var ft=0;ft<E;ft++)gt[ft]=q[ft];G=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(gt,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),u.forEach(function(P){f.connectComponents(c,l,f.getTopMostNodes(P.descendants().intersection(l)),d)});for(var it=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),it++);var D=!0,H=!1,k=void 0;try{for(var et=d.keys()[Symbol.iterator](),lt;!(D=(lt=et.next()).done);D=!0){var J=lt.value;L.set(J,it++)}}catch(P){H=!0,k=P}finally{try{!D&&et.return&&et.return()}finally{if(H)throw k}}for(var It=0;It<L.size;It++)w[It]=[];u.forEach(function(P){for(var Y=P.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),b.set(P.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(P){var Y=void 0;P.isParent()?Y=L.get(b.get(P.id())):Y=L.get(P.id()),P.neighborhood().nodes().forEach(function(Z){l.intersection(P.edgesWith(Z)).length>0&&(Z.isParent()?w[Y].push(b.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=L.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[Z].push(K),w[L.get(K)].push(Y)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(P){nt=!0,ut=P}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E<a.sampleSize?E:a.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<F;Rt++)o[Rt]=[];return a.quality=="draft"||a.step=="all"?(Q(S),z(),X(),mt={nodeIndexes:L,xCoords:G,yCoords:B}):(L.forEach(function(P,Y){G.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:L,xCoords:G,yCoords:B}),mt}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(G.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();G.push(Pt.x+Ft/2+Vt/2+a.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:L,xCoords:G,yCoords:B},mt}};n.exports={spectralLayout:t}}),579:((n,r,i)=>{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),n.exports=e}),140:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return R[n](i,i.exports,v),i.exports}var h=v(579);return h})()})})(he)),he.exports}var Ke=Je();const _e=j.getDefaultExportFromCjs(Ke);var Oe={L:"left",R:"right",T:"top",B:"bottom"},De={L:j.__name(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:j.__name(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:j.__name(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:j.__name(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},se={L:j.__name((x,A)=>x-A+2,"L"),R:j.__name((x,A)=>x-2,"R"),T:j.__name((x,A)=>x-A+2,"T"),B:j.__name((x,A)=>x-2,"B")},je=j.__name(function(x){return Wt(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),xe=j.__name(function(x){const A=x;return A==="L"||A==="R"||A==="T"||A==="B"},"isArchitectureDirection"),Wt=j.__name(function(x){const A=x;return A==="L"||A==="R"},"isArchitectureDirectionX"),qt=j.__name(function(x){const A=x;return A==="T"||A==="B"},"isArchitectureDirectionY"),me=j.__name(function(x,A){const C=Wt(x)&&qt(A),R=qt(x)&&Wt(A);return C||R},"isArchitectureDirectionXY"),tr=j.__name(function(x){const A=x[0],C=x[1],R=Wt(A)&&qt(C),N=qt(A)&&Wt(C);return R||N},"isArchitecturePairXY"),er=j.__name(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),pe=j.__name(function(x,A){const C=`${x}${A}`;return er(C)?C:void 0},"getArchitectureDirectionPair"),rr=j.__name(function([x,A],C){const R=C[0],N=C[1];return Wt(R)?qt(N)?[x+(R==="L"?-1:1),A+(N==="T"?1:-1)]:[x+(R==="L"?-1:1),A]:Wt(N)?[x+(N==="L"?1:-1),A+(R==="T"?1:-1)]:[x,A+(R==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ir=j.__name(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nr=j.__name(function(x,A){return me(x,A)?"bend":Wt(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ar=j.__name(function(x){return x.type==="service"},"isArchitectureService"),or=j.__name(function(x){return x.type==="junction"},"isArchitectureJunction"),Re=j.__name(x=>x.data(),"edgeData"),ie=j.__name(x=>x.data(),"nodeData"),sr=j.defaultConfig_default.architecture,ne,Se=(ne=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=j.setAccTitle,this.getAccTitle=j.getAccTitle,this.setDiagramTitle=j.setDiagramTitle,this.getDiagramTitle=j.getDiagramTitle,this.getAccDescription=j.getAccDescription,this.setAccDescription=j.setAccDescription,this.clear()}setDiagramId(A){this.diagramId=A}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",j.clear()}addService({id:A,icon:C,in:R,title:N,iconText:v}){if(this.registeredIds[A]!==void 0)throw new Error(`The service id [${A}] is already in use by another ${this.registeredIds[A]}`);if(R!==void 0){if(A===R)throw new Error(`The service [${A}] cannot be placed within itself`);if(this.registeredIds[R]===void 0)throw new Error(`The service [${A}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[R]==="node")throw new Error(`The service [${A}]'s parent is not a group`)}this.registeredIds[A]="node",this.nodes[A]={id:A,type:"service",icon:C,iconText:v,title:N,edges:[],in:R}}getServices(){return Object.values(this.nodes).filter(ar)}addJunction({id:A,in:C}){if(this.registeredIds[A]!==void 0)throw new Error(`The junction id [${A}] is already in use by another ${this.registeredIds[A]}`);if(C!==void 0){if(A===C)throw new Error(`The junction [${A}] cannot be placed within itself`);if(this.registeredIds[C]===void 0)throw new Error(`The junction [${A}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[C]==="node")throw new Error(`The junction [${A}]'s parent is not a group`)}this.registeredIds[A]="node",this.nodes[A]={id:A,type:"junction",edges:[],in:C}}getJunctions(){return Object.values(this.nodes).filter(or)}getNodes(){return Object.values(this.nodes)}getNode(A){return this.nodes[A]??null}addGroup({id:A,icon:C,in:R,title:N}){if(this.registeredIds?.[A]!==void 0)throw new Error(`The group id [${A}] is already in use by another ${this.registeredIds[A]}`);if(R!==void 0){if(A===R)throw new Error(`The group [${A}] cannot be placed within itself`);if(this.registeredIds?.[R]===void 0)throw new Error(`The group [${A}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[R]==="node")throw new Error(`The group [${A}]'s parent is not a group`)}this.registeredIds[A]="group",this.groups[A]={id:A,icon:C,title:N,in:R}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:A,rhsId:C,lhsDir:R,rhsDir:N,lhsInto:v,rhsInto:h,lhsGroup:n,rhsGroup:r,title:i}){if(!xe(R))throw new Error(`Invalid direction given for left hand side of edge ${A}--${C}. Expected (L,R,T,B) got ${String(R)}`);if(!xe(N))throw new Error(`Invalid direction given for right hand side of edge ${A}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The left-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[A].in,e=this.nodes[C].in;if(n&&f&&e&&f==e)throw new Error(`The left-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:A,lhsDir:R,lhsInto:v,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:h,rhsGroup:r,title:i};this.edges.push(g),this.nodes[A]&&this.nodes[C]&&(this.nodes[A].edges.push(this.edges[this.edges.length-1]),this.nodes[C].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(A){if(A.members.length<2)throw new Error(`An align directive requires at least two members; got ${A.members.length}`);const C=new Set;A.members.forEach(R=>{if(this.registeredIds[R]!=="node")throw new Error(`align ${A.direction} references [${R}], which is not a service or junction`);if(C.has(R))throw new Error(`align ${A.direction} lists [${R}] more than once`);C.add(R)}),this.layoutHints.push(A)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const A={},C=Object.entries(this.nodes).reduce((r,[i,f])=>(r[i]=f.edges.reduce((e,g)=>{const t=this.getNode(g.lhsId)?.in,s=this.getNode(g.rhsId)?.in;if(t&&s&&t!==s){const a=nr(g.lhsDir,g.rhsDir);a!=="bend"&&(A[t]??={},A[t][s]=a,A[s]??={},A[s][t]=a)}if(g.lhsId===i){const a=pe(g.lhsDir,g.rhsDir);a&&(e[a]=g.rhsId)}else{const a=pe(g.rhsDir,g.lhsDir);a&&(e[a]=g.lhsId)}return e},{}),r),{}),R=Object.keys(C)[0],N={[R]:1},v=Object.keys(C).reduce((r,i)=>i===R?r:{...r,[i]:1},{}),h=j.__name(r=>{const i={[r]:[0,0]},f=[r];for(;f.length>0;){const e=f.shift();if(e){N[e]=1,delete v[e];const g=C[e],[t,s]=i[e];Object.entries(g).forEach(([a,c])=>{N[c]||(i[c]=rr([t,s],a),f.push(c))})}}return i},"BFS"),n=[h(R)];for(;Object.keys(v).length>0;)n.push(h(Object.keys(v)[0]));this.dataStructures={adjList:C,spatialMaps:n,groupAlignments:A}}return this.dataStructures}setElementForId(A,C){this.elements[A]=C}getElementById(A){return this.elements[A]}getConfig(){return j.cleanAndMerge({...sr,...j.getConfig().architecture})}getConfigField(A){return this.getConfig()[A]}},j.__name(ne,"ArchitectureDB"),ne),hr=j.__name((x,A)=>{ze.populateCommonDb(x,A),x.groups.map(C=>A.addGroup(C)),x.services.map(C=>A.addService({...C,type:"service"})),x.junctions.map(C=>A.addJunction({...C,type:"junction"})),x.edges.map(C=>A.addEdge(C)),x.alignments?.map(C=>A.addLayoutHint({direction:C.direction,members:[...C.members]}))},"populateDb"),Fe={parser:{yy:void 0},parse:j.__name(async x=>{const A=await Be.parse("architecture",x);j.log.debug(A);const C=Fe.parser?.yy;if(!(C instanceof Se))throw new 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.");hr(A,C)},"parse")},lr=j.__name(x=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("./chunk-JWPE2WC7-CLCAyxUO.cjs"),j=require("./extractHeadings-BsiIYa_e.cjs"),Be=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),Ie=require("./cytoscape.esm-D8x1ApSO.cjs");var he={exports:{}},le={exports:{}},fe={exports:{}},$e=fe.exports,we;function ke(){return we||(we=1,(function(x,A){(function(R,N){x.exports=N()})($e,function(){return(function(C){var R={};function N(v){if(R[v])return R[v].exports;var h=R[v]={i:v,l:!1,exports:{}};return C[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=C,N.c=R,N.i=function(v){return v},N.d=function(v,h,n){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(C,R,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v}),(function(C,R,N){var v=N(2),h=N(8),n=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=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))},r.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=r}),(function(C,R,N){function v(h){this.vGraphObject=h}C.exports=v}),(function(C,R,N){var v=N(2),h=N(10),n=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,a,c){a==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,a!=null&&s!=null?this.rect=new n(s.x,s.y,a.width,a.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],a=this;return a.edges.forEach(function(c){if(c.target==t){if(c.source!=a)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],a=this;return a.edges.forEach(function(c){if(!(c.source==a||c.target==a))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(a){if(a.source==s)t.add(a.target);else{if(a.target!=s)throw"Incorrect incidency!";t.add(a.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,a;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],a=s.withChildren(),a.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var a=this.child.getNodes(),c=0;c<a.length;c++)s=a[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var t,s,a=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+i.nextDouble()*(c-a)+a;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),a=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(a+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>a?(this.rect.y-=(this.labelHeight-a)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(a+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var a=this.rect.y;a>r.WORLD_BOUNDARY?a=r.WORLD_BOUNDARY:a<-r.WORLD_BOUNDARY&&(a=-r.WORLD_BOUNDARY);var c=new f(s,a),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e}),(function(C,R,N){var v=N(0);function h(){}for(var n in v)h[n]=v[n];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=h}),(function(C,R,N){function v(h,n){h==null&&n==null?(this.x=0,this.y=0):(this.x=h,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},C.exports=v}),(function(C,R,N){var v=N(2),h=N(10),n=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L<d;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var b=this.nodes.indexOf(l);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,1)}else if(c instanceof f){var u=c;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var w=u.source.edges.indexOf(u),G=u.target.edges.indexOf(u);if(!(w>-1&&G>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(G,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;w<b;w++){var G=L[w];T=G.getTop(),u=G.getLeft(),c>T&&(c=T),l>u&&(l=u)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,w,G,B,U=this.nodes,V=U.length,M=0;M<V;M++){var tt=U[M];c&&tt.child!=null&&tt.updateBounds(),L=tt.getLeft(),b=tt.getRight(),w=tt.getTop(),G=tt.getBottom(),l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var o=new e(l,u,T-l,d-u);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=o.x-B,this.right=o.x+o.width+B,this.top=o.y-B,this.bottom=o.y+o.height+B},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,d=-h.MAX_VALUE,L,b,w,G,B=c.length,U=0;U<B;U++){var V=c[U];L=V.getLeft(),b=V.getRight(),w=V.getTop(),G=V.getBottom(),l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var M=new e(l,u,T-l,d-u);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,u=0;u<T;u++){var d=l[u];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,u=this.nodes[0],d,L,b=u.withChildren();for(b.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){u=l.shift(),d=u.getEdges();for(var w=d.length,G=0;G<w;G++){var B=d[G];if(L=B.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var U=L.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},C.exports=s}),(function(C,R,N){var v,h=N(1);function n(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof v){var i=r;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var e,g=f.length,t=0;t<g;t++)e=f[t],i.remove(e);var s=[];s=s.concat(i.getNodes());var a;g=s.length;for(var t=0;t<g;t++)a=s[t],i.remove(a);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,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 r=[],i=this.getGraphs(),f=i.length,e=0;e<f;e++)r=r.concat(i[e].getNodes());this.allNodes=r}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 r=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)r=r.concat(i[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,i){if(!(r!=null&&i!=null))throw"assert failed";if(r==i)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==i)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,i,f,e,g,t=this.getAllEdges(),s=t.length,a=0;a<s;a++){if(r=t[a],i=r.source,f=r.target,r.lca=null,r.sourceInLca=i,r.targetInLca=f,i==f){r.lca=i.getOwner();continue}for(e=i.getOwner();r.lca==null;){for(r.targetInLca=f,g=f.getOwner();r.lca==null;){if(g==e){r.lca=g;break}if(g==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=g.getParent(),g=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,i){if(r==i)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=i.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(r,i){r==null&&i==null&&(r=this.rootGraph,i=1);for(var f,e=r.getNodes(),g=e.length,t=0;t<g;t++)f=e[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},n.prototype.includesInvalidEdge=function(){for(var r,i=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&i.push(r);for(var e=0;e<i.length;e++)this.remove(i[e]);return!1},C.exports=n}),(function(C,R,N){var v=N(12);function h(){}h.calcSeparationAmount=function(n,r,i,f){if(!n.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,e),i[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),i[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?i[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]<s?s=i[0]:t=i[1],i[0]=-1*e[0]*(s/2+f),i[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(n,r,i){n.getCenterX()<r.getCenterX()?i[0]=-1:i[0]=1,n.getCenterY()<r.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(n,r,i){var f=n.getCenterX(),e=n.getCenterY(),g=r.getCenterX(),t=r.getCenterY();if(n.intersects(r))return i[0]=f,i[1]=e,i[2]=g,i[3]=t,!0;var s=n.getX(),a=n.getY(),c=n.getRight(),l=n.getX(),T=n.getBottom(),u=n.getRight(),d=n.getWidthHalf(),L=n.getHeightHalf(),b=r.getX(),w=r.getY(),G=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),tt=r.getHeightHalf(),o=!1,E=!1;if(f===g){if(e>t)return i[0]=f,i[1]=a,i[2]=g,i[3]=U,!1;if(e<t)return i[0]=f,i[1]=T,i[2]=g,i[3]=w,!1}else if(e===t){if(f>g)return i[0]=s,i[1]=e,i[2]=G,i[3]=t,!1;if(f<g)return i[0]=c,i[1]=e,i[2]=b,i[3]=t,!1}else{var p=n.height/n.width,m=r.height/r.width,y=(t-e)/(g-f),S=void 0,O=void 0,F=void 0,W=void 0,I=void 0,Q=void 0;if(-p===y?f>g?(i[0]=l,i[1]=T,o=!0):(i[0]=c,i[1]=a,o=!0):p===y&&(f>g?(i[0]=s,i[1]=a,o=!0):(i[0]=u,i[1]=T,o=!0)),-m===y?g>f?(i[2]=B,i[3]=U,E=!0):(i[2]=G,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=V,i[3]=U,E=!0)),o&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!o)switch(S){case 1:W=a,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=l,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(O){case 1:Q=w,I=g+-tt/y,i[2]=I,i[3]=Q;break;case 2:I=V,Q=t+M*y,i[2]=I,i[3]=Q;break;case 3:Q=U,I=g+tt/y,i[2]=I,i[3]=Q;break;case 4:I=B,Q=t+-M*y,i[2]=I,i[3]=Q;break}}return!1},h.getCardinalDirection=function(n,r,i){return n>r?i:1+i%4},h.getIntersection=function(n,r,i,f){if(f==null)return this.getIntersection2(n,r,i);var e=n.x,g=n.y,t=r.x,s=r.y,a=i.x,c=i.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,G=void 0,B=void 0,U=void 0,V=void 0;return L=s-g,w=e-t,B=t*g-e*s,b=T-c,G=a-l,U=l*c-a*T,V=L*G-b*w,V===0?null:(u=(w*U-G*B)/V,d=(b*B-L*U)/V,new v(u,d))},h.angleOfVector=function(n,r,i,f){var e=void 0;return n!==i?(e=Math.atan((f-r)/(i-n)),i<n?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(n,r,i,f){var e=n.x,g=n.y,t=r.x,s=r.y,a=i.x,c=i.y,l=f.x,T=f.y,u=(t-e)*(T-c)-(l-a)*(s-g);if(u===0)return!1;var d=((T-c)*(l-e)+(a-l)*(T-g))/u,L=((g-s)*(l-e)+(t-e)*(T-g))/u;return 0<d&&d<1&&0<L&&L<1},h.findCircleLineIntersections=function(n,r,i,f,e,g,t){var s=(i-n)*(i-n)+(f-r)*(f-r),a=2*((n-e)*(i-n)+(r-g)*(f-r)),c=(n-e)*(n-e)+(r-g)*(r-g)-t*t,l=a*a-4*s*c;if(l>=0){var T=(-a+Math.sqrt(a*a-4*s*c))/(2*s),u=(-a-Math.sqrt(a*a-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,C.exports=h}),(function(C,R,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},C.exports=v}),(function(C,R,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v}),(function(C,R,N){var v=(function(){function e(g,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(g,a.key,a)}}return function(g,t,s){return t&&e(g.prototype,t),s&&e(g,s),g}})();function h(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var n=function(g){return{value:g,next:null,prev:null}},r=function(g,t,s,a){return g!==null?g.next=t:a.head=t,s!==null?s.prev=t:a.tail=t,t.prev=g,t.next=s,a.length++,t},i=function(g,t){var s=g.prev,a=g.next;return s!==null?s.next=a:t.head=a,a!==null?a.prev=s:t.tail=s,g.prev=g.next=null,t.length--,g},f=(function(){function e(g){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,g?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return r(null,n(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,a=this.head;s<t;)a=a.next,s++;return a.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var a=1,c=this.head;a<t;)c=c.next,a++;c.value=s}}}]),e})();C.exports=f}),(function(C,R,N){function v(h,n,r){this.x=null,this.y=null,h==null&&n==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof n=="number"&&r==null?(this.x=h,this.y=n):h.constructor.name=="Point"&&n==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,n,r){h.constructor.name=="Point"&&n==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof n=="number"&&r==null&&(parseInt(h)==h&&parseInt(n)==n?this.move(h,n):(this.x=Math.floor(h+.5),this.y=Math.floor(n+.5)))},v.prototype.move=function(h,n){this.x=h,this.y=n},v.prototype.translate=function(h,n){this.x+=h,this.y+=n},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var n=h;return this.x==n.x&&this.y==n.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v}),(function(C,R,N){function v(h,n,r,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&n!=null&&r!=null&&i!=null&&(this.x=h,this.y=n,this.width=r,this.height=i)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v}),(function(C,R,N){var v=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 h(){}h.lastID=0,h.createID=function(n){return h.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=h.getString(),h.lastID++),n.uniqueID)},h.getString=function(n){return n==null&&(n=h.lastID),"Object#"+n},h.isPrimitive=function(n){var r=typeof n>"u"?"undefined":v(n);return n==null||r!="object"&&r!="function"},C.exports=h}),(function(C,R,N){function v(a){if(Array.isArray(a)){for(var c=0,l=Array(a.length);c<a.length;c++)l[c]=a[c];return l}else return Array.from(a)}var h=N(0),n=N(7),r=N(3),i=N(1),f=N(6),e=N(5),g=N(17),t=N(29);function s(a){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},s.prototype.newGraph=function(a){return new f(null,this.graphManager,a)},s.prototype.newNode=function(a){return new r(this.graphManager,a)},s.prototype.newEdge=function(a){return new i(null,null,a)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),h.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),c=0;c<a.length;c++)a[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof r){var c=a;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(a instanceof i){var d=a;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(a instanceof f){var b=a;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(a){if(a==null)this.transform(new e(0,0));else{var c=new g,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(a.x),c.setWorldOrgY(a.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),u,d=0;d<T.length;d++)u=T[d],u.transform(c)}}},s.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=a.getNodes(),u=0;u<T.length;u++)c=T[u],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var a=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<l.length;u++)l[u].getChild()!=null&&(T=!1);if(!T)return a;var d=new Set,L=[],b=new Map,w=[];for(w=w.concat(l);w.length>0&&c;){for(L.push(w[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var B=G.getEdges(),u=0;u<B.length;u++){var U=B[u].getOtherEnd(G);if(b.get(G)!=U)if(!d.has(U))L.push(U),b.set(U,G);else{c=!1;break}}}if(!c)a=[];else{var V=[].concat(v(d));a.push(V);for(var u=0;u<V.length;u++){var M=V[u],tt=w.indexOf(M);tt>-1&&w.splice(tt,1)}d=new Set,b=new Map}}return a},s.prototype.createDummyNodesForBendpoints=function(a){for(var c=[],l=a.source,T=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,l,d),c.add(d),l=d}var L=this.newEdge(null);return this.graphManager.add(L,l,a.target),this.edgeToDummyNodes.set(a,c),a.isInterGraph()?this.graphManager.remove(a):T.remove(a),c},s.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(v(this.edgeToDummyNodes.keys())).concat(a);for(var c=0;c<a.length;c++){var l=a[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),u=0;u<T.length;u++){var d=T[u],L=new e(d.getCenterX(),d.getCenterY()),b=l.bendpoints.get(u);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(a,c,l,T){if(l!=null&&T!=null){var u=c;if(a<=50){var d=c/l;u-=(c-d)/50*(50-a)}else{var L=c*T;u+=(L-c)/50*(a-50)}return u}else{var b,w;return a<=50?(b=9*c/500,w=c/10):(b=9*c/50,w=-8*c),b*a+w}},s.findCenterOfTree=function(a){var c=[];c=c.concat(a);var l=[],T=new Map,u=!1,d=null;(c.length==1||c.length==2)&&(u=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],w=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),w==1&&l.push(b)}var G=[];for(G=G.concat(l);!u;){var B=[];B=B.concat(G),G=[];for(var L=0;L<c.length;L++){var b=c[L],U=c.indexOf(b);U>=0&&c.splice(U,1);var V=b.getNeighborsList();V.forEach(function(o){if(l.indexOf(o)<0){var E=T.get(o),p=E-1;p==1&&G.push(o),T.set(o,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(a){this.graphManager=a},C.exports=s}),(function(C,R,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v}),(function(C,R,N){var v=N(5);function h(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(n){this.lworldExtX=n},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(n){this.lworldExtY=n},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},h.prototype.transformX=function(n){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),r},h.prototype.transformY=function(n){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),r},h.prototype.inverseTransformX=function(n){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),r},h.prototype.inverseTransformY=function(n){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),r},h.prototype.inverseTransformPoint=function(n){var r=new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},C.exports=h}),(function(C,R,N){function v(t){if(Array.isArray(t)){for(var s=0,a=Array(t.length);s<t.length;s++)a[s]=t[s];return a}else return Array.from(t)}var h=N(15),n=N(4),r=N(0),i=N(8),f=N(9);function e(){h.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}e.prototype=Object.create(h.prototype);for(var g in h)e[g]=h[g];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,a,c,l,T,u,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),a=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*a))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-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()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,a=0;a<t.length;a++)s=t[a],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,a=0;a<u.length;a++)l=u[a],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(a=0;a<u.length;a++)for(l=u[a],c=a+1;c<u.length;c++)T=u[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),a=0;a<s.length;a++)t=s[a],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,a=0;a<t.length;a++)s=t[a],s.move()},e.prototype.calcSpringForce=function(t,s){var a=t.getSource(),c=t.getTarget(),l,T,u,d;if(this.uniformLeafNodeSizes&&a.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),u=T*(t.lengthX/l),d=T*(t.lengthY/l),a.springForceX+=u,a.springForceY+=d,c.springForceX-=u,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var a=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),u,d,L,b,w,G,B;if(a.intersects(c)){i.calcSeparationAmount(a,c,l,n.DEFAULT_EDGE_LENGTH/2),G=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*G,t.repulsionForceY-=U*B,s.repulsionForceX+=U*G,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-a.getCenterX(),d=c.getCenterY()-a.getCenterY()):(i.getIntersection(a,c,T),u=T[2]-T[0],d=T[3]-T[1]),Math.abs(u)<n.MIN_REPULSION_DIST&&(u=f.sign(u)*n.MIN_REPULSION_DIST),Math.abs(d)<n.MIN_REPULSION_DIST&&(d=f.sign(d)*n.MIN_REPULSION_DIST),L=u*u+d*d,b=Math.sqrt(L),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,G=w*u/b,B=w*d/b,t.repulsionForceX-=G,t.repulsionForceY-=B,s.repulsionForceX+=G,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,a,c,l,T,u,d,L;s=t.getOwner(),a=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-a,T=t.getCenterY()-c,u=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),a=0;a<s.length;a++)t=s[a],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,a=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(a);for(var l=0;l<s;l++)for(var T=0;T<a;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,a){var c=0,l=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-a)/this.repulsionRange));for(var d=c;d<=l;d++)for(var L=T;L<=u;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,l,T,u)},e.prototype.updateGrid=function(){var t,s,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<a.length;t++)s=a[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,a,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&a||c){var l=new Set;t.surrounding=new Array;for(var T,u=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=u.length||L>=u[0].length)){for(var b=0;b<u[d][L].length;b++)if(T=u[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),G=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&G<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},C.exports=e}),(function(C,R,N){var v=N(1),h=N(4);function n(i,f,e){v.call(this,i,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];C.exports=n}),(function(C,R,N){var v=N(3),h=N(4);function n(i,f,e,g){v.call(this,i,f,e,g),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];n.prototype.setGridCoordinates=function(i,f,e,g){this.startX=i,this.finishX=f,this.startY=e,this.finishY=g},C.exports=n}),(function(C,R,N){function v(h,n){this.width=0,this.height=0,h!==null&&n!==null&&(this.height=n,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},C.exports=v}),(function(C,R,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(n,r){var i=v.createID(n);this.contains(i)||(this.map[i]=r,this.keys.push(n))},h.prototype.contains=function(n){return v.createID(n),this.map[n]!=null},h.prototype.get=function(n){var r=v.createID(n);return this.map[r]},h.prototype.keySet=function(){return this.keys},C.exports=h}),(function(C,R,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(n){var r=v.createID(n);this.contains(r)||(this.set[r]=n)},h.prototype.remove=function(n){delete this.set[v.createID(n)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(n){return this.set[v.createID(n)]==n},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),i=r.length,f=0;f<i;f++)n.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(n){for(var r=n.length,i=0;i<r;i++){var f=n[i];this.add(f)}},C.exports=h}),(function(C,R,N){function v(){}v.multMat=function(h,n){for(var r=[],i=0;i<h.length;i++){r[i]=[];for(var f=0;f<n[0].length;f++){r[i][f]=0;for(var e=0;e<h[0].length;e++)r[i][f]+=h[i][e]*n[e][f]}}return r},v.transpose=function(h){for(var n=[],r=0;r<h[0].length;r++){n[r]=[];for(var i=0;i<h.length;i++)n[r][i]=h[i][r]}return n},v.multCons=function(h,n){for(var r=[],i=0;i<h.length;i++)r[i]=h[i]*n;return r},v.minusOp=function(h,n){for(var r=[],i=0;i<h.length;i++)r[i]=h[i]-n[i];return r},v.dotProduct=function(h,n){for(var r=0,i=0;i<h.length;i++)r+=h[i]*n[i];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var n=[],r=this.mag(h),i=0;i<h.length;i++)n[i]=h[i]/r;return n},v.multGamma=function(h){for(var n=[],r=0,i=0;i<h.length;i++)r+=h[i];r*=-1/h.length;for(var f=0;f<h.length;f++)n[f]=r+h[f];return n},v.multL=function(h,n,r){for(var i=[],f=[],e=[],g=0;g<n[0].length;g++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][g]*h[s];f[g]=t}for(var a=0;a<r.length;a++){for(var c=0,l=0;l<r.length;l++)c+=r[a][l]*f[l];e[a]=c}for(var T=0;T<n.length;T++){for(var u=0,d=0;d<n[0].length;d++)u+=n[T][d]*e[d];i[T]=u}return i},C.exports=v}),(function(C,R,N){var v=(function(){function i(f,e){for(var g=0;g<e.length;g++){var t=e[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,g){return e&&i(f.prototype,e),g&&i(f,g),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var n=N(11),r=(function(){function i(f,e){h(this,i),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;f instanceof n?g=f.size():g=f.length,this._quicksort(f,0,g-1)}return v(i,[{key:"_quicksort",value:function(e,g,t){if(g<t){var s=this._partition(e,g,t);this._quicksort(e,g,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,g,t){for(var s=this._get(e,g),a=g,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,a),s);)a++;if(a<c)this._swap(e,a,c),a++,c--;else return c}}},{key:"_get",value:function(e,g){return e instanceof n?e.get_object_at(g):e[g]}},{key:"_set",value:function(e,g,t){e instanceof n?e.set_object_at(g,t):e[g]=t}},{key:"_swap",value:function(e,g,t){var s=this._get(e,g);this._set(e,g,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,g){return g>e}}]),i})();C.exports=r}),(function(C,R,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,n]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,g);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var a=t;a<this.m;a++)h[a][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var u=t;u<this.m;u++)h[u][c]+=l*h[u][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<g){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=v.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var b=t+1;b<this.n;b++)r[b]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)i[w]=0;for(var G=t+1;G<this.n;G++)for(var B=t+1;B<this.m;B++)i[B]+=r[G]*h[B][G];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*i[M]}for(var tt=t+1;tt<this.n;tt++)this.V[tt][t]=r[tt]}}var o=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<o&&(this.s[o-1]=0),g+1<o&&(r[g]=h[g][o-1]),r[o-1]=0;{for(var E=e;E<n;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<n;y++){for(var S=0,O=m;O<this.m;O++)S+=this.U[O][m]*this.U[O][y];S=-S/this.U[m][m];for(var F=m;F<this.m;F++)this.U[F][y]+=S*this.U[F][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var I=0;I<m-1;I++)this.U[I][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<g,r[z]!==0))for(var X=z+1;X<n;X++){for(var it=0,$=z+1;$<this.n;$++)it+=this.V[$][z]*this.V[$][X];it=-it/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=it*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=o-1,et=Math.pow(2,-52),lt=Math.pow(2,-966);o>0;){var J=void 0,It=void 0;for(J=o-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+et*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===o-2)It=4;else{var Nt=void 0;for(Nt=o-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==o?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=lt+et*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===o-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var nt=r[o-2];r[o-2]=0;for(var ut=o-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],nt),wt=this.s[ut]/Et,Ot=nt/Et;this.s[ut]=Et,ut!==J&&(nt=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][o-1],this.V[mt][o-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][o-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<o;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[o-1]/Yt,P=this.s[o-2]/Yt,Y=r[o-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((P+Vt)*(P-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),gt=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(gt=Math.sqrt(q*q+at),q<0&&(gt=-gt),gt=at/(q+gt));for(var ot=(Z+Vt)*(Z-Vt)+gt,rt=Z*K,_=J;_<o-1;_++){var dt=v.hypot(ot,rt),At=ot/dt,pt=rt/dt;_!==J&&(r[_-1]=dt),ot=At*this.s[_]+pt*r[_],r[_]=At*r[_]-pt*this.s[_],rt=pt*this.s[_+1],this.s[_+1]=At*this.s[_+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][_]+pt*this.V[xt][_+1],this.V[xt][_+1]=-pt*this.V[xt][_]+At*this.V[xt][_+1],this.V[xt][_]=dt;if(dt=v.hypot(ot,rt),At=ot/dt,pt=rt/dt,this.s[_]=dt,ot=At*r[_]+pt*this.s[_+1],this.s[_+1]=-pt*r[_]+At*this.s[_+1],rt=pt*r[_+1],r[_+1]=At*r[_+1],_<this.m-1)for(var ft=0;ft<this.m;ft++)dt=At*this.U[ft][_]+pt*this.U[ft][_+1],this.U[ft][_+1]=-pt*this.U[ft][_]+At*this.U[ft][_+1],this.U[ft][_]=dt}r[o-2]=ot}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var st=0;st<=k;st++)this.V[st][J]=-this.V[st][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ct=0;ct<this.n;ct++)Lt=this.V[ct][J+1],this.V[ct][J+1]=this.V[ct][J],this.V[ct][J]=Lt;if(J<this.m-1)for(var ht=0;ht<this.m;ht++)Lt=this.U[ht][J+1],this.U[ht][J+1]=this.U[ht][J],this.U[ht][J]=Lt;J++}o--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,n){var r=void 0;return Math.abs(h)>Math.abs(n)?(r=n/h,r=Math.abs(h)*Math.sqrt(1+r*r)):n!=0?(r=h/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},C.exports=v}),(function(C,R,N){var v=(function(){function r(i,f){for(var e=0;e<f.length;e++){var g=f[e];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(i,g.key,g)}}return function(i,f,e){return f&&r(i.prototype,f),e&&r(i,e),i}})();function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(i,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[s][a]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!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 g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[g-1]===this.sequence2[t-1]?s=this.grid[g-1][t-1]+this.match_score:s=this.grid[g-1][t-1]+this.mismatch_penalty;var a=this.grid[g-1][t]+this.gap_penalty,c=this.grid[g][t-1]+this.gap_penalty,l=[s,a,c],T=this.arrayAllMaxIndexes(l);this.grid[g][t]=l[T[0]],this.tracebackGrid[g][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],g=this.tracebackGrid[e.pos[0]][e.pos[1]];g[0]&&f.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}),g[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),g[2]&&f.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}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var g=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();C.exports=n}),(function(C,R,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),C.exports=v}),(function(C,R,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(n,r){this.listeners.push({event:n,callback:r})},h.removeListener=function(n,r){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===n&&f.callback===r&&this.listeners.splice(i,1)}},h.emit=function(n,r){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];n===f.event&&f.callback(r)}},C.exports=v})])})})(fe)),fe.exports}var Ze=le.exports,Ae;function qe(){return Ae||(Ae=1,(function(x,A){(function(R,N){x.exports=N(ke())})(Ze,function(C){return(()=>{var R={45:((n,r,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f}),806:((n,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,n.exports=e}),767:((n,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,a){f.call(this,t,s,a)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),880:((n,r,i)=>{var f=i(551).LGraph;function e(t,s,a){f.call(this,t,s,a)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),578:((n,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),765:((n,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),a=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,G=i(551).IGeometry,B=i(551).LGraph,U=i(551).Transform,V=i(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var tt in f)M[tt]=f[tt];M.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},M.prototype.newGraph=function(o){return new g(null,this.graphManager,o)},M.prototype.newNode=function(o){return new t(this.graphManager,o)},M.prototype.newEdge=function(o){return new s(null,null,o)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(a.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var o=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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(a.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),a.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.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%l.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-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}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 o=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return o.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),a.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),a.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),E={},p=0;p<o.length;p++){var m=o[p].rect,y=o[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var o=this.getAllNodes(),E,p=0;p<o.length;p++)E=o[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<o.length;p++)E=o[p],E.move()},M.prototype.initConstraintVariables=function(){var o=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),et,lt=0,J=0;J<k.length;J++)et=k[J],et.getChild()==null?o.fixedNodeSet.has(et.id)&&(lt+=100):lt+=D(et);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){o.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var S=y(m);S>0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var O=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){o.fixedNodesOnHorizontal.add(D),o.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),o.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),o.fixedNodeSet.has(H)&&o.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,p=0;p<I.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),I[p].forEach(function(H){F.set(H,"dummy"+p),o.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),o.fixedNodeSet.has(H)&&o.fixedNodesOnVertical.add("dummy"+p)})}if(a.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,et;for(et=D.length-1;et>=2*D.length/3;et--)H=Math.floor(Math.random()*(et+1)),k=D[et],D[et]=D[H],D[H]=k;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 H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;o.nodesInRelativeHorizontal.includes(H)||(o.nodesInRelativeHorizontal.push(H),o.nodeToRelativeConstraintMapHorizontal.set(H,[]),o.dummyToNodeForVerticalAlignment.has(H)?o.nodeToTempPositionMapHorizontal.set(H,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(H,o.idToNodeMap.get(H).getCenterX())),o.nodesInRelativeHorizontal.includes(k)||(o.nodesInRelativeHorizontal.push(k),o.nodeToRelativeConstraintMapHorizontal.set(k,[]),o.dummyToNodeForVerticalAlignment.has(k)?o.nodeToTempPositionMapHorizontal.set(k,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(k,o.idToNodeMap.get(k).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),o.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var et=F.has(D.top)?F.get(D.top):D.top,lt=F.has(D.bottom)?F.get(D.bottom):D.bottom;o.nodesInRelativeVertical.includes(et)||(o.nodesInRelativeVertical.push(et),o.nodeToRelativeConstraintMapVertical.set(et,[]),o.dummyToNodeForHorizontalAlignment.has(et)?o.nodeToTempPositionMapVertical.set(et,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(et)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(et,o.idToNodeMap.get(et).getCenterY())),o.nodesInRelativeVertical.includes(lt)||(o.nodesInRelativeVertical.push(lt),o.nodeToRelativeConstraintMapVertical.set(lt,[]),o.dummyToNodeForHorizontalAlignment.has(lt)?o.nodeToTempPositionMapVertical.set(lt,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(lt,o.idToNodeMap.get(lt).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(et).push({bottom:lt,gap:D.gap}),o.nodeToRelativeConstraintMapVertical.get(lt).push({top:et,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var et=F.has(D.top)?F.get(D.top):D.top,lt=F.has(D.bottom)?F.get(D.bottom):D.bottom;z.has(et)?z.get(et).push(lt):z.set(et,[lt]),z.has(lt)?z.get(lt).push(et):z.set(lt,[et])}});var X=function(H,k){var et=[],lt=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,nt){if(!It.has(nt)){et[Nt]=[],lt[Nt]=!1;var ut=nt;for(J.push(ut),It.add(ut),et[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(lt[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),et[Nt].push(wt))})}Nt++}}),{components:et,isFixed:lt}},it=X(Q,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=it.components,this.fixedComponentsOnHorizontal=it.isFixed;var $=X(z,o.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=o.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var S=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=S}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var F=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){F=0;break}F+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=F/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(a.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!o.fixedNodesOnHorizontal.has($)){var D=0;o.dummyToNodeForVerticalAlignment.has($)?D=o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=o.idToNodeMap.get($).displacementX,o.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=o.nodeToTempPositionMapHorizontal.get(H.right)-o.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=o.nodeToTempPositionMapHorizontal.get($)-o.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),o.nodeToTempPositionMapHorizontal.set($,o.nodeToTempPositionMapHorizontal.get($)+D),o.dummyToNodeForVerticalAlignment.has($)?o.dummyToNodeForVerticalAlignment.get($).forEach(function(H){o.idToNodeMap.get(H).displacementX=D}):o.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!o.fixedNodesOnHorizontal.has($)){var D=0;o.dummyToNodeForHorizontalAlignment.has($)?D=o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=o.idToNodeMap.get($).displacementY,o.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=o.nodeToTempPositionMapVertical.get(H.bottom)-o.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=o.nodeToTempPositionMapVertical.get($)-o.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),o.nodeToTempPositionMapVertical.set($,o.nodeToTempPositionMapVertical.get($)+D),o.dummyToNodeForHorizontalAlignment.has($)?o.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){o.idToNodeMap.get(H).displacementY=D}):o.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var I=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(H){o.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var X=this.dummyToNodeForVerticalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementX,z++;for(var it=Q/z,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(H){o.idToNodeMap.get(H).displacementX=it}):this.idToNodeMap.get(I[y]).displacementX=it}}for(var p=0;p<this.componentsOnVertical.length;p++){var I=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(k){o.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var X=this.dummyToNodeForHorizontalAlignment.get(I[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(I[y]).displacementY,z++;for(var it=Q/z,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){o.idToNodeMap.get(J).displacementY=it}):this.idToNodeMap.get(I[y]).displacementY=it}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(o=o.concat(E.getNodes()));return o},M.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<o.length;p++){var m=o[p];if(!E.has(m)){var y=m.getSource(),S=m.getTarget();if(y==S)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(S)),O=O.concat(S.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var F;for(F=0;F<O.length;F++){var W=O[F];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(I){E.add(I)})}}}if(E.size==o.length)break}},M.prototype.positionNodesRadially=function(o){for(var E=new u(0,0),p=Math.ceil(Math.sqrt(o.length)),m=0,y=0,S=0,O=new d(0,0),F=0;F<o.length;F++){F%p==0&&(S=0,y=m,F!=0&&(y+=a.DEFAULT_COMPONENT_SEPERATION),m=0);var W=o[F],I=b.findCenterOfTree(W);E.x=S,E.y=y,O=M.radialLayout(W,I,E),O.y>m&&(m=Math.floor(O.y)),S=Math.floor(O.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(o,E,p){var m=Math.max(this.maxDiagonalInTree(o),a.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(o),S=new U;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var O=0;O<o.length;O++){var F=o[O];F.transform(S)}var W=new d(y.getMaxX(),y.getMaxY());return S.inverseTransformPoint(W)},M.branchRadialLayout=function(o,E,p,m,y,S){var O=(m-p+1)/2;O<0&&(O+=180);var F=(O+p)%360,W=F*G.TWO_PI/360,I=y*Math.cos(W),Q=y*Math.sin(W);o.setCenter(I,Q);var z=[];z=z.concat(o.getEdges());var X=z.length;E!=null&&X--;for(var it=0,$=z.length,D,H=o.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var et=z.indexOf(k);et>=0&&z.splice(et,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var lt=Math.abs(m-p)/X,J=D;it!=X;J=++J%$){var It=z[J].getOtherEnd(o);if(It!=E){var Nt=(p+it*lt)%360,vt=(Nt+lt)%360;M.branchRadialLayout(It,o,Nt,vt,y+S,S),it++}}},M.maxDiagonalInTree=function(o){for(var E=w.MIN_VALUE,p=0;p<o.length;p++){var m=o[p],y=m.getDiagonal();y>E&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var o=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var S=m[y],O=S.getParent();this.getNodeDegreeWithChildren(S)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(S)}for(var y=0;y<p.length;y++){var S=p[y],F=S.getParent().id;typeof E[F]>"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var I="DummyCompound_"+W;o.memberGroups[I]=E[W];var Q=E[W][0].getParent(),z=new t(o.graphManager);z.id=I,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,o.idToDummyNode[I]=z;var X=o.getGraphManager().add(o.newGraph(),z),it=Q.getChild();it.add(z);for(var $=0;$<E[W].length;$++){var D=E[W][$];it.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var o={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],o[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,E)},M.prototype.clearZeroDegreeMembers=function(){var o=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=o.idToDummyNode[p];if(E[p]=o.tileNodes(o.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,a.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,S=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var E=this.compoundOrder[o],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var o=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=o.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,O=m.labelMarginLeft,F=m.labelMarginTop;o.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,O,F)})},M.prototype.getToBeTiled=function(o){var E=o.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=o.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var S=m[y];if(this.getNodeDegree(S)>0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(o){o.id;for(var E=o.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(o){var E=this.getNodeDegree(o);if(o.getChild()==null)return E;for(var p=o.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(o){for(var E=0;E<o.length;E++){var p=o[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(o,E,p,m,y,S,O){E+=m+S,p+=y+O;for(var F=E,W=0;W<o.rows.length;W++){var I=o.rows[W];E=F;for(var Q=0,z=0;z<I.length;z++){var X=I[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+o.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+o.verticalPadding}},M.prototype.tileCompoundMembers=function(o,E){var p=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(o[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,a.NODE_DIMENSIONS_INCLUDE_LABELS){var S=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(o,E){var p=this.tileNodesByFavoringDim(o,E,!0),m=this.tileNodesByFavoringDim(o,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),O;return S<y?O=m:O=p,O},M.prototype.getOrgRatio=function(o){var E=o.width,p=o.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(o,E){var p=a.TILING_PADDING_VERTICAL,m=a.TILING_PADDING_HORIZONTAL,y=o.length,S=0,O=0,F=0;o.forEach(function($){S+=$.getWidth(),O+=$.getHeight(),$.getWidth()>F&&(F=$.getWidth())});var W=S/y,I=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(I+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var it=X*(W+m)-m;return F>it&&(it=F),it+=m*2,it},M.prototype.tileNodesByFavoringDim=function(o,E,p){var m=a.TILING_PADDING_VERTICAL,y=a.TILING_PADDING_HORIZONTAL,S=a.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(O.idealRowWidth=this.calcIdealRowWidth(o,p));var F=function(D){return D.rect.width*D.rect.height},W=function(D,H){return F(H)-F(D)};o.sort(function($,D){var H=W;return O.idealRowWidth?(H=S,H($.id,D.id)):H($,D)});for(var I=0,Q=0,z=0;z<o.length;z++){var X=o[z];I+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=I/o.length,O.centerY=Q/o.length;for(var z=0;z<o.length;z++){var X=o[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var it=O.rows.length-1;O.idealRowWidth||(it=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,it,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(o,E,p,m){var y=m;if(p==o.rows.length){var S=[];o.rows.push(S),o.rowWidth.push(y),o.rowHeight.push(0)}var O=o.rowWidth[p]+E.rect.width;o.rows[p].length>0&&(O+=o.horizontalPadding),o.rowWidth[p]=O,o.width<O&&(o.width=O);var F=E.rect.height;p>0&&(F+=o.verticalPadding);var W=0;F>o.rowHeight[p]&&(W=o.rowHeight[p],o.rowHeight[p]=F,W=o.rowHeight[p]-W),o.height+=W,o.rows[p].push(E)},M.prototype.getShortestRowIndex=function(o){for(var E=-1,p=Number.MAX_VALUE,m=0;m<o.rows.length;m++)o.rowWidth[m]<p&&(E=m,p=o.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(o){for(var E=-1,p=Number.MIN_VALUE,m=0;m<o.rows.length;m++)o.rowWidth[m]>p&&(E=m,p=o.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(o,E,p){if(o.idealRowWidth){var m=o.rows.length-1,y=o.rowWidth[m];return y+E+o.horizontalPadding<=o.idealRowWidth}var S=this.getShortestRowIndex(o);if(S<0)return!0;var O=o.rowWidth[S];if(O+o.horizontalPadding+E<=o.width)return!0;var F=0;o.rowHeight[S]<p&&S>0&&(F=p+o.verticalPadding-o.rowHeight[S]);var W;o.width-O>=E+o.horizontalPadding?W=(o.height+F)/(O+E+o.horizontalPadding):W=(o.height+F)/o.width,F=p+o.verticalPadding;var I;return o.width<E?I=(o.height+F)/E:I=(o.height+F)/o.width,I<1&&(I=1/I),W<1&&(W=1/W),W<I},M.prototype.shiftToLastRow=function(o){var E=this.getLongestRowIndex(o),p=o.rowWidth.length-1,m=o.rows[E],y=m[m.length-1],S=y.width+o.horizontalPadding;if(o.width-o.rowWidth[p]>S&&E!=p){m.splice(-1,1),o.rows[p].push(y),o.rowWidth[E]=o.rowWidth[E]-S,o.rowWidth[p]=o.rowWidth[p]+S,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,F=0;F<m.length;F++)m[F].height>O&&(O=m[F].height);E>0&&(O+=o.verticalPadding);var W=o.rowHeight[E]+o.rowHeight[p];o.rowHeight[E]=O,o.rowHeight[p]<y.height+o.verticalPadding&&(o.rowHeight[p]=y.height+o.verticalPadding);var I=o.rowHeight[E]+o.rowHeight[p];o.height+=I-W,this.shiftToLastRow(o)}},M.prototype.tilingPreLayout=function(){a.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){a.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var o=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var S=0;S<m.length;S++)if(p=m[S],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(a.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),F=new L(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),F])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(W.push(y[I]),y[I][0].getOwner().remove(y[I][0]));o.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},M.prototype.growTree=function(o){for(var E=o.length,p=o[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(o){var E,p,m=o[0];if(m==o[1].source?p=o[1].target:p=o[1].source,a.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+o[3].getWidth(),p.getCenterY()+o[3].getHeight());else{var y=p.startX,S=p.finishX,O=p.startY,F=p.finishY,W=0,I=0,Q=0,z=0,X=[W,Q,I,z];if(O>0)for(var it=y;it<=S;it++)X[0]+=this.grid[it][O-1].length+this.grid[it][O].length-1;if(S<this.grid.length-1)for(var it=O;it<=F;it++)X[1]+=this.grid[S+1][it].length+this.grid[S][it].length-1;if(F<this.grid[0].length-1)for(var it=y;it<=S;it++)X[2]+=this.grid[it][F+1].length+this.grid[it][F].length-1;if(y>0)for(var it=O;it<=F;it++)X[3]+=this.grid[y-1][it].length+this.grid[y][it].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var et=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?et==0?E=0:E=1:X[0]==0&&X[2]==0?et==0?E=0:E=2:X[0]==0&&X[3]==0?et==0?E=0:E=3:X[1]==0&&X[2]==0?et==0?E=1:E=2:X[1]==0&&X[3]==0?et==0?E=1:E=3:et==0?E=2:E=3}else if(D==4&&$==0){var et=Math.floor(Math.random()*4);E=et}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},n.exports=M}),991:((n,r,i)=>{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,a,c,l){f.call(this,s,a,c,l)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,a){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=a):l.propogateDisplacementToChildren(s,a)},g.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},g.prototype.setPred1=function(s){this.pred1=s},g.prototype.getPred1=function(){return pred1},g.prototype.getPred2=function(){return pred2},g.prototype.setNext=function(s){this.next=s},g.prototype.getNext=function(){return next},g.prototype.setProcessed=function(s){this.processed=s},g.prototype.isProcessed=function(){return processed},n.exports=g}),902:((n,r,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=i(806),g=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function a(){}a.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,d=[],L=[],b=c.getAllNodes(),w=0,G=0;G<b.length;G++){var B=b[G];B.getChild()==null&&(u.set(B.id,w++),d.push(B.getCenterX()),L.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(P){!P.gap&&P.gap!=0&&(P.left?P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.left).getWidth()/2+T.get(P.right).getWidth()/2:P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.top).getHeight()/2+T.get(P.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[u.get(q)],K+=L[u.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function gt(ft,st){var Lt=new Set(ft),ct=!0,ht=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){ht=!0,Xt=bt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}return Lt}var ot=new Map;Y.forEach(function(ft,st){ot.set(st,0)}),Y.forEach(function(ft,st){ft.forEach(function(Lt){ot.set(Lt.id,ot.get(Lt.id)+1)})});var rt=new Map,_=new Map,dt=new g;ot.forEach(function(ft,st){ft==0?(dt.push(st),K||(Z=="horizontal"?rt.set(st,u.has(st)?d[u.get(st)]:q.get(st)):rt.set(st,u.has(st)?L[u.get(st)]:q.get(st)))):rt.set(st,Number.NEGATIVE_INFINITY),K&&_.set(st,new Set([st]))}),K&&at.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Lt=0;st.forEach(function(ht){Z=="horizontal"?(rt.set(ht,u.has(ht)?d[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht)):(rt.set(ht,u.has(ht)?L[u.get(ht)]:q.get(ht)),Lt+=rt.get(ht))}),Lt=Lt/st.length,ft.forEach(function(ht){K.has(ht)||rt.set(ht,Lt)})}else{var ct=0;ft.forEach(function(ht){Z=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:q.get(ht):ct+=u.has(ht)?L[u.get(ht)]:q.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){rt.set(ht,ct)})}});for(var At=function(){var st=dt.shift(),Lt=Y.get(st);Lt.forEach(function(ct){if(rt.get(ct.id)<rt.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if(Z=="horizontal"?ht=u.has(ct.id)?d[u.get(ct.id)]:q.get(ct.id):ht=u.has(ct.id)?L[u.get(ct.id)]:q.get(ct.id),rt.set(ct.id,ht),ht<rt.get(st)+ct.gap){var Xt=rt.get(st)+ct.gap-ht;_.get(st).forEach(function(Tt){rt.set(Tt,rt.get(Tt)-Xt)})}}else rt.set(ct.id,rt.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&dt.push(ct.id),K&&_.set(ct.id,gt(_.get(st),_.get(ct.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(ft,st){ft.length==0&&pt.add(st)});var xt=[];_.forEach(function(ft,st){if(pt.has(st)){var Lt=!1,ct=!0,ht=!1,Xt=void 0;try{for(var Tt=ft[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){ht=!0,Xt=St}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(ft))[0])&&(bt=!0,zt=kt)}),bt?ft.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(ft))}}}),xt.forEach(function(ft,st){var Lt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=ft[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=u.has(St)?d[u.get(St)]:q.get(St):kt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=rt.get(St);kt<Lt&&(Lt=kt),kt>ht&&(ht=kt),Kt<ct&&(ct=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+ht)/2-(ct+Xt)/2,Qt=!0,_t=!1,jt=void 0;try{for(var Jt=ft[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;rt.set(te,rt.get(te)+ce)}}catch(ee){_t=!0,jt=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(_t)throw jt}}})}return rt},tt=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(_){_.left?d[u.get(_.left)]-d[u.get(_.right)]>=0?Z++:K++:L[u.get(_.top)]-L[u.get(_.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gt<u.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(Z>K)for(var ot=0;ot<u.size;ot++)d[ot]=-1*d[ot];else if(q>at)for(var rt=0;rt<u.size;rt++)L[rt]=-1*L[rt]},o=function(Y){var Z=[],K=new g,q=new Set,at=0;return Y.forEach(function(gt,ot){if(!q.has(ot)){Z[at]=[];var rt=ot;for(K.push(rt),q.add(rt),Z[at].push(rt);K.length!=0;){rt=K.shift();var _=Y.get(rt);_.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],S=!1,O=!1,F=new Set,W=new Map,I=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(P){F.add(P.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(P){P.left?(W.has(P.left)?W.get(P.left).push({id:P.right,gap:P.gap,direction:"horizontal"}):W.set(P.left,[{id:P.right,gap:P.gap,direction:"horizontal"}]),W.has(P.right)||W.set(P.right,[])):(W.has(P.top)?W.get(P.top).push({id:P.bottom,gap:P.gap,direction:"vertical"}):W.set(P.top,[{id:P.bottom,gap:P.gap,direction:"vertical"}]),W.has(P.bottom)||W.set(P.bottom,[]))}),I=E(W),Q=o(I)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(P,Y){m[Y]=[P.position.x,P.position.y],y[Y]=[d[u.get(P.nodeId)],L[u.get(P.nodeId)]]}),S=!0;else if(l.alignmentConstraint)(function(){var P=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(rt){var _=new Set;Y[rt].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),At=void 0;dt.size>0?At=d[u.get(dt.values().next().value)]:At=V(_).x,Y[rt].forEach(function(pt){m[P]=[At,L[u.get(pt)]],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},K=0;K<Y.length;K++)Z(K);S=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(rt){var _=new Set;q[rt].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),At=void 0;dt.size>0?At=d[u.get(dt.values().next().value)]:At=V(_).y,q[rt].forEach(function(pt){m[P]=[d[u.get(pt)],At],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},gt=0;gt<q.length;gt++)at(gt);S=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,it=0;it<Q.length;it++)Q[it].length>z&&(z=Q[it].length,X=it);if(z<I.size/2)tt(l.relativePlacementConstraint),S=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(P){W.get(P).forEach(function(Y){Y.direction=="horizontal"?($.has(P)?$.get(P).push(Y):$.set(P,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:P,right:Y.id})):(D.has(P)?D.get(P).push(Y):D.set(P,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:P,bottom:Y.id}))})}),tt(H),O=!1;var k=M($,"horizontal"),et=M(D,"vertical");Q[X].forEach(function(P,Y){y[Y]=[d[u.get(P)],L[u.get(P)]],m[Y]=[],k.has(P)?m[Y][0]=k.get(P):m[Y][0]=d[u.get(P)],et.has(P)?m[Y][1]=et.get(P):m[Y][1]=L[u.get(P)]}),S=!0}}if(S){for(var lt=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),nt=s.svd(vt);lt=t.multMat(nt.V,t.transpose(nt.U));for(var ut=0;ut<u.size;ut++){var Et=[d[ut],L[ut]],wt=[lt[0][0],lt[1][0]],Ot=[lt[0][1],lt[1][1]];d[ut]=t.dotProduct(Et,wt),L[ut]=t.dotProduct(Et,Ot)}O&&tt(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(P,Y){var Z={x:d[u.get(P.nodeId)],y:L[u.get(P.nodeId)]},K=P.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(P,Y){d[Y]+=mt.x}),L.forEach(function(P,Y){L[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(P){d[u.get(P.nodeId)]=P.position.x,L[u.get(P.nodeId)]=P.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var P=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,gt=new Set,ot=new Set;if(F.forEach(function(Gt){gt.add(Gt),ot.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var rt=l.alignmentConstraint.vertical,_=function(yt){Z.set("dummy"+yt,[]),rt[yt].forEach(function(Mt){P.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),F.has(Mt)&&gt.add("dummy"+yt)}),q.set("dummy"+yt,d[u.get(rt[yt][0])])},dt=0;dt<rt.length;dt++)_(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),F.has(Mt)&&ot.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var ft=new Map,st=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=P.get(yt)?P.get(yt):yt,P.get(Mt.id)?$t={id:P.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ft.has(Zt)?ft.get(Zt).push($t):ft.set(Zt,[$t]),ft.has($t.id)||ft.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,st.has(Zt)?st.get(Zt).push($t):st.set(Zt,[$t]),st.has($t.id)||st.set($t.id,[]))})},ct=!0,ht=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ct=(Ct=Tt.next()).done);ct=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){ht=!0,Xt=Gt}finally{try{!ct&&Tt.return&&Tt.return()}finally{if(ht)throw Xt}}var bt=E(ft),zt=E(st),St=o(bt),kt=o(zt),Kt=p(ft),ce=p(st),Qt=[],_t=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){_t[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&_t[yt].push(Mt)})});var jt=M(ft,"horizontal",gt,q,Qt),Jt=M(st,"vertical",ot,at,_t),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[u.get(Mt)]=jt.get(yt)}):d[u.get(yt)]=jt.get(yt)},te=!0,ee=!1,Ee=void 0;try{for(var ge=jt.keys()[Symbol.iterator](),Te;!(te=(Te=ge.next()).done);te=!0){var ue=Te.value;oe(ue)}}catch(Gt){ee=!0,Ee=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ee}}var Ve=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[u.get(Mt)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},de=!0,Ne=!1,Le=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),Ce;!(de=(Ce=ve.next()).done);de=!0){var ue=Ce.value;Ve(ue)}}catch(Gt){Ne=!0,Le=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ne)throw Le}}})()}for(var Yt=0;Yt<b.length;Yt++){var Vt=b[Yt];Vt.getChild()==null&&Vt.setCenter(d[u.get(Vt.id)],L[u.get(Vt.id)])}},n.exports=a}),551:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return R[n](i,i.exports,v),i.exports}var h=v(45);return h})()})})(le)),le.exports}var Qe=he.exports,Me;function Je(){return Me||(Me=1,(function(x,A){(function(R,N){x.exports=N(qe())})(Qe,function(C){return(()=>{var R={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e<i;e++)f[e-1]=arguments[e];return f.forEach(function(g){Object.keys(g).forEach(function(t){return r[t]=g[t]})}),r}}),548:((n,r,i)=>{var f=(function(){function t(s,a){var c=[],l=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(a&&c.length===a));l=!0);}catch(b){T=!0,u=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(s,a){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,a);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},a=0;a<t.length;a++)s[t[a].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var u=l.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},g.connectComponents=function(t,s,a,c){var l=new e,T=new Set,u=[],d=void 0,L=void 0,b=void 0,w=!1,G=1,B=[],U=[],V=function(){var tt=t.collection();U.push(tt);var o=a[0],E=t.collection();E.merge(o).merge(o.descendants().intersection(s)),u.push(o),E.forEach(function(y){l.push(y),T.add(y),tt.merge(y)});for(var p=function(){o=l.shift();var S=t.collection();o.neighborhood().nodes().forEach(function(I){s.intersection(o.edgesWith(I)).length>0&&S.merge(I)});for(var O=0;O<S.length;O++){var F=S[O];if(d=a.intersection(F.union(F.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(I){l.push(I),T.add(I),tt.merge(I),a.has(I)&&u.push(I)})}}};l.length!=0;)p();if(tt.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(S){tt.has(S.source())&&tt.has(S.target())&&tt.merge(S)})}),u.length==a.length&&(w=!0),!w||w&&G>1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),B.push(L.id());var m=t.collection();m.merge(u[0]),u.forEach(function(y){m.merge(y)}),u=[],a=a.difference(m),G++}};do V();while(!w);return c&&B.length>0&&c.set("dummy"+(c.size+1),B),U},g.relocateComponent=function(t,s,a){if(!a.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(a.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=w.next()).done);d=!0){var B=G.value,U=f(B,2),V=U[0],M=U[1],tt=a.cy.getElementById(V);if(tt){var o=tt.boundingBox(),E=s.xCoords[M]-o.w/2,p=s.xCoords[M]+o.w/2,m=s.yCoords[M]-o.h/2,y=s.yCoords[M]+o.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>u&&(u=y)}}}catch(I){L=!0,b=I}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(l+c)/2,O=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(I){return I+S}),s.yCoords=s.yCoords.map(function(I){return I+O})}else{Object.keys(s).forEach(function(I){var Q=s[I],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,it=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>l&&(l=X),it<T&&(T=it),$>u&&(u=$)});var F=t.x-(l+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(I){var Q=s[I];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,a,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,G=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;V<U;V++){var M=B[V];L=s[c.get(M.id())]-M.width()/2,b=s[c.get(M.id())]+M.width()/2,w=a[c.get(M.id())]-M.height()/2,G=a[c.get(M.id())]+M.height()/2,l>L&&(l=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var tt={};return tt.topLeftX=l,tt.topLeftY=u,tt.width=T-l,tt.height=d-u,tt},g.calcParentsWithoutChildren=function(t,s){var a=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||a.merge(c)}),a},n.exports=g}),816:((n,r,i)=>{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,a=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,G=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,tt={};d.randomize&&(U=L.nodeIndexes,V=L.xCoords,M=L.yCoords);var o=function(I){return typeof I=="function"},E=function(I,Q){return o(I)?I(Q):I},p=f.calcParentsWithoutChildren(b,w),m=function W(I,Q,z,X){for(var it=Q.length,$=0;$<it;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,et=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=I.add(new g(z.graphManager,new t(V[U.get(D.id())]-et.w/2,M[U.get(D.id())]-et.h/2),new s(parseFloat(et.w),parseFloat(et.h))));else{var lt=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=I.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(lt.width,lt.height))):k=I.add(new g(z.graphManager,new t(lt.topLeftX,lt.topLeftY),new s(parseFloat(et.w),parseFloat(et.h))))}else k=I.add(new g(z.graphManager,new t(D.position("x")-et.w/2,D.position("y")-et.h/2),new s(parseFloat(et.w),parseFloat(et.h))));else k=I.add(new g(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),tt[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(I,Q,z){for(var X=0,it=0,$=0;$<z.length;$++){var D=z[$],H=tt[D.data("source")],k=tt[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var et=Q.add(I.newEdge(),H,k);et.id=D.id(),et.idealLength=E(d.idealEdgeLength,D),et.edgeElasticity=E(d.edgeElasticity,D),X+=et.idealLength,it++}}d.idealEdgeLength!=null&&(it>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/it:o(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(I,Q){Q.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(I.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?a.QUALITY=2:a.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=a.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,F=O.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(G),O,d),y(O,F,B),S(O,d),O.runLayout(),tt};n.exports={coseLayout:T}}),212:((n,r,i)=>{var f=(function(){function d(L,b){for(var w=0;w<b.length;w++){var G=b[w];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(L,G.key,G)}}return function(L,b,w){return b&&d(L.prototype,b),w&&d(L,w),L}})();function e(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}var g=i(658),t=i(548),s=i(657),a=s.spectralLayout,c=i(816),l=c.coseLayout,T=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(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){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(){}}),u=(function(){function d(L){e(this,d),this.options=g({},T,L)}return f(d,[{key:"run",value:function(){var b=this,w=this.options,G=w.cy,B=w.eles,U=[],V=[],M=void 0,tt=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var o=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;o&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(G.layoutUtilities&&w.packComponents&&(E=G.layoutUtilities("get"),E||(E=G.layoutUtilities()),p=!0),B.nodes().length>0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(G,w.eles,S),M.forEach(function(vt){var nt=vt.boundingBox();tt.push({x:nt.x1+nt.w/2,y:nt.y1+nt.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(a(w))}),w.quality=="default"||w.quality=="proof"){var O=G.collection();if(w.tile){var F=new Map,W=[],I=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:I},X=[];if(M.forEach(function(vt,nt){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(nt))}),O.length>1){var it=O.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),tt.splice(X[$],1)}}M.forEach(function(vt,nt){w.eles=vt,V.push(l(w,U[nt])),t.relocateComponent(tt[nt],V[nt],w)})}else M.forEach(function(vt,nt){t.relocateComponent(tt[nt],U[nt],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,nt){var ut=void 0;if(w.quality=="draft"&&(ut=U[nt].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[nt].xCoords[wt]-Ot.boundingbox().w/2,y:U[nt].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[nt].xCoords,U[nt].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[nt][Ot.id()]&&Et.nodes.push({x:V[nt][Ot.id()].getLeft(),y:V[nt][Ot.id()].getTop(),width:V[nt][Ot.id()].getWidth(),height:V[nt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[nt].xCoords,U[nt].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[nt].xCoords[Rt]),Ut.push(U[nt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[nt].xCoords,U[nt].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[nt].xCoords[Ht]),Pt.push(U[nt].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[nt][mt.id()]&&V[nt][Dt.id()]&&Et.edges.push({startX:V[nt][mt.id()].getCenterX(),startY:V[nt][mt.id()].getCenterY(),endX:V[nt][Dt.id()].getCenterX(),endY:V[nt][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(nt))}});var et=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,nt){var ut=vt.xCoords.map(function(wt){return wt+et[nt].dx}),Et=vt.yCoords.map(function(wt){return wt+et[nt].dy});vt.xCoords=ut,vt.yCoords=Et});else{var lt=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(nt){var ut=V[vt][nt];ut.setCenter(ut.getCenterX()+et[lt].dx,ut.getCenterY()+et[lt].dy)}),lt++})}}}else{var m=w.eles.boundingBox();if(tt.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=a(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(tt[0],V[0],w)):t.relocateComponent(tt[0],U[0],w)}var J=function(nt,ut){if(w.quality=="default"||w.quality=="proof"){typeof nt=="number"&&(nt=ut);var Et=void 0,wt=void 0,Ot=nt.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:nt.position("x"),y:nt.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(nt.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:nt.position("x"),y:nt.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(G,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();n.exports=u}),657:((n,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(a){var c=a.cy,l=a.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],G=[],B=[],U=[],V=[],M=[],tt=[],o=[],E=void 0,p=1e8,m=1e-9,y=a.piTol,S=a.samplingType,O=a.nodeSeparation,F=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z<F;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},I=function(Y,Z,K){for(var q=[],at=0,gt=0,ot=0,rt=void 0,_=[],dt=0,At=1,pt=0;pt<E;pt++)_[pt]=p;for(q[gt]=Y,_[Y]=0;gt>=at;){ot=q[at++];for(var xt=w[ot],ft=0;ft<xt.length;ft++)rt=L.get(xt[ft]),_[rt]==p&&(_[rt]=_[ot]+1,q[++gt]=rt);M[ot][Z]=_[ot]*O}if(K){for(var st=0;st<E;st++)M[st][Z]<V[st]&&(V[st]=M[st][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)V[q]=p;for(var at=0;at<F;at++)U[at]=Z,Z=I(Z,at,Y)}else{W();for(var K=0;K<F;K++)I(U[K],K,Y)}for(var gt=0;gt<E;gt++)for(var ot=0;ot<F;ot++)M[gt][ot]*=M[gt][ot];for(var rt=0;rt<F;rt++)tt[rt]=[];for(var _=0;_<F;_++)for(var dt=0;dt<F;dt++)tt[_][dt]=M[U[dt]][_]},z=function(){for(var Y=g.svd(tt),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],gt=[],ot=0;ot<F;ot++){gt[ot]=[];for(var rt=0;rt<F;rt++)gt[ot][rt]=0,ot==rt&&(gt[ot][rt]=Z[ot]/(Z[ot]*Z[ot]+at/(Z[ot]*Z[ot])))}o=e.multMat(e.multMat(q,gt),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],gt=[],ot=0;ot<E;ot++)K[ot]=Math.random(),q[ot]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var rt=m,_=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,o)),Y=e.dotProduct(at,K),K=e.normalize(K),rt=e.dotProduct(at,K),dt=Math.abs(rt/_),dt<=1+y&&dt>=1)break;_=rt}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(_=m;;){for(var xt=0;xt<E;xt++)gt[xt]=q[xt];if(gt=e.minusOp(gt,e.multCons(at,e.dotProduct(at,gt))),q=e.multGamma(e.multL(e.multGamma(gt),M,o)),Z=e.dotProduct(gt,q),q=e.normalize(q),rt=e.dotProduct(gt,q),dt=Math.abs(rt/_),dt<=1+y&&dt>=1)break;_=rt}for(var ft=0;ft<E;ft++)gt[ft]=q[ft];G=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(gt,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),u.forEach(function(P){f.connectComponents(c,l,f.getTopMostNodes(P.descendants().intersection(l)),d)});for(var it=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),it++);var D=!0,H=!1,k=void 0;try{for(var et=d.keys()[Symbol.iterator](),lt;!(D=(lt=et.next()).done);D=!0){var J=lt.value;L.set(J,it++)}}catch(P){H=!0,k=P}finally{try{!D&&et.return&&et.return()}finally{if(H)throw k}}for(var It=0;It<L.size;It++)w[It]=[];u.forEach(function(P){for(var Y=P.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),b.set(P.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(P){var Y=void 0;P.isParent()?Y=L.get(b.get(P.id())):Y=L.get(P.id()),P.neighborhood().nodes().forEach(function(Z){l.intersection(P.edgesWith(Z)).length>0&&(Z.isParent()?w[Y].push(b.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=L.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[Z].push(K),w[L.get(K)].push(Y)})},vt=!0,nt=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(P){nt=!0,ut=P}finally{try{!vt&&Et.return&&Et.return()}finally{if(nt)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E<a.sampleSize?E:a.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<F;Rt++)o[Rt]=[];return a.quality=="draft"||a.step=="all"?(Q(S),z(),X(),mt={nodeIndexes:L,xCoords:G,yCoords:B}):(L.forEach(function(P,Y){G.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:L,xCoords:G,yCoords:B}),mt}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(G.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();G.push(Pt.x+Ft/2+Vt/2+a.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:L,xCoords:G,yCoords:B},mt}};n.exports={spectralLayout:t}}),579:((n,r,i)=>{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),n.exports=e}),140:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return R[n](i,i.exports,v),i.exports}var h=v(579);return h})()})})(he)),he.exports}var Ke=Je();const _e=j.getDefaultExportFromCjs(Ke);var Oe={L:"left",R:"right",T:"top",B:"bottom"},De={L:j.__name(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:j.__name(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:j.__name(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:j.__name(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},se={L:j.__name((x,A)=>x-A+2,"L"),R:j.__name((x,A)=>x-2,"R"),T:j.__name((x,A)=>x-A+2,"T"),B:j.__name((x,A)=>x-2,"B")},je=j.__name(function(x){return Wt(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),xe=j.__name(function(x){const A=x;return A==="L"||A==="R"||A==="T"||A==="B"},"isArchitectureDirection"),Wt=j.__name(function(x){const A=x;return A==="L"||A==="R"},"isArchitectureDirectionX"),qt=j.__name(function(x){const A=x;return A==="T"||A==="B"},"isArchitectureDirectionY"),me=j.__name(function(x,A){const C=Wt(x)&&qt(A),R=qt(x)&&Wt(A);return C||R},"isArchitectureDirectionXY"),tr=j.__name(function(x){const A=x[0],C=x[1],R=Wt(A)&&qt(C),N=qt(A)&&Wt(C);return R||N},"isArchitecturePairXY"),er=j.__name(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),pe=j.__name(function(x,A){const C=`${x}${A}`;return er(C)?C:void 0},"getArchitectureDirectionPair"),rr=j.__name(function([x,A],C){const R=C[0],N=C[1];return Wt(R)?qt(N)?[x+(R==="L"?-1:1),A+(N==="T"?1:-1)]:[x+(R==="L"?-1:1),A]:Wt(N)?[x+(N==="L"?1:-1),A+(R==="T"?1:-1)]:[x,A+(R==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ir=j.__name(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nr=j.__name(function(x,A){return me(x,A)?"bend":Wt(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ar=j.__name(function(x){return x.type==="service"},"isArchitectureService"),or=j.__name(function(x){return x.type==="junction"},"isArchitectureJunction"),Re=j.__name(x=>x.data(),"edgeData"),ie=j.__name(x=>x.data(),"nodeData"),sr=j.defaultConfig_default.architecture,ne,Se=(ne=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=j.setAccTitle,this.getAccTitle=j.getAccTitle,this.setDiagramTitle=j.setDiagramTitle,this.getDiagramTitle=j.getDiagramTitle,this.getAccDescription=j.getAccDescription,this.setAccDescription=j.setAccDescription,this.clear()}setDiagramId(A){this.diagramId=A}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",j.clear()}addService({id:A,icon:C,in:R,title:N,iconText:v}){if(this.registeredIds[A]!==void 0)throw new Error(`The service id [${A}] is already in use by another ${this.registeredIds[A]}`);if(R!==void 0){if(A===R)throw new Error(`The service [${A}] cannot be placed within itself`);if(this.registeredIds[R]===void 0)throw new Error(`The service [${A}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[R]==="node")throw new Error(`The service [${A}]'s parent is not a group`)}this.registeredIds[A]="node",this.nodes[A]={id:A,type:"service",icon:C,iconText:v,title:N,edges:[],in:R}}getServices(){return Object.values(this.nodes).filter(ar)}addJunction({id:A,in:C}){if(this.registeredIds[A]!==void 0)throw new Error(`The junction id [${A}] is already in use by another ${this.registeredIds[A]}`);if(C!==void 0){if(A===C)throw new Error(`The junction [${A}] cannot be placed within itself`);if(this.registeredIds[C]===void 0)throw new Error(`The junction [${A}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[C]==="node")throw new Error(`The junction [${A}]'s parent is not a group`)}this.registeredIds[A]="node",this.nodes[A]={id:A,type:"junction",edges:[],in:C}}getJunctions(){return Object.values(this.nodes).filter(or)}getNodes(){return Object.values(this.nodes)}getNode(A){return this.nodes[A]??null}addGroup({id:A,icon:C,in:R,title:N}){if(this.registeredIds?.[A]!==void 0)throw new Error(`The group id [${A}] is already in use by another ${this.registeredIds[A]}`);if(R!==void 0){if(A===R)throw new Error(`The group [${A}] cannot be placed within itself`);if(this.registeredIds?.[R]===void 0)throw new Error(`The group [${A}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[R]==="node")throw new Error(`The group [${A}]'s parent is not a group`)}this.registeredIds[A]="group",this.groups[A]={id:A,icon:C,title:N,in:R}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:A,rhsId:C,lhsDir:R,rhsDir:N,lhsInto:v,rhsInto:h,lhsGroup:n,rhsGroup:r,title:i}){if(!xe(R))throw new Error(`Invalid direction given for left hand side of edge ${A}--${C}. Expected (L,R,T,B) got ${String(R)}`);if(!xe(N))throw new Error(`Invalid direction given for right hand side of edge ${A}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The left-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[A].in,e=this.nodes[C].in;if(n&&f&&e&&f==e)throw new Error(`The left-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:A,lhsDir:R,lhsInto:v,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:h,rhsGroup:r,title:i};this.edges.push(g),this.nodes[A]&&this.nodes[C]&&(this.nodes[A].edges.push(this.edges[this.edges.length-1]),this.nodes[C].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(A){if(A.members.length<2)throw new Error(`An align directive requires at least two members; got ${A.members.length}`);const C=new Set;A.members.forEach(R=>{if(this.registeredIds[R]!=="node")throw new Error(`align ${A.direction} references [${R}], which is not a service or junction`);if(C.has(R))throw new Error(`align ${A.direction} lists [${R}] more than once`);C.add(R)}),this.layoutHints.push(A)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const A={},C=Object.entries(this.nodes).reduce((r,[i,f])=>(r[i]=f.edges.reduce((e,g)=>{const t=this.getNode(g.lhsId)?.in,s=this.getNode(g.rhsId)?.in;if(t&&s&&t!==s){const a=nr(g.lhsDir,g.rhsDir);a!=="bend"&&(A[t]??={},A[t][s]=a,A[s]??={},A[s][t]=a)}if(g.lhsId===i){const a=pe(g.lhsDir,g.rhsDir);a&&(e[a]=g.rhsId)}else{const a=pe(g.rhsDir,g.lhsDir);a&&(e[a]=g.lhsId)}return e},{}),r),{}),R=Object.keys(C)[0],N={[R]:1},v=Object.keys(C).reduce((r,i)=>i===R?r:{...r,[i]:1},{}),h=j.__name(r=>{const i={[r]:[0,0]},f=[r];for(;f.length>0;){const e=f.shift();if(e){N[e]=1,delete v[e];const g=C[e],[t,s]=i[e];Object.entries(g).forEach(([a,c])=>{N[c]||(i[c]=rr([t,s],a),f.push(c))})}}return i},"BFS"),n=[h(R)];for(;Object.keys(v).length>0;)n.push(h(Object.keys(v)[0]));this.dataStructures={adjList:C,spatialMaps:n,groupAlignments:A}}return this.dataStructures}setElementForId(A,C){this.elements[A]=C}getElementById(A){return this.elements[A]}getConfig(){return j.cleanAndMerge({...sr,...j.getConfig().architecture})}getConfigField(A){return this.getConfig()[A]}},j.__name(ne,"ArchitectureDB"),ne),hr=j.__name((x,A)=>{ze.populateCommonDb(x,A),x.groups.map(C=>A.addGroup(C)),x.services.map(C=>A.addService({...C,type:"service"})),x.junctions.map(C=>A.addJunction({...C,type:"junction"})),x.edges.map(C=>A.addEdge(C)),x.alignments?.map(C=>A.addLayoutHint({direction:C.direction,members:[...C.members]}))},"populateDb"),Fe={parser:{yy:void 0},parse:j.__name(async x=>{const A=await Be.parse("architecture",x);j.log.debug(A);const C=Fe.parser?.yy;if(!(C instanceof Se))throw new 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.");hr(A,C)},"parse")},lr=j.__name(x=>`
2
2
  .edge {
3
3
  stroke-width: ${x.archEdgeWidth};
4
4
  stroke: ${x.archEdgeColor};
@@ -34,4 +34,4 @@
34
34
  translate(${p*y.width/2}, ${m*y.height/2})
35
35
  rotate(${-1*p*m*45}, 0, ${E.height/2})
36
36
  `)}}}}}))},"drawEdges"),gr=j.__name(async function(x,A,C,R){const v=C.getConfigField("padding")*.75,h=C.getConfigField("fontSize"),r=C.getConfigField("iconSize")/2;await Promise.all(A.nodes().map(async i=>{const f=ie(i);if(f.type==="group"){const{h:e,w:g,x1:t,y1:s}=i.boundingBox(),a=x.append("rect");a.attr("id",`${R}-group-${f.id}`).attr("x",t+r).attr("y",s+r).attr("width",g).attr("height",e).attr("class","node-bkg");const c=x.append("g");let l=t,T=s;if(f.icon){const u=c.append("g");u.html(`<g>${await j.getIconSVG(f.icon,{height:v,width:v,fallbackPrefix:ae.prefix})}</g>`),u.attr("transform","translate("+(l+r+1)+", "+(T+r+1)+")"),l+=v,T+=h/2-1-2}if(f.label){const u=c.append("g");await j.createText(u,f.label,{useHtmlLabels:!1,width:g,classes:"architecture-service-label"},j.getConfig2()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),u.attr("transform","translate("+(l+r+4)+", "+(T+r+2)+")")}C.setElementForId(f.id,a)}}))},"drawGroups"),ur=j.__name(async function(x,A,C,R){const N=j.getConfig2();for(const v of C){const h=A.append("g"),n=x.getConfigField("iconSize");if(v.title){const e=h.append("g");await j.createText(e,v.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},N),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}const r=h.append("g");if(v.icon)r.html(`<g>${await j.getIconSVG(v.icon,{height:n,width:n,fallbackPrefix:ae.prefix})}</g>`);else if(v.iconText){r.html(`<g>${await j.getIconSVG("blank",{height:n,width:n,fallbackPrefix:ae.prefix})}</g>`);const t=r.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(j.sanitizeText(v.iconText,N)),s=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/s)};`)}else r.append("path").attr("class","node-bkg").attr("id",`${R}-node-${v.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);h.attr("id",`${R}-service-${v.id}`).attr("class","architecture-service");const{width:i,height:f}=h.node().getBBox();v.width=i,v.height=f,x.setElementForId(v.id,h)}return 0},"drawServices"),dr=j.__name(function(x,A,C,R){C.forEach(N=>{const v=A.append("g"),h=x.getConfigField("iconSize");v.append("g").append("rect").attr("id",`${R}-node-${N.id}`).attr("fill-opacity","0").attr("width",h).attr("height",h),v.attr("class","architecture-junction");const{width:r,height:i}=v._groups[0][0].getBBox();v.width=r,v.height=i,x.setElementForId(N.id,v)})},"drawJunctions");j.registerIconPacks([{name:ae.prefix,icons:ae}]);Ie.cytoscape.use(_e);function be(x,A,C){x.forEach(R=>{A.add({group:"nodes",data:{type:"service",id:R.id,icon:R.icon,label:R.title,parent:R.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-service"})})}j.__name(be,"addServices");function Pe(x,A,C){x.forEach(R=>{A.add({group:"nodes",data:{type:"junction",id:R.id,parent:R.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-junction"})})}j.__name(Pe,"addJunctions");function Ge(x,A){A.nodes().map(C=>{const R=ie(C);if(R.type==="group")return;R.x=C.position().x,R.y=C.position().y,x.getElementById(R.id).attr("transform","translate("+(R.x||0)+","+(R.y||0)+")")})}j.__name(Ge,"positionNodes");function Ue(x,A){x.forEach(C=>{A.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}j.__name(Ue,"addGroups");function Ye(x,A){x.forEach(C=>{const{lhsId:R,rhsId:N,lhsInto:v,lhsGroup:h,rhsInto:n,lhsDir:r,rhsDir:i,rhsGroup:f,title:e}=C,g=me(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${R}-${N}`,label:e,source:R,sourceDir:r,sourceArrow:v,sourceGroup:h,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:i,targetArrow:n,targetGroup:f,targetEndpoint:i==="L"?"0 50%":i==="R"?"100% 50%":i==="T"?"50% 0":"50% 100%"};A.add({group:"edges",data:t,classes:g})})}j.__name(Ye,"addEdges");function Xe(x,A,C,R=[]){const N=j.__name((g,t)=>Object.entries(g).reduce((s,[a,c])=>{let l=0;const T=Object.entries(c);if(T.length===1)return s[a]=T[0][1],s;for(let u=0;u<T.length-1;u++)for(let d=u+1;d<T.length;d++){const[L,b]=T[u],[w,G]=T[d];if(C[L]?.[w]===t)s[a]??=[],s[a]=[...s[a],...b,...G];else if(L==="default"||w==="default")s[a]??=[],s[a]=[...s[a],...b,...G];else{const U=`${a}-${l++}`;s[U]=b;const V=`${a}-${l++}`;s[V]=G}}return s},{}),"flattenAlignments"),v=A.map(g=>{const t={},s={};return Object.entries(g).forEach(([a,[c,l]])=>{const T=x.getNode(a)?.in??"default";t[l]??={},t[l][T]??=[],t[l][T].push(a),s[c]??={},s[c][T]??=[],s[c][T].push(a)}),{horiz:Object.values(N(t,"horizontal")).filter(a=>a.length>1),vert:Object.values(N(s,"vertical")).filter(a=>a.length>1)}}),[h,n]=v.reduce(([g,t],{horiz:s,vert:a})=>[[...g,...s],[...t,...a]],[[],[]]),r=new Set;R.forEach(g=>g.members.forEach(t=>r.add(t)));const i=j.__name(g=>g.filter(t=>!t.some(s=>r.has(s))),"dropOverlapping"),f=i(h),e=i(n);return R.forEach(g=>{g.members.length<2||(g.direction==="row"?f.push([...g.members]):e.push([...g.members]))}),{horizontal:f,vertical:e}}j.__name(Xe,"getAlignments");function He(x,A,C=[]){const R=[],N=A.getConfigField("iconSize"),v=A.getConfigField("idealEdgeLengthMultiplier"),h=v*N,n=new Set;C.forEach(f=>{for(let e=0;e<f.members.length-1;e++){const g=f.members[e],t=f.members[e+1];n.add(`${g}|${t}`),n.add(`${t}|${g}`),f.direction==="row"?R.push({left:g,right:t,gap:h}):R.push({top:g,bottom:t,gap:h})}});const r=j.__name(f=>`${f[0]},${f[1]}`,"posToStr"),i=j.__name(f=>f.split(",").map(e=>parseInt(e)),"strToPos");return x.forEach(f=>{const e=Object.fromEntries(Object.entries(f).map(([a,c])=>[r(c),a])),g=[r([0,0])],t={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;g.length>0;){const a=g.shift();if(a){t[a]=1;const c=e[a];if(c){const l=i(a);Object.entries(s).forEach(([T,u])=>{const d=r([l[0]+u[0],l[1]+u[1]]),L=e[d];if(L&&!t[d]){if(g.push(d),n.has(`${c}|${L}`))return;R.push({[Oe[T]]:L,[Oe[je(T)]]:c,gap:v*N})}})}}}}),R}j.__name(He,"getRelativeConstraints");function We(x,A,C,R,N,{spatialMaps:v,groupAlignments:h}){return new Promise(n=>{const r=j.select("body").append("div").attr("id","cy").attr("style","display:none"),i=Ie.cytoscape({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});r.remove(),Ue(C,i),be(x,i,N),Pe(A,i,N),Ye(R,i);const f=N.getLayoutHints(),e=Xe(N,v,h,f),g=He(v,N,f),t=N.getConfigField("iconSize"),s=N.getConfigField("idealEdgeLengthMultiplier")*t,a=.5*t,c=N.getConfigField("edgeElasticity"),l=N.getConfigField("seed"),T=i.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(u){const[d,L]=u.connectedNodes(),{parent:b}=ie(d),{parent:w}=ie(L);return b===w?s:a},edgeElasticity(u){const[d,L]=u.connectedNodes(),{parent:b}=ie(d),{parent:w}=ie(L);return b===w?c:.001},alignmentConstraint:e,relativePlacementConstraint:g});T.one("layoutstop",()=>{function u(d,L,b,w){let G,B;const{x:U,y:V}=d,{x:M,y:tt}=L;B=(w-V+(U-b)*(V-tt)/(U-M))/Math.sqrt(1+Math.pow((V-tt)/(U-M),2)),G=Math.sqrt(Math.pow(w-V,2)+Math.pow(b-U,2)-Math.pow(B,2));const o=Math.sqrt(Math.pow(M-U,2)+Math.pow(tt-V,2));G=G/o;let E=(M-U)*(w-V)-(tt-V)*(b-U);switch(!0){case E>=0:E=1;break;case E<0:E=-1;break}let p=(M-U)*(b-U)+(tt-V)*(w-V);switch(!0){case p>=0:p=1;break;case p<0:p=-1;break}return B=Math.abs(B)*E,G=G*p,{distances:B,weights:G}}j.__name(u,"getSegmentWeights"),i.startBatch();for(const d of Object.values(i.edges()))if(d.data?.()){const{x:L,y:b}=d.source().position(),{x:w,y:G}=d.target().position();if(L!==w&&b!==G){const B=d.sourceEndpoint(),U=d.targetEndpoint(),{sourceDir:V}=Re(d),[M,tt]=qt(V)?[B.x,U.y]:[U.x,B.y],{weights:o,distances:E}=u(B,U,M,tt);d.style("segment-distances",E),d.style("segment-weights",o)}}i.endBatch(),ye(l,()=>T.run())});try{ye(l,()=>T.run())}catch(u){throw u instanceof RangeError&&u.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):u}i.ready(u=>{j.log.info("Ready",u),n(i)})})}j.__name(We,"layoutArchitecture");var vr=j.__name(async(x,A,C,R)=>{const N=R.db;N.setDiagramId(A);const v=N.getServices(),h=N.getJunctions(),n=N.getGroups(),r=N.getEdges(),i=N.getDataStructures(),f=j.selectSvgElement(A),e=f.append("g");e.attr("class","architecture-edges");const g=f.append("g");g.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await ur(N,g,v,A),dr(N,g,h,A);const s=await We(v,h,n,r,N,i);await cr(e,s,N,A),await gr(t,s,N,A),Ge(N,s),j.setupGraphViewbox(void 0,f,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),pr={draw:vr},yr={parser:Fe,get db(){return new Se},renderer:pr,styles:fr};exports.diagram=yr;
37
- //# sourceMappingURL=architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs.map
37
+ //# sourceMappingURL=architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs.map