@spteck/react-controls-v2 2.3.91 → 2.4.1

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 (319) hide show
  1. package/dist/LocalizationProvider-BbfcY9z3.cjs +2 -0
  2. package/dist/{LocalizationProvider-te5iu_6z.js → LocalizationProvider-CvSHuk0e.js} +46 -46
  3. package/dist/{ar-Blifx2MN.js → ar-BPzd6WER.js} +1 -1
  4. package/dist/ar-CBSdRr5Q.cjs +2 -0
  5. package/dist/az-DoZjCfF0.cjs +2 -0
  6. package/dist/{az-CMhDjtnj.js → az-MWX-WDgc.js} +1 -1
  7. package/dist/{bg-C96WirSv.js → bg-CvRGS4sF.js} +1 -1
  8. package/dist/bg-DI8UD_HF.cjs +2 -0
  9. package/dist/bs-DQhZlEEo.cjs +2 -0
  10. package/dist/{bs-_St1wBE_.js → bs-aXQgChJT.js} +1 -1
  11. package/dist/{ca-QlLcV4wf.js → ca-BCXCXzgh.js} +1 -1
  12. package/dist/ca-DSC32tOX.cjs +2 -0
  13. package/dist/components/dropDownField/IOption.d.ts +2 -0
  14. package/dist/components/iconButton/IconButtonProps.d.ts +2 -0
  15. package/dist/cs-B0C33FJt.cjs +2 -0
  16. package/dist/{cs-MrS2bH7F.js → cs-VHWnqXwJ.js} +1 -1
  17. package/dist/cy-BNabORao.cjs +2 -0
  18. package/dist/{cy-BX97Tgwk.js → cy-qF-aNCW-.js} +1 -1
  19. package/dist/da-BmgXTEXm.cjs +2 -0
  20. package/dist/{da-BnewPPrh.js → da-rR5TnSBw.js} +1 -1
  21. package/dist/de-B4w38-0d.cjs +2 -0
  22. package/dist/{de-BSZuzGTL.js → de-DbeDjRNp.js} +1 -1
  23. package/dist/el-Cgk6VsxL.cjs +2 -0
  24. package/dist/{el-DrOk3N7-.js → el-DDeD6FiX.js} +1 -1
  25. package/dist/es-3ugMIZuA.cjs +2 -0
  26. package/dist/{es-CGqzubZ2.js → es-dvKffn6Q.js} +1 -1
  27. package/dist/et-CIIzxbat.cjs +2 -0
  28. package/dist/{et-DGqkocuq.js → et-DgZFBtK7.js} +1 -1
  29. package/dist/eu-BUNUOJ7E.cjs +2 -0
  30. package/dist/{eu-DEo7fdTW.js → eu-C6r1_PRy.js} +1 -1
  31. package/dist/{fi-DxErwnd5.js → fi-CzOKgmjK.js} +1 -1
  32. package/dist/fi-q6BFPHtt.cjs +2 -0
  33. package/dist/fr-BEnCZ733.cjs +2 -0
  34. package/dist/{fr-zrtSZX0o.js → fr-D0cDkdbn.js} +1 -1
  35. package/dist/{ga-CbHxGc9_.js → ga-0A7ndSzw.js} +1 -1
  36. package/dist/ga-BXyKTnJr.cjs +2 -0
  37. package/dist/{gl--w0P3RY4.js → gl-BNwj4XAu.js} +1 -1
  38. package/dist/gl-DR1C-hSi.cjs +2 -0
  39. package/dist/{he-DY19lzWp.js → he-BPiZ6D5h.js} +1 -1
  40. package/dist/he-OD1Ex2Fw.cjs +2 -0
  41. package/dist/{hi-CFSsoO_8.js → hi-CSgtp9Yg.js} +1 -1
  42. package/dist/hi-Dt9FvBmh.cjs +2 -0
  43. package/dist/{hr-DIRJ1Z8e.js → hr-CDSSj52Q.js} +1 -1
  44. package/dist/hr-DMzwNhar.cjs +2 -0
  45. package/dist/hu-Bc-rChfV.cjs +2 -0
  46. package/dist/{hu-DqYPRWZh.js → hu-TDJYiDOB.js} +1 -1
  47. package/dist/{id-Dgj7SUCi.js → id-B3IF5pnh.js} +1 -1
  48. package/dist/id-CwndN9HH.cjs +2 -0
  49. package/dist/index.cjs +105 -114
  50. package/dist/index.js +6162 -18503
  51. package/dist/{it-QdChHqVN.js → it-BLET318M.js} +1 -1
  52. package/dist/it-DaYS5Vil.cjs +2 -0
  53. package/dist/ja-BYA2LXHy.cjs +2 -0
  54. package/dist/{ja-BNS0BbY-.js → ja-NxwXLaKV.js} +1 -1
  55. package/dist/{kk-Dhkax68h.js → kk-CceJcjtl.js} +1 -1
  56. package/dist/kk-Ctrvuqlz.cjs +2 -0
  57. package/dist/{ko-heRMHZWp.js → ko-cS_OE967.js} +1 -1
  58. package/dist/ko-evIcpTG8.cjs +2 -0
  59. package/dist/lt-CYTLGgh6.cjs +2 -0
  60. package/dist/{lt-Decqbo8S.js → lt-CZ-kk_5b.js} +1 -1
  61. package/dist/{lv-wZASv0Lw.js → lv-BTvPpEjc.js} +1 -1
  62. package/dist/lv-COjitD3w.cjs +2 -0
  63. package/dist/mk-B-LF5gVL.cjs +2 -0
  64. package/dist/{mk-BTsLGTJT.js → mk-CSSyI3El.js} +1 -1
  65. package/dist/ms-CzEvkib0.cjs +2 -0
  66. package/dist/{ms-C0cVNwky.js → ms-Dz5JnKJ1.js} +1 -1
  67. package/dist/nb-B1KWSX94.cjs +2 -0
  68. package/dist/{nb-DGX4q4tS.js → nb-DkgTg1et.js} +1 -1
  69. package/dist/{nl-CnXZa8tZ.js → nl-CQ5eoxw2.js} +1 -1
  70. package/dist/nl-knWqo2aX.cjs +2 -0
  71. package/dist/{pl-DbIdTNpg.js → pl-BQJfOizT.js} +1 -1
  72. package/dist/pl-Ce6dq53t.cjs +2 -0
  73. package/dist/providers.cjs +1 -1
  74. package/dist/providers.js +1 -1
  75. package/dist/pt-BVqTnGkF.cjs +2 -0
  76. package/dist/{pt-CcKYweQk.js → pt-b0p7DoD0.js} +1 -1
  77. package/dist/ro-DqJMfhmX.cjs +2 -0
  78. package/dist/{ro-C-8tiqgA.js → ro-sbBtUVJV.js} +1 -1
  79. package/dist/ru-Dm2NAQyK.cjs +2 -0
  80. package/dist/{ru-Dhnz96q2.js → ru-ofzbka6D.js} +1 -1
  81. package/dist/sk-BNe6CHG-.cjs +2 -0
  82. package/dist/{sk-BU-Z5EsC.js → sk-BtpdNCPC.js} +1 -1
  83. package/dist/{sl-CcfjJFxo.js → sl-B4GsKLu6.js} +1 -1
  84. package/dist/sl-BKmEUGyu.cjs +2 -0
  85. package/dist/{sr-S53unrLA.js → sr-C76YVpkQ.js} +1 -1
  86. package/dist/sr-Dwya5lwF.cjs +2 -0
  87. package/dist/sv-BGL2G9Vm.cjs +2 -0
  88. package/dist/{sv-BiJrVfZr.js → sv-PesX57cX.js} +1 -1
  89. package/dist/{th-vQ7LQ7nD.js → th-CbCNOBnR.js} +1 -1
  90. package/dist/th-DEv6shFI.cjs +2 -0
  91. package/dist/{tr-C5RrNGLz.js → tr-B0TPxXKS.js} +1 -1
  92. package/dist/tr-BB-QonGE.cjs +2 -0
  93. package/dist/uk-B-3fLKpR.cjs +2 -0
  94. package/dist/{uk-WGCFH0fY.js → uk-_9cNoBNe.js} +1 -1
  95. package/dist/{vi-Waa7HkXq.js → vi-B8SfqLW6.js} +1 -1
  96. package/dist/vi-Dx6pJ0ir.cjs +2 -0
  97. package/dist/zh-DD0ml2HG.cjs +2 -0
  98. package/dist/{zh-BmUS7Wn_.js → zh-DqHnbp6B.js} +1 -1
  99. package/package.json +6 -3
  100. package/dist/LocalizationProvider-B6NxHbu2.cjs +0 -2
  101. package/dist/_arrayEach-BuSFKyFt.js +0 -54
  102. package/dist/_arrayEach-ChR-TejB.cjs +0 -2
  103. package/dist/_getTag-BRuLtYrv.js +0 -28
  104. package/dist/_getTag-D6VVyrEu.cjs +0 -2
  105. package/dist/ar-ip3bGOX3.cjs +0 -2
  106. package/dist/arc-4yb49ncY.js +0 -82
  107. package/dist/arc-djsA8IT0.cjs +0 -2
  108. package/dist/architecture-PBZL5I3N-CvTfVLFi.js +0 -3
  109. package/dist/architecture-PBZL5I3N-wZIE3ggH.cjs +0 -1
  110. package/dist/architectureDiagram-2XIMDMQ5-DFEvJNx1.cjs +0 -37
  111. package/dist/architectureDiagram-2XIMDMQ5-g-HotzpG.js +0 -4047
  112. package/dist/array-BNB_vRFv.cjs +0 -2
  113. package/dist/array-DP0duYiO.js +0 -8
  114. package/dist/az-CyVLdUDz.cjs +0 -2
  115. package/dist/bg-Bexoz3hL.cjs +0 -2
  116. package/dist/blockDiagram-WCTKOSBZ-DWgb5Ghz.js +0 -3165
  117. package/dist/blockDiagram-WCTKOSBZ-Dl04FBAy.cjs +0 -133
  118. package/dist/bs-MMcvhwLv.cjs +0 -2
  119. package/dist/c4Diagram-IC4MRINW-ClZvialQ.js +0 -2966
  120. package/dist/c4Diagram-IC4MRINW-ZFE2cGZP.cjs +0 -11
  121. package/dist/ca-BspMSeHN.cjs +0 -2
  122. package/dist/channel-2Bqnb1FY.js +0 -7
  123. package/dist/channel-5_aP1EVB.cjs +0 -2
  124. package/dist/chunk-4BX2VUAB-B5Va_oZz.js +0 -10
  125. package/dist/chunk-4BX2VUAB-BWDW-gYk.cjs +0 -2
  126. package/dist/chunk-55IACEB6-4ind_ByS.cjs +0 -2
  127. package/dist/chunk-55IACEB6-Pcyz_aR_.js +0 -10
  128. package/dist/chunk-7E7YKBS2-Sw9_w4gt.cjs +0 -2
  129. package/dist/chunk-7E7YKBS2-VHdgsed6.js +0 -25
  130. package/dist/chunk-7R4GIKGN-BKoqTTU_.cjs +0 -81
  131. package/dist/chunk-7R4GIKGN-CaQJ0QBF.js +0 -2598
  132. package/dist/chunk-C72U2L5F-CCvi6jiy.cjs +0 -2
  133. package/dist/chunk-C72U2L5F-MjJQTOMh.js +0 -25
  134. package/dist/chunk-D-IZpNpi.cjs +0 -1
  135. package/dist/chunk-EGIJ26TM-Bffl84Wq.cjs +0 -2
  136. package/dist/chunk-EGIJ26TM-DLMAfvpZ.js +0 -25
  137. package/dist/chunk-FMBD7UC4-BvqqU04Z.cjs +0 -16
  138. package/dist/chunk-FMBD7UC4-xjRtkFXe.js +0 -7
  139. package/dist/chunk-GEFDOKGD-BNgT40Ex.js +0 -1302
  140. package/dist/chunk-GEFDOKGD-BOwd6Jqp.cjs +0 -3
  141. package/dist/chunk-GLR3WWYH-DdNAJNRC.cjs +0 -2
  142. package/dist/chunk-GLR3WWYH-kyo6BUtq.js +0 -43
  143. package/dist/chunk-HHEYEP7N-DO1AYIZw.js +0 -11
  144. package/dist/chunk-HHEYEP7N-pdmgQZzP.cjs +0 -2
  145. package/dist/chunk-JSJVCQXG-Ci0seBb4.cjs +0 -2
  146. package/dist/chunk-JSJVCQXG-DowfYWcD.js +0 -62
  147. package/dist/chunk-KX2RTZJC-BJeOHReu.cjs +0 -2
  148. package/dist/chunk-KX2RTZJC-D-bUTSNy.js +0 -27
  149. package/dist/chunk-KYZI473N-DEPuSXaW.js +0 -3436
  150. package/dist/chunk-KYZI473N-DzBMFOER.cjs +0 -54
  151. package/dist/chunk-L3YUKLVL-BDGCTzmy.js +0 -25
  152. package/dist/chunk-L3YUKLVL-BZ17sqh5.cjs +0 -2
  153. package/dist/chunk-MX3YWQON-CAsnAj2e.js +0 -82
  154. package/dist/chunk-MX3YWQON-DulrBJdn.cjs +0 -2
  155. package/dist/chunk-NBPlniwU.js +0 -23
  156. package/dist/chunk-NQ4KR5QH-BJBAT2kM.cjs +0 -221
  157. package/dist/chunk-NQ4KR5QH-DFem-ORD.js +0 -2004
  158. package/dist/chunk-O4XLMI2P-BQF7MAo7.cjs +0 -8
  159. package/dist/chunk-O4XLMI2P-DA4TPzPG.js +0 -513
  160. package/dist/chunk-OZEHJAEY-CAiiXJUP.cjs +0 -2
  161. package/dist/chunk-OZEHJAEY-D7SX2SbR.js +0 -66
  162. package/dist/chunk-PQ6SQG4A-BZnW4-Sd.cjs +0 -2
  163. package/dist/chunk-PQ6SQG4A-ObFGkauo.js +0 -69
  164. package/dist/chunk-PU5JKC2W-BM5NPS-q.js +0 -1887
  165. package/dist/chunk-PU5JKC2W-eRU8wnTH.cjs +0 -71
  166. package/dist/chunk-QZHKN3VN-Dhli_tM0.cjs +0 -2
  167. package/dist/chunk-QZHKN3VN-x258g6EH.js +0 -17
  168. package/dist/chunk-R5LLSJPH-CNTEucEd.cjs +0 -2
  169. package/dist/chunk-R5LLSJPH-Gt27ml2m.js +0 -37
  170. package/dist/chunk-WL4C6EOR-CQXw6d0l.cjs +0 -190
  171. package/dist/chunk-WL4C6EOR-DuM6QmqM.js +0 -3196
  172. package/dist/chunk-XIRO2GV7-CswC9CO8.cjs +0 -2
  173. package/dist/chunk-XIRO2GV7-DXlO8X82.js +0 -32
  174. package/dist/chunk-XPW4576I-Bpsr4SZJ.js +0 -1148
  175. package/dist/chunk-XPW4576I-C68T-WIW.cjs +0 -33
  176. package/dist/chunk-XZSTWKYB-DJv9rEVU.cjs +0 -95
  177. package/dist/chunk-XZSTWKYB-jD9M1izK.js +0 -16132
  178. package/dist/chunk-YBOYWFTD-B6CeuteH.js +0 -34
  179. package/dist/chunk-YBOYWFTD-CiLW6HW_.cjs +0 -2
  180. package/dist/classDiagram-VBA2DB6C-Us0kuDfz.cjs +0 -2
  181. package/dist/classDiagram-VBA2DB6C-VOsE3gN0.js +0 -31
  182. package/dist/classDiagram-v2-RAHNMMFH-BWsm3ea6.cjs +0 -2
  183. package/dist/classDiagram-v2-RAHNMMFH-DPqMNfOz.js +0 -31
  184. package/dist/cose-bilkent-S5V4N54A-CKhwzobJ.js +0 -2252
  185. package/dist/cose-bilkent-S5V4N54A-DmyaRQ6l.cjs +0 -2
  186. package/dist/cs-FZSeHYld.cjs +0 -2
  187. package/dist/cy-CzQmM2lQ.cjs +0 -2
  188. package/dist/cytoscape.esm-CcJAI0wG.cjs +0 -322
  189. package/dist/cytoscape.esm-D9EjU25_.js +0 -18102
  190. package/dist/da-CexFt-Oj.cjs +0 -2
  191. package/dist/dagre-CpEPaL3r.cjs +0 -2
  192. package/dist/dagre-Dd8wCGc6.js +0 -1305
  193. package/dist/dagre-KLK3FWXG-BpxkjvB3.js +0 -294
  194. package/dist/dagre-KLK3FWXG-DIznPQl_.cjs +0 -5
  195. package/dist/de-B68HwuYu.cjs +0 -2
  196. package/dist/defaultLocale-CYOzCjwh.js +0 -203
  197. package/dist/defaultLocale-DSgylVA1.cjs +0 -2
  198. package/dist/diagram-E7M64L7V-dXqTi77U.cjs +0 -25
  199. package/dist/diagram-E7M64L7V-oX07GVAD.js +0 -529
  200. package/dist/diagram-IFDJBPK2-CriVAAmI.cjs +0 -44
  201. package/dist/diagram-IFDJBPK2-lCNF06_S.js +0 -215
  202. package/dist/diagram-P4PSJMXO-TfwVJh4S.js +0 -135
  203. package/dist/diagram-P4PSJMXO-k7F0lH6Q.cjs +0 -25
  204. package/dist/dist-CV9Ez7cn.js +0 -52
  205. package/dist/dist-DVthN7lF.cjs +0 -2
  206. package/dist/el-DQc4jSMd.cjs +0 -2
  207. package/dist/erDiagram-INFDFZHY-CDt3mOSU.cjs +0 -71
  208. package/dist/erDiagram-INFDFZHY-Ds_R2Ds4.js +0 -1668
  209. package/dist/es-DI8Y4Bv1.cjs +0 -2
  210. package/dist/et-DfaryKvp.cjs +0 -2
  211. package/dist/eu-BVOSXciF.cjs +0 -2
  212. package/dist/fi-C5L-OzaI.cjs +0 -2
  213. package/dist/flowDiagram-PKNHOUZH-7XJG07fo.cjs +0 -163
  214. package/dist/flowDiagram-PKNHOUZH-CkeYebJ5.js +0 -4163
  215. package/dist/fr-yFvjqx8B.cjs +0 -2
  216. package/dist/ga-6mVQhlWi.cjs +0 -2
  217. package/dist/ganttDiagram-A5KZAMGK-Bbck1pyM.cjs +0 -293
  218. package/dist/ganttDiagram-A5KZAMGK-CFT3Xn_r.js +0 -3074
  219. package/dist/gitGraph-HDMCJU4V-BKE04oIl.js +0 -3
  220. package/dist/gitGraph-HDMCJU4V-C9GYfOYb.cjs +0 -1
  221. package/dist/gitGraphDiagram-K3NZZRJ6-CXz9SHBX.js +0 -627
  222. package/dist/gitGraphDiagram-K3NZZRJ6-Dt4D-ig1.cjs +0 -66
  223. package/dist/gl-BJzJe1sq.cjs +0 -2
  224. package/dist/graphlib-CPo7oIsu.js +0 -223
  225. package/dist/graphlib-CmUS4Qin.cjs +0 -2
  226. package/dist/he-B3Bw3qr0.cjs +0 -2
  227. package/dist/hi-kofL-mD8.cjs +0 -2
  228. package/dist/hr-CDxqA9Jm.cjs +0 -2
  229. package/dist/hu-Defen_75.cjs +0 -2
  230. package/dist/id-DcwMRgmX.cjs +0 -2
  231. package/dist/identity-6JlhFhuM.cjs +0 -2
  232. package/dist/identity-C1jKsMoW.js +0 -395
  233. package/dist/info-3K5VOQVL-DfN_3mKd.js +0 -3
  234. package/dist/info-3K5VOQVL-d6J9FY0_.cjs +0 -1
  235. package/dist/infoDiagram-LFFYTUFH-Bp9btqnA.cjs +0 -3
  236. package/dist/infoDiagram-LFFYTUFH-DnvgRFnx.js +0 -21
  237. package/dist/init-BAFZAp9S.cjs +0 -2
  238. package/dist/init-m0TwgR4W.js +0 -17
  239. package/dist/isEmpty-BTp1uKIj.cjs +0 -2
  240. package/dist/isEmpty-uXVYZZYe.js +0 -17
  241. package/dist/ishikawaDiagram-PHBUUO56-DLaOkz38.js +0 -719
  242. package/dist/ishikawaDiagram-PHBUUO56-DmqObwMZ.cjs +0 -71
  243. package/dist/it-D5nM6KCi.cjs +0 -2
  244. package/dist/ja-BtuHirv7.cjs +0 -2
  245. package/dist/journeyDiagram-4ABVD52K-Cv0DbLMi.cjs +0 -140
  246. package/dist/journeyDiagram-4ABVD52K-DYmmcNK4.js +0 -885
  247. package/dist/kanban-definition-K7BYSVSG-BdQLAMeB.cjs +0 -90
  248. package/dist/kanban-definition-K7BYSVSG-CLEYqSz5.js +0 -973
  249. package/dist/katex-B-Nju2J8.js +0 -22002
  250. package/dist/katex-WY67Rp7A.cjs +0 -266
  251. package/dist/kk-BSl8IqgQ.cjs +0 -2
  252. package/dist/ko-eplb1GD0.cjs +0 -2
  253. package/dist/line-CbEBKCYr.js +0 -36
  254. package/dist/line-DqSdvtRR.cjs +0 -2
  255. package/dist/linear-DvLDpS6A.cjs +0 -2
  256. package/dist/linear-Eb79THx6.js +0 -291
  257. package/dist/lt-DsYAWFbF.cjs +0 -2
  258. package/dist/lv-DHmTjCb8.cjs +0 -2
  259. package/dist/maplibre-gl-qSrG75fp.js +0 -33003
  260. package/dist/maplibre-gl-tm_pVdmb.cjs +0 -757
  261. package/dist/math-DR9t6ixc.cjs +0 -2
  262. package/dist/math-DyURnvXC.js +0 -12
  263. package/dist/mermaid-parser.core-BdTB9qx-.js +0 -61
  264. package/dist/mermaid-parser.core-BlzF5RRD.cjs +0 -4
  265. package/dist/mindmap-definition-YRQLILUH-CzcVgr-U.js +0 -966
  266. package/dist/mindmap-definition-YRQLILUH-zWN_YXC3.cjs +0 -69
  267. package/dist/mk-CCV_308U.cjs +0 -2
  268. package/dist/ms-CH83xVYN.cjs +0 -2
  269. package/dist/nb-DZ-DlwcL.cjs +0 -2
  270. package/dist/nl-Xdf-A19i.cjs +0 -2
  271. package/dist/ordinal-BAWGEQkf.js +0 -67
  272. package/dist/ordinal-CL2X4e2C.cjs +0 -2
  273. package/dist/packet-RMMSAZCW-Bek1stRX.cjs +0 -1
  274. package/dist/packet-RMMSAZCW-DUN6t9lN.js +0 -3
  275. package/dist/path-Bt6guLtL.cjs +0 -2
  276. package/dist/path-DSzKK8fH.js +0 -87
  277. package/dist/pie-UPGHQEXC-DjqNO54R.js +0 -3
  278. package/dist/pie-UPGHQEXC-pJq6_YgE.cjs +0 -1
  279. package/dist/pieDiagram-SKSYHLDU-Ba-c0fRA.cjs +0 -31
  280. package/dist/pieDiagram-SKSYHLDU-ya07MTY-.js +0 -167
  281. package/dist/pl-BStql1S-.cjs +0 -2
  282. package/dist/pt-Dk4jELuZ.cjs +0 -2
  283. package/dist/quadrantDiagram-337W2JSQ-CQQEVC49.cjs +0 -8
  284. package/dist/quadrantDiagram-337W2JSQ-Dp_QyIEO.js +0 -1976
  285. package/dist/radar-KQ55EAFF-Bid2hXXI.cjs +0 -1
  286. package/dist/radar-KQ55EAFF-C6zhEkCz.js +0 -3
  287. package/dist/requirementDiagram-Z7DCOOCP-CRl2914V.js +0 -2203
  288. package/dist/requirementDiagram-Z7DCOOCP-CeMYhXEm.cjs +0 -74
  289. package/dist/ro-BvhMyTKh.cjs +0 -2
  290. package/dist/rough.esm-BjJ_weyP.cjs +0 -2
  291. package/dist/rough.esm-DBHP55VQ.js +0 -1354
  292. package/dist/ru-BQosng8l.cjs +0 -2
  293. package/dist/sankeyDiagram-WA2Y5GQK-BFrF47Iv.js +0 -922
  294. package/dist/sankeyDiagram-WA2Y5GQK-DDfjtQ4G.cjs +0 -11
  295. package/dist/sequenceDiagram-2WXFIKYE-B-zWyr9f.cjs +0 -146
  296. package/dist/sequenceDiagram-2WXFIKYE-BAd8OVlz.js +0 -4111
  297. package/dist/sk-BhA7UeAk.cjs +0 -2
  298. package/dist/sl-6Mczv4jG.cjs +0 -2
  299. package/dist/sr-CxObZdu0.cjs +0 -2
  300. package/dist/src-DFxq-N5I.cjs +0 -2
  301. package/dist/src-Dm6r9c7l.js +0 -2148
  302. package/dist/stateDiagram-RAJIS63D-C-tfqeC-.js +0 -219
  303. package/dist/stateDiagram-RAJIS63D-C1Aj8vJQ.cjs +0 -2
  304. package/dist/stateDiagram-v2-FVOUBMTO-C-w53gXL.js +0 -29
  305. package/dist/stateDiagram-v2-FVOUBMTO-VoIE_KVn.cjs +0 -2
  306. package/dist/sv-BfiunVuX.cjs +0 -2
  307. package/dist/th-BqLGltZi.cjs +0 -2
  308. package/dist/timeline-definition-YZTLITO2-CE1y2S_r.js +0 -832
  309. package/dist/timeline-definition-YZTLITO2-D8aFfnYE.cjs +0 -62
  310. package/dist/tr-Brwl4o_Z.cjs +0 -2
  311. package/dist/treemap-KZPCXAKY-D2v0uStP.cjs +0 -1
  312. package/dist/treemap-KZPCXAKY-DLE_f1Bk.js +0 -3
  313. package/dist/uk-CV49TRvS.cjs +0 -2
  314. package/dist/vennDiagram-LZ73GAT5-BSpVMORX.js +0 -1860
  315. package/dist/vennDiagram-LZ73GAT5-DvnB0e7u.cjs +0 -35
  316. package/dist/vi-JzM7bjn_.cjs +0 -2
  317. package/dist/xychartDiagram-JWTSCODW-0qbVGrDs.cjs +0 -8
  318. package/dist/xychartDiagram-JWTSCODW-DpIry-th.js +0 -2043
  319. package/dist/zh-DEm0SGzZ.cjs +0 -2
@@ -1,2252 +0,0 @@
1
- import { s as e, t } from "./chunk-NBPlniwU.js";
2
- import { g as n, h as r, p as i } from "./src-Dm6r9c7l.js";
3
- import { t as a } from "./cytoscape.esm-D9EjU25_.js";
4
- //#region node_modules/layout-base/layout-base.js
5
- var o = /* @__PURE__ */ t(((e, t) => {
6
- (function(n, r) {
7
- typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
8
- })(e, function() {
9
- return (function(e) {
10
- var t = {};
11
- function n(r) {
12
- if (t[r]) return t[r].exports;
13
- var i = t[r] = {
14
- i: r,
15
- l: !1,
16
- exports: {}
17
- };
18
- return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
19
- }
20
- return n.m = e, n.c = t, n.i = function(e) {
21
- return e;
22
- }, n.d = function(e, t, r) {
23
- n.o(e, t) || Object.defineProperty(e, t, {
24
- configurable: !1,
25
- enumerable: !0,
26
- get: r
27
- });
28
- }, n.n = function(e) {
29
- var t = e && e.__esModule ? function() {
30
- return e.default;
31
- } : function() {
32
- return e;
33
- };
34
- return n.d(t, "a", t), t;
35
- }, n.o = function(e, t) {
36
- return Object.prototype.hasOwnProperty.call(e, t);
37
- }, n.p = "", n(n.s = 26);
38
- })([
39
- (function(e, t, n) {
40
- function r() {}
41
- r.QUALITY = 1, r.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, r.DEFAULT_INCREMENTAL = !1, r.DEFAULT_ANIMATION_ON_LAYOUT = !0, r.DEFAULT_ANIMATION_DURING_LAYOUT = !1, r.DEFAULT_ANIMATION_PERIOD = 50, r.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, r.DEFAULT_GRAPH_MARGIN = 15, r.NODE_DIMENSIONS_INCLUDE_LABELS = !1, r.SIMPLE_NODE_SIZE = 40, r.SIMPLE_NODE_HALF_SIZE = r.SIMPLE_NODE_SIZE / 2, r.EMPTY_COMPOUND_NODE_SIZE = 40, r.MIN_EDGE_LENGTH = 1, r.WORLD_BOUNDARY = 1e6, r.INITIAL_WORLD_BOUNDARY = r.WORLD_BOUNDARY / 1e3, r.WORLD_CENTER_X = 1200, r.WORLD_CENTER_Y = 900, e.exports = r;
42
- }),
43
- (function(e, t, n) {
44
- var r = n(2), i = n(8), a = n(9);
45
- function o(e, t, n) {
46
- r.call(this, n), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = n, this.bendpoints = [], this.source = e, this.target = t;
47
- }
48
- for (var s in o.prototype = Object.create(r.prototype), r) o[s] = r[s];
49
- o.prototype.getSource = function() {
50
- return this.source;
51
- }, o.prototype.getTarget = function() {
52
- return this.target;
53
- }, o.prototype.isInterGraph = function() {
54
- return this.isInterGraph;
55
- }, o.prototype.getLength = function() {
56
- return this.length;
57
- }, o.prototype.isOverlapingSourceAndTarget = function() {
58
- return this.isOverlapingSourceAndTarget;
59
- }, o.prototype.getBendpoints = function() {
60
- return this.bendpoints;
61
- }, o.prototype.getLca = function() {
62
- return this.lca;
63
- }, o.prototype.getSourceInLca = function() {
64
- return this.sourceInLca;
65
- }, o.prototype.getTargetInLca = function() {
66
- return this.targetInLca;
67
- }, o.prototype.getOtherEnd = function(e) {
68
- if (this.source === e) return this.target;
69
- if (this.target === e) return this.source;
70
- throw "Node is not incident with this edge";
71
- }, o.prototype.getOtherEndInGraph = function(e, t) {
72
- for (var n = this.getOtherEnd(e), r = t.getGraphManager().getRoot();;) {
73
- if (n.getOwner() == t) return n;
74
- if (n.getOwner() == r) break;
75
- n = n.getOwner().getParent();
76
- }
77
- return null;
78
- }, o.prototype.updateLength = function() {
79
- var e = [
80
- ,
81
- ,
82
- ,
83
- ,
84
- ];
85
- this.isOverlapingSourceAndTarget = i.getIntersection(this.target.getRect(), this.source.getRect(), e), this.isOverlapingSourceAndTarget || (this.lengthX = e[0] - e[2], this.lengthY = e[1] - e[3], Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
86
- }, o.prototype.updateLengthSimple = function() {
87
- this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
88
- }, e.exports = o;
89
- }),
90
- (function(e, t, n) {
91
- function r(e) {
92
- this.vGraphObject = e;
93
- }
94
- e.exports = r;
95
- }),
96
- (function(e, t, n) {
97
- var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(4);
98
- function l(e, t, n, o) {
99
- n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
100
- }
101
- for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
102
- l.prototype.getEdges = function() {
103
- return this.edges;
104
- }, l.prototype.getChild = function() {
105
- return this.child;
106
- }, l.prototype.getOwner = function() {
107
- return this.owner;
108
- }, l.prototype.getWidth = function() {
109
- return this.rect.width;
110
- }, l.prototype.setWidth = function(e) {
111
- this.rect.width = e;
112
- }, l.prototype.getHeight = function() {
113
- return this.rect.height;
114
- }, l.prototype.setHeight = function(e) {
115
- this.rect.height = e;
116
- }, l.prototype.getCenterX = function() {
117
- return this.rect.x + this.rect.width / 2;
118
- }, l.prototype.getCenterY = function() {
119
- return this.rect.y + this.rect.height / 2;
120
- }, l.prototype.getCenter = function() {
121
- return new c(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
122
- }, l.prototype.getLocation = function() {
123
- return new c(this.rect.x, this.rect.y);
124
- }, l.prototype.getRect = function() {
125
- return this.rect;
126
- }, l.prototype.getDiagonal = function() {
127
- return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
128
- }, l.prototype.getHalfTheDiagonal = function() {
129
- return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
130
- }, l.prototype.setRect = function(e, t) {
131
- this.rect.x = e.x, this.rect.y = e.y, this.rect.width = t.width, this.rect.height = t.height;
132
- }, l.prototype.setCenter = function(e, t) {
133
- this.rect.x = e - this.rect.width / 2, this.rect.y = t - this.rect.height / 2;
134
- }, l.prototype.setLocation = function(e, t) {
135
- this.rect.x = e, this.rect.y = t;
136
- }, l.prototype.moveBy = function(e, t) {
137
- this.rect.x += e, this.rect.y += t;
138
- }, l.prototype.getEdgeListToNode = function(e) {
139
- var t = [], n = this;
140
- return n.edges.forEach(function(r) {
141
- if (r.target == e) {
142
- if (r.source != n) throw "Incorrect edge source!";
143
- t.push(r);
144
- }
145
- }), t;
146
- }, l.prototype.getEdgesBetween = function(e) {
147
- var t = [], n = this;
148
- return n.edges.forEach(function(r) {
149
- if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
150
- (r.target == e || r.source == e) && t.push(r);
151
- }), t;
152
- }, l.prototype.getNeighborsList = function() {
153
- var e = /* @__PURE__ */ new Set(), t = this;
154
- return t.edges.forEach(function(n) {
155
- if (n.source == t) e.add(n.target);
156
- else {
157
- if (n.target != t) throw "Incorrect incidency!";
158
- e.add(n.source);
159
- }
160
- }), e;
161
- }, l.prototype.withChildren = function() {
162
- var e = /* @__PURE__ */ new Set(), t, n;
163
- if (e.add(this), this.child != null) for (var r = this.child.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.withChildren(), n.forEach(function(t) {
164
- e.add(t);
165
- });
166
- return e;
167
- }, l.prototype.getNoOfChildren = function() {
168
- var e = 0, t;
169
- if (this.child == null) e = 1;
170
- else for (var n = this.child.getNodes(), r = 0; r < n.length; r++) t = n[r], e += t.getNoOfChildren();
171
- return e == 0 && (e = 1), e;
172
- }, l.prototype.getEstimatedSize = function() {
173
- if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
174
- return this.estimatedSize;
175
- }, l.prototype.calcEstimatedSize = function() {
176
- 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);
177
- }, l.prototype.scatter = function() {
178
- var e, t, n = -o.INITIAL_WORLD_BOUNDARY, r = o.INITIAL_WORLD_BOUNDARY;
179
- e = o.WORLD_CENTER_X + s.nextDouble() * (r - n) + n;
180
- var i = -o.INITIAL_WORLD_BOUNDARY, a = o.INITIAL_WORLD_BOUNDARY;
181
- t = o.WORLD_CENTER_Y + s.nextDouble() * (a - i) + i, this.rect.x = e, this.rect.y = t;
182
- }, l.prototype.updateBounds = function() {
183
- if (this.getChild() == null) throw "assert failed";
184
- if (this.getChild().getNodes().length != 0) {
185
- var e = this.getChild();
186
- if (e.updateBounds(!0), this.rect.x = e.getLeft(), this.rect.y = e.getTop(), this.setWidth(e.getRight() - e.getLeft()), this.setHeight(e.getBottom() - e.getTop()), o.NODE_DIMENSIONS_INCLUDE_LABELS) {
187
- var t = e.getRight() - e.getLeft(), n = e.getBottom() - e.getTop();
188
- this.labelWidth > t && (this.rect.x -= (this.labelWidth - t) / 2, this.setWidth(this.labelWidth)), this.labelHeight > n && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - n) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - n), this.setHeight(this.labelHeight));
189
- }
190
- }
191
- }, l.prototype.getInclusionTreeDepth = function() {
192
- if (this.inclusionTreeDepth == i.MAX_VALUE) throw "assert failed";
193
- return this.inclusionTreeDepth;
194
- }, l.prototype.transform = function(e) {
195
- var t = this.rect.x;
196
- t > o.WORLD_BOUNDARY ? t = o.WORLD_BOUNDARY : t < -o.WORLD_BOUNDARY && (t = -o.WORLD_BOUNDARY);
197
- var n = this.rect.y;
198
- n > o.WORLD_BOUNDARY ? n = o.WORLD_BOUNDARY : n < -o.WORLD_BOUNDARY && (n = -o.WORLD_BOUNDARY);
199
- var r = new c(t, n), i = e.inverseTransformPoint(r);
200
- this.setLocation(i.x, i.y);
201
- }, l.prototype.getLeft = function() {
202
- return this.rect.x;
203
- }, l.prototype.getRight = function() {
204
- return this.rect.x + this.rect.width;
205
- }, l.prototype.getTop = function() {
206
- return this.rect.y;
207
- }, l.prototype.getBottom = function() {
208
- return this.rect.y + this.rect.height;
209
- }, l.prototype.getParent = function() {
210
- return this.owner == null ? null : this.owner.getParent();
211
- }, e.exports = l;
212
- }),
213
- (function(e, t, n) {
214
- function r(e, t) {
215
- e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
216
- }
217
- r.prototype.getX = function() {
218
- return this.x;
219
- }, r.prototype.getY = function() {
220
- return this.y;
221
- }, r.prototype.setX = function(e) {
222
- this.x = e;
223
- }, r.prototype.setY = function(e) {
224
- this.y = e;
225
- }, r.prototype.getDifference = function(e) {
226
- return new DimensionD(this.x - e.x, this.y - e.y);
227
- }, r.prototype.getCopy = function() {
228
- return new r(this.x, this.y);
229
- }, r.prototype.translate = function(e) {
230
- return this.x += e.width, this.y += e.height, this;
231
- }, e.exports = r;
232
- }),
233
- (function(e, t, n) {
234
- var r = n(2), i = n(10), a = n(0), o = n(6), s = n(3), c = n(1), l = n(13), u = n(12), d = n(11);
235
- function f(e, t, n) {
236
- r.call(this, n), this.estimatedSize = i.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = e, t != null && t instanceof o ? this.graphManager = t : t != null && t instanceof Layout && (this.graphManager = t.graphManager);
237
- }
238
- for (var p in f.prototype = Object.create(r.prototype), r) f[p] = r[p];
239
- f.prototype.getNodes = function() {
240
- return this.nodes;
241
- }, f.prototype.getEdges = function() {
242
- return this.edges;
243
- }, f.prototype.getGraphManager = function() {
244
- return this.graphManager;
245
- }, f.prototype.getParent = function() {
246
- return this.parent;
247
- }, f.prototype.getLeft = function() {
248
- return this.left;
249
- }, f.prototype.getRight = function() {
250
- return this.right;
251
- }, f.prototype.getTop = function() {
252
- return this.top;
253
- }, f.prototype.getBottom = function() {
254
- return this.bottom;
255
- }, f.prototype.isConnected = function() {
256
- return this.isConnected;
257
- }, f.prototype.add = function(e, t, n) {
258
- if (t == null && n == null) {
259
- var r = e;
260
- if (this.graphManager == null) throw "Graph has no graph mgr!";
261
- if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
262
- return r.owner = this, this.getNodes().push(r), r;
263
- } else {
264
- var i = e;
265
- if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
266
- if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
267
- return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
268
- }
269
- }, f.prototype.remove = function(e) {
270
- var t = e;
271
- if (e instanceof s) {
272
- if (t == null) throw "Node is null!";
273
- if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
274
- if (this.graphManager == null) throw "Owner graph manager is invalid!";
275
- for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
276
- var o = this.nodes.indexOf(t);
277
- if (o == -1) throw "Node not in owner node list!";
278
- this.nodes.splice(o, 1);
279
- } else if (e instanceof c) {
280
- var r = e;
281
- if (r == null) throw "Edge is null!";
282
- if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
283
- if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
284
- var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
285
- if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
286
- r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
287
- var o = r.source.owner.getEdges().indexOf(r);
288
- if (o == -1) throw "Not in owner's edge list!";
289
- r.source.owner.getEdges().splice(o, 1);
290
- }
291
- }, f.prototype.updateLeftTop = function() {
292
- for (var e = i.MAX_VALUE, t = i.MAX_VALUE, n, r, a, o = this.getNodes(), s = o.length, c = 0; c < s; c++) {
293
- var l = o[c];
294
- n = l.getTop(), r = l.getLeft(), e > n && (e = n), t > r && (t = r);
295
- }
296
- return e == i.MAX_VALUE ? null : (a = o[0].getParent().paddingLeft == null ? this.margin : o[0].getParent().paddingLeft, this.left = t - a, this.top = e - a, new u(this.left, this.top));
297
- }, f.prototype.updateBounds = function(e) {
298
- for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d, f = this.nodes, p = f.length, m = 0; m < p; m++) {
299
- var h = f[m];
300
- e && h.child != null && h.updateBounds(), o = h.getLeft(), s = h.getRight(), c = h.getTop(), u = h.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
301
- }
302
- var g = new l(t, r, n - t, a - r);
303
- t == i.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), d = f[0].getParent().paddingLeft == null ? this.margin : f[0].getParent().paddingLeft, this.left = g.x - d, this.right = g.x + g.width + d, this.top = g.y - d, this.bottom = g.y + g.height + d;
304
- }, f.calculateBounds = function(e) {
305
- for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d = e.length, f = 0; f < d; f++) {
306
- var p = e[f];
307
- o = p.getLeft(), s = p.getRight(), c = p.getTop(), u = p.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
308
- }
309
- return new l(t, r, n - t, a - r);
310
- }, f.prototype.getInclusionTreeDepth = function() {
311
- return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
312
- }, f.prototype.getEstimatedSize = function() {
313
- if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
314
- return this.estimatedSize;
315
- }, f.prototype.calcEstimatedSize = function() {
316
- for (var e = 0, t = this.nodes, n = t.length, r = 0; r < n; r++) {
317
- var i = t[r];
318
- e += i.calcEstimatedSize();
319
- }
320
- return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
321
- }, f.prototype.updateConnected = function() {
322
- var e = this;
323
- if (this.nodes.length == 0) {
324
- this.isConnected = !0;
325
- return;
326
- }
327
- var t = new d(), n = /* @__PURE__ */ new Set(), r = this.nodes[0], i, a;
328
- for (r.withChildren().forEach(function(e) {
329
- t.push(e), n.add(e);
330
- }); t.length !== 0;) {
331
- r = t.shift(), i = r.getEdges();
332
- for (var o = i.length, s = 0; s < o; s++) a = i[s].getOtherEndInGraph(r, this), a != null && !n.has(a) && a.withChildren().forEach(function(e) {
333
- t.push(e), n.add(e);
334
- });
335
- }
336
- if (this.isConnected = !1, n.size >= this.nodes.length) {
337
- var c = 0;
338
- n.forEach(function(t) {
339
- t.owner == e && c++;
340
- }), c == this.nodes.length && (this.isConnected = !0);
341
- }
342
- }, e.exports = f;
343
- }),
344
- (function(e, t, n) {
345
- var r, i = n(1);
346
- function a(e) {
347
- r = n(5), this.layout = e, this.graphs = [], this.edges = [];
348
- }
349
- a.prototype.addRoot = function() {
350
- var e = this.layout.newGraph(), t = this.layout.newNode(null), n = this.add(e, t);
351
- return this.setRootGraph(n), this.rootGraph;
352
- }, a.prototype.add = function(e, t, n, r, i) {
353
- if (n == null && r == null && i == null) {
354
- if (e == null) throw "Graph is null!";
355
- if (t == null) throw "Parent node is null!";
356
- if (this.graphs.indexOf(e) > -1) throw "Graph already in this graph mgr!";
357
- if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
358
- if (t.child != null) throw "Already has a child!";
359
- return e.parent = t, t.child = e, e;
360
- } else {
361
- i = n, r = t, n = e;
362
- var a = r.getOwner(), o = i.getOwner();
363
- if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
364
- if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
365
- if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
366
- if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
367
- if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
368
- if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
369
- return n.source.edges.push(n), n.target.edges.push(n), n;
370
- }
371
- }, a.prototype.remove = function(e) {
372
- if (e instanceof r) {
373
- var t = e;
374
- if (t.getGraphManager() != this) throw "Graph not in this graph mgr";
375
- if (!(t == this.rootGraph || t.parent != null && t.parent.graphManager == this)) throw "Invalid parent node!";
376
- var n = [];
377
- n = n.concat(t.getEdges());
378
- for (var a, o = n.length, s = 0; s < o; s++) a = n[s], t.remove(a);
379
- var c = [];
380
- c = c.concat(t.getNodes());
381
- var l;
382
- o = c.length;
383
- for (var s = 0; s < o; s++) l = c[s], t.remove(l);
384
- t == this.rootGraph && this.setRootGraph(null);
385
- var u = this.graphs.indexOf(t);
386
- this.graphs.splice(u, 1), t.parent = null;
387
- } else if (e instanceof i) {
388
- if (a = e, a == null) throw "Edge is null!";
389
- if (!a.isInterGraph) throw "Not an inter-graph edge!";
390
- if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
391
- if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
392
- var u = a.source.edges.indexOf(a);
393
- if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
394
- if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
395
- var u = a.source.owner.getGraphManager().edges.indexOf(a);
396
- a.source.owner.getGraphManager().edges.splice(u, 1);
397
- }
398
- }, a.prototype.updateBounds = function() {
399
- this.rootGraph.updateBounds(!0);
400
- }, a.prototype.getGraphs = function() {
401
- return this.graphs;
402
- }, a.prototype.getAllNodes = function() {
403
- if (this.allNodes == null) {
404
- for (var e = [], t = this.getGraphs(), n = t.length, r = 0; r < n; r++) e = e.concat(t[r].getNodes());
405
- this.allNodes = e;
406
- }
407
- return this.allNodes;
408
- }, a.prototype.resetAllNodes = function() {
409
- this.allNodes = null;
410
- }, a.prototype.resetAllEdges = function() {
411
- this.allEdges = null;
412
- }, a.prototype.resetAllNodesToApplyGravitation = function() {
413
- this.allNodesToApplyGravitation = null;
414
- }, a.prototype.getAllEdges = function() {
415
- if (this.allEdges == null) {
416
- var e = [], t = this.getGraphs();
417
- t.length;
418
- for (var n = 0; n < t.length; n++) e = e.concat(t[n].getEdges());
419
- e = e.concat(this.edges), this.allEdges = e;
420
- }
421
- return this.allEdges;
422
- }, a.prototype.getAllNodesToApplyGravitation = function() {
423
- return this.allNodesToApplyGravitation;
424
- }, a.prototype.setAllNodesToApplyGravitation = function(e) {
425
- if (this.allNodesToApplyGravitation != null) throw "assert failed";
426
- this.allNodesToApplyGravitation = e;
427
- }, a.prototype.getRoot = function() {
428
- return this.rootGraph;
429
- }, a.prototype.setRootGraph = function(e) {
430
- if (e.getGraphManager() != this) throw "Root not in this graph mgr!";
431
- this.rootGraph = e, e.parent ??= this.layout.newNode("Root node");
432
- }, a.prototype.getLayout = function() {
433
- return this.layout;
434
- }, a.prototype.isOneAncestorOfOther = function(e, t) {
435
- if (!(e != null && t != null)) throw "assert failed";
436
- if (e == t) return !0;
437
- var n = e.getOwner(), r;
438
- do {
439
- if (r = n.getParent(), r == null) break;
440
- if (r == t) return !0;
441
- if (n = r.getOwner(), n == null) break;
442
- } while (!0);
443
- n = t.getOwner();
444
- do {
445
- if (r = n.getParent(), r == null) break;
446
- if (r == e) return !0;
447
- if (n = r.getOwner(), n == null) break;
448
- } while (!0);
449
- return !1;
450
- }, a.prototype.calcLowestCommonAncestors = function() {
451
- for (var e, t, n, r, i, a = this.getAllEdges(), o = a.length, s = 0; s < o; s++) {
452
- if (e = a[s], t = e.source, n = e.target, e.lca = null, e.sourceInLca = t, e.targetInLca = n, t == n) {
453
- e.lca = t.getOwner();
454
- continue;
455
- }
456
- for (r = t.getOwner(); e.lca == null;) {
457
- for (e.targetInLca = n, i = n.getOwner(); e.lca == null;) {
458
- if (i == r) {
459
- e.lca = i;
460
- break;
461
- }
462
- if (i == this.rootGraph) break;
463
- if (e.lca != null) throw "assert failed";
464
- e.targetInLca = i.getParent(), i = e.targetInLca.getOwner();
465
- }
466
- if (r == this.rootGraph) break;
467
- e.lca ?? (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
468
- }
469
- if (e.lca == null) throw "assert failed";
470
- }
471
- }, a.prototype.calcLowestCommonAncestor = function(e, t) {
472
- if (e == t) return e.getOwner();
473
- var n = e.getOwner();
474
- do {
475
- if (n == null) break;
476
- var r = t.getOwner();
477
- do {
478
- if (r == null) break;
479
- if (r == n) return r;
480
- r = r.getParent().getOwner();
481
- } while (!0);
482
- n = n.getParent().getOwner();
483
- } while (!0);
484
- return n;
485
- }, a.prototype.calcInclusionTreeDepths = function(e, t) {
486
- e == null && t == null && (e = this.rootGraph, t = 1);
487
- for (var n, r = e.getNodes(), i = r.length, a = 0; a < i; a++) n = r[a], n.inclusionTreeDepth = t, n.child != null && this.calcInclusionTreeDepths(n.child, t + 1);
488
- }, a.prototype.includesInvalidEdge = function() {
489
- for (var e, t = this.edges.length, n = 0; n < t; n++) if (e = this.edges[n], this.isOneAncestorOfOther(e.source, e.target)) return !0;
490
- return !1;
491
- }, e.exports = a;
492
- }),
493
- (function(e, t, n) {
494
- var r = n(0);
495
- function i() {}
496
- for (var a in r) i[a] = r[a];
497
- i.MAX_ITERATIONS = 2500, i.DEFAULT_EDGE_LENGTH = 50, i.DEFAULT_SPRING_STRENGTH = .45, i.DEFAULT_REPULSION_STRENGTH = 4500, i.DEFAULT_GRAVITY_STRENGTH = .4, i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, i.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, i.DEFAULT_COOLING_FACTOR_INCREMENTAL = .3, i.COOLING_ADAPTATION_FACTOR = .33, i.ADAPTATION_LOWER_NODE_LIMIT = 1e3, i.ADAPTATION_UPPER_NODE_LIMIT = 5e3, i.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, i.MAX_NODE_DISPLACEMENT = i.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, i.MIN_REPULSION_DIST = i.DEFAULT_EDGE_LENGTH / 10, i.CONVERGENCE_CHECK_PERIOD = 100, i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = .1, i.MIN_EDGE_LENGTH = 1, i.GRID_CALCULATION_CHECK_PERIOD = 10, e.exports = i;
498
- }),
499
- (function(e, t, n) {
500
- var r = n(12);
501
- function i() {}
502
- i.calcSeparationAmount = function(e, t, n, r) {
503
- if (!e.intersects(t)) throw "assert failed";
504
- var i = [, ,];
505
- this.decideDirectionsForOverlappingNodes(e, t, i), n[0] = Math.min(e.getRight(), t.getRight()) - Math.max(e.x, t.x), n[1] = Math.min(e.getBottom(), t.getBottom()) - Math.max(e.y, t.y), e.getX() <= t.getX() && e.getRight() >= t.getRight() ? n[0] += Math.min(t.getX() - e.getX(), e.getRight() - t.getRight()) : t.getX() <= e.getX() && t.getRight() >= e.getRight() && (n[0] += Math.min(e.getX() - t.getX(), t.getRight() - e.getRight())), e.getY() <= t.getY() && e.getBottom() >= t.getBottom() ? n[1] += Math.min(t.getY() - e.getY(), e.getBottom() - t.getBottom()) : t.getY() <= e.getY() && t.getBottom() >= e.getBottom() && (n[1] += Math.min(e.getY() - t.getY(), t.getBottom() - e.getBottom()));
506
- var a = Math.abs((t.getCenterY() - e.getCenterY()) / (t.getCenterX() - e.getCenterX()));
507
- t.getCenterY() === e.getCenterY() && t.getCenterX() === e.getCenterX() && (a = 1);
508
- var o = a * n[0], s = n[1] / a;
509
- n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
510
- }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
511
- e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
512
- }, i.getIntersection2 = function(e, t, n) {
513
- var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
514
- if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
515
- var s = e.getX(), c = e.getY(), l = e.getRight(), u = e.getX(), d = e.getBottom(), f = e.getRight(), p = e.getWidthHalf(), m = e.getHeightHalf(), h = t.getX(), g = t.getY(), _ = t.getRight(), v = t.getX(), y = t.getBottom(), b = t.getRight(), x = t.getWidthHalf(), S = t.getHeightHalf(), C = !1, w = !1;
516
- if (r === a) {
517
- if (i > o) return n[0] = r, n[1] = c, n[2] = a, n[3] = y, !1;
518
- if (i < o) return n[0] = r, n[1] = d, n[2] = a, n[3] = g, !1;
519
- } else if (i === o) {
520
- if (r > a) return n[0] = s, n[1] = i, n[2] = _, n[3] = o, !1;
521
- if (r < a) return n[0] = l, n[1] = i, n[2] = h, n[3] = o, !1;
522
- } else {
523
- var T = e.height / e.width, E = t.height / t.width, D = (o - i) / (a - r), O = void 0, k = void 0, A = void 0, j = void 0, M = void 0, N = void 0;
524
- if (-T === D ? r > a ? (n[0] = u, n[1] = d, C = !0) : (n[0] = l, n[1] = c, C = !0) : T === D && (r > a ? (n[0] = s, n[1] = c, C = !0) : (n[0] = f, n[1] = d, C = !0)), -E === D ? a > r ? (n[2] = v, n[3] = y, w = !0) : (n[2] = _, n[3] = g, w = !0) : E === D && (a > r ? (n[2] = h, n[3] = g, w = !0) : (n[2] = b, n[3] = y, w = !0)), C && w) return !1;
525
- if (r > a ? i > o ? (O = this.getCardinalDirection(T, D, 4), k = this.getCardinalDirection(E, D, 2)) : (O = this.getCardinalDirection(-T, D, 3), k = this.getCardinalDirection(-E, D, 1)) : i > o ? (O = this.getCardinalDirection(-T, D, 1), k = this.getCardinalDirection(-E, D, 3)) : (O = this.getCardinalDirection(T, D, 2), k = this.getCardinalDirection(E, D, 4)), !C) switch (O) {
526
- case 1:
527
- j = c, A = r + -m / D, n[0] = A, n[1] = j;
528
- break;
529
- case 2:
530
- A = f, j = i + p * D, n[0] = A, n[1] = j;
531
- break;
532
- case 3:
533
- j = d, A = r + m / D, n[0] = A, n[1] = j;
534
- break;
535
- case 4:
536
- A = u, j = i + -p * D, n[0] = A, n[1] = j;
537
- break;
538
- }
539
- if (!w) switch (k) {
540
- case 1:
541
- N = g, M = a + -S / D, n[2] = M, n[3] = N;
542
- break;
543
- case 2:
544
- M = b, N = o + x * D, n[2] = M, n[3] = N;
545
- break;
546
- case 3:
547
- N = y, M = a + S / D, n[2] = M, n[3] = N;
548
- break;
549
- case 4:
550
- M = v, N = o + -x * D, n[2] = M, n[3] = N;
551
- break;
552
- }
553
- }
554
- return !1;
555
- }, i.getCardinalDirection = function(e, t, n) {
556
- return e > t ? n : 1 + n % 4;
557
- }, i.getIntersection = function(e, t, n, i) {
558
- if (i == null) return this.getIntersection2(e, t, n);
559
- var a = e.x, o = e.y, s = t.x, c = t.y, l = n.x, u = n.y, d = i.x, f = i.y, p = void 0, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0, y = void 0, b = void 0, x = void 0;
560
- return h = c - o, _ = a - s, y = s * o - a * c, g = f - u, v = l - d, b = d * u - l * f, x = h * v - g * _, x === 0 ? null : (p = (_ * b - v * y) / x, m = (g * y - h * b) / x, new r(p, m));
561
- }, i.angleOfVector = function(e, t, n, r) {
562
- var i = void 0;
563
- return e === n ? i = r < t ? this.ONE_AND_HALF_PI : this.HALF_PI : (i = Math.atan((r - t) / (n - e)), n < e ? i += Math.PI : r < t && (i += this.TWO_PI)), i;
564
- }, i.doIntersect = function(e, t, n, r) {
565
- var i = e.x, a = e.y, o = t.x, s = t.y, c = n.x, l = n.y, u = r.x, d = r.y, f = (o - i) * (d - l) - (u - c) * (s - a);
566
- if (f === 0) return !1;
567
- var p = ((d - l) * (u - i) + (c - u) * (d - a)) / f, m = ((a - s) * (u - i) + (o - i) * (d - a)) / f;
568
- return 0 < p && p < 1 && 0 < m && m < 1;
569
- }, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
570
- }),
571
- (function(e, t, n) {
572
- function r() {}
573
- r.sign = function(e) {
574
- return e > 0 ? 1 : e < 0 ? -1 : 0;
575
- }, r.floor = function(e) {
576
- return e < 0 ? Math.ceil(e) : Math.floor(e);
577
- }, r.ceil = function(e) {
578
- return e < 0 ? Math.floor(e) : Math.ceil(e);
579
- }, e.exports = r;
580
- }),
581
- (function(e, t, n) {
582
- function r() {}
583
- r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, e.exports = r;
584
- }),
585
- (function(e, t, n) {
586
- var r = function() {
587
- function e(e, t) {
588
- for (var n = 0; n < t.length; n++) {
589
- var r = t[n];
590
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
591
- }
592
- }
593
- return function(t, n, r) {
594
- return n && e(t.prototype, n), r && e(t, r), t;
595
- };
596
- }();
597
- function i(e, t) {
598
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
599
- }
600
- var a = function(e) {
601
- return {
602
- value: e,
603
- next: null,
604
- prev: null
605
- };
606
- }, o = function(e, t, n, r) {
607
- return e === null ? r.head = t : e.next = t, n === null ? r.tail = t : n.prev = t, t.prev = e, t.next = n, r.length++, t;
608
- }, s = function(e, t) {
609
- var n = e.prev, r = e.next;
610
- return n === null ? t.head = r : n.next = r, r === null ? t.tail = n : r.prev = n, e.prev = e.next = null, t.length--, e;
611
- };
612
- e.exports = function() {
613
- function e(t) {
614
- var n = this;
615
- i(this, e), this.length = 0, this.head = null, this.tail = null, t?.forEach(function(e) {
616
- return n.push(e);
617
- });
618
- }
619
- return r(e, [
620
- {
621
- key: "size",
622
- value: function() {
623
- return this.length;
624
- }
625
- },
626
- {
627
- key: "insertBefore",
628
- value: function(e, t) {
629
- return o(t.prev, a(e), t, this);
630
- }
631
- },
632
- {
633
- key: "insertAfter",
634
- value: function(e, t) {
635
- return o(t, a(e), t.next, this);
636
- }
637
- },
638
- {
639
- key: "insertNodeBefore",
640
- value: function(e, t) {
641
- return o(t.prev, e, t, this);
642
- }
643
- },
644
- {
645
- key: "insertNodeAfter",
646
- value: function(e, t) {
647
- return o(t, e, t.next, this);
648
- }
649
- },
650
- {
651
- key: "push",
652
- value: function(e) {
653
- return o(this.tail, a(e), null, this);
654
- }
655
- },
656
- {
657
- key: "unshift",
658
- value: function(e) {
659
- return o(null, a(e), this.head, this);
660
- }
661
- },
662
- {
663
- key: "remove",
664
- value: function(e) {
665
- return s(e, this);
666
- }
667
- },
668
- {
669
- key: "pop",
670
- value: function() {
671
- return s(this.tail, this).value;
672
- }
673
- },
674
- {
675
- key: "popNode",
676
- value: function() {
677
- return s(this.tail, this);
678
- }
679
- },
680
- {
681
- key: "shift",
682
- value: function() {
683
- return s(this.head, this).value;
684
- }
685
- },
686
- {
687
- key: "shiftNode",
688
- value: function() {
689
- return s(this.head, this);
690
- }
691
- },
692
- {
693
- key: "get_object_at",
694
- value: function(e) {
695
- if (e <= this.length()) {
696
- for (var t = 1, n = this.head; t < e;) n = n.next, t++;
697
- return n.value;
698
- }
699
- }
700
- },
701
- {
702
- key: "set_object_at",
703
- value: function(e, t) {
704
- if (e <= this.length()) {
705
- for (var n = 1, r = this.head; n < e;) r = r.next, n++;
706
- r.value = t;
707
- }
708
- }
709
- }
710
- ]), e;
711
- }();
712
- }),
713
- (function(e, t, n) {
714
- function r(e, t, n) {
715
- this.x = null, this.y = null, e == null && t == null && n == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && n == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && n == null && (n = e, this.x = n.x, this.y = n.y);
716
- }
717
- r.prototype.getX = function() {
718
- return this.x;
719
- }, r.prototype.getY = function() {
720
- return this.y;
721
- }, r.prototype.getLocation = function() {
722
- return new r(this.x, this.y);
723
- }, r.prototype.setLocation = function(e, t, n) {
724
- e.constructor.name == "Point" && t == null && n == null ? (n = e, this.setLocation(n.x, n.y)) : typeof e == "number" && typeof t == "number" && n == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + .5), this.y = Math.floor(t + .5)));
725
- }, r.prototype.move = function(e, t) {
726
- this.x = e, this.y = t;
727
- }, r.prototype.translate = function(e, t) {
728
- this.x += e, this.y += t;
729
- }, r.prototype.equals = function(e) {
730
- if (e.constructor.name == "Point") {
731
- var t = e;
732
- return this.x == t.x && this.y == t.y;
733
- }
734
- return this == e;
735
- }, r.prototype.toString = function() {
736
- return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
737
- }, e.exports = r;
738
- }),
739
- (function(e, t, n) {
740
- function r(e, t, n, r) {
741
- this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && n != null && r != null && (this.x = e, this.y = t, this.width = n, this.height = r);
742
- }
743
- r.prototype.getX = function() {
744
- return this.x;
745
- }, r.prototype.setX = function(e) {
746
- this.x = e;
747
- }, r.prototype.getY = function() {
748
- return this.y;
749
- }, r.prototype.setY = function(e) {
750
- this.y = e;
751
- }, r.prototype.getWidth = function() {
752
- return this.width;
753
- }, r.prototype.setWidth = function(e) {
754
- this.width = e;
755
- }, r.prototype.getHeight = function() {
756
- return this.height;
757
- }, r.prototype.setHeight = function(e) {
758
- this.height = e;
759
- }, r.prototype.getRight = function() {
760
- return this.x + this.width;
761
- }, r.prototype.getBottom = function() {
762
- return this.y + this.height;
763
- }, r.prototype.intersects = function(e) {
764
- return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
765
- }, r.prototype.getCenterX = function() {
766
- return this.x + this.width / 2;
767
- }, r.prototype.getMinX = function() {
768
- return this.getX();
769
- }, r.prototype.getMaxX = function() {
770
- return this.getX() + this.width;
771
- }, r.prototype.getCenterY = function() {
772
- return this.y + this.height / 2;
773
- }, r.prototype.getMinY = function() {
774
- return this.getY();
775
- }, r.prototype.getMaxY = function() {
776
- return this.getY() + this.height;
777
- }, r.prototype.getWidthHalf = function() {
778
- return this.width / 2;
779
- }, r.prototype.getHeightHalf = function() {
780
- return this.height / 2;
781
- }, e.exports = r;
782
- }),
783
- (function(e, t, n) {
784
- var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
785
- return typeof e;
786
- } : function(e) {
787
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
788
- };
789
- function i() {}
790
- i.lastID = 0, i.createID = function(e) {
791
- return i.isPrimitive(e) ? e : e.uniqueID == null ? (e.uniqueID = i.getString(), i.lastID++, e.uniqueID) : e.uniqueID;
792
- }, i.getString = function(e) {
793
- return e ??= i.lastID, "Object#" + e;
794
- }, i.isPrimitive = function(e) {
795
- var t = e === void 0 ? "undefined" : r(e);
796
- return e == null || t != "object" && t != "function";
797
- }, e.exports = i;
798
- }),
799
- (function(e, t, n) {
800
- function r(e) {
801
- if (Array.isArray(e)) {
802
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
803
- return n;
804
- } else return Array.from(e);
805
- }
806
- var i = n(0), a = n(6), o = n(3), s = n(1), c = n(5), l = n(4), u = n(17), d = n(27);
807
- function f(e) {
808
- d.call(this), this.layoutQuality = i.QUALITY, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = i.DEFAULT_INCREMENTAL, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, e != null && (this.isRemoteUse = e);
809
- }
810
- f.RANDOM_SEED = 1, f.prototype = Object.create(d.prototype), f.prototype.getGraphManager = function() {
811
- return this.graphManager;
812
- }, f.prototype.getAllNodes = function() {
813
- return this.graphManager.getAllNodes();
814
- }, f.prototype.getAllEdges = function() {
815
- return this.graphManager.getAllEdges();
816
- }, f.prototype.getAllNodesToApplyGravitation = function() {
817
- return this.graphManager.getAllNodesToApplyGravitation();
818
- }, f.prototype.newGraphManager = function() {
819
- var e = new a(this);
820
- return this.graphManager = e, e;
821
- }, f.prototype.newGraph = function(e) {
822
- return new c(null, this.graphManager, e);
823
- }, f.prototype.newNode = function(e) {
824
- return new o(this.graphManager, e);
825
- }, f.prototype.newEdge = function(e) {
826
- return new s(null, null, e);
827
- }, f.prototype.checkLayoutSuccess = function() {
828
- return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
829
- }, f.prototype.runLayout = function() {
830
- this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
831
- var e = this.checkLayoutSuccess() ? !1 : this.layout();
832
- return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
833
- }, f.prototype.doPostLayout = function() {
834
- this.incremental || this.transform(), this.update();
835
- }, f.prototype.update2 = function() {
836
- if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
837
- for (var e = this.graphManager.getAllEdges(), t = 0; t < e.length; t++) e[t];
838
- for (var n = this.graphManager.getRoot().getNodes(), t = 0; t < n.length; t++) n[t];
839
- this.update(this.graphManager.getRoot());
840
- }
841
- }, f.prototype.update = function(e) {
842
- if (e == null) this.update2();
843
- else if (e instanceof o) {
844
- var t = e;
845
- if (t.getChild() != null) for (var n = t.getChild().getNodes(), r = 0; r < n.length; r++) update(n[r]);
846
- t.vGraphObject != null && t.vGraphObject.update(t);
847
- } else if (e instanceof s) {
848
- var i = e;
849
- i.vGraphObject != null && i.vGraphObject.update(i);
850
- } else if (e instanceof c) {
851
- var a = e;
852
- a.vGraphObject != null && a.vGraphObject.update(a);
853
- }
854
- }, f.prototype.initParameters = function() {
855
- this.isSubLayout || (this.layoutQuality = i.QUALITY, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = i.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
856
- }, f.prototype.transform = function(e) {
857
- if (e == null) this.transform(new l(0, 0));
858
- else {
859
- var t = new u(), n = this.graphManager.getRoot().updateLeftTop();
860
- if (n != null) {
861
- t.setWorldOrgX(e.x), t.setWorldOrgY(e.y), t.setDeviceOrgX(n.x), t.setDeviceOrgY(n.y);
862
- for (var r = this.getAllNodes(), i, a = 0; a < r.length; a++) i = r[a], i.transform(t);
863
- }
864
- }
865
- }, f.prototype.positionNodesRandomly = function(e) {
866
- if (e == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
867
- else for (var t, n, r = e.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.getChild(), n == null || n.getNodes().length == 0 ? t.scatter() : (this.positionNodesRandomly(n), t.updateBounds());
868
- }, f.prototype.getFlatForest = function() {
869
- for (var e = [], t = !0, n = this.graphManager.getRoot().getNodes(), i = !0, a = 0; a < n.length; a++) n[a].getChild() != null && (i = !1);
870
- if (!i) return e;
871
- var o = /* @__PURE__ */ new Set(), s = [], c = /* @__PURE__ */ new Map(), l = [];
872
- for (l = l.concat(n); l.length > 0 && t;) {
873
- for (s.push(l[0]); s.length > 0 && t;) {
874
- var u = s[0];
875
- s.splice(0, 1), o.add(u);
876
- for (var d = u.getEdges(), a = 0; a < d.length; a++) {
877
- var f = d[a].getOtherEnd(u);
878
- if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
879
- else {
880
- t = !1;
881
- break;
882
- }
883
- }
884
- }
885
- if (!t) e = [];
886
- else {
887
- var p = [].concat(r(o));
888
- e.push(p);
889
- for (var a = 0; a < p.length; a++) {
890
- var m = p[a], h = l.indexOf(m);
891
- h > -1 && l.splice(h, 1);
892
- }
893
- o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
894
- }
895
- }
896
- return e;
897
- }, f.prototype.createDummyNodesForBendpoints = function(e) {
898
- for (var t = [], n = e.source, r = this.graphManager.calcLowestCommonAncestor(e.source, e.target), i = 0; i < e.bendpoints.length; i++) {
899
- var a = this.newNode(null);
900
- a.setRect(new Point(0, 0), new Dimension(1, 1)), r.add(a);
901
- var o = this.newEdge(null);
902
- this.graphManager.add(o, n, a), t.add(a), n = a;
903
- }
904
- var o = this.newEdge(null);
905
- return this.graphManager.add(o, n, e.target), this.edgeToDummyNodes.set(e, t), e.isInterGraph() ? this.graphManager.remove(e) : r.remove(e), t;
906
- }, f.prototype.createBendpointsFromDummyNodes = function() {
907
- var e = [];
908
- e = e.concat(this.graphManager.getAllEdges()), e = [].concat(r(this.edgeToDummyNodes.keys()), e);
909
- for (var t = 0; t < e.length; t++) {
910
- var n = e[t];
911
- if (n.bendpoints.length > 0) {
912
- for (var i = this.edgeToDummyNodes.get(n), a = 0; a < i.length; a++) {
913
- var o = i[a], s = new l(o.getCenterX(), o.getCenterY()), c = n.bendpoints.get(a);
914
- c.x = s.x, c.y = s.y, o.getOwner().remove(o);
915
- }
916
- this.graphManager.add(n, n.source, n.target);
917
- }
918
- }
919
- }, f.transform = function(e, t, n, r) {
920
- if (n != null && r != null) {
921
- var i = t;
922
- if (e <= 50) {
923
- var a = t / n;
924
- i -= (t - a) / 50 * (50 - e);
925
- } else {
926
- var o = t * r;
927
- i += (o - t) / 50 * (e - 50);
928
- }
929
- return i;
930
- } else {
931
- var s, c;
932
- return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
933
- }
934
- }, f.findCenterOfTree = function(e) {
935
- var t = [];
936
- t = t.concat(e);
937
- var n = [], r = /* @__PURE__ */ new Map(), i = !1, a = null;
938
- (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
939
- for (var o = 0; o < t.length; o++) {
940
- var s = t[o], c = s.getNeighborsList().size;
941
- r.set(s, s.getNeighborsList().size), c == 1 && n.push(s);
942
- }
943
- var l = [];
944
- for (l = l.concat(n); !i;) {
945
- var u = [];
946
- u = u.concat(l), l = [];
947
- for (var o = 0; o < t.length; o++) {
948
- var s = t[o], d = t.indexOf(s);
949
- d >= 0 && t.splice(d, 1), s.getNeighborsList().forEach(function(e) {
950
- if (n.indexOf(e) < 0) {
951
- var t = r.get(e) - 1;
952
- t == 1 && l.push(e), r.set(e, t);
953
- }
954
- });
955
- }
956
- n = n.concat(l), (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
957
- }
958
- return a;
959
- }, f.prototype.setGraphManager = function(e) {
960
- this.graphManager = e;
961
- }, e.exports = f;
962
- }),
963
- (function(e, t, n) {
964
- function r() {}
965
- r.seed = 1, r.x = 0, r.nextDouble = function() {
966
- return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
967
- }, e.exports = r;
968
- }),
969
- (function(e, t, n) {
970
- var r = n(4);
971
- function i(e, t) {
972
- this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
973
- }
974
- i.prototype.getWorldOrgX = function() {
975
- return this.lworldOrgX;
976
- }, i.prototype.setWorldOrgX = function(e) {
977
- this.lworldOrgX = e;
978
- }, i.prototype.getWorldOrgY = function() {
979
- return this.lworldOrgY;
980
- }, i.prototype.setWorldOrgY = function(e) {
981
- this.lworldOrgY = e;
982
- }, i.prototype.getWorldExtX = function() {
983
- return this.lworldExtX;
984
- }, i.prototype.setWorldExtX = function(e) {
985
- this.lworldExtX = e;
986
- }, i.prototype.getWorldExtY = function() {
987
- return this.lworldExtY;
988
- }, i.prototype.setWorldExtY = function(e) {
989
- this.lworldExtY = e;
990
- }, i.prototype.getDeviceOrgX = function() {
991
- return this.ldeviceOrgX;
992
- }, i.prototype.setDeviceOrgX = function(e) {
993
- this.ldeviceOrgX = e;
994
- }, i.prototype.getDeviceOrgY = function() {
995
- return this.ldeviceOrgY;
996
- }, i.prototype.setDeviceOrgY = function(e) {
997
- this.ldeviceOrgY = e;
998
- }, i.prototype.getDeviceExtX = function() {
999
- return this.ldeviceExtX;
1000
- }, i.prototype.setDeviceExtX = function(e) {
1001
- this.ldeviceExtX = e;
1002
- }, i.prototype.getDeviceExtY = function() {
1003
- return this.ldeviceExtY;
1004
- }, i.prototype.setDeviceExtY = function(e) {
1005
- this.ldeviceExtY = e;
1006
- }, i.prototype.transformX = function(e) {
1007
- var t = 0, n = this.lworldExtX;
1008
- return n != 0 && (t = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / n), t;
1009
- }, i.prototype.transformY = function(e) {
1010
- var t = 0, n = this.lworldExtY;
1011
- return n != 0 && (t = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / n), t;
1012
- }, i.prototype.inverseTransformX = function(e) {
1013
- var t = 0, n = this.ldeviceExtX;
1014
- return n != 0 && (t = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / n), t;
1015
- }, i.prototype.inverseTransformY = function(e) {
1016
- var t = 0, n = this.ldeviceExtY;
1017
- return n != 0 && (t = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / n), t;
1018
- }, i.prototype.inverseTransformPoint = function(e) {
1019
- return new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1020
- }, e.exports = i;
1021
- }),
1022
- (function(e, t, n) {
1023
- function r(e) {
1024
- if (Array.isArray(e)) {
1025
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1026
- return n;
1027
- } else return Array.from(e);
1028
- }
1029
- var i = n(15), a = n(7), o = n(0), s = n(8), c = n(9);
1030
- function l() {
1031
- i.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = a.DEFAULT_EDGE_LENGTH, this.springConstant = a.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = a.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
1032
- }
1033
- for (var u in l.prototype = Object.create(i.prototype), i) l[u] = i[u];
1034
- l.prototype.initParameters = function() {
1035
- i.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1036
- }, l.prototype.calcIdealEdgeLengths = function() {
1037
- for (var e, t, n, r, i, s, c = this.getGraphManager().getAllEdges(), l = 0; l < c.length; l++) e = c[l], e.idealLength = this.idealEdgeLength, e.isInterGraph && (n = e.getSource(), r = e.getTarget(), i = e.getSourceInLca().getEstimatedSize(), s = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += i + s - 2 * o.SIMPLE_NODE_SIZE), t = e.getLca().getInclusionTreeDepth(), e.idealLength += a.DEFAULT_EDGE_LENGTH * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (n.getInclusionTreeDepth() + r.getInclusionTreeDepth() - 2 * t));
1038
- }, l.prototype.initSpringEmbedder = function() {
1039
- var e = this.getAllNodes().length;
1040
- this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1041
- }, l.prototype.calcSpringForces = function() {
1042
- for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1043
- }, l.prototype.calcRepulsionForces = function() {
1044
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
1045
- if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
1046
- else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
1047
- }, l.prototype.calcGravitationalForces = function() {
1048
- for (var e, t = this.getAllNodesToApplyGravitation(), n = 0; n < t.length; n++) e = t[n], this.calcGravitationalForce(e);
1049
- }, l.prototype.moveNodes = function() {
1050
- for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.move();
1051
- }, l.prototype.calcSpringForce = function(e, t) {
1052
- var n = e.getSource(), r = e.getTarget(), i, a, o, s;
1053
- if (this.uniformLeafNodeSizes && n.getChild() == null && r.getChild() == null) e.updateLengthSimple();
1054
- else if (e.updateLength(), e.isOverlapingSourceAndTarget) return;
1055
- i = e.getLength(), i != 0 && (a = this.springConstant * (i - t), o = a * (e.lengthX / i), s = a * (e.lengthY / i), n.springForceX += o, n.springForceY += s, r.springForceX -= o, r.springForceY -= s);
1056
- }, l.prototype.calcRepulsionForce = function(e, t) {
1057
- var n = e.getRect(), r = t.getRect(), i = [, ,], o = [
1058
- ,
1059
- ,
1060
- ,
1061
- ,
1062
- ], l, u, d, f, p, m, h;
1063
- if (n.intersects(r)) {
1064
- s.calcSeparationAmount(n, r, i, a.DEFAULT_EDGE_LENGTH / 2), m = 2 * i[0], h = 2 * i[1];
1065
- var g = e.noOfChildren * t.noOfChildren / (e.noOfChildren + t.noOfChildren);
1066
- e.repulsionForceX -= g * m, e.repulsionForceY -= g * h, t.repulsionForceX += g * m, t.repulsionForceY += g * h;
1067
- } else this.uniformLeafNodeSizes && e.getChild() == null && t.getChild() == null ? (l = r.getCenterX() - n.getCenterX(), u = r.getCenterY() - n.getCenterY()) : (s.getIntersection(n, r, o), l = o[2] - o[0], u = o[3] - o[1]), Math.abs(l) < a.MIN_REPULSION_DIST && (l = c.sign(l) * a.MIN_REPULSION_DIST), Math.abs(u) < a.MIN_REPULSION_DIST && (u = c.sign(u) * a.MIN_REPULSION_DIST), d = l * l + u * u, f = Math.sqrt(d), p = this.repulsionConstant * e.noOfChildren * t.noOfChildren / d, m = p * l / f, h = p * u / f, e.repulsionForceX -= m, e.repulsionForceY -= h, t.repulsionForceX += m, t.repulsionForceY += h;
1068
- }, l.prototype.calcGravitationalForce = function(e) {
1069
- var t = e.getOwner(), n = (t.getRight() + t.getLeft()) / 2, r = (t.getTop() + t.getBottom()) / 2, i = e.getCenterX() - n, a = e.getCenterY() - r, o = Math.abs(i) + e.getWidth() / 2, s = Math.abs(a) + e.getHeight() / 2, c;
1070
- e.getOwner() == this.graphManager.getRoot() ? (c = t.getEstimatedSize() * this.gravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i, e.gravitationForceY = -this.gravityConstant * a)) : (c = t.getEstimatedSize() * this.compoundGravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i * this.compoundGravityConstant, e.gravitationForceY = -this.gravityConstant * a * this.compoundGravityConstant));
1071
- }, l.prototype.isConverged = function() {
1072
- var e, t = !1;
1073
- return this.totalIterations > this.maxIterations / 3 && (t = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), e = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, e || t;
1074
- }, l.prototype.animate = function() {
1075
- this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1076
- }, l.prototype.calcNoOfChildrenForAllNodes = function() {
1077
- for (var e, t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) e = t[n], e.noOfChildren = e.getNoOfChildren();
1078
- }, l.prototype.calcGrid = function(e) {
1079
- var t = 0, n = 0;
1080
- t = parseInt(Math.ceil((e.getRight() - e.getLeft()) / this.repulsionRange)), n = parseInt(Math.ceil((e.getBottom() - e.getTop()) / this.repulsionRange));
1081
- for (var r = Array(t), i = 0; i < t; i++) r[i] = Array(n);
1082
- for (var i = 0; i < t; i++) for (var a = 0; a < n; a++) r[i][a] = [];
1083
- return r;
1084
- }, l.prototype.addNodeToGrid = function(e, t, n) {
1085
- var r = 0, i = 0, a = 0, o = 0;
1086
- r = parseInt(Math.floor((e.getRect().x - t) / this.repulsionRange)), i = parseInt(Math.floor((e.getRect().width + e.getRect().x - t) / this.repulsionRange)), a = parseInt(Math.floor((e.getRect().y - n) / this.repulsionRange)), o = parseInt(Math.floor((e.getRect().height + e.getRect().y - n) / this.repulsionRange));
1087
- for (var s = r; s <= i; s++) for (var c = a; c <= o; c++) this.grid[s][c].push(e), e.setGridCoordinates(r, i, a, o);
1088
- }, l.prototype.updateGrid = function() {
1089
- var e, t, n = this.getAllNodes();
1090
- for (this.grid = this.calcGrid(this.graphManager.getRoot()), e = 0; e < n.length; e++) t = n[e], this.addNodeToGrid(t, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1091
- }, l.prototype.calculateRepulsionForceOfANode = function(e, t, n, i) {
1092
- if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && n || i) {
1093
- var o = /* @__PURE__ */ new Set();
1094
- e.surrounding = [];
1095
- for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
1096
- for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
1097
- var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
1098
- f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1099
- }
1100
- }
1101
- e.surrounding = [].concat(r(o));
1102
- }
1103
- for (l = 0; l < e.surrounding.length; l++) this.calcRepulsionForce(e, e.surrounding[l]);
1104
- }, l.prototype.calcRepulsionRange = function() {
1105
- return 0;
1106
- }, e.exports = l;
1107
- }),
1108
- (function(e, t, n) {
1109
- var r = n(1), i = n(7);
1110
- function a(e, t, n) {
1111
- r.call(this, e, t, n), this.idealLength = i.DEFAULT_EDGE_LENGTH;
1112
- }
1113
- for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1114
- e.exports = a;
1115
- }),
1116
- (function(e, t, n) {
1117
- var r = n(3);
1118
- function i(e, t, n, i) {
1119
- r.call(this, e, t, n, i), 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 = [];
1120
- }
1121
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1122
- i.prototype.setGridCoordinates = function(e, t, n, r) {
1123
- this.startX = e, this.finishX = t, this.startY = n, this.finishY = r;
1124
- }, e.exports = i;
1125
- }),
1126
- (function(e, t, n) {
1127
- function r(e, t) {
1128
- this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1129
- }
1130
- r.prototype.getWidth = function() {
1131
- return this.width;
1132
- }, r.prototype.setWidth = function(e) {
1133
- this.width = e;
1134
- }, r.prototype.getHeight = function() {
1135
- return this.height;
1136
- }, r.prototype.setHeight = function(e) {
1137
- this.height = e;
1138
- }, e.exports = r;
1139
- }),
1140
- (function(e, t, n) {
1141
- var r = n(14);
1142
- function i() {
1143
- this.map = {}, this.keys = [];
1144
- }
1145
- i.prototype.put = function(e, t) {
1146
- var n = r.createID(e);
1147
- this.contains(n) || (this.map[n] = t, this.keys.push(e));
1148
- }, i.prototype.contains = function(e) {
1149
- return r.createID(e), this.map[e] != null;
1150
- }, i.prototype.get = function(e) {
1151
- var t = r.createID(e);
1152
- return this.map[t];
1153
- }, i.prototype.keySet = function() {
1154
- return this.keys;
1155
- }, e.exports = i;
1156
- }),
1157
- (function(e, t, n) {
1158
- var r = n(14);
1159
- function i() {
1160
- this.set = {};
1161
- }
1162
- i.prototype.add = function(e) {
1163
- var t = r.createID(e);
1164
- this.contains(t) || (this.set[t] = e);
1165
- }, i.prototype.remove = function(e) {
1166
- delete this.set[r.createID(e)];
1167
- }, i.prototype.clear = function() {
1168
- this.set = {};
1169
- }, i.prototype.contains = function(e) {
1170
- return this.set[r.createID(e)] == e;
1171
- }, i.prototype.isEmpty = function() {
1172
- return this.size() === 0;
1173
- }, i.prototype.size = function() {
1174
- return Object.keys(this.set).length;
1175
- }, i.prototype.addAllTo = function(e) {
1176
- for (var t = Object.keys(this.set), n = t.length, r = 0; r < n; r++) e.push(this.set[t[r]]);
1177
- }, i.prototype.size = function() {
1178
- return Object.keys(this.set).length;
1179
- }, i.prototype.addAll = function(e) {
1180
- for (var t = e.length, n = 0; n < t; n++) {
1181
- var r = e[n];
1182
- this.add(r);
1183
- }
1184
- }, e.exports = i;
1185
- }),
1186
- (function(e, t, n) {
1187
- var r = function() {
1188
- function e(e, t) {
1189
- for (var n = 0; n < t.length; n++) {
1190
- var r = t[n];
1191
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1192
- }
1193
- }
1194
- return function(t, n, r) {
1195
- return n && e(t.prototype, n), r && e(t, r), t;
1196
- };
1197
- }();
1198
- function i(e, t) {
1199
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1200
- }
1201
- var a = n(11);
1202
- e.exports = function() {
1203
- function e(t, n) {
1204
- i(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1205
- var r = void 0;
1206
- r = t instanceof a ? t.size() : t.length, this._quicksort(t, 0, r - 1);
1207
- }
1208
- return r(e, [
1209
- {
1210
- key: "_quicksort",
1211
- value: function(e, t, n) {
1212
- if (t < n) {
1213
- var r = this._partition(e, t, n);
1214
- this._quicksort(e, t, r), this._quicksort(e, r + 1, n);
1215
- }
1216
- }
1217
- },
1218
- {
1219
- key: "_partition",
1220
- value: function(e, t, n) {
1221
- for (var r = this._get(e, t), i = t, a = n;;) {
1222
- for (; this.compareFunction(r, this._get(e, a));) a--;
1223
- for (; this.compareFunction(this._get(e, i), r);) i++;
1224
- if (i < a) this._swap(e, i, a), i++, a--;
1225
- else return a;
1226
- }
1227
- }
1228
- },
1229
- {
1230
- key: "_get",
1231
- value: function(e, t) {
1232
- return e instanceof a ? e.get_object_at(t) : e[t];
1233
- }
1234
- },
1235
- {
1236
- key: "_set",
1237
- value: function(e, t, n) {
1238
- e instanceof a ? e.set_object_at(t, n) : e[t] = n;
1239
- }
1240
- },
1241
- {
1242
- key: "_swap",
1243
- value: function(e, t, n) {
1244
- var r = this._get(e, t);
1245
- this._set(e, t, this._get(e, n)), this._set(e, n, r);
1246
- }
1247
- },
1248
- {
1249
- key: "_defaultCompareFunction",
1250
- value: function(e, t) {
1251
- return t > e;
1252
- }
1253
- }
1254
- ]), e;
1255
- }();
1256
- }),
1257
- (function(e, t, n) {
1258
- var r = function() {
1259
- function e(e, t) {
1260
- for (var n = 0; n < t.length; n++) {
1261
- var r = t[n];
1262
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1263
- }
1264
- }
1265
- return function(t, n, r) {
1266
- return n && e(t.prototype, n), r && e(t, r), t;
1267
- };
1268
- }();
1269
- function i(e, t) {
1270
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1271
- }
1272
- e.exports = function() {
1273
- function e(t, n) {
1274
- var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1275
- i(this, e), this.sequence1 = t, this.sequence2 = n, this.match_score = r, this.mismatch_penalty = a, this.gap_penalty = o, this.iMax = t.length + 1, this.jMax = n.length + 1, this.grid = Array(this.iMax);
1276
- for (var s = 0; s < this.iMax; s++) {
1277
- this.grid[s] = Array(this.jMax);
1278
- for (var c = 0; c < this.jMax; c++) this.grid[s][c] = 0;
1279
- }
1280
- this.tracebackGrid = Array(this.iMax);
1281
- for (var l = 0; l < this.iMax; l++) {
1282
- this.tracebackGrid[l] = Array(this.jMax);
1283
- for (var u = 0; u < this.jMax; u++) this.tracebackGrid[l][u] = [
1284
- null,
1285
- null,
1286
- null
1287
- ];
1288
- }
1289
- this.alignments = [], this.score = -1, this.computeGrids();
1290
- }
1291
- return r(e, [
1292
- {
1293
- key: "getScore",
1294
- value: function() {
1295
- return this.score;
1296
- }
1297
- },
1298
- {
1299
- key: "getAlignments",
1300
- value: function() {
1301
- return this.alignments;
1302
- }
1303
- },
1304
- {
1305
- key: "computeGrids",
1306
- value: function() {
1307
- for (var e = 1; e < this.jMax; e++) this.grid[0][e] = this.grid[0][e - 1] + this.gap_penalty, this.tracebackGrid[0][e] = [
1308
- !1,
1309
- !1,
1310
- !0
1311
- ];
1312
- for (var t = 1; t < this.iMax; t++) this.grid[t][0] = this.grid[t - 1][0] + this.gap_penalty, this.tracebackGrid[t][0] = [
1313
- !1,
1314
- !0,
1315
- !1
1316
- ];
1317
- for (var n = 1; n < this.iMax; n++) for (var r = 1; r < this.jMax; r++) {
1318
- var i = void 0;
1319
- i = this.sequence1[n - 1] === this.sequence2[r - 1] ? this.grid[n - 1][r - 1] + this.match_score : this.grid[n - 1][r - 1] + this.mismatch_penalty;
1320
- var a = this.grid[n - 1][r] + this.gap_penalty, o = this.grid[n][r - 1] + this.gap_penalty, s = [
1321
- i,
1322
- a,
1323
- o
1324
- ], c = this.arrayAllMaxIndexes(s);
1325
- this.grid[n][r] = s[c[0]], this.tracebackGrid[n][r] = [
1326
- c.includes(0),
1327
- c.includes(1),
1328
- c.includes(2)
1329
- ];
1330
- }
1331
- this.score = this.grid[this.iMax - 1][this.jMax - 1];
1332
- }
1333
- },
1334
- {
1335
- key: "alignmentTraceback",
1336
- value: function() {
1337
- var e = [];
1338
- for (e.push({
1339
- pos: [this.sequence1.length, this.sequence2.length],
1340
- seq1: "",
1341
- seq2: ""
1342
- }); e[0];) {
1343
- var t = e[0], n = this.tracebackGrid[t.pos[0]][t.pos[1]];
1344
- n[0] && e.push({
1345
- pos: [t.pos[0] - 1, t.pos[1] - 1],
1346
- seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1347
- seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1348
- }), n[1] && e.push({
1349
- pos: [t.pos[0] - 1, t.pos[1]],
1350
- seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1351
- seq2: "-" + t.seq2
1352
- }), n[2] && e.push({
1353
- pos: [t.pos[0], t.pos[1] - 1],
1354
- seq1: "-" + t.seq1,
1355
- seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1356
- }), t.pos[0] === 0 && t.pos[1] === 0 && this.alignments.push({
1357
- sequence1: t.seq1,
1358
- sequence2: t.seq2
1359
- }), e.shift();
1360
- }
1361
- return this.alignments;
1362
- }
1363
- },
1364
- {
1365
- key: "getAllIndexes",
1366
- value: function(e, t) {
1367
- for (var n = [], r = -1; (r = e.indexOf(t, r + 1)) !== -1;) n.push(r);
1368
- return n;
1369
- }
1370
- },
1371
- {
1372
- key: "arrayAllMaxIndexes",
1373
- value: function(e) {
1374
- return this.getAllIndexes(e, Math.max.apply(null, e));
1375
- }
1376
- }
1377
- ]), e;
1378
- }();
1379
- }),
1380
- (function(e, t, n) {
1381
- var r = function() {};
1382
- r.FDLayout = n(18), r.FDLayoutConstants = n(7), r.FDLayoutEdge = n(19), r.FDLayoutNode = n(20), r.DimensionD = n(21), r.HashMap = n(22), r.HashSet = n(23), r.IGeometry = n(8), r.IMath = n(9), r.Integer = n(10), r.Point = n(12), r.PointD = n(4), r.RandomSeed = n(16), r.RectangleD = n(13), r.Transform = n(17), r.UniqueIDGeneretor = n(14), r.Quicksort = n(24), r.LinkedList = n(11), r.LGraphObject = n(2), r.LGraph = n(5), r.LEdge = n(1), r.LGraphManager = n(6), r.LNode = n(3), r.Layout = n(15), r.LayoutConstants = n(0), r.NeedlemanWunsch = n(25), e.exports = r;
1383
- }),
1384
- (function(e, t, n) {
1385
- function r() {
1386
- this.listeners = [];
1387
- }
1388
- var i = r.prototype;
1389
- i.addListener = function(e, t) {
1390
- this.listeners.push({
1391
- event: e,
1392
- callback: t
1393
- });
1394
- }, i.removeListener = function(e, t) {
1395
- for (var n = this.listeners.length; n >= 0; n--) {
1396
- var r = this.listeners[n];
1397
- r.event === e && r.callback === t && this.listeners.splice(n, 1);
1398
- }
1399
- }, i.emit = function(e, t) {
1400
- for (var n = 0; n < this.listeners.length; n++) {
1401
- var r = this.listeners[n];
1402
- e === r.event && r.callback(t);
1403
- }
1404
- }, e.exports = r;
1405
- })
1406
- ]);
1407
- });
1408
- })), s = /* @__PURE__ */ t(((e, t) => {
1409
- (function(n, r) {
1410
- typeof e == "object" && typeof t == "object" ? t.exports = r(o()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(o()) : n.coseBase = r(n.layoutBase);
1411
- })(e, function(e) {
1412
- return (function(e) {
1413
- var t = {};
1414
- function n(r) {
1415
- if (t[r]) return t[r].exports;
1416
- var i = t[r] = {
1417
- i: r,
1418
- l: !1,
1419
- exports: {}
1420
- };
1421
- return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
1422
- }
1423
- return n.m = e, n.c = t, n.i = function(e) {
1424
- return e;
1425
- }, n.d = function(e, t, r) {
1426
- n.o(e, t) || Object.defineProperty(e, t, {
1427
- configurable: !1,
1428
- enumerable: !0,
1429
- get: r
1430
- });
1431
- }, n.n = function(e) {
1432
- var t = e && e.__esModule ? function() {
1433
- return e.default;
1434
- } : function() {
1435
- return e;
1436
- };
1437
- return n.d(t, "a", t), t;
1438
- }, n.o = function(e, t) {
1439
- return Object.prototype.hasOwnProperty.call(e, t);
1440
- }, n.p = "", n(n.s = 7);
1441
- })([
1442
- (function(t, n) {
1443
- t.exports = e;
1444
- }),
1445
- (function(e, t, n) {
1446
- var r = n(0).FDLayoutConstants;
1447
- function i() {}
1448
- for (var a in r) i[a] = r[a];
1449
- i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = r.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TREE_REDUCTION_ON_INCREMENTAL = !1, e.exports = i;
1450
- }),
1451
- (function(e, t, n) {
1452
- var r = n(0).FDLayoutEdge;
1453
- function i(e, t, n) {
1454
- r.call(this, e, t, n);
1455
- }
1456
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1457
- e.exports = i;
1458
- }),
1459
- (function(e, t, n) {
1460
- var r = n(0).LGraph;
1461
- function i(e, t, n) {
1462
- r.call(this, e, t, n);
1463
- }
1464
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1465
- e.exports = i;
1466
- }),
1467
- (function(e, t, n) {
1468
- var r = n(0).LGraphManager;
1469
- function i(e) {
1470
- r.call(this, e);
1471
- }
1472
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1473
- e.exports = i;
1474
- }),
1475
- (function(e, t, n) {
1476
- var r = n(0).FDLayoutNode, i = n(0).IMath;
1477
- function a(e, t, n, i) {
1478
- r.call(this, e, t, n, i);
1479
- }
1480
- for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1481
- a.prototype.move = function() {
1482
- var e = this.graphManager.getLayout();
1483
- this.displacementX = e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementX = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementY = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementY)), this.child == null || this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), e.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;
1484
- }, a.prototype.propogateDisplacementToChildren = function(e, t) {
1485
- for (var n = this.getChild().getNodes(), r, i = 0; i < n.length; i++) r = n[i], r.getChild() == null ? (r.moveBy(e, t), r.displacementX += e, r.displacementY += t) : r.propogateDisplacementToChildren(e, t);
1486
- }, a.prototype.setPred1 = function(e) {
1487
- this.pred1 = e;
1488
- }, a.prototype.getPred1 = function() {
1489
- return pred1;
1490
- }, a.prototype.getPred2 = function() {
1491
- return pred2;
1492
- }, a.prototype.setNext = function(e) {
1493
- this.next = e;
1494
- }, a.prototype.getNext = function() {
1495
- return next;
1496
- }, a.prototype.setProcessed = function(e) {
1497
- this.processed = e;
1498
- }, a.prototype.isProcessed = function() {
1499
- return processed;
1500
- }, e.exports = a;
1501
- }),
1502
- (function(e, t, n) {
1503
- var r = n(0).FDLayout, i = n(4), a = n(3), o = n(5), s = n(2), c = n(1), l = n(0).FDLayoutConstants, u = n(0).LayoutConstants, d = n(0).Point, f = n(0).PointD, p = n(0).Layout, m = n(0).Integer, h = n(0).IGeometry, g = n(0).LGraph, _ = n(0).Transform;
1504
- function v() {
1505
- r.call(this), this.toBeTiled = {};
1506
- }
1507
- for (var y in v.prototype = Object.create(r.prototype), r) v[y] = r[y];
1508
- v.prototype.newGraphManager = function() {
1509
- var e = new i(this);
1510
- return this.graphManager = e, e;
1511
- }, v.prototype.newGraph = function(e) {
1512
- return new a(null, this.graphManager, e);
1513
- }, v.prototype.newNode = function(e) {
1514
- return new o(this.graphManager, e);
1515
- }, v.prototype.newEdge = function(e) {
1516
- return new s(null, null, e);
1517
- }, v.prototype.initParameters = function() {
1518
- r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = l.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = l.DEFAULT_REPULSION_STRENGTH, 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, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / l.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = l.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1519
- }, v.prototype.layout = function() {
1520
- return u.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1521
- }, v.prototype.classicLayout = function() {
1522
- 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) {
1523
- var e = this.getFlatForest();
1524
- if (e.length > 0) this.positionNodesRadially(e);
1525
- else {
1526
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1527
- var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1528
- return t.has(e);
1529
- });
1530
- this.graphManager.setAllNodesToApplyGravitation(n), this.positionNodesRandomly();
1531
- }
1532
- } else if (c.TREE_REDUCTION_ON_INCREMENTAL) {
1533
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1534
- var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1535
- return t.has(e);
1536
- });
1537
- this.graphManager.setAllNodesToApplyGravitation(n);
1538
- }
1539
- return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1540
- }, v.prototype.tick = function() {
1541
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1542
- else return !0;
1543
- if (this.totalIterations % l.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1544
- if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1545
- else return !0;
1546
- this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - this.coolingCycle ** +(Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1547
- }
1548
- if (this.isTreeGrowing) {
1549
- if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1550
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1551
- var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1552
- return e.has(t);
1553
- });
1554
- this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1555
- } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1556
- this.growTreeIterations++;
1557
- }
1558
- if (this.isGrowthFinished) {
1559
- if (this.isConverged()) return !0;
1560
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1561
- }
1562
- var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1563
- return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1564
- }, v.prototype.getPositionsData = function() {
1565
- for (var e = this.graphManager.getAllNodes(), t = {}, n = 0; n < e.length; n++) {
1566
- var r = e[n].rect, i = e[n].id;
1567
- t[i] = {
1568
- id: i,
1569
- x: r.getCenterX(),
1570
- y: r.getCenterY(),
1571
- w: r.width,
1572
- h: r.height
1573
- };
1574
- }
1575
- return t;
1576
- }, v.prototype.runSpringEmbedder = function() {
1577
- this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1578
- var e = !1;
1579
- if (l.ANIMATE === "during") this.emit("layoutstarted");
1580
- else {
1581
- for (; !e;) e = this.tick();
1582
- this.graphManager.updateBounds();
1583
- }
1584
- }, v.prototype.calculateNodesToApplyGravitationTo = function() {
1585
- var e = [], t, n = this.graphManager.getGraphs(), r = n.length, i;
1586
- for (i = 0; i < r; i++) t = n[i], t.updateConnected(), t.isConnected || (e = e.concat(t.getNodes()));
1587
- return e;
1588
- }, v.prototype.createBendpoints = function() {
1589
- var e = [];
1590
- e = e.concat(this.graphManager.getAllEdges());
1591
- var t = /* @__PURE__ */ new Set(), n;
1592
- for (n = 0; n < e.length; n++) {
1593
- var r = e[n];
1594
- if (!t.has(r)) {
1595
- var i = r.getSource(), a = r.getTarget();
1596
- if (i == a) r.getBendpoints().push(new f()), r.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(r), t.add(r);
1597
- else {
1598
- var o = [];
1599
- if (o = o.concat(i.getEdgeListToNode(a)), o = o.concat(a.getEdgeListToNode(i)), !t.has(o[0])) {
1600
- if (o.length > 1) {
1601
- var s;
1602
- for (s = 0; s < o.length; s++) {
1603
- var c = o[s];
1604
- c.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(c);
1605
- }
1606
- }
1607
- o.forEach(function(e) {
1608
- t.add(e);
1609
- });
1610
- }
1611
- }
1612
- }
1613
- if (t.size == e.length) break;
1614
- }
1615
- }, v.prototype.positionNodesRadially = function(e) {
1616
- for (var t = new d(0, 0), n = Math.ceil(Math.sqrt(e.length)), r = 0, i = 0, a = 0, o = new f(0, 0), s = 0; s < e.length; s++) {
1617
- s % n == 0 && (a = 0, i = r, s != 0 && (i += c.DEFAULT_COMPONENT_SEPERATION), r = 0);
1618
- var l = e[s], m = p.findCenterOfTree(l);
1619
- t.x = a, t.y = i, o = v.radialLayout(l, m, t), o.y > r && (r = Math.floor(o.y)), a = Math.floor(o.x + c.DEFAULT_COMPONENT_SEPERATION);
1620
- }
1621
- this.transform(new f(u.WORLD_CENTER_X - o.x / 2, u.WORLD_CENTER_Y - o.y / 2));
1622
- }, v.radialLayout = function(e, t, n) {
1623
- var r = Math.max(this.maxDiagonalInTree(e), c.DEFAULT_RADIAL_SEPARATION);
1624
- v.branchRadialLayout(t, null, 0, 359, 0, r);
1625
- var i = g.calculateBounds(e), a = new _();
1626
- a.setDeviceOrgX(i.getMinX()), a.setDeviceOrgY(i.getMinY()), a.setWorldOrgX(n.x), a.setWorldOrgY(n.y);
1627
- for (var o = 0; o < e.length; o++) e[o].transform(a);
1628
- var s = new f(i.getMaxX(), i.getMaxY());
1629
- return a.inverseTransformPoint(s);
1630
- }, v.branchRadialLayout = function(e, t, n, r, i, a) {
1631
- var o = (r - n + 1) / 2;
1632
- o < 0 && (o += 180);
1633
- var s = (o + n) % 360 * h.TWO_PI / 360, c = i * Math.cos(s), l = i * Math.sin(s);
1634
- e.setCenter(c, l);
1635
- var u = [];
1636
- u = u.concat(e.getEdges());
1637
- var d = u.length;
1638
- t != null && d--;
1639
- for (var f = 0, p = u.length, m, g = e.getEdgesBetween(t); g.length > 1;) {
1640
- var _ = g[0];
1641
- g.splice(0, 1);
1642
- var y = u.indexOf(_);
1643
- y >= 0 && u.splice(y, 1), p--, d--;
1644
- }
1645
- m = t == null ? 0 : (u.indexOf(g[0]) + 1) % p;
1646
- for (var b = Math.abs(r - n) / d, x = m; f != d; x = ++x % p) {
1647
- var S = u[x].getOtherEnd(e);
1648
- if (S != t) {
1649
- var C = (n + f * b) % 360, w = (C + b) % 360;
1650
- v.branchRadialLayout(S, e, C, w, i + a, a), f++;
1651
- }
1652
- }
1653
- }, v.maxDiagonalInTree = function(e) {
1654
- for (var t = m.MIN_VALUE, n = 0; n < e.length; n++) {
1655
- var r = e[n].getDiagonal();
1656
- r > t && (t = r);
1657
- }
1658
- return t;
1659
- }, v.prototype.calcRepulsionRange = function() {
1660
- return 2 * (this.level + 1) * this.idealEdgeLength;
1661
- }, v.prototype.groupZeroDegreeMembers = function() {
1662
- var e = this, t = {};
1663
- this.memberGroups = {}, this.idToDummyNode = {};
1664
- for (var n = [], r = this.graphManager.getAllNodes(), i = 0; i < r.length; i++) {
1665
- var a = r[i], s = a.getParent();
1666
- this.getNodeDegreeWithChildren(a) === 0 && (s.id == null || !this.getToBeTiled(s)) && n.push(a);
1667
- }
1668
- for (var i = 0; i < n.length; i++) {
1669
- var a = n[i], c = a.getParent().id;
1670
- t[c] === void 0 && (t[c] = []), t[c] = t[c].concat(a);
1671
- }
1672
- Object.keys(t).forEach(function(n) {
1673
- if (t[n].length > 1) {
1674
- var r = "DummyCompound_" + n;
1675
- e.memberGroups[r] = t[n];
1676
- var i = t[n][0].getParent(), a = new o(e.graphManager);
1677
- a.id = r, a.paddingLeft = i.paddingLeft || 0, a.paddingRight = i.paddingRight || 0, a.paddingBottom = i.paddingBottom || 0, a.paddingTop = i.paddingTop || 0, e.idToDummyNode[r] = a;
1678
- var s = e.getGraphManager().add(e.newGraph(), a), c = i.getChild();
1679
- c.add(a);
1680
- for (var l = 0; l < t[n].length; l++) {
1681
- var u = t[n][l];
1682
- c.remove(u), s.add(u);
1683
- }
1684
- }
1685
- });
1686
- }, v.prototype.clearCompounds = function() {
1687
- var e = {}, t = {};
1688
- this.performDFSOnCompounds();
1689
- for (var n = 0; n < this.compoundOrder.length; n++) t[this.compoundOrder[n].id] = this.compoundOrder[n], e[this.compoundOrder[n].id] = [].concat(this.compoundOrder[n].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[n].getChild()), this.compoundOrder[n].child = null;
1690
- this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, t);
1691
- }, v.prototype.clearZeroDegreeMembers = function() {
1692
- var e = this, t = this.tiledZeroDegreePack = [];
1693
- Object.keys(this.memberGroups).forEach(function(n) {
1694
- var r = e.idToDummyNode[n];
1695
- t[n] = e.tileNodes(e.memberGroups[n], r.paddingLeft + r.paddingRight), r.rect.width = t[n].width, r.rect.height = t[n].height;
1696
- });
1697
- }, v.prototype.repopulateCompounds = function() {
1698
- for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
1699
- var t = this.compoundOrder[e], n = t.id, r = t.paddingLeft, i = t.paddingTop;
1700
- this.adjustLocations(this.tiledMemberPack[n], t.rect.x, t.rect.y, r, i);
1701
- }
1702
- }, v.prototype.repopulateZeroDegreeMembers = function() {
1703
- var e = this, t = this.tiledZeroDegreePack;
1704
- Object.keys(t).forEach(function(n) {
1705
- var r = e.idToDummyNode[n], i = r.paddingLeft, a = r.paddingTop;
1706
- e.adjustLocations(t[n], r.rect.x, r.rect.y, i, a);
1707
- });
1708
- }, v.prototype.getToBeTiled = function(e) {
1709
- var t = e.id;
1710
- if (this.toBeTiled[t] != null) return this.toBeTiled[t];
1711
- var n = e.getChild();
1712
- if (n == null) return this.toBeTiled[t] = !1, !1;
1713
- for (var r = n.getNodes(), i = 0; i < r.length; i++) {
1714
- var a = r[i];
1715
- if (this.getNodeDegree(a) > 0) return this.toBeTiled[t] = !1, !1;
1716
- if (a.getChild() == null) {
1717
- this.toBeTiled[a.id] = !1;
1718
- continue;
1719
- }
1720
- if (!this.getToBeTiled(a)) return this.toBeTiled[t] = !1, !1;
1721
- }
1722
- return this.toBeTiled[t] = !0, !0;
1723
- }, v.prototype.getNodeDegree = function(e) {
1724
- e.id;
1725
- for (var t = e.getEdges(), n = 0, r = 0; r < t.length; r++) {
1726
- var i = t[r];
1727
- i.getSource().id !== i.getTarget().id && (n += 1);
1728
- }
1729
- return n;
1730
- }, v.prototype.getNodeDegreeWithChildren = function(e) {
1731
- var t = this.getNodeDegree(e);
1732
- if (e.getChild() == null) return t;
1733
- for (var n = e.getChild().getNodes(), r = 0; r < n.length; r++) {
1734
- var i = n[r];
1735
- t += this.getNodeDegreeWithChildren(i);
1736
- }
1737
- return t;
1738
- }, v.prototype.performDFSOnCompounds = function() {
1739
- this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
1740
- }, v.prototype.fillCompexOrderByDFS = function(e) {
1741
- for (var t = 0; t < e.length; t++) {
1742
- var n = e[t];
1743
- n.getChild() != null && this.fillCompexOrderByDFS(n.getChild().getNodes()), this.getToBeTiled(n) && this.compoundOrder.push(n);
1744
- }
1745
- }, v.prototype.adjustLocations = function(e, t, n, r, i) {
1746
- t += r, n += i;
1747
- for (var a = t, o = 0; o < e.rows.length; o++) {
1748
- var s = e.rows[o];
1749
- t = a;
1750
- for (var c = 0, l = 0; l < s.length; l++) {
1751
- var u = s[l];
1752
- u.rect.x = t, u.rect.y = n, t += u.rect.width + e.horizontalPadding, u.rect.height > c && (c = u.rect.height);
1753
- }
1754
- n += c + e.verticalPadding;
1755
- }
1756
- }, v.prototype.tileCompoundMembers = function(e, t) {
1757
- var n = this;
1758
- this.tiledMemberPack = [], Object.keys(e).forEach(function(r) {
1759
- var i = t[r];
1760
- n.tiledMemberPack[r] = n.tileNodes(e[r], i.paddingLeft + i.paddingRight), i.rect.width = n.tiledMemberPack[r].width, i.rect.height = n.tiledMemberPack[r].height;
1761
- });
1762
- }, v.prototype.tileNodes = function(e, t) {
1763
- var n = {
1764
- rows: [],
1765
- rowWidth: [],
1766
- rowHeight: [],
1767
- width: 0,
1768
- height: t,
1769
- verticalPadding: c.TILING_PADDING_VERTICAL,
1770
- horizontalPadding: c.TILING_PADDING_HORIZONTAL
1771
- };
1772
- e.sort(function(e, t) {
1773
- return e.rect.width * e.rect.height > t.rect.width * t.rect.height ? -1 : e.rect.width * e.rect.height < t.rect.width * t.rect.height ? 1 : 0;
1774
- });
1775
- for (var r = 0; r < e.length; r++) {
1776
- var i = e[r];
1777
- n.rows.length == 0 ? this.insertNodeToRow(n, i, 0, t) : this.canAddHorizontal(n, i.rect.width, i.rect.height) ? this.insertNodeToRow(n, i, this.getShortestRowIndex(n), t) : this.insertNodeToRow(n, i, n.rows.length, t), this.shiftToLastRow(n);
1778
- }
1779
- return n;
1780
- }, v.prototype.insertNodeToRow = function(e, t, n, r) {
1781
- var i = r;
1782
- n == e.rows.length && (e.rows.push([]), e.rowWidth.push(i), e.rowHeight.push(0));
1783
- var a = e.rowWidth[n] + t.rect.width;
1784
- e.rows[n].length > 0 && (a += e.horizontalPadding), e.rowWidth[n] = a, e.width < a && (e.width = a);
1785
- var o = t.rect.height;
1786
- n > 0 && (o += e.verticalPadding);
1787
- var s = 0;
1788
- o > e.rowHeight[n] && (s = e.rowHeight[n], e.rowHeight[n] = o, s = e.rowHeight[n] - s), e.height += s, e.rows[n].push(t);
1789
- }, v.prototype.getShortestRowIndex = function(e) {
1790
- for (var t = -1, n = Number.MAX_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] < n && (t = r, n = e.rowWidth[r]);
1791
- return t;
1792
- }, v.prototype.getLongestRowIndex = function(e) {
1793
- for (var t = -1, n = Number.MIN_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] > n && (t = r, n = e.rowWidth[r]);
1794
- return t;
1795
- }, v.prototype.canAddHorizontal = function(e, t, n) {
1796
- var r = this.getShortestRowIndex(e);
1797
- if (r < 0) return !0;
1798
- var i = e.rowWidth[r];
1799
- if (i + e.horizontalPadding + t <= e.width) return !0;
1800
- var a = 0;
1801
- e.rowHeight[r] < n && r > 0 && (a = n + e.verticalPadding - e.rowHeight[r]);
1802
- var o = e.width - i >= t + e.horizontalPadding ? (e.height + a) / (i + t + e.horizontalPadding) : (e.height + a) / e.width;
1803
- a = n + e.verticalPadding;
1804
- var s = e.width < t ? (e.height + a) / t : (e.height + a) / e.width;
1805
- return s < 1 && (s = 1 / s), o < 1 && (o = 1 / o), o < s;
1806
- }, v.prototype.shiftToLastRow = function(e) {
1807
- var t = this.getLongestRowIndex(e), n = e.rowWidth.length - 1, r = e.rows[t], i = r[r.length - 1], a = i.width + e.horizontalPadding;
1808
- if (e.width - e.rowWidth[n] > a && t != n) {
1809
- r.splice(-1, 1), e.rows[n].push(i), e.rowWidth[t] = e.rowWidth[t] - a, e.rowWidth[n] = e.rowWidth[n] + a, e.width = e.rowWidth[instance.getLongestRowIndex(e)];
1810
- for (var o = Number.MIN_VALUE, s = 0; s < r.length; s++) r[s].height > o && (o = r[s].height);
1811
- t > 0 && (o += e.verticalPadding);
1812
- var c = e.rowHeight[t] + e.rowHeight[n];
1813
- e.rowHeight[t] = o, e.rowHeight[n] < i.height + e.verticalPadding && (e.rowHeight[n] = i.height + e.verticalPadding);
1814
- var l = e.rowHeight[t] + e.rowHeight[n];
1815
- e.height += l - c, this.shiftToLastRow(e);
1816
- }
1817
- }, v.prototype.tilingPreLayout = function() {
1818
- c.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
1819
- }, v.prototype.tilingPostLayout = function() {
1820
- c.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
1821
- }, v.prototype.reduceTrees = function() {
1822
- for (var e = [], t = !0, n; t;) {
1823
- var r = this.graphManager.getAllNodes(), i = [];
1824
- t = !1;
1825
- for (var a = 0; a < r.length; a++) n = r[a], n.getEdges().length == 1 && !n.getEdges()[0].isInterGraph && n.getChild() == null && (i.push([
1826
- n,
1827
- n.getEdges()[0],
1828
- n.getOwner()
1829
- ]), t = !0);
1830
- if (t == 1) {
1831
- for (var o = [], s = 0; s < i.length; s++) i[s][0].getEdges().length == 1 && (o.push(i[s]), i[s][0].getOwner().remove(i[s][0]));
1832
- e.push(o), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1833
- }
1834
- }
1835
- this.prunedNodesAll = e;
1836
- }, v.prototype.growTree = function(e) {
1837
- for (var t = e[e.length - 1], n, r = 0; r < t.length; r++) n = t[r], this.findPlaceforPrunedNode(n), n[2].add(n[0]), n[2].add(n[1], n[1].source, n[1].target);
1838
- e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1839
- }, v.prototype.findPlaceforPrunedNode = function(e) {
1840
- var t, n, r = e[0];
1841
- n = r == e[1].source ? e[1].target : e[1].source;
1842
- var i = n.startX, a = n.finishX, o = n.startY, s = n.finishY, c = [
1843
- 0,
1844
- 0,
1845
- 0,
1846
- 0
1847
- ];
1848
- if (o > 0) for (var u = i; u <= a; u++) c[0] += this.grid[u][o - 1].length + this.grid[u][o].length - 1;
1849
- if (a < this.grid.length - 1) for (var u = o; u <= s; u++) c[1] += this.grid[a + 1][u].length + this.grid[a][u].length - 1;
1850
- if (s < this.grid[0].length - 1) for (var u = i; u <= a; u++) c[2] += this.grid[u][s + 1].length + this.grid[u][s].length - 1;
1851
- if (i > 0) for (var u = o; u <= s; u++) c[3] += this.grid[i - 1][u].length + this.grid[i][u].length - 1;
1852
- for (var d = m.MAX_VALUE, f, p, h = 0; h < c.length; h++) c[h] < d ? (d = c[h], f = 1, p = h) : c[h] == d && f++;
1853
- if (f == 3 && d == 0) c[0] == 0 && c[1] == 0 && c[2] == 0 ? t = 1 : c[0] == 0 && c[1] == 0 && c[3] == 0 ? t = 0 : c[0] == 0 && c[2] == 0 && c[3] == 0 ? t = 3 : c[1] == 0 && c[2] == 0 && c[3] == 0 && (t = 2);
1854
- else if (f == 2 && d == 0) {
1855
- var g = Math.floor(Math.random() * 2);
1856
- t = c[0] == 0 && c[1] == 0 ? g == 0 ? 0 : 1 : c[0] == 0 && c[2] == 0 ? g == 0 ? 0 : 2 : c[0] == 0 && c[3] == 0 ? g == 0 ? 0 : 3 : c[1] == 0 && c[2] == 0 ? g == 0 ? 1 : 2 : c[1] == 0 && c[3] == 0 ? g == 0 ? 1 : 3 : g == 0 ? 2 : 3;
1857
- } else if (f == 4 && d == 0) {
1858
- var g = Math.floor(Math.random() * 4);
1859
- t = g;
1860
- } else t = p;
1861
- t == 0 ? r.setCenter(n.getCenterX(), n.getCenterY() - n.getHeight() / 2 - l.DEFAULT_EDGE_LENGTH - r.getHeight() / 2) : t == 1 ? r.setCenter(n.getCenterX() + n.getWidth() / 2 + l.DEFAULT_EDGE_LENGTH + r.getWidth() / 2, n.getCenterY()) : t == 2 ? r.setCenter(n.getCenterX(), n.getCenterY() + n.getHeight() / 2 + l.DEFAULT_EDGE_LENGTH + r.getHeight() / 2) : r.setCenter(n.getCenterX() - n.getWidth() / 2 - l.DEFAULT_EDGE_LENGTH - r.getWidth() / 2, n.getCenterY());
1862
- }, e.exports = v;
1863
- }),
1864
- (function(e, t, n) {
1865
- var r = {};
1866
- r.layoutBase = n(0), r.CoSEConstants = n(1), r.CoSEEdge = n(2), r.CoSEGraph = n(3), r.CoSEGraphManager = n(4), r.CoSELayout = n(6), r.CoSENode = n(5), e.exports = r;
1867
- })
1868
- ]);
1869
- });
1870
- })), c = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1871
- (function(n, r) {
1872
- typeof e == "object" && typeof t == "object" ? t.exports = r(s()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeCoseBilkent = r(s()) : n.cytoscapeCoseBilkent = r(n.coseBase);
1873
- })(e, function(e) {
1874
- return (function(e) {
1875
- var t = {};
1876
- function n(r) {
1877
- if (t[r]) return t[r].exports;
1878
- var i = t[r] = {
1879
- i: r,
1880
- l: !1,
1881
- exports: {}
1882
- };
1883
- return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
1884
- }
1885
- return n.m = e, n.c = t, n.i = function(e) {
1886
- return e;
1887
- }, n.d = function(e, t, r) {
1888
- n.o(e, t) || Object.defineProperty(e, t, {
1889
- configurable: !1,
1890
- enumerable: !0,
1891
- get: r
1892
- });
1893
- }, n.n = function(e) {
1894
- var t = e && e.__esModule ? function() {
1895
- return e.default;
1896
- } : function() {
1897
- return e;
1898
- };
1899
- return n.d(t, "a", t), t;
1900
- }, n.o = function(e, t) {
1901
- return Object.prototype.hasOwnProperty.call(e, t);
1902
- }, n.p = "", n(n.s = 1);
1903
- })([(function(t, n) {
1904
- t.exports = e;
1905
- }), (function(e, t, n) {
1906
- var r = n(0).layoutBase.LayoutConstants, i = n(0).layoutBase.FDLayoutConstants, a = n(0).CoSEConstants, o = n(0).CoSELayout, s = n(0).CoSENode, c = n(0).layoutBase.PointD, l = n(0).layoutBase.DimensionD, u = {
1907
- ready: function() {},
1908
- stop: function() {},
1909
- quality: "default",
1910
- nodeDimensionsIncludeLabels: !1,
1911
- refresh: 30,
1912
- fit: !0,
1913
- padding: 10,
1914
- randomize: !0,
1915
- nodeRepulsion: 4500,
1916
- idealEdgeLength: 50,
1917
- edgeElasticity: .45,
1918
- nestingFactor: .1,
1919
- gravity: .25,
1920
- numIter: 2500,
1921
- tile: !0,
1922
- animate: "end",
1923
- animationDuration: 500,
1924
- tilingPaddingVertical: 10,
1925
- tilingPaddingHorizontal: 10,
1926
- gravityRangeCompound: 1.5,
1927
- gravityCompound: 1,
1928
- gravityRange: 3.8,
1929
- initialEnergyOnIncremental: .5
1930
- };
1931
- function d(e, t) {
1932
- var n = {};
1933
- for (var r in e) n[r] = e[r];
1934
- for (var r in t) n[r] = t[r];
1935
- return n;
1936
- }
1937
- function f(e) {
1938
- this.options = d(u, e), p(this.options);
1939
- }
1940
- var p = function(e) {
1941
- e.nodeRepulsion != null && (a.DEFAULT_REPULSION_STRENGTH = i.DEFAULT_REPULSION_STRENGTH = e.nodeRepulsion), e.idealEdgeLength != null && (a.DEFAULT_EDGE_LENGTH = i.DEFAULT_EDGE_LENGTH = e.idealEdgeLength), e.edgeElasticity != null && (a.DEFAULT_SPRING_STRENGTH = i.DEFAULT_SPRING_STRENGTH = e.edgeElasticity), e.nestingFactor != null && (a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (a.DEFAULT_GRAVITY_STRENGTH = i.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (a.MAX_ITERATIONS = i.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (a.DEFAULT_GRAVITY_RANGE_FACTOR = i.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_STRENGTH = i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (a.DEFAULT_COOLING_FACTOR_INCREMENTAL = i.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.quality == "draft" ? r.QUALITY = 0 : e.quality == "proof" ? r.QUALITY = 2 : r.QUALITY = 1, a.NODE_DIMENSIONS_INCLUDE_LABELS = i.NODE_DIMENSIONS_INCLUDE_LABELS = r.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, a.DEFAULT_INCREMENTAL = i.DEFAULT_INCREMENTAL = r.DEFAULT_INCREMENTAL = !e.randomize, a.ANIMATE = i.ANIMATE = r.ANIMATE = e.animate, a.TILE = e.tile, a.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, a.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal;
1942
- };
1943
- f.prototype.run = function() {
1944
- var e, t, n = this.options;
1945
- this.idToLNode = {};
1946
- var r = this.layout = new o(), i = this;
1947
- i.stopped = !1, this.cy = this.options.cy, this.cy.trigger({
1948
- type: "layoutstart",
1949
- layout: this
1950
- });
1951
- var a = r.newGraphManager();
1952
- this.gm = a;
1953
- var s = this.options.eles.nodes(), c = this.options.eles.edges();
1954
- this.root = a.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(s), r);
1955
- for (var l = 0; l < c.length; l++) {
1956
- var u = c[l], d = this.idToLNode[u.data("source")], f = this.idToLNode[u.data("target")];
1957
- if (d !== f && d.getEdgesBetween(f).length == 0) {
1958
- var p = a.add(r.newEdge(), d, f);
1959
- p.id = u.id();
1960
- }
1961
- }
1962
- var m = function(e, t) {
1963
- typeof e == "number" && (e = t);
1964
- var n = e.data("id"), r = i.idToLNode[n];
1965
- return {
1966
- x: r.getRect().getCenterX(),
1967
- y: r.getRect().getCenterY()
1968
- };
1969
- }, h = function a() {
1970
- for (var o = function() {
1971
- n.fit && n.cy.fit(n.eles, n.padding), e || (e = !0, i.cy.one("layoutready", n.ready), i.cy.trigger({
1972
- type: "layoutready",
1973
- layout: i
1974
- }));
1975
- }, s = i.options.refresh, c, l = 0; l < s && !c; l++) c = i.stopped || i.layout.tick();
1976
- if (c) {
1977
- r.checkLayoutSuccess() && !r.isSubLayout && r.doPostLayout(), r.tilingPostLayout && r.tilingPostLayout(), r.isLayoutFinished = !0, i.options.eles.nodes().positions(m), o(), i.cy.one("layoutstop", i.options.stop), i.cy.trigger({
1978
- type: "layoutstop",
1979
- layout: i
1980
- }), t && cancelAnimationFrame(t), e = !1;
1981
- return;
1982
- }
1983
- var u = i.layout.getPositionsData();
1984
- n.eles.nodes().positions(function(e, t) {
1985
- if (typeof e == "number" && (e = t), !e.isParent()) {
1986
- for (var n = e.id(), r = u[n], i = e; r == null && (r = u[i.data("parent")] || u["DummyCompound_" + i.data("parent")], u[n] = r, i = i.parent()[0], i != null););
1987
- return r == null ? {
1988
- x: e.position("x"),
1989
- y: e.position("y")
1990
- } : {
1991
- x: r.x,
1992
- y: r.y
1993
- };
1994
- }
1995
- }), o(), t = requestAnimationFrame(a);
1996
- };
1997
- return r.addListener("layoutstarted", function() {
1998
- i.options.animate === "during" && (t = requestAnimationFrame(h));
1999
- }), r.runLayout(), this.options.animate !== "during" && (i.options.eles.nodes().not(":parent").layoutPositions(i, i.options, m), e = !1), this;
2000
- }, f.prototype.getTopMostNodes = function(e) {
2001
- for (var t = {}, n = 0; n < e.length; n++) t[e[n].id()] = !0;
2002
- return e.filter(function(e, n) {
2003
- typeof e == "number" && (e = n);
2004
- for (var r = e.parent()[0]; r != null;) {
2005
- if (t[r.id()]) return !1;
2006
- r = r.parent()[0];
2007
- }
2008
- return !0;
2009
- });
2010
- }, f.prototype.processChildrenList = function(e, t, n) {
2011
- for (var r = t.length, i = 0; i < r; i++) {
2012
- var a = t[i], o = a.children(), u, d = a.layoutDimensions({ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels });
2013
- if (u = a.outerWidth() != null && a.outerHeight() != null ? e.add(new s(n.graphManager, new c(a.position("x") - d.w / 2, a.position("y") - d.h / 2), new l(parseFloat(d.w), parseFloat(d.h)))) : e.add(new s(this.graphManager)), u.id = a.data("id"), u.paddingLeft = parseInt(a.css("padding")), u.paddingTop = parseInt(a.css("padding")), u.paddingRight = parseInt(a.css("padding")), u.paddingBottom = parseInt(a.css("padding")), this.options.nodeDimensionsIncludeLabels && a.isParent()) {
2014
- var f = a.boundingBox({
2015
- includeLabels: !0,
2016
- includeNodes: !1
2017
- }).w, p = a.boundingBox({
2018
- includeLabels: !0,
2019
- includeNodes: !1
2020
- }).h, m = a.css("text-halign");
2021
- u.labelWidth = f, u.labelHeight = p, u.labelPos = m;
2022
- }
2023
- if (this.idToLNode[a.data("id")] = u, isNaN(u.rect.x) && (u.rect.x = 0), isNaN(u.rect.y) && (u.rect.y = 0), o != null && o.length > 0) {
2024
- var h = n.getGraphManager().add(n.newGraph(), u);
2025
- this.processChildrenList(h, o, n);
2026
- }
2027
- }
2028
- }, f.prototype.stop = function() {
2029
- return this.stopped = !0, this;
2030
- };
2031
- var m = function(e) {
2032
- e("layout", "cose-bilkent", f);
2033
- };
2034
- typeof cytoscape < "u" && m(cytoscape), e.exports = m;
2035
- })]);
2036
- });
2037
- })))(), 1);
2038
- a.use(c.default);
2039
- function l(e, t) {
2040
- e.forEach((e) => {
2041
- let n = {
2042
- id: e.id,
2043
- labelText: e.label,
2044
- height: e.height,
2045
- width: e.width,
2046
- padding: e.padding ?? 0
2047
- };
2048
- Object.keys(e).forEach((t) => {
2049
- [
2050
- "id",
2051
- "label",
2052
- "height",
2053
- "width",
2054
- "padding",
2055
- "x",
2056
- "y"
2057
- ].includes(t) || (n[t] = e[t]);
2058
- }), t.add({
2059
- group: "nodes",
2060
- data: n,
2061
- position: {
2062
- x: e.x ?? 0,
2063
- y: e.y ?? 0
2064
- }
2065
- });
2066
- });
2067
- }
2068
- r(l, "addNodes");
2069
- function u(e, t) {
2070
- e.forEach((e) => {
2071
- let n = {
2072
- id: e.id,
2073
- source: e.start,
2074
- target: e.end
2075
- };
2076
- Object.keys(e).forEach((t) => {
2077
- [
2078
- "id",
2079
- "start",
2080
- "end"
2081
- ].includes(t) || (n[t] = e[t]);
2082
- }), t.add({
2083
- group: "edges",
2084
- data: n
2085
- });
2086
- });
2087
- }
2088
- r(u, "addEdges");
2089
- function d(e) {
2090
- return new Promise((t) => {
2091
- let r = i("body").append("div").attr("id", "cy").attr("style", "display:none"), o = a({
2092
- container: document.getElementById("cy"),
2093
- style: [{
2094
- selector: "edge",
2095
- style: { "curve-style": "bezier" }
2096
- }]
2097
- });
2098
- r.remove(), l(e.nodes, o), u(e.edges, o), o.nodes().forEach(function(e) {
2099
- e.layoutDimensions = () => {
2100
- let t = e.data();
2101
- return {
2102
- w: t.width,
2103
- h: t.height
2104
- };
2105
- };
2106
- }), o.layout({
2107
- name: "cose-bilkent",
2108
- quality: "proof",
2109
- styleEnabled: !1,
2110
- animate: !1
2111
- }).run(), o.ready((e) => {
2112
- n.info("Cytoscape ready", e), t(o);
2113
- });
2114
- });
2115
- }
2116
- r(d, "createCytoscapeInstance");
2117
- function f(e) {
2118
- return e.nodes().map((e) => {
2119
- let t = e.data(), n = e.position(), r = {
2120
- id: t.id,
2121
- x: n.x,
2122
- y: n.y
2123
- };
2124
- return Object.keys(t).forEach((e) => {
2125
- e !== "id" && (r[e] = t[e]);
2126
- }), r;
2127
- });
2128
- }
2129
- r(f, "extractPositionedNodes");
2130
- function p(e) {
2131
- return e.edges().map((e) => {
2132
- let t = e.data(), n = e._private.rscratch, r = {
2133
- id: t.id,
2134
- source: t.source,
2135
- target: t.target,
2136
- startX: n.startX,
2137
- startY: n.startY,
2138
- midX: n.midX,
2139
- midY: n.midY,
2140
- endX: n.endX,
2141
- endY: n.endY
2142
- };
2143
- return Object.keys(t).forEach((e) => {
2144
- [
2145
- "id",
2146
- "source",
2147
- "target"
2148
- ].includes(e) || (r[e] = t[e]);
2149
- }), r;
2150
- });
2151
- }
2152
- r(p, "extractPositionedEdges");
2153
- async function m(e, t) {
2154
- n.debug("Starting cose-bilkent layout algorithm");
2155
- try {
2156
- h(e);
2157
- let t = await d(e), r = f(t), i = p(t);
2158
- return n.debug(`Layout completed: ${r.length} nodes, ${i.length} edges`), {
2159
- nodes: r,
2160
- edges: i
2161
- };
2162
- } catch (e) {
2163
- throw n.error("Error in cose-bilkent layout algorithm:", e), e;
2164
- }
2165
- }
2166
- r(m, "executeCoseBilkentLayout");
2167
- function h(e) {
2168
- if (!e) throw Error("Layout data is required");
2169
- if (!e.config) throw Error("Configuration is required in layout data");
2170
- if (!e.rootNode) throw Error("Root node is required");
2171
- if (!e.nodes || !Array.isArray(e.nodes)) throw Error("No nodes found in layout data");
2172
- if (!Array.isArray(e.edges)) throw Error("Edges array is required in layout data");
2173
- return !0;
2174
- }
2175
- r(h, "validateLayoutData");
2176
- var g = /* @__PURE__ */ r(async (e, t, { insertCluster: n, insertEdge: r, insertEdgeLabel: i, insertMarkers: a, insertNode: o, log: s, positionEdgeLabel: c }, { algorithm: l }) => {
2177
- let u = {}, d = {}, f = t.select("g");
2178
- a(f, e.markers, e.type, e.diagramId);
2179
- let p = f.insert("g").attr("class", "subgraphs"), h = f.insert("g").attr("class", "edgePaths"), g = f.insert("g").attr("class", "edgeLabels"), _ = f.insert("g").attr("class", "nodes");
2180
- s.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(e.nodes.map(async (t) => {
2181
- if (t.isGroup) {
2182
- let e = { ...t };
2183
- d[t.id] = e, u[t.id] = e, await n(p, t);
2184
- } else {
2185
- let n = { ...t };
2186
- u[t.id] = n;
2187
- let r = await o(_, t, {
2188
- config: e.config,
2189
- dir: e.direction || "TB"
2190
- }), i = r.node().getBBox();
2191
- n.width = i.width, n.height = i.height, n.domId = r, s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`);
2192
- }
2193
- })), s.debug("Running cose-bilkent layout algorithm");
2194
- let v = await m({
2195
- ...e,
2196
- nodes: e.nodes.map((e) => {
2197
- let t = u[e.id];
2198
- return {
2199
- ...e,
2200
- width: t.width,
2201
- height: t.height
2202
- };
2203
- })
2204
- }, e.config);
2205
- s.debug("Positioning nodes based on layout results"), v.nodes.forEach((e) => {
2206
- let t = u[e.id];
2207
- t?.domId && (t.domId.attr("transform", `translate(${e.x}, ${e.y})`), t.x = e.x, t.y = e.y, s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`));
2208
- }), v.edges.forEach((t) => {
2209
- let n = e.edges.find((e) => e.id === t.id);
2210
- n && (n.points = [
2211
- {
2212
- x: t.startX,
2213
- y: t.startY
2214
- },
2215
- {
2216
- x: t.midX,
2217
- y: t.midY
2218
- },
2219
- {
2220
- x: t.endX,
2221
- y: t.endY
2222
- }
2223
- ]);
2224
- }), s.debug("Inserting and positioning edges"), await Promise.all(e.edges.map(async (t) => {
2225
- await i(g, t);
2226
- let n = u[t.start ?? ""], a = u[t.end ?? ""];
2227
- if (n && a) {
2228
- let i = v.edges.find((e) => e.id === t.id);
2229
- if (i) {
2230
- s.debug("APA01 positionedEdge", i);
2231
- let o = { ...t };
2232
- c(o, r(h, o, d, e.type, n, a, e.diagramId));
2233
- } else {
2234
- let i = {
2235
- ...t,
2236
- points: [{
2237
- x: n.x || 0,
2238
- y: n.y || 0
2239
- }, {
2240
- x: a.x || 0,
2241
- y: a.y || 0
2242
- }]
2243
- };
2244
- c(i, r(h, i, d, e.type, n, a, e.diagramId));
2245
- }
2246
- }
2247
- })), s.debug("Cose-bilkent rendering completed");
2248
- }, "render");
2249
- //#endregion
2250
- export { g as render };
2251
-
2252
- //# sourceMappingURL=cose-bilkent-S5V4N54A-CKhwzobJ.js.map